Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- button = script.Parent
- blue = button.BackgroundColor3
- red = Color3.new(1,0,0)
- green = Color3.new(0,1,0)
- function changeColor()
- if button.BackgroundColor3 == blue then
- button.BackgroundColor3 = red
- elseif button.BackgroundColor3 == red then
- button.BackgroundColor3 = green
- else
- button.BackgroundColor3 = blue
- end
- end
- button.MouseButton1Click:connect(changeCĀolor)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement