Rick Portal Gun (Low Quality Mesh)
Key RequiredUniversal

Rick Portal Gun (Low Quality Mesh)

Universal ScriptParu_idkParu_idk 1.7K views 23.8K executesUpdated Aug 31, 2026
Unrated
00
Lua Script•336 lines (11055 chars)
local portalgun = Instance.new("Tool")
local portal1
local portal2
local portal3
local portal4
local portal5
local portal6
local gun = Instance.new("Part")
local gun1 = Instance.new("Part")
local gunmesh = Instance.new("SpecialMesh")
local gunmesh1 = Instance.new("SpecialMesh")
local weld1 = Instance.new("WeldConstraint")
local portals = Instance.new("Folder")
local plr = game.Players.LocalPlayer
local tpservice = game:GetService("TeleportService")
local gui = Instance.new("ScreenGui")
local text = Instance.new("TextLabel")
local textbox = Instance.new("TextBox")
local uidrag = Instance.new("UIDragDetector")
local place = 0

if script then
	plr.CharacterAdded:Wait()
end

portalgun.Parent = game.Players.LocalPlayer.Backpack
portalgun.Grip = CFrame.new(1, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))
portalgun.Name = "Portal Gun"

gun.Parent = portalgun
gun.Color = Color3.new(1, 1, 1)
gun.CanCollide = false
gun.Name = "Handle"
gun1.Parent = portalgun
gun1.Position = Vector3.new(-1.3, 0.75, 0)
gun1.Transparency = 0.5
gun1.Color = Color3.new(0, 1, 0)
gun1.CanCollide = false
gun1.Name = "mesh1"

weld1.Parent = gun
weld1.Part0 = gun
weld1.Part1 = gun1

gunmesh.MeshType = Enum.MeshType.FileMesh
gunmesh.MeshId = "rbxassetid://79822993358295"
gunmesh.Parent = gun
gunmesh1.MeshType = Enum.MeshType.FileMesh
gunmesh1.MeshId = "rbxassetid://71196094761609"
gunmesh1.Parent = gun1

portals.Parent = workspace
portals.Name = "portals"

gui.Parent = plr.PlayerGui
gui.Name = "Portal Location"
gui.ScreenInsets = Enum.ScreenInsets.None
gui.SafeAreaCompatibility = Enum.SafeAreaCompatibility.None

text.Parent = gui
text.Text = "Drag Here"
text.AnchorPoint = Vector2.new(1, 0)
text.Position = UDim2.new(1, 0, 0, 0)
text:TweenSize(UDim2.new(0, 100, 0, 25))

textbox.Parent = text
textbox.AnchorPoint = Vector2.new(1, 0)
textbox.PlaceholderText = "Place Id"
textbox.ClearTextOnFocus = true
textbox.Text = ""
textbox.Position = UDim2.new(1, 0, 1, 0)
textbox:TweenSize(UDim2.new(0, 100, 0, 50))

uidrag.Parent = text
uidrag.Name = "UI Drag"

textbox.FocusLost:Connect(function()
	place = textbox.Text
end)

portalgun.Activated:Connect(function()
	if place == "Red" then
		if portals:FindFirstChild("portal1") then
			portal1:Destroy()
		end
		local decal = Instance.new("Texture")
		decal.Texture = "rbxassetid://383899755"
		decal.StudsPerTileU = 8
		decal.StudsPerTileV = 8
		decal.Color3 = Color3.new(1, 0, 0)
		local decal2 = Instance.new("Texture")
		decal2.Texture = "rbxassetid://383899755"
		decal2.Face = Enum.NormalId.Back
		decal2.StudsPerTileU = 8
		decal2.StudsPerTileV = 8
		decal2.Color3 = Color3.new(1, 0, 0)
		local light = Instance.new("PointLight")
		light.Range = 16
		light.Color = Color3.new(1, 0, 0)
		local particles = Instance.new("Sparkles")
		particles.Color = Color3.new(1, 0, 0)
		portal1 = Instance.new("Part")
		decal.Parent = portal1
		decal2.Parent = portal1
		light.Parent = portal1
		particles.Parent = portal1
		portal1.Size = Vector3.new(8, 8, 0)
		portal1.Transparency = 1
		portal1.Anchored = true
		portal1.CanCollide = false
		portal1.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -10)
		portal1.Parent = workspace.portals
		portal1.Name = "portal1"
		portal1.Touched:Connect(function(part)
			if part.Parent:FindFirstChild("Humanoid") then
				part.Parent.HumanoidRootPart.CFrame = portal2.CFrame * CFrame.new(0, 0, 3) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(0))
			end
		end)
	elseif place == "Blue" then
		if portals:FindFirstChild("portal2") then
			portal2:Destroy()
		end
		local decal = Instance.new("Texture")
		decal.Texture = "rbxassetid://383899755"
		decal.StudsPerTileU = 8
		decal.StudsPerTileV = 8
		decal.Color3 = Color3.new(0, 0, 1)
		local decal2 = Instance.new("Texture")
		decal2.Texture = "rbxassetid://383899755"
		decal2.Face = Enum.NormalId.Back
		decal2.StudsPerTileU = 8
		decal2.StudsPerTileV = 8
		decal2.Color3 = Color3.new(0, 0, 1)
		local light = Instance.new("PointLight")
		light.Range = 16
		light.Color = Color3.new(0, 0, 1)
		local particles = Instance.new("Sparkles")
		particles.Color = Color3.new(0, 0, 1)
		portal2 = Instance.new("Part")
		decal.Parent = portal2
		decal2.Parent = portal2
		light.Parent = portal2
		particles.Parent = portal2
		portal2.Size = Vector3.new(8, 8, 0)
		portal2.Transparency = 1
		portal2.Anchored = true
		portal2.CanCollide = false
		portal2.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -10) 
		portal2.Parent = workspace.portals
		portal2.Name = "portal2"
		portal2.Touched:Connect(function(part)
			if part.Parent:FindFirstChild("Humanoid") then
				part.Parent.HumanoidRootPart.CFrame = portal1.CFrame * CFrame.new(0, 0, 3) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(0))
			end
		end)
	elseif place == "Green" then
		if portals:FindFirstChild("portal3") then
			portal3:Destroy()
		end
		local decal = Instance.new("Texture")
		decal.Texture = "rbxassetid://383899755"
		decal.StudsPerTileU = 8
		decal.StudsPerTileV = 8
		decal.Color3 = Color3.new(0, 1, 0)
		local decal2 = Instance.new("Texture")
		decal2.Texture = "rbxassetid://383899755"
		decal2.Face = Enum.NormalId.Back
		decal2.StudsPerTileU = 8
		decal2.StudsPerTileV = 8
		decal2.Color3 = Color3.new(0, 1, 0)
		local light = Instance.new("PointLight")
		light.Range = 16
		light.Color = Color3.new(0, 1, 0)
		local particles = Instance.new("Sparkles")
		particles.Color = Color3.new(0, 1, 0)
		portal3 = Instance.new("Part")
		decal.Parent = portal3
		decal2.Parent = portal3
		light.Parent = portal3
		particles.Parent = portal3
		portal3.Size = Vector3.new(8, 8, 0)
		portal3.Transparency = 1
		portal3.Anchored = true
		portal3.CanCollide = false
		portal3.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -10) 
		portal3.Parent = workspace.portals
		portal3.Name = "portal3"
		portal3.Touched:Connect(function(part)
			if part.Parent:FindFirstChild("Humanoid") then
				part.Parent.HumanoidRootPart.CFrame = portal4.CFrame * CFrame.new(0, 0, 3) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(0))
			end
		end)
	elseif place == "Yellow" then
		if portals:FindFirstChild("portal4") then
			portal4:Destroy()
		end
		local decal = Instance.new("Texture")
		decal.Texture = "rbxassetid://383899755"
		decal.StudsPerTileU = 8
		decal.StudsPerTileV = 8
		decal.Color3 = Color3.new(1, 1, 0)
		local decal2 = Instance.new("Texture")
		decal2.Texture = "rbxassetid://383899755"
		decal2.Face = Enum.NormalId.Back
		decal2.StudsPerTileU = 8
		decal2.StudsPerTileV = 8
		decal2.Color3 = Color3.new(1, 1, 0)
		local light = Instance.new("PointLight")
		light.Range = 16
		light.Color = Color3.new(1, 1, 0)
		local particles = Instance.new("Sparkles")
		particles.Color = Color3.new(1, 1, 0)
		portal4 = Instance.new("Part")
		decal.Parent = portal4
		decal2.Parent = portal4
		light.Parent = portal4
		particles.Parent = portal4
		portal4.Size = Vector3.new(8, 8, 0)
		portal4.Transparency = 1
		portal4.Anchored = true
		portal4.CanCollide = false
		portal4.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -10) 
		portal4.Parent = workspace.portals
		portal4.Name = "portal4"
		portal4.Touched:Connect(function(part)
			if part.Parent:FindFirstChild("Humanoid") then
				part.Parent.HumanoidRootPart.CFrame = portal3.CFrame * CFrame.new(0, 0, 3) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(0))
			end
		end)
	elseif place == "Black" then
		if portals:FindFirstChild("portal5") then
			portal5:Destroy()
		end
		local decal = Instance.new("Texture")
		decal.Texture = "rbxassetid://383899755"
		decal.StudsPerTileU = 8
		decal.StudsPerTileV = 8
		decal.Color3 = Color3.new(0, 0, 0)
		local decal2 = Instance.new("Texture")
		decal2.Texture = "rbxassetid://383899755"
		decal2.Face = Enum.NormalId.Back
		decal2.StudsPerTileU = 8
		decal2.StudsPerTileV = 8
		decal2.Color3 = Color3.new(0, 0, 0)
		local light = Instance.new("PointLight")
		light.Range = 16
		light.Color = Color3.new(0, 0, 0)
		local particles = Instance.new("Sparkles")
		particles.Color = Color3.new(0, 0, 0)
		portal5 = Instance.new("Part")
		decal.Parent = portal5
		decal2.Parent = portal5
		light.Parent = portal5
		particles.Parent = portal5
		portal5.Size = Vector3.new(8, 8, 0)
		portal5.Transparency = 1
		portal5.Anchored = true
		portal5.CanCollide = false
		portal5.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -10) 
		portal5.Parent = workspace.portals
		portal5.Name = "portal5"
		portal5.Touched:Connect(function(part)
			if part.Parent:FindFirstChild("Humanoid") then
				part.Parent.HumanoidRootPart.CFrame = portal6.CFrame * CFrame.new(0, 0, 3) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(0))
			end
		end)
	elseif place == "White" then
		if portals:FindFirstChild("portal6") then
			portal6:Destroy()
		end
		local decal = Instance.new("Texture")
		decal.Texture = "rbxassetid://383899755"
		decal.StudsPerTileU = 8
		decal.StudsPerTileV = 8
		decal.Color3 = Color3.new(2500, 2500, 2500)
		local decal2 = Instance.new("Texture")
		decal2.Texture = "rbxassetid://383899755"
		decal2.Face = Enum.NormalId.Back
		decal2.StudsPerTileU = 8
		decal2.StudsPerTileV = 8
		decal2.Color3 = Color3.new(2500, 2500, 2500)
		local light = Instance.new("PointLight")
		light.Range = 16
		light.Color = Color3.new(1, 1, 1)
		local particles = Instance.new("Sparkles")
		particles.Color = Color3.new(2500, 2500, 2500)
		portal6 = Instance.new("Part")
		decal.Parent = portal6
		decal2.Parent = portal6
		light.Parent = portal6
		particles.Parent = portal6
		portal6.Size = Vector3.new(8, 8, 0)
		portal6.Transparency = 1
		portal6.Anchored = true
		portal6.CanCollide = false
		portal6.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -10) 
		portal6.Parent = workspace.portals
		portal6.Name = "portal6"
		portal6.Touched:Connect(function(part)
			if part.Parent:FindFirstChild("Humanoid") then
				part.Parent.HumanoidRootPart.CFrame = portal5.CFrame * CFrame.new(0, 0, 3) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(0))
			end
		end)
	else
		local decal = Instance.new("Texture")
		decal.Texture = "rbxassetid://383899755"
		decal.StudsPerTileU = 8
		decal.StudsPerTileV = 8
		local decal2 = Instance.new("Texture")
		decal2.Texture = "rbxassetid://383899755"
		decal2.Face = Enum.NormalId.Back
		decal2.StudsPerTileU = 8
		decal2.StudsPerTileV = 8
		local light = Instance.new("PointLight")
		light.Range = 16
		light.Color = Color3.new(0, 1, 0)
		local particles = Instance.new("Sparkles")
		particles.Color = Color3.new(0, 1, 0)
		local portal = Instance.new("Part")
		decal.Parent = portal
		decal2.Parent = portal
		light.Parent = portal
		particles.Parent = portal
		portal.Size = Vector3.new(8, 8, 0)
		portal.Transparency = 1
		portal.Anchored = true
		portal.CanCollide = false
		portal.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -10)
		portal.Parent = workspace.portals
		portal.Touched:Connect(function()
			tpservice:Teleport(tonumber(place))
		end)
		task.wait(10)
		portal:Destroy()
	end
end)

Features & Information

Place Portals And Use Them To Teleport Between Each Other, Typing A Game ID In The ID Box Will Create A Game Teleport Portal Teleporting You To The Game That Owns The Inputed ID, Typing A Colour Will Create A Portal Linked The Opposite One, Current Portal Colors ("Red" And "Blue", "Green" And "Yellow", "Black", "White") Btw You Will Need That Exact Capitalisation, If There Are Any Problems Message Me On Tiktok @paruchiruidk
#Rick And Morty#Portal Gun#ParuChiruIDK

Community Comments (1)

it doesnt run for me

More Scripts for Universal Scripts