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