
1.4k Views
29.5k Executions
Shiftlock script
10K executions
Universal Script π
boinowee10K executions
10 months 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
It's literally a shiftlock script there's nothing to it
-- for PC it's left shift and for console it's buttonR3 which is just your joystick but you press on it
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local GuiService = game:GetService("GuiService")
local UserGameSettings = UserSettings():GetService("UserGameSettings")
local Player = Players.LocalPlayer
local Camera = workspace.CurrentCamera
-- Constants for Native Look
local SHIFT_LOCK_OFF_IMAGE = "rbxasset://textures/ui/mouseLock_off@2x.png"
local SHIFT_LOCK_ON_IMAGE = "rbxasset://textures/ui/mouseLock_on@2x.png"
local SHIFT_LOCK_CURSOR = "rbxasset://textures/MouseLockedCursor.png"
-- Configuration
local TOGGLE_KEY_PC = Enum.KeyCode.LeftShift
local TOGGLE_BUTTON_CONSOLE = Enum.KeyCode.ButtonR3 -- Right Stick Click
local CAMERA_OFFSET = Vector3.new(1.75, 0, 0) -- The standard Roblox offset
-- State
local isShiftLocked = false
local isMobile = UserInputService.TouchEnabled and not UserInputService.MouseEnabled
-- UI Variables (Mobile Only)
local shiftLockGui, shiftLockButton
--------------------------------------------------------------------------------
-- CORE FUNCTIONS
--------------------------------------------------------------------------------
local function setShiftLockState(active)
isShiftLocked = active
local character = Player.Character
local humanoid = character and character:FindFirstChild("Humanoid")
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!







