Advertisement
Idkrandomthingyyyy

W

Aug 16th, 2023
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. getgenv().hurtmessages = {
  2. "underrated_skid hit the ground too hard",
  3. "underrated_skid tried to swim in lava",
  4. "underrated_skid fell from a high place",
  5. "(death.fell.accident.water) -.. HOW ",
  6. "underrated_skid experienced kinetic energy whilst trying to escape Cod",
  7. "underrated_skid was poked to death by a sweet berry bush whilst trying to escape Donkey ",
  8. "underrated_skid was blown up by Bee",
  9. "underrated_skid didn't want to live in the same world as Chicken",
  10. "underrated_skid reverb sharded and had a brain anurysm",
  11. "underrated_skid was struck by lightning whilst fighting Trader Llama",
  12. "underrated_skid said an unpopular opinion and got cancelled by Person who looks like an Ogre",
  13. "Obama's last name is-"
  14.  
  15. }
  16.  
  17. local player = game.Players.LocalPlayer
  18.  
  19. if player.Character then
  20. local humanoid = player.Character:WaitForChild("Humanoid")
  21. local previousHealth = humanoid.Health
  22.  
  23. humanoid.Changed:Connect(function()
  24. if humanoid.Health < previousHealth then
  25. local randomIndex = math.random(1, #getgenv().hurtmessages)
  26. local message = getgenv().hurtmessages[randomIndex]
  27.  
  28. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(message, "All")
  29. end
  30.  
  31. previousHealth = humanoid.Health
  32. end)
  33. end
  34.  
  35. player.CharacterAdded:Connect(function(char)
  36. local humanoid = char:WaitForChild("Humanoid")
  37. local previousHealth = humanoid.Health
  38.  
  39. humanoid.Changed:Connect(function()
  40. if humanoid.Health < previousHealth then
  41. local randomIndex = math.random(1, #getgenv().hurtmessages)
  42. local message = getgenv().hurtmessages[randomIndex]
  43.  
  44. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(message, "All")
  45. end
  46.  
  47. previousHealth = humanoid.Health
  48. end)
  49. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement