All pastes #747405 Raw Edit

Stuff

public text v1 · immutable
·published 2007-10-24 00:22 UTC
rendered paste body
--<Tags>
bin = script.Parent
beach = game.Workspace:findFirstChild("Lv1")
one = bin.Warp1
two = bin.Warp2
--</Tags>


--<Clones>
bb = beach:clone()
--</Clones>


--<Removal>
--beach.Parent = nil
--</Removal>


--<BringBackMap>
function reset(place,clone)
	local c = game.Workspace:children()
	for i=1, #c do
		if c[i]:findFirstChild(place)~=nil then
		return
		else
		copy = clone:clone()
		copy.Parent = game.Workspace
		copy:MakeJoints()
		end
	end
end
--</BringBackMap>


--<Warp>
function warp(part,a,b)
part.Parent.Torso.CFrame = CFrame.new(Vector3.new(b.Position.x, b.Position.y + 5, b.Position.z))
wait(3)
db = false
end
--</Warp>


--<GoTo>
gdb = false
function goto(poke)
	local h = poke.Parent:findFirstChild("Humanoid")
	if h~=nil and gdb == false then
		gdb = true
		local c = script.Parent.Warp1
		local d = script.Parent.Warp2
		reset(beach,bb)
		warp(poke, c, d)
		wait(2)
		gdb = false
	end
end
--</GoTo>


--<ComeBack>
function come(poke)
	local h = poke.Parent:findFirstChild("Humanoid")
	if h~=nil and gdb == false then
		gdb = true
		local c = script.Parent.Warp1
		local d = script.Parent.Warp2
		warp(poke, d, c)
		wait(2)
		gdb = false
	end
end
--</ComeBack>


--<Connectors>
one.Touched:connect(goto)
two.Touched:connect(come)
--</Connectors>