Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// CustomDeathScript
- --// Writtened by filipaogamer345 (solo dev).
- --// Change the sound asset-id at the line 16 if you want.
- local player = game.Players.LocalPlayer
- local NetworkAccess = coroutine.create(function()
- settings().Physics.AllowSleep = false
- wait(math.random(1.5, 3))
- while true do
- game:GetService('RunService').RenderStepped:Wait()
- for _, players in pairs(game.Players:GetChildren()) do
- if players ~= game.Players.LocalPlayer then
- players.MaximumSimulationRadius = 0.1
- players.SimulationRadius = 0
- end
- end
- player.MaximumSimulationRadius = math.pow(math.huge, math.huge)
- player.SimulationRadius = math.huge * math.huge
- end
- end)
- coroutine.resume(NetworkAccess)
- local function Update()
- local connection = nil
- if connection ~= nil then
- connection:Disconnect()
- end
- connection = coroutine.resume(coroutine.create(function()
- for _, player in pairs(game.Players:GetPlayers()) do
- local character = player.Character
- local humanoid = character:findFirstChild("Humanoid")
- humanoid.Died:Connect(function()
- local sound = Instance.new("Sound", workspace)
- sound.SoundId = "rbxasset://sounds/uuhhh.mp3"
- sound.Volume = 20
- sound:Play()
- game.Debris:AddItem(sound, 1.5)
- end)
- end
- end))
- end
- Update()
- game.Players.PlayerAdded:Connect(function()
- Update()
- end)
- game.Players.PlayerRemoving:Connect(function()
- Update()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement