Universal Script 📌
2.2k Views
87.0k Executions

Shiftlock for mobile

10K executions
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

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

Updates

  1. Script edited: Update script

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
disastergamingagj10 months ago

Add like a x button to remove it

1
RobinsonF's profile picture
RobinsonF10 months ago

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

1
bruwo's profile picture
bruwoUploader10 months ago

@RobinsonF Just updated it!

2
RobinsonF's profile picture
RobinsonF10 months ago

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

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