
193.7k Views
300 Executions
Shift lock
Universal Script 📌
GrindingonthagameFirst script
3 years ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Its kinda buggy but it works :)
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Camera = game.Workspace.CurrentCamera
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local PlayerMouse = LocalPlayer:GetMouse()
local shiftLockEnabled = false
local lockOffset = Vector2.new(5, 0)
local cursorImage = "rbxasset://textures/MouseLockedCursor.png"
local originalMouseIcon
local originalCameraOffset
local characterAddedConn, characterRemovingConn
local function disconnectAllConnections()
if characterAddedConn then
characterAddedConn:Disconnect()
characterAddedConn = nil
end
if characterRemovingConn then
characterRemovingConn:Disconnect()
characterRemovingConn = nil
end
end
local function toggleShiftLock()
shiftLockEnabled = not shiftLockEnabled
if shiftLockEnabled then
UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
originalMouseIcon = PlayerMouse.Icon
PlayerMouse.Icon = cursorImage
else
UserInputService.MouseBehavior = Enum.MouseBehavior.Default
PlayerMouse.Icon = originalMouseIcon
end
end
local function updateCameraOffset()
if shiftLockEnabled then
local humanoid = LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
if humanoid then








Chat gpt?