Advertisement
Joriangames

KillFeedHandler script

Mar 31st, 2021
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. --Thanks for using this script
  2. --This script is made by Joriangames/Problox Studio Scripts
  3. --Want to know how to use this? Watch my tutorial:
  4.  
  5. local KilledEvent = game.ReplicatedStorage.KilledEvent
  6.  
  7. game.Players.PlayerAdded:Connect(function(plr)
  8.     plr.CharacterAdded:Connect(function(char)
  9.         char:WaitForChild("Humanoid").Died:Connect(function(killed)
  10.             local killer = char.Humanoid:FindFirstChild("creator")
  11.             if killer.Value then
  12.                 local killerName = killer.Value.Name
  13.                 KilledEvent:FireAllClients(plr, killerName)
  14.             end
  15.         end)
  16.     end)
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement