Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function OnTouched(hit)
- local human = hit.Parent:FindFirstChild("Humanoid")
- if human then
- for index, value in pairs(hit.Parent:GetChildren()) do
- if value.Name == "Box" then
- local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
- plr.leaderstats.Money.Value += 100
- value:Destroy()
- end
- end
- end
- end
- script.Parent.Touched:Connect(OnTouched)
Advertisement
Add Comment
Please, Sign In to add comment