Feedback on my Rebirth LocalScript

Hi, I am pretty new to scripting only a few weeks in and I would love to see some feedback on my Rebirth LocalScript. Is there anything I should be doing, or anything needing to be changed let me know thank you!

local RebirthModule = require(game.StarterGui.UIHandler)
local rebirthButton = script.Parent.rebirthMenu.Rebirth1
local player = game.Players.LocalPlayer
local rebirthEvent = game.ReplicatedStorage.rebirthEvent
local rebirthEvent2 = game.ReplicatedStorage.rebirthEvent2
local rebirthButton2 = script.Parent.rebirthMenu.Rebirth2
local rebirthButton3 = script.Parent.rebirthMenu.Rebirth3
local rebirthEvent3 = game.ReplicatedStorage.rebirthEvent3

local rebirths = {
	[1] = {Amount = 1, Cost = 100},
	[2] = {Amount = 5, Cost = 500},
	[3] = {Amount = 10, Cost = 1000},
	[4] = {Amount = 50, Cost = 20000},
	[5] = {Amount = 100, Cost = 50000},
	[6] = {Amount = 500, Cost = 100000},
	[7] = {Amount = 1000, Cost = 300000}
}

rebirthButton.Text = rebirths[1].Amount.." Rebirth: "..rebirths[1].Cost.." Clicks"
rebirthButton2.Text = rebirths[2].Amount.." Rebirth: "..rebirths[2].Cost.." Clicks"
rebirthButton3.Text = rebirths[3].Amount.." Rebirth: "..rebirths[3].Cost.." Clicks"

local function toString()
	rebirthButton.Text = rebirths[1].Amount.." Rebirth: "..rebirths[1].Cost.." Clicks"
	rebirthButton2.Text = rebirths[2].Amount.." Rebirth: "..rebirths[2].Cost.." Clicks"
	rebirthButton3.Text = rebirths[3].Amount.." Rebirth: "..rebirths[3].Cost.." Clicks"
end





rebirthButton.MouseButton1Click:Connect(function()
	if player.leaderstats.Clicks.Value >= rebirths[1].Cost then
		rebirthEvent:FireServer()
		for i, v in pairs(rebirths) do
			v.Cost *= 2
			toString()
		end
	end
end)

rebirthButton2.MouseButton1Click:Connect(function()
	if player.leaderstats.Clicks.Value >= rebirths[2].Cost then
		rebirthEvent2:FireServer()
		for i, v in pairs(rebirths) do
			v.Cost *= 2
			toString()
		end
	end
end)

rebirthButton3.MouseButton1Click:Connect(function()
	if player.leaderstats.Clicks.Value >= rebirths[3].Cost then
		rebirthEvent3:FireServer()
		for i,v in pairs(rebirths)do
			v.Cost *= 2
			toString()
		end
	end
end)

What is this doing?
rebirths[2]
is that referring to the 2nd child the game can find or what
if its getting the child by the name of 2 shouldnt it be a string

It seems you repeat a lot of code: in the MouseButton1Clicks, all the code is the same expect for the rebirthEventX, maybe try looping through the buttons and connect programmatically to 1 RemoteEvent with a parameter for index.
For example:
(Note: this is untested and for reference)

for idx, btn in ipairs(RebirthButtonFrame:GetChildren()) do
  btn.Activated:Connect(function()
    RebirthEvent:FireServer(idx)
    -- code for cost increasing
  end)
end

Also, I used Activated instead of MouseButton1Click as I believe it is more portable

This can also be done for toString
Example:

function toString()
  for idx, btn in ipairs(RebirthButtonFrame:GetChildren()) do
    btn.Text = rebirths[idx].Amount.."XXX"
  end
end

This all assumes the rebirth buttons are in a frame with nothing else, but the example can be extended to fit other usecases

Then, you set all the rebirthButton texts, then create a function that does that exact thing, remove the extra code and just call the function

-- Remove this code --
rebirthButton.Text = rebirths[1].Amount.." Rebirth: "..rebirths[1].Cost.." Clicks"
rebirthButton2.Text = rebirths[2].Amount.." Rebirth: "..rebirths[2].Cost.." Clicks"
rebirthButton3.Text = rebirths[3].Amount.." Rebirth: "..rebirths[3].Cost.." Clicks"
-----------------------

local function toString()
	rebirthButton.Text = rebirths[1].Amount.." Rebirth: "..rebirths[1].Cost.." Clicks"
	rebirthButton2.Text = rebirths[2].Amount.." Rebirth: "..rebirths[2].Cost.." Clicks"
	rebirthButton3.Text = rebirths[3].Amount.." Rebirth: "..rebirths[3].Cost.." Clicks"
end

-- Add This --
toString()
--------------

Lastly, at the top of your code, all the variables are sort of jumbled, it may help to organize them
For example

-- I put ModuleScripts at top
local RebirthModule = require(game.StarterGui.UIHandler)

-- Then most generic objects
local player = game.Players.LocalPlayer

-- Then group similar items (here it is all buttons)
local rebirthButton = script.Parent.rebirthMenu.Rebirth1
local rebirthButton2 = script.Parent.rebirthMenu.Rebirth2
local rebirthButton3 = script.Parent.rebirthMenu.Rebirth3

-- and these are all events
local rebirthEvent = game.ReplicatedStorage.rebirthEvent
local rebirthEvent2 = game.ReplicatedStorage.rebirthEvent2
local rebirthEvent3 = game.ReplicatedStorage.rebirthEvent3

Personally, I would add 1 at the end of variables that have other numbered counterparts for consistency (but ideally, you could eliminate them all together and just something like a table+loop)

-- instead of just rebirthEvent, add 1 to get rebirthEvent1
local rebirthEvent1 = game.ReplicatedStorage.rebirthEvent
local rebirthEvent2 = game.ReplicatedStorage.rebirthEvent2