Advertisement
WaverlyCoal

FE Rick and Morty

Jul 22nd, 2018
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.83 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole & Mokiros");InternalData = {}
  2. do
  3. script.Parent = owner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function NewFakeEvent() local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect;return Fake end
  6. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  7. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  8. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  9. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  10. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  11. local function TriggerEvent(self,Event,...)
  12. local Trigger = Mouse[Event]
  13. if Trigger and Trigger.fakeEvent and Trigger.Function then Trigger.Function(...) end
  14. end
  15. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  16. Event.OnServerEvent:Connect(function(FiredBy,Input)
  17. if FiredBy.Name ~= owner.Name then return end
  18. if Input.MouseEvent then
  19. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  20. else
  21. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  22. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  23. for _,Action in pairs(ContextActionService.Actions) do
  24. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  25. end
  26. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  27. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  28. end
  29. end)
  30. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  31. Event.Parent = NLS([[
  32. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  33. local Input = function(Input,gameProcessedEvent)
  34. if gameProcessedEvent then return end
  35. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  36. end
  37. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  38. local Hit,Target
  39. while wait(1/30) do
  40. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  41. Hit,Targer = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  42. end
  43. end
  44. ]],owner.Character)
  45. end
  46. RealGame = game;game = setmetatable({},{
  47. __index = function (self,Index)
  48. local Sandbox = function (Thing)
  49. if Thing:IsA("Player") then
  50. local RealPlayer = Thing
  51. return setmetatable({},{
  52. __index = function (self,Index)
  53. local Type = type(RealPlayer[Index])
  54. if Type == "function" then
  55. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  56. return function (self)return InternalData["Mouse"] end
  57. end
  58. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  59. end
  60. return RealPlayer[Index]
  61. end;
  62. __tostring = function(self) return RealPlayer.Name end
  63. })
  64. end
  65. end
  66. if RealGame[Index] then
  67. local Type = type(RealGame[Index])
  68. if Type == "function" then
  69. if Index:lower() == "getservice" or Index:lower() == "service" then
  70. return function (self,Service)
  71. local FakeServices = {
  72. ["players"] = function()
  73. return setmetatable({},{
  74. __index = function (self2,Index2)
  75. local RealService = RealGame:GetService(Service)
  76. local Type2 = type(Index2)
  77. if Type2 == "function" then
  78. return function (self,...) return RealService[Index2](RealService,...)end
  79. else
  80. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  81. return RealService[Index2]
  82. end
  83. end;
  84. __tostring = function(self) return RealGame:GetService(Service).Name end
  85. })
  86. end;
  87. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  88. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  89. ["runservice"] = function()
  90. return setmetatable({},{
  91. __index = function(self2,Index2)
  92. local RealService = RealGame:GetService(Service)
  93. local Type2 = type(Index2)
  94. if Type2 == "function" then
  95. return function (self,...) return RealService[Index2](RealService,...) end
  96. else
  97. local RunServices = {
  98. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  99. ["renderstepped"] = function() return RealService["Stepped"] end
  100. }
  101. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  102. return RealService[Index2]
  103. end
  104. end
  105. })
  106. end
  107. }
  108. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  109. return RealGame:GetService(Service)
  110. end
  111. end
  112. return function (self,...) return RealGame[Index](RealGame,...) end
  113. else
  114. if game:GetService(Index) then return game:GetService(Index) end
  115. return RealGame[Index]
  116. end
  117. else
  118. return nil
  119. end
  120. end
  121. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  122.  
  123. --//Paste script below this line.
  124. -- Had to use Inferno as a base though, bit lazy to start from complete scratch --
  125. -- [ Rick & Morty!] --
  126. wait()
  127. LoudVolume = false
  128. Submerged = false
  129. Music = true
  130. script.Name = "Rick" -- or Morty.
  131. Player = game.Players.LocalPlayer
  132. c = game.Players.LocalPlayer.Character
  133. Head = c.Head
  134. anim = c.Humanoid.Animator
  135. Humanoid = c:findFirstChild("Humanoid")Humanoid.Name = "InfiniteBeing"
  136. b23 = Instance.new("BoolValue",c)b23.Name = "InfiniteHuman"
  137. rage = false
  138. p = game.Players.LocalPlayer
  139. s = Instance.new("Sound",c.Head)
  140. s.Name = "Rick&MortyMusic"
  141. s.SoundId = "rbxassetid://888185977"
  142. s.Pitch = 1
  143. if LoudVolume == true then s.Volume = 6 else s.Volume = 1 end
  144. s.Looped = true
  145. wait(0.1)
  146. s:play()
  147. Music = false
  148.  
  149. local Effects = {}
  150. attack = false
  151. local attacking = false
  152. vt = Vector3.new
  153. bc = BrickColor.new
  154. br = BrickColor.random
  155. it = Instance.new
  156. cf = CFrame.new
  157. euler = CFrame.fromEulerAnglesXYZ
  158. angles = CFrame.Angles
  159. matr = math.random
  160. mouse = Player:GetMouse()
  161.  
  162. RSC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  163. RSC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  164. LSC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  165. LSC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  166. RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  167. RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  168. LHC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  169. LHC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  170. NC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  171. NC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  172. RJC0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  173. RJC1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  174. RS = c.Torso:FindFirstChild("Right Shoulder")
  175. LS = c.Torso:FindFirstChild("Left Shoulder")
  176. RH = c.Torso:FindFirstChild("Right Hip")
  177. LH = c.Torso:FindFirstChild("Left Hip")
  178. RJ = c.HumanoidRootPart:FindFirstChild("RootJoint")
  179. N = c.Torso:FindFirstChild("Neck")
  180. cf = CFrame.new
  181. ang = CFrame.Angles
  182. rd = math.rad
  183. rd2 = math.random
  184.  
  185.  
  186. function swait(num)
  187. if num==0 or num==nil then
  188. game:service'RunService'.Heartbeat:wait(0)
  189. else
  190. for i=0,num do
  191. game:service'RunService'.Heartbeat:wait(0)
  192. end
  193. end
  194. end
  195.  
  196. function lerpz(joint, prop, cfrmz, alp)
  197. joint[prop] = joint[prop]:lerp(cfrmz, alp)
  198. end
  199. function resetlerp()
  200. RJ.C0 = RJC0
  201. RJ.C1 = RJC1
  202. N.C0 = NC0
  203. N.C1 = NC1
  204. RS.C0 = RSC0
  205. RS.C1 = RSC1
  206. LS.C0 = LSC0
  207. LS.C1 = LSC1
  208. RH.C0 = RHC0
  209. RH.C1 = RHC1
  210. LH.C0 = LHC0
  211. LH.C1 = LHC1
  212. end
  213.  
  214. New = function(Object, Parent, Name, Data)
  215. local Object = Instance.new(Object)
  216. for Index, Value in pairs(Data or {}) do
  217. Object[Index] = Value
  218. end
  219. Object.Parent = Parent
  220. Object.Name = Name
  221. return Object
  222. end
  223. -- Les Build a Portal gun shall we?"
  224. function CreatePortalGun()
  225. if c:findFirstChild("PortalGun") == nil then
  226. local m = Instance.new("Model",c)m.Name = "PortalGun"
  227. local P = Instance.new("Part",m)P.Size = Vector3.new(0.6,1,0.4)P.CanCollide = false P.Material = "SmoothPlastic" P.Name = "Base"
  228. local W = Instance.new("Weld",P)W.Part0 = P W.Part1 = c["Right Arm"] W.C0 = CFrame.new(0,1.6,0.6)W.Name = "GunWeld"
  229. local P2 = Instance.new("Part",m)P2.Size = Vector3.new(0.2,0.8,0.2)P2.Material = "SmoothPlastic" P2.Name = "Handle" P2.CanCollide = false
  230. local W2 = Instance.new("Weld",P2)W2.Part0 = P2 W2.Part1 = P W2.C0 = CFrame.new(0,-0.5,0.15)*CFrame.Angles(math.rad(-30),0,0)
  231. local P3 = Instance.new("Part",m)P3.Size = Vector3.new(0.55,0.4,0.2)P3.CanCollide = false P3.Material = "Neon" P3.Name = "FrontLight"
  232. local W3 = Instance.new("Weld",P3)W3.Part0 = P3 W3.Part1 = P W3.C0 = CFrame.new(0,0.31,0)P3.BrickColor = BrickColor.new("Bright green")
  233. local P4 = Instance.new("Part",m)P4.Size = Vector3.new(0.2,0.2,0.4)P4.CanCollide = false P4.Material = "Neon" P4.Name = "TopLight" P4.Transparency = 0.5
  234. local W4 = Instance.new("Weld",P4)W4.Part0 = P4 W4.Part1 = P W4.C0 = CFrame.new(0,0,0.35)P4.BrickColor = BrickColor.new("Bright green")
  235. local P5 = Instance.new("Part",m)P5.Size = Vector3.new(0.25,0.25,0.45)P5.CanCollide = false P5.Material = "Neon" P5.Name = "TopLight" P5.Transparency = 0.5
  236. local W5 = Instance.new("Weld",P5)W5.Part0 = P5 W5.Part1 = P4 P5.BrickColor = BrickColor.new("Bright green")
  237. local P5 = Instance.new("Part",m)P5.Size = Vector3.new(0.3,0.3,0.2)P5.CanCollide = false P5.Material = "SmoothPlastic" P5.Name = "LowerLight"
  238. local W5 = Instance.new("Weld",P5)W5.Part0 = P5 W5.Part1 = P4 W5.C0 = CFrame.new(0,0,-0.15)
  239. local P5 = Instance.new("Part",m)P5.Size = Vector3.new(0.3,0.2,0.2)P5.CanCollide = false P5.Material = "SmoothPlastic" P5.Name = "Button"
  240. local W5 = Instance.new("Weld",P5)W5.Part0 = P5 W5.Part1 = P4 W5.C0 = CFrame.new(0,-0.3,-0.2) P5.BrickColor = BrickColor.new("Bright red")
  241. local B = Instance.new("BlockMesh",P5)B.Scale = Vector3.new(1,0.75,0.75)
  242. for i,v in pairs (m:children()) do
  243. if v.ClassName == "Part" then
  244. v.TopSurface = "SmoothNoOutlines"
  245. v.BottomSurface = "SmoothNoOutlines"
  246. v.BackSurface = "SmoothNoOutlines"
  247. v.FrontSurface = "SmoothNoOutlines"
  248. v.LeftSurface = "SmoothNoOutlines"
  249. v.RightSurface = "SmoothNoOutlines"
  250. end
  251. end
  252. end
  253. end
  254. function ThrowGun()
  255. if c:findFirstChild("PortalGun")~=nil then
  256. anim.Parent = nil
  257. local gun = c:findFirstChild("PortalGun") gun.Parent = game.Workspace
  258. for i = 1,14 do
  259. swait()
  260. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
  261. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
  262. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(65), rd(90)), 0.25)
  263. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  264. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  265. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  266. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  267. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  268. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  269. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  270. end
  271. gun.Base.GunWeld:remove()
  272. local BV = Instance.new("BodyVelocity",gun.Base)BV.Velocity = c.HumanoidRootPart.CFrame.lookVector*50 game.Debris:AddItem(BV,0.1)
  273. for i = 1,14 do
  274. swait()
  275. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
  276. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
  277. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(90)), 0.25)
  278. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  279. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  280. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  281. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  282. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  283. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  284. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  285. end
  286. for i = 1,14 do
  287. swait()
  288. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  289. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  290. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  291. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  292. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  293. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  294. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  295. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  296. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  297. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  298. end
  299. resetlerp()
  300. anim.Parent = Humanoid
  301. end
  302. end
  303. -- ;-; --
  304. function PortalRipple(Portalz, Colorz)
  305. if Portalz == nil then return end
  306. local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = Colorz Portal.Name = "PortalEnergy"
  307. Portal.CFrame = Portalz.CFrame Portal.Size = Vector3.new(0.25,0.45,0.55) Portal.Material = "Neon" local M = Instance.new("SpecialMesh",Portal)M.MeshType = "Sphere"
  308. Spawn(function()
  309. Portal.Transparency = 0.5
  310. for i = 1,20 do
  311. Portal.Transparency = Portal.Transparency + 0.025
  312. Portal.Size = Portal.Size + Vector3.new(0.39,0.54,-0.01)
  313. Portal.CFrame = Portalz.CFrame
  314. swait()
  315. end
  316. Portal:remove()
  317. end)
  318. end
  319. function CreatePortal1()
  320. Spawn(function()
  321. local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = BrickColor.new("Lime green")
  322. Portal.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,0,-10)Portal.Size = Vector3.new(0.2,0.4,0.2) Portal.Material = "Neon"
  323. local S = Instance.new("Sound", Portal)S.SoundId = "rbxassetid://181004957" S:Play()
  324. if LoudVolume == true then S.Volume = 10 else S.Volume = 2 end
  325. local M = Instance.new("SpecialMesh",Portal)M.MeshType = "Sphere" Portal.Name = "PortalEnergy"
  326. local Portal2 = Instance.new("Part",game.Workspace)Portal2.Transparency = 1 Portal2.Anchored = true Portal2.CanCollide = false Portal2.BrickColor = BrickColor.new("Parsley green")
  327. Portal2.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,0,-10)Portal2.Size = Vector3.new(0.2,0.4,0.2) Portal2.Material = "Neon"
  328. local PosP = Portal.CFrame
  329. local M = Instance.new("SpecialMesh",Portal2)M.MeshType = "Sphere" Portal2.Name = "PortalEnergy"
  330. for i = 1,10 do
  331. Portal.Transparency = Portal.Transparency - 0.25
  332. Portal.Size = Portal.Size + Vector3.new(0.65,0.95,0)
  333. Portal.CFrame = PosP
  334. Portal2.Transparency = Portal2.Transparency - 0.25
  335. Portal2.Size = Portal2.Size + Vector3.new(0.63,0.93,0.005)
  336. Portal2.CFrame = PosP
  337. swait()
  338. end
  339. Portal.Touched:connect(function(PartH)
  340. if PartH.Parent ~= c and PartH.Parent.Parent ~= c and PartH.Size.Z <= 200 and PartH.Name ~= "PortalEnergy" then
  341. PartH:remove()
  342. end
  343. end)
  344. local R = 1
  345. for i = 1,100 do
  346. wait(0.1)
  347. if R == 1 then R = 2
  348. PortalRipple(Portal2,BrickColor.new("Earth green"))
  349. elseif R == 2 then R = 1
  350. PortalRipple(Portal2,BrickColor.new("Lime green"))
  351. elseif R == 3 then R = 4
  352. PortalRipple(Portal2,BrickColor.new("Earth green"))
  353. elseif R == 4 then R = 1
  354. PortalRipple(Portal2,BrickColor.new("Lime green"))
  355. end
  356. end
  357. for i = 1,10 do
  358. Portal.Transparency = Portal.Transparency + 0.25
  359. Portal.Size = Portal.Size - Vector3.new(0.65,0.95,0)
  360. Portal.CFrame = PosP
  361. Portal2.Transparency = Portal2.Transparency + 0.25
  362. Portal2.Size = Portal2.Size - Vector3.new(0.63,0.93,0.005)
  363. Portal2.CFrame = PosP
  364. swait()
  365. end
  366. end)
  367. end
  368.  
  369. function CreatePortal2()
  370. Spawn(function()
  371. local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = BrickColor.new("Lime green")
  372. Portal.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,-3,0)*CFrame.Angles(math.rad(-90),0,0)Portal.Size = Vector3.new(0.2,0.4,0.2) Portal.Material = "Neon"
  373. local M = Instance.new("SpecialMesh",Portal)M.MeshType = "Sphere" Portal.Name = "PortalEnergy"
  374. local S = Instance.new("Sound", Portal)S.SoundId = "rbxassetid://477163697" S:Play()
  375. if LoudVolume == true then S.Volume = 10 else S.Volume = 2 end
  376. local Portal2 = Instance.new("Part",game.Workspace)Portal2.Transparency = 1 Portal2.Anchored = true Portal2.CanCollide = false Portal2.BrickColor = BrickColor.new("Parsley green")
  377. Portal2.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,-3,0)*CFrame.Angles(math.rad(-90),0,0)Portal2.Size = Vector3.new(0.2,0.4,0.2) Portal2.Material = "Neon"
  378. local PosP = Portal.CFrame
  379. local M = Instance.new("SpecialMesh",Portal2)M.MeshType = "Sphere" Portal2.Name = "PortalEnergy"
  380. for i = 1,10 do
  381. Portal.Transparency = Portal.Transparency - 0.25
  382. Portal.Size = Portal.Size + Vector3.new(0.65,0.95,0)
  383. Portal.CFrame = PosP
  384. Portal2.Transparency = Portal2.Transparency - 0.25
  385. Portal2.Size = Portal2.Size + Vector3.new(0.63,0.93,0.005)
  386. Portal2.CFrame = PosP
  387. swait()
  388. end
  389. for i = 1,10 do
  390. Portal.Transparency = Portal.Transparency + 0.25
  391. Portal.Size = Portal.Size - Vector3.new(0.65,0.95,0)
  392. Portal.CFrame = PosP
  393. Portal2.Transparency = Portal2.Transparency + 0.25
  394. Portal2.Size = Portal2.Size - Vector3.new(0.63,0.93,0.005)
  395. Portal2.CFrame = PosP
  396. swait()
  397. end
  398. end)
  399. end
  400.  
  401. function CreatePortal3()
  402. Spawn(function()
  403. local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = BrickColor.new("Lime green")
  404. Portal.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,10,0)*CFrame.Angles(math.rad(-90),0,0)Portal.Size = Vector3.new(0.2,0.4,0.2) Portal.Material = "Neon"
  405. local M = Instance.new("SpecialMesh",Portal)M.MeshType = "Sphere" Portal.Name = "PortalEnergy"
  406. local Portal2 = Instance.new("Part",game.Workspace)Portal2.Transparency = 1 Portal2.Anchored = true Portal2.CanCollide = false Portal2.BrickColor = BrickColor.new("Parsley green")
  407. Portal2.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,10,0)*CFrame.Angles(math.rad(-90),0,0)Portal2.Size = Vector3.new(0.2,0.4,0.2) Portal2.Material = "Neon"
  408. local PosP = Portal.CFrame
  409. local M = Instance.new("SpecialMesh",Portal2)M.MeshType = "Sphere" Portal2.Name = "PortalEnergy"
  410. local S = Instance.new("Sound", Portal)S.SoundId = "rbxassetid://181004957" S:Play()
  411. if LoudVolume == true then S.Volume = 10 else S.Volume = 2 end
  412. for i = 1,10 do
  413. Portal.Transparency = Portal.Transparency - 0.25
  414. Portal.Size = Portal.Size + Vector3.new(0.65,0.95,0)
  415. Portal.CFrame = PosP
  416. Portal2.Transparency = Portal2.Transparency - 0.25
  417. Portal2.Size = Portal2.Size + Vector3.new(0.63,0.93,0.005)
  418. Portal2.CFrame = PosP
  419. swait()
  420. end
  421. for i = 1,10 do
  422. Portal.Transparency = Portal.Transparency + 0.25
  423. Portal.Size = Portal.Size - Vector3.new(0.65,0.95,0)
  424. Portal.CFrame = PosP
  425. Portal2.Transparency = Portal2.Transparency + 0.25
  426. Portal2.Size = Portal2.Size - Vector3.new(0.63,0.93,0.005)
  427. Portal2.CFrame = PosP
  428. swait()
  429. end
  430. end)
  431. end
  432.  
  433. function DestructionPortal()
  434. attack = true
  435. anim.Parent = nil
  436. for i = 1,14 do
  437. swait()
  438. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
  439. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
  440. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(90)), 0.25)
  441. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  442. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  443. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  444. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  445. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  446. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  447. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  448. end
  449. for i = 1,6 do
  450. swait()
  451. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.35)
  452. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.35)
  453. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(125)), 0.35)
  454. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  455. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  456. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  457. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  458. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  459. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  460. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  461. end
  462. CreatePortal1()
  463. for i = 1,10 do
  464. swait()
  465. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
  466. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
  467. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(90)), 0.25)
  468. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  469. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  470. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  471. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  472. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  473. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  474. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  475. end
  476. for i = 1,10 do
  477. swait()
  478. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  479. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  480. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  481. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  482. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  483. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  484. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  485. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  486. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  487. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  488. end
  489. resetlerp()
  490. attack = false
  491. anim.Parent = Humanoid
  492. end
  493. Disappeared = false
  494. function DisappearPortal()
  495. if Disappeared == false then
  496. attack = true Humanoid.WalkSpeed = 150 Humanoid.JumpPower = 250
  497. Disappeared = true
  498. anim.Parent = nil
  499. for i = 1,14 do
  500. swait()
  501. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  502. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 0.25)
  503. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(0), rd(15)), 0.25)
  504. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  505. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  506. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  507. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  508. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  509. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  510. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  511. end
  512. for i = 1,8 do
  513. swait()
  514. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  515. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 0.5)
  516. lerpz(RS, "C0", RSC0 * cf(0, 0.5, 0) * ang(rd(15), rd(0), rd(15)), 0.5)
  517. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  518. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  519. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  520. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  521. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  522. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  523. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  524. end
  525. CreatePortal2()
  526. for i = 1,14 do
  527. swait()
  528. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  529. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 0.25)
  530. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(0), rd(15)), 0.25)
  531. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  532. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  533. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  534. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  535. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  536. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  537. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  538. end
  539. lerpz(RJ, "C0", RJC0 * cf(0, 0, 1000000) * ang(rd(0), rd(0), rd(0)), 1)
  540. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 1)
  541. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(0), rd(15)), 1)
  542. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  543. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  544. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  545. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  546. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  547. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  548. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  549. attack = false
  550. anim.Parent = Humanoid
  551. else Disappeared = false
  552. resetlerp() Humanoid.WalkSpeed = 16 Humanoid.JumpPower = 50
  553. CreatePortal3() wait()
  554. c.HumanoidRootPart.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,10,0)
  555. end
  556. end
  557.  
  558. function EpicLaugh()
  559. for i = 1,5 do
  560. local S = Instance.new("Sound",c.Head)S.SoundId = "rbxassetid://207358216" S.Volume = 10 S:Play()
  561. end
  562. for i = 1,35 do
  563. swait()
  564. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(0)), 0.25)
  565. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(0)), 0.25)
  566. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(-35), rd(0), rd(180)), 0.25)
  567. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  568. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(-35), rd(0), rd(-180)), 0.25)
  569. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  570. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(-25)), 0.25)
  571. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  572. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(25)), 0.25)
  573. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  574. end
  575. for i = 1,100 do
  576. swait()
  577. lerpz(RJ, "C0", RJC0 * cf(0, 0, -2) * ang(rd(math.random(-360,360)), rd(math.random(-360,360)), rd(math.random(-360,360))), 1)
  578. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(math.random(-360,360)), rd(math.random(-360,360)), rd(math.random(-360,360))), 1)
  579. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(math.random(-360,360)), rd(math.random(-360,360)), rd(math.random(-360,360))), 1)
  580. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(math.random(-360,360)), rd(math.random(-360,360)), rd(math.random(-360,360))), 1)
  581. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(math.random(-360,360)), rd(math.random(-360,360)), rd(math.random(-360,360))), 1)
  582. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(math.random(-360,360)), rd(math.random(-360,360)), rd(math.random(-360,360))), 1)
  583. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(math.random(-360,360)), rd(math.random(-360,360)), rd(math.random(-360,360))), 1)
  584. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(math.random(-360,360)), rd(math.random(-360,360)), rd(math.random(-360,360))), 1)
  585. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(math.random(-360,360)), rd(math.random(-360,360)), rd(math.random(-360,360))), 1)
  586. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(math.random(-360,360)), rd(math.random(-360,360)), rd(math.random(-360,360))), 1)
  587. end
  588. resetlerp()
  589. end
  590.  
  591. function MuteMusic()
  592. if s.Volume > 0 then
  593. s.Volume = 0
  594. else
  595. if LoudVolume == true then
  596. s.Volume = 6
  597. else
  598. s.Volume = 1
  599. end
  600. end
  601. end
  602.  
  603. mouse.KeyDown:connect(function(key)
  604. if attack == true then return end
  605. if c:findFirstChild("PortalGun")~=nil then
  606. if Disappeared == false then
  607. if key == "z" then
  608. DestructionPortal()
  609. end
  610. end
  611. if key == "x" then
  612. DisappearPortal()
  613. end
  614. end
  615. if Disappeared == false then
  616. if key == "q" then
  617. CreatePortalGun()
  618. end
  619. if key == "e" then
  620. ThrowGun()
  621. end
  622. end
  623. if key == "l" then
  624. MuteMusic()
  625. end
  626. if key == "m" then
  627. EpicLaugh()
  628. end
  629. end)
  630.  
  631. game:GetService("RunService").RenderStepped:connect(function()
  632. Humanoid.MaxHealth = Humanoid.MaxHealth*2
  633. Humanoid.Health = Humanoid.MaxHealth*2
  634. for i,v in pairs (c:children()) do
  635. if v.ClassName == "Accessory" then
  636. for i,v2 in pairs (v:children()) do
  637. if v2.ClassName == "Part" then
  638. v2.Anchored = false
  639. end
  640. end
  641. end
  642. end
  643. for i,v in pairs (c:children()) do
  644. if v.ClassName == "Part" then
  645. v.Anchored = false
  646. end
  647. end
  648. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement