-- Done Thank God. DO NOT GROUP WITH THE MODEL!


local everything = {model}
local names = {model}

local children = game.Workspace:children()
for i=1,#children do
	if (children[i].Name == "Plane") then -- Replace Model Wiht Your Models's name!
		table.insert(everything, children[i]:clone())
		table.insert(names, children[i].Name)
	end
end


function regen()
	for i=1,#everything do
		game.Workspace:findFirstChild(names[i]):remove() -- Dont mess with this!
		new_thing = everything[i]:clone()
		new_thing.Parent = game.Workspace
		new_thing:makeJoints()
	end
end

function onTouched(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid") -- OK were done!
	if humanoid~=nil and debounce == false then
		debounce = true
		
		script.Parent.BrickColor = BrickColor.new(26)

		regen()
		wait(10)-- This Is what u change to make how long it takes before it can be Reused. This Is in seconds.


		script.Parent.BrickColor = BrickColor.new(104)


		debounce = false
	end
end


script.Parent.Touched:connect(onTouched)
