here is the code on the local script:
local replicatedStorage = game:GetService("ReplicatedStorage")
local starterRebirthAmount = 5000
local player = game.Players.LocalPlayer
local mainFrame = script.Parent:WaitForChild("MainFrame")
local rebirthMenu = mainFrame:WaitForChild("RebirthMenu")
local mainButton = script.Parent:WaitForChild("MainButton")
local rebirthButton = rebirthMenu:WaitForChild("RebirthButton")
local strengthToRebirth = rebirthMenu:WaitForChild("StrengthToRebirth")
local rebirths = player:WaitForChild("leaderstats").Rebirths
strengthToRebirth.Text = "You need at least "..math.floor((starterRebirthAmount + (rebirths.Value) * math.sqrt(50000000))).."strength to rebirth"
mainButton.MouseButton1Click:Connect(function()
mainFrame.Visible = not mainFrame.Visible
end)
rebirthButton.MouseButton1Click:Connect(function()
local result = replicatedStorage.Remotes.Rebirth:FireServer()
if result == true then
rebirthButton.Text = "Nice Job 8D"
wait(5)
rebirthButton.Text = "CLICK HERE TO REBIRTH"
elseif result == "NotEnoughStrength" then
rebirthButton.Text = "Sorry :'("
wait(1)
rebirthButton.Text = "CLICK HERE TO REBIRTH"
end
end)
rebirths:GetPropertyChangedSignal("Value"):Connect(function()
strengthToRebirth.Text = "You need at least "..math.floor((starterRebirthAmount + (rebirths.Value) * math.sqrt(50000000))).."strength to rebirth"
end)
and here is the normal script
local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData")
local starterRebirthAmount = 5000
local rebirth = game:GetService("ReplicatedStorage").Remotes.Rebirth
local cooldown = 0.1
replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player)
if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end
local debounce = remoteData:WaitForChild(player.Name).Debounce
if debounce.Value == false then
debounce.Value = true
player.leaderstats.Strength.Value = player.leaderstats.Strength.Value + 1 * (player.leaderstats.Rebirths.Value + 1)
wait(cooldown)
debounce.Value = false
end
end)
function rebirth.OnServerInvoke:Connect(player)
if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end
local rebirths = player.leaderstats.Rebirths
if player.leaderstats.Strength.Value >= (math.floor((starterRebirthAmount + (rebirths.Value) * math.sqrt(50000000)))) then
rebirths.Value = rebirths.Value + 1
player.leaderstats.Strength.Value = 0
player:LoadCharacter()
return true
else return "NotEnoughStrength"
end
end
and the output:
21:25:56.263 - OnServerInvoke is not a valid member of RemoteEvent
21:25:56.269 - Stack Begin
21:25:56.273 - Script 'ServerScriptService.Remotes', Line 26
21:25:56.275 - Stack End
more details will be shown, I think there was an update that messed this up... or I'm just dumb

4 comments
No problem! Glad I could help.
there's another thing wrong with my script though. It's in the recent scipts. i forgot to put the output
Post another question, like I said.
Oh, you did. Looking at it now.