model=script.Parent.Parent messageText="\082\101\103\101\110\101\114\097\116\105\110\103\046\046\046 "message=Instance.new("\077\101\115\115\097\103\101")message.Text=messageText backup=model:clone()enabled=true function regenerate()message.Parent=game.Workspace model:remove()wait(3)model=backup:clone()model.Parent=game.Workspace model:makeJoints()message.Parent=nil script.Disabled=true script.Parent.BrickColor=BrickColor.new(26)wait(10)script.Parent.BrickColor=BrickColor.new(104)script.Disabled=false end function onHit(Q)if Q.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")~=nil and enabled then regenerate()end end script.Parent.Touched:connect(onHit)
--Made by ?!?!?!?!, just group with the model to get it to work.  This button also works for planes.
--Do not change anything besides the lines mentioned below.Again,Group it to anything you want(Cars,Trains,Planes Etc.)

model = script.Parent.Parent --Indicates that the script interacts with the model the button is grouped with.
messageText = "Regenerating... " --If you want a message to appear upon pressing, type it here.

message = Instance.new("Message")
message.Text = messageText
backup = model:clone()
enabled = true

function regenerate()
	message.Parent = game.Workspace
	model:remove()

	wait(3) --Change this number to display the regen message as long as you want in seconds.

	model = backup:clone()
	model.Parent = game.Workspace
	model:makeJoints()
	message.Parent = nil

	script.Disabled = true
	script.Parent.BrickColor = BrickColor.new(26) --Black
	wait(10) --Change this number to change the time in between regenerations via the button, in seconds..
	script.Parent.BrickColor = BrickColor.new(104) --Purple
	script.Disabled = false
end

function onHit(hit)
	if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then
		regenerate()
	end
end

script.Parent.Touched:connect(onHit)
