Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent
- script.Parent.MouseButton1Down:Connect(function()
- local store = game.ReplicatedStorage:WaitForChild("Tools")
- local sel = store:WaitForChild(script.Parent.Parent.Name)
- if player:FindFirstChild("Tools") and player.Tools:FindFirstChild(script.Parent.Parent.Name) and player.Tools[script.Parent.Parent.Name].Value == true then
- player:WaitForChild("ToolEquiped").Value = script.Parent.Parent.Name
- player.Tools[script.Parent.Parent.Name].Value = true
- else
- local stats = player:WaitForChild("leaderstats")
- local coins = stats:WaitForChild("Coins")
- if coins.Value >= sel:WaitForChild("Price").Value then
- player.Tools[script.Parent.Parent.Name].Value = true
- player:WaitForChild("ToolEquiped").Value = script.Parent.Parent.Name
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement