Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

i need help making a idle tycoon can someone help me ? i need help

Asked by 7 years ago

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 ?

0
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 DeveloperSolo 370 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

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

0
you will also need to make the gui, Go here to see how to do it: https://www.youtube.com/watch?v=qpxVRGLPXnA FilthyMonsterPlays 8 — 7y
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 FilthyMonsterPlays 8 — 7y
0
@FilthyMonsterPlays were would i put each code ? AleeY21212 -5 — 7y
Ad

Answer this question