-- Remade by tibe0124 (No GUI Version)
-- Auto Shift Lock with LeftShift Toggle
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local ContextActionService = game:GetService("ContextActionService")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local RootPart = Character:WaitForChild("HumanoidRootPart")
local ActiveConnection
local MaxLength = 900000
local IsLocked = false
local function EnableShiftLock()
if not IsLocked then
Humanoid.AutoRotate = false
IsLocked = true
ActiveConnection = RunService.RenderStepped:Connect(function()
local lookVector = workspace.CurrentCamera.CFrame.LookVector
RootPart.CFrame = CFrame.new(RootPart.Position, Vector3.new(lookVector.X * MaxLength, RootPart.Position.Y, lookVector.Z * MaxLength))
end)
end
end
local function DisableShiftLock()
if IsLocked then
Humanoid.AutoRotate = true
IsLocked = false
if ActiveConnection then
ActiveConnection:Disconnect()
ActiveConnection = nil
end
end
end
local function ToggleShiftLock(actionName, inputState)
if inputState == Enum.UserInputState.Begin then
if IsLocked then
DisableShiftLock()
else
EnableShiftLock()
end
end
end
-- Auto-enable shiftlock when the script runs
EnableShiftLock()
-- Bind LeftShift to toggle it
ContextActionService:BindAction("ShiftLockToggle", ToggleShiftLock, false, Enum.KeyCode.LeftShift)
To embed this program on your website, copy the following code and paste it into your website's HTML: