DrawingJhon

Msg test

May 29th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. plrs = game:GetService("Players")
  2. local prefix = ";"
  3. --[[local comp = true
  4. while wait(0.5) do
  5. for i, v in pairs(plrs:GetChildren()) do
  6. if v.ClassName == "Player" then
  7. v.Chatted:Connect(function(msg)
  8. --if string.match(msg, "lol", 1) then
  9. if msg == "no" or msg == "yes" then
  10. if comp == true then
  11. print("Hello world")
  12. comp = false
  13. wait()
  14. comp = true
  15. end
  16. end
  17. end)
  18. end
  19. end
  20. end]]
  21. for i, v in pairs(plrs:GetChildren()) do
  22. if v.ClassName == "Player" then
  23. v.Chatted:connect(function(msg)
  24. if msg == prefix.."kill" then
  25. if v.Character:findFirstChild("Humanoid") then
  26. if v.Character.Humanoid.Health ~= 0 then
  27. v.Character.Humanoid.Health = 0
  28. end
  29. end
  30. elseif msg == prefix.."re" or msg == prefix.."respawn" or msg == prefix.."reset" or msg == prefix.."re me" then
  31. v:LoadCharacter()
  32. elseif msg == "/re" then
  33. print(mgs:sub(5))
  34. end
  35. end)
  36. end
  37. end
  38. --[[local h = Instance.new("Hint", workspace)
  39. h.Text = "Don't type g/c"
  40. for i, v in pairs(plrs:GetChildren()) do
  41. if v.ClassName == "Player" then
  42. v.Chatted:connect(function(msg)
  43. if msg == "g/c" or msg == "G/c" or msg == "g/C" or msg == "G/C" or msg == "g/clean" then
  44. if v.Character:findFirstChild("Humanoid") then
  45. if v.Character.Humanoid.Health ~= 0 then
  46. v.Character.Humanoid.Health = 0
  47. end
  48. end
  49. end
  50. end)
  51. end
  52. end]]
Add Comment
Please, Sign In to add comment