Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local character = script.Parent
- local plr = game:GetService("Players"):GetPlayerFromCharacter(character)
- local sfx = {
- "rbxassetid://1230832372",
- "rbxassetid://861942173"
- }
- game:GetService("Players").CharacterAutoLoads = false
- game:GetService("Players").PlayerAdded:connect(function(v)
- v:LoadCharacter()
- end)
- if plr and character and character:FindFirstChild("Humanoid") and character:FindFirstChild("HumanoidRootPart") then
- character.Humanoid.Died:connect(function()
- local sound = Instance.new("Sound",character.HumanoidRootPart)
- sound.SoundId = sfx[math.random(1,#sfx)]
- sound.Volume = 10
- sound:Play()
- sound.Ended:connect(function()
- plr:LoadCharacter()
- end)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement