Advertisement
lafur

Untitled

Aug 25th, 2018
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.48 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")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 end--[[
  6. Objects Skipped: 10
  7. LocalScript: 1
  8. Script: 7
  9. UnionOperation: 2
  10. --]]
  11.  
  12. local portal_gun = Instance.new("Tool")
  13. local part = Instance.new("Part")
  14. local part_2 = Instance.new("Part")
  15. local part_3 = Instance.new("Part")
  16. local part_4 = Instance.new("Part")
  17. local parttounion_strong_joint = Instance.new("ManualWeld")
  18. local part_5 = Instance.new("Part")
  19. local part_6 = Instance.new("Part")
  20. local part_7 = Instance.new("Part")
  21. local part_8 = Instance.new("Part")
  22. local part_9 = Instance.new("Part")
  23. local particleemitter = Instance.new("ParticleEmitter")
  24. local part_10 = Instance.new("Part")
  25. local part_11 = Instance.new("Part")
  26. local parttounion_strong_joint_2 = Instance.new("ManualWeld")
  27. local part_12 = Instance.new("Part")
  28. local surfacegui = Instance.new("SurfaceGui")
  29. local textlabel = Instance.new("TextLabel")
  30. local part_13 = Instance.new("Part")
  31. local buildsound = Instance.new("Sound")
  32. local open = Instance.new("Sound")
  33. local color = Instance.new("NumberValue")
  34. local firsttime = Instance.new("BoolValue")
  35. local currentcolor = Instance.new("NumberValue")
  36. local teleporters = Instance.new("Model")
  37. local red = Instance.new("Part")
  38. local enabled = Instance.new("IntValue")
  39. local ori = Instance.new("StringValue")
  40. local decal = Instance.new("Decal")
  41. local decal_2 = Instance.new("Decal")
  42. local blue = Instance.new("Part")
  43. local enabled_2 = Instance.new("IntValue")
  44. local ori_2 = Instance.new("StringValue")
  45. local decal_3 = Instance.new("Decal")
  46. local decal_4 = Instance.new("Decal")
  47.  
  48. portal_gun.GripUp = Vector3.new(1, 0.015, 0)
  49. portal_gun.GripRight = Vector3.new(0.015, -1, 0)
  50. portal_gun.Name = "Portal Gun"
  51. portal_gun.Grip = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, -1.555)
  52. portal_gun.CanBeDropped = false
  53. portal_gun.Parent = game.StarterPack
  54. part.Shape = Enum.PartType.Cylinder
  55. part.Size = Vector3.new(1.04, 0.3, 0.48)
  56. part.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  57. part.Orientation = Vector3.new(-0.02, 90, 0)
  58. part.BrickColor = BrickColor.new("Pearl")
  59. part.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  60. part.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  61. part.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  62. part.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  63. part.Color = Color3.new(0.905882, 0.905882, 0.92549)
  64. part.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  65. part.Parent = portal_gun
  66. part.CFrame = CFrame.new(24.058, 1.129, 7.149) * CFrame.Angles(0, 1.571, 0)
  67. part_2.Shape = Enum.PartType.Cylinder
  68. part_2.Size = Vector3.new(0.2, 0.31, 0.2)
  69. part_2.Orientation = Vector3.new(0, 180, -3.64)
  70. part_2.Material = Enum.Material.Neon
  71. part_2.BrickColor = BrickColor.new("Lime green")
  72. part_2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  73. part_2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  74. part_2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  75. part_2.Color = Color3.new(0, 1, 0)
  76. part_2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  77. part_2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  78. part_2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  79. part_2.Parent = portal_gun
  80. part_2.CFrame = CFrame.new(25.217, 1.183, 7.149) * CFrame.Angles(3.142, 0, 3.078)
  81. part_3.Shape = Enum.PartType.Cylinder
  82. part_3.Size = Vector3.new(0.2, 0.2, 0.2)
  83. part_3.Orientation = Vector3.new(11.67, -90, -90)
  84. part_3.BottomSurface = Enum.SurfaceType.Smooth
  85. part_3.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  86. part_3.TopSurface = Enum.SurfaceType.Smooth
  87. part_3.BrickColor = BrickColor.new("Really black")
  88. part_3.Parent = portal_gun
  89. part_3.CFrame = CFrame.new(24.039, 1.194, 7.114) * CFrame.Angles(1.571, -1.367, 0)
  90. part_4.Size = Vector3.new(0.2, 0.24, 0.99)
  91. part_4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  92. part_4.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  93. part_4.Orientation = Vector3.new(0, 180, -3.64)
  94. part_4.BrickColor = BrickColor.new("Really black")
  95. part_4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  96. part_4.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  97. part_4.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  98. part_4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  99. part_4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  100. part_4.Parent = portal_gun
  101. part_4.CFrame = CFrame.new(25.217, 1.191, 7.164) * CFrame.Angles(3.142, 0, 3.078)
  102. parttounion_strong_joint.Part1 = union
  103. parttounion_strong_joint.C0 = CFrame.new(-0.1, 0.12, 0.495) * CFrame.Angles(-1.571, 0, -3.142)
  104. parttounion_strong_joint.C1 = CFrame.new(-0.334, -0.239, 0.463) * CFrame.Angles(-1.571, 0, -3.142)
  105. parttounion_strong_joint.Part0 = part_4
  106. parttounion_strong_joint.Name = "Part-to-Union Strong Joint"
  107. parttounion_strong_joint.Parent = part_4
  108. part_5.Shape = Enum.PartType.Cylinder
  109. part_5.Size = Vector3.new(1.04, 0.3, 0.48)
  110. part_5.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  111. part_5.Orientation = Vector3.new(-0.02, 90, 0)
  112. part_5.BrickColor = BrickColor.new("Pearl")
  113. part_5.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  114. part_5.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  115. part_5.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  116. part_5.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  117. part_5.Color = Color3.new(0.905882, 0.905882, 0.92549)
  118. part_5.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  119. part_5.Parent = portal_gun
  120. part_5.CFrame = CFrame.new(24.058, 1.139, 7.149) * CFrame.Angles(0, 1.571, 0)
  121. part_6.Shape = Enum.PartType.Cylinder
  122. part_6.Size = Vector3.new(0.2, 0.31, 0.2)
  123. part_6.Orientation = Vector3.new(0, 180, -3.64)
  124. part_6.Material = Enum.Material.Neon
  125. part_6.BrickColor = BrickColor.new("Lime green")
  126. part_6.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  127. part_6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  128. part_6.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  129. part_6.Color = Color3.new(0, 1, 0)
  130. part_6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  131. part_6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  132. part_6.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  133. part_6.Parent = portal_gun
  134. part_6.CFrame = CFrame.new(25.217, 1.183, 6.819) * CFrame.Angles(3.142, 0, 3.078)
  135. part_7.Shape = Enum.PartType.Cylinder
  136. part_7.Size = Vector3.new(0.2, 0.47, 0.45)
  137. part_7.Orientation = Vector3.new(3.47, -90, -90)
  138. part_7.BottomSurface = Enum.SurfaceType.Smooth
  139. part_7.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  140. part_7.TopSurface = Enum.SurfaceType.Smooth
  141. part_7.BrickColor = BrickColor.new("Really black")
  142. part_7.Parent = portal_gun
  143. part_7.CFrame = CFrame.new(24.994, 1.212, 7.139) * CFrame.Angles(1.571, -1.51, 0)
  144. part_8.Shape = Enum.PartType.Cylinder
  145. part_8.Size = Vector3.new(0.2, 0.31, 0.2)
  146. part_8.Orientation = Vector3.new(0, 180, -3.64)
  147. part_8.Material = Enum.Material.Neon
  148. part_8.BrickColor = BrickColor.new("Lime green")
  149. part_8.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  150. part_8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  151. part_8.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  152. part_8.Color = Color3.new(0, 1, 0)
  153. part_8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  154. part_8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  155. part_8.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  156. part_8.Parent = portal_gun
  157. part_8.CFrame = CFrame.new(25.217, 1.183, 7.509) * CFrame.Angles(3.142, 0, 3.078)
  158. part_9.Size = Vector3.new(0.2, 0.2, 0.2)
  159. part_9.BottomSurface = Enum.SurfaceType.Smooth
  160. part_9.Orientation = Vector3.new(0, 0, 3.64)
  161. part_9.Material = Enum.Material.SmoothPlastic
  162. part_9.Color = Color3.new(0.972549, 0.972549, 0.972549)
  163. part_9.BrickColor = BrickColor.new("Institutional white")
  164. part_9.TopSurface = Enum.SurfaceType.Smooth
  165. part_9.Transparency = 1
  166. part_9.Parent = portal_gun
  167. part_9.CFrame = CFrame.new(24.98, 1.464, 7.142) * CFrame.Angles(0, 0, 0.064)
  168. particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.1), NumberSequenceKeypoint.new(1, 0.1)})
  169. particleemitter.Speed = NumberRange.new(0)
  170. particleemitter.LightEmission = 1
  171. particleemitter.Color = ColorSequence.new(Color3.new(0, 1, 0.164706), Color3.new(0, 1, 0.164706))
  172. particleemitter.Lifetime = NumberRange.new(0.2)
  173. particleemitter.Rotation = NumberRange.new(0, 360)
  174. particleemitter.Texture = "http://www.roblox.com/asset/?id=243098098"
  175. particleemitter.Rate = 300
  176. particleemitter.Parent = part_9
  177. part_10.Shape = Enum.PartType.Cylinder
  178. part_10.Size = Vector3.new(1.04, 0.3, 0.48)
  179. part_10.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  180. part_10.Orientation = Vector3.new(-0.02, 90, 0)
  181. part_10.BrickColor = BrickColor.new("Pearl")
  182. part_10.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  183. part_10.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  184. part_10.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  185. part_10.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  186. part_10.Color = Color3.new(0.905882, 0.905882, 0.92549)
  187. part_10.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  188. part_10.Parent = portal_gun
  189. part_10.CFrame = CFrame.new(24.058, 1.109, 7.149) * CFrame.Angles(0, 1.571, 0)
  190. part_11.Size = Vector3.new(1.31, 0.27, 1.03)
  191. part_11.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  192. part_11.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  193. part_11.Orientation = Vector3.new(0, 180, -3.64)
  194. part_11.BrickColor = BrickColor.new("Pearl")
  195. part_11.Color = Color3.new(0.905882, 0.905882, 0.92549)
  196. part_11.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  197. part_11.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  198. part_11.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  199. part_11.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  200. part_11.Parent = portal_gun
  201. part_11.CFrame = CFrame.new(24.653, 1.15, 7.154) * CFrame.Angles(3.142, 0, 3.078)
  202. parttounion_strong_joint_2.Part1 = union
  203. parttounion_strong_joint_2.C0 = CFrame.new(-0.655, 0.135, 0.515) * CFrame.Angles(-1.571, 0, -3.142)
  204. parttounion_strong_joint_2.C1 = CFrame.new(-0.324, -0.228, 0.493) * CFrame.Angles(-1.571, 0, -3.142)
  205. parttounion_strong_joint_2.Part0 = part_11
  206. parttounion_strong_joint_2.Name = "Part-to-Union Strong Joint"
  207. parttounion_strong_joint_2.Parent = part_11
  208. part_12.Size = Vector3.new(0.24, 0.27, 0.54)
  209. part_12.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  210. part_12.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  211. part_12.Orientation = Vector3.new(0, 180, -3.64)
  212. part_12.BrickColor = BrickColor.new("Maroon")
  213. part_12.Color = Color3.new(0.458824, 0, 0)
  214. part_12.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  215. part_12.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  216. part_12.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  217. part_12.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  218. part_12.Parent = portal_gun
  219. part_12.CFrame = CFrame.new(24.389, 1.155, 7.139) * CFrame.Angles(3.142, 0, 3.078)
  220. surfacegui.Face = Enum.NormalId.Top
  221. surfacegui.Parent = part_12
  222. textlabel.TextWrapped = true
  223. textlabel.BackgroundTransparency = 1
  224. textlabel.BackgroundColor3 = Color3.new(1, 1, 1)
  225. textlabel.TextScaled = true
  226. textlabel.TextSize = 96
  227. textlabel.Font = Enum.Font.SciFi
  228. textlabel.Size = UDim2.new(1, 0, 1, 0)
  229. textlabel.Text = "C-137"
  230. textlabel.TextColor3 = Color3.new(1, 0, 0.0156863)
  231. textlabel.Parent = surfacegui
  232. part_13.Shape = Enum.PartType.Cylinder
  233. part_13.Size = Vector3.new(1.04, 0.3, 0.48)
  234. part_13.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  235. part_13.Orientation = Vector3.new(-0.02, 90, 0)
  236. part_13.BrickColor = BrickColor.new("Pearl")
  237. part_13.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  238. part_13.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  239. part_13.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  240. part_13.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  241. part_13.Color = Color3.new(0.905882, 0.905882, 0.92549)
  242. part_13.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  243. part_13.Parent = portal_gun
  244. part_13.CFrame = CFrame.new(24.058, 1.119, 7.149) * CFrame.Angles(0, 1.571, 0)
  245. buildsound.Volume = 1
  246. buildsound.Name = "BuildSound"
  247. buildsound.Parent = portal_gun
  248. open.Volume = 1
  249. open.Name = "Open"
  250. open.Parent = portal_gun
  251. color.Value = 1
  252. color.Name = "Color"
  253. color.Parent = portal_gun
  254. firsttime.Value = true
  255. firsttime.Name = "FirstTime"
  256. firsttime.Parent = portal_gun
  257. currentcolor.Value = 23
  258. currentcolor.Name = "currentColor"
  259. currentcolor.Parent = portal_gun
  260. teleporters.Name = "Teleporters"
  261. teleporters.Parent = portal_gun
  262. red.Anchored = true
  263. red.CanCollide = false
  264. red.Size = Vector3.new(10, 5, 1)
  265. red.Orientation = Vector3.new(0, 90, 0)
  266. red.BottomSurface = Enum.SurfaceType.Smooth
  267. red.Name = "Red"
  268. red.Transparency = 1
  269. red.BrickColor = BrickColor.new("Bright red")
  270. red.Color = Color3.new(0.768628, 0.156863, 0.109804)
  271. red.TopSurface = Enum.SurfaceType.Smooth
  272. red.Parent = teleporters
  273. red.CFrame = CFrame.new(39.5, 979.3, 26) * CFrame.Angles(0, 1.571, 0)
  274. enabled.Value = 1
  275. enabled.Name = "Enabled"
  276. enabled.Parent = red
  277. ori.Name = "Ori"
  278. ori.Parent = red
  279. decal.Texture = "http://www.roblox.com/asset/?id=2324752"
  280. decal.Face = Enum.NormalId.Back
  281. decal.Parent = red
  282. decal_2.Texture = "http://www.roblox.com/asset/?id=2324752"
  283. decal_2.Parent = red
  284. blue.Anchored = true
  285. blue.CanCollide = false
  286. blue.Size = Vector3.new(10, 5, 1)
  287. blue.Orientation = Vector3.new(0, -90, 0)
  288. blue.BottomSurface = Enum.SurfaceType.Smooth
  289. blue.Name = "Blue"
  290. blue.Transparency = 1
  291. blue.BrickColor = BrickColor.new("Bright blue")
  292. blue.Color = Color3.new(0.0509804, 0.411765, 0.67451)
  293. blue.TopSurface = Enum.SurfaceType.Smooth
  294. blue.Parent = teleporters
  295. blue.CFrame = CFrame.new(39.5, 974.3, 26) * CFrame.Angles(0, -1.571, 0)
  296. enabled_2.Value = 1
  297. enabled_2.Name = "Enabled"
  298. enabled_2.Parent = blue
  299. ori_2.Name = "Ori"
  300. ori_2.Parent = blue
  301. decal_3.Texture = "http://www.roblox.com/asset/?id=2324750"
  302. decal_3.Parent = blue
  303. decal_4.Texture = "http://www.roblox.com/asset/?id=2324750"
  304. decal_4.Face = Enum.NormalId.Back
  305. decal_4.Parent = blue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement