local replicatedStorage = game:GetService("ReplicatedStorage")
local starterRebirthAmount = 1000000
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").Darta
strengthToRebirth.Text = "You Need at least "..math.floor((starterRebirthAmount + (rebirths.Value) * math.sqrt(50000000))).."Harta to darta"
mainButton.MouseButton1Click:Connect(function()
mainFrame.Visible = not mainFrame.Visible
end)
rebirthButton.MouseButton1Click:Connect(function()
local result = replicatedStorage:FindFirstChild("Remotes").Rebirth:InvokeServer()
if result == true then
rebirthButton.Text = "Succsesfully darta"
wait(1)
rebirthButton.Text = "CLICK HERE TO DARTA"
else if result == "NotEnoughHarta" then
rebirthButton.Text = "Not Enough Harta"
wait(1)
rebirthButton.Text = "CLICK HERE TO DARTA"
end
end
rebirths:GetPropertyChangedSignal("Value"):Connent(function()
strengthToRebirth.Text = "You need at least"..(math.floor((starterRebirthAmount + (rebirths.Value) * math.sqrt(50000000)))).."Harta to Darta"
end)
end)
COMMUNITY QUESTION
FindFirstChid is not a valid member of Folder ERROR in 22 th line?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Idk where the heck line 22 is but judging from the title, check your spelling.
please put all of your code in a code block this hurts my eyes