Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function setup(plr)
- local c1 = coroutine.wrap(function()
- local ls = Instance.new("Folder",plr)
- ls.Name = "leaderstats"
- local jm = Instance.new("NumberValue",ls)
- jm.Name = "JumpMoney"
- jm.Value = 0
- local jp = Instance.new("NumberValue",ls)
- jp.Name = "Power"
- jp.Value = 25
- local rb = Instance.new("NumberValue",ls)
- rb.Name = "Rebirths"
- rb.Value = 0
- local powerCost = 10
- local rebirthCost = 25000
- plr.CharacterAdded:connect(function(char)
- wait()
- local hum = char:FindFirstChildOfClass("Humanoid")
- local c2 = coroutine.wrap(function()
- while true do
- ypcall(function()hum.JumpPower=jp.Value end)
- wait()
- end
- end) c2()
- hum.Jumping:connect(function()
- jm.Value = jm.Value + (jp.Value-24)*(rb.Value+1)
- end)
- end)
- plr.Chatted:connect(function(msg)
- local msg2 = msg:lower()
- if string.sub(msg2,1,8)=="/upgrade"then
- if jm.Value>(powerCost-1)then
- local hint = Instance.new("Hint",plr.PlayerGui)
- hint.Text = "Successfully purchased Power Upgrade for "..powerCost..". Your jump power is now "..(jp.Value+2).."."
- jm.Value = jm.Value - powerCost
- jp.Value = jp.Value + 2
- powerCost = math.floor(powerCost*1.5)
- wait(3)
- hint.Text = ""
- hint:Destroy()
- else
- local hint = Instance.new("Hint",plr.PlayerGui)
- hint.Text = "You need "..(powerCost-jm.Value).." more J$ to buy a Power Upgrade."
- wait(3)
- hint.Text = ""
- hint:Destroy()
- end
- end
- if string.sub(msg2,1,8)=="/rebirth"then
- if jm.Value>(rebirthCost-1)then
- local hint = Instance.new("Hint",plr.PlayerGui)
- hint.Text = "Successfully purchased Rebirth for "..rebirthCost.."!"
- jm.Value = 0
- jp.Value = 25
- powerCost = math.floor(10+(rb.Value*1.2))
- rebirthCost = math.floor(rebirthCost*1.75)
- rb.Value = rb.Value + 1
- wait(3)
- hint.Text = ""
- hint:Destroy()
- else
- local hint = Instance.new("Hint",plr.PlayerGui)
- hint.Text = "You need "..(rebirthCost-jm.Value).." more J$ to rebirth."
- wait(3)
- hint.Text = ""
- hint:Destroy()
- end
- end
- end)
- plr:LoadCharacter()
- end) c1()
- end
- game:GetService("Players").PlayerAdded:connect(function(plr)
- setup(plr)
- end)
- for _,i in pairs(game:GetService("Players"):GetPlayers())do
- setup(i)
- wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement