its a serverscriptservice for some reason it wont work.
pcall(function()
game.Players.PlayerAdded:connect(function(player)
if game.GamePassService:PlayerHasPass(player,340209466) then
local cashmoney = game.ServerStorage.MoneyStorage:WaitForChild(player.Name)
cashmoney.Value = cashmoney.Value + 5000
player.CharacterAdded:connect(function(char)
if char:WaitForChild("Humanoid") then
char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 25
char.Humanoid.Health = char.Humanoid.Health + 25
char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed + 8
game.Lighting.SpaceSword:Clone().Parent=player.Backpack
end
end)
elseif game.GamePassService:PlayerHasPass(player,340204818) then
local cashmoney = game.ServerStorage.MoneyStorage:WaitForChild(player.Name)
cashmoney.Value = cashmoney.Value + 1000
player.CharacterAdded:connect(function(char)
if char:WaitForChild("Humanoid") then
game.Lighting.FrostSword:Clone().Parent=player.Backpack
end
end)

1 comment
wrong error apparently, but the problem is that max health,swords, and walkspeed doesnt load, but money does