Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local replicatedStorage = game:GetService("ReplicatedStorage")
- local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData")
- local starterRebirthAmount = 1000000
- local cooldown = 1
- local mapmulti = game.ReplicatedStorage.mapmultiplier.Value
- replicatedStorage.Remotes.Lifty.OnServerEvent:Connect(function(player, added)
- if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end
- local debounce = remoteData[player.Name].Debounce
- if not debounce.Value and (player.leaderstats.Radiation.Value + added * mapmulti * (player.leaderstats.Rebirths.Value + 1)) >= player.BackpackShop.BackpackV.Value then
- debounce.Value = true
- player.leaderstats.Radiation.Value = player.BackpackShop.BackpackV.Value
- wait(cooldown)
- debounce.Value = false
- else if not debounce.Value and (player.leaderstats.Radiation.Value + added * mapmulti * (player.leaderstats.Rebirths.Value + 1)) <= player.BackpackShop.BackpackV.Value then
- debounce.Value = true
- --print'mother god'
- --if (player.leaderstats.Radiation.Value + moneyadded * mapmulti * (player.leaderstats.Rebirths.Value + 1)) >= player.
- player.leaderstats.Radiation.Value = player.leaderstats.Radiation.Value + added * mapmulti * (player.leaderstats.Rebirths.Value + 1)
- wait(cooldown)
- debounce.Value = false
- end
- end
- end)
- replicatedStorage.Remotes.Rebirth.OnServerInvoke = function(player)
- if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end
- local rebirths = player.leaderstats.Rebirths
- if player.leaderstats.Energy.Value >= (math.floor((starterRebirthAmount + (rebirths.Value) * math.sqrt(100000000)))) then
- rebirths.Value = rebirths.Value + 1
- player.leaderstats.Energy.Value = 0
- player.leaderstats.Radiation.Value = 0
- player:WaitForChild("BackpackShop").Equipped.Value = "Starter Pack"
- player:WaitForChild("ToolShop").Equipped.Value = "Starter Star"
- player:WaitForChild("BackpackShop").BackpackV.Value = 10
- player:LoadCharacter()
- return true
- else return "NotEnoughEnergy"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement