I found this script on this random area 51 game, that was abandoned. basically it's supposed to save the player's weapons, give them weapons from a npc that they can talk to which will sell them for a certain price and make sure to not give copies of each weapon.
------------KeepWeapons on death script--------- --makes you keep any weapons you pick up after you die- --and respawn.
--simply put the script in the map and it will work.
local wm = Instance.new("Model") wm.Name = "Weaps"
function give(weap, player) --add a weap to a player's weaps --return if they allready have a copy for _, w in ipairs(player.Weaps:GetChildren()) do if w.Name == weap.Name then return end end --return if the weaps is a startpack one for _, w in ipairs(game.StarterPack:GetChildren()) do if w.Name == weap.Name then return end end --add it to thier weaps weap:clone().Parent = player.Weaps end
game.Players.PlayerAdded:connect(function(p)
wm:clone().Parent = p
wait()
p.Character.PlayerAdded:connect(function(wep)
if wep.className == "Tool" then
give(wep, p)
end
end)
p.Changed:connect(function(pr)
if pr == "Character" then
for _, w in ipairs(p.Weaps:GetChildren()) do
w:clone().Parent = p.Backpack
end
p.Character.ChildAdded:connect(function(wep)
if wep.className == "Tool" then
give(wep, p)
end
end)
end
end)
p.Backpack.ChildAdded:connect(function(h)
if h.className == "HopperBin" then
give(h, p)
end
end)
end)
This is not a request website, so noone will write a full script for you. It's about asking for help so I can only help you with giving you some resources to learn how to convert your scripts to be FE compatible.
Closed as Not Constructive by User#19524
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?