Advertisement
haidar_at

The $1,000,000 Glass Bridge

Apr 18th, 2025
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 5.91 KB | Source Code | 0 0
  1. local Players = game:GetService("Players")
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3. local RunService = game:GetService("RunService")
  4.  
  5. local player = Players.LocalPlayer
  6.  
  7. -- Screen GUI
  8. local gui = Instance.new("ScreenGui")
  9. gui.Name = "ModernControlGui"
  10. gui.Parent = player:WaitForChild("PlayerGui")
  11. gui.ResetOnSpawn = false
  12. gui.IgnoreGuiInset = true
  13.  
  14. -- Toggle Panel Button
  15. local toggleBtn = Instance.new("TextButton")
  16. toggleBtn.Size = UDim2.new(0, 40, 0, 40)
  17. toggleBtn.Position = UDim2.new(0.5, -20, 0.5, -20)
  18. toggleBtn.Text = "⚙"
  19. toggleBtn.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  20. toggleBtn.TextColor3 = Color3.new(1, 1, 1)
  21. toggleBtn.Font = Enum.Font.GothamBold
  22. toggleBtn.TextSize = 22
  23. toggleBtn.ZIndex = 5
  24. toggleBtn.Active = true
  25. toggleBtn.Draggable = true
  26. toggleBtn.Parent = gui
  27.  
  28. local toggleUICorner = Instance.new("UICorner", toggleBtn)
  29. toggleUICorner.CornerRadius = UDim.new(0, 8)
  30.  
  31. -- UI Container
  32. local mainFrame = Instance.new("Frame")
  33. mainFrame.Size = UDim2.new(0, 300, 0, 420)
  34. mainFrame.Position = UDim2.new(0.5, -150, 0.3, 0)
  35. mainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  36. mainFrame.BorderSizePixel = 0
  37. mainFrame.AnchorPoint = Vector2.new(0.5, 0)
  38. mainFrame.ClipsDescendants = true
  39. mainFrame.Visible = false
  40. mainFrame.Active = true
  41. mainFrame.Draggable = true
  42. mainFrame.Parent = gui
  43.  
  44. local stroke = Instance.new("UIStroke", mainFrame)
  45. stroke.Color = Color3.fromRGB(80, 80, 80)
  46. stroke.Thickness = 2
  47.  
  48. local corner = Instance.new("UICorner", mainFrame)
  49. corner.CornerRadius = UDim.new(0, 12)
  50.  
  51. -- Title/Header
  52. local header = Instance.new("TextLabel")
  53. header.Size = UDim2.new(1, 0, 0, 50)
  54. header.Position = UDim2.new(0, 0, 0, 0)
  55. header.BackgroundTransparency = 1
  56. header.Text = "⚙ Control Panel"
  57. header.TextColor3 = Color3.fromRGB(255, 255, 255)
  58. header.Font = Enum.Font.GothamBold
  59. header.TextSize = 20
  60. header.TextYAlignment = Enum.TextYAlignment.Center
  61. header.TextXAlignment = Enum.TextXAlignment.Center
  62. header.Parent = mainFrame
  63.  
  64. -- Layout
  65. local layout = Instance.new("UIListLayout")
  66. layout.Padding = UDim.new(0, 10)
  67. layout.SortOrder = Enum.SortOrder.LayoutOrder
  68. layout.FillDirection = Enum.FillDirection.Vertical
  69. layout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  70. layout.VerticalAlignment = Enum.VerticalAlignment.Top
  71. layout.Parent = mainFrame
  72.  
  73. local padding = Instance.new("UIPadding")
  74. padding.PaddingTop = UDim.new(0, 60)
  75. padding.PaddingLeft = UDim.new(0, 15)
  76. padding.PaddingRight = UDim.new(0, 15)
  77. padding.Parent = mainFrame
  78.  
  79. -- Show/Hide Panel
  80. toggleBtn.MouseButton1Click:Connect(function()
  81.     mainFrame.Visible = not mainFrame.Visible
  82. end)
  83.  
  84. -- Toggle / Button Templates + Functions
  85. local toggleStates = {}
  86. local function createToggle(name, callback)
  87.     local container = Instance.new("Frame")
  88.     container.Size = UDim2.new(1, 0, 0, 40)
  89.     container.BackgroundTransparency = 1
  90.  
  91.     local label = Instance.new("TextLabel")
  92.     label.Size = UDim2.new(0.6, 0, 1, 0)
  93.     label.BackgroundTransparency = 1
  94.     label.Text = name
  95.     label.TextColor3 = Color3.fromRGB(200, 200, 200)
  96.     label.Font = Enum.Font.Gotham
  97.     label.TextSize = 16
  98.     label.TextXAlignment = Enum.TextXAlignment.Left
  99.     label.Parent = container
  100.  
  101.     local toggle = Instance.new("TextButton")
  102.     toggle.Size = UDim2.new(0, 40, 0, 24)
  103.     toggle.Position = UDim2.new(1, -40, 0.5, -12)
  104.     toggle.BackgroundColor3 = Color3.fromRGB(200, 0, 0)
  105.     toggle.Text = "OFF"
  106.     toggle.Font = Enum.Font.GothamBold
  107.     toggle.TextColor3 = Color3.new(1, 1, 1)
  108.     toggle.TextSize = 12
  109.     toggle.Parent = container
  110.  
  111.     toggleStates[name] = false
  112.  
  113.     toggle.MouseButton1Click:Connect(function()
  114.         toggleStates[name] = not toggleStates[name]
  115.         toggle.Text = toggleStates[name] and "ON" or "OFF"
  116.         toggle.BackgroundColor3 = toggleStates[name] and Color3.fromRGB(0, 200, 0) or Color3.fromRGB(200, 0, 0)
  117.         callback(toggleStates[name])
  118.     end)
  119.  
  120.     container.Parent = mainFrame
  121. end
  122.  
  123. local function createButton(name, callback)
  124.     local btn = Instance.new("TextButton")
  125.     btn.Size = UDim2.new(1, 0, 0, 40)
  126.     btn.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  127.     btn.TextColor3 = Color3.fromRGB(255, 255, 255)
  128.     btn.Font = Enum.Font.Gotham
  129.     btn.TextSize = 16
  130.     btn.Text = name
  131.     btn.AutoButtonColor = true
  132.  
  133.     local btnCorner = Instance.new("UICorner")
  134.     btnCorner.CornerRadius = UDim.new(0, 8)
  135.     btnCorner.Parent = btn
  136.  
  137.     btn.MouseButton1Click:Connect(callback)
  138.     btn.Parent = mainFrame
  139. end
  140.  
  141. -- Features
  142. local function adjustTransparency(isOn)
  143.     local wrongFolder = workspace:FindFirstChild("Glasses") and workspace.Glasses:FindFirstChild("Wrong")
  144.     if wrongFolder then
  145.         for _, part in ipairs(wrongFolder:GetChildren()) do
  146.             if part:IsA("BasePart") then
  147.                 part.Transparency = isOn and 1 or 0.5
  148.             end
  149.         end
  150.     end
  151. end
  152.  
  153. createToggle("Show All", adjustTransparency)
  154.  
  155. local remoteNames = {
  156.     "VerifiedGears", "PlayFinalMusic", "GiveClaimMoney", "SolidWhiteEvent",
  157.     "ResetIndexCheck", "ChangeMoneyEvent", "ReturnMainSound",
  158.     "SecondChangeTextChest", "Delete_Rainbow_T", "PlayFinalMusic_2",
  159. }
  160.  
  161. local loopConnection = nil
  162. createToggle("Money", function(isOn)
  163.     if isOn then
  164.         loopConnection = RunService.Heartbeat:Connect(function()
  165.             for _, name in ipairs(remoteNames) do
  166.                 local remote = ReplicatedStorage:FindFirstChild(name)
  167.                 if remote and remote:IsA("RemoteEvent") then
  168.                     remote:FireServer()
  169.                 end
  170.             end
  171.         end)
  172.     else
  173.         if loopConnection then
  174.             loopConnection:Disconnect()
  175.             loopConnection = nil
  176.         end
  177.     end
  178. end)
  179.  
  180. local function toggleRoadBarrier(isOn)
  181.     for _, obj in ipairs(workspace:GetDescendants()) do
  182.         if obj:IsA("BasePart") and obj.Name == "RedBarrier" then
  183.             obj.CanCollide = not isOn
  184.         end
  185.     end
  186. end
  187.  
  188. createToggle("Road", toggleRoadBarrier)
  189.  
  190. createButton("Spawn", function()
  191.     player.Character:MoveTo(Vector3.new(-82.1566, 4.4729, -0.3147))
  192. end)
  193.  
  194. createButton("End", function()
  195.     player.Character:MoveTo(Vector3.new(818.4539, 36.4241, -1.0231))
  196. end)
  197.  
  198. createButton("Close", function()
  199.     mainFrame.Visible = false
  200. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement