Advertisement
BobMe

msb thing

May 2nd, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. 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?
  2.  
  3. local countup = 0
  4. local srup = 0
  5. local rup = 0
  6.  
  7. for i=1,#dummessage do
  8. if dummessage:sub(i,i+1) ~= "g/" or dummessage:sub(i-1,i) ~= "g/" then
  9. if dummessage:sub(i,i):lower() == "d" then
  10. countup = countup + 1
  11. elseif dummessage:sub(i,i+2):lower() == "sr/" then
  12. srup = srup + 1
  13. elseif dummessage:sub(i,i):lower() == "r" and dummessage:sub(i-1,i-1):lower() ~= "s" then
  14. rup = rup + 1
  15. end
  16. end
  17. end
  18.  
  19. if countup ~= 1 and countup ~= 0 then
  20. print(countup.." dummies have been spawned")
  21. else
  22. print(countup.." dummy has been spawned")
  23. end
  24. if srup == 1 and srup ~= 0 then
  25. print("You have been static reset once.")
  26. else
  27. print("You have been static reset "..srup.." times.")
  28. end
  29. if rup == 1 and rup ~= 0 then
  30. print("You have been respawned once")
  31. else
  32. print("You have been respawned "..rup.." times.")
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement