local Humanoid = script.Parent.Zombie
function PwntX_X()
local tag = Humanoid:findFirstChild(“creator”)
if tag ~= nil then
if tag.Value ~= nil then
local Leaderstats = tag.Value:FindFirstChild(“status”)
local gear = game.ReplicatedStorage.Items:WaitForChild(‘LaserGun’)
if Leaderstats ~= nil then
Leaderstats.Money.Value = Leaderstats.Money.Value + 25 --Change Money to the stat that is increased.
gear:Clone().Parent = game.Players.LocalPlayer.Backpack -- **I fixed this so it issues it to the player's backpack, not their name.**
– end
end
wait(0.1)
script:Destroy()
end
end
end
You’re trying to get a player who is named “PlayerName”. That probably won’t be a real player. You have to replace PlayerName with the player that you want to give the tool to.