-- Create the UI local player = game.Players.LocalPlayer local screenGui = Instance.new("ScreenGui") screenGui.Parent = player:WaitForChild("PlayerGui") -- Create a draggable frame local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 300, 0, 150) frame.Position = UDim2.new(0.5, -150, 0.5, -75) frame.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2) frame.BorderSizePixel = 2 frame.Draggable = true frame.Active = true frame.Parent = screenGui -- Create a minimize button local minimizeButton = Instance.new("TextButton") minimizeButton.Size = UDim2.new(0, 25, 0, 25) minimizeButton.Position = UDim2.new(1, -30, 0, 5) minimizeButton.Text = "-" minimizeButton.TextSize = 18 minimizeButton.TextColor3 = Color3.new(1, 1, 1) minimizeButton.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5) minimizeButton.BorderSizePixel = 1 minimizeButton.Parent = frame -- Create the Start button local startButton = Instance.new("TextButton") startButton.Size = UDim2.new(0, 200, 0, 50) startButton.Position = UDim2.new(0.5, -100, 0.2, -25) startButton.Text = "Start Loop" startButton.Parent = frame -- Create the Stop button local stopButton = Instance.new("TextButton") stopButton.Size = UDim2.new(0, 200, 0, 50) stopButton.Position = UDim2.new(0.5, -100, 0.6, -25) stopButton.Text = "Stop Loop" stopButton.Parent = frame -- Variable to track minimized state local isMinimized = false -- Function to toggle minimize state local function toggleMinimize() isMinimized = not isMinimized if isMinimized then startButton.Visible = false stopButton.Visible = false frame.Size = UDim2.new(0, 300, 0, 35) -- Adjust size to only show the title and minimize button else startButton.Visible = true stopButton.Visible = true frame.Size = UDim2.new(0, 300, 0, 150) -- Restore full size end end -- Connect minimize button minimizeButton.MouseButton1Click:Connect(toggleMinimize) -- Declare the loop variable local running = false local loopCoroutine = nil -- Function to start the loop local function startLoop() if not running then running = true loopCoroutine = coroutine.create(function() while running do loadstring(game:HttpGet("https://rawscripts.net/raw/Plinko-RNG-inf-money-24783"))() wait(0.01) end end) coroutine.resume(loopCoroutine) end end -- Function to stop the loop local function stopLoop() if running then running = false if loopCoroutine then coroutine.close(loopCoroutine) loopCoroutine = nil end end end -- Connect the buttons to the functions startButton.MouseButton1Click:Connect(startLoop) stopButton.MouseButton1Click:Connect(stopLoop)