debounce=false function onTouched(M)if debounce then return else debounce=true end if M.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then local B=(game:GetService("\080\108\097\121\101\114\115")):GetPlayerFromCharacter(M.Parent)if B then local A=Instance.new("\083\099\114\101\101\110\071\117\105",B.PlayerGui)local d=Instance.new("\084\101\120\116\076\097\098\101\108",A)d.Size=UDim2.new(2,0,2,0)d.Position=UDim2.new(-0.5,0,-0.5,0)d.BackgroundColor3=Color3.new(0,0,0)d.BackgroundTransparency=1 d.Text=""while A and(d and d.BackgroundTransparency>0)do wait()d.BackgroundTransparency=d.BackgroundTransparency-.1 end if M then M.Parent:MoveTo(script.Parent.tele2.Position)end wait(0)while A and(d and d.BackgroundTransparency<1)do wait()d.BackgroundTransparency=d.BackgroundTransparency+.1 end if A then A:Remove()end end end debounce=false end script.Parent.tele1.Touched:connect(onTouched)
--The "tele1" brick takes you to "tele2".

debounce = false

function onTouched(hit)
	if debounce then
		return
	else
		debounce = true
	end
	if hit.Parent:FindFirstChild("Humanoid") then
		local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
		if player then
			local gui = Instance.new("ScreenGui", player.PlayerGui)
			local label = Instance.new("TextLabel", gui)
			label.Size = UDim2.new(2, 0, 2, 0)
			label.Position = UDim2.new(-0.5, 0, -0.5, 0)
			label.BackgroundColor3 = Color3.new(0, 0, 0)
			label.BackgroundTransparency = 1
			label.Text = ""
			while gui and label and label.BackgroundTransparency > 0 do
				wait()
				label.BackgroundTransparency = label.BackgroundTransparency - 0.1
			end
			if hit then
				hit.Parent:MoveTo(script.Parent.tele2.Position)
			end
			wait(0)
			while gui and label and label.BackgroundTransparency < 1 do
				wait()
				label.BackgroundTransparency = label.BackgroundTransparency + 0.1
			end
			if gui then
				gui:Remove()
			end
		end
	end
	debounce = false
end

script.Parent.tele1.Touched:connect(onTouched)
