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