Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local joinEvent = game.ReplicatedStorage:FindFirstChild("JoinJob")
- --Functionality
- function join(player, job)
- if job and game.Teams:FindFirstChild(job) and player.Team ~= game.Teams:FindFirstChild(job) then
- print(job)
- player.Team = game.Teams:FindFirstChild(job)
- while player.Team == game.Teams:FindFirstChild(job) do
- wait(300)
- player.leaderstats.Money.Value += game.Teams:FindFirstChild(job).MoneyPer5Minutes.Value
- end
- end
- end
- game.Players.PlayerAdded:Connect(function(player)
- local leaderstats = Instance.new("Folder", player)
- leaderstats.Name = "leaderstats"
- local money = Instance.new("IntValue", leaderstats)
- money.Name = "Money"
- end)
- --Connections
- joinEvent.OnServerEvent:Connect(join)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement