wait(1) script.Parent.Text = "1:59" wait(1) script.Parent.Text = "1:58" wait(1) script.Parent.Text = "1:57" wait(1) script.Parent.Text = "1:56" wait(1) script.Parent.Text = "1:55" wait(1) script.Parent.Text = "1:54" wait(1) script.Parent.Text = "1:53" wait(1) script.Parent.Text = "1:52" wait(1) script.Parent.Text = "1:51" wait(1) script.Parent.Text = "1:50" wait(1) script.Parent.Text = "1:49" wait(1) script.Parent.Text = "1:48" wait(1) script.Parent.Text = "1:47" wait(1) script.Parent.Text = "1:46" wait(1) script.Parent.Text = "1:45" wait(1) script.Parent.Text = "1:44" wait(1) script.Parent.Text = "1:43" wait(1) script.Parent.Text = "1:42" wait(1) script.Parent.Text = "1:41" wait(1) script.Parent.Text = "1:40" wait(1) script.Parent.Text = "1:39" wait(1) script.Parent.Text = "1:38" wait(1) script.Parent.Text = "1:37" wait(1) script.Parent.Text = "1:36" wait(1) script.Parent.Text = "1:35" wait(1) script.Parent.Text = "1:34" wait(1) script.Parent.Text = "1:33" wait(1) script.Parent.Text = "1:32" wait(1) script.Parent.Text = "1:31" wait(1) script.Parent.Text = "1:30" wait(1) script.Parent.Text = "1:29" wait(1) script.Parent.Text = "1:28" wait(1) script.Parent.Text = "1:27" wait(1) script.Parent.Text = "1:26" wait(1) script.Parent.Text = "1:25" wait(1) script.Parent.Text = "1:24" wait(1) script.Parent.Text = "1:30" wait(1) script.Parent.Text = "1:29" wait(1) script.Parent.Text = "1:28" wait(1) script.Parent.Text = "1:27" wait(1) script.Parent.Text = "1:26" wait(1) script.Parent.Text = "1:25" wait(1) script.Parent.Text = "1:24" wait(1) script.Parent.Text = "1:23" wait(1) script.Parent.Text = "1:22" wait(1) script.Parent.Text = "1:21" wait(1) script.Parent.Text = "1:20" wait(1) script.Parent.Text = "1:19" wait(1) script.Parent.Text = "1:18" wait(1) script.Parent.Text = "1:17" wait(1) script.Parent.Text = "1:16" wait(1) script.Parent.Text = "1:15" wait(1) script.Parent.Text = "1:14" wait(1) script.Parent.Text = "1:13" wait(1) script.Parent.Text = "1:12" wait(1) script.Parent.Text = "1:11" wait(1) script.Parent.Text = "1:10" wait(1) script.Parent.Text = "1:09" wait(1) script.Parent.Text = "1:08" wait(1) script.Parent.Text = "1:07" wait(1) script.Parent.Text = "1:06" wait(1) script.Parent.Text = "1:05" wait(1) script.Parent.Text = "1:04" wait(1) script.Parent.Text = "1:03" wait(1) script.Parent.Text = "1:02" wait(1) script.Parent.Text = "1:01" wait(1) script.Parent.Text = "1:00" wait(1) script.Parent.Text = "0:59" wait(1) script.Parent.Text = "0:58" wait(1) script.Parent.Text = "0:57" wait(1) script.Parent.Text = "0:56" wait(1) script.Parent.Text = "0:55" wait(1) script.Parent.Text = "0:54" wait(1) script.Parent.Text = "0:53" wait(1) script.Parent.Text = "0:52" wait(1) script.Parent.Text = "0:51" wait(1) script.Parent.Text = "0:50" wait(1) script.Parent.Text = "0:49" wait(1) script.Parent.Text = "0:48" wait(1) script.Parent.Text = "0:47" wait(1) script.Parent.Text = "0:46" wait(1) script.Parent.Text = "0:45" wait(1) script.Parent.Text = "0:44" wait(1) script.Parent.Text = "0:43" wait(1) script.Parent.Text = "0:42" wait(1) script.Parent.Text = "0:41" wait(1) script.Parent.Text = "0:40" wait(1) script.Parent.Text = "0:39" wait(1) script.Parent.Text = "0:38" wait(1) script.Parent.Text = "0:37" wait(1) script.Parent.Text = "0:36" wait(1) script.Parent.Text = "0:35" wait(1) script.Parent.Text = "0:34" wait(1) script.Parent.Text = "0:33" wait(1) script.Parent.Text = "0:32" wait(1) script.Parent.Text = "0:31" wait(1) script.Parent.Text = "0:30" wait(1) script.Parent.Text = "0:29" wait(1) script.Parent.Text = "0:28" wait(1) script.Parent.Text = "0:27" wait(1) script.Parent.Text = "0:26" wait(1) script.Parent.Text = "0:25" wait(1) script.Parent.Text = "0:24" wait(1) script.Parent.Text = "0:23" wait(1) script.Parent.Text = "0:22" wait(1) script.Parent.Text = "0:21" wait(1) script.Parent.Text = "0:20" wait(1) script.Parent.Text = "0:19" wait(1) script.Parent.Text = "0:18" wait(1) script.Parent.Text = "0:17" wait(1) script.Parent.Text = "0:16" wait(1) script.Parent.Text = "0:15" wait(1) script.Parent.Text = "0:14" wait(1) script.Parent.Text = "0:13" wait(1) script.Parent.Text = "0:12" wait(1) script.Parent.Text = "0:11" wait(1) script.Parent.Text = "0:10" wait(1) script.Parent.Text = "0:09" wait(1) script.Parent.Text = "0:08" wait(1) script.Parent.Text = "0:07" wait(1) script.Parent.Text = "0:06" wait(1) script.Parent.Text = "0:05" wait(1) script.Parent.Text = "0:04" wait(1) script.Parent.Text = "0:03" wait(1) script.Parent.Text = "0:02" wait(1) script.Parent.Text = "0:01" wait(1) script.Parent.Text = "0:00" wait(1) script.Parent.Text = "1:59" wait(1) script.Parent.Text = "1:58" wait(1) script.Parent.Text = "1:57" wait(1) script.Parent.Text = "1:56" wait(1) script.Parent.Text = "1:55" wait(1) script.Parent.Text = "1:54" wait(1) script.Parent.Text = "1:53" wait(1) script.Parent.Text = "1:52" wait(1) script.Parent.Text = "1:51" wait(1) script.Parent.Text = "1:50" wait(1) script.Parent.Text = "1:49" wait(1) script.Parent.Text = "1:48" wait(1) script.Parent.Text = "1:47" wait(1) script.Parent.Text = "1:46" wait(1) script.Parent.Text = "1:45" wait(1) script.Parent.Text = "1:44" wait(1) script.Parent.Text = "1:43" wait(1) script.Parent.Text = "1:42" wait(1) script.Parent.Text = "1:41" wait(1) script.Parent.Text = "1:40" wait(1) script.Parent.Text = "1:39" wait(1) script.Parent.Text = "1:38" wait(1) script.Parent.Text = "1:37" wait(1) script.Parent.Text = "1:36" wait(1) script.Parent.Text = "1:35" wait(1) script.Parent.Text = "1:34" wait(1) script.Parent.Text = "1:33" wait(1) script.Parent.Text = "1:32" wait(1) script.Parent.Text = "1:31" wait(1) script.Parent.Text = "1:30" wait(1) script.Parent.Text = "1:29" wait(1) script.Parent.Text = "1:28" wait(1) script.Parent.Text = "1:27" wait(1) script.Parent.Text = "1:26" wait(1) script.Parent.Text = "1:25" wait(1) script.Parent.Text = "1:24" wait(1) script.Parent.Text = "1:30" wait(1) script.Parent.Text = "1:29" wait(1) script.Parent.Text = "1:28" wait(1) script.Parent.Text = "1:27" wait(1) script.Parent.Text = "1:26" wait(1) script.Parent.Text = "1:25" wait(1) script.Parent.Text = "1:24" wait(1) script.Parent.Text = "1:23" wait(1) script.Parent.Text = "1:22" wait(1) script.Parent.Text = "1:21" wait(1) script.Parent.Text = "1:20" wait(1) script.Parent.Text = "1:19" wait(1) script.Parent.Text = "1:18" wait(1) script.Parent.Text = "1:17" wait(1) script.Parent.Text = "1:16" wait(1) script.Parent.Text = "1:15" wait(1) script.Parent.Text = "1:14" wait(1) script.Parent.Text = "1:13" wait(1) script.Parent.Text = "1:12" wait(1) script.Parent.Text = "1:11" wait(1) script.Parent.Text = "1:10" wait(1) script.Parent.Text = "1:09" wait(1) script.Parent.Text = "1:08" wait(1) script.Parent.Text = "1:07" wait(1) script.Parent.Text = "1:06" wait(1) script.Parent.Text = "1:05" wait(1) script.Parent.Text = "1:04" wait(1) script.Parent.Text = "1:03" wait(1) script.Parent.Text = "1:02" wait(1) script.Parent.Text = "1:01" wait(1) script.Parent.Text = "1:00" wait(1) script.Parent.Text = "0:59" wait(1) script.Parent.Text = "0:58" wait(1) script.Parent.Text = "0:57" wait(1) script.Parent.Text = "0:56" wait(1) script.Parent.Text = "0:55" wait(1) script.Parent.Text = "0:54" wait(1) script.Parent.Text = "0:53" wait(1) script.Parent.Text = "0:52" wait(1) script.Parent.Text = "0:51" wait(1) script.Parent.Text = "0:50" wait(1) script.Parent.Text = "0:49" wait(1) script.Parent.Text = "0:48" wait(1) script.Parent.Text = "0:47" wait(1) script.Parent.Text = "0:46" wait(1) script.Parent.Text = "0:45" wait(1) script.Parent.Text = "0:44" wait(1) script.Parent.Text = "0:43" wait(1) script.Parent.Text = "0:42" wait(1) script.Parent.Text = "0:41" wait(1) script.Parent.Text = "0:40" wait(1) script.Parent.Text = "0:39" wait(1) script.Parent.Text = "0:38" wait(1) script.Parent.Text = "0:37" wait(1) script.Parent.Text = "0:36" wait(1) script.Parent.Text = "0:35" wait(1) script.Parent.Text = "0:34" wait(1) script.Parent.Text = "0:33" wait(1) script.Parent.Text = "0:32" wait(1) script.Parent.Text = "0:31" wait(1) script.Parent.Text = "0:30" wait(1) script.Parent.Text = "0:29" wait(1) script.Parent.Text = "0:28" wait(1) script.Parent.Text = "0:27" wait(1) script.Parent.Text = "0:26" wait(1) script.Parent.Text = "0:25" wait(1) script.Parent.Text = "0:24" wait(1) script.Parent.Text = "0:23" wait(1) script.Parent.Text = "0:22" wait(1) script.Parent.Text = "0:21" wait(1) script.Parent.Text = "0:20" wait(1) script.Parent.Text = "0:19" wait(1) script.Parent.Text = "0:18" wait(1) script.Parent.Text = "0:17" wait(1) script.Parent.Text = "0:16" wait(1) script.Parent.Text = "0:15" wait(1) script.Parent.Text = "0:14" wait(1) script.Parent.Text = "0:13" wait(1) script.Parent.Text = "0:12" wait(1) script.Parent.Text = "0:11" wait(1) script.Parent.Text = "0:10" wait(1) script.Parent.Text = "0:09" wait(1) script.Parent.Text = "0:08" wait(1) script.Parent.Text = "0:07" wait(1) script.Parent.Text = "0:06" wait(1) script.Parent.Text = "0:05" wait(1) script.Parent.Text = "0:04" wait(1) script.Parent.Text = "0:03" wait(1) script.Parent.Text = "0:02" wait(1) script.Parent.Text = "0:01" wait(1) script.Parent.Text = "0:00"
pls help me i want to make it short
First of all, wow. This is one hell of a monstrosity.
Anyway, just use loops; Loops are your friend!
The simplest form of loops, while
loops, execute as long as their condition is true
:
local var = 0 while var < 10 do print(var) var = var + 1 end
There are also repeat ... until
loops, which are similar to while
loops. These loops will do the opposite of while
loop in that instead of looping as long as their condition is true
, they will, as their name suggest, loop until some false
condition becomes true
:
local humanoid = character:FindFirstChildOfClass("Humanoid") if humanoid and humanoid.Health > 0 then repeat humanoid:TakeDamage(5) wait(2) until humanoid.Health == 0 end
Note that a repeat
loop's body will always execute at least once since the condition is checked at the end of each step of the loop.
If you want to repeat an action some known amount of times, just use a numeric for
loop:
for i = 1, 100, 2 do -- This will count from 1 to 100 in steps of 2. print(i) end
If the step is of 1
then you can safely omit it:
for i = 1, 100 do -- This will count from 1 to 100 in steps of 1. print(i) end
You can also count down using a negative step:
for i = 99, 1, -1 do print( i .. " bottle" .. (i > 1 and 's' or '') .. " of beer on the wall") end print("No more bottles of beer on the wall.")
And If you want something to happen forever and ever, you can use an infinite loop`:
print("This shall loop forever and") while true do print("ever and") wait(2) end
But make sure to wait()
before the end of an infinite loop, otherwise Roblox will hang!
Furthermore, if your wait time is small then you should consider using RunService.Stepped
or RunService.HeartBeat
instead!
Link150 didn't actually include your code in a shortened form, here's that, using two methods:
Method 1: nested loops
for minute = 1, 0, -1 do for seconds = 59, 10, -1 do script.Parent.Text = minute .. ":" .. seconds wait(1) end for seconds = 9, 0, -1 do script.Parent.Text = minute .. ":0" .. seconds wait(1) end end
Method 2: math & ternary statement
for seconds = 119, 0, -1 do --119 and not 120 since you start at 1:59 script.Parent.Text = math.floor(seconds/60) .. ":" .. (seconds%60 < 10 and "0" or "") .. seconds%60 end end
U simply cant.
Locked by TheeDeathCaster
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?