Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local m9button = ScreenGui:WaitForChild("Frame").m9button.BUY --change this to wherever the button is located
- script.Parent.Frame.m9button.BUY.Text = 'BUY - 500$P'
- m9button.MouseButton1Click:Connect(function()
- local amount = 500
- if Player.Backpack:FindFirstChild('M9') or Player.Character:FindFirstChild('M9') then
- costText.Text = 'You have already bought this item!'
- wait(3)
- costText.Text = ''
- else
- if Player.leaderstats.Points.Value >= amount then
- ToolPurchase:FireServer("M9", Player.Backpack.Inventory.HasM9, amount) --for the second argument just remove the value
- else
- local pointsrequired = amount - currency.Value
- costText.Text = 'You need '..pointsrequired..' more Party Points to buy this item!'
- wait(2)
- costText.Text = ''
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment