model=script.Parent.Parent.Regen newmodel=model:clone()enabled=true function onClicked()if enabled then enabled=false script.Parent.BrickColor=BrickColor.new(26)model:remove()wait(.1)model=newmodel:clone()model.Parent=script.Parent.Parent model:MakeJoints()wait(15)script.Parent.BrickColor=BrickColor.new(23)enabled=true end end script.Parent.ClickDetector.MouseClick:connect(onClicked)


model = script.Parent.Parent["Regen"] -- Change "Regen" to the name of your model.
newmodel = model:clone()
enabled = true

function onClicked()
	if enabled then
	enabled = false--Keeps you from regening the model while it's still regening
	script.Parent.BrickColor = BrickColor.new(26)--Turns the button Black to let players know it is disabled
	model:remove()
	wait(0.1) -- This is how long it will take to regen
	model = newmodel:clone()
	model.Parent = script.Parent.Parent
	model:MakeJoints()
	wait(15) -- This is how long it will take for the regen button to be enabled after being used
	script.Parent.BrickColor = BrickColor.new(23)--Turns the button Blue to tell players it is enabled
	enabled = true
	end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
