i wanna make a idle tycoon were when you go into a shop you can place a computer and when a progress bar fills at the top of the computer money will be added to the players account and i want a shop to get better equipment how to i do it ?
COMMUNITY QUESTION
i need help making a idle tycoon can someone help me ? i need help
1 answer
you can do this
this is For The LeaderBoard
game.Players.PlayerAdded:connect(function(plr)
local stats = Instance.new('IntValue',plr)
stats.Name = 'leaderstats'
local Money = Instance.new('IntValue',stats)
Money.Name = 'Money'
Money.Value = 0
this will add money
give = false
money = game.Players.LocalPlayer.leaderstats.Money
if give == false then
money.Value = Money.Value + 50 ---you can change 50 to what you want it to increase by
give = true
end
this is really basic script if you want to make a progress bar you will need to learn about GUI and, tweenSize so it will be smooth, And for the Shop Do this
ocal player = game.Players.LocalPlayer
local Rep = game:GetService("ReplicatedStorage")
bought = false
cost = 100
script.Parent.MouseButton1Click:connect(function()
if bought == true then
script.Parent.Text = "Already Bought"
wait(1)
script.Parent.Text = "Bought"
else
if player.leaderstats.Money.Value < cost then
script.Parent.Text = "Not Enough"
wait(1)
script.Parent.Text = "Buy $100"
else
if player.leaderstats.Money.Value >= cost then
script.Parent.Text = "Bought"
Rep.Katana:Clone().Parent = player.Backpack
Rep.Katana:Clone().Parent = player.StarterGear -- Change Katana to what you want it to be
bought = true
player.leaderstats.Money.Value = player.leaderstats.Money.Value - cost
end
end
end
end)
ik its a lot of lines but i hope it helped You can Go and Watch AlvinBlox for basic scripting tutorial :D
3 comments
0
you will also need to make the gui, Go here to see how to do it: https://www.youtube.com/watch?v=qpxVRGLPXnA
0
and Go here to see The cloaning: https://www.youtube.com/watch?v=Hcve7MHeGLc&t=806s ik its a lot but its work Learning
0
@FilthyMonsterPlays were would i put each code ?
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
This is not a request site, please show us that you put in effort to script it. This site is also for if you have scripting problems. Please post your script if you are stuck on a part. Thanks