I am making a modded menu sort of thing and i need to know how to break this loop and change the texts back to white and the button text to OFF with the same button how could i do this?
on7.MouseButton1Click:connect(function() local running = true on7.Text = "ON" on7.TextColor3 = Color3.new(0,170,0) repeat wait(0.1) espt.TextColor3 = Color3.new(math.random(),math.random(),math.random()) godmode.TextColor3 = Color3.new(math.random(),math.random(),math.random()) jump.TextColor3 = Color3.new(math.random(),math.random(),math.random()) speed.TextColor3 = Color3.new(math.random(),math.random(),math.random()) teleport.TextColor3 = Color3.new(math.random(),math.random(),math.random()) xray.TextColor3 = Color3.new(math.random(),math.random(),math.random()) rainbowmenu.TextColor3 = Color3.new(math.random(),math.random(),math.random()) noclipT.TextColor3 = Color3.new(math.random(),math.random(),math.random()) teamT.TextColor3 = Color3.new(math.random(),math.random(),math.random()) raycastT.TextColor3 = Color3.new(math.random(),math.random(),math.random()) autoupdateT.TextColor3 = Color3.new(math.random(),math.random(),math.random()) addespT.TextColor3 = Color3.new(math.random(),math.random(),math.random()) ------------------------------------------------------------------------------- espt.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) godmode.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) jump.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) speed.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) teleport.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) rainbowmenu.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) xray.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) noclipT.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) teamT.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) raycastT.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) autoupdateT.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) addespT.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) until running == false end)
sounds like your writing an exploit. Anyways, try this.
running = false on7.MouseButton1Click:connect(function() running = not running if running then on7.Text = "ON" else on7.Text = "OFF" end end) spawn(function() while running do wait(0.1) espt.TextColor3 = Color3.new(math.random(),math.random(),math.random()) godmode.TextColor3 = Color3.new(math.random(),math.random(),math.random()) jump.TextColor3 = Color3.new(math.random(),math.random(),math.random()) speed.TextColor3 = Color3.new(math.random(),math.random(),math.random()) teleport.TextColor3 = Color3.new(math.random(),math.random(),math.random()) xray.TextColor3 = Color3.new(math.random(),math.random(),math.random()) rainbowmenu.TextColor3 = Color3.new(math.random(),math.random(),math.random()) noclipT.TextColor3 = Color3.new(math.random(),math.random(),math.random()) teamT.TextColor3 = Color3.new(math.random(),math.random(),math.random()) raycastT.TextColor3 = Color3.new(math.random(),math.random(),math.random()) autoupdateT.TextColor3 = Color3.new(math.random(),math.random(),math.random()) addespT.TextColor3 = Color3.new(math.random(),math.random(),math.random()) ------------------------------------------------------------------------------- espt.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) godmode.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) jump.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) speed.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) teleport.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) rainbowmenu.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) xray.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) noclipT.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) teamT.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) raycastT.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) autoupdateT.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) addespT.TextStrokeColor3 = Color3.new(math.random(),math.random(),math.random()) end end)