[Don’t use Lighting!]
It is not advised to store non-lighting objects inside of the LightingService. This is a deprecated practice that has been superseded by services such as ReplicatedStorage and ServerStorage.
I recommend storing tools inside of ServerStorage to prevent exploiting and unnecessary memory load.
IF you were to place the folders in ReplicatedStorage, exploiters would easily be able to grab the tools with a single line of code. As for the memory load, ReplicatedStorage would load the tools on both the client and the server (which is unnecessary, we only need to load them on the server).
[Scripting]
As for the coding itself, it should be quite simple.
Simply create a server script stored inside ServerScriptService and name it whatever.
Your post mentioned that you want to give players tools on death (that would mean as soon as they die they receive the tools, and then lose them due to respawn), but I assume you meant you want them to have new tools on respawn.
To do this we need to use an event to listen for character respawn.
game.Players.PlayerAdded:Connect(function(plr) -- listen for player join
plr.CharacterAdded:Connect(function(char) -- listen for character spawn
end)
end)
It’s that simple! Just listen for player join, then attach a listener to the player to detect when their character spawns. This function will only run when the character spawns. (Including when the player joins the game and their character spawns for the 1st time.)
Now for adding the tools to the player.
local SS = game:GetService("ServerStorage") -- where we stored our tools folder
local tools = SS:WaitForChild("Tools") -- the name of our tools folder
--// Give Tool Helper Function //--
local function GiveTool(plr, tool)
local plrTool = tool:Clone()
plrTool.Parent = plr.Backpack
return plrTool
end
--// Get Random Child From Each Child //--
local function GetRandFromEach(folder)
local randTools = {}
for _, set in pairs(tools:GetChildren()) do
local setChildren = set:GetChildren()
if set:IsA("Folder") and #setChildren > 0 then -- make sure set is a folder and has children.
local setRandom = setChildren[math.random(1, #setChildren)] -- grabs random tool from set.
table.insert(randTools, setRandom)
end
end
return randTools
end
game.Players.PlayerAdded:Connect(function(plr) -- listen for player join
plr.CharacterAdded:Connect(function(char) -- listen for character spawn
local tools = GetRandFromEach(tools)
for _, tool in ipairs(tools) do -- may have to change to 'pairs' instead of 'ipairs'.
GiveTool(plr, tool)
end
end)
end)
This code should work in theory, I wrote this all on the forum so it has not been tested. If it doesn’t work or you have further questions feel free to reply to this!
Hope this helped. 