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

i need help with this code idk whats wrong with it the leader board wont come up?

Asked by 5 years ago
Edited by BlackOrange3343 5 years ago
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData")

local starterRebirthAmount = 5000



local cooldown = 1



ReplicatedStorage.Remotes.Lift.OnServerEvent:connect(function(player)

if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end

local Debounce = remoteData[player.name].Debounce

if not Debounce then

Debounce.Value = true

player.leaderstats.Strength.Value = player.leaderstats.Strength.Value + 25 * (player.leaderstats.Rebirths.Value + 1)

wait(cooldown)

Debounce.value = false

end

end)



ReplicatedStorage.Remotes.Rebirth.OnServerInvoke = function (player)

if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end

local rebirths = player.leaderstats.Rebiths

if player.leaderstats.Strength.Value >= (math.floor((starterRebirthAmount + (rebirths.Value) *math.sqrt(5000)))) then

rebirths.Value = rebirths.Value + 1

player.leaderstats.Strength.Value = 0

player:LoadCharacter

return true

else return "NotEnoughStregth"

end

end

plz help

0
as im not allowed to give u a code straight up and i dont feel like explaining everything, add me on discord if u want and ill give u the code, just change the names and values. my discord is world killer #4891, ill remove this comment if this is not allowed either Gameplayer365247v2 1055 — 5y

Answer this question