Daniel555ok

Lag Switch GUI RBX

Jun 1st, 2020
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.57 KB | None | 0 0
  1. if not settings() then
  2. warn("bruh")
  3. end
  4.  
  5. local lagswitch = false
  6.  
  7. local LagswitchGUI = Instance.new("ScreenGui")
  8. local MainFrame = Instance.new("Frame")
  9. local Button = Instance.new("TextButton")
  10. local Button2 = Instance.new("TextButton")
  11. local Deco = Instance.new("TextLabel")
  12.  
  13. LagswitchGUI.Name = "LagswitchGUI"
  14. LagswitchGUI.Parent = game.CoreGui
  15.  
  16. MainFrame.Name = "MainFrame"
  17. MainFrame.Parent = LagswitchGUI
  18. MainFrame.Active = true
  19. MainFrame.BackgroundColor3 = Color3.new(0.196078, 0.196078, 0.196078)
  20. MainFrame.BorderSizePixel = 0
  21. MainFrame.Draggable = true
  22. MainFrame.Position = UDim2.new(0.25, 0, 0.25, 0)
  23. MainFrame.Size = UDim2.new(0.150000006, 0, 0.100000001, 0)
  24.  
  25. Button.Name = "Button"
  26. Button.Parent = MainFrame
  27. Button.BackgroundColor3 = Color3.new(0, 0, 0)
  28. Button.BorderSizePixel = 0
  29. Button.Position = UDim2.new(0.0500000007, 0, 0.400000006, 0)
  30. Button.Size = UDim2.new(0.5, 0, 0.400000006, 0)
  31. Button.Font = Enum.Font.SourceSans
  32. Button.FontSize = Enum.FontSize.Size14
  33. Button.Text = "OFF"
  34. Button.TextColor3 = Color3.new(1, 0, 0)
  35. Button.TextScaled = true
  36. Button.TextSize = 14
  37. Button.TextWrapped = true
  38.  
  39. Deco.Name = "Deco"
  40. Deco.Parent = MainFrame
  41. Deco.BackgroundColor3 = Color3.new(1, 1, 1)
  42. Deco.BackgroundTransparency = 0.89999997615814
  43. Deco.BorderSizePixel = 0
  44. Deco.Size = UDim2.new(1, 0, 0.300000012, 0)
  45. Deco.Font = Enum.Font.SourceSansBold
  46. Deco.FontSize = Enum.FontSize.Size14
  47. Deco.Text = "Lagswitch"
  48. Deco.TextColor3 = Color3.new(1, 1, 1)
  49. Deco.TextScaled = true
  50. Deco.TextSize = 14
  51. Deco.TextWrapped = true
  52.  
  53. Button2.Name = "Button2"
  54. Button2.Parent = MainFrame
  55. Button2.BackgroundColor3 = Color3.new(0, 0, 0)
  56. Button2.BorderSizePixel = 0
  57. Button2.Position = UDim2.new(0.649999976, 0, 0.400000006, 0)
  58. Button2.Size = UDim2.new(0.300000012, 0, 0.400000006, 0)
  59. Button2.Font = Enum.Font.SourceSans
  60. Button2.FontSize = Enum.FontSize.Size14
  61. Button2.Text = "TP"
  62. Button2.TextColor3 = Color3.fromRGB(0,50,50)
  63. Button2.TextScaled = true
  64. Button2.TextSize = 14
  65. Button2.TextWrapped = true
  66.  
  67.  
  68. local seed = math.random(-5982913,-1)
  69. local lastPos = CFrame.new(Vector3.new(0,0,0))
  70.  
  71.  
  72.  
  73. Button.MouseButton1Down:connect(function()
  74. if lagswitch == false then
  75. lagswitch = true
  76. Button.TextColor3 = Color3.new(0, 1, 0)
  77. Button.Text = "ON"
  78. Button2.TextColor3 = Color3.fromRGB(0,255,255)
  79. if workspace.CurrentCamera:findFirstChild("newFolder" .. seed) then
  80. workspace.CurrentCamera["newFolder" .. seed]:remove()
  81. end
  82. local newFolder = Instance.new("Folder", workspace.CurrentCamera)
  83. newFolder.Name = "newFolder" .. seed
  84. local old = game.Players.LocalPlayer.Character:getChildren()
  85. for i=1,#old do
  86. if old[i].Name == "HumanoidRootPart" then
  87. lastPos = old[i].CFrame
  88. end
  89. if old[i].ClassName == "Part" or old[i].ClassName == "MeshPart" then
  90. local new = old[i]:clone()
  91. local clean = new:getChildren()
  92. for i=1,#clean do
  93. if clean[i].ClassName == "Decal" or clean[i].ClassName == "SpecialMesh" then
  94. else
  95. clean[i]:remove()
  96. end
  97. end
  98. new.Color = Color3.fromRGB(0,125,125)
  99. new.Transparency = 0.7
  100. new.Anchored = true
  101. new.CanCollide = false
  102. new.Parent = newFolder
  103. end
  104. end
  105. settings().Network.IncommingReplicationLag = 1000
  106. else
  107. lagswitch = false
  108. Button.TextColor3 = Color3.new(1, 0, 0)
  109. Button.Text = "OFF"
  110. Button2.TextColor3 = Color3.fromRGB(0,50,50)
  111. if workspace.CurrentCamera:findFirstChild("newFolder" .. seed) then
  112. workspace.CurrentCamera["newFolder" .. seed]:remove()
  113. end
  114. settings().Network.IncommingReplicationLag = 0
  115. end
  116. end)
  117.  
  118. Button2.MouseButton1Down:connect(function()
  119. if lagswitch == true then
  120. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = lastPos
  121. end
  122. end)
Add Comment
Please, Sign In to add comment