Loading local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local button = script.Parent
local on = false
button.MouseButton1Click:Connect(function()
on = not on
button.Text = on and "SHIFT ON" or "SHIFT"
end)
RunService.RenderStepped:Connect(function()
if on and player.Character then
local hrp = player.Character:FindFirstChild("HumanoidRootPart")
if hrp then
local look = camera.CFrame.LookVector
hrp.CFrame = CFrame.new(
hrp.Position,
hrp.Position + Vector3.new(look.X, 0, look.Z)
)
end
end
end)