I am trying to make a zombie game for me and my friends to play but I don't know how to make it so you gain cash for each kill. I want it to be different for each different zombie.
Info: The currency is "Cash" Here is also the leaderboard script:
print("Cash Leaderboard Loaded") function onPlayerEntered(newPlayer) local stats = Instance.new("IntValue") stats.Name = "leaderstats" local cash = Instance.new("IntValue") cash.Name = "Cash" cash.Value = 50 cash.Parent = stats stats.Parent = newPlayer end game.Players.ChildAdded:connect(onPlayerEntered)
Thank you to anyone that helps
Put a script inside the zombies Humanoid with an if statement like:
if script.Parent.Health == 0 then value = value +1
Every time you kill one the cash would increase, to make this work you'd have to increase the value of the "cash.Value" wherever that is stored.