Advertisement
sIendytubble

portal thing (b or h for portal)

May 6th, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.60 KB | None | 0 0
  1.  
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer warn'youngmacka123s minecraft script.'
  5.  
  6. local player = owner
  7. local mouse = player:GetMouse()
  8. local char = player.Character
  9. mouse.KeyDown:Connect(function(key)
  10. if key == "b" then
  11. if game.Workspace:FindFirstChild("orangeportal") then
  12. game.Workspace:FindFirstChild("orangeportal"):Destroy()
  13. end
  14. local Part1 = Instance.new("Part",workspace)
  15. Part1.Name = "orangeportal"
  16. local SpecialMesh2 = Instance.new("SpecialMesh",Part1)
  17. SpecialMesh2.MeshType = "Sphere"
  18. Part1.Parent = workspace
  19. Part1.Anchored = true
  20. Part1.Position = mouse.Hit.p
  21. Part1.Orientation = Vector3.new(0, 90, -90)
  22. Part1.Color = Color3.new(0.0352941, 0.537255, 0.811765)
  23. Part1.Size = Vector3.new(0.099999845, 5.9000001, 3.3999989)
  24. Part1.BottomSurface = Enum.SurfaceType.Smooth
  25. Part1.BrickColor = BrickColor.new("Gold")
  26. Part1.Material = Enum.Material.Neon
  27. Part1.TopSurface = Enum.SurfaceType.Smooth
  28. Part1.Shape = Enum.PartType.Cylinder
  29. Part1.Position = mouse.Hit.p
  30. cooldown0 = false
  31. Part1.Touched:Connect(function(part)
  32. if cooldown0 == false then
  33. cooldown0 = true
  34. part.CFrame = game.Workspace:WaitForChild("blueportal").CFrame * CFrame.new(-4,0,0) * CFrame.Angles(0,0,math.rad(90))
  35. part.Velocity = part.Velocity * Vector3.new(0,15,0)
  36. wait(1)
  37. cooldown0 = false
  38. end
  39. end)
  40. end
  41. end)
  42. mouse.KeyDown:Connect(function(key)
  43. if key == "h" then
  44. if game.Workspace:FindFirstChild("blueportal") then
  45. game.Workspace:FindFirstChild("blueportal"):Destroy()
  46. end
  47. local Part0 = Instance.new("Part",workspace)
  48. Part0.Name = "blueportal"
  49. Part0.Anchored = true
  50. local SpecialMesh1 = Instance.new("SpecialMesh",Part0)
  51. SpecialMesh1.MeshType = "Sphere"
  52. Part0.Parent = workspace
  53. Part0.Orientation = Vector3.new(0, 90, -90)
  54. Part0.Position = mouse.Hit.p
  55. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  56. local RealPlayer = Player
  57. local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer warn'youngmacka123s minecraft script.'
  58.  
  59. local player = owner
  60. local mouse = player:GetMouse()
  61. local char = player.Character
  62. mouse.KeyDown:Connect(function(key)
  63. if key == "b" then
  64. if game.Workspace:FindFirstChild("orangeportal") then
  65. game.Workspace:FindFirstChild("orangeportal"):Destroy()
  66. end
  67. local Part1 = Instance.new("Part",workspace)
  68. Part1.Name = "orangeportal"
  69. local SpecialMesh2 = Instance.new("SpecialMesh",Part1)
  70. SpecialMesh2.MeshType = "Sphere"
  71. Part1.Parent = workspace
  72. Part1.Anchored = true
  73. Part1.Position = mouse.Hit.p
  74. Part1.Orientation = Vector3.new(0, 90, -90)
  75. Part1.Color = Color3.new(0.0352941, 0.537255, 0.811765)
  76. Part1.Size = Vector3.new(0.099999845, 5.9000001, 3.3999989)
  77. Part1.BottomSurface = Enum.SurfaceType.Smooth
  78. Part1.BrickColor = BrickColor.new("Gold")
  79. Part1.Material = Enum.Material.Neon
  80. Part1.TopSurface = Enum.SurfaceType.Smooth
  81. Part1.Shape = Enum.PartType.Cylinder
  82. Part1.Position = mouse.Hit.p
  83. cooldown0 = false
  84. Part1.Touched:Connect(function(part)
  85. if cooldown0 == false then
  86. cooldown0 = true
  87. part.CFrame = game.Workspace:WaitForChild("blueportal").CFrame * CFrame.new(-4,0,0) * CFrame.Angles(0,0,math.rad(90))
  88. part.Velocity = part.Velocity * Vector3.new(0,15,0)
  89. wait(1)
  90. cooldown0 = false
  91. end
  92. end)
  93. end
  94. end)
  95. mouse.KeyDown:Connect(function(key)
  96. if key == "h" then
  97. if game.Workspace:FindFirstChild("blueportal") then
  98. game.Workspace:FindFirstChild("blueportal"):Destroy()
  99. end
  100. local Part0 = Instance.new("Part",workspace)
  101. Part0.Name = "blueportal"
  102. Part0.Anchored = true
  103. local SpecialMesh1 = Instance.new("SpecialMesh",Part0)
  104. SpecialMesh1.MeshType = "Sphere"
  105. Part0.Parent = workspace
  106. Part0.Orientation = Vector3.new(0, 90, -90)
  107. Part0.Position = mouse.Hit.p
  108. Part0.Orientation = Vector3.new(0, 90, -90)
  109. Part0.Color = Color3.new(0.0352941, 0.537255, 0.811765)
  110. Part0.Size = Vector3.new(0.099999845, 5.9000001, 3.3999989)
  111. Part0.BottomSurface = Enum.SurfaceType.Smooth
  112. Part0.BrickColor = BrickColor.new("Electric blue")
  113. Part0.Material = Enum.Material.Neon
  114. Part0.TopSurface = Enum.SurfaceType.Smooth
  115. Part0.Shape = Enum.PartType.Cylinder
  116. cooldown1 = false
  117. Part0.Touched:Connect(function(part)
  118. if cooldown1 == false then
  119. cooldown1 = true
  120. part.CFrame = game.Workspace:WaitForChild("orangeportal").CFrame * CFrame.new(-4,0,0) * CFrame.Angles(0,0,math.rad(90))
  121. part.Velocity = part.Velocity * Vector3.new(0,15,0)
  122. wait(1)
  123. cooldown1 = false
  124. end
  125. end)
  126. end
  127. end)
  128. Part0.Orientation = Vector3.new(0, 90, -90)
  129. Part0.Color = Color3.new(0.0352941, 0.537255, 0.811765)
  130. Part0.Size = Vector3.new(0.099999845, 5.9000001, 3.3999989)
  131. Part0.BottomSurface = Enum.SurfaceType.Smooth
  132. Part0.BrickColor = BrickColor.new("Electric blue")
  133. Part0.Material = Enum.Material.Neon
  134. Part0.TopSurface = Enum.SurfaceType.Smooth
  135. Part0.Shape = Enum.PartType.Cylinder
  136. cooldown1 = false
  137. Part0.Touched:Connect(function(part)
  138. if cooldown1 == false then
  139. cooldown1 = true
  140. part.CFrame = game.Workspace:WaitForChild("orangeportal").CFrame * CFrame.new(-4,0,0) * CFrame.Angles(0,0,math.rad(90))
  141. part.Velocity = part.Velocity * Vector3.new(0,15,0)
  142. wait(1)
  143. cooldown1 = false
  144. end
  145. end)
  146. end
  147. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement