Advertisement
Guest User

Untitled

a guest
Aug 16th, 2022
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. local cost = 600
  2.  
  3. local ss = game:GetService("ServerStorage")
  4. local tools = ss.Tools
  5. local n = script.Parent.Parent.ToolName.Value
  6.  
  7. script.Parent.Triggered:Connect(function(p)
  8. print("d1")
  9. if p:WaitForChild("leaderstats"):WaitForChild("Coins").Value >= cost then
  10. print("d2")
  11. p.leaderstats.Coins.Value -= cost
  12. local tc = tools:WaitForChild(n):Clone()
  13. tc.Parent = p.StarterGear
  14. p.Character:BreakJoints()
  15.  
  16. end
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement