Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dummessage = "g/d/d/d/sr/r/r/r/r/sr/d/d/sr/sr/sr/sr/r/r/r" -- I made this at school, i got bored ok?
- local countup = 0
- local srup = 0
- local rup = 0
- for i=1,#dummessage do
- if dummessage:sub(i,i+1) ~= "g/" or dummessage:sub(i-1,i) ~= "g/" then
- if dummessage:sub(i,i):lower() == "d" then
- countup = countup + 1
- elseif dummessage:sub(i,i+2):lower() == "sr/" then
- srup = srup + 1
- elseif dummessage:sub(i,i):lower() == "r" and dummessage:sub(i-1,i-1):lower() ~= "s" then
- rup = rup + 1
- end
- end
- end
- if countup ~= 1 and countup ~= 0 then
- print(countup.." dummies have been spawned")
- else
- print(countup.." dummy has been spawned")
- end
- if srup == 1 and srup ~= 0 then
- print("You have been static reset once.")
- else
- print("You have been static reset "..srup.." times.")
- end
- if rup == 1 and rup ~= 0 then
- print("You have been respawned once")
- else
- print("You have been respawned "..rup.." times.")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement