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