Joriangames

Random death message script

Oct 8th, 2020
5,262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. ----This script is created by Joriangames
  2. ----Youtube channel: Problox Studio Scripts
  3. ----If you want to know how to use this watch my tutorial: https://www.youtube.com/watch?v=uTJqaAJgrlo&lc=Ugx9ulise_wxHjAdv3h4AaABAg
  4.  
  5. local RandomText = {
  6.     "oof", "Why did you do that", "Better luck next time", "Babadaba"
  7. }
  8.  
  9. local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
  10. local char = plr.Character or plr.Character:Wait()
  11. local hum = char:WaitForChild("Humanoid")
  12. local fr = script.Parent.Frame
  13. local YouDied = fr.YouDied
  14.  
  15. hum.Died:Connect(function()
  16.     YouDied.Text = RandomText[math.random(1,#RandomText)]
  17.     for i = 1,0.3,-0.1 do
  18.         fr.BackgroundTransparency = i
  19.         YouDied.TextTransparency = i
  20.         wait(0.07)
  21.     end
  22. end)
Add Comment
Please, Sign In to add comment