
1.1k Views
142 Executions
Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Shift lock
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local SHIFT_KEY = Enum.KeyCode.LeftShift
local OFFSET = Vector3.new(1.75, 0, 0)
local enabled = false
local humanoid
local function getHumanoid()
local char = player.Character or player.CharacterAdded:Wait()
humanoid = char:WaitForChild("Humanoid")
end
getHumanoid()
player.CharacterAdded:Connect(getHumanoid)
local function enableShiftLock()
enabled = true
UIS.MouseBehavior = Enum.MouseBehavior.LockCenter
humanoid.AutoRotate = false
humanoid.CameraOffset = OFFSET
end
local function disableShiftLock()
enabled = false
UIS.MouseBehavior = Enum.MouseBehavior.Default
humanoid.AutoRotate = true
humanoid.CameraOffset = Vector3.zero
end
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.KeyCode == SHIFT_KEY then
if enabled then
disableShiftLock()
else
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!








