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