Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent
- local Stats = Player:WaitForChild("Stats")
- local Coins = Stats:WaitForChild("Coins")
- local DNA = Stats:WaitForChild("DNA")
- local StrengthMax = Stats:WaitForChild("StrengthMax")
- script.Parent.Parent.MouseButton1Click:Connect(function()
- local Settings = require(game.ReplicatedStorage:WaitForChild("DNA"))
- if Coins.Value >= Settings[script.Parent.Value]["Cost"] then
- if script.Parent.Parent.TheTextFromBuy.Text == "Buy" then
- StrengthMax.Value = Settings[script.Parent.Value]["Space"]
- Coins.Value = Coins.Value - Settings[script.Parent.Value]["Cost"]
- DNA.Value = Settings[script.Parent.Value]["This"] +1
- end
- end
- end)
- while true do
- wait()
- if DNA.Value > script.Parent.Value then
- wait()
- script.Parent.Parent.TheTextFromBuy.Text = "Owned"
- else
- wait()
- script.Parent.Parent.TheTextFromBuy.Text = "Buy"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement