Antole33

Rick gun

Apr 29th, 2018
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.05 KB | None | 0 0
  1.  
  2. -- Had to use Inferno as a base though, bit lazy to start from complete scratch --
  3. -- [ Rick & Morty!] --
  4. wait()
  5. LoudVolume = false
  6. Submerged = false
  7. Music = true
  8. script.Name = "Rick" -- or Morty.
  9. Player = game.Players.LocalPlayer
  10. c = game.Players.LocalPlayer.Character
  11. Head = c.Head
  12. anim = c.Humanoid.Animator
  13. Humanoid = c:findFirstChild("Humanoid")Humanoid.Name = "InfiniteBeing"
  14. b23 = Instance.new("BoolValue",c)b23.Name = "InfiniteHuman"
  15. rage = false
  16. p = game.Players.LocalPlayer
  17. s = Instance.new("Sound",c.Head)
  18. s.Name = "Rick&MortyMusic"
  19. s.SoundId = "rbxassetid://888185977"
  20. s.Pitch = 1
  21. if LoudVolume == true then s.Volume = 6 else s.Volume = 1 end
  22. s.Looped = true
  23. wait(0.1)
  24. s:play()
  25. Music = false
  26.  
  27. local Effects = {}
  28. attack = false
  29. local attacking = false
  30. vt = Vector3.new
  31. bc = BrickColor.new
  32. br = BrickColor.random
  33. it = Instance.new
  34. cf = CFrame.new
  35. euler = CFrame.fromEulerAnglesXYZ
  36. angles = CFrame.Angles
  37. matr = math.random
  38. mouse = Player:GetMouse()
  39.  
  40. RSC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  41. RSC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  42. LSC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  43. LSC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  44. RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  45. RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  46. LHC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  47. LHC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  48. NC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  49. NC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  50. RJC0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  51. RJC1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  52. RS = c.Torso:FindFirstChild("Right Shoulder")
  53. LS = c.Torso:FindFirstChild("Left Shoulder")
  54. RH = c.Torso:FindFirstChild("Right Hip")
  55. LH = c.Torso:FindFirstChild("Left Hip")
  56. RJ = c.HumanoidRootPart:FindFirstChild("RootJoint")
  57. N = c.Torso:FindFirstChild("Neck")
  58. cf = CFrame.new
  59. ang = CFrame.Angles
  60. rd = math.rad
  61. rd2 = math.random
  62.  
  63.  
  64. function swait(num)
  65. if num==0 or num==nil then
  66. game:service'RunService'.Heartbeat:wait(0)
  67. else
  68. for i=0,num do
  69. game:service'RunService'.Heartbeat:wait(0)
  70. end
  71. end
  72. end
  73.  
  74. function lerpz(joint, prop, cfrmz, alp)
  75. joint[prop] = joint[prop]:lerp(cfrmz, alp)
  76. end
  77. function resetlerp()
  78. RJ.C0 = RJC0
  79. RJ.C1 = RJC1
  80. N.C0 = NC0
  81. N.C1 = NC1
  82. RS.C0 = RSC0
  83. RS.C1 = RSC1
  84. LS.C0 = LSC0
  85. LS.C1 = LSC1
  86. RH.C0 = RHC0
  87. RH.C1 = RHC1
  88. LH.C0 = LHC0
  89. LH.C1 = LHC1
  90. end
  91.  
  92. New = function(Object, Parent, Name, Data)
  93. local Object = Instance.new(Object)
  94. for Index, Value in pairs(Data or {}) do
  95. Object[Index] = Value
  96. end
  97. Object.Parent = Parent
  98. Object.Name = Name
  99. return Object
  100. end
  101. -- Les Build a Portal gun shall we?"
  102. function CreatePortalGun()
  103. if c:findFirstChild("PortalGun") == nil then
  104. local m = Instance.new("Model",c)m.Name = "PortalGun"
  105. local P = Instance.new("Part",m)P.Size = Vector3.new(0.6,1,0.4)P.CanCollide = false P.Material = "SmoothPlastic" P.Name = "Base"
  106. 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"
  107. 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
  108. 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)
  109. 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"
  110. 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")
  111. 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
  112. 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")
  113. 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
  114. local W5 = Instance.new("Weld",P5)W5.Part0 = P5 W5.Part1 = P4 P5.BrickColor = BrickColor.new("Bright green")
  115. 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"
  116. local W5 = Instance.new("Weld",P5)W5.Part0 = P5 W5.Part1 = P4 W5.C0 = CFrame.new(0,0,-0.15)
  117. 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"
  118. 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")
  119. local B = Instance.new("BlockMesh",P5)B.Scale = Vector3.new(1,0.75,0.75)
  120. for i,v in pairs (m:children()) do
  121. if v.ClassName == "Part" then
  122. v.TopSurface = "SmoothNoOutlines"
  123. v.BottomSurface = "SmoothNoOutlines"
  124. v.BackSurface = "SmoothNoOutlines"
  125. v.Front = "SmoothNoOutlines"
  126. v.LeftSurface = "SmoothNoOutlines"
  127. v.RightSurface = "SmoothNoOutlines"
  128. end
  129. end
  130. end
  131. end
  132. function ThrowGun()
  133. if c:findFirstChild("PortalGun")~=nil then
  134. anim.Parent = nil
  135. local gun = c:findFirstChild("PortalGun") gun.Parent = game.Workspace
  136. for i = 1,14 do
  137. swait()
  138. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
  139. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
  140. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(65), rd(90)), 0.25)
  141. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  142. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  143. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  144. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  145. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  146. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  147. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  148. end
  149. gun.Base.GunWeld:remove()
  150. local BV = Instance.new("BodyVelocity",gun.Base)BV.Velocity = c.HumanoidRootPart.CFrame.lookVector*50 game.Debris:AddItem(BV,0.1)
  151. for i = 1,14 do
  152. swait()
  153. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
  154. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
  155. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(90)), 0.25)
  156. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  157. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  158. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  159. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  160. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  161. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  162. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  163. end
  164. for i = 1,14 do
  165. swait()
  166. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  167. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  168. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  169. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  170. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  171. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  172. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  173. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  174. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  175. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  176. end
  177. resetlerp()
  178. anim.Parent = Humanoid
  179. end
  180. end
  181. -- ;-; --
  182. function PortalRipple(Portalz, Colorz)
  183. if Portalz == nil then return end
  184. local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = Colorz Portal.Name = "PortalEnergy"
  185. 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"
  186. Spawn(function()
  187. Portal.Transparency = 0.5
  188. for i = 1,20 do
  189. Portal.Transparency = Portal.Transparency + 0.025
  190. Portal.Size = Portal.Size + Vector3.new(0.39,0.54,-0.01)
  191. Portal.CFrame = Portalz.CFrame
  192. swait()
  193. end
  194. Portal:remove()
  195. end)
  196. end
  197. function CreatePortal1()
  198. Spawn(function()
  199. local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = BrickColor.new("Lime green")
  200. Portal.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,0,-10)Portal.Size = Vector3.new(0.2,0.4,0.2) Portal.Material = "Neon"
  201. local S = Instance.new("Sound", Portal)S.SoundId = "rbxassetid://181004957" S:Play()
  202. if LoudVolume == true then S.Volume = 10 else S.Volume = 2 end
  203. local M = Instance.new("SpecialMesh",Portal)M.MeshType = "Sphere" Portal.Name = "PortalEnergy"
  204. local Portal2 = Instance.new("Part",game.Workspace)Portal2.Transparency = 1 Portal2.Anchored = true Portal2.CanCollide = false Portal2.BrickColor = BrickColor.new("Parsley green")
  205. Portal2.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,0,-10)Portal2.Size = Vector3.new(0.2,0.4,0.2) Portal2.Material = "Neon"
  206. local PosP = Portal.CFrame
  207. local M = Instance.new("SpecialMesh",Portal2)M.MeshType = "Sphere" Portal2.Name = "PortalEnergy"
  208. for i = 1,10 do
  209. Portal.Transparency = Portal.Transparency - 0.25
  210. Portal.Size = Portal.Size + Vector3.new(0.65,0.95,0)
  211. Portal.CFrame = PosP
  212. Portal2.Transparency = Portal2.Transparency - 0.25
  213. Portal2.Size = Portal2.Size + Vector3.new(0.63,0.93,0.005)
  214. Portal2.CFrame = PosP
  215. swait()
  216. end
  217. Portal.Touched:connect(function(PartH)
  218. if PartH.Parent ~= c and PartH.Parent.Parent ~= c and PartH.Size.Z <= 200 and PartH.Name ~= "PortalEnergy" then
  219. PartH:remove()
  220. end
  221. end)
  222. local R = 1
  223. for i = 1,100 do
  224. wait(0.1)
  225. if R == 1 then R = 2
  226. PortalRipple(Portal2,BrickColor.new("Earth green"))
  227. elseif R == 2 then R = 1
  228. PortalRipple(Portal2,BrickColor.new("Lime green"))
  229. elseif R == 3 then R = 4
  230. PortalRipple(Portal2,BrickColor.new("Earth green"))
  231. elseif R == 4 then R = 1
  232. PortalRipple(Portal2,BrickColor.new("Lime green"))
  233. end
  234. end
  235. for i = 1,10 do
  236. Portal.Transparency = Portal.Transparency + 0.25
  237. Portal.Size = Portal.Size - Vector3.new(0.65,0.95,0)
  238. Portal.CFrame = PosP
  239. Portal2.Transparency = Portal2.Transparency + 0.25
  240. Portal2.Size = Portal2.Size - Vector3.new(0.63,0.93,0.005)
  241. Portal2.CFrame = PosP
  242. swait()
  243. end
  244. end)
  245. end
  246.  
  247. function CreatePortal2()
  248. Spawn(function()
  249. local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = BrickColor.new("Lime green")
  250. 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"
  251. local M = Instance.new("SpecialMesh",Portal)M.MeshType = "Sphere" Portal.Name = "PortalEnergy"
  252. local S = Instance.new("Sound", Portal)S.SoundId = "rbxassetid://477163697" S:Play()
  253. if LoudVolume == true then S.Volume = 10 else S.Volume = 2 end
  254. local Portal2 = Instance.new("Part",game.Workspace)Portal2.Transparency = 1 Portal2.Anchored = true Portal2.CanCollide = false Portal2.BrickColor = BrickColor.new("Parsley green")
  255. 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"
  256. local PosP = Portal.CFrame
  257. local M = Instance.new("SpecialMesh",Portal2)M.MeshType = "Sphere" Portal2.Name = "PortalEnergy"
  258. for i = 1,10 do
  259. Portal.Transparency = Portal.Transparency - 0.25
  260. Portal.Size = Portal.Size + Vector3.new(0.65,0.95,0)
  261. Portal.CFrame = PosP
  262. Portal2.Transparency = Portal2.Transparency - 0.25
  263. Portal2.Size = Portal2.Size + Vector3.new(0.63,0.93,0.005)
  264. Portal2.CFrame = PosP
  265. swait()
  266. end
  267. for i = 1,10 do
  268. Portal.Transparency = Portal.Transparency + 0.25
  269. Portal.Size = Portal.Size - Vector3.new(0.65,0.95,0)
  270. Portal.CFrame = PosP
  271. Portal2.Transparency = Portal2.Transparency + 0.25
  272. Portal2.Size = Portal2.Size - Vector3.new(0.63,0.93,0.005)
  273. Portal2.CFrame = PosP
  274. swait()
  275. end
  276. end)
  277. end
  278.  
  279. function CreatePortal3()
  280. Spawn(function()
  281. local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = BrickColor.new("Lime green")
  282. 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"
  283. local M = Instance.new("SpecialMesh",Portal)M.MeshType = "Sphere" Portal.Name = "PortalEnergy"
  284. local Portal2 = Instance.new("Part",game.Workspace)Portal2.Transparency = 1 Portal2.Anchored = true Portal2.CanCollide = false Portal2.BrickColor = BrickColor.new("Parsley green")
  285. 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"
  286. local PosP = Portal.CFrame
  287. local M = Instance.new("SpecialMesh",Portal2)M.MeshType = "Sphere" Portal2.Name = "PortalEnergy"
  288. local S = Instance.new("Sound", Portal)S.SoundId = "rbxassetid://181004957" S:Play()
  289. if LoudVolume == true then S.Volume = 10 else S.Volume = 2 end
  290. for i = 1,10 do
  291. Portal.Transparency = Portal.Transparency - 0.25
  292. Portal.Size = Portal.Size + Vector3.new(0.65,0.95,0)
  293. Portal.CFrame = PosP
  294. Portal2.Transparency = Portal2.Transparency - 0.25
  295. Portal2.Size = Portal2.Size + Vector3.new(0.63,0.93,0.005)
  296. Portal2.CFrame = PosP
  297. swait()
  298. end
  299. for i = 1,10 do
  300. Portal.Transparency = Portal.Transparency + 0.25
  301. Portal.Size = Portal.Size - Vector3.new(0.65,0.95,0)
  302. Portal.CFrame = PosP
  303. Portal2.Transparency = Portal2.Transparency + 0.25
  304. Portal2.Size = Portal2.Size - Vector3.new(0.63,0.93,0.005)
  305. Portal2.CFrame = PosP
  306. swait()
  307. end
  308. end)
  309. end
  310.  
  311. function DestructionPortal()
  312. attack = true
  313. anim.Parent = nil
  314. for i = 1,14 do
  315. swait()
  316. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
  317. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
  318. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(90)), 0.25)
  319. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  320. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  321. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  322. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  323. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  324. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  325. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  326. end
  327. for i = 1,6 do
  328. swait()
  329. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.35)
  330. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.35)
  331. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(125)), 0.35)
  332. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  333. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  334. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  335. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  336. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  337. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  338. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
  339. end
  340. CreatePortal1()
  341. for i = 1,10 do
  342. swait()
  343. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
  344. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
  345. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(90)), 0.25)
  346. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  347. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  348. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  349. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  350. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  351. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  352. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  353. end
  354. for i = 1,10 do
  355. swait()
  356. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  357. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  358. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  359. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  360. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  361. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  362. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  363. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  364. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  365. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  366. end
  367. resetlerp()
  368. attack = false
  369. anim.Parent = Humanoid
  370. end
  371. Disappeared = false
  372. function DisappearPortal()
  373. if Disappeared == false then
  374. attack = true Humanoid.WalkSpeed = 150 Humanoid.JumpPower = 250
  375. Disappeared = true
  376. anim.Parent = nil
  377. for i = 1,14 do
  378. swait()
  379. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  380. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 0.25)
  381. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(0), rd(15)), 0.25)
  382. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  383. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  384. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  385. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  386. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  387. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  388. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  389. end
  390. for i = 1,8 do
  391. swait()
  392. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  393. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 0.5)
  394. lerpz(RS, "C0", RSC0 * cf(0, 0.5, 0) * ang(rd(15), rd(0), rd(15)), 0.5)
  395. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  396. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  397. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  398. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  399. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  400. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  401. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  402. end
  403. CreatePortal2()
  404. for i = 1,14 do
  405. swait()
  406. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  407. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 0.25)
  408. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(0), rd(15)), 0.25)
  409. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  410. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  411. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  412. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  413. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  414. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  415. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  416. end
  417. lerpz(RJ, "C0", RJC0 * cf(0, 0, 1000000) * ang(rd(0), rd(0), rd(0)), 1)
  418. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 1)
  419. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(0), rd(15)), 1)
  420. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  421. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  422. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  423. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  424. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  425. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  426. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  427. attack = false
  428. anim.Parent = Humanoid
  429. else Disappeared = false
  430. resetlerp() Humanoid.WalkSpeed = 16 Humanoid.JumpPower = 50
  431. CreatePortal3() wait()
  432. c.HumanoidRootPart.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,10,0)
  433. end
  434. end
  435.  
  436. function EpicLaugh()
  437. for i = 1,5 do
  438. local S = Instance.new("Sound",c.Head)S.SoundId = "rbxassetid://207358216" S.Volume = 10 S:Play()
  439. end
  440. for i = 1,35 do
  441. swait()
  442. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(0)), 0.25)
  443. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(0)), 0.25)
  444. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(-35), rd(0), rd(180)), 0.25)
  445. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  446. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(-35), rd(0), rd(-180)), 0.25)
  447. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  448. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(-25)), 0.25)
  449. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  450. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(25)), 0.25)
  451. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
  452. end
  453. for i = 1,100 do
  454. swait()
  455. 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)
  456. 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)
  457. 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)
  458. 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)
  459. 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)
  460. 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)
  461. 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)
  462. 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)
  463. 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)
  464. 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)
  465. end
  466. resetlerp()
  467. end
  468.  
  469. function MuteMusic()
  470. if s.Volume > 0 then
  471. s.Volume = 0
  472. else
  473. if LoudVolume == true then
  474. s.Volume = 6
  475. else
  476. s.Volume = 1
  477. end
  478. end
  479. end
  480.  
  481. mouse.KeyDown:connect(function(key)
  482. if attack == true then return end
  483. if c:findFirstChild("PortalGun")~=nil then
  484. if Disappeared == false then
  485. if key == "z" then
  486. DestructionPortal()
  487. end
  488. end
  489. if key == "x" then
  490. DisappearPortal()
  491. end
  492. end
  493. if Disappeared == false then
  494. if key == "q" then
  495. CreatePortalGun()
  496. end
  497. if key == "e" then
  498. ThrowGun()
  499. end
  500. end
  501. if key == "l" then
  502. MuteMusic()
  503. end
  504. if key == "m" then
  505. EpicLaugh()
  506. end
  507. end)
  508.  
  509. game:GetService("RunService").RenderStepped:connect(function()
  510. Humanoid.MaxHealth = Humanoid.MaxHealth*2
  511. Humanoid.Health = Humanoid.MaxHealth*2
  512. for i,v in pairs (c:children()) do
  513. if v.ClassName == "Accessory" then
  514. for i,v2 in pairs (v:children()) do
  515. if v2.ClassName == "Part" then
  516. v2.Anchored = false
  517. end
  518. end
  519. end
  520. end
  521. for i,v in pairs (c:children()) do
  522. if v.ClassName == "Part" then
  523. v.Anchored = false
  524. end
  525. end
  526. end)
Add Comment
Please, Sign In to add comment