local replicatedStorage = game:GetService("ReplicatedStorage")
local starterRebirthAmount = 5000
local player = game.Players.LocalPlayer
local mainFrame = script.Parent:WaitForChild("MainFrame") --SHORTCUT FOR MAINFRAME
local rebirthMenu = mainFrame:WaitForChild("RebirthMenu") --SHORT FOR REBIRTHMENU
local mainButton = script.Parent:WaitForChild("MainButton") --BUTTON FOR MAIN BUTTON
local rebirthButton = rebirthMenu:WaitForChild("RebirthButton") --BUTTON FOR REBIRTH BUTTON
rebirthButton.Text = "Click to Rebirth"
local strengthToRebirth = rebirthMenu:WaitForChild("StrengthToRebirth")--SHORTCUT FOR STRENGTHTOREBIRTH
local rebirths = player:WaitForChild("leaderstats").Rebirths--SHORTCUT FOR LEADERSTATS
strengthToRebirth.Text = "You need at least"..math.floor((starterRebirthAmount + (rebirths.Value)* math.sqrt(50000))).."strength to rebirth"
mainButton.MouseButton1Click:Connect(function() --BUT THIS WORKS THOO
mainFrame.Visible = not mainFrame.Visible
end)
wait(2)
script.Parent:WaitForChild("MainFrame").RebirthMenu.RebirthButton:WaitForChild("Textt").MouseButton1Click:Connect(function() -- THIS ONE THIS DOESN'T WORKKK
local results = game.ReplicatedStorage.Remote:WaitForChild("Rebirth"):InvokeServer()
if results == "true" then
rebirthButton.Textt.Text = "Successfully Rebirthed"
wait(1)
rebirthButton.Textt.Text = "Click here to Rebirth!"
elseif results == "NotEnoughStrength" then
rebirthButton.Textt.Text = "Not strong enough!"
wait(1)
rebirthButton.Textt.Text = "Click here to Rebirth!"
end
end)
rebirths:GetPropertyChangededSignal("Value"):Connect(function()
strengthToRebirth.Text = "You need at least"..math.floor((starterRebirthAmount + (rebirths.Value)* math.sqrt(50000))).."strength to rebirth"
end)
this what's the output says
18:04:06.025 - speedy punch game.rbxl auto-recovery file was created
18:04:12.016 - MouseButton1Click is not a valid member of ImageLabel
18:04:12.017 - Stack Begin
18:04:12.017 - Script 'Players.MajaMumo.PlayerGui.Main.LocalScript', Line 25
18:04:12.017 - Stack End
local starterRebirthAmount = 5000
local player = game.Players.LocalPlayer
local mainFrame = script.Parent:WaitForChild("MainFrame") --SHORTCUT FOR MAINFRAME
local rebirthMenu = mainFrame:WaitForChild("RebirthMenu") --SHORT FOR REBIRTHMENU
local mainButton = script.Parent:WaitForChild("MainButton") --BUTTON FOR MAIN BUTTON
local rebirthButton = rebirthMenu:WaitForChild("RebirthButton") --BUTTON FOR REBIRTH BUTTON
rebirthButton.Text = "Click to Rebirth"
local strengthToRebirth = rebirthMenu:WaitForChild("StrengthToRebirth")--SHORTCUT FOR STRENGTHTOREBIRTH
local rebirths = player:WaitForChild("leaderstats").Rebirths--SHORTCUT FOR LEADERSTATS
strengthToRebirth.Text = "You need at least"..math.floor((starterRebirthAmount + (rebirths.Value)* math.sqrt(50000))).."strength to rebirth"
mainButton.MouseButton1Click:Connect(function() --BUT THIS WORKS THOO
mainFrame.Visible = not mainFrame.Visible
end)
wait(2)
script.Parent:WaitForChild("MainFrame").RebirthMenu.RebirthButton:WaitForChild("Textt").MouseButton1Click:Connect(function() -- THIS ONE THIS DOESN'T WORKKK
local results = game.ReplicatedStorage.Remote:WaitForChild("Rebirth"):InvokeServer()
if results == "true" then
rebirthButton.Textt.Text = "Successfully Rebirthed"
wait(1)
rebirthButton.Textt.Text = "Click here to Rebirth!"
elseif results == "NotEnoughStrength" then
rebirthButton.Textt.Text = "Not strong enough!"
wait(1)
rebirthButton.Textt.Text = "Click here to Rebirth!"
end
end)
rebirths:GetPropertyChangededSignal("Value"):Connect(function()
strengthToRebirth.Text = "You need at least"..math.floor((starterRebirthAmount + (rebirths.Value)* math.sqrt(50000))).."strength to rebirth"
end)
this what's the output says
18:04:06.025 - speedy punch game.rbxl auto-recovery file was created
18:04:12.016 - MouseButton1Click is not a valid member of ImageLabel
18:04:12.017 - Stack Begin
18:04:12.017 - Script 'Players.MajaMumo.PlayerGui.Main.LocalScript', Line 25
18:04:12.017 - Stack End