narla

Roblox Mobile Shiftlock

Jun 11th, 2024 (edited)
884
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 KB | None | 0 0
  1. if GrimExLoaded then
  2. return game.Players.LocalPlayer:Kick("hello")
  3. end
  4.  
  5. local shiftlockk = Instance.new("ScreenGui")
  6. local LockButton = Instance.new("ImageButton")
  7. local btnIcon = Instance.new("ImageLabel")
  8. --local susDrag = Instance.new("Frame")
  9.  
  10. shiftlockk.Name = "shiftlockk"
  11. shiftlockk.Parent = game.CoreGui
  12. shiftlockk.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  13. shiftlockk.ResetOnSpawn = false
  14.  
  15. LockButton.Name = "LockButton"
  16. LockButton.Parent = shiftlockk
  17. LockButton.AnchorPoint = Vector2.new(0.5, 0.5)
  18. LockButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  19. LockButton.BackgroundTransparency = 1.000
  20. LockButton.BorderColor3 = Color3.fromRGB(27, 42, 53)
  21. LockButton.Position = UDim2.new(0.785148501, 0, 0.865914762, 0)
  22. LockButton.Size = UDim2.new(0, 60, 0, 60)
  23. LockButton.ZIndex = 3
  24. LockButton.Image = "rbxassetid://530406505"
  25. LockButton.ImageColor3 = Color3.fromRGB(0, 133, 199)
  26. LockButton.ImageRectOffset = Vector2.new(2, 2)
  27. LockButton.ImageRectSize = Vector2.new(98, 98)
  28. LockButton.ImageTransparency = 0.400
  29. LockButton.ScaleType = Enum.ScaleType.Fit
  30.  
  31. btnIcon.Name = "btnIcon"
  32. btnIcon.Parent = LockButton
  33. btnIcon.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  34. btnIcon.BackgroundTransparency = 1.000
  35. btnIcon.Position = UDim2.new(0.100000001, 0, 0.100000001, 0)
  36. btnIcon.Size = UDim2.new(0.800000012, 0, 0.800000012, 0)
  37. btnIcon.ZIndex = 3
  38. btnIcon.Image = "rbxasset://textures/ui/mouseLock_off.png"
  39. btnIcon.ImageColor3 = Color3.fromRGB(0, 0, 0)
  40. btnIcon.ScaleType = Enum.ScaleType.Fit
  41. btnIcon.SliceCenter = Rect.new(-160, 0, 100, 0)
  42.  
  43. --[[susDrag.Name = "susDrag"
  44. susDrag.Parent = LockButton
  45. susDrag.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  46. susDrag.BorderColor3 = Color3.fromRGB(0, 0, 0)
  47. susDrag.BorderSizePixel = 0
  48. susDrag.Position = UDim2.new(0.899999976, 0, -0.233333334, 0)
  49. susDrag.Size = UDim2.new(0, 20, 0, 20)]]
  50.  
  51. DragThingy = function(ui, dragui)
  52. if not dragui then dragui = ui end
  53. local UserInputService = game:GetService("UserInputService")
  54.  
  55. local dragging
  56. local dragInput
  57. local dragStart
  58. local startPos
  59.  
  60. local function update(input)
  61. local delta = input.Position - dragStart
  62. ui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  63. end
  64.  
  65. dragui.InputBegan:Connect(function(input)
  66. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  67. dragging = true
  68. dragStart = input.Position
  69. startPos = ui.Position
  70.  
  71. input.Changed:Connect(function()
  72. if input.UserInputState == Enum.UserInputState.End then
  73. dragging = false
  74. end
  75. end)
  76. end
  77. end)
  78.  
  79. dragui.InputChanged:Connect(function(input)
  80. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  81. dragInput = input
  82. end
  83. end)
  84.  
  85. UserInputService.InputChanged:Connect(function(input)
  86. if input == dragInput and dragging then
  87. update(input)
  88. end
  89. end)
  90. end
  91.  
  92. DragThingy(LockButton)
  93.  
  94. local function YDYMLAX_fake_script()
  95. local script = Instance.new('LocalScript', LockButton)
  96.  
  97. local Input = game:GetService("UserInputService")
  98. local V = false
  99.  
  100. local main = script.Parent
  101.  
  102. main.MouseButton1Click:Connect(function()
  103. V = not V
  104. main.btnIcon.ImageColor3 = V and Color3.fromRGB(0, 170, 255) or Color3.fromRGB(0, 0, 0)
  105. if V then
  106. ForceShiftLock()
  107. else
  108. EndForceShiftLock()
  109. end
  110. end)
  111.  
  112. local g = nil
  113. local GameSettings = UserSettings():GetService("UserGameSettings")
  114. local J = nil
  115.  
  116. function ForceShiftLock()
  117. local i, k = pcall(function()
  118. return GameSettings.RotationType
  119. end)
  120. _ = i
  121. g = k
  122. J = game:GetService("RunService").RenderStepped:Connect(function()
  123. pcall(function()
  124. GameSettings.RotationType = Enum.RotationType.CameraRelative
  125. end)
  126. end)
  127. end
  128.  
  129. function EndForceShiftLock()
  130. if J then
  131. pcall(function()
  132. GameSettings.RotationType = g or Enum.RotationType.MovementRelative
  133. end)
  134. J:Disconnect()
  135. end
  136. end
  137. end
  138. coroutine.wrap(YDYMLAX_fake_script)()
  139.  
  140. game:GetService("StarterGui"):SetCore("SendNotification",{["Title"] = "Subscribe to",["Text"] = "@Narlascripts on youtube..",["Duration"] = 5,["Button1"] = "Okay."})
Advertisement
Add Comment
Please, Sign In to add comment