Advertisement
JoeBidenOfficial

Fake lag script

Oct 14th, 2024
4,917
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.72 KB | None | 0 0
  1. local enabled = false
  2. local interval = 0.07 -- Interval set to 0.07 seconds (70 milliseconds)
  3. local minInterval = 0.07 -- Minimum interval set to 0.07 seconds (70 milliseconds)
  4. local maxInterval = 0.07 -- Maximum interval set to 0.07 seconds (70 milliseconds)
  5. local anchoredDuration = 0.4 -- Duration for which player is anchored in seconds (0.40 seconds)
  6.  
  7. local guiMinimized = false
  8. local guiPosition = UDim2.new(0.5, -100, 0.5, -65) -- Initial position
  9. local minimizedPosition = UDim2.new(0.95, -200, 0.95, -35) -- Minimized position
  10. local minimizedSize = UDim2.new(0, 200, 0, 30) -- Minimized size
  11.  
  12. -- Function to toggle anchoring with delay to simulate high ping
  13. local function toggleAnchoring()
  14. local character = game.Players.LocalPlayer.Character
  15. if character then
  16. local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
  17. if humanoidRootPart then
  18. humanoidRootPart.Anchored = true -- Anchor the character
  19. wait(anchoredDuration) -- Wait for anchoredDuration seconds
  20. humanoidRootPart.Anchored = false -- Unanchor the character
  21. end
  22. end
  23. end
  24.  
  25. -- Create GUI for enabling/disabling
  26. local gui = Instance.new("ScreenGui")
  27. gui.IgnoreGuiInset = true -- Ensures GUI works correctly on mobile
  28.  
  29. -- For compatibility with executors, parent the GUI to the game's "CoreGui" service
  30. local coreGuiService = game:GetService("CoreGui")
  31. local frame = Instance.new("Frame")
  32. frame.Size = UDim2.new(0, 200, 0, 130)
  33. frame.Position = guiPosition
  34. frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  35. frame.BorderSizePixel = 2
  36. frame.BorderColor3 = Color3.fromRGB(100, 100, 100)
  37. frame.Active = true -- Necessary for mobile drag support
  38. frame.Parent = gui
  39. gui.Parent = coreGuiService
  40.  
  41. local title = Instance.new("TextLabel")
  42. title.Size = UDim2.new(1, -40, 0, 30)
  43. title.Position = UDim2.new(0, 40, 0, 0)
  44. title.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  45. title.TextColor3 = Color3.new(1, 1, 1)
  46. title.Font = Enum.Font.SourceSansBold
  47. title.TextSize = 18
  48. title.Text = "Fake Lag Gui"
  49. title.Parent = frame
  50.  
  51. local minimizeButton = Instance.new("TextButton")
  52. minimizeButton.Size = UDim2.new(0, 35, 0, 30)
  53. minimizeButton.Position = UDim2.new(0, 5, 0, 0)
  54. minimizeButton.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  55. minimizeButton.TextColor3 = Color3.new(1, 1, 1)
  56. minimizeButton.Text = "-"
  57. minimizeButton.Parent = frame
  58.  
  59. local closeButton = Instance.new("TextButton")
  60. closeButton.Size = UDim2.new(0, 35, 0, 30)
  61. closeButton.Position = UDim2.new(1, -35, 0, 0)
  62. closeButton.BackgroundColor3 = Color3.fromRGB(255, 70, 70)
  63. closeButton.TextColor3 = Color3.new(1, 1, 1)
  64. closeButton.Text = "X"
  65. closeButton.Parent = frame
  66.  
  67. local enableButton = Instance.new("TextButton")
  68. enableButton.Size = UDim2.new(0, 80, 0, 30)
  69. enableButton.Position = UDim2.new(0.5, -90, 0.5, 20)
  70. enableButton.BackgroundColor3 = Color3.fromRGB(70, 70, 255)
  71. enableButton.TextColor3 = Color3.new(1, 1, 1)
  72. enableButton.Text = "Enable"
  73. enableButton.Parent = frame
  74.  
  75. local disableButton = Instance.new("TextButton")
  76. disableButton.Size = UDim2.new(0, 80, 0, 30)
  77. disableButton.Position = UDim2.new(0.5, 10, 0.5, 20)
  78. disableButton.BackgroundColor3 = Color3.fromRGB(255, 70, 70)
  79. disableButton.TextColor3 = Color3.new(1, 1, 1)
  80. disableButton.Text = "Disable"
  81. disableButton.Parent = frame
  82.  
  83. -- Function to generate random interval between minInterval and maxInterval
  84. local function getRandomInterval()
  85. return math.random() * (maxInterval - minInterval) + minInterval
  86. end
  87.  
  88. -- Mobile support for draggable frame
  89. local inputService = game:GetService("UserInputService")
  90. local dragging
  91. local dragInput
  92. local dragStart
  93. local startPos
  94.  
  95. if inputService.TouchEnabled then
  96. frame.InputBegan:Connect(function(input)
  97. if input.UserInputType == Enum.UserInputType.Touch then
  98. dragging = true
  99. dragStart = input.Position
  100. startPos = frame.Position
  101. input.Changed:Connect(function()
  102. if input.UserInputState == Enum.UserInputState.End then
  103. dragging = false
  104. end
  105. end)
  106. end
  107. end)
  108.  
  109. frame.InputChanged:Connect(function(input)
  110. if input.UserInputType == Enum.UserInputType.Touch and dragging then
  111. dragInput = input
  112. local delta = dragInput.Position - dragStart
  113. frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  114. end
  115. end)
  116. end
  117.  
  118. -- Minimize button functionality
  119. local function toggleMinimize()
  120. if guiMinimized then
  121. -- Restore frame to original size and position
  122. guiMinimized = false
  123. frame:TweenSizeAndPosition(UDim2.new(0, 200, 0, 130), guiPosition, Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.5, true)
  124. minimizeButton.Text = "-"
  125. enableButton.Visible = true
  126. disableButton.Visible = true
  127. else
  128. -- Minimize frame
  129. guiMinimized = true
  130. frame:TweenSizeAndPosition(minimizedSize, minimizedPosition, Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 0.5, true)
  131. minimizeButton.Text = "+"
  132. enableButton.Visible = false
  133. disableButton.Visible = false
  134. end
  135. end
  136.  
  137. minimizeButton.MouseButton1Click:Connect(toggleMinimize)
  138.  
  139. -- Close button functionality
  140. closeButton.MouseButton1Click:Connect(function()
  141. gui:Destroy() -- Destroy the GUI when close button is clicked
  142. end)
  143.  
  144. enableButton.MouseButton1Click:Connect(function()
  145. enabled = true
  146. end)
  147.  
  148. disableButton.MouseButton1Click:Connect(function()
  149. enabled = false
  150. end)
  151.  
  152. -- Main loop to toggle anchoring with 0.07 second interval
  153. while true do
  154. if enabled then
  155. toggleAnchoring()
  156. end
  157. wait(interval)
  158. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement