Universal Script 📌
3.6k Views
1.8k Executions

Shiftlock for PC

Universal Script 📌
bruwo
bruwo10K executions
10 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

press shift works on pc

View Raw
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


Comments

2
Log in to join the conversation. Login
roadblockscherries's profile picture
roadblockscherries10 months ago

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

2
hjamesmoz247's profile picture
hjamesmoz2474 months ago

thanks

1

Tags

More universal scripts

See all
Script hub
16.0k
93.4k
Bumped 13 minutes ago
Key System

Script hub

Kronos New

Universal Script 📌
48.5k
46.6k
Bumped 3 hours ago
Universal Script 📌
1.5k
1.3k
Bumped 5 hours ago
Universal Script 📌
4.2k
56.5k
Bumped 6 hours ago
Universal Script 📌
7.1k
71.8k
Bumped 7 hours ago
Script hub
3.5M
1.2M
Bumped 8 hours ago
Key System