Im Not Sure What Is Goin On Here.

EDIT: Is This Gonna Be One Of Those Posts That Never Gets Answered?

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage.RemoteEvent
local Sold = RemoteEvent.ItemSold

local Debounce = false

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
		if Player.leaderstats.Gems.Value >= 15000 then
			if Debounce == false then
			Debounce = true
			Player.leaderstats.Rebirth.Value = Player.leaderstats.Rebirth.Value + 1
			Player.leaderstats.Gems.Value = Player.leaderstats.Gems.Value - 15000
			script.CashRegister:Play()
			local f = Instance.new("Frame")
		f.Name = "MessageBox"
		f.Position = UDim2.new(0.3, 0, 0.1, 0)
		f.Size = UDim2.new(0.4, 0, 0, 50)			-- If Text box needs to be bigger, simply change "0.4"
		f.Style = "RobloxRound"							-- Styles: "ChatBlue", "Chat Red", "Chat Green"
		f.Parent = player.PlayerGui:FindFirstChild("ScreenGui")

		local m = Instance.new("TextLabel")
		m.Position = UDim2.new(0.5, 0, 0.5, 0)
		m.FontSize = "Size14"							-- Font Sizes: 10, 11, 12, 14, 18, 24
		m.TextColor3 = Color3.new(1,1,1)				-- Colors: (1,0,0) = Red, (0,1,0) = Green, (0,0,1) = Blue
		m.Parent = f

m.Text = "Succesfully Rebirthed!"
wait(3)
f:Destroy()
			wait(5)
			Debounce = false
	        end	
			
		end
	end
	
end)