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