prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--[[ Services ]]
-- local PlayersService = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local ContextActionService = game:GetService("ContextActionService") local Settings = UserSettings() -- ignore warning local GameSettings = Settings.GameSettings local Mouse = PlayersService.LocalPlayer:GetMouse()
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local autoscaling = false --Estimates top speed local UNITS = { --Click on speed to change units --First unit is default { units = "MPH" , scaling = (10/12) * (60/88) , -- 1 stud : 10 inches | ft/s to MPH maxSpeed = 120 , spInc = 20 , -- Increment between labelled notches }, { units = "KM/H" , scaling = (10/12) * 1.09728 , -- 1 stud : 10 inches | ft/s to KP/H maxSpeed = 200 , spInc = 20 , -- Increment between labelled notches }, { units = "SPS" , scaling = 1 , -- Roblox standard maxSpeed = 240 , spInc = 20 , -- Increment between labelled notches } }
-- assetIDs for all images in the sequence
local imageAssetIDs = require(script.AssetIds)
--[=[ @class TableUtil A collection of helpful table utility functions. Many of these functions are carried over from JavaScript or Python that are not present in Lua. Tables that only work specifically with arrays or dictionaries are marked as such in the documentation. :::info Immutability All functions (_except_ `SwapRemove`, `SwapRemoveFirstValue`, and `Lock`) treat tables as immutable and will return copies of the given table(s) with the operations performed on the copies. ]=]
local TableUtil = {} local HttpService = game.HttpService local rng = Random.new()
-- Decompiled with the Synapse X Luau decompiler.
local v1 = require(script.Parent:WaitForChild("BaseCharacterController")); local v2 = setmetatable({}, v1); v2.__index = v2; function v2.new() local v3 = setmetatable(v1.new(), v2); v3.parentUIFrame = nil; v3.jumpButton = nil; v3.characterAddedConn = nil; v3.humanoidStateEnabledChangedConn = nil; v3.humanoidJumpPowerConn = nil; v3.humanoidParentConn = nil; v3.externallyEnabled = false; v3.jumpPower = 0; v3.jumpStateEnabled = true; v3.isJumping = false; v3.humanoid = nil; return v3; end; local l__Players__1 = game:GetService("Players"); function v2.EnableButton(p1, p2) if p2 then if not p1.jumpButton then p1:Create(); end; local v4 = l__Players__1.LocalPlayer.Character and l__Players__1.LocalPlayer.Character:FindFirstChildOfClass("Humanoid"); if v4 and p1.externallyEnabled and p1.externallyEnabled and v4.JumpPower > 0 then p1.jumpButton.Visible = true; return; end; else p1.jumpButton.Visible = false; p1.isJumping = false; p1.jumpButton.ImageRectOffset = Vector2.new(1, 146); end; end; function v2.UpdateEnabled(p3) if p3.jumpPower > 0 and p3.jumpStateEnabled then p3:EnableButton(true); return; end; p3:EnableButton(false); end; function v2.HumanoidChanged(p4, p5) local v5 = l__Players__1.LocalPlayer.Character and l__Players__1.LocalPlayer.Character:FindFirstChildOfClass("Humanoid"); if v5 then if p5 == "JumpPower" then p4.jumpPower = v5.JumpPower; p4:UpdateEnabled(); return; end; if p5 == "Parent" and not v5.Parent then p4.humanoidChangeConn:Disconnect(); end; end; end; function v2.HumanoidStateEnabledChanged(p6, p7, p8) if p7 == Enum.HumanoidStateType.Jumping then p6.jumpStateEnabled = p8; p6:UpdateEnabled(); end; end; function v2.CharacterAdded(p9, p10) if p9.humanoidChangeConn then p9.humanoidChangeConn:Disconnect(); p9.humanoidChangeConn = nil; end; p9.humanoid = p10:FindFirstChildOfClass("Humanoid"); while not p9.humanoid do p10.ChildAdded:wait(); p9.humanoid = p10:FindFirstChildOfClass("Humanoid"); end; p9.humanoidJumpPowerConn = p9.humanoid:GetPropertyChangedSignal("JumpPower"):Connect(function() p9.jumpPower = p9.humanoid.JumpPower; p9:UpdateEnabled(); end); p9.humanoidParentConn = p9.humanoid:GetPropertyChangedSignal("Parent"):Connect(function() if not p9.humanoid.Parent then p9.humanoidJumpPowerConn:Disconnect(); p9.humanoidJumpPowerConn = nil; p9.humanoidParentConn:Disconnect(); p9.humanoidParentConn = nil; end; end); p9.humanoidStateEnabledChangedConn = p9.humanoid.StateEnabledChanged:Connect(function(p11, p12) p9:HumanoidStateEnabledChanged(p11, p12); end); p9.jumpPower = p9.humanoid.JumpPower; p9.jumpStateEnabled = p9.humanoid:GetStateEnabled(Enum.HumanoidStateType.Jumping); p9:UpdateEnabled(); end; function v2.SetupCharacterAddedFunction(p13) p13.characterAddedConn = l__Players__1.LocalPlayer.CharacterAdded:Connect(function(p14) p13:CharacterAdded(p14); end); if l__Players__1.LocalPlayer.Character then p13:CharacterAdded(l__Players__1.LocalPlayer.Character); end; end; function v2.Enable(p15, p16, p17) if p17 then p15.parentUIFrame = p17; end; p15.externallyEnabled = p16; p15:EnableButton(p16); end; local l__GuiService__2 = game:GetService("GuiService"); function v2.Create(p18) if not p18.parentUIFrame then return; end; if p18.jumpButton then p18.jumpButton:Destroy(); p18.jumpButton = nil; end; local v6 = math.min(p18.parentUIFrame.AbsoluteSize.x, p18.parentUIFrame.AbsoluteSize.y) <= 500; if v6 then local v7 = 70; else v7 = 120; end; p18.jumpButton = Instance.new("ImageButton"); p18.jumpButton.Name = "JumpButton"; p18.jumpButton.Visible = false; p18.jumpButton.BackgroundTransparency = 1; p18.jumpButton.Image = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"; p18.jumpButton.ImageRectOffset = Vector2.new(1, 146); p18.jumpButton.ImageRectSize = Vector2.new(144, 144); p18.jumpButton.Size = UDim2.new(0, v7, 0, v7); p18.jumpButton.Position = v6 and UDim2.new(1, -(v7 * 1.5 - 10), 1, -v7 - 20) or UDim2.new(1, -(v7 * 1.5 - 10), 1, -v7 * 1.75); local u3 = nil; p18.jumpButton.InputBegan:connect(function(p19) if not (not u3) or p19.UserInputType ~= Enum.UserInputType.Touch or p19.UserInputState ~= Enum.UserInputState.Begin then return; end; u3 = p19; p18.jumpButton.ImageRectOffset = Vector2.new(146, 146); p18.isJumping = true; end); local function u4() u3 = nil; p18.isJumping = false; p18.jumpButton.ImageRectOffset = Vector2.new(1, 146); end; p18.jumpButton.InputEnded:connect(function(p20) if p20 == u3 then u4(); end; end); l__GuiService__2.MenuOpened:connect(function() if u3 then u4(); end; end); if not p18.characterAddedConn then p18:SetupCharacterAddedFunction(); end; p18.jumpButton.Parent = p18.parentUIFrame; end; return v2;
--//Transmission//--
local AmountOfGears = 6 --{Max of 8 gears} local TransmissionType = "Automatic" --{HPattern, Automatic, DualClutch, CVT} local Drivetrain = "AWD" --{RWD, FWD, AWD} local TorqueSplit = 30 --{Split to the rear wheels} local DifferentialF = 0 --{0 = Open, 1 = locked} local DifferentialR = 0.6 --{0 = Open, 1 = locked} local Gear1 = 4.60 local Gear2 = 2.72 local Gear3 = 1.86 local Gear4 = 1.46 local Gear5 = 1.23 local Gear6 = 1.00 local Gear7 = 0.82 local Gear8 = 0.69 local FinalDrive = 2.937 local EngineIdle = 600 local EngineRedline = 6800
--[=[ Invokes the function once at the given event, unless the cancel callback is called. @param event Signal | RBXScriptSignal @param func function -- Function to call @return function -- Call this function to cancel call ]=]
function StepUtils.onceAtEvent(event, func) assert(type(func) == "function", "Bad func") local conn local function cleanup() if conn then conn:Disconnect() conn = nil end end conn = event:Connect(function(...) cleanup() func(...) end) return cleanup end return StepUtils
-- for quick setting-back of face
local oldFace = nil local oldFaceTexture = nil local debounce = false function changeFace(torso) if debounce then return end debounce = true oldFace = nil oldFaceTexture = nil local char = torso.Parent if char then local charHead = char:FindFirstChild("Head") if charHead then local charFace = charHead:FindFirstChild("face") if charFace then oldFaceTexture = charFace.Texture charFace.Texture = "http://www.roblox.com/asset/?id="..tostring(toiletFace[math.random(1, #toiletFace)]) oldFace = charFace end end end end function checkForNewSitter(newChild) if newChild:IsA("Weld") and newChild.Name == "SeatWeld" then if newChild.Part0 == toilet then changeFace(newChild.Part1) else changeFace(newChild.Part0) end end end function checkForFaceRelease(child) if child:IsA("Weld") and child.Name == "SeatWeld" then if oldFace and oldFaceTexture then oldFace.Texture = oldFaceTexture oldFace = nil oldFaceTexture = nil end debounce = false end end toilet.ChildAdded:connect(checkForNewSitter) toilet.ChildRemoved:connect(checkForFaceRelease)
-- Data store for tracking purchases that were successfully processed
local purchaseHistoryStore = DataStoreService:GetDataStore("PurchaseHistory")
--// Connections
L_111_.OnClientEvent:connect(function(L_194_arg1, L_195_arg2, L_196_arg3, L_197_arg4, L_198_arg5, L_199_arg6, L_200_arg7) if L_194_arg1 and not L_15_ then MakeFakeArms() L_42_ = L_2_.PlayerGui.MainGui L_26_ = L_42_:WaitForChild('Others') L_27_ = L_26_:WaitForChild('Kill') L_28_ = L_42_:WaitForChild('GameGui'):WaitForChild('AmmoFrame') L_29_ = L_28_:WaitForChild('Ammo') L_30_ = L_28_:WaitForChild('AmmoBackground') L_31_ = L_28_:WaitForChild('MagCount') L_32_ = L_28_:WaitForChild('MagCountBackground') L_33_ = L_28_:WaitForChild('DistDisp') L_34_ = L_28_:WaitForChild('Title') L_35_ = L_28_:WaitForChild('Mode1') L_36_ = L_28_:WaitForChild('Mode2') L_37_ = L_28_:WaitForChild('Mode3') L_38_ = L_28_:WaitForChild('Mode4') L_39_ = L_28_:WaitForChild('Mode5') L_40_ = L_28_:WaitForChild('Stances') L_41_ = L_42_:WaitForChild('Shading') L_41_.Visible = false L_34_.Text = L_1_.Name UpdateAmmo() L_43_ = L_195_arg2 L_44_ = L_196_arg3 L_45_ = L_197_arg4 L_46_ = L_198_arg5 L_47_ = L_199_arg6 L_48_ = L_200_arg7 L_49_ = L_62_.Bolt L_87_ = L_48_.C1 L_88_ = L_48_.C0 if L_1_:FindFirstChild('AimPart2') then L_57_ = L_1_:WaitForChild('AimPart2') end if L_1_:FindFirstChild('FirePart2') then L_60_ = L_1_.FirePart2 end if L_24_.FirstPersonOnly then L_2_.CameraMode = Enum.CameraMode.LockFirstPerson end --uis.MouseIconEnabled = false L_5_.FieldOfView = 70 L_15_ = true elseif L_15_ then if L_3_ and L_3_.Humanoid and L_3_.Humanoid.Health > 0 and L_9_ then Stand() Unlean() end L_93_ = 0 L_80_ = false L_81_ = false L_82_ = false L_64_ = false L_67_ = false L_66_ = false Shooting = false L_97_ = 70 RemoveArmModel() L_42_:Destroy() for L_201_forvar1, L_202_forvar2 in pairs(IgnoreList) do if L_202_forvar2 ~= L_3_ and L_202_forvar2 ~= L_5_ and L_202_forvar2 ~= L_104_ then table.remove(IgnoreList, L_201_forvar1) end end if L_3_:FindFirstChild('Right Arm') and L_3_:FindFirstChild('Left Arm') then L_3_['Right Arm'].LocalTransparencyModifier = 0 L_3_['Left Arm'].LocalTransparencyModifier = 0 end L_78_ = false L_69_ = true L_2_.CameraMode = Enum.CameraMode.Classic L_110_.MouseIconEnabled = true L_5_.FieldOfView = 70 L_15_ = false L_110_.MouseDeltaSensitivity = L_52_ L_4_.Icon = "http://www.roblox.com/asset?id=0" L_15_ = false L_4_.TargetFilter = nil end end)
-- Create component
local NotificationDialog = Roact.PureComponent:extend(script.Name) function NotificationDialog:init() self:setState({ ShouldDisplayDetails = false; }) end function NotificationDialog:render() return new('Frame', { BackgroundColor3 = Color3.fromRGB(0, 0, 0); BackgroundTransparency = 0.7; BorderSizePixel = 0; Size = UDim2.new(1, 0, 0, 22 + 2); LayoutOrder = self.props.LayoutOrder; }, { ColorBar = new('Frame', { BorderSizePixel = 0; BackgroundColor3 = self.props.ThemeColor; Size = UDim2.new(1, 0, 0, 2); }); OKButton = new('TextButton', { BackgroundColor3 = Color3.fromRGB(0, 0, 0); BackgroundTransparency = 0.8; BorderSizePixel = 0; AnchorPoint = Vector2.new(0, 1); Position = UDim2.new(0, 0, 1, 0); Size = UDim2.new(self.state.ShouldDisplayDetails and 1 or 0.5, 0, 0, 22); Text = 'GOT IT'; Font = Enum.Font.Gotham; TextSize = 10; TextColor3 = Color3.fromRGB(255, 255, 255); [Roact.Event.Activated] = function (rbx) self.props.OnDismiss() end; }); DetailsButton = (not self.state.ShouldDisplayDetails or nil) and new('TextButton', { BackgroundColor3 = Color3.fromRGB(0, 0, 0); BackgroundTransparency = 0.8; BorderSizePixel = 0; AnchorPoint = Vector2.new(0, 1); Position = UDim2.new(0.5, 0, 1, 0); Size = UDim2.new(0.5, 0, 0, 22); Text = 'WHAT CAN I DO?'; Font = Enum.Font.Gotham; TextSize = 10; TextColor3 = Color3.fromRGB(255, 255, 255); [Roact.Event.Activated] = function (rbx) self:setState({ ShouldDisplayDetails = true; }) end; }); ButtonDivider = (not self.state.ShouldDisplayDetails or nil) and new('Frame', { BackgroundColor3 = Color3.fromRGB(0, 0, 0); BackgroundTransparency = 0.75; BorderSizePixel = 0; Position = UDim2.new(0.5, 0, 1, 0); AnchorPoint = Vector2.new(0.5, 1); Size = UDim2.new(0, 1, 0, 22); }); Text = new('TextLabel', { BackgroundTransparency = 1; Position = UDim2.new(0, 0, 0, 2); Size = UDim2.new(1, 0, 1, -22 - 2); TextWrapped = true; RichText = true; Font = Enum.Font.GothamSemibold; TextColor3 = Color3.fromRGB(255, 255, 255); TextSize = 11; TextStrokeTransparency = 0.9; LineHeight = 1; Text = (not self.state.ShouldDisplayDetails) and self.props.NoticeText or self.props.DetailText; [Roact.Change.TextBounds] = function (rbx) rbx.Parent.Size = UDim2.new(1, 0, 0, rbx.TextBounds.Y + 29 + 22 + 2) end; }); }) end return NotificationDialog
--// This module is for stuff specific to cross server communication --// NOTE: THIS IS NOT A *CONFIG/USER* PLUGIN! ANYTHING IN THE MAINMODULE PLUGIN FOLDERS IS ALREADY PART OF/LOADED BY THE SCRIPT! DO NOT ADD THEM TO YOUR CONFIG>PLUGINS FOLDER!
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local server = Vargs.Server; local service = Vargs.Service; local Settings = server.Settings local Functions, Commands, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Deps = server.Functions, server.Commands, server.Admin, server.Anti, server.Core, server.HTTP, server.Logs, server.Remote, server.Process, server.Variables, server.Deps local ServerId = game.JobId; local MsgService = service.MessagingService; local subKey = Core.DataStoreEncode("Adonis_CrossServerMessaging"); local counter = 0; local lastTick; local oldCommands = Core.CrossServerCommands; --// Cross Server Commands Core.CrossServerCommands = { ServerChat = function(jobId, data) if data then for _, v in ipairs(service.GetPlayers()) do if Admin.GetLevel(v) > 0 then Remote.Send(v, "handler", "ChatHandler", data.Player, data.Message, "Cross") end end end end; Ping = function(jobId, data) Core.CrossServer("Pong", { JobId = game.JobId; NumPlayers = #service.Players:GetPlayers(); }) end; Pong = function(jobId, data) service.Events.ServerPingReplyReceived:Fire(jobId, data) end; NewRunCommand = function(jobId, plrData, comString) Process.Command(Functions.GetFakePlayer(plrData), comString, {AdminLevel = plrData.AdminLevel, CrossServer = true}) end; -- // Unused, unnecessary, at the very least it should use GetEnv, and yes even if GetEnv has an empty table you can still do GetEnv({}).GetEnv().server -- If this ever were to be re-enabled it should use Core.Loadstring at all --[[Loadstring = function(jobId, source) -- // Im honestly not even sure what to think of this one. Core.Loadstring(source, GetEnv{})() end;]] Message = function(jobId, fromPlayer, message, duration) server.Functions.Message( `Global Message from {fromPlayer or "[Unknown]"}`, message, service.GetPlayers(), true, duration ) end; RemovePlayer = function(jobId, name, BanMessage, reason) --// probably should move this to userid local player = service.Players:FindFirstChild(name) if player then player:Kick(string.format("%s | Reason: %s", BanMessage, reason)) end end; DataStoreUpdate = function(jobId, key, data) if key and data then Routine(Core.LoadData, key, data) end end; UpdateSetting = function(jobId, setting, newValue) if type(setting) == "string" then Settings[setting] = if newValue == nil then require(Deps.DefaultSettings).Settings[setting] else newValue end end; LoadData = function(jobId, key, dat) Core.LoadData(key, dat, jobId) end; Event = function(jobId, eventId, ...) service.Events[`CRSSRV:{eventId}`]:Fire(...) end; CrossServerVote = function(jobId, data) local question = data.Question local answers = data.Answers local voteKey = data.VoteKey local start = os.clock() Logs.AddLog("Commands", { Text = `[CRS_SERVER] Vote initiated by {data.Initiator}`, Desc = question }) for _, v in service.GetPlayers() do Routine(function() local response = Remote.GetGui(v, "Vote", {Question = question, Answers = answers}) if response and os.clock() - start <= 120 then MsgService:PublishAsync(voteKey, {PlrInfo = {Name = v.Name, UserId = v.UserId}, Response = response}) end end) end end; } local function CrossEvent(eventId) return service.Events[`CRSSRV{eventId}`] end --// User Commands Commands.CrossServer = { Prefix = Settings.Prefix; Commands = {"crossserver", "cross"}; Args = {"command"}; Description = "Runs the specified command string on all servers"; AdminLevel = "HeadAdmins"; CrossServerDenied = true; --// Makes it so this command cannot be ran via itself causing an infinite spammy loop of cross server commands... IsCrossServer = true; --// Used in settings.CrossServerCommands in case a game creator wants to disable the cross-server commands Function = function(plr: Player, args: {string}) if not Core.CrossServer("NewRunCommand", { UserId = plr.UserId; Name = plr.Name; DisplayName = plr.DisplayName; AccountAge = plr.AccountAge; --MembershipType = plr.MembershipType; -- MessagingService doesn't accept Enums FollowUserId = plr.FollowUserId; AdminLevel = Admin.GetLevel(plr); }, args[1]) then error("CrossServer handler not ready (try again later)") end end; }; Commands.CrossServerList = { Prefix = Settings.Prefix; Commands = {"serverlist", "gameservers", "crossserverlist", "listservers"}; Args = {}; Description = "Attempts to list all active servers (at the time the command was ran)"; AdminLevel = "Admins"; CrossServerDenied = true; IsCrossServer = true; Function = function(plr: Player, args: {string}) local disced = false local updateKey = `SERVERPING_{math.random()}` local replyList = {} local listener = service.Events.ServerPingReplyReceived:Connect(function(jobId, data) if jobId then replyList[jobId] = data or {} end end) local function listUpdate() local tab = {} local totalPlayers = 0 local totalServers = 0 for jobId,data in replyList do totalServers += 1 totalPlayers = totalPlayers + (data.NumPlayers or 0) table.insert(tab, { Text = `Players: {data.NumPlayers or 0} | JobId: {jobId}`; Desc = `JobId: {jobId}`; }) end table.insert(tab, 1, { Text = `Total Servers: {totalServers} | Total Players: {totalPlayers}`; Desc = "The total number of servers and players"; }) return tab; end local function doDisconnect() if not disced then disced = true Logs.TempUpdaters[updateKey] = nil listener:Disconnect() end end if not Core.CrossServer("Ping") then doDisconnect() error("CrossServer handler not ready (please try again later)") else local closeEvent = Remote.NewPlayerEvent(plr,updateKey, function() doDisconnect() end) Logs.TempUpdaters[updateKey] = listUpdate; Remote.MakeGui(plr, "List", { Title = "Server List", Tab = listUpdate(), Update = "TempUpdate", UpdateArgs = {{UpdateKey = updateKey}}, OnClose = `client.Remote.PlayerEvent('{updateKey}')`, AutoUpdate = 1, }) delay(500, doDisconnect) end end; }; Commands.CrossServerVote = { Prefix = Settings.Prefix; Commands = {"crossservervote", "crsvote", "globalvote", "gvote"}; Args = {"answer1,answer2,etc (NO SPACES)", "question"}; Filter = true; Description = "Lets you ask players in all servers a question with a list of answers and get the results"; AdminLevel = "Moderators"; CrossServerDenied = true; IsCrossServer = true; Function = function(plr: Player, args: {string}) local question = args[2] if not question then error("You forgot to supply a question! (argument #2)") end local answers = args[1] local anstab = {} local responses = {} local voteKey = `ADONISVOTE{math.random()}` local startTime = os.clock() local msgSub = MsgService:SubscribeAsync(voteKey, function(data) table.insert(responses, data.Data.Response) end) local function voteUpdate() local results = {} local total = #responses local tab = { `Question: {question}`; `Total Responses: {total}`; `Time Left: {math.max(0, 120 - (os.clock()-startTime))}`; --`Didn't Vote: {#players-total}`; } for _, v in responses do if not results[v] then results[v] = 0 end results[v] += 1 end for _, v in anstab do local ans = v local num = results[v] local percent if not num then num = 0 percent = 0 else percent = math.floor((num/total)*100) end table.insert(tab, { Text = `{ans} | {percent}% - {num}/{total}`, Desc = `Number: {num}/{total} | Percent: {percent}` }) end return tab end Logs.TempUpdaters[voteKey] = voteUpdate; if not answers then anstab = {"Yes","No"} else for ans in answers:gmatch("([^,]+)") do table.insert(anstab, ans) end end local data = { Answers = anstab; Question = question; VoteKey = voteKey; Initiator = service.FormatPlayer(plr); } Core.CrossServer("CrossServerVote", data) Remote.MakeGui(plr, "List", { Title = "Results", Icon = server.MatIcons["Text snippet"]; Tab = voteUpdate(), Update = "TempUpdate", UpdateArgs = {{UpdateKey = voteKey}}, AutoUpdate = 1, }) delay(120, function() Logs.TempUpdaters[voteKey] = nil msgSub:Disconnect() end) end }; --// Handlers Core.CrossServer = function(...) local data = {ServerId, ...}; service.Queue("CrossServerMessageQueue", function() --// rate limiting counter += 1 if not lastTick then lastTick = os.clock() end if counter >= 150 + 60 * #service.Players:GetPlayers() then repeat task.wait() until os.clock()-lastTick > 60 end if os.clock()-lastTick > 60 then lastTick = os.clock() counter = 1 end --// publish MsgService:PublishAsync(subKey, data) end, 300, true) return true end Process.CrossServerMessage = function(msg) local data = msg.Data assert(data and type(data) == "table", `CrossServer: Invalid data type {type(data)}`) local serverId, command = data[1], data[2] Logs:AddLog("Script", { Text = `Cross-server message received: {command or "[NO COMMAND]"}`; Desc = `Origin JobId: {serverId or "[MISSING]"}` }) if not (serverId and command) then return end table.remove(data, 2) if Core.CrossServerCommands[command] then Core.CrossServerCommands[command](unpack(data)) end end Core.SubEvent = MsgService:SubscribeAsync(subKey, function(...) return Process.CrossServerMessage(...) end) --// Check for additions added by other modules in core before this one loaded for i, v in oldCommands do Core.CrossServerCommands[i] = v end Logs:AddLog("Script", "Cross-Server Module Loaded"); end
--------------------------------------------
local Body = script.Parent.Parent local Head = Body:WaitForChild("Head") local Hum = Body:WaitForChild("Humanoid") local Core = Body:WaitForChild("HumanoidRootPart") local IsR6 = (Hum.RigType.Value==0) local Trso = (IsR6 and Body:WaitForChild("Torso")) or Body:WaitForChild("UpperTorso") local Neck = (IsR6 and Trso:WaitForChild("Neck")) or Head:WaitForChild("Neck") local Waist = (not IsR6 and Trso:WaitForChild("Waist")) local NeckOrgnC0 = Neck.C0 local WaistOrgnC0 = (not IsR6 and Waist.C0) local LookingAtValue = Instance.new("ObjectValue"); LookingAtValue.Parent = Body; LookingAtValue.Name = "LookingAt"
--[[Dependencies]]
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local UserInputService = game:GetService("UserInputService") local bike = script.Parent.Bike.Value local _Tune = require(bike.Tuner)
--[=[ Destroys the gamepad object. ]=]
function Gamepad:Destroy() self._trove:Destroy() end return Gamepad
--[[ Called when the watched state changes value. value `set` call from `updateAll` ]]
function class:update(): boolean for _, callback in self._changeListeners do task.spawn(callback) end return false end
-------------------------
while wait(.5) do handler:FireServer('updateSpeed') end
--[[ This is the main script for the gun The only thing you should change is the settings Don't change anything else or you might risk breaking the gun If you have any questions / comments / concerns / sandwiches, message me Enjoy! ______ ______ __ ______ _ ______ / _/ _/ /_ __/_ _______/ /_ ____ / ____/_ _______(_)___ ____ / / / / // / / / / / / / ___/ __ \/ __ \/ /_ / / / / ___/ / __ \/ __ \ / // / / // / / / / /_/ / / / /_/ / /_/ / __/ / /_/ (__ ) / /_/ / / / / / // / / // / /_/ \__,_/_/ /_.___/\____/_/ \__,_/____/_/\____/_/ /_/ _/ // / /__/__/ /__/__/ --]]
repeat wait() until game.Players.LocalPlayer.Character repeat wait() until game.Players.LocalPlayer.Character:IsDescendantOf(game.Workspace) wait(1 / 20)
-- << Functions >> --
UserInputService.MouseIconEnabled = false function lerp(a, b, c) return a + (b - a) * c end bobbing = game:GetService("RunService").RenderStepped:Connect(function(deltaTime) if script.Parent.Humanoid.MoveDirection.Magnitude > 0 then deltaTime = deltaTime * (script.Parent.Humanoid.WalkSpeed * 3.75) else deltaTime = deltaTime * 60 end print(deltaTime) if Humanoid.Health <= 0 then bobbing:Disconnect() return end local rootMagnitude = Humanoid.RootPart and Vector3.new(Humanoid.RootPart.Velocity.X, 0, Humanoid.RootPart.Velocity.Z).Magnitude or 0 local calcRootMagnitude = math.min(rootMagnitude, 50) if deltaTime > 3 then func1 = 0 func2 = 0 else func1 = lerp(func1, math.cos(tick() * 0.5 * math.random(10, 15)) * (math.random(5, 20) / 200) * deltaTime, 0.05 * deltaTime) func2 = lerp(func2, math.cos(tick() * 0.5 * math.random(5, 10)) * (math.random(2, 10) / 200) * deltaTime, 0.05 * deltaTime) end Camera.CFrame = Camera.CFrame * (CFrame.fromEulerAnglesXYZ(0, 0, math.rad(func3)) * CFrame.fromEulerAnglesXYZ(math.rad(func4 * deltaTime), math.rad(val * deltaTime), val2) * CFrame.Angles(0, 0, math.rad(func4 * deltaTime * (calcRootMagnitude / 5))) * CFrame.fromEulerAnglesXYZ(math.rad(func1), math.rad(func2), math.rad(func2 * 10))) val2 = math.clamp(lerp(val2, -Camera.CFrame:VectorToObjectSpace((Humanoid.RootPart and Humanoid.RootPart.Velocity or Vector3.new()) / math.max(Humanoid.WalkSpeed, 0.01)).X * 0.08, 0.1 * deltaTime), -0.35, 0.2) func3 = lerp(func3, math.clamp(UserInputService:GetMouseDelta().X, -5, 5), 0.25 * deltaTime) func4 = lerp(func4, math.sin(tick() * int) / 5 * math.min(1, int2 / 10), 0.25 * deltaTime) if rootMagnitude > 1 then val = lerp(val, math.cos(tick() * 0.5 * math.floor(int)) * (int / 200), 0.25 * deltaTime) else val = lerp(val, 0, 0.05 * deltaTime) end if rootMagnitude > 12 then int = 20 int2 = 18 elseif rootMagnitude > 0.1 then int = 12 int2 = 14 else int2 = 0 end vect3 = lerp(vect3, Camera.CFrame.LookVector, 0.125 * deltaTime) end)
-------------------------
function DoorClose() if Shaft00.MetalDoor.CanCollide == false then Shaft00.MetalDoor.CanCollide = true while Shaft00.MetalDoor.Transparency > 0.0 do Shaft00.MetalDoor.Transparency = Shaft00.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft01.MetalDoor.CanCollide == false then Shaft01.MetalDoor.CanCollide = true while Shaft01.MetalDoor.Transparency > 0.0 do Shaft01.MetalDoor.Transparency = Shaft01.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft02.MetalDoor.CanCollide == false then Shaft02.MetalDoor.CanCollide = true while Shaft02.MetalDoor.Transparency > 0.0 do Shaft02.MetalDoor.Transparency = Shaft02.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft03.MetalDoor.CanCollide == false then Shaft03.MetalDoor.CanCollide = true while Shaft03.MetalDoor.Transparency > 0.0 do Shaft03.MetalDoor.Transparency = Shaft03.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft04.MetalDoor.CanCollide == false then Shaft04.MetalDoor.CanCollide = true while Shaft04.MetalDoor.Transparency > 0.0 do Shaft04.MetalDoor.Transparency = Shaft04.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft05.MetalDoor.CanCollide == false then Shaft05.MetalDoor.CanCollide = true while Shaft05.MetalDoor.Transparency > 0.0 do Shaft05.MetalDoor.Transparency = Shaft05.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft06.MetalDoor.CanCollide == false then Shaft06.MetalDoor.CanCollide = true while Shaft06.MetalDoor.Transparency > 0.0 do Shaft06.MetalDoor.Transparency = Shaft06.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft07.MetalDoor.CanCollide == false then Shaft07.MetalDoor.CanCollide = true while Shaft07.MetalDoor.Transparency > 0.0 do Shaft07.MetalDoor.Transparency = Shaft07.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft08.MetalDoor.CanCollide == false then Shaft08.MetalDoor.CanCollide = true while Shaft08.MetalDoor.Transparency > 0.0 do Shaft08.MetalDoor.Transparency = Shaft08.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft09.MetalDoor.CanCollide == false then Shaft09.MetalDoor.CanCollide = true while Shaft09.MetalDoor.Transparency > 0.0 do Shaft09.MetalDoor.Transparency = Shaft09.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft10.MetalDoor.CanCollide == false then Shaft10.MetalDoor.CanCollide = true while Shaft10.MetalDoor.Transparency > 0.0 do Shaft10.MetalDoor.Transparency = Shaft10.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft11.MetalDoor.CanCollide == false then Shaft11.MetalDoor.CanCollide = true while Shaft11.MetalDoor.Transparency > 0.0 do Shaft11.MetalDoor.Transparency = Shaft11.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft12.MetalDoor.CanCollide == false then Shaft12.MetalDoor.CanCollide = true while Shaft12.MetalDoor.Transparency > 0.0 do Shaft12.MetalDoor.Transparency = Shaft12.MetalDoor.Transparency - .1 wait(0.000001) end end if Shaft13.MetalDoor.CanCollide == false then Shaft13.MetalDoor.CanCollide = true while Shaft13.MetalDoor.Transparency > 0.0 do Shaft13.MetalDoor.Transparency = Shaft13.MetalDoor.Transparency - .1 wait(0.000001) end end end function onClicked() DoorClose() Car.BodyVelocity.velocity = Vector3.new(0, 20, 0) --Change 10 to change the speed. end script.Parent.MouseButton1Click:connect(onClicked) script.Parent.MouseButton1Click:connect(function() if clicker == true then clicker = false else return end end) Car.Touched:connect(function(otherPart) if otherPart == Elevator.Floors:FindFirstChild(script.Parent.Name) then StopE() DoorOpen() end end) function StopE() Car.BodyVelocity.velocity = Vector3.new(0, 0, 0) Car.BodyPosition.position = Elevator.Floors:FindFirstChild(script.Parent.Name).Position clicker = true end function DoorOpen() while Shaft13.MetalDoor.Transparency < 1.0 do Shaft13.MetalDoor.Transparency = Shaft13.MetalDoor.Transparency + .1 wait(0.000001) end Shaft13.MetalDoor.CanCollide = false end
-- / Game Assets / --
local GameAssets = game.ServerStorage.GameAssets local Badges = GameAssets.Badges
--------RIGHT DOOR --------
game.Workspace.doorright.l11.BrickColor = BrickColor.new(106) game.Workspace.doorright.l23.BrickColor = BrickColor.new(106) game.Workspace.doorright.l32.BrickColor = BrickColor.new(106) game.Workspace.doorright.l53.BrickColor = BrickColor.new(106) game.Workspace.doorright.l62.BrickColor = BrickColor.new(106) game.Workspace.doorright.l71.BrickColor = BrickColor.new(1013) game.Workspace.doorright.l12.BrickColor = BrickColor.new(106) game.Workspace.doorright.l21.BrickColor = BrickColor.new(106) game.Workspace.doorright.l33.BrickColor = BrickColor.new(106) game.Workspace.doorright.l42.BrickColor = BrickColor.new(106) game.Workspace.doorright.l51.BrickColor = BrickColor.new(106) game.Workspace.doorright.l63.BrickColor = BrickColor.new(106) game.Workspace.doorright.l72.BrickColor = BrickColor.new(1013) game.Workspace.doorright.l13.BrickColor = BrickColor.new(106) game.Workspace.doorright.l22.BrickColor = BrickColor.new(106) game.Workspace.doorright.l31.BrickColor = BrickColor.new(106) game.Workspace.doorright.l43.BrickColor = BrickColor.new(106) game.Workspace.doorright.l52.BrickColor = BrickColor.new(106) game.Workspace.doorright.l61.BrickColor = BrickColor.new(106) game.Workspace.doorright.l73.BrickColor = BrickColor.new(1013) game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- Define the jump duration
local jumpDuration = 0.1 btn.MouseButton1Click:Connect(function() -- Create the jump tween local Click = script.Click local jumpTweenInfo = TweenInfo.new(jumpDuration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) local jumpTween = game:GetService("TweenService"):Create(btn, jumpTweenInfo, { Size = UDim2.new(btn.Size.X.Scale * jumpScale, btn.Size.X.Offset, btn.Size.Y.Scale * jumpScale, btn.Size.Y.Offset), Position = UDim2.new(btn.Position.X.Scale - ((jumpScale - 1) / 2), btn.Position.X.Offset, btn.Position.Y.Scale - ((jumpScale - 1) / 2), btn.Position.Y.Offset) }) -- Play the jump tween jumpTween:Play() Click:Play() -- Reset the button's size and position after the jump is complete jumpTween.Completed:Connect(function() btn.Size = UDim2.new(btn.Size.X.Scale / jumpScale, btn.Size.X.Offset, btn.Size.Y.Scale / jumpScale, btn.Size.Y.Offset) btn.Position = UDim2.new(btn.Position.X.Scale + ((jumpScale - 1) / 2), btn.Position.X.Offset, btn.Position.Y.Scale + ((jumpScale - 1) / 2), btn.Position.Y.Offset) end) end)
--[[ Public API ]]
-- function Thumbpad:Enable() ThumbpadFrame.Visible = true end function Thumbpad:Disable() ThumbpadFrame.Visible = false OnInputEnded() end function Thumbpad:Create(parentFrame) if ThumbpadFrame then ThumbpadFrame:Destroy() ThumbpadFrame = nil if OnTouchChangedCn then OnTouchChangedCn:disconnect() OnTouchChangedCn = nil end if OnTouchEndedCn then OnTouchEndedCn:disconnect() OnTouchEndedCn = nil end end local isSmallScreen = parentFrame.AbsoluteSize.y <= 500 local thumbpadSize = isSmallScreen and 70 or 120 local position = isSmallScreen and UDim2.new(0, thumbpadSize * 1.25, 1, -thumbpadSize - 20) or UDim2.new(0, thumbpadSize/2 - 10, 1, -thumbpadSize * 1.75 - 10) ThumbpadFrame = Instance.new('Frame') ThumbpadFrame.Name = "ThumbpadFrame" ThumbpadFrame.Visible = false ThumbpadFrame.Active = true ThumbpadFrame.Size = UDim2.new(0, thumbpadSize + 20, 0, thumbpadSize + 20) ThumbpadFrame.Position = position ThumbpadFrame.BackgroundTransparency = 1 local outerImage = Instance.new('ImageLabel') outerImage.Name = "OuterImage" outerImage.Image = TOUCH_CONTROL_SHEET outerImage.ImageRectOffset = Vector2.new(0, 0) outerImage.ImageRectSize = Vector2.new(220, 220) outerImage.BackgroundTransparency = 1 outerImage.Size = UDim2.new(0, thumbpadSize, 0, thumbpadSize) outerImage.Position = UDim2.new(0, 10, 0, 10) outerImage.Parent = ThumbpadFrame local smArrowSize = isSmallScreen and UDim2.new(0, 32, 0, 32) or UDim2.new(0, 64, 0, 64) local lgArrowSize = UDim2.new(0, smArrowSize.X.Offset * 2, 0, smArrowSize.Y.Offset * 2) local imgRectSize = Vector2.new(110, 110) local smImgOffset = isSmallScreen and -4 or -9 local lgImgOffset = isSmallScreen and -28 or -55 local dArrow = createArrowLabel("DownArrow", outerImage, UDim2.new(0.5, -smArrowSize.X.Offset/2, 1, lgImgOffset), smArrowSize, Vector2.new(8, 8), imgRectSize) local uArrow = createArrowLabel("UpArrow", outerImage, UDim2.new(0.5, -smArrowSize.X.Offset/2, 0, smImgOffset), smArrowSize, Vector2.new(8, 266), imgRectSize) local lArrow = createArrowLabel("LeftArrow", outerImage, UDim2.new(0, smImgOffset, 0.5, -smArrowSize.Y.Offset/2), smArrowSize, Vector2.new(137, 137), imgRectSize) local rArrow = createArrowLabel("RightArrow", outerImage, UDim2.new(1, lgImgOffset, 0.5, -smArrowSize.Y.Offset/2), smArrowSize, Vector2.new(8, 137), imgRectSize) local function doTween(guiObject, endSize, endPosition) guiObject:TweenSizeAndPosition(endSize, endPosition, Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.15, true) end local padOrigin = nil local deadZone = 0.1 local isRight, isLeft, isUp, isDown = false, false, false, false local vForward = Vector3.new(0, 0, -1) local vRight = Vector3.new(1, 0, 0) local function doMove(pos) MasterControl:AddToPlayerMovement(-currentMoveVector) local delta = Vector2.new(pos.x, pos.y) - padOrigin currentMoveVector = delta / (thumbpadSize/2) -- Scaled Radial Dead Zone local inputAxisMagnitude = currentMoveVector.magnitude if inputAxisMagnitude < deadZone then currentMoveVector = Vector3.new(0, 0, 0) else currentMoveVector = currentMoveVector.unit * ((inputAxisMagnitude - deadZone) / (1 - deadZone)) -- catch possible NAN Vector if currentMoveVector.magnitude == 0 then currentMoveVector = Vector3.new(0, 0, 0) else currentMoveVector = Vector3.new(currentMoveVector.x, 0, currentMoveVector.y).unit end end MasterControl:AddToPlayerMovement(currentMoveVector) local forwardDot = currentMoveVector:Dot(vForward) local rightDot = currentMoveVector:Dot(vRight) if forwardDot > 0.5 then -- UP if not isUp then isUp, isDown = true, false doTween(uArrow, lgArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset, 0, smImgOffset - smArrowSize.Y.Offset * 1.5)) doTween(dArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 1, lgImgOffset)) end elseif forwardDot < -0.5 then -- DOWN if not isDown then isDown, isUp = true, false doTween(dArrow, lgArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset, 1, lgImgOffset + smArrowSize.Y.Offset/2)) doTween(uArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 0, smImgOffset)) end else isUp, isDown = false, false doTween(dArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 1, lgImgOffset)) doTween(uArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 0, smImgOffset)) end if rightDot > 0.5 then if not isRight then isRight, isLeft = true, false doTween(rArrow, lgArrowSize, UDim2.new(1, lgImgOffset + smArrowSize.X.Offset/2, 0.5, -smArrowSize.Y.Offset)) doTween(lArrow, smArrowSize, UDim2.new(0, smImgOffset, 0.5, -smArrowSize.Y.Offset/2)) end elseif rightDot < -0.5 then if not isLeft then isLeft, isRight = true, false doTween(lArrow, lgArrowSize, UDim2.new(0, smImgOffset - smArrowSize.X.Offset * 1.5, 0.5, -smArrowSize.Y.Offset)) doTween(rArrow, smArrowSize, UDim2.new(1, lgImgOffset, 0.5, -smArrowSize.Y.Offset/2)) end else isRight, isLeft = false, false doTween(lArrow, smArrowSize, UDim2.new(0, smImgOffset, 0.5, -smArrowSize.Y.Offset/2)) doTween(rArrow, smArrowSize, UDim2.new(1, lgImgOffset, 0.5, -smArrowSize.Y.Offset/2)) end end --input connections ThumbpadFrame.InputBegan:connect(function(inputObject) if TouchObject or inputObject.UserInputType ~= Enum.UserInputType.Touch then return end ThumbpadFrame.Position = UDim2.new(0, inputObject.Position.x - ThumbpadFrame.AbsoluteSize.x/2, 0, inputObject.Position.y - ThumbpadFrame.Size.Y.Offset/2) padOrigin = Vector2.new(ThumbpadFrame.AbsolutePosition.x + ThumbpadFrame.AbsoluteSize.x/2, ThumbpadFrame.AbsolutePosition.y + ThumbpadFrame.AbsoluteSize.y/2) doMove(inputObject.Position) TouchObject = inputObject end) OnTouchChangedCn = UserInputService.TouchMoved:connect(function(inputObject, isProcessed) if inputObject == TouchObject then doMove(TouchObject.Position) end end) OnInputEnded = function() MasterControl:AddToPlayerMovement(-currentMoveVector) currentMoveVector = Vector3.new(0,0,0) ThumbpadFrame.Position = position TouchObject = nil isUp, isDown, isLeft, isRight = false, false, false, false doTween(dArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 1, lgImgOffset)) doTween(uArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 0, smImgOffset)) doTween(lArrow, smArrowSize, UDim2.new(0, smImgOffset, 0.5, -smArrowSize.Y.Offset/2)) doTween(rArrow, smArrowSize, UDim2.new(1, lgImgOffset, 0.5, -smArrowSize.Y.Offset/2)) end OnTouchEndedCn = UserInputService.TouchEnded:connect(function(inputObject) if inputObject == TouchObject then OnInputEnded() end end) ThumbpadFrame.Parent = parentFrame end return Thumbpad
-- Decompiled with the Synapse X Luau decompiler.
local l__HDAdminMain__1 = _G.HDAdminMain; local l__playerGui__2 = l__HDAdminMain__1.playerGui; local v3 = require(l__HDAdminMain__1.replicatedStorage:WaitForChild("HDAdmin"):WaitForChild("Topbar+").IconController); local v4 = v3:createIcon("HDAdmin", 4882428756, 0); v4:setToggleMenu(l__HDAdminMain__1.gui.MainFrame); v4:notify(); return v3;
-- public static functions
function region3.new(cf, size) local self = {}; self.CFrame = cf; self.Size = size; self.input = {vertices.block(cf, size * 0.5, {})}; self.support = support.pointCloud; self.centroid = cf.p; return setmetatable(self, region3_mt); end; region3.block = region3.new; function region3.wedge(cf, size) local self = {}; self.CFrame = cf; self.Size = size; self.input = {vertices.wedge(cf, size * 0.5, {})}; self.support = support.pointCloud; self.centroid = centroid(self.input[1]); return setmetatable(self, region3_mt); end; function region3.cornerWedge(cf, size) local self = {}; self.CFrame = cf; self.Size = size; self.input = {vertices.cornerWedge(cf, size * 0.5, {})}; self.support = support.pointCloud; self.centroid = centroid(self.input[1]); return setmetatable(self, region3_mt); end; function region3.cylinder(cf, size) local self = {}; self.CFrame = cf; self.Size = size; self.input = {cf, size * 0.5}; self.support = support.cylinder; self.centroid = cf.p; return setmetatable(self, region3_mt); end; function region3.ellipsoid(cf, size) local self = {}; self.CFrame = cf; self.Size = size; self.input = {cf, size * 0.5}; self.support = support.ellipsoid; self.centroid = cf.p; return setmetatable(self, region3_mt); end; function region3.pointCloud(cloud) local self = {}; self.CFrame = CFrame.new(centroid(cloud)); self.Size = v3(); self.input = cloud; self.support = support.pointCloud; self.centroid = self.CFrame.p; return setmetatable(self, region3_mt); end; function region3.fromPart(part) return classify(part); end;
-- ROBLOX: use patched console from shared
local console = require(script.Parent.console) local loggedTypeFailures = {} local ReactComponentStackFrame = require(script.Parent.ReactComponentStackFrame) local describeUnknownElementTypeFrameInDEV = ReactComponentStackFrame.describeUnknownElementTypeFrameInDEV local ReactSharedInternals = require(script.Parent.ReactSharedInternals) local describeError = require(script.Parent["ErrorHandling.roblox"]).describeError local ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame
--// F key, Horn
mouse.KeyDown:connect(function(key) if key=="h" then veh.ELS.Sirens.MAN.Transparency = 0 veh.ELS.Siren.Man:Play() veh.ELS.Siren2.Man:Play() veh.ELS.Sirens.Horn.Transparency = 0 veh.ELS.Siren.Wail.Volume = 0 veh.ELS.Siren.Yelp.Volume = 0 veh.ELS.Siren.Priority.Volume = 0 veh.ELS.Siren2.Wail.Volume = 0 veh.ELS.Siren2.Yelp.Volume = 0 veh.ELS.Siren2.Priority.Volume = 0 end end)
-- Menus
local menuContainer = Instance.new("Frame") menuContainer.Name = "MenuContainer" menuContainer.BackgroundTransparency = 1 menuContainer.BorderSizePixel = 0 menuContainer.AnchorPoint = Vector2.new(1, 0) menuContainer.Size = UDim2.new(0, 500, 0, 50) menuContainer.ZIndex = -2 menuContainer.ClipsDescendants = true menuContainer.Visible = true menuContainer.Parent = iconContainer menuContainer.Active = false menuContainer.Selectable = false local menuFrame = Instance.new("ScrollingFrame") menuFrame.Name = "MenuFrame" menuFrame.BackgroundTransparency = 1 menuFrame.BorderSizePixel = 0 menuFrame.AnchorPoint = Vector2.new(0, 0) menuFrame.Position = UDim2.new(0, 0, 0, 0) menuFrame.Size = UDim2.new(1, 0, 1, 0) menuFrame.ZIndex = -1 + 10 menuFrame.ClipsDescendants = false menuFrame.Visible = true menuFrame.TopImage = ""--menuFrame.MidImage menuFrame.BottomImage = ""--menuFrame.MidImage menuFrame.HorizontalScrollBarInset = Enum.ScrollBarInset.Always menuFrame.CanvasSize = UDim2.new(0, 0, 0, 0) menuFrame.Parent = menuContainer menuFrame.Active = false menuFrame.Selectable = false menuFrame.ScrollingEnabled = false local menuList = Instance.new("UIListLayout") menuList.Name = "MenuList" menuList.FillDirection = Enum.FillDirection.Horizontal menuList.HorizontalAlignment = Enum.HorizontalAlignment.Right menuList.SortOrder = Enum.SortOrder.LayoutOrder menuList.Parent = menuFrame local menuInvisBlocker = Instance.new("Frame") menuInvisBlocker.Name = "MenuInvisBlocker" menuInvisBlocker.BackgroundTransparency = 1 menuInvisBlocker.Size = UDim2.new(0, -2, 1, 0) menuInvisBlocker.Visible = true menuInvisBlocker.LayoutOrder = 999999999 menuInvisBlocker.Parent = menuFrame menuInvisBlocker.Active = false
-------- OMG HAX
r = game:service("RunService") local damage = 5 local slash_damage = 10 local lunge_damage = 10 sword = script.Parent.Handle Tool = script.Parent local explozion =Instance.new("Explosion") local SlashSound = Instance.new("Sound") SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" SlashSound.Parent = sword SlashSound.Volume = .7 local LungeSound = Instance.new("Sound") LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav" LungeSound.Parent = sword LungeSound.Volume = .6 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function lunge() damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = Tool force = Instance.new("BodyVelocity") force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 force.Parent = Tool.Parent.Torso wait(.25) swordOut() wait(.25) force.Parent = nil wait(.5) swordUp() damage = slash_damage end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end function swordAcross() -- parry end Tool.Enabled = true local last_attack = 0 function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end t = r.Stepped:wait() if (t - last_attack < .2) then lunge() else attack() end last_attack = t --wait(.5) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
-- Management of which options appear on the Roblox User Settings screen
do local PlayerScripts = Players.LocalPlayer:WaitForChild("PlayerScripts") PlayerScripts:RegisterTouchCameraMovementMode(Enum.TouchCameraMovementMode.Default) PlayerScripts:RegisterTouchCameraMovementMode(Enum.TouchCameraMovementMode.Follow) PlayerScripts:RegisterTouchCameraMovementMode(Enum.TouchCameraMovementMode.Classic) PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.Default) PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.Follow) PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.Classic) if FFlagUserCameraToggle then PlayerScripts:RegisterComputerCameraMovementMode(Enum.ComputerCameraMovementMode.CameraToggle) end end function CameraModule.new() local self = setmetatable({},CameraModule) -- Current active controller instances self.activeCameraController = nil self.activeOcclusionModule = nil self.activeTransparencyController = nil self.activeMouseLockController = nil self.currentComputerCameraMovementMode = nil -- Connections to events self.cameraSubjectChangedConn = nil self.cameraTypeChangedConn = nil -- Adds CharacterAdded and CharacterRemoving event handlers for all current players for _,player in pairs(Players:GetPlayers()) do self:OnPlayerAdded(player) end -- Adds CharacterAdded and CharacterRemoving event handlers for all players who join in the future Players.PlayerAdded:Connect(function(player) self:OnPlayerAdded(player) end) self.activeTransparencyController = TransparencyController.new() self.activeTransparencyController:Enable(true) if not UserInputService.TouchEnabled then self.activeMouseLockController = MouseLockController.new() local toggleEvent = self.activeMouseLockController:GetBindableToggleEvent() if toggleEvent then toggleEvent:Connect(function() self:OnMouseLockToggled() end) end end self:ActivateCameraController(self:GetCameraControlChoice()) self:ActivateOcclusionModule(Players.LocalPlayer.DevCameraOcclusionMode) self:OnCurrentCameraChanged() -- Does initializations and makes first camera controller RunService:BindToRenderStep("cameraRenderUpdate", Enum.RenderPriority.Camera.Value, function(dt) self:Update(dt) end) -- Connect listeners to camera-related properties for _, propertyName in pairs(PLAYER_CAMERA_PROPERTIES) do Players.LocalPlayer:GetPropertyChangedSignal(propertyName):Connect(function() self:OnLocalPlayerCameraPropertyChanged(propertyName) end) end for _, propertyName in pairs(USER_GAME_SETTINGS_PROPERTIES) do UserGameSettings:GetPropertyChangedSignal(propertyName):Connect(function() self:OnUserGameSettingsPropertyChanged(propertyName) end) end game.Workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function() self:OnCurrentCameraChanged() end) self.lastInputType = UserInputService:GetLastInputType() UserInputService.LastInputTypeChanged:Connect(function(newLastInputType) self.lastInputType = newLastInputType end) return self end function CameraModule:GetCameraMovementModeFromSettings() local cameraMode = Players.LocalPlayer.CameraMode -- Lock First Person trumps all other settings and forces ClassicCamera if cameraMode == Enum.CameraMode.LockFirstPerson then return CameraUtils.ConvertCameraModeEnumToStandard(Enum.ComputerCameraMovementMode.Classic) end local devMode, userMode if UserInputService.TouchEnabled then devMode = CameraUtils.ConvertCameraModeEnumToStandard(Players.LocalPlayer.DevTouchCameraMode) userMode = CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.TouchCameraMovementMode) else devMode = CameraUtils.ConvertCameraModeEnumToStandard(Players.LocalPlayer.DevComputerCameraMode) userMode = CameraUtils.ConvertCameraModeEnumToStandard(UserGameSettings.ComputerCameraMovementMode) end if devMode == Enum.DevComputerCameraMovementMode.UserChoice then -- Developer is allowing user choice, so user setting is respected return userMode end return devMode end function CameraModule:ActivateOcclusionModule( occlusionMode ) local newModuleCreator if occlusionMode == Enum.DevCameraOcclusionMode.Zoom then newModuleCreator = Poppercam elseif occlusionMode == Enum.DevCameraOcclusionMode.Invisicam then newModuleCreator = Invisicam else warn("CameraScript ActivateOcclusionModule called with unsupported mode") return end -- First check to see if there is actually a change. If the module being requested is already -- the currently-active solution then just make sure it's enabled and exit early if self.activeOcclusionModule and self.activeOcclusionModule:GetOcclusionMode() == occlusionMode then if not self.activeOcclusionModule:GetEnabled() then self.activeOcclusionModule:Enable(true) end return end -- Save a reference to the current active module (may be nil) so that we can disable it if -- we are successful in activating its replacement local prevOcclusionModule = self.activeOcclusionModule -- If there is no active module, see if the one we need has already been instantiated self.activeOcclusionModule = instantiatedOcclusionModules[newModuleCreator] -- If the module was not already instantiated and selected above, instantiate it if not self.activeOcclusionModule then self.activeOcclusionModule = newModuleCreator.new() if self.activeOcclusionModule then instantiatedOcclusionModules[newModuleCreator] = self.activeOcclusionModule end end -- If we were successful in either selecting or instantiating the module, -- enable it if it's not already the currently-active enabled module if self.activeOcclusionModule then local newModuleOcclusionMode = self.activeOcclusionModule:GetOcclusionMode() -- Sanity check that the module we selected or instantiated actually supports the desired occlusionMode if newModuleOcclusionMode ~= occlusionMode then warn("CameraScript ActivateOcclusionModule mismatch: ",self.activeOcclusionModule:GetOcclusionMode(),"~=",occlusionMode) end -- Deactivate current module if there is one if prevOcclusionModule then -- Sanity check that current module is not being replaced by itself (that should have been handled above) if prevOcclusionModule ~= self.activeOcclusionModule then prevOcclusionModule:Enable(false) else warn("CameraScript ActivateOcclusionModule failure to detect already running correct module") end end -- Occlusion modules need to be initialized with information about characters and cameraSubject -- Invisicam needs the LocalPlayer's character -- Poppercam needs all player characters and the camera subject if occlusionMode == Enum.DevCameraOcclusionMode.Invisicam then -- Optimization to only send Invisicam what we know it needs if Players.LocalPlayer.Character then self.activeOcclusionModule:CharacterAdded(Players.LocalPlayer.Character, Players.LocalPlayer ) end else -- When Poppercam is enabled, we send it all existing player characters for its raycast ignore list for _, player in pairs(Players:GetPlayers()) do if player and player.Character then self.activeOcclusionModule:CharacterAdded(player.Character, player) end end self.activeOcclusionModule:OnCameraSubjectChanged(game.Workspace.CurrentCamera.CameraSubject) end -- Activate new choice self.activeOcclusionModule:Enable(true) end end
--[[ Visualizes the test plan in a simple format, suitable for debugging the test plan's structure. ]]
function TestPlan:visualize() local buffer = {} self:visitAllNodes(function(node, level) table.insert(buffer, (" "):rep(3 * level) .. node.phrase) end) return table.concat(buffer, "\n") end
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Barrel = Handle:WaitForChild("Muzzle") Players = game:GetService("Players") Debris = game:GetService("Debris") RunService = game:GetService("RunService") UserInputService = game:GetService("UserInputService") AmmoDisplay = script:WaitForChild("AmmoDisplay"):Clone() CastLaser = Tool:WaitForChild("CastLaser"):Clone() Camera = game:GetService("Workspace").CurrentCamera BaseUrl = "http://www.roblox.com/asset/?id=" AnimationTracks = {} LocalObjects = {} Animations = { Hold = {Animation = Tool:WaitForChild("Hold"), FadeTime = nil, Weight = nil, Speed = 1, Duration = 2}, Fire = {Animation = Tool:WaitForChild("Fire"), FadeTime = 0.25, Weight = nil, Speed = 0.5, Duration = 0.5}, Reload = {Animation = Tool:WaitForChild("Reload"), FadeTime = nil, Weight = nil, Speed = 0.5, Duration = 3}, } Sounds = { Reload = Handle:WaitForChild("Reload"), NoAmmo = Handle:WaitForChild("NoAmmo"), } Modules = Tool:WaitForChild("Modules") Functions = require(Modules:WaitForChild("Functions")) Remotes = Tool:WaitForChild("Remotes") ServerControl = Remotes:WaitForChild("ServerControl") ClientControl = Remotes:WaitForChild("ClientControl") ConfigurationBin = Tool:WaitForChild("Configuration") Configuration = {} Configuration = Functions.CreateConfiguration(ConfigurationBin, Configuration) InputCheck = Instance.new("ScreenGui") InputCheck.Name = "InputCheck" InputButton = Instance.new("ImageButton") InputButton.Name = "InputButton" InputButton.Image = "" InputButton.BackgroundTransparency = 1 InputButton.ImageTransparency = 1 InputButton.Size = UDim2.new(1, 0, 1, 0) InputButton.Parent = InputCheck Cursors = { Normal = (BaseUrl .. "170908665"), EnemyHit = (BaseUrl .. "172618259"), } Rate = (1 / 60) FiringOffset = Vector3.new(0, ((Handle.Size.Y / 4) - 0.2), 0) Reloading = false MouseDown = false ToolEquipped = false Tool.Enabled = true function SetAnimation(mode, value) if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then for i, v in pairs(AnimationTracks) do if v.Animation == value.Animation then v.AnimationTrack:Stop() table.remove(AnimationTracks, i) end end local AnimationTrack = Humanoid:LoadAnimation(value.Animation) table.insert(AnimationTracks, {Animation = value.Animation, AnimationTrack = AnimationTrack}) AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed) elseif mode == "StopAnimation" and value then for i, v in pairs(AnimationTracks) do if v.Animation == value.Animation then v.AnimationTrack:Stop(value.FadeTime) table.remove(AnimationTracks, i) end end end end function ToggleGui() if not AmmoDisplayClone or not AmmoDisplayClone.Parent then return end local Frame = AmmoDisplayClone.Frame local Ammo = Frame.Ammo if Configuration.Ammo.ClipSize.MaxValue > 0 then Ammo.AmmoCounter.CounterPart.Text = Configuration.Ammo.ClipSize.Value end Ammo.MagCounter.CounterPart.Text = Configuration.Ammo.Magazines.Value end function Reload() if Reloading or not Tool.Enabled or Configuration.Ammo.Magazines.Value >= Configuration.Ammo.Magazines.MaxValue then return end Tool.Enabled = false Reloading = true ToggleGui() local CanReload = true if Configuration.Ammo.ClipSize.MaxValue > 0 and Configuration.Ammo.ClipSize.Value <= 0 then CanReload = false else CanReload = true end if CanReload then Spawn(function() local Animation = Animations.Reload OnClientInvoke("PlayAnimation", Animation) wait(Animation.Duration) OnClientInvoke("StopAnimation", Animation) end) Sounds.Reload:Play() local AddedClips = ((Configuration.Ammo.Magazines.MaxValue > 0 and (Configuration.Ammo.Magazines.MaxValue - Configuration.Ammo.Magazines.Value)) or Configuration.Ammo.ClipSize.MaxValue) if Configuration.Ammo.ClipSize.MaxValue > 0 then AddedClips = ((AddedClips > Configuration.Ammo.ClipSize.Value and Configuration.Ammo.ClipSize.Value) or AddedClips) end --[[local ReloadRate = (Configuration.ReloadTime.Value / Configuration.Ammo.Magazines.MaxValue) for i = 1, AddedClips do wait(ReloadTime) Configuration.Ammo.Magazines.Value = (Configuration.Ammo.Magazines.Value + 1) end]] wait(Configuration.ReloadTime.Value) Configuration.Ammo.Magazines.Value = (Configuration.Ammo.Magazines.Value + AddedClips) Configuration.Ammo.ClipSize.Value = (Configuration.Ammo.ClipSize.Value - AddedClips) Sounds.Reload:Stop() ToggleGui() end Reloading = false Tool.Enabled = true end function RayTouched(Hit, Position) if not Hit or not Hit.Parent then return end local character = Hit.Parent if character:IsA("Hat") then character = character.Parent end if character == Character then return end local humanoid = character:FindFirstChild("Humanoid") local SoundChosen = Sounds.RayHit if not humanoid or humanoid.Health == 0 then return end local player = Players:GetPlayerFromCharacter(character) if player and Functions.IsTeamMate(Player, player) then return end Spawn(function() IconChangeTick = tick() PlayerMouse.Icon = Cursors.EnemyHit wait(1) if (tick() - IconChangeTick) >= 0.95 and ToolEquipped and PlayerMouse then PlayerMouse.Icon = Cursors.Normal end end) end function FireRay(StartPosition, TargetPosition) local Direction = CFrame.new(StartPosition, TargetPosition).lookVector local RayHit, RayPos, RayNormal = Functions.CastRay(StartPosition, Direction, Configuration.Range.Value, {Character}, false) local Backpack = Player:FindFirstChild("Backpack") if Backpack then local LaserScript = CastLaser:Clone() local StartPos = Instance.new("Vector3Value") StartPos.Name = "StartPosition" StartPos.Value = StartPosition StartPos.Parent = LaserScript local TargetPos = Instance.new("Vector3Value") TargetPos.Name = "TargetPosition" TargetPos.Value = RayPos TargetPos.Parent = LaserScript local RayHit = Instance.new("BoolValue") RayHit.Name = "RayHit" RayHit.Value = RayHit RayHit.Parent = LaserScript LaserScript.Disabled = false LaserScript.Parent = Backpack end Spawn(function() InvokeServer("CastLaser", {StartPosition = StartPosition, TargetPosition = RayPos, RayHit = ((RayHit and true) or false)}) end) Spawn(function() InvokeServer("RayHit", {Hit = RayHit, Position = RayPos}) end) RayTouched(RayHit, RayPos) end function Button1Pressed(Down) if not Down and MouseDown then MouseDown = false end end function KeyPress(Key, Down) if Key == "r" and Down then Reload() end end function Activated() if not Tool.Enabled or not ToolEquipped or Reloading then return end Tool.Enabled = false if Configuration.Ammo.Magazines.Value > 0 then local FirstShot = false if Configuration.Automatic.Value then MouseDown = true end OnClientInvoke("StopAnimation", {Animation = Animations.Fire.Animation, FadeTime = nil}) OnClientInvoke("PlayAnimation", Animations.Fire) while MouseDown or not FirstShot and ToolEquipped and CheckIfAlive() do if Configuration.Ammo.Magazines.Value <= 0 or not ToolEquipped or not CheckIfAlive() then break end if not FirstShot then FirstShot = true end local BurstAmount = math.random(Configuration.Burst.Bullets.MinValue, Configuration.Burst.Bullets.MaxValue) local WithinFiringRange = false Spawn(function() InvokeServer("Fire", true) end) for i = 1, ((BurstAmount > 0 and BurstAmount) or 1) do local TargetPosition = OnClientInvoke("MousePosition") if not TargetPosition then break end TargetPosition = TargetPosition.Position local StartPosition = Barrel.WorldPosition --(Handle.CFrame * CFrame.new(FiringOffset.X, FiringOffset.Y, FiringOffset.Z)).p if BurstAmount > 0 then local Offset = (Configuration.Burst.Offset.Value * 100) TargetPosition = TargetPosition + Vector3.new((math.random(-Offset.X, Offset.X) * 0.01), (math.random(-Offset.Y, Offset.Y) * 0.01), (math.random(-Offset.Z, Offset.Z) * 0.01)) end local Accuracy = (Configuration.Accuracy.Value * 100) TargetPosition = TargetPosition + Vector3.new((math.random(-Accuracy.X, Accuracy.X) * 0.01), (math.random(-Accuracy.Y, Accuracy.Y) * 0.01), (math.random(-Accuracy.Z, Accuracy.Z) * 0.01)) Configuration.Ammo.Magazines.Value = (Configuration.Ammo.Magazines.Value - 1) FireRay(StartPosition, TargetPosition) end ToggleGui() wait(Configuration.FireRate.Value) end OnClientInvoke("StopAnimation", {Animation = Animations.Fire.Animation, FadeTime = 0.25}) else Tool.Enabled = true Sounds.NoAmmo:Play() Reload() end MouseDown = false Tool.Enabled = true if Configuration.Ammo.Magazines.Value <= 0 then Sounds.NoAmmo:Play() Reload() end end function CheckIfAlive() return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0) and true) or false) end function Equipped(Mouse) Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") if not CheckIfAlive() then return end ToolEquipped = true Spawn(function() PlayerMouse = Player:GetMouse() Mouse.Button1Down:connect(function() Button1Pressed(true) end) Mouse.Button1Up:connect(function() Button1Pressed(false) end) Mouse.KeyDown:connect(function(Key) KeyPress(Key, true) end) Mouse.KeyUp:connect(function(Key) KeyPress(Key, false) end) Humanoid.CameraOffset = Vector3.new(0, 0.35, 0) OnClientInvoke("PlayAnimation", Animations.Hold) local PlayerGui = Player:FindFirstChild("PlayerGui") if PlayerGui then if UserInputService.TouchEnabled then InputCheckClone = InputCheck:Clone() InputCheckClone.InputButton.InputBegan:connect(function() InvokeServer("Button1Click", {Down = true}) end) InputCheckClone.InputButton.InputEnded:connect(function() InvokeServer("Button1Click", {Down = false}) end) InputCheckClone.Parent = PlayerGui end local function AdjustAmmoDisplay() local Frame = AmmoDisplayClone.Frame Frame.CurrentWeapon.Text = Configuration.ToolName.Value local Ammo = Frame.Ammo Ammo.AmmoCounter.CounterPart.Text = ((Configuration.Ammo.ClipSize.MaxValue > 0 and Configuration.Ammo.ClipSize.Value) or "--") Ammo.MagCounter.CounterPart.Text = Configuration.Ammo.Magazines.Value end AmmoDisplayClone = AmmoDisplay:Clone() AdjustAmmoDisplay() AmmoDisplayClone.Parent = PlayerGui ToggleGui() for i, v in pairs({ClipSizeChanged, MagazinesChanged}) do if v then v:disconnect() end end ClipSizeChanged = Configuration.Ammo.ClipSize.Changed:connect(function() AdjustAmmoDisplay() end) MagazinesChanged = Configuration.Ammo.Magazines.Changed:connect(function() AdjustAmmoDisplay() end) end for i, v in pairs({"Left Arm", "Right Arm"}) do local Arm = Character:FindFirstChild(v) if Arm then Spawn(function() OnClientInvoke("SetLocalTransparencyModifier", {Object = Arm, Transparency = 0, AutoUpdate = false}) end) end end Mouse.Icon = Cursors.Normal end) end function Unequipped() LocalObjects = {} if CheckIfAlive() then Humanoid.CameraOffset = Vector3.new(0, 0, 0) end for i, v in pairs(Sounds) do v:Stop() end if PlayerMouse then PlayerMouse.Icon = "" end for i, v in pairs({InputCheckClone, ObjectLocalTransparencyModifier, AmmoDisplayClone, ClipSizeChanged, MagazinesChanged}) do if tostring(v) == "Connection" then v:disconnect() elseif v and v.Parent then v:Destroy() end end MouseDown = false for i, v in pairs(AnimationTracks) do if v and v.AnimationTrack then v.AnimationTrack:Stop() end end AnimationTracks = {} ToolEquipped = false end function InvokeServer(mode, value) pcall(function() local ServerReturn = ServerControl:InvokeServer(mode, value) return ServerReturn end) end function OnClientInvoke(mode, value) if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then SetAnimation("PlayAnimation", value) elseif mode == "StopAnimation" and value then SetAnimation("StopAnimation", value) elseif mode == "PlaySound" and value then value:Play() elseif mode == "StopSound" and value then value:Stop() elseif mode == "MousePosition" then return {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target} elseif mode == "SetLocalTransparencyModifier" and value and ToolEquipped then pcall(function() local ObjectFound = false for i, v in pairs(LocalObjects) do if v == value then ObjectFound = true end end if not ObjectFound then table.insert(LocalObjects, value) if ObjectLocalTransparencyModifier then ObjectLocalTransparencyModifier:disconnect() end ObjectLocalTransparencyModifier = RunService.RenderStepped:connect(function() for i, v in pairs(LocalObjects) do if v.Object and v.Object.Parent then local CurrentTransparency = v.Object.LocalTransparencyModifier if ((not v.AutoUpdate and (CurrentTransparency == 1 or CurrentTransparency == 0)) or v.AutoUpdate) then v.Object.LocalTransparencyModifier = v.Transparency end else table.remove(LocalObjects, i) end end end) end end) end end ClientControl.OnClientInvoke = OnClientInvoke Tool.Activated:connect(Activated) Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
-- Left Arms
local LUA = character.UpperTorso:FindFirstChild("LeftShoulderRigAttachment") local LUARig = character.LeftUpperArm:FindFirstChild("LeftShoulderRigAttachment") local LLA = character.LeftUpperArm:FindFirstChild("LeftElbowRigAttachment") local LLARig = character.LeftLowerArm:FindFirstChild("LeftElbowRigAttachment") local LH = character.LeftLowerArm:FindFirstChild("LeftWristRigAttachment") local LHRig = character.LeftHand:FindFirstChild("LeftWristRigAttachment")
------------------------------------------------
local function EnterFreecam() ToggleGui(false) UIS.MouseIconEnabled = false Maid:Mark(UIS.InputBegan:Connect(function(input, processed) if input.UserInputType == Enum.UserInputType.MouseButton2 then UIS.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition local conn = UIS.InputChanged:Connect(Panned) repeat input = UIS.InputEnded:wait() until input.UserInputType == Enum.UserInputType.MouseButton2 or not freeCamEnabled panDeltaMouse = Vector2.new() panDeltaGamepad = Vector2.new() conn:Disconnect() if freeCamEnabled then UIS.MouseBehavior = Enum.MouseBehavior.Default end elseif input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then SpeedModifier = 0.5 end end)) Maid:Mark(UIS.InputEnded:Connect(function(input, processed) if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then SpeedModifier = 1 end end)) camera.CameraType = Enum.CameraType.Scriptable local hum, hrp = GetChar() if hrp then hrp.Anchored = true end if hum then hum.WalkSpeed = 0 Maid:Mark(hum.Jumping:Connect(function(active) if active then hum.Jumping = false end end)) end velSpring.t, velSpring.v, velSpring.x = Vector3.new(), Vector3.new(), Vector3.new() rotSpring.t, rotSpring.v, rotSpring.x = Vector2.new(), Vector2.new(), Vector2.new() fovSpring.t, fovSpring.v, fovSpring.x = camera.FieldOfView, 0, camera.FieldOfView local camCFrame = camera.CFrame local lookVector = camCFrame.lookVector.unit stateRot = Vector2.new( math.asin(lookVector.y), math.atan2(-lookVector.z, lookVector.x) - math.pi/2 ) panDeltaMouse = Vector2.new() local playerGui = player:WaitForChild("PlayerGui") for _, obj in next, playerGui:GetChildren() do if obj:IsA("ScreenGui") and obj.Enabled then obj.Enabled = false screenGuis[obj] = true end end if letterBoxEnabled then letterbox.Enabled = true end RS:BindToRenderStep("Freecam", Enum.RenderPriority.Camera.Value, UpdateFreecam) freeCamEnabled = true end local function ExitFreecam() freeCamEnabled = false if letterBoxEnabled then letterbox.Enabled = false end UIS.MouseIconEnabled = true UIS.MouseBehavior = Enum.MouseBehavior.Default Maid:Sweep() RS:UnbindFromRenderStep("Freecam") local hum, hrp = GetChar() if hum then hum.WalkSpeed = 16 end if hrp then hrp.Anchored = false end camera.FieldOfView = DEF_FOV camera.CameraType = Enum.CameraType.Custom for obj in next, screenGuis do obj.Enabled = true end screenGuis = {} ToggleGui(true) end
--[[ Calculate success, failure, and skipped test counts in the tree at the current point in the execution. ]]
function TestSession:calculateTotals() local results = self.results results.successCount = 0 results.failureCount = 0 results.skippedCount = 0 results:visitAllNodes(function(node) local status = node.status local nodeType = node.planNode.type if nodeType == TestEnum.NodeType.It then if status == TestEnum.TestStatus.Success then results.successCount = results.successCount + 1 elseif status == TestEnum.TestStatus.Failure then results.failureCount = results.failureCount + 1 elseif status == TestEnum.TestStatus.Skipped then results.skippedCount = results.skippedCount + 1 end end end) end
--[[ Gets the Context object for the current node. ]]
function TestSession:getContext() assert(#self.contextStack > 0, "Tried to get context from an empty stack!") return self.contextStack[#self.contextStack] end
-- Decides when the GUI should be hidden. -- -- ForbiddenJ
UserInputService = game:GetService("UserInputService") IsDisplayed = script.Parent.IsDisplayed IsHiddenByOtherGUI = script.Parent.IsHiddenByOtherGUI HideGuiEnabled = game.ReplicatedStorage.ClientConfig.HideGuiEnabled IsGameMenuOpen = script.Parent.Parent.GameMenu.IsOpen MouseHovering = false function Update() IsDisplayed.Value = (not HideGuiEnabled.Value or MouseHovering or UserInputService.TouchEnabled) and not IsHiddenByOtherGUI.Value end HideGuiEnabled.Changed:Connect(Update) IsHiddenByOtherGUI.Changed:Connect(Update) IsGameMenuOpen.Changed:Connect(function(value) IsHiddenByOtherGUI.Value = value end) UserInputService:GetPropertyChangedSignal("MouseEnabled"):Connect(Update) script.Parent.MouseEnter:Connect(function() MouseHovering = true Update() end) script.Parent.MouseLeave:Connect(function() MouseHovering = false Update() end) IsHiddenByOtherGUI.Value = IsGameMenuOpen.Value Update()
--[=[ @class RemoteProperty @server Created via `ServerComm:CreateProperty()`. Values set can be anything that can pass through a [RemoteEvent](https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events#parameter-limitations). :::caution Network Calling any of the data setter methods (e.g. `Set()`) will fire the underlying RemoteEvent to replicate data to the clients. Therefore, setting data should only occur when it is necessary to change the data that the clients receive. ::: :::caution Tables Tables _can_ be used with RemoteProperties. However, the RemoteProperty object will _not_ watch for changes within the table. Therefore, anytime changes are made to the table, the data must be set again using one of the setter methods. ::: ]=]
local RemoteProperty = {} RemoteProperty.__index = RemoteProperty function RemoteProperty.new(parent: Instance, name: string, initialValue: any, inboundMiddleware: Types.ServerMiddleware?, outboundMiddleware: Types.ServerMiddleware?) local self = setmetatable({}, RemoteProperty) self._rs = RemoteSignal.new(parent, name, inboundMiddleware, outboundMiddleware) self._value = initialValue self._perPlayer = {} self._playerRemoving = Players.PlayerRemoving:Connect(function(player) self._perPlayer[player] = nil end) self._rs:Connect(function(player) local playerValue = self._perPlayer[player] local value = if playerValue == nil then self._value elseif playerValue == None then nil else playerValue self._rs:Fire(player, value) end) return self end
--Automatic Gauge Scaling
if autoscaling then local Drive={} if _Tune.Config == "FWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("FL")~= nil then table.insert(Drive,car.Wheels.FL) end if car.Wheels:FindFirstChild("FR")~= nil then table.insert(Drive,car.Wheels.FR) end if car.Wheels:FindFirstChild("F")~= nil then table.insert(Drive,car.Wheels.F) end end if _Tune.Config == "RWD" or _Tune.Config == "AWD" then if car.Wheels:FindFirstChild("RL")~= nil then table.insert(Drive,car.Wheels.RL) end if car.Wheels:FindFirstChild("RR")~= nil then table.insert(Drive,car.Wheels.RR) end if car.Wheels:FindFirstChild("R")~= nil then table.insert(Drive,car.Wheels.R) end end local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end Drive = nil for i,v in pairs(UNITS) do v.maxSpeed = math.ceil(v.scaling*wDia*math.pi*_lRPM/60/_Tune.Ratios[#_Tune.Ratios]/_Tune.FinalDrive) v.spInc = math.max(math.ceil(v.maxSpeed/200)*20,20) end end for i=0,revEnd*2 do local ln = script.Parent.ln:clone() ln.Parent = script.Parent.Tach ln.Rotation = 45 + i * 225 / (revEnd*2) ln.Num.Text = i/2 ln.Num.Rotation = -ln.Rotation if i*500>=math.floor(_pRPM/500)*500 then ln.Frame.BackgroundColor3 = Color3.new(1,0,0) if i<revEnd*2 then ln2 = ln:clone() ln2.Parent = script.Parent.Tach ln2.Rotation = 45 + (i+.5) * 225 / (revEnd*2) ln2.Num:Destroy() ln2.Visible=true end end if i%2==0 then ln.Frame.Size = UDim2.new(0,3,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) ln.Num.Visible = true else ln.Num:Destroy() end ln.Visible=true end local lns = Instance.new("Frame",script.Parent.Speedo) lns.Name = "lns" lns.BackgroundTransparency = 1 lns.BorderSizePixel = 0 lns.Size = UDim2.new(0,0,0,0) for i=1,90 do local ln = script.Parent.ln:clone() ln.Parent = lns ln.Rotation = 45 + 225*(i/90) if i%2==0 then ln.Frame.Size = UDim2.new(0,2,0,10) ln.Frame.Position = UDim2.new(0,-1,0,100) else ln.Frame.Size = UDim2.new(0,3,0,5) end ln.Num:Destroy() ln.Visible=true end for i,v in pairs(UNITS) do local lnn = Instance.new("Frame",script.Parent.Speedo) lnn.BackgroundTransparency = 1 lnn.BorderSizePixel = 0 lnn.Size = UDim2.new(0,0,0,0) lnn.Name = v.units if i~= 1 then lnn.Visible=false end for i=0,v.maxSpeed,v.spInc do local ln = script.Parent.ln:clone() ln.Parent = lnn ln.Rotation = 45 + 225*(i/v.maxSpeed) ln.Num.Text = i ln.Num.TextSize = 14 ln.Num.Rotation = -ln.Rotation ln.Frame:Destroy() ln.Num.Visible=true ln.Visible=true end end if script.Parent.Parent.IsOn.Value then end script.Parent.Parent.IsOn.Changed:connect(function() if script.Parent.Parent.IsOn.Value then end end) script.Parent.Parent.Values.RPM.Changed:connect(function() script.Parent.Tach.Needle.Rotation = 45 + 225 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000)) end) script.Parent.Parent.Values.Gear.Changed:connect(function() local gearText = script.Parent.Parent.Values.Gear.Value if gearText == 0 then gearText = "N" elseif gearText == -1 then gearText = "R" end script.Parent.Gear.Text = gearText end) script.Parent.Parent.Values.TCS.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCS.Value then script.Parent.TCS.TextColor3 = Color3.new(1,170/255,0) script.Parent.TCS.TextStrokeColor3 = Color3.new(1,170/255,0) if script.Parent.Parent.Values.TCSActive.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible else wait() script.Parent.TCS.Visible = false end else script.Parent.TCS.Visible = true script.Parent.TCS.TextColor3 = Color3.new(1,0,0) script.Parent.TCS.TextStrokeColor3 = Color3.new(1,0,0) end else script.Parent.TCS.Visible = false end end) script.Parent.Parent.Values.TCSActive.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = true else wait() script.Parent.TCS.Visible = false end else script.Parent.TCS.Visible = false end end) script.Parent.TCS.Changed:connect(function() if _Tune.TCSEnabled then if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = not script.Parent.TCS.Visible elseif not script.Parent.Parent.Values.TCS.Value then wait() script.Parent.TCS.Visible = true end else if script.Parent.TCS.Visible then script.Parent.TCS.Visible = false end end end) script.Parent.Parent.Values.ABS.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABS.Value then script.Parent.ABS.TextColor3 = Color3.new(1,170/255,0) script.Parent.ABS.TextStrokeColor3 = Color3.new(1,170/255,0) if script.Parent.Parent.Values.ABSActive.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible else wait() script.Parent.ABS.Visible = false end else script.Parent.ABS.Visible = true script.Parent.ABS.TextColor3 = Color3.new(1,0,0) script.Parent.ABS.TextStrokeColor3 = Color3.new(1,0,0) end else script.Parent.ABS.Visible = false end end) script.Parent.Parent.Values.ABSActive.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = true else wait() script.Parent.ABS.Visible = false end else script.Parent.ABS.Visible = false end end) script.Parent.ABS.Changed:connect(function() if _Tune.ABSEnabled then if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = not script.Parent.ABS.Visible elseif not script.Parent.Parent.Values.ABS.Value then wait() script.Parent.ABS.Visible = true end else if script.Parent.ABS.Visible then script.Parent.ABS.Visible = false end end end) function PBrake() script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value end script.Parent.Parent.Values.PBrake.Changed:connect(PBrake) function Gear() if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then script.Parent.TMode.Text = "A/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,170/255,0) elseif script.Parent.Parent.Values.TransmissionMode.Value == "Semi" then script.Parent.TMode.Text = "S/T" script.Parent.TMode.BackgroundColor3 = Color3.new(0, 170/255, 127/255) else script.Parent.TMode.Text = "M/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,85/255,.5) end end script.Parent.Parent.Values.TransmissionMode.Changed:connect(Gear) script.Parent.Parent.Values.Velocity.Changed:connect(function(property) script.Parent.Speedo.Needle.Rotation =45 + 225 * math.min(1,UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed) script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) script.Parent.Speed.MouseButton1Click:connect(function() if currentUnits==#UNITS then currentUnits = 1 else currentUnits = currentUnits+1 end for i,v in pairs(script.Parent.Speedo:GetChildren()) do v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns" end script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units end) wait(.1) Gear() PBrake()
-- FIXME Luau: GetPlayers() is typed as returning an array of Instances so we -- need to cast it to `{ Player }`
local players = (Players:GetPlayers() :: any) :: { Player } local controller = ExperienceComponents.HumanoidControllers.new(players, { Players.LocalPlayer :: Player, }) Players.PlayerAdded:Connect(function(player) controller:addHumanoidController(player) end) Players.PlayerRemoving:Connect(function(player) controller:removeHumanoidController(player) end) local hideOthers: types.Action = { name = "Hide Others", description = "Toggle visibility of other players in your photo", icon = assets.UsersOutline, activeIcon = assets.UsersSolid, onActivated = function() controller:hideHumanoids() return function() controller:showHumanoids() end end, } return hideOthers
-- same as jump for now
function moveFreeFall() RightShoulder.MaxVelocity = 0.1 LeftShoulder.MaxVelocity = 0.1 RightShoulder:SetDesiredAngle(0) LeftShoulder:SetDesiredAngle(0) RightHip:SetDesiredAngle(0) LeftHip:SetDesiredAngle(0) end function moveSit() RightShoulder.MaxVelocity = 0.1 LeftShoulder.MaxVelocity = 0.1 RightShoulder:SetDesiredAngle(3.14 /2) LeftShoulder:SetDesiredAngle(-3.14 /2) RightHip:SetDesiredAngle(3.14 /2) LeftHip:SetDesiredAngle(-3.14 /2) end function getTool() for _, kid in ipairs(Figure:GetChildren()) do if kid.className == "Tool" then return kid end end return nil end function getToolAnim(tool) for _, c in ipairs(tool:GetChildren()) do if c.Name == "toolanim" and c.className == "StringValue" then return c end end return nil end function animateTool() if (toolAnim == "None") then RightShoulder:SetDesiredAngle(1.57) return end if (toolAnim == "Slash") then RightShoulder.MaxVelocity = 0.5 RightShoulder:SetDesiredAngle(0) return end if (toolAnim == "Lunge") then RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder:SetDesiredAngle(1.57) LeftShoulder:SetDesiredAngle(1.0) RightHip:SetDesiredAngle(1.57) LeftHip:SetDesiredAngle(1.0) return end end function move(time) local amplitude local frequency if (pose == "Jumping") then moveJump() return end if (pose == "FreeFall") then moveFreeFall() return end if (pose == "Seated") then moveSit() return end local climbFudge = 0 if (pose == "Running") then RightShoulder.MaxVelocity = 0.1 LeftShoulder.MaxVelocity = 0.1 amplitude = 0.66 frequency = 9 elseif (pose == "Climbing") then RightShoulder.MaxVelocity = 0.1 LeftShoulder.MaxVelocity = 0.1 amplitude = 0.66 frequency = 9 else amplitude = 0.1 frequency = 1 end desiredAngle = amplitude * math.sin(time*frequency) RightShoulder:SetDesiredAngle(desiredAngle + climbFudge) LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge) RightHip:SetDesiredAngle(-desiredAngle) LeftHip:SetDesiredAngle(-desiredAngle) local tool = getTool() if tool then animStringValueObject = getToolAnim(tool) if animStringValueObject then toolAnim = animStringValueObject.Value -- message recieved, delete StringValue animStringValueObject.Parent = nil toolAnimTime = time + .3 end if time > toolAnimTime then toolAnimTime = 0 toolAnim = "None" end animateTool() else toolAnim = "None" toolAnimTime = 0 end end
-- Methods
function Sound.Get(Name : string) : Sound local s = Map[Name:lower()] if not s then warn(("No sound named '%s' found."):format(Name)) return EmptySound:Clone() end return s:Clone() end function Sound.GetGroup(Name : string) : {Sound} return Groups[Name:lower()] end function Sound.GetRandomFromGroup(Name : string, Rng : Random) : Sound Rng = Rng or System.Random local Group = Sound.GetGroup(Name) if not Group then warn(("No group named '%s' found."):format(Name)) return EmptySound:Clone() end return Group[Rng:NextInteger(1, #Group)]:Clone() end
--!strict -- on GOD if some of you report type mismatches and other stuff caused by issues in the luau type checking ***beta*** ima have to smack some of yall
--game:GetService("RunService").Heartbeat:wait(0) is around 60 fps
-- script makes the fall script active for ALL players! dont mess with this if your unexperienced.
function onPlayerRespawned(newPlayer) while true do if newPlayer.Character ~= nil then break end wait(.1) end local newJob = script.Fall:Clone() newJob.Disabled = false newJob.Parent = newPlayer.Character end function onPlayerEntered(newPlayer) newPlayer.Changed:connect(function (property) if (property == "Character") then onPlayerRespawned(newPlayer) end end) end c = game.Players:getChildren() for i = 1, #c do onPlayerEntered(c[i]) end game.Players.PlayerAdded:connect(onPlayerEntered)
-- Deprecated in favour of GetMessageModeTextButton -- Retained for compatibility reasons.
function methods:GetMessageModeTextLabel() return self:GetMessageModeTextButton() end function methods:IsFocused() if self.UserHasChatOff then return false end return self:GetTextBox():IsFocused() end function methods:GetVisible() return self.GuiObject.Visible end function methods:CaptureFocus() if not self.UserHasChatOff then self:GetTextBox():CaptureFocus() end end function methods:ReleaseFocus(didRelease) self:GetTextBox():ReleaseFocus(didRelease) end function methods:ResetText() self:GetTextBox().Text = "" end function methods:SetText(text) self:GetTextBox().Text = text end function methods:GetEnabled() return self.GuiObject.Visible end function methods:SetEnabled(enabled) if self.UserHasChatOff then -- The chat bar can not be removed if a user has chat turned off so that -- the chat bar can display a message explaining that chat is turned off. self.GuiObject.Visible = true else self.GuiObject.Visible = enabled end end function methods:SetTextLabelText(text) if not self.UserHasChatOff then self.TextLabel.Text = text end end function methods:SetTextBoxText(text) self.TextBox.Text = text end function methods:GetTextBoxText() return self.TextBox.Text end function methods:ResetSize() self.TargetYSize = 0 self:TweenToTargetYSize() end local function measureSize(textObj) return TextService:GetTextSize( textObj.Text, textObj.TextSize, textObj.Font, Vector2.new(textObj.AbsoluteSize.X, 10000) ) end function methods:CalculateSize() if self.CalculatingSizeLock then return end self.CalculatingSizeLock = true local textSize = nil local bounds = nil if self:IsFocused() or self.TextBox.Text ~= "" then textSize = self.TextBox.TextSize bounds = measureSize(self.TextBox).Y else textSize = self.TextLabel.TextSize bounds = measureSize(self.TextLabel).Y end local newTargetYSize = bounds - textSize if (self.TargetYSize ~= newTargetYSize) then self.TargetYSize = newTargetYSize self:TweenToTargetYSize() end self.CalculatingSizeLock = false end function methods:TweenToTargetYSize() local endSize = UDim2.new(1, 0, 1, self.TargetYSize) local curSize = self.GuiObject.Size local curAbsoluteSizeY = self.GuiObject.AbsoluteSize.Y self.GuiObject.Size = endSize local endAbsoluteSizeY = self.GuiObject.AbsoluteSize.Y self.GuiObject.Size = curSize local pixelDistance = math.abs(endAbsoluteSizeY - curAbsoluteSizeY) local tweeningTime = math.min(1, (pixelDistance * (1 / self.TweenPixelsPerSecond))) -- pixelDistance * (seconds per pixels) local success = pcall(function() self.GuiObject:TweenSize(endSize, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, tweeningTime, true) end) if (not success) then self.GuiObject.Size = endSize end end function methods:SetTextSize(textSize) if not self:IsInCustomState() then if self.TextBox then self.TextBox.TextSize = textSize end if self.TextLabel then self.TextLabel.TextSize = textSize end end end function methods:GetDefaultChannelNameColor() if ChatSettings.DefaultChannelNameColor then return ChatSettings.DefaultChannelNameColor end return Color3.fromRGB(35, 76, 142) end function methods:SetChannelTarget(targetChannel) local messageModeTextButton = self.GuiObjects.MessageModeTextButton local textBox = self.TextBox local textLabel = self.TextLabel self.TargetChannel = targetChannel if not self:IsInCustomState() then if targetChannel ~= ChatSettings.GeneralChannelName then messageModeTextButton.Size = UDim2.new(0, 1000, 1, 0) local localizedTargetChannel = targetChannel if ChatLocalization.tryLocalize then localizedTargetChannel = ChatLocalization:tryLocalize(targetChannel) end messageModeTextButton.Text = string.format("[%s] ", localizedTargetChannel) local channelNameColor = self:GetChannelNameColor(targetChannel) if channelNameColor then messageModeTextButton.TextColor3 = channelNameColor else messageModeTextButton.TextColor3 = self:GetDefaultChannelNameColor() end local xSize = messageModeTextButton.TextBounds.X messageModeTextButton.Size = UDim2.new(0, xSize, 1, 0) textBox.Size = UDim2.new(1, -xSize, 1, 0) textBox.Position = UDim2.new(0, xSize, 0, 0) textLabel.Size = UDim2.new(1, -xSize, 1, 0) textLabel.Position = UDim2.new(0, xSize, 0, 0) else messageModeTextButton.Text = "" messageModeTextButton.Size = UDim2.new(0, 0, 0, 0) textBox.Size = UDim2.new(1, 0, 1, 0) textBox.Position = UDim2.new(0, 0, 0, 0) textLabel.Size = UDim2.new(1, 0, 1, 0) textLabel.Position = UDim2.new(0, 0, 0, 0) end end end function methods:IsInCustomState() return self.InCustomState end function methods:ResetCustomState() if self.InCustomState then self.CustomState:Destroy() self.CustomState = nil self.InCustomState = false self.ChatBarParentFrame:ClearAllChildren() self:CreateGuiObjects(self.ChatBarParentFrame) self:SetTextLabelText( ChatLocalization:Get( "GameChat_ChatMain_ChatBarText", 'To chat click here or press "/" key' ) ) end end function methods:EnterWhisperState(player) self:ResetCustomState() self:CaptureFocus() if WhisperModule.CustomStateCreator then self.CustomState = WhisperModule.CustomStateCreator( player, self.ChatWindow, self, ChatSettings ) self.InCustomState = true else self:SetText("/w " .. player.Name) end end function methods:GetCustomMessage() if self.InCustomState then return self.CustomState:GetMessage() end return nil end function methods:CustomStateProcessCompletedMessage(message) if self.InCustomState then return self.CustomState:ProcessCompletedMessage() end return false end function methods:FadeOutBackground(duration) self.AnimParams.Background_TargetTransparency = 1 self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration) self:FadeOutText(duration) end function methods:FadeInBackground(duration) self.AnimParams.Background_TargetTransparency = 0.6 self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration) self:FadeInText(duration) end function methods:FadeOutText(duration) self.AnimParams.Text_TargetTransparency = 1 self.AnimParams.Text_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration) end function methods:FadeInText(duration) self.AnimParams.Text_TargetTransparency = 0.4 self.AnimParams.Text_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration) end function methods:AnimGuiObjects() self.GuiObject.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency self.GuiObjects.TextBoxFrame.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency self.GuiObjects.TextLabel.TextTransparency = self.AnimParams.Text_CurrentTransparency self.GuiObjects.TextBox.TextTransparency = self.AnimParams.Text_CurrentTransparency self.GuiObjects.MessageModeTextButton.TextTransparency = self.AnimParams.Text_CurrentTransparency end function methods:InitializeAnimParams() self.AnimParams.Text_TargetTransparency = 0.4 self.AnimParams.Text_CurrentTransparency = 0.4 self.AnimParams.Text_NormalizedExptValue = 1 self.AnimParams.Background_TargetTransparency = 0.6 self.AnimParams.Background_CurrentTransparency = 0.6 self.AnimParams.Background_NormalizedExptValue = 1 end function methods:Update(dtScale) self.AnimParams.Text_CurrentTransparency = CurveUtil:Expt( self.AnimParams.Text_CurrentTransparency, self.AnimParams.Text_TargetTransparency, self.AnimParams.Text_NormalizedExptValue, dtScale ) self.AnimParams.Background_CurrentTransparency = CurveUtil:Expt( self.AnimParams.Background_CurrentTransparency, self.AnimParams.Background_TargetTransparency, self.AnimParams.Background_NormalizedExptValue, dtScale ) self:AnimGuiObjects() end function methods:SetChannelNameColor(channelName, channelNameColor) self.ChannelNameColors[channelName] = channelNameColor if self.GuiObjects.MessageModeTextButton.Text == channelName then self.GuiObjects.MessageModeTextButton.TextColor3 = channelNameColor end end function methods:GetChannelNameColor(channelName) return self.ChannelNameColors[channelName] end
--[=[ Returns a boolean determing if a ScriptSignal object is active. ```lua ScriptSignal:IsActive() -> true ScriptSignal:Destroy() ScriptSignal:IsActive() -> false ``` @return boolean @ignore ]=]
function ScriptSignal:IsActive(): boolean return self._active == true end
------------------------------------------------------------------------ -- parse part of an if control structure, including the condition -- * used in ifstat() ------------------------------------------------------------------------
function luaY:test_then_block(ls) -- test_then_block -> [IF | ELSEIF] cond THEN block luaX:next(ls) -- skip IF or ELSEIF local condexit = self:cond(ls) self:checknext(ls, "TK_THEN") self:block(ls) -- `then' part return condexit end
--- Creates a listable type from a singlular type
function Util.MakeListableType(type, override) local listableType = { Listable = true, Transform = type.Transform, Validate = type.Validate, ValidateOnce = type.ValidateOnce, Autocomplete = type.Autocomplete, Default = type.Default, Parse = function(...) return {type.Parse(...)} end } if override then for key, value in pairs(override) do listableType[key] = value end end return listableType end local function encodeCommandEscape(text) return (text:gsub("\\%$", "___!CMDR_DOLLAR!___")) end local function decodeCommandEscape(text) return (text:gsub("___!CMDR_DOLLAR!___", "$")) end function Util.RunCommandString(dispatcher, commandString) commandString = Util.ParseEscapeSequences(commandString) commandString = Util.EncodeEscapedOperators(commandString) local commands = commandString:split("&&") local output = "" for i, command in ipairs(commands) do local outputEncoded = output:gsub("%$", "\\x24") command = command:gsub("||", output:find("%s") and ("%q"):format(outputEncoded) or outputEncoded) output = tostring( dispatcher:EvaluateAndRun( ( Util.RunEmbeddedCommands(dispatcher, command) ) ) ) if i == #commands then return output end end end
--You can place the gui in StarterGui if you want, you don't need to
-- Light System.
LightSystem = script.Parent -- Hello, Variables here Lights = LightSystem.Lights Switch = LightSystem.Button Switch1 = Switch.Button1 Switch2 = Switch.Button2 on = false children = Lights:GetChildren() function onClicked() if on == false then on = true Switch1.Transparency = 0 Switch2.Transparency = 1 for i = 1, #children do children[i].PointLight.Enabled = true print("Lights On") end elseif on == true then on = false Switch1.Transparency = 1 Switch2.Transparency = 0 for i = 1, #children do children[i].PointLight.Enabled = false print("Lights Off") end end end Switch.ClickDetector.MouseClick:connect(onClicked)
-- Variables (best not to touch these!)
local button = script.Parent .Parent.Parent local car = script.Parent.Parent.Parent.Parent.Car.Value local sound = script.Parent.Parent.Start local st = script.Parent.Parent.Stall st.Parent = car.DriveSeat sound.Parent = car.DriveSeat -- What brick the start sound is playing from. button.MouseButton1Click:connect(function() -- Event when the button is clicked if script.Parent.Parent.Parent.Text == "Engine: Off" then -- If the text says it's off then.. sound:Play() -- Startup sound plays.. wait(0.8) -- I don't know what to put for this script.Parent.Parent.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car. button.Text = "Engine: On" -- You don't really need this, but I would keep it. else -- If it's on then when you click the button, st:play() script.Parent.Parent.Parent.Parent.IsOn.Value = false -- The car is turned off. button.Text = "Engine: Off" end -- Don't touch this. end) -- And don't touch this either.
------Respawn------
local marine = script.Parent.Parent.Parent local myHead = marine.Head local myHuman = marine.Humanoid local oldHealth = myHuman.Health local healthAfterDamage = myHuman.Health local clone = marine:Clone() local modules = script.Parent.Parent.Modules local core = require(modules.CoreModule) local actions = require(modules.ActionsModule) local status = require(modules.Status) local combatModule = require(modules:WaitForChild("CombatModule")) local ArmorDurability = combatModule.ArmorDurability local MaxArmorDurability = ArmorDurability local ShowArmorBar = combatModule.ShowArmorBar local DeathAnimation = myHuman:LoadAnimation(marine:WaitForChild("DeathAnimation")) local ArmorGUI = myHead:WaitForChild("ArmorBar") local ArmorFrame = ArmorGUI:WaitForChild("MainFrame") local ArmorBar = ArmorFrame:WaitForChild("Bar") local ArmorFill = ArmorBar:WaitForChild("Fill") local HealthGUI = myHead:WaitForChild("HealthBar") local HealthFrame = HealthGUI:WaitForChild("MainFrame") local HealthBar = HealthFrame:WaitForChild("Bar") local HealthFill = HealthBar:WaitForChild("Fill") local HealthShading = HealthFill:WaitForChild("Shading") local NameTag = myHead:WaitForChild("NameTag") local NameFrame = NameTag:WaitForChild("MainFrame") local NameText = NameFrame:WaitForChild("TextLabel") local OverrideDefaultGUI = true -- turn this to false if u want to use the default roblox health gui and name gui NameText.Text = marine.Name if ShowArmorBar == true then ArmorGUI.Enabled = true else ArmorGUI.Enabled = false end if OverrideDefaultGUI == true then HealthGUI.Enabled = true NameTag.Enabled = true else HealthGUI.Enabled = false NameTag.Enabled = false end local TweenService = game:GetService("TweenService")
-- p = period -- a = amplitud
local function inOutElastic(t, b, c, d, a, p) if t == 0 then return b end t = t / d * 2 if t == 2 then return b + c end if not p then p = d * (0.3 * 1.5) end if not a then a = 0 end if not a or a < abs(c) then a = c s = p / 4 else s = p / (2 * pi) * asin(c / a) end if t < 1 then t = t - 1 return -0.5 * (a * pow(2, 10 * t) * sin((t * d - s) * (2 * pi) / p)) + b else t = t - 1 return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p ) * 0.5 + c + b end end
--------------| SYSTEM SETTINGS |--------------
Prefix = ":"; -- The character you use before every command (e.g. ';jump me'). SplitKey = " "; -- The character inbetween command arguments (e.g. setting it to '/' would change ';jump me' to ';jump/me'). BatchKey = ""; -- The character inbetween batch commands (e.g. setting it to '|' would change ';jump me ;fire me ;smoke me' to ';jump me | ;fire me | ;smoke me' QualifierBatchKey = ","; -- The character used to split up qualifiers (e.g. ;jump player1,player2,player3) Theme = "Blue"; -- The default UI theme. NoticeSoundId = 2865227271; -- The SoundId for notices. NoticeVolume = 0.1; -- The Volume for notices. NoticePitch = 1; -- The Pitch/PlaybackSpeed for notices. ErrorSoundId = 2865228021; -- The SoundId for error notifications. ErrorVolume = 0.1; -- The Volume for error notifications. ErrorPitch = 1; -- The Pitch/PlaybackSpeed for error notifications. AlertSoundId = 9161622880; -- The SoundId for alerts. AlertVolume = 0.5; -- The Volume for alerts. AlertPitch = 1; -- The Pitch/PlaybackSpeed for alerts. WelcomeBadgeId = 0; -- Award new players a badge, such as 'Welcome to the game!'. Set to 0 for no badge. CommandDebounce = true; -- Wait until the command effect is over to use again. Helps to limit abuse & lag. Set to 'false' to disable. SaveRank = true; -- Saves a player's rank in the server they received it. (e.g. ;rank plrName rank). Use ';permRank plrName rank' to permanently save a rank. Set to 'false' to disable. LoopCommands = 3; -- The minimum rank required to use LoopCommands. MusicList = {}; -- Songs which automatically appear in a user's radio. Type '!radio' to display the radio. ThemeColors = { -- The colours players can set their HD Admin UI (in the 'Settings' menu). | Format: {ThemeName, ThemeColor3Value}; {"Red", Color3.fromRGB(150, 0, 0), }; {"Orange", Color3.fromRGB(150, 75, 0), }; {"Brown", Color3.fromRGB(120, 80, 30), }; {"Yellow", Color3.fromRGB(130, 120, 0), }; {"Green", Color3.fromRGB(0, 120, 0), }; {"Blue", Color3.fromRGB(0, 100, 150), }; {"Purple", Color3.fromRGB(100, 0, 150), }; {"Pink", Color3.fromRGB(150, 0, 100), }; {"Black", Color3.fromRGB(60, 60, 60), }; }; Colors = { -- The colours for ChatColors and command arguments. | Format: {"ShortName", "FullName", Color3Value}; {"r", "Red", Color3.fromRGB(255, 0, 0) }; {"o", "Orange", Color3.fromRGB(250, 100, 0) }; {"y", "Yellow", Color3.fromRGB(255, 255, 0) }; {"g", "Green" , Color3.fromRGB(0, 255, 0) }; {"dg", "DarkGreen" , Color3.fromRGB(0, 125, 0) }; {"b", "Blue", Color3.fromRGB(0, 255, 255) }; {"db", "DarkBlue", Color3.fromRGB(0, 50, 255) }; {"p", "Purple", Color3.fromRGB(150, 0, 255) }; {"pk", "Pink", Color3.fromRGB(255, 85, 185) }; {"bk", "Black", Color3.fromRGB(0, 0, 0) }; {"w", "White", Color3.fromRGB(255, 255, 255) }; }; ChatColors = { -- The colour a player's chat will appear depending on their rank. '["Owner"] = "Yellow";' makes the owner's chat yellow. [5] = "Yellow"; }; Cmdbar = 1; -- The minimum rank required to use the Cmdbar. Cmdbar2 = 3; -- The minimum rank required to use the Cmdbar2. ViewBanland = 3; -- The minimum rank required to view the banland. OnlyShowUsableCommands = false; -- Only display commands equal to or below the user's rank on the Commands page. RankRequiredToViewPage = { -- || The pages on the main menu || ["Commands"] = 0; ["Admin"] = 0; ["Settings"] = 0; }; RankRequiredToViewRank = { -- || The rank categories on the 'Ranks' subPage under Admin || ["Owner"] = 1; ["HeadAdmin"] = 1; ["Admin"] = 1; ["Mod"] = 1; ["VIP"] = 0; }; RankRequiredToViewRankType = { -- || The collection of loader-rank-rewarders on the 'Ranks' subPage under Admin || ["Owner"] = 0; ["SpecificUsers"] = 5; ["Gamepasses"] = 0; ["Assets"] = 0; ["Groups"] = 0; ["Friends"] = 0; ["FreeAdmin"] = 0; ["VipServerOwner"] = 0; }; RankRequiredToViewIcon = 2; WelcomeRankNotice = false; -- The 'You're a [rankName]' notice that appears when you join the game. Set to false to disable. WelcomeDonorNotice = false; -- The 'You're a Donor' notice that appears when you join the game. Set to false to disable. WarnIncorrectPrefix = false; -- Warn the user if using the wrong prefix | "Invalid prefix! Try using [correctPrefix][commandName] instead!" DisableAllNotices = true; -- Set to true to disable all HD Admin notices. ScaleLimit = 4; -- The maximum size players with a rank lower than 'IgnoreScaleLimit' can scale theirself. For example, players will be limited to ;size me 4 (if limit is 4) - any number above is blocked. IgnoreScaleLimit = 3; -- Any ranks equal or above this value will ignore 'ScaleLimit' CommandLimits = { -- Enables you to set limits for commands which have a number argument. Ranks equal to or higher than 'IgnoreLimit' will not be affected by Limit. ["fly"] = { Limit = 10000; IgnoreLimit = 3; }; ["fly2"] = { Limit = 10000; IgnoreLimit = 3; }; ["noclip"] = { Limit = 10000; IgnoreLimit = 3; }; ["noclip2"] = { Limit = 10000; IgnoreLimit = 3; }; ["speed"] = { Limit = 10000; IgnoreLimit = 3; }; ["jumpPower"] = { Limit = 10000; IgnoreLimit = 3; }; }; VIPServerCommandBlacklist = {"permRank", "permBan", "globalAnnouncement"}; -- Commands players are probihited from using in VIP Servers. GearBlacklist = {67798397}; -- The IDs of gear items to block when using the ;gear command. IgnoreGearBlacklist = 4; -- The minimum rank required to ignore the gear blacklist. PlayerDataStoreVersion = "V1.0"; -- Data about the player (i.e. permRanks, custom settings, etc). Changing the Version name will reset all PlayerData. SystemDataStoreVersion = "V1.0"; -- Data about the game (i.e. the banland, universal message system, etc). Changing the Version name will reset all SystemData. CoreNotices = { -- Modify core notices. You can find a table of all CoreNotices under [MainModule > Client > SharedModules > CoreNotices] --NoticeName = NoticeDetails; };
--"False" = Not Acceptable Keycard To Open. "True" = Acceptable Keycard To Open.--
local bool = true local bool2 = true local clearance = { ["[SCP] Card-Omni"] = true, ["[SCP] Card-L5"] = true, ["[SCP] Card-L4"] = true, ["[SCP] Card-L3"] = true, ["[SCP] Card-L2"] = true, ["[SCP] Card-L1"] = true } --DO NOT EDIT BEYOND THIS LINE-- local LeftDoor = script.Parent local RightDoor = script.Parent.Parent.RightDoor local Open = false local OpenSound = script.Parent.DoorOpen local CloseSound = script.Parent.DoorClose local Debounce = false function openDoor() if not Debounce then Debounce = true if Open then Open = false CloseSound:Play() Spawn(function() for i = 1, 60 do LeftDoor.CFrame = LeftDoor.CFrame + (LeftDoor.CFrame.lookVector * 0.1) wait(0.05) end end) Spawn(function() for i = 1, 60 do RightDoor.CFrame = RightDoor.CFrame + (RightDoor.CFrame.lookVector * 0.1) wait(0.05) end end) else Open = true OpenSound:Play() Spawn(function() for i = 1, 60 do LeftDoor.CFrame = LeftDoor.CFrame - (LeftDoor.CFrame.lookVector * 0.1) wait(0.05) end end) Spawn(function() for i = 1, 60 do RightDoor.CFrame = RightDoor.CFrame - (RightDoor.CFrame.lookVector * 0.1) wait(0.05) end end) end wait(2.5) Debounce = false end end script.Parent.Parent.KeycardReader1.touched:connect(function(touch) if touch.Name == "Handle" and clearance[touch.Parent.Name] and bool then bool = false script.Parent.AccessGranted:play() wait(0.75) openDoor() wait(3) bool = true elseif touch.Name == "Handle" and not clearance[touch.Parent.Name] and bool2 then bool2 = false script.Parent.AccessDenied:play() wait(1) bool2 = true end end) script.Parent.Parent.KeycardReader2.touched:connect(function(touch) if touch.Name == "Handle" and clearance[touch.Parent.Name] and bool then bool = false script.Parent.AccessGranted:play() wait(0.75) openDoor() wait(3) bool = true elseif touch.Name == "Handle" and not clearance[touch.Parent.Name] and bool2 then bool2 = false script.Parent.AccessDenied:play() wait(1) bool2 = true end end)
--repeat wait() until tool:FindFirstChild("Configurations")
local configs = require(tool:WaitForChild("Configurations"))
--- Basic node interacting with the octree -- @classmod OctreeNode
local OctreeNode = {ClassName = "OctreeNode"} OctreeNode.__index = OctreeNode function OctreeNode.new(Octree, Object) return setmetatable({ Octree = Octree or error("No octree"); Object = Object or error("No object"); CurrentLowestRegion = nil; Position = nil; PositionX = nil; PositionY = nil; PositionZ = nil; }, OctreeNode) end function OctreeNode:KNearestNeighborsSearch(K: number, Radius: number) return self.Octree:KNearestNeighborsSearch(self.Position, K, Radius) end function OctreeNode:GetObject() warn("OctreeNode:GetObject is deprecated.") return self.Object end function OctreeNode:RadiusSearch(Radius: number) return self.Octree:RadiusSearch(self.Position, Radius) end function OctreeNode:GetPosition() warn("OctreeNode:GetPosition is deprecated.") return self.Position end function OctreeNode:GetRawPosition(): (number, number, number) return self.PositionX, self.PositionY, self.PositionZ end function OctreeNode:SetPosition(Position: Vector3) if self.Position == Position then return end local PositionX, PositionY, PositionZ = Position.X, Position.Y, Position.Z self.PositionX = PositionX self.PositionY = PositionY self.PositionZ = PositionZ self.Position = Position if self.CurrentLowestRegion then local Region = self.CurrentLowestRegion local LowerBounds = Region.LowerBounds local UpperBounds = Region.UpperBounds if PositionX >= LowerBounds[1] and PositionX <= UpperBounds[1] and PositionY >= LowerBounds[2] and PositionY <= UpperBounds[2] and PositionZ >= LowerBounds[3] and PositionZ <= UpperBounds[3] then return end end local NewLowestRegion = self.Octree:GetOrCreateLowestSubRegion(PositionX, PositionY, PositionZ) if self.CurrentLowestRegion then -- OctreeRegionUtils_MoveNode(self.CurrentLowestRegion, NewLowestRegion, self) local FromLowest = self.CurrentLowestRegion if FromLowest.Depth ~= NewLowestRegion.Depth then error("fromLowest.Depth ~= toLowest.Depth") end if FromLowest == NewLowestRegion then error("fromLowest == toLowest") end local CurrentFrom = FromLowest local CurrentTo = NewLowestRegion while CurrentFrom ~= CurrentTo do -- remove from current local CurrentFromNodes = CurrentFrom.Nodes if not CurrentFromNodes[self] then error("CurrentFrom.Nodes doesn't have a node here.") end local NodeCount = CurrentFrom.NodeCount if NodeCount <= 0 then error("NodeCount is <= 0.") end NodeCount -= 1 CurrentFromNodes[self] = nil CurrentFrom.NodeCount = NodeCount -- remove subregion! local ParentIndex = CurrentFrom.ParentIndex if NodeCount <= 0 and ParentIndex then local Parent = CurrentFrom.Parent if not Parent then error("CurrentFrom.Parent doesn't exist.") end local SubRegions = Parent.SubRegions if SubRegions[ParentIndex] ~= CurrentFrom then error("Failed equality check.") end SubRegions[ParentIndex] = nil end local CurrentToNodes = CurrentTo.Nodes if CurrentToNodes[self] then error("CurrentTo.Nodes already has a node here.") end CurrentToNodes[self] = self CurrentTo.NodeCount += 1 CurrentFrom = CurrentFrom.Parent CurrentTo = CurrentTo.Parent end else local Current = NewLowestRegion while Current do local CurrentNodes = Current.Nodes if not CurrentNodes[self] then CurrentNodes[self] = self Current.NodeCount += 1 end Current = Current.Parent end end self.CurrentLowestRegion = NewLowestRegion end function OctreeNode:Destroy() local LowestSubregion = self.CurrentLowestRegion if LowestSubregion then local Current = LowestSubregion while Current do local Nodes = Current.Nodes if not Nodes[self] then error("CurrentFrom.Nodes doesn't have a node here.") end local NodeCount = Current.NodeCount if NodeCount <= 0 then error("NodeCount is <= 0.") end NodeCount -= 1 Nodes[self] = nil Current.NodeCount = NodeCount -- remove subregion! local Parent = Current.Parent local ParentIndex = Current.ParentIndex if NodeCount <= 0 and ParentIndex then if not Parent then error("Current.Parent doesn't exist.") end local SubRegions = Parent.SubRegions if SubRegions[ParentIndex] ~= Current then error("Failed equality check.") end SubRegions[ParentIndex] = nil end Current = Parent end end end return OctreeNode
--[światła]
p1 = script.Parent.Parent.p1 legansio = true sp1 = script.Parent.Parent.sp1 legansio = true p2 = script.Parent.Parent.p2 legansio = true sp2 = script.Parent.Parent.sp2 legansio = true p3 = script.Parent.Parent.p3 legansio = true sp3 = script.Parent.Parent.sp3 legansio = true p4 = script.Parent.Parent.p4 legansio = true sp4 = script.Parent.Parent.sp4 legansio = true p5 = script.Parent.Parent.p5 legansio = true sp5 = script.Parent.Parent.sp5 legansio = true p6 = script.Parent.Parent.p6 legansio = true sp6 = script.Parent.Parent.sp6 legansio = true p7 = script.Parent.Parent.p7 legansio = true sp7 = script.Parent.Parent.sp7 legansio = true l1 = script.Parent.Parent.l1 legansio = true sl1 = script.Parent.Parent.sl1 legansio = true l2 = script.Parent.Parent.l2 legansio = true sl2 = script.Parent.Parent.sl2 legansio = true l3 = script.Parent.Parent.l3 legansio = true sl3 = script.Parent.Parent.sl3 legansio = true l4 = script.Parent.Parent.l4 legansio = true sl4 = script.Parent.Parent.sl4 legansio = true l5 = script.Parent.Parent.l5 legansio = true sl5 = script.Parent.Parent.sl5 legansio = true l6 = script.Parent.Parent.l6 legansio = true sl6 = script.Parent.Parent.sl6 legansio = true l7 = script.Parent.Parent.l7 legansio = true sl7 = script.Parent.Parent.sl7 legansio = true
-- ROBLOX deviation: printIteratorEntries is renamed to printTableEntries -- /** -- * Return entries (for example, of a map) -- * with spacing, indentation, and comma -- * without surrounding punctuation (for example, braces) -- */
local function printTableEntries( t: any, config: Config, indentation: string, depth: number, refs: Refs, printer: Printer, separator_: string? ): string local separator = if separator_ then separator_ else ": " local result = "" -- ROBLOX TODO: remove this inline if-expression and function once Array.sort() fix merges local keys = Array.sort( Object.keys(t), if config.compareKeys ~= nil and config.compareKeys ~= Object.None then config.compareKeys else function(a, b) return if type(a) .. tostring(a) < type(b) .. tostring(b) then -1 else if type(a) .. tostring(a) == type(b) .. tostring(b) then 0 else 1 end ) if #keys > 0 then result ..= config.spacingOuter local indentationNext = indentation .. config.indent for i = 1, #keys do local k = keys[i] local v = t[k] local name = printer(k, config, indentationNext, depth, refs) local value = printer(v, config, indentationNext, depth, refs) result ..= indentationNext .. name .. separator .. value if i < #keys then result = result .. "," .. config.spacingInner elseif not config.min then result = result .. "," end end result ..= config.spacingOuter .. indentation end return result end
-- dButton:TweenPosition(Dposition, "InOut", "Sine", 0.1)
end) dButton.MouseLeave:Connect(function() dButton:TweenSize(sizeNormal, "InOut", "Sine", 0.1)
--= Variables =--
local camera = game.Workspace.CurrentCamera local TweeningService = game:GetService("TweenService") local UIS = game:GetService('UserInputService') local Bar = script.Parent:WaitForChild('STMBackground'):WaitForChild('Bar') local player = game.Players.LocalPlayer local NormalWalkSpeed = 10 local NewWalkSpeed = 16 local power = 10 local sprinting = false repeat wait() until game.Players.LocalPlayer.Character local character = player.Character local Humanoid = character.Humanoid local runninganim = Humanoid:LoadAnimation(script.Parent.Runninganim)
--Players.PlayerAdded:Connect(function(player) -- DefaultGroup:LinkPlayer(player)
--[[ DEVELOPMENT HAS BEEN MOVED FROM DAVEY_BONES/SCELERATIS TO THE EPIX INCORPORATED GROUP CURRENT LOADER: https://www.roblox.com/library/7510622625/Adonis-Loader-Sceleratis-Davey-Bones-Epix CURRENT MODULE: https://www.roblox.com/library/7510592873/Adonis-MainModule --]]
--Required Modules
local modules = script.Parent local status = require(modules.Status) local core = require(modules.CoreModule) local marine = script.Parent.Parent.Parent local myHuman = marine.Humanoid local myRoot = marine.HumanoidRootPart local m4 = marine.M4 local reloadSound = m4.Reload local magazine = marine.Mag local myHead = marine.Head local myTorso = marine.Torso local neck = myTorso.Neck local lShoulder = myTorso["Left Shoulder"] local rShoulder = myTorso["Right Shoulder"] local lArmWeld = myTorso["Left Arm Weld"] local rArmWeld = myTorso["Right Arm Weld"] local lArm = marine["Left Arm"] local rArm = marine["Right Arm"] local m4Weld = m4["M4 Weld"] local wait = task.wait
--Try to find an instance of the ClientWeaponsScript (tagged as "ClientWeaponsSystem") under the PlayerScripts. If this is found, it means --that this instance of ClientWeaponsScript (of this version) was not the first one to run.
local PlayerScripts = LocalPlayer:WaitForChild("PlayerScripts") local ClientWeaponsScript = nil for i, child in pairs(PlayerScripts:GetChildren()) do if child:IsA("LocalScript") and child.Name == script.Name and CollectionService:HasTag(child, "ClientWeaponsSystem") then local childVersion = child:FindFirstChild("Version") if childVersion and childVersion:IsA("IntValue") and childVersion.Value == ScriptVersion then ClientWeaponsScript = child break end end end
-- Disable effects
for _, effect in pairs(EffectsToPlay:GetChildren()) do if effect:IsA("ParticleEmitter") then -- Emit particles for enough time to create a cloud effect.Enabled = false end end wait(40)
-- << FUNCTIONS >>
function module:Notice(noticeType, title, description, args) if not main.pdata or not main.pdata.SetupData then repeat wait(0.1) until (main.pdata and main.pdata.SetupData) end if main.settings.DisableAllNotices ~= true then spawn(function() local notice = template:Clone() notice.Visible = true notice.Title.Text = title notice.Desc.Text = description notice.NoticeType.Value = noticeType --[[spawn(function() wait() if notice.Desc.TextBounds.Y > 35 then notice.Desc.Position = UDim2.new(0.05, 0, 0.37, 0) end end)--]] if type(args) == "table" then local de = true local function checkDe() if de then de = false return true end end local clickAction = args[1] if clickAction == "ShowSpecificPage" then notice.Countdown.Value = 20 notice.TextButton.MouseButton1Down:Connect(function() if not checkDe() then return end main:GetModule("GUIs"):ShowSpecificPage(args[2], args[3]) endNotice(notice) end) elseif clickAction == "Teleport" then notice.Countdown.Value = 25 notice.TextButton.MouseButton1Down:Connect(function() if not checkDe() then return end main.teleportService:Teleport(args[2]) notice.Desc.Text = "Teleporting..." end) elseif clickAction == "PM" then notice.Countdown.Value = 999 notice.TextButton.MouseButton1Down:Connect(function() if not checkDe() then return end main:GetModule("cf"):CreateNewCommandMenu("privateMessage", {args[2], args[3]}, 4) endNotice(notice) end) end end notice.CloseX.MouseButton1Down:Connect(function() endNotice(notice) end) table.insert(noticeQueue, notice) Queue() end) end end
--local MasterControl = require(script.Parent)
local PathDisplay = nil local LocalPlayer = Players.LocalPlayer local bindAtPriorityFlagExists, bindAtPriorityFlagEnabled = pcall(function() return UserSettings():IsUserFeatureEnabled("UserPlayerScriptsBindAtPriority") end) local FFlagPlayerScriptsBindAtPriority = bindAtPriorityFlagExists and bindAtPriorityFlagEnabled
--- Registers a type in the system. -- name: The type Name. This must be unique.
function Registry:RegisterType (name, typeObject) if not name or typeof(name) ~= "string" then error("Invalid type name provided: nil") end if not name:find("^[%d%l]%w*$") then error(('Invalid type name provided: "%s", type names must be alphanumeric and start with a lower-case letter or a digit.'):format(name)) end for key in pairs(typeObject) do if self.TypeMethods[key] == nil then error("Unknown key/method in type \"" .. name .. "\": " .. key) end end if self.Types[name] ~= nil then error(('Type "%s" has already been registered.'):format(name)) end typeObject.Name = name typeObject.DisplayName = typeObject.DisplayName or name self.Types[name] = typeObject if typeObject.Prefixes then self:RegisterTypePrefix(name, typeObject.Prefixes) end end function Registry:RegisterTypePrefix (name, union) if not self.TypeAliases[name] then self.TypeAliases[name] = name end self.TypeAliases[name] = ("%s %s"):format(self.TypeAliases[name], union) end function Registry:RegisterTypeAlias (name, alias) assert(self.TypeAliases[name] == nil, ("Type alias %s already exists!"):format(alias)) self.TypeAliases[name] = alias end
--[[ ___ _______ _ _______ / _ |____/ ___/ / ___ ____ ___ (_)__ /__ __/ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< / / /_/ |_| \___/_//_/\_,_/___/___/_/___/ /_/ SecondLogic @ Inspare Avxnturador @ Novena ]]
local autoscaling = true --Estimates top speed local UNITS = { --Click on speed to change units --First unit is default { units = "MPH" , scaling = (10/12) * (60/88) , -- 1 stud : 10 inches | ft/s to MPH maxSpeed = 230 , spInc = 20 , -- Increment between labelled notches }, { units = "KM/H" , scaling = (10/12) * 1.09728 , -- 1 stud : 10 inches | ft/s to KP/H maxSpeed = 370 , spInc = 40 , -- Increment between labelled notches }, }
-- doesn't actually provide any info ☻
local TS = game:GetService("TweenService") for ind,btn in pairs(script.Parent:GetChildren()) do local deb = false if btn.Name == "Button" or btn.Name == "Button2" then local toggled if btn.Name == "Button" then toggled = false elseif btn.Name == "Button2" then toggled = true end local CD = Instance.new("ClickDetector",btn) CD.MaxActivationDistance = 5.5 CD.MouseClick:Connect(function() if not deb then deb = true local toggleTS if not toggled then btn.Material = "Neon" btn.Color = Color3.fromRGB(131, 130, 133) toggleTS = TS:Create(btn, TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{ CFrame = btn.CFrame * CFrame.new(0,0,.15), Color = Color3.fromRGB(255,0,0) }) else btn.Material = "SmoothPlastic" toggleTS = TS:Create(btn, TweenInfo.new(.1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0), {CFrame = btn.CFrame * CFrame.new(0,0,-.15), Color = Color3.fromRGB(163, 162, 165) }) end toggleTS.Completed:Connect(function() toggled = not toggled deb = false end) toggleTS:Play() end end) end end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 5 -- cooldown for use of the tool again ZoneModelName = "Homing phantom bone" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Function to periodically save player data
local function autoSave() while wait(AUTOSAVE_INTERVAL) do for key, data in pairs(sessionData) do save(key) end end end
-- Services
local Players = game.Players local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- Local Variables
local Events = ReplicatedStorage.Events local DisplayIntermission = Events.DisplayIntermission local Camera = workspace.CurrentCamera local Player = Players.LocalPlayer local ScreenGui = script.ScreenGui local InIntermission = false
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound") UIS.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.Z and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" then Debounce = 2 Track1 = plr.Character.Humanoid:LoadAnimation(script.AnimationCharge) Track1:Play() script.RemoteEventS:FireServer() for i = 1,math.huge do if Debounce == 2 then plr.Character.HumanoidRootPart.Anchored = true else break end wait() end end end) UIS.InputEnded:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.Z and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" then Debounce = 3 local Track2 = plr.Character.Humanoid:LoadAnimation(script.AnimationRelease) Track2:Play() Track1:Stop() Sound:Play() local camera = game.Workspace.CurrentCamera local CameraShaker = require(game.ReplicatedStorage.SG.CameraShaker) local camshake = CameraShaker.new(Enum.RenderPriority.Camera.Value,function(shakeCFrame) camera.CFrame = camera.CFrame * shakeCFrame end) camshake:Start() camshake:Shake(CameraShaker.Presets.Explosion) local mousepos = Mouse.Hit script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p) wait(1) plr.Character.LeftHand.EFhand:Destroy() plr.Character.RightHand.EFhand:Destroy() Track2:Stop() wait(.5) Tool.Active.Value = "None" wait(1.5) plr.Character.HumanoidRootPart.Anchored = false wait(5) Debounce = 1 end end)
-- services
local StarterGui = game:GetService("StarterGui")
---------------------------------- ------------FUNCTIONS------------- ----------------------------------
function UnDigify(digit) if digit < 1 or digit > 61 then return "" elseif digit == 1 then return "1" elseif digit == 2 then return "!" elseif digit == 3 then return "2" elseif digit == 4 then return "@" elseif digit == 5 then return "3" elseif digit == 6 then return "4" elseif digit == 7 then return "$" elseif digit == 8 then return "5" elseif digit == 9 then return "%" elseif digit == 10 then return "6" elseif digit == 11 then return "^" elseif digit == 12 then return "7" elseif digit == 13 then return "8" elseif digit == 14 then return "*" elseif digit == 15 then return "9" elseif digit == 16 then return "(" elseif digit == 17 then return "0" elseif digit == 18 then return "q" elseif digit == 19 then return "Q" elseif digit == 20 then return "w" elseif digit == 21 then return "W" elseif digit == 22 then return "e" elseif digit == 23 then return "E" elseif digit == 24 then return "r" elseif digit == 25 then return "t" elseif digit == 26 then return "T" elseif digit == 27 then return "y" elseif digit == 28 then return "Y" elseif digit == 29 then return "u" elseif digit == 30 then return "i" elseif digit == 31 then return "I" elseif digit == 32 then return "o" elseif digit == 33 then return "O" elseif digit == 34 then return "p" elseif digit == 35 then return "P" elseif digit == 36 then return "a" elseif digit == 37 then return "s" elseif digit == 38 then return "S" elseif digit == 39 then return "d" elseif digit == 40 then return "D" elseif digit == 41 then return "f" elseif digit == 42 then return "g" elseif digit == 43 then return "G" elseif digit == 44 then return "h" elseif digit == 45 then return "H" elseif digit == 46 then return "j" elseif digit == 47 then return "J" elseif digit == 48 then return "k" elseif digit == 49 then return "l" elseif digit == 50 then return "L" elseif digit == 51 then return "z" elseif digit == 52 then return "Z" elseif digit == 53 then return "x" elseif digit == 54 then return "c" elseif digit == 55 then return "C" elseif digit == 56 then return "v" elseif digit == 57 then return "V" elseif digit == 58 then return "b" elseif digit == 59 then return "B" elseif digit == 60 then return "n" elseif digit == 61 then return "m" else return "?" end end function IsBlack(note) if note%12 == 2 or note%12 == 4 or note%12 == 7 or note%12 == 9 or note%12 == 11 then return true end end local TweenService = game:GetService("TweenService") function Tween(obj,Goal,Time,Wait,...) local TwInfo = TweenInfo.new(Time,...) local twn = TweenService:Create(obj, TwInfo, Goal) twn:Play() if Wait then twn.Completed:wait() end return end function HighlightPianoKey(note1,transpose) if not Settings.KeyAesthetics then return end local octave = math.ceil(note1/12) local note2 = (note1 - 1)%12 + 1 local key = Piano.Case.Keys:FindFirstChild(note1) if key then local Key = key:clone() Key.Parent = Piano.Keys.Parts Key.Name = key.Name Key.Transparency = 0 local obj = Key local Properties = {} Properties.Position = Piano.Case.End.Position Tween(obj,Properties,3,true,Enum.EasingStyle.Linear) Key:Destroy() end return end
-- Functions --
local function onClicked(player) local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt if not foundShirt then -- if there is no shirt print("No shirt found, creating for "..player.Name) local newShirt = Instance.new("Shirt",player.Character) newShirt.Name = "Shirt" else if foundShirt then -- if there is a shirt print("Shirt found, reconstructing for "..player.Name) player.Character.Shirt:remove() local newShirt = Instance.new("Shirt",player.Character) newShirt.Name = "Shirt" end end local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants if not foundPants then -- if there are no pants print("No pants found, creating for "..player.Name) local newPants = Instance.new("Pants",player.Character) newPants.Name = "Pants" else if foundPants then -- if there are pants print("Pants found, reconstructing for "..player.Name) player.Character.Pants:remove() local newPants = Instance.new("Pants",player.Character) newPants.Name = "Pants" end end player.Character.Shirt.ShirtTemplate = shirtId player.Character.Pants.PantsTemplate = pantsId end cDetector.MouseClick:connect(onClicked)
-- Sets up an OrientableBody for the given player
local function onCharacterAdded(player: Player, character: Model) local body = OrientableBody.new(character) orientableBodies[player] = body if character == Players.LocalPlayer.Character then body:useCameraAsSource() else body:useAttributeAsSource() end end
-- Constructor.
function FastCast.new() return setmetatable({ LengthChanged = Signal.new(), RayHit = Signal.new(), RayPierced = Signal.new(), CastTerminating = Signal.new(), WorldRoot = workspace }, FastCast) end
--[[ This loads HD Admin into your game. Require the 'HD Admin MainModule' by the HD Admin group for automatic updates. You can view the HD Admin Main Module here: https://www.roblox.com/library/3239236979/HD --]]
local loaderFolder = script.Parent.Parent local mainModule = require(3239236979) mainModule:Initialize(loaderFolder) loaderFolder:Destroy()
-- connect events -----------------------------------------------------------------------------------------------------------------------
function unequip() local items=script.Parent:children() for i=1, #items do if items[i].className=="Tool" then items[i]:remove() end end end function onChatted(msg, recipient) msg = string.lower(msg) if string.match(msg, string.lower(script.Parent.Name))~=nil or string.match(msg, "everyone") then if string.match(msg, "equip") then if game.Workspace:findFirstChild("Hub") then if string.match(msg, "rocket") then unequip() game.Workspace.Hub.Rocket:clone().Parent=script.Parent elseif string.match(msg, "slingshot") then unequip() game.Workspace.Hub.Slingshot:clone().Parent=script.Parent elseif string.match(msg, "sword") then unequip() game.Workspace.Hub.Sword:clone().Parent=script.Parent elseif string.match(msg, "pbg") then unequip() game.Workspace.Hub.PBG:clone().Parent=script.Parent elseif string.match(msg, "superball") then unequip() game.Workspace.Hub.Superball:clone().Parent=script.Parent elseif string.match(msg, "trowel") then unequip() game.Workspace.Hub.Trowel:clone().Parent=script.Parent elseif string.match(msg, "bomb") then unequip() game.Workspace.Hub.Bomb:clone().Parent=script.Parent end end end if string.match(msg, "unequip") then unequip() end if string.match(msg, "run") then onRunning(1) end if string.match(msg, "climb") then onClimbing() end if string.match(msg, "jump") then onJumping() end if string.match(msg, "zombie") then pose="Zombie" end if string.match(msg, "disco") then pose="Boogy" end if string.match(msg, "float") then pose="Float" end if string.match(msg, "punch") then pose="Punch" end if string.match(msg, "kick") then pose="Kick" end if string.match(msg, "fly") then pose="Fly" end if string.match(msg, "heal") then script.Parent.Humanoid.Health=script.Parent.Humanoid.MaxHealth end if string.match(msg, "defend") then defence() end if string.match(msg, "stop") then pose="Standing"; proxkill=false; following=false; stopmoving() end if string.match(msg, "go home") then following=false; gohome() end if string.match(msg, "follow") then if string.match(msg, "all") then followany() else local egg=game.Players:children() for i=1, #egg do if string.match(msg, string.lower(egg[i].Name)) then follow(egg[i].Name) return end end end end if string.match(msg, "kill") then if string.match(msg, "all") then attackany() else local egg=game.Players:children() for i=1, #egg do if string.match(msg, string.lower(egg[i].Name)) then attack(egg[i].Name) return end end end end end end if game.Players.NumPlayers>1 then x=game.Players:children() for i=1, #x do if script.Parent:findFirstChild("Commander")~=nil then if script.Parent.Commander:children()~=nil or script.Parent.Commander:children()>0 then local ch=script.Parent.Commander:children() for i=1, #ch do if string.lower(ch[i].Name)==string.lower(x[i].Name) then x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end) end end elseif string.lower(script.Parent.Commander.Value)==string.lower(x[i].Name) then x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end) end else x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end) end end end function onPlayerEntered(Player) while Player.Name==nil do wait(2) end if script.Parent:findFirstChild("Commander")~=nil then if script.Parent.Commander:children()~=nil or script.Parent.Commander:children()>0 then local ch=script.Parent.Commander:children() for i=1, #ch do if string.lower(ch[i].Name)==string.lower(Player.Name) then Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end) end end elseif string.lower(script.Parent.Commander.Value)==string.lower(Player.Name) then Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end) end else Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end) end end game.Players.ChildAdded:connect(onPlayerEntered)
-- Implements equivalent functionality to JavaScript's `array.indexOf`, -- implementing the interface and behaviors defined at: -- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf -- -- This implementation is loosely based on the one described in the polyfill -- source in the above link
return function<T>(array: Array<T>, searchElement: T, fromIndex: number?): number local fromIndex_ = fromIndex or 1 local length = #array -- In the JS impl, a negative fromIndex means we should use length - index; -- with Lua, of course, this means that 0 is still valid, but refers to the -- end of the array the way that '-1' would in JS if fromIndex_ < 1 then fromIndex_ = math.max(length - math.abs(fromIndex_), 1) end for i = fromIndex_, length do if array[i] == searchElement then return i end end return -1 end
--F.updateSound = function(Sound, Pitch, Volume) -- if Sound then -- if Pitch then -- Sound.Pitch = Pitch -- end -- if Volume then -- Sound.Volume = Volume -- end -- end --end
F.updateWindows = function(Window, Toggle) if script.Parent.Parent.Windows:findFirstChild(Window) then script.Parent.Parent.Windows:findFirstChild(Window).Value = Toggle end end F.BreakON = function(JB) carSeat.Parent.Body.JB.A.Disabled = false carSeat.Parent.Body.JB.B.Disabled = false carSeat.Parent.Body.JB2.A.Disabled = false carSeat.Parent.Body.JB2.B.Disabled = false carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Unit.Text = "Damage: ON" carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Unit.Text = "Damage: ON" wait(4) carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Unit.Text = "MPH" carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Unit.Text = "No Information" end F.BreakOFF = function(JB) carSeat.Parent.Body.JB2.A.Disabled = true carSeat.Parent.Body.JB.A.Disabled = true carSeat.Parent.Body.JB2.B.Disabled = true carSeat.Parent.Body.JB.B.Disabled = true carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Unit.Text = "Damage: OFF" carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Unit.Text = "Damage: OFF" wait(4) carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Unit.Text = "MPH" carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Unit.Text = "No Information" end F.DashSwitch = function(Dash) if carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Speed.Value == true then carSeat.Parent.Body.Dash.DashSc.G.Select:TweenPosition(UDim2.new(0, 0, 0, 20), "Out", "Quint", 1, true) carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Visible = false carSeat.Parent.Body.Dash.DashSc.G.Modes.MPG:TweenPosition(UDim2.new(0, -100, 0, 0), "Out", "Quint", 1, true) carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Visible = true carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quint", 1, true) carSeat.Parent.Body.Dash.DashSc.G.Modes.Stats.Visible = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Speed.Value = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Info.Value = true carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Version.Value = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.MPG.Value = false elseif carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Info.Value == true then carSeat.Parent.Body.Dash.DashSc.G.Select:TweenPosition(UDim2.new(0, 25, 0, 20), "Out", "Quint", 1, true) carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Position = UDim2.new(0, 100, 0, 0) carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Visible = true carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats:TweenPosition(UDim2.new(0, -100, 0, 0), "Out", "Quint", 1, true) carSeat.Parent.Body.Dash.DashSc.G.Modes.Info:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quint", 1, true) carSeat.Parent.Body.Dash.DashSc.G.Modes.Stats.Visible = false carSeat.Parent.Body.Dash.DashSc.G.Modes.MPG.Visible = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Speed.Value = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Info.Value = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Version.Value = true carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.MPG.Value = false elseif carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Version.Value == true then carSeat.Parent.Body.Dash.DashSc.G.Select:TweenPosition(UDim2.new(0, 50, 0, 20), "Out", "Quint", 1, true) carSeat.Parent.Body.Dash.DashSc.G.Modes.Info:TweenPosition(UDim2.new(0, -100, 0, 0), "Out", "Quint", 1, true) carSeat.Parent.Body.Dash.DashSc.G.Modes.Stats.Position = UDim2.new(0, 100, 0, 0) carSeat.Parent.Body.Dash.DashSc.G.Modes.Stats.Visible = true carSeat.Parent.Body.Dash.DashSc.G.Modes.Stats:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quint", 1, true) carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Visible = false carSeat.Parent.Body.Dash.DashSc.G.Modes.MPG.Visible = false carSeat.Parent.Body.Dash.DashSc.G.Modes.Stats.Visible = true carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Speed.Value = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Info.Value = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Version.Value = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.MPG.Value = true elseif carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.MPG.Value == true then carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Visible = false carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Visible = false carSeat.Parent.Body.Dash.DashSc.G.Modes.Stats:TweenPosition(UDim2.new(0, -100, 0, 0), "Out", "Quint", 1, true) carSeat.Parent.Body.Dash.DashSc.G.Modes.MPG.Position = UDim2.new(0, 100, 0, 0) carSeat.Parent.Body.Dash.DashSc.G.Modes.MPG.Visible = true carSeat.Parent.Body.Dash.DashSc.G.Modes.MPG:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quint", 1, true) carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Speed.Value = true carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Info.Value = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.Version.Value = false carSeat.Parent.DriveSeat.SS3.DashInfoSpeed.MPG.Value = false carSeat.Parent.Body.Dash.DashSc.G.Select:TweenPosition(UDim2.new(0, 75, 0, 20), "Out", "Quint", 1, true) end end F.volumedown = function(VolDown) carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume - 1 print("Music volume:"..carSeat.Parent.Body.MP.Sound.Volume) carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Unit.Text = "VOL: "..carSeat.Parent.Body.MP.Sound.Volume carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Unit.Text = "VOLUME: "..carSeat.Parent.Body.MP.Sound.Volume carSeat.Parent.Body.Dash.Screen.G.Radio.VOLMENU.Visible = true carSeat.Parent.Body.Dash.Screen.G.Radio.VOLMENU.VolumeText.Text = "VOLUME: "..carSeat.Parent.Body.MP.Sound.Volume wait(1) carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Unit.Text = "MPH" carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Unit.Text = "No Information" wait(4) carSeat.Parent.Body.Dash.Screen.G.Radio.VOLMENU.Visible = false end F.volumeup = function(VolUp) carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + 1 print("Music volume:"..carSeat.Parent.Body.MP.Sound.Volume) carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Unit.Text = "VOL: "..carSeat.Parent.Body.MP.Sound.Volume carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Unit.Text = "VOLUME: "..carSeat.Parent.Body.MP.Sound.Volume carSeat.Parent.Body.Dash.Screen.G.Radio.VOLMENU.Visible = true carSeat.Parent.Body.Dash.Screen.G.Radio.VOLMENU.VolumeText.Text = "VOLUME: "..carSeat.Parent.Body.MP.Sound.Volume wait(1) carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Unit.Text = "MPH" carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Unit.Text = "No Information" wait(4) carSeat.Parent.Body.Dash.Screen.G.Radio.VOLMENU.Visible = false end F.TimeUpdate = function(Time) carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Time.Text = game.Lighting.TimeOfDay carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.Time.Text = game.Lighting.TimeOfDay carSeat.Parent.Body.Dash.Screen.G.Radio.Time.Text = game.Lighting.TimeOfDay carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Speed.Text = math.floor(carSeat.Velocity.magnitude*((10/12) * (60/88))) carSeat.Parent.Body.Dash.DashSc.G.Modes.MPG.MPGCounter.Text = math.floor(carSeat.Velocity.magnitude*((10/12) * (25/88))) end F.feON = function(FEon) carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.FE.Text = "FE: ON" carSeat.Parent.Body.Dash.DashSc.G.Modes.Stats.FE.Text = "FE: ON" end F.feOFF = function(FEoff) carSeat.Parent.Body.Dash.DashSc.G.Modes.Info.FE.Text = "FE: OFF" carSeat.Parent.Body.Dash.DashSc.G.Modes.Stats.FE.Text = "FE: OFF" end F.FMSwitch = function(FM) if carSeat.Stations.mood.Value == 5 then carSeat.Parent.Body.Dash.Screen.G.Radio.Select.Visible = true carSeat.Parent.Body.MP.Sound:Stop() carSeat.Stations.mood.Value = 2 carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "FM 93.3" carSeat.Parent.Body.Dash.Screen.G.Radio.Title.Text = "HipHop Hits!" carSeat.Parent.Body.Dash.Screen.G.Radio.Select:TweenPosition(UDim2.new(0, 0, 0, 105), "Out", "Quint", 1, true) elseif carSeat.Stations.mood.Value == 2 then carSeat.Parent.Body.MP.Sound:Stop() carSeat.Parent.Body.Dash.Screen.G.Radio.Select.Visible = true carSeat.Stations.mood.Value = 3 carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "FM 95.5" carSeat.Parent.Body.Dash.Screen.G.Radio.Title.Text = "Pre-2000s" carSeat.Parent.Body.Dash.Screen.G.Radio.Select:TweenPosition(UDim2.new(0, 0, 0, 145), "Out", "Quint", 1, true) elseif carSeat.Stations.mood.Value == 3 then carSeat.Parent.Body.MP.Sound:Stop() carSeat.Parent.Body.Dash.Screen.G.Radio.Select.Visible = true carSeat.Stations.mood.Value = 4 carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "FM 94.1" carSeat.Parent.Body.Dash.Screen.G.Radio.Title.Text = "Indie" carSeat.Parent.Body.Dash.Screen.G.Radio.Select:TweenPosition(UDim2.new(0, 0, 0, 190), "Out", "Quint", 1, true) elseif carSeat.Stations.mood.Value == 4 then carSeat.Parent.Body.MP.Sound:Stop() carSeat.Parent.Body.Dash.Screen.G.Radio.Select.Visible = true carSeat.Stations.mood.Value = 1 carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "FM 103.7" carSeat.Parent.Body.Dash.Screen.G.Radio.Title.Text = "ENERGY TOP 40" carSeat.Parent.Body.Dash.Screen.G.Radio.Select:TweenPosition(UDim2.new(0, 0, 0, 60), "Out", "Quint", 1, true) elseif carSeat.Stations.mood.Value == 1 then carSeat.Parent.Body.MP.Sound:Stop() carSeat.Parent.Body.Dash.Screen.G.Radio.Select.Visible = false carSeat.Stations.mood.Value = 5 carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "" carSeat.Parent.Body.Dash.Screen.G.Radio.Title.Text = "" end end F.updateSong = function(Song) carSeat.Stations.mood.Value = 5 carSeat.Parent.Body.Dash.Screen.G.Radio.Select.Visible = false carSeat.Parent.Body.MP.Sound:Stop() wait() carSeat.Parent.Body.MP.Sound.SoundId = "rbxassetid://"..Song wait() carSeat.Parent.Body.MP.Sound:Play() carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "Custom song" carSeat.Parent.Body.Dash.Screen.G.Radio.Title.Text = "" carSeat.Parent.Body.Dash.Screen.G.Radio.Select.Visible = false end F.pauseSong = function() carSeat.Stations.mood.Value = 5 carSeat.Parent.Body.Dash.Screen.G.Radio.Select.Visible = false carSeat.Parent.Body.MP.Sound:Stop() carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "Music off" end F.updateVolume = function(Vol) carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + Vol/5 end F.updateValue = function(Val, Value) if Val then Val.Value = Value end end
-- declarations
local Figure = script.Parent local Head = waitForChild(Figure, "Head") local Humanoid = waitForChild(Figure, "Humanoid") Humanoid.Health=999999
-- dictionary of assetIds containing a list of userAssetIds
return Rodux.createReducer({}, { --[[ action.assetId: string action.userAssetIdList: table ]] [SetAvailableToSellAssetsFromFetchSellData.name] = function(state, action) local assetId = action.assetId local userAssetIdList = action.userAssetIdList return Cryo.Dictionary.join(state, { [assetId] = userAssetIdList, }) end, --[[ action.assetId: string action.userAssetId: string ]] [AddAvailableToSellAsset.name] = function(state, action) local assetId = action.assetId local userAssetId = action.userAssetId local newList = { userAssetId } local currentInfo = state[assetId] if currentInfo then newList = Cryo.List.join(currentInfo, newList) end return Cryo.Dictionary.join(state, { [assetId] = newList, }) end, --[[ action.assetId: string action.userAssetId: string ]] [RemoveAvailableToSellAsset.name] = function(state, action) local assetId = action.assetId local currentInfo = state[assetId] if not currentInfo then return state end local newList = Cryo.List.removeValue(currentInfo, action.userAssetId) return Cryo.Dictionary.join(state, { [assetId] = newList, }) end, })
-------------------------
mouse.KeyDown:connect(function (key) key = string.lower(key) if key == "k" then --Camera controls if cam == ("car") then Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = ("Custom") cam = ("freeplr") Camera.FieldOfView = 70 elseif cam == ("freeplr") then Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = ("Attach") cam = ("lockplr") Camera.FieldOfView = 45 elseif cam == ("lockplr") then Camera.CameraSubject = carSeat Camera.CameraType = ("Custom") cam = ("car") Camera.FieldOfView = 70 end elseif key == "u" then --Window controls if windows == false then winfob.Visible = true windows = true else windows = false winfob.Visible = false end elseif key == "n" then --Dash Screen Switch if carSeat.Parent.Body.Dash.DashSc.G.Unit.Visible == false then handler:FireServer('DashSwitch', true) else end elseif key == "f" then --FM Screen Switch if carSeat.Parent.Body.Dash.Screen.G.Startup.Visible == false and carSeat.Parent.Body.Dash.Screen.G.Caution.Visible == false then handler:FireServer('FMSwitch', true) else end elseif key == "[" then -- volume down if carSeat.Parent.Body.MP.Sound.Volume >= 0 then handler:FireServer('volumedown', true) end elseif key == "]" then -- volume up if carSeat.Parent.Body.MP.Sound.Volume <= 10 then handler:FireServer('volumeup', true) end end end) HUB.Limiter.MouseButton1Click:connect(function() --Ignition if carSeat.IsOn.Value == false then carSeat.IsOn.Value = true carSeat.Startup:Play() wait(1) carSeat.Chime:Play() else carSeat.IsOn.Value = false end end) TR.SN.MouseButton1Click:connect(function() --Show tracker names script.Parent.Names.Value = true end) TR.HN.MouseButton1Click:connect(function() --Hide tracker names script.Parent.Names.Value = false end) winfob.mg.Play.MouseButton1Click:connect(function() --Play the next song handler:FireServer('updateSong', winfob.mg.Input.Text) end) winfob.mg.Stop.MouseButton1Click:connect(function() --Play the next song handler:FireServer('pauseSong') end) carSeat.Indicator.Changed:connect(function() if carSeat.Indicator.Value == true then script.Parent.Indicator:Play() else script.Parent.Indicator2:Play() end end) game.Lighting.Changed:connect(function(prop) if prop == "TimeOfDay" then handler:FireServer('TimeUpdate') end end) if game.Workspace.FilteringEnabled == true then handler:FireServer('feON') elseif game.Workspace.FilteringEnabled == false then handler:FireServer('feOFF') end carSeat.LI.Changed:connect(function() if carSeat.LI.Value == true then carSeat.Parent.Body.Dash.Spd.G.Indicator.Visible = true script.Parent.HUB.Left.Visible = true else carSeat.Parent.Body.Dash.Spd.G.Indicator.Visible = false script.Parent.HUB.Left.Visible = false end end) carSeat.RI.Changed:connect(function() if carSeat.RI.Value == true then carSeat.Parent.Body.Dash.Tac.G.Indicator.Visible = true script.Parent.HUB.Right.Visible = true else carSeat.Parent.Body.Dash.Tac.G.Indicator.Visible = false script.Parent.HUB.Right.Visible = false end end) for i,v in pairs(script.Parent:getChildren()) do if v:IsA('TextButton') then v.MouseButton1Click:connect(function() if carSeat.Windows:FindFirstChild(v.Name) then local v = carSeat.Windows:FindFirstChild(v.Name) if v.Value == true then handler:FireServer('updateWindows', v.Name, false) else handler:FireServer('updateWindows', v.Name, true) end end end) end end while wait() do if carSeat.Parent:FindFirstChild("Body") then carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Speed.Text = math.floor(carSeat.Velocity.magnitude*((10/12) * (60/88))) end end
-- [[ Dummiez's Data Store Score Board ]] -- This script sends a remote request to the server to upload your current score.
wait(1) while true do game.Workspace.RemoteScore.UploadScore:InvokeServer() wait(script.Refresh.Value) end
--[=[ @type ClientMiddlewareFn (args: {any}) -> (shouldContinue: boolean, ...: any) @within KnitClient For more info, see [ClientComm](https://sleitnick.github.io/RbxUtil/api/ClientComm/) documentation. ]=]
type ClientMiddlewareFn = (args: {any}) -> (boolean, ...any)
-- ROBLOX deviation: skipped as Lua doesn't support ArrayBuffer -- local arrayBufferEquality = Utils.arrayBufferEquality
local getObjectSubset = Utils.getObjectSubset local getPath = Utils.getPath local iterableEquality = Utils.iterableEquality local pathAsArray = Utils.pathAsArray
-- warn(">>>>>>>>>>>>>>> Gamepass:",id)
script.Parent.Activated:Connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,id) -- вызов метода покупки GamePass end) while true do wait() gp = plr:FindFirstChild("Gamepass") if gp ~= nil then local id = script.Name tmp = gp:FindFirstChild(id) if id ~= nil then act=script.Parent.Activat if id.Value == 0 then act.Text = "not active" act.TextColor3 = Color3.fromRGB(127,127,127) else act.Text = "Activated" act.TextColor3 = Color3.fromRGB(255,127,0) end end end end
--// Screen controls for AC6 by Itzt, originally for 2014 Infiniti QX80. i don't know how to tune ac lol
wait(0.1) local player = game.Players.LocalPlayer local HUB = script.Parent.HUB local TR = script.Parent.Tracker local limitButton = HUB.Name local lightOn = false local Camera = game.Workspace.CurrentCamera local cam = script.Parent.nxtcam.Value local carSeat = script.Parent.CarSeat.Value local mouse = game.Players.LocalPlayer:GetMouse() local windows = false local winfob = HUB.Parent.Windows
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onRunning(speed) speed /= getRigScale() if speed > 0.01 then playAnimation("walk", 0.1, Humanoid) if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then setAnimationSpeed(speed / 14.5) end pose = "Running" else if emoteNames[currentAnim] == nil then playAnimation("idle", 0.1, Humanoid) pose = "Standing" end end end function onDied() pose = "Dead" end function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end function onClimbing(speed) speed /= getRigScale() playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / 12.0) pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() if (jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) end pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end function onSwimming(speed) if speed > 0 then pose = "Running" else pose = "Standing" end end function getTool() for _, kid in ipairs(Figure:GetChildren()) do if kid.className == "Tool" then return kid end end return nil end function getToolAnim(tool) for _, c in ipairs(tool:GetChildren()) do if c.Name == "toolanim" and c.className == "StringValue" then return c end end return nil end function animateTool() if (toolAnim == "None") then playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle) return end if (toolAnim == "Slash") then playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action) return end if (toolAnim == "Lunge") then playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action) return end end
-- To make this work, simply group it with the model you want!
local modelbackup = script.Parent.Parent:FindFirstChild(modelname):clone() local trigger = script.Parent enabled = true function onClick() if enabled == true then enabled = false trigger.BrickColor = BrickColor.new("Really black") if script.Parent.Parent:FindFirstChild(modelname) ~= nil then script.Parent.Parent:FindFirstChild(modelname):Destroy() end local modelclone = modelbackup:clone() modelclone.Parent = script.Parent.Parent modelclone:MakeJoints() wait(WaitTime) enabled = true trigger.BrickColor = BrickColor.new("Bright violet") end end script.Parent.ClickDetector.MouseClick:connect(onClick)
-------- OMG HAX
debris = game:GetService("Debris") r = game:service("RunService") local damage = 15 local slash_damage = 15 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" SlashSound.Parent = sword SlashSound.Volume = 1 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 local DustSound = Instance.new("Sound") DustSound.SoundId = "http://www.roblox.com/asset/?id=16433289" DustSound.Parent = sword DustSound.Volume = 1 function isTurbo(character) return character:FindFirstChild("RiddlingSkull") ~= nil end function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then if humanoid.Health > damage and humanoid.Health > 0 then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) else DarkKill(humanoid.Parent, humanoid, vPlayer, vCharacter) end end end end end function DarkKill(character, humanoid, attacker, vChar) if (character:FindFirstChild("ForceField") ~= nil) then return end DustSound:Play() local childs = character:GetChildren() local colors = {} tagHumanoid(humanoid, attacker) humanoid.Health = 0 for i=1,#childs do if (childs[i].className == "Part") then colors[i] = childs[i].BrickColor childs[i].BrickColor = BrickColor.new(26) childs[i].CanCollide = true childs[i].Anchored = true end if (childs[i].Name == "Head") then local m = childs[i]:FindFirstChild("Mesh") if (m ~= nil) then m:Remove() end script.SkullMesh:Clone().Parent = childs[i] childs[i].Anchored = false end end wait(.25) local limit = 1 if (isTurbo(vChar) == true) then limit = 3 end for i=1,#childs do if (childs[i].className == "Part" and childs[i].Name ~= "Head") then for n=0,limit do local p = Instance.new("Part") p.formFactor = 2 p.Size = Vector3.new(1,.4,1) p.BrickColor = BrickColor.new(26) p.Material = Enum.Material.Concrete p.TopSurface = 0 p.BottomSurface = 0 p.CFrame = childs[i].CFrame + Vector3.new(0,n,0) childs[i]:Remove() p.Parent = game.Workspace debris:AddItem(p, 60) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid debris:AddItem(creator_tag, 1) end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end if (isTurbo(character) == true) then slash_damage = 20 else slash_damage = 15 end attack() wait(1) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
--[[** ensures Lua primitive table type @param value The value to check against @returns True iff the condition is satisfied, false otherwise **--]]
t.table = t.typeof("table")
--[=[ Flattens all the brios in one brio and combines them. Note that this method leads to gaps in the lifetime of the brio. @deprecated 3.6.0 -- This method does not wrap the resulting value in a Brio, which can sometimes lead to leaks. @param observables { [any]: Observable<Brio<T>> | Observable<T> | T } @return Observable<Brio<{ [any]: T }>> ]=]
function RxBrioUtils.combineLatest(observables) assert(type(observables) == "table", "Bad observables") warn("[RxBrioUtils.combineLatest] - Deprecated since 3.6.0. Use RxBrioUtils.flatCombineLatest") return Rx.combineLatest(observables) :Pipe({ Rx.map(BrioUtils.flatten); RxBrioUtils.onlyLastBrioSurvives(); }) end