JIT
enhancing hazard script with custom death effects and debounce functionality
this code. --[[ HazardScript.lua Attribute-driven hazard pad script for Roblox. Supports: Fling (with XYZ vector), randomization, debounce, damage types, stun types, and more. Place this script under a folder containing hazard pads (BaseParts). Each pad should have relevant attributes set for custom behavior. Fling is now based on XYZ attributes, not pad orientation. ]] local Players = game:GetService("Players") local Debris = game:GetService("Debris") -- Default configuration (used if attribute is missing) local DEFAULTS = { FlingEnabled = true, FlingX = 0, FlingY = 0, FlingZ = 0, FlingRandom = false, FlingRandomMinX = -0, FlingRandomMaxX = 0, FlingRandomMinY = -0, FlingRandomMaxY = 0, FlingRandomMinZ = -0, FlingRandomMaxZ = 0, DebounceEnabled = true, DebounceTime = 0.5, DamageEnabled = false, DamageType = "none", -- "fire", "ice", "poison", "none" DamageAmount = 10, StunEnabled = false, StunType = "none", -- "none", "light", "heavy" StunTime = 1.5, SoundTemplateName = "sfx" } -- Helper: Get attribute or fallback to default local function getAttr(pad, attr, default) local val = pad:GetAttribute(attr) if val == nil then return default end return val end -- Helper: Apply damage to a character local function applyDamage(character, amount, dtype) local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then return end humanoid:TakeDamage(amount) -- Optionally, apply status effect (visuals, etc.) if dtype == "fire" then if not character:FindFirstChild("HazardFire") then local fire = Instance.new("Fire") fire.Name = "HazardFire" fire.Heat = 10 fire.Size = 5 fire.Parent = character:FindFirstChild("HumanoidRootPart") or character Debris:AddItem(fire, 2) end elseif dtype == "ice" then local hrp = character:FindFirstChild("HumanoidRootPart") if hrp and not hrp:FindFirstChild("HazardIce") then local ice = Instance.new("ParticleEmitter") ice.Name = "HazardIce" ice.Texture = "rbxassetid://284205403" ice.Color = ColorSequence.new(Color3.fromRGB(150, 200, 255)) ice.Lifetime = NumberRange.new(0.5) ice.Rate = 20 ice.Parent = hrp Debris:AddItem(ice, 1) end elseif dtype == "poison" then local hrp = character:FindFirstChild("HumanoidRootPart") if hrp and not hrp:FindFirstChild("HazardPoison") then local poison = Instance.new("ParticleEmitter") poison.Name = "HazardPoison" poison.Texture = "rbxassetid://248625108" poison.Color = ColorSequence.new(Color3.fromRGB(80, 255, 80)) poison.Lifetime = NumberRange.new(0.5) poison.Rate = 20 poison.Parent = hrp Debris:AddItem(poison, 1) end end end -- Helper: Apply stun to a character local function applyStun(character, stunType, stunTime) local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then return end if stunType == "heavy" then local hrp = character:FindFirstChild("HumanoidRootPart") if hrp then hrp.Anchored = true task.delay(stunTime, function() if hrp then hrp.Anchored = false end end) end humanoid.WalkSpeed = 0 humanoid.JumpPower = 0 task.delay(stunTime, function() if humanoid then humanoid.WalkSpeed = 16 humanoid.JumpPower = 50 end end) elseif stunType == "light" then local origSpeed = humanoid.WalkSpeed local origJump = humanoid.JumpPower humanoid.WalkSpeed = math.max(4, origSpeed * 0.3) humanoid.JumpPower = math.max(10, origJump * 0.3) task.delay(stunTime, function() if humanoid then humanoid.WalkSpeed = origSpeed humanoid.JumpPower = origJump end end) end end -- Main pad setup local function setupPad(pad) local lastUse = 0 pad.Touched:Connect(function(hit) local now = tick() local debounceEnabled = getAttr(pad, "DebounceEnabled", DEFAULTS.DebounceEnabled) local debounceTime = getAttr(pad, "DebounceTime", DEFAULTS.DebounceTime) if debounceEnabled and (now - lastUse < debounceTime) then return end local character = hit.Parent local player = Players:GetPlayerFromCharacter(character) local hrp = character and character:FindFirstChild("HumanoidRootPart") if not (player and hrp) then return end if not pad:GetAttribute("HazardPad") then return end lastUse = now -- Fling logic (XYZ) local flingEnabled = getAttr(pad, "FlingEnabled", DEFAULTS.FlingEnabled) if flingEnabled then local flingRandom = getAttr(pad, "FlingRandom", DEFAULTS.FlingRandom) local x, y, z if flingRandom then local minX = getAttr(pad, "FlingRandomMinX", DEFAULTS.FlingRandomMinX) local maxX = getAttr(pad, "FlingRandomMaxX", DEFAULTS.FlingRandomMaxX) local minY = getAttr(pad, "FlingRandomMinY", DEFAULTS.FlingRandomMinY) local maxY = getAttr(pad, "FlingRandomMaxY", DEFAULTS.FlingRandomMaxY) local minZ = getAttr(pad, "FlingRandomMinZ", DEFAULTS.FlingRandomMinZ) local maxZ = getAttr(pad, "FlingRandomMaxZ", DEFAULTS.FlingRandomMaxZ) x = math.random(minX, maxX) y = math.random(minY, maxY) z = math.random(minZ, maxZ) else x = getAttr(pad, "FlingX", DEFAULTS.FlingX) y = getAttr(pad, "FlingY", DEFAULTS.FlingY) z = getAttr(pad, "FlingZ", DEFAULTS.FlingZ) end local finalVel = Vector3.new(x, y, z) local bv = Instance.new("BodyVelocity") bv.Velocity = finalVel bv.MaxForce = Vector3.new(1e5, 1e5, 1e5) bv.P = 1250 bv.Parent = hrp Debris:AddItem(bv, 0.5) end -- Play sound if present local soundName = getAttr(pad, "SoundTemplateName", DEFAULTS.SoundTemplateName) local soundTemplate = script:FindFirstChild(soundName) if soundTemplate and soundTemplate:IsA("Sound") then local sound = soundTemplate:Clone() sound.Parent = pad sound:Play() Debris:AddItem(sound, sound.TimeLength) end -- Damage logic local damageEnabled = getAttr(pad, "DamageEnabled", DEFAULTS.DamageEnabled) if damageEnabled then local damageType = string.lower(getAttr(pad, "DamageType", DEFAULTS.DamageType)) local damageAmount = getAttr(pad, "DamageAmount", DEFAULTS.DamageAmount) applyDamage(character, damageAmount, damageType) end -- Stun logic local stunEnabled = getAttr(pad, "StunEnabled", DEFAULTS.StunEnabled) if stunEnabled then local stunType = string.lower(getAttr(pad, "StunType", DEFAULTS.StunType)) local stunTime = getAttr(pad, "StunTime", DEFAULTS.StunTime) if stunType == "light" or stunType == "heavy" then applyStun(character, stunType, stunTime) end end end) end -- Initialize existing pads local hazardPadsFolder = script.Parent for _, pad in ipairs(hazardPadsFolder:GetDescendants()) do if pad:IsA("BasePart") and pad:GetAttribute("HazardPad") then setupPad(pad) end end -- Handle new pads being added at runtime hazardPadsFolder.DescendantAdded:Connect(function(desc) if desc:IsA("BasePart") and desc:GetAttribute("HazardPad") then setupPad(desc) end end) --[[ === ATTRIBUTE REFERENCE === Set these attributes on each pad (BasePart) as needed: - HazardPad (bool) -- Must be true for pad to be active - FlingEnabled (bool) - FlingX (number) - FlingY (number) - FlingZ (number) - FlingRandom (bool) - FlingRandomMinX (number) - FlingRandomMaxX (number) - FlingRandomMinY (number) - FlingRandomMaxY (number) - FlingRandomMinZ (number) - FlingRandomMaxZ (number) - DebounceEnabled (bool) - DebounceTime (number) - DamageEnabled (bool) - DamageType (string) -- "fire", "ice", "poison", "none" - DamageAmount (number) - StunEnabled (bool) - StunType (string) -- "none", "light", "heavy" - StunTime (number) - SoundTemplateName (string) -- Name of Sound under this script Pads with no attribute set will use the default values above. ]] make it that if the debounce works. and make it that it has custom death effects for players doing to damagetypes. fire turns the player completely black. even their accessories, the ice completely incases the player in ice. thats it. (the ice incasing coding.) local Players = game:GetService("Players") local player = Players:FindFirstChild("AlphonsoGames") if not player then return end -- Make all parts/accessories/etc completely black local function makeCharacterCompletelyBlack(character) for _, item in ipairs(character:GetDescendants()) do if item:IsA("BasePart") or item:IsA("MeshPart") then item.Color = Color3.new(0, 0, 0) item.Material = Enum.Material.SmoothPlastic elseif item:IsA("Accessory") then local handle = item:FindFirstChild("Handle") if handle and handle:IsA("BasePart") then handle.Color = Color3.new(0, 0, 0) handle.Material = Enum.Material.SmoothPlastic local mesh = handle:FindFirstChildWhichIsA("SpecialMesh") if mesh then mesh.VertexColor = Vector3.new(0, 0, 0) end end elseif item:IsA("Decal") or item:IsA("Shirt") or item:IsA("Pants") or item:IsA("ShirtGraphic") or item:IsA("CharacterMesh") then item:Destroy() end end end -- Encase the player in ice local function encaseInIce(player) local character = player.Character if not character or not character:FindFirstChild("HumanoidRootPart") then return end local hrp = character.HumanoidRootPart local humanoid = character:FindFirstChildWhichIsA("Humanoid") if not humanoid then return end -- Set BreakJointsOnDeath to false BEFORE killing humanoid.BreakJointsOnDeath = false -- Make them completely black makeCharacterCompletelyBlack(character) -- Freeze player humanoid.PlatformStand = true -- Ice block sizing local modelCFrame, modelSize = character:GetBoundingBox() local iceSize = modelSize + Vector3.new(3, 1.5, 3) local iceBlock = Instance.new("Part") iceBlock.Name = "IceEncasement" iceBlock.Size = iceSize iceBlock.CFrame = modelCFrame iceBlock.Material = Enum.Material.Ice iceBlock.Transparency = 0.3 iceBlock.BrickColor = BrickColor.new("Bright blue") iceBlock.CanCollide = true iceBlock.Anchored = false iceBlock.Parent = character -- Weld ice to player local weld = Instance.new("WeldConstraint") weld.Part0 = hrp weld.Part1 = iceBlock weld.Parent = iceBlock -- Play sound local sound = Instance.new("Sound") sound.SoundId = "rbxassetid://6092902279" sound.Volume = 5 sound.Parent = hrp sound:Play() sound.Ended:Connect(function() sound:Destroy() end) -- Kill the player humanoid:TakeDamage(9999) humanoid.Health = 0 humanoid.Maxhealth = 0 end -- Tool setup local tool = Instance.new("Tool") tool.Name = "Ice Encasing" tool.RequiresHandle = false if player:FindFirstChild("Backpack") then tool.Parent = player.Backpack end tool.Activated:Connect(function() encaseInIce(player) end) also make it that the pad cannot activate if the player is dead.
Updated files
v1
make it that there can be multiple template sounds. and can choose if it plays from the pad or player.
Updated files
v2
the debounce is supposed to give the pad a cooldown before activating again.
Updated files
v3
make it that it can play a sound if the player dies. (same for the plays from pad or player stuff.) (make it that the sound plays from the humanoidrootpart if chosen player.)
Updated files
v4
make the debounce per player.
Updated files
v5
--[[ HazardScript.lua Attribute-driven hazard pad script for Roblox. Supports: Fling (with XYZ vector), randomization, debounce, damage types, stun types, and more. Place this script under a folder containing hazard pads (BaseParts). Each pad should have relevant attributes set for custom behavior. Fling is now based on XYZ attributes, not pad orientation. Enhanced: Custom death effects for fire/ice, improved debounce, pad cannot activate if player is dead. Enhanced: Multiple template sounds, choose play location (pad/player). Debounce: Per-player cooldown before pad can activate for that player again. Enhanced: Play sound on player death, with play location option. ]] local Players = game:GetService("Players") local Debris = game:GetService("Debris") -- Default configuration (used if attribute is missing) local DEFAULTS = { FlingEnabled = true, FlingX = 0, FlingY = 0, FlingZ = 0, FlingRandom = false, FlingRandomMinX = 0, FlingRandomMaxX = 0, FlingRandomMinY = 0, FlingRandomMaxY = 0, FlingRandomMinZ = 0, FlingRandomMaxZ = 0, DebounceEnabled = true, DebounceTime = 0.5, DamageEnabled = false, DamageType = "none", -- "fire", "ice", "poison", "none" DamageAmount = 10, StunEnabled = false, StunType = "none", -- "none", "light", "heavy" StunTime = 1.5, SoundTemplateNames = "sfx", -- Comma-separated list of sound template names SoundPlayLocation = "pad", -- "pad" or "player" DeathSoundTemplateNames = "", -- Comma-separated list of death sound template names DeathSoundPlayLocation = "pad" -- "pad" or "player" } -- Helper: Get attribute or fallback to default local function getAttr(pad, attr, default) local val = pad:GetAttribute(attr) if val == nil then return default end return val end -- Make all parts/accessories/etc completely black local function makeCharacterCompletelyBlack(character) for _, item in ipairs(character:GetDescendants()) do if item:IsA("BasePart") or item:IsA("MeshPart") then item.Color = Color3.new(0, 0, 0) item.Material = Enum.Material.SmoothPlastic elseif item:IsA("Accessory") then local handle = item:FindFirstChild("Handle") if handle and handle:IsA("BasePart") then handle.Color = Color3.new(0, 0, 0) handle.Material = Enum.Material.SmoothPlastic local mesh = handle:FindFirstChildWhichIsA("SpecialMesh") if mesh then mesh.VertexColor = Vector3.new(0, 0, 0) end end elseif item:IsA("Decal") or item:IsA("Shirt") or item:IsA("Pants") or item:IsA("ShirtGraphic") or item:IsA("CharacterMesh") then item:Destroy() end end end -- Helper: Play one or more template sounds, at pad or player (or HRP if available) local function playTemplateSound(templateNamesAttr, playLocation, pad, player, character) if not templateNamesAttr or templateNamesAttr == "" then return end local soundNames = {} for name in string.gmatch(templateNamesAttr, "([^,]+)") do table.insert(soundNames, name:match("^%s*(.-)%s*$")) end if #soundNames == 0 then return end local chosenName = soundNames[math.random(1, #soundNames)] local soundTemplate = script:FindFirstChild(chosenName) if soundTemplate and soundTemplate:IsA("Sound") then local sound = soundTemplate:Clone() if playLocation == "player" and character then local hrp = character:FindFirstChild("HumanoidRootPart") if hrp then sound.Parent = hrp else sound.Parent = character end else sound.Parent = pad end sound:Play() Debris:AddItem(sound, sound.TimeLength) end end -- Encase the player in ice (death effect) local function encaseInIce(player) local character = player.Character if not character or not character:FindFirstChild("HumanoidRootPart") then return end local hrp = character.HumanoidRootPart local humanoid = character:FindFirstChildWhichIsA("Humanoid") if not humanoid then return end -- Set BreakJointsOnDeath to false BEFORE killing humanoid.BreakJointsOnDeath = false -- Make them completely black makeCharacterCompletelyBlack(character) -- Freeze player humanoid.PlatformStand = true -- Ice block sizing local modelCFrame, modelSize = character:GetBoundingBox() local iceSize = modelSize + Vector3.new(3, 1.5, 3) local iceBlock = Instance.new("Part") iceBlock.Name = "IceEncasement" iceBlock.Size = iceSize iceBlock.CFrame = modelCFrame iceBlock.Material = Enum.Material.Ice iceBlock.Transparency = 0.3 iceBlock.BrickColor = BrickColor.new("Bright blue") iceBlock.CanCollide = true iceBlock.Anchored = false iceBlock.Parent = character -- Weld ice to player local weld = Instance.new("WeldConstraint") weld.Part0 = hrp weld.Part1 = iceBlock weld.Parent = iceBlock -- Play sound local sound = Instance.new("Sound") sound.SoundId = "rbxassetid://6092902279" sound.Volume = 5 sound.Parent = hrp sound:Play() sound.Ended:Connect(function() sound:Destroy() end) -- Kill the player humanoid:TakeDamage(9999) humanoid.Health = 0 humanoid.MaxHealth = 0 end -- Custom death effect for fire (turns player black) local function fireDeathEffect(player) local character = player.Character if not character then return end makeCharacterCompletelyBlack(character) local humanoid = character:FindFirstChildWhichIsA("Humanoid") if humanoid then humanoid:TakeDamage(9999) humanoid.Health = 0 humanoid.MaxHealth = 0 end end -- Helper: Apply damage to a character local function applyDamage(character, amount, dtype) local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then return end humanoid:TakeDamage(amount) -- Optionally, apply status effect (visuals, etc.) if dtype == "fire" then if not character:FindFirstChild("HazardFire") then local fire = Instance.new("Fire") fire.Name = "HazardFire" fire.Heat = 10 fire.Size = 5 fire.Parent = character:FindFirstChild("HumanoidRootPart") or character Debris:AddItem(fire, 2) end elseif dtype == "ice" then local hrp = character:FindFirstChild("HumanoidRootPart") if hrp and not hrp:FindFirstChild("HazardIce") then local ice = Instance.new("ParticleEmitter") ice.Name = "HazardIce" ice.Texture = "rbxassetid://284205403" ice.Color = ColorSequence.new(Color3.fromRGB(150, 200, 255)) ice.Lifetime = NumberRange.new(0.5) ice.Rate = 20 ice.Parent = hrp Debris:AddItem(ice, 1) end elseif dtype == "poison" then local hrp = character:FindFirstChild("HumanoidRootPart") if hrp and not hrp:FindFirstChild("HazardPoison") then local poison = Instance.new("ParticleEmitter") poison.Name = "HazardPoison" poison.Texture = "rbxassetid://248625108" poison.Color = ColorSequence.new(Color3.fromRGB(80, 255, 80)) poison.Lifetime = NumberRange.new(0.5) poison.Rate = 20 poison.Parent = hrp Debris:AddItem(poison, 1) end end end -- Helper: Apply stun to a character local function applyStun(character, stunType, stunTime) local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then return end if stunType == "heavy" then local hrp = character:FindFirstChild("HumanoidRootPart") if hrp then hrp.Anchored = true task.delay(stunTime, function() if hrp then hrp.Anchored = false end end) end humanoid.WalkSpeed = 0 humanoid.JumpPower = 0 task.delay(stunTime, function() if humanoid then humanoid.WalkSpeed = 16 humanoid.JumpPower = 50 end end) elseif stunType == "light" then local origSpeed = humanoid.WalkSpeed local origJump = humanoid.JumpPower humanoid.WalkSpeed = math.max(4, origSpeed * 0.3) humanoid.JumpPower = math.max(10, origJump * 0.3) task.delay(stunTime, function() if humanoid then humanoid.WalkSpeed = origSpeed humanoid.JumpPower = origJump end end) end end -- Debounce table for per-player per-pad cooldown local padDebounce = {} -- Main pad setup local function setupPad(pad) padDebounce[pad] = padDebounce[pad] or {} pad.Touched:Connect(function(hit) local character = hit.Parent local player = Players:GetPlayerFromCharacter(character) local hrp = character and character:FindFirstChild("HumanoidRootPart") local humanoid = character and character:FindFirstChildOfClass("Humanoid") if not (player and hrp and humanoid) then return end -- Don't activate if player is dead if humanoid.Health <= 0 then return end if not pad:GetAttribute("HazardPad") then return end -- Per-player debounce local debounceEnabled = getAttr(pad, "DebounceEnabled", DEFAULTS.DebounceEnabled) local debounceTime = getAttr(pad, "DebounceTime", DEFAULTS.DebounceTime) local now = tick() local lastUse = padDebounce[pad][player] or 0 if debounceEnabled and (now - lastUse < debounceTime) then return end padDebounce[pad][player] = now -- Fling logic (XYZ) local flingEnabled = getAttr(pad, "FlingEnabled", DEFAULTS.FlingEnabled) if flingEnabled then local flingRandom = getAttr(pad, "FlingRandom", DEFAULTS.FlingRandom) local x, y, z if flingRandom then local minX = getAttr(pad, "FlingRandomMinX", DEFAULTS.FlingRandomMinX) local maxX = getAttr(pad, "FlingRandomMaxX", DEFAULTS.FlingRandomMaxX) local minY = getAttr(pad, "FlingRandomMinY", DEFAULTS.FlingRandomMinY) local maxY = getAttr(pad, "FlingRandomMaxY", DEFAULTS.FlingRandomMaxY) local minZ = getAttr(pad, "FlingRandomMinZ", DEFAULTS.FlingRandomMinZ) local maxZ = getAttr(pad, "FlingRandomMaxZ", DEFAULTS.FlingRandomMaxZ) x = math.random(minX, maxX) y = math.random(minY, maxY) z = math.random(minZ, maxZ) else x = getAttr(pad, "FlingX", DEFAULTS.FlingX) y = getAttr(pad, "FlingY", DEFAULTS.FlingY) z = getAttr(pad, "FlingZ", DEFAULTS.FlingZ) end local finalVel = Vector3.new(x, y, z) local bv = Instance.new("BodyVelocity") bv.Velocity = finalVel bv.MaxForce = Vector3.new(1e5, 1e5, 1e5) bv.P = 1250 bv.Parent = hrp Debris:AddItem(bv, 0.5) end -- Play sound(s) if present local soundTemplateNames = getAttr(pad, "SoundTemplateNames", DEFAULTS.SoundTemplateNames) local soundPlayLocation = string.lower(getAttr(pad, "SoundPlayLocation", DEFAULTS.SoundPlayLocation)) playTemplateSound(soundTemplateNames, soundPlayLocation, pad, player, character) -- Damage logic local damageEnabled = getAttr(pad, "DamageEnabled", DEFAULTS.DamageEnabled) if damageEnabled then local damageType = string.lower(getAttr(pad, "DamageType", DEFAULTS.DamageType)) local damageAmount = getAttr(pad, "DamageAmount", DEFAULTS.DamageAmount) applyDamage(character, damageAmount, damageType) -- Custom death effects for fire/ice if humanoid.Health - damageAmount <= 0 then -- Play death sound if configured local deathSoundTemplateNames = getAttr(pad, "DeathSoundTemplateNames", DEFAULTS.DeathSoundTemplateNames) local deathSoundPlayLocation = string.lower(getAttr(pad, "DeathSoundPlayLocation", DEFAULTS.DeathSoundPlayLocation)) playTemplateSound(deathSoundTemplateNames, deathSoundPlayLocation, pad, player, character) if damageType == "fire" then fireDeathEffect(player) elseif damageType == "ice" then encaseInIce(player) end end end -- Stun logic local stunEnabled = getAttr(pad, "StunEnabled", DEFAULTS.StunEnabled) if stunEnabled then local stunType = string.lower(getAttr(pad, "StunType", DEFAULTS.StunType)) local stunTime = getAttr(pad, "StunTime", DEFAULTS.StunTime) if stunType == "light" or stunType == "heavy" then applyStun(character, stunType, stunTime) end end end) end -- Initialize existing pads local hazardPadsFolder = script.Parent for _, pad in ipairs(hazardPadsFolder:GetDescendants()) do if pad:IsA("BasePart") and pad:GetAttribute("HazardPad") then setupPad(pad) end end -- Handle new pads being added at runtime hazardPadsFolder.DescendantAdded:Connect(function(desc) if desc:IsA("BasePart") and desc:GetAttribute("HazardPad") then setupPad(desc) end end) --[[ === ATTRIBUTE REFERENCE === Set these attributes on each pad (BasePart) as needed: - HazardPad (bool) -- Must be true for pad to be active - FlingEnabled (bool) - FlingX (number) - FlingY (number) - FlingZ (number) - FlingRandom (bool) - FlingRandomMinX (number) - FlingRandomMaxX (number) - FlingRandomMinY (number) - FlingRandomMaxY (number) - FlingRandomMinZ (number) - FlingRandomMaxZ (number) - DebounceEnabled (bool) - DebounceTime (number) -- Per-player cooldown time - DamageEnabled (bool) - DamageType (string) -- "fire", "ice", "poison", "none" - DamageAmount (number) - StunEnabled (bool) - StunType (string) -- "none", "light", "heavy" - StunTime (number) - SoundTemplateNames (string) -- Comma-separated list of Sound names under this script - SoundPlayLocation (string) -- "pad" or "player" (where to play the sound) - DeathSoundTemplateNames (string) -- Comma-separated list of Sound names under this script for death - DeathSoundPlayLocation (string) -- "pad" or "player" (where to play the death sound) Pads with no attribute set will use the default values above. ]] make it that the sound plays from the hit player.
Updated files
v6