Shiftlock for PC
Key RequiredUniversal

Shiftlock for PC

Universal Scriptbruwobruwo 3.2K views 1.4K executesUpdated Jan 27, 2026
Unrated
00
Lua Script•61 lines (2146 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local GuiService = game:GetService("GuiService")

local Player = Players.LocalPlayer
local Camera = workspace.CurrentCamera

local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "CustomShiftlockGUI"
ScreenGui.ResetOnSpawn = false

if pcall(function() ScreenGui.Parent = game:GetService("CoreGui") end) then
else
    ScreenGui.Parent = Player:WaitForChild("PlayerGui")
end

local Crosshair = Instance.new("ImageLabel")
Crosshair.Name = "ShiftlockCursor"
Crosshair.Parent = ScreenGui
Crosshair.BackgroundTransparency = 1
Crosshair.Position = UDim2.new(0.5, 0, 0.5, 0)
Crosshair.AnchorPoint = Vector2.new(0.5, 0.5)
Crosshair.Size = UDim2.new(0, 32, 0, 32)
Crosshair.Image = "rbxasset://textures/MouseLockedCursor.png" 
Crosshair.Visible = false

local shiftLockEnabled = false

UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if not gameProcessed and input.KeyCode == Enum.KeyCode.LeftShift then
        shiftLockEnabled = not shiftLockEnabled
        
        if shiftLockEnabled then
            Crosshair.Visible = true
            UserInputService.MouseIconEnabled = false
            UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
        else
            Crosshair.Visible = false
            UserInputService.MouseIconEnabled = true
            UserInputService.MouseBehavior = Enum.MouseBehavior.Default
        end
    end
end)

RunService.RenderStepped:Connect(function()
    if shiftLockEnabled then
        UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
        UserInputService.MouseIconEnabled = false

        if Player.Character and Player.Character:FindFirstChild("HumanoidRootPart") then
            local rootPart = Player.Character.HumanoidRootPart
            local lookVector = Camera.CFrame.LookVector
            
            rootPart.CFrame = CFrame.new(
                rootPart.Position, 
                rootPart.Position + Vector3.new(lookVector.X, 0, lookVector.Z)
            )
        end
    end
end)

Features & Information

press shift works on pc
#shiftlock#shift lock#shift

Community Comments (2)

roadblockscherriesroadblockscherriesJan 27, 2026

wow bro you changed my life wowowow thanks now i am harkinininan with fe bipods thanks

hjamesmoz247hjamesmoz247Jul 18, 2026

thanks

More Scripts for Universal Scripts