View difference between Paste ID: 0CaAtxwW 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
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
146
wait()
147
LoudVolume = false
148
Submerged = false
149
Music = true
150
script.Name = "Rick" -- or Morty.
151
Player = owner
152
c = game.Players.LocalPlayer.Character
153
Head = c.Head
154
anim = c.Humanoid.Animator
155
Humanoid = c:findFirstChild("Humanoid")Humanoid.Name = "InfiniteBeing"
156
b23 = Instance.new("BoolValue",c)b23.Name = "InfiniteHuman"
157
rage = false
158
p = game.Players.LocalPlayer
159
s = Instance.new("Sound",c.Head)
160
s.Name = "Rick&MortyMusic"
161
s.SoundId = "rbxassetid://888185977"
162
s.Pitch = 1
163
if LoudVolume == true then s.Volume = 6 else s.Volume = 1 end
164
s.Looped = true
165
wait(0.1)
166
s:play()
167
Music = false
168
169
local Effects = {}
170
attack = false
171
local attacking = false
172
vt = Vector3.new
173
bc = BrickColor.new
174
br = BrickColor.random
175
it = Instance.new
176
cf = CFrame.new
177
euler = CFrame.fromEulerAnglesXYZ
178
angles = CFrame.Angles
179
matr = math.random
180
181
  RSC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
182
  RSC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
183
  LSC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
184
  LSC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
185
  RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
186
  RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
187
  LHC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
188
  LHC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
189
  NC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
190
  NC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
191
  RJC0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
192
  RJC1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
193
  RS = c.Torso:FindFirstChild("Right Shoulder")
194
  LS = c.Torso:FindFirstChild("Left Shoulder")
195
  RH = c.Torso:FindFirstChild("Right Hip")
196
  LH = c.Torso:FindFirstChild("Left Hip")
197
  RJ = c.HumanoidRootPart:FindFirstChild("RootJoint")
198
  N = c.Torso:FindFirstChild("Neck")
199
  cf = CFrame.new
200
  ang = CFrame.Angles
201
  rd = math.rad
202
  rd2 = math.random
203
204
205
function swait(num)
206
if num==0 or num==nil then
207
game:service'RunService'.Heartbeat:wait(0)
208
else
209
for i=0,num do
210
game:service'RunService'.Heartbeat:wait(0)
211
end
212
end
213
end
214
	
215
  function lerpz(joint, prop, cfrmz, alp)
216
    joint[prop] = joint[prop]:lerp(cfrmz, alp)
217
  end
218
  function resetlerp()
219
    RJ.C0 = RJC0
220
    RJ.C1 = RJC1
221
    N.C0 = NC0
222
    N.C1 = NC1
223
    RS.C0 = RSC0
224
    RS.C1 = RSC1
225
    LS.C0 = LSC0
226
    LS.C1 = LSC1
227
    RH.C0 = RHC0
228
    RH.C1 = RHC1
229
    LH.C0 = LHC0
230
	LH.C1 = LHC1
231
  end
232
233
New = function(Object, Parent, Name, Data)
234
	local Object = Instance.new(Object)
235
	for Index, Value in pairs(Data or {}) do
236
		Object[Index] = Value
237
	end
238
	Object.Parent = Parent
239
	Object.Name = Name
240
	return Object
241
end
242
-- Les Build a Portal gun shall we?"
243
function CreatePortalGun()
244
if c:findFirstChild("PortalGun") == nil then
245
local m = Instance.new("Model",c)m.Name = "PortalGun"
246
local P = Instance.new("Part",m)P.Size = Vector3.new(0.6,1,0.4)P.CanCollide = false P.Material = "SmoothPlastic" P.Name = "Base"
247
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"
248
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
249
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)
250
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"
251
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")
252
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
253
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")
254
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
255
local W5 = Instance.new("Weld",P5)W5.Part0 = P5 W5.Part1 = P4 P5.BrickColor = BrickColor.new("Bright green")
256
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"
257
local W5 = Instance.new("Weld",P5)W5.Part0 = P5 W5.Part1 = P4 W5.C0 = CFrame.new(0,0,-0.15)
258
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"
259
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")
260
local B = Instance.new("BlockMesh",P5)B.Scale = Vector3.new(1,0.75,0.75)
261
for i,v in pairs (m:children()) do
262
if v.ClassName == "Part" then
263
v.TopSurface = "SmoothNoOutlines"
264
v.BottomSurface = "SmoothNoOutlines"
265
v.BackSurface = "SmoothNoOutlines"
266
v.Front = "SmoothNoOutlines"
267
v.LeftSurface = "SmoothNoOutlines"
268
v.RightSurface = "SmoothNoOutlines"
269
end
270
end
271
end
272
end
273
function ThrowGun()
274
if c:findFirstChild("PortalGun")~=nil then
275
anim.Parent = nil
276
local gun = c:findFirstChild("PortalGun") gun.Parent = game.Workspace
277
for i = 1,14 do
278
swait()
279
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
280
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
281
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(65), rd(90)), 0.25)
282
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
283
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
284
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
285
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
286
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
287
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
288
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
289
end
290
gun.Base.GunWeld:remove()
291
local BV = Instance.new("BodyVelocity",gun.Base)BV.Velocity = c.HumanoidRootPart.CFrame.lookVector*50 game.Debris:AddItem(BV,0.1)
292
for i = 1,14 do
293
swait()
294
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
295
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
296
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(90)), 0.25)
297
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
298
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
299
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
300
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
301
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
302
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
303
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
304
end
305
for i = 1,14 do
306
swait()
307
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
308
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
309
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 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
resetlerp()
319
anim.Parent = Humanoid
320
end
321
end
322
-- ;-; --
323
function PortalRipple(Portalz, Colorz)
324
if Portalz == nil then return end
325
local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = Colorz Portal.Name = "PortalEnergy"
326
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"
327
Spawn(function()
328
Portal.Transparency = 0.5
329
for i = 1,20 do
330
Portal.Transparency = Portal.Transparency + 0.025
331
Portal.Size = Portal.Size + Vector3.new(0.39,0.54,-0.01)
332
Portal.CFrame = Portalz.CFrame
333
swait()
334
end
335
Portal:remove()
336
end)
337
end
338
function CreatePortal1()
339
Spawn(function()
340
local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = BrickColor.new("Lime green")
341
Portal.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,0,-10)Portal.Size = Vector3.new(0.2,0.4,0.2) Portal.Material = "Neon"
342
local S = Instance.new("Sound", Portal)S.SoundId = "rbxassetid://181004957" S:Play()
343
if LoudVolume == true then S.Volume = 10 else S.Volume = 2 end
344
local M = Instance.new("SpecialMesh",Portal)M.MeshType = "Sphere" Portal.Name = "PortalEnergy"
345
local Portal2 = Instance.new("Part",game.Workspace)Portal2.Transparency = 1 Portal2.Anchored = true Portal2.CanCollide = false Portal2.BrickColor = BrickColor.new("Parsley green")
346
Portal2.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,0,-10)Portal2.Size = Vector3.new(0.2,0.4,0.2) Portal2.Material = "Neon"
347
local PosP = Portal.CFrame
348
local M = Instance.new("SpecialMesh",Portal2)M.MeshType = "Sphere" Portal2.Name = "PortalEnergy"
349
for i = 1,10 do
350
Portal.Transparency = Portal.Transparency - 0.25
351
Portal.Size = Portal.Size + Vector3.new(0.65,0.95,0)
352
Portal.CFrame = PosP
353
Portal2.Transparency = Portal2.Transparency - 0.25
354
Portal2.Size = Portal2.Size + Vector3.new(0.63,0.93,0.005)
355
Portal2.CFrame = PosP
356
swait()
357
end
358
Portal.Touched:connect(function(PartH)
359
if PartH.Parent ~= c and PartH.Parent.Parent ~= c and PartH.Size.Z <= 200 and PartH.Name ~= "PortalEnergy" then
360
PartH:remove()
361
end
362
end)
363
local R = 1
364
for i = 1,100 do
365
wait(0.1)
366
if R == 1 then R = 2
367
PortalRipple(Portal2,BrickColor.new("Earth green"))
368
elseif R == 2 then R = 1
369
PortalRipple(Portal2,BrickColor.new("Lime green"))
370
elseif R == 3 then R = 4
371
PortalRipple(Portal2,BrickColor.new("Earth green"))
372
elseif R == 4 then R = 1
373
PortalRipple(Portal2,BrickColor.new("Lime green"))
374
end
375
end
376
for i = 1,10 do
377
Portal.Transparency = Portal.Transparency + 0.25
378
Portal.Size = Portal.Size - Vector3.new(0.65,0.95,0)
379
Portal.CFrame = PosP
380
Portal2.Transparency = Portal2.Transparency + 0.25
381
Portal2.Size = Portal2.Size - Vector3.new(0.63,0.93,0.005)
382
Portal2.CFrame = PosP
383
swait()
384
end
385
end)
386
end
387
388
function CreatePortal2()
389
Spawn(function()
390
local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = BrickColor.new("Lime green")
391
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"
392
local M = Instance.new("SpecialMesh",Portal)M.MeshType = "Sphere" Portal.Name = "PortalEnergy"
393
local S = Instance.new("Sound", Portal)S.SoundId = "rbxassetid://477163697" S:Play()
394
if LoudVolume == true then S.Volume = 10 else S.Volume = 2 end
395
local Portal2 = Instance.new("Part",game.Workspace)Portal2.Transparency = 1 Portal2.Anchored = true Portal2.CanCollide = false Portal2.BrickColor = BrickColor.new("Parsley green")
396
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"
397
local PosP = Portal.CFrame
398
local M = Instance.new("SpecialMesh",Portal2)M.MeshType = "Sphere" Portal2.Name = "PortalEnergy"
399
for i = 1,10 do
400
Portal.Transparency = Portal.Transparency - 0.25
401
Portal.Size = Portal.Size + Vector3.new(0.65,0.95,0)
402
Portal.CFrame = PosP
403
Portal2.Transparency = Portal2.Transparency - 0.25
404
Portal2.Size = Portal2.Size + Vector3.new(0.63,0.93,0.005)
405
Portal2.CFrame = PosP
406
swait()
407
end
408
for i = 1,10 do
409
Portal.Transparency = Portal.Transparency + 0.25
410
Portal.Size = Portal.Size - Vector3.new(0.65,0.95,0)
411
Portal.CFrame = PosP
412
Portal2.Transparency = Portal2.Transparency + 0.25
413
Portal2.Size = Portal2.Size - Vector3.new(0.63,0.93,0.005)
414
Portal2.CFrame = PosP
415
swait()
416
end
417
end)
418
end
419
420
function CreatePortal3()
421
Spawn(function()
422
local Portal = Instance.new("Part",game.Workspace)Portal.Transparency = 1 Portal.Anchored = true Portal.CanCollide = false Portal.BrickColor = BrickColor.new("Lime green")
423
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"
424
local M = Instance.new("SpecialMesh",Portal)M.MeshType = "Sphere" Portal.Name = "PortalEnergy"
425
local Portal2 = Instance.new("Part",game.Workspace)Portal2.Transparency = 1 Portal2.Anchored = true Portal2.CanCollide = false Portal2.BrickColor = BrickColor.new("Parsley green")
426
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"
427
local PosP = Portal.CFrame
428
local M = Instance.new("SpecialMesh",Portal2)M.MeshType = "Sphere" Portal2.Name = "PortalEnergy"
429
local S = Instance.new("Sound", Portal)S.SoundId = "rbxassetid://181004957" S:Play()
430
if LoudVolume == true then S.Volume = 10 else S.Volume = 2 end
431
for i = 1,10 do
432
Portal.Transparency = Portal.Transparency - 0.25
433
Portal.Size = Portal.Size + Vector3.new(0.65,0.95,0)
434
Portal.CFrame = PosP
435
Portal2.Transparency = Portal2.Transparency - 0.25
436
Portal2.Size = Portal2.Size + Vector3.new(0.63,0.93,0.005)
437
Portal2.CFrame = PosP
438
swait()
439
end
440
for i = 1,10 do
441
Portal.Transparency = Portal.Transparency + 0.25
442
Portal.Size = Portal.Size - Vector3.new(0.65,0.95,0)
443
Portal.CFrame = PosP
444
Portal2.Transparency = Portal2.Transparency + 0.25
445
Portal2.Size = Portal2.Size - Vector3.new(0.63,0.93,0.005)
446
Portal2.CFrame = PosP
447
swait()
448
end
449
end)
450
end
451
452
function DestructionPortal()
453
attack = true
454
anim.Parent = nil
455
for i = 1,14 do
456
swait()
457
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
458
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
459
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(90)), 0.25)
460
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
461
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
462
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
463
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
464
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
465
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
466
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
467
end
468
for i = 1,6 do
469
swait()
470
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.35)
471
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.35)
472
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(125)), 0.35)
473
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
474
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
475
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
476
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
477
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
478
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
479
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.35)
480
end
481
CreatePortal1()
482
for i = 1,10 do
483
swait()
484
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(65)), 0.25)
485
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-65)), 0.25)
486
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(-65), rd(90)), 0.25)
487
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
488
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
489
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
490
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
491
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
492
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
493
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
494
end
495
for i = 1,10 do
496
swait()
497
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
498
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
499
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
500
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
501
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
502
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
503
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
504
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
505
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
506
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
507
end
508
resetlerp()
509
attack = false
510
anim.Parent = Humanoid
511
end
512
Disappeared = false
513
function DisappearPortal()
514
if Disappeared == false then
515
attack = true Humanoid.WalkSpeed = 150 Humanoid.JumpPower = 250
516
Disappeared = true
517
anim.Parent = nil
518
for i = 1,14 do
519
swait()
520
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
521
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 0.25)
522
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(0), rd(15)), 0.25)
523
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
524
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
525
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
526
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
527
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
528
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
529
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
530
end
531
for i = 1,8 do
532
swait()
533
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
534
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 0.5)
535
lerpz(RS, "C0", RSC0 * cf(0, 0.5, 0) * ang(rd(15), rd(0), rd(15)), 0.5)
536
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
537
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
538
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
539
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
540
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
541
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
542
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
543
end
544
CreatePortal2()
545
for i = 1,14 do
546
swait()
547
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
548
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 0.25)
549
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(0), rd(15)), 0.25)
550
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
551
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
552
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
553
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
554
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
555
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
556
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
557
end
558
lerpz(RJ, "C0", RJC0 * cf(0, 0, 1000000) * ang(rd(0), rd(0), rd(0)), 1)
559
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(45), rd(0), rd(0)), 1)
560
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(0), rd(15)), 1)
561
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
562
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
563
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
564
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
565
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
566
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
567
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
568
attack = false
569
anim.Parent = Humanoid
570
else Disappeared = false
571
resetlerp() Humanoid.WalkSpeed = 16 Humanoid.JumpPower = 50
572
CreatePortal3() wait()
573
c.HumanoidRootPart.CFrame = c.HumanoidRootPart.CFrame*CFrame.new(0,10,0)
574
end
575
end
576
577
function EpicLaugh()
578
for i = 1,5 do
579
local S = Instance.new("Sound",c.Head)S.SoundId = "rbxassetid://207358216" S.Volume = 10 S:Play()
580
end
581
for i = 1,35 do
582
swait()
583
lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(0)), 0.25)
584
lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(0)), 0.25)
585
lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(-35), rd(0), rd(180)), 0.25)
586
lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
587
lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(-35), rd(0), rd(-180)), 0.25)
588
lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
589
lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(-25)), 0.25)
590
lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
591
lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(-15), rd(0), rd(25)), 0.25)
592
lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.25)
593
end
594
for i = 1,100 do
595
swait()
596
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)
597
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)
598
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)
599
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)
600
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)
601
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)
602
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)
603
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)
604
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)
605
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)
606
end
607
resetlerp()
608
end
609
610
function MuteMusic()
611
if s.Volume > 0 then
612
s.Volume = 0
613
else
614
if LoudVolume == true then
615
s.Volume = 6
616
else
617
s.Volume = 1
618
end
619
end
620
end
621
622
mouse.KeyDown:connect(function(key)
623
if attack == true then return end
624
if c:findFirstChild("PortalGun")~=nil then
625
if Disappeared == false then
626
if key == "z" then
627
DestructionPortal()
628
end
629
end
630
if key == "x" then
631
DisappearPortal()
632
end
633
end
634
if Disappeared == false then
635
if key == "q" then
636
CreatePortalGun()
637
end
638
if key == "e" then
639
ThrowGun()
640
end
641
end
642
if key == "l" then
643
MuteMusic()
644
end
645
if key == "m" then
646
EpicLaugh()
647
end
648
end)
649
650
  game:GetService("RunService").RenderStepped:connect(function()
651
	Humanoid.MaxHealth = Humanoid.MaxHealth*2
652
	Humanoid.Health = Humanoid.MaxHealth*2
653
	for i,v in pairs (c:children()) do
654
if v.ClassName == "Accessory" then
655
for i,v2 in pairs (v:children()) do
656
if v2.ClassName == "Part" then
657
v2.Anchored = false
658
end
659
end
660
end
661
end
662
for i,v in pairs (c:children()) do
663
if v.ClassName == "Part" then
664
v.Anchored = false
665
end
666
end
667
	end)