Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- List of quirky death messages
- local messages = {
- "You tripped over a rock and died!",
- "A passing chicken pecked you to death.",
- "You forgot to breathe. Oops.",
- "An invisible force sent you to the void.",
- "You were so unlucky that you just dropped dead.",
- "A wandering trader scammed you to death.",
- "You died from extreme boredom.",
- "Your shoelaces were untied... and that was your downfall.",
- "A creeper from another dimension got you.",
- "You blinked too hard and perished."
- }
- -- Select a random player within a radius (adjust range if needed)
- local result = commands.exec("execute as @p[distance=..5] run data get entity @s UUID")
- -- If no player is found, exit
- if not result or result == "" then
- print("No player detected near the button.")
- return
- end
- -- Get a random message
- local deathMessage = messages[math.random(#messages)]
- -- Kill the player and send the quirky death message
- commands.exec("execute as @p[distance=..5] run kill @s")
- commands.exec('execute as @p[distance=..5] run title @s title {"text":"' .. deathMessage .. '","color":"red"}"')
- print("Executed: " .. deathMessage)
Advertisement
Add Comment
Please, Sign In to add comment