Idk why this local script doesnt work, this is some info: Everything in the game is put right in starterGui so please help me:
local colorFrame = script.Parent.ColorFrame
local colorButton = script.Parent.ColorButton
local alive = true
local clicked = false
local minimumTime = 150
local timeNumber = 500
local points = 0
task.wait(5)
while true do
minimumTime = 150
timeNumber = 500
local alive = true
local clicked = false
while alive == true do
colorFrame.BackgroundColor3 = Color3.new(1, 0.364706, 0.376471)
local randomTime = math.random(minimumTime,timeNumber) / 100
wait(randomTime)
colorFrame.BackgroundColor3 = Color3.new(0.415686, 1, 0.482353)
timeNumber -= math.floor(timeNumber / 100)
minimumTime -= 2
colorButton.MouseButton1Down:Connect(function()
if colorFrame.BackgroundColor3 == Color3.new(0.415686, 1, 0.482353) then
colorFrame.BackgroundColor3 = Color3.new(1, 0.364706, 0.376471)
points += 1
clicked = true
elseif colorFrame.BackgroundColor3 == Color3.new(1, 0.364706, 0.376471) then
alive = false
clicked = true
end
end)
wait(0.5)
if clicked == false then
alive = false
end
clicked = false
end
colorFrame.BackgroundColor3 = Color3.new(255, 255, 255)
-- give player points
print(points)
points = 0
wait(10)
end