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