Pastefi mark
1
/a0b67610
This was a one-time paste. The content is shown now, but the record has already been removed from the database.
Paste view
PHP PUBLIC 2 views ONE-TIME
a0b67610
2026-01-08 13:48:38
loadinglocal Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local on = false

UIS.InputBegan:Connect(function(input, gpe)
	if gpe then return end
	if input.KeyCode == Enum.KeyCode.LeftShift then
		on = not on
	end
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)