Advertisement
Azzz_4565

Untitled

Jul 18th, 2025
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.37 KB | None | 0 0
  1. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  2. local UserInputService = game:GetService("UserInputService")
  3.  
  4. local ScreenGui = Instance.new("ScreenGui")
  5. ScreenGui.Name = "LagToggleGui"
  6. ScreenGui.ResetOnSpawn = false
  7. ScreenGui.Parent = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
  8.  
  9. local ToggleButton = Instance.new("TextButton")
  10. ToggleButton.Size = UDim2.new(0, 160, 0, 60)
  11. ToggleButton.Position = UDim2.new(0.5, -80, 0.5, -30)
  12. ToggleButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
  13. ToggleButton.Text = "🔴 Start Lag"
  14. ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  15. ToggleButton.Font = Enum.Font.SourceSansBold
  16. ToggleButton.TextSize = 22
  17. ToggleButton.Parent = ScreenGui
  18.  
  19. local DragDot = Instance.new("Frame")
  20. DragDot.Size = UDim2.new(0, 30, 0, 30)
  21. DragDot.Position = UDim2.new(0, 5, 0.5, -15)
  22. DragDot.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  23. DragDot.BorderSizePixel = 0
  24. DragDot.AnchorPoint = Vector2.new(0, 0)
  25. DragDot.Parent = ToggleButton
  26. DragDot.Active = true
  27.  
  28. local dragging, dragInput, dragStart, startPos
  29.  
  30. DragDot.InputBegan:Connect(function(input)
  31.     if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  32.         dragging = true
  33.         dragStart = input.Position
  34.         startPos = ToggleButton.Position
  35.  
  36.         input.Changed:Connect(function()
  37.             if input.UserInputState == Enum.UserInputState.End then
  38.                 dragging = false
  39.             end
  40.         end)
  41.     end
  42. end)
  43.  
  44. DragDot.InputChanged:Connect(function(input)
  45.     if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  46.         dragInput = input
  47.     end
  48. end)
  49.  
  50. UserInputService.InputChanged:Connect(function(input)
  51.     if input == dragInput and dragging then
  52.         local delta = input.Position - dragStart
  53.         ToggleButton.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  54.     end
  55. end)
  56.  
  57. local function causeLag()
  58.     for i = -1, 1200 do
  59.         ReplicatedStorage:WaitForChild("Guide"):FireServer()
  60.     end
  61.     for i = -1, 1200 do
  62.         ReplicatedStorage:WaitForChild("Guide"):FireServer()
  63.     end
  64. end
  65.  
  66. local isLagging = false
  67.  
  68. ToggleButton.MouseButton1Click:Connect(function()
  69.     if not isLagging then
  70.         isLagging = true
  71.         ToggleButton.Text = "🟢 Lagging..."
  72.         ToggleButton.BackgroundColor3 = Color3.fromRGB(50, 200, 50)
  73.         causeLag()
  74.     end
  75. end)
  76.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement