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