Universal Script 📌
2.1k Views
75.0k Executions

Shiftlock for mobile

10K executions
Universal Script 📌
bruwo
bruwo10K executions
9 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

works even in games that don't have shiftlock pls tell me if you have any trouble using it

View Raw
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Player = Players.LocalPlayer
local Camera = workspace.CurrentCamera

local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "MobileShiftlockGUI"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = Player:WaitForChild("PlayerGui")

local ToggleButton = Instance.new("ImageButton")
ToggleButton.Name = "ShiftlockButton"
ToggleButton.Parent = ScreenGui
ToggleButton.BackgroundTransparency = 1
ToggleButton.Size = UDim2.new(0, 60, 0, 60)
ToggleButton.Position = UDim2.new(0.85, -30, 0.5, -30)
ToggleButton.Image = "rbxasset://textures/ui/mouseLock_off@2x.png"

local dragging
local dragInput
local dragStart
local startPos

local function update(input)
    local delta = input.Position - dragStart
    ToggleButton.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end

ToggleButton.InputBegan:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
        dragging = true
        dragStart = input.Position
        startPos = ToggleButton.Position
        
        input.Changed:Connect(function()
            if input.UserInputState == Enum.UserInputState.End then
                dragging = false
            end
        end)


Comments

4
Log in to join the conversation. Login
disastergamingagj's profile picture
disastergamingagj9 months ago

Add like a x button to remove it

1
RobinsonF's profile picture
RobinsonF9 months ago

You able to make it draggable?! Gets in the way cause of the size

1
bruwo's profile picture
bruwoUploader9 months ago

@RobinsonF Just updated it!

2
RobinsonF's profile picture
RobinsonF9 months ago

@bruwo shoot awesome!! thank you for you incredible work:)

1

Tags

More universal scripts

See all
Universal Script 📌
1.6k
6.1k
Bumped 28 minutes ago
Key System
Script hub
51
0
Approved 50 minutes ago
Paid

Script hub

anmultv hub

Universal Script 📌
26
4
Approved 56 minutes ago
Universal Script 📌
1.3k
856
Bumped 2 hours ago
Key System
Script hub
111.8k
160.0k
Bumped 2 hours ago
Key System
Universal Script 📌
74
5
Approved 3 hours ago
Universal Script 📌
132
35
Approved 4 hours ago
Universal Script 📌
170
116
Approved 4 hours ago