View difference between Paste ID: wd10Dvew and 844pga46
SHOW: | | - or go back to the newest paste.
1-
-- Decompiled by Blyat
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-
while not getmetatable(shared) do
4+
local RealPlayer = Player
5-
  wait()
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={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=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 -- Decompiled by Blyat
6
-- Fixed by ben
7-
shared(script)
7+
8
size = 6
9
p = game.Players.LocalPlayer
10
char = p.Character
11
pchar = char
12
as = 0.3
13
as_2 = 0.3
14
angle = 0
15
rift = true
16
canactivate = true
17
beamactive = true
18
laser = true
19
dorment = true
20
beam = true
21
hat = Instance.new("Part", char)
22
hat.Size = Vector3.new(1, 1, 1)
23
hatm = Instance.new("SpecialMesh", hat)
24
hatm.MeshType = "FileMesh"
25
hatm.MeshId = "http://www.roblox.com/asset/?id=96102993"
26
hatm.TextureId = "http://www.roblox.com/asset/?id=96103063"
27
hatw = Instance.new("Weld", hat)
28
hatw.Part0 = hat
29
hatw.Part1 = char.Head
30
Mouse = p:GetMouse()
31
mouse = p:GetMouse()
32
m = p:GetMouse()
33
char.Animate.Disabled = true
34
char.Head.Transparency = 1
35
anglespeed = 0
36
canstep = true
37
active = true
38
org = char.HumanoidRootPart.RootJoint.C0
39
char.Torso.CFrame = char.Torso.CFrame * CFrame.new(0, 15, 0)
40
mus = Instance.new("Sound", char)
41
mus.SoundId = "rbxassetid://404897101"
42
mus.Looped = true
43
char.Humanoid.JumpPower = 0
44
mus:Play()
45
char.Humanoid.WalkSpeed = 0
46
step = Instance.new("Sound", char.Torso)
47
step.SoundId = "rbxassetid://198360378"
48
FootStep = function()
49
  
50
  local ray = Ray.new(char["Left Leg"].Position, Vector3.new(0, -6.5, 0))
51
  local part, endPoint, normal = Workspace:FindPartOnRay(ray)
52
  if part then
53
    step:Play()
54
  end
55
end
56
57
local t = tick()
58
local Smooth = 1
59
torso = char:findFirstChild("Torso")
60
z = Instance.new("Sound", torso)
61
z.SoundId = "rbxassetid://412874168" -- Put Music ID Here.
62
z.Looped = true
63
z.Pitch = 0.80
64
z.Volume = 1
65
wait(.1)
66
z:Play()
67
head = char.Head
68
ra = char:findFirstChild("Right Arm")
69
ra.CanCollide = true
70
la = char:findFirstChild("Left Arm")
71
la.CanCollide = true
72
rl = char:findFirstChild("Right Leg")
73
rl.CanCollide = true
74
ll = char:findFirstChild("Left Leg")
75
ll.CanCollide = true
76
neck = torso:findFirstChild("Neck")
77
rootpart = char:findFirstChild("HumanoidRootPart")
78
rj = rootpart:findFirstChild("RootJoint")
79
scl = function(m)
80
  
81
  for i,v in pairs(m:GetChildren()) do
82
    if v:IsA("SpecialMesh") or v:IsA("DataModelMesh") then
83
      if v.MeshType == Enum.MeshType.FileMesh then
84
        v.Scale = v.Scale * size
85
      else
86
        v.Scale = v.Scale * size
87
      end
88
    else
89
    end
90
    if v:IsA("BasePart") then
91
      do
92
        scl(v)
93
        -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_THEN_STMT
94
95
        -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_STMT
96
97
      end
98
    end
99
  end
100
end
101
102
scl(char)
103
newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
104
  
105
  local wld = Instance.new("Weld", wp1)
106
  wld.Part0 = wp0
107
  wld.Part1 = wp1
108
  wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
109
  return wld
110
end
111
112
local mult = size
113
la.Size = la.Size * mult
114
ra.Size = ra.Size * mult
115
ll.Size = ll.Size * mult
116
rl.Size = rl.Size * mult
117
torso.Size = torso.Size * mult
118
rootpart.Size = rootpart.Size * mult
119
local LeftShoulder = newWeld(torso, la, -1.5 * mult, 0.5 * mult, 0)
120
LeftShoulder.C1 = CFrame.new(0, 0.5 * mult, 0)
121
local RightShoulder = newWeld(torso, ra, 1.5 * mult, 0.5 * mult, 0)
122
RightShoulder.C1 = CFrame.new(0, 0.5 * mult, 0)
123
local Neck = newWeld(torso, head, 0, mult, 0)
124
local LeftHip = newWeld(torso, ll, -0.5 * mult, -1 * mult, 0)
125
LeftHip.C1 = CFrame.new(0, mult, 0)
126
local RightHip = newWeld(torso, rl, 0.5 * mult, -1 * mult, 0)
127
RightHip.C1 = CFrame.new(0, mult, 0)
128
local Torso2 = rj:Clone()
129
Torso2.Part0 = rootpart
130
Torso2.Part1 = torso
131
Torso2.Parent = rootpart
132
Neck.C1 = CFrame.new(0, -(mult / 2), 0)
133
neckc0 = Neck.C0
134
rsc0 = RightShoulder.C0
135
lsc0 = LeftShoulder.C0
136
llc0 = LeftHip.C0
137
rlc0 = RightHip.C0
138
rootc0 = Torso2.C0
139
rootc1 = Torso2.C1
140
wait()
141
deg = math.deg
142
rad = math.rad
143
asin = math.asin
144
atan2 = math.atan2
145
cos = math.cos
146
sin = math.sin
147
rad = math.sin
148
getAngles = function(cf)
149
  
150
  local sx, sy, sz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
151
  return atan2(-m12, m22), asin(m02), atan2(-m01, m00)
152
end
153
154
Lerp = {Number = function(C1, C2, inc)
155
  
156
  return C1 + (C2 - C1) * inc
157
end
158
, CFrame = function(a, b, m)
159
  
160
  local c, d = {a:components()}, {b:components()}
161
  table.foreach(c, function(a, b)
162
    
163
    c[a] = c[a] + (d[a] - c[a]) * m
164
  end
165
)
166
  return CFrame.new(unpack(c))
167
end
168
}
169
staff = Instance.new("Part", char)
170
staff.Size = Vector3.new(2, 2, 40)
171
staff.TopSurface = 0
172
staff.CanCollide = false
173
staff.BottomSurface = 0
174
staff.Material = "Slate"
175
staff.BrickColor = BrickColor.new("Really black")
176
staffw = Instance.new("Weld", staff)
177
staffw.Part0 = staff
178
staffw.Part1 = char["Left Arm"]
179
staffw.C0 = CFrame.new(0, 6, -5)
180
top = Instance.new("Part", char)
181
top.Size = Vector3.new(4, 4, 4)
182
top.BrickColor = BrickColor.new("Lime green")
183
top.TopSurface = 0
184
top.BottomSurface = 0
185
top.Material = "Neon"
186
topm = Instance.new("SpecialMesh", top)
187
topm.MeshType = "Sphere"
188
topw = Instance.new("Weld", top)
189
topw.Part0 = top
190
topw.Part1 = staff
191
topw.C0 = CFrame.new(0, 0, 23)
192
top1 = Instance.new("Part", char)
193
top1.BrickColor = BrickColor.new("Really black")
194
top1.Size = Vector3.new(5, 5, 2)
195
top1.TopSurface = 0
196
top1.Material = "Slate"
197
top1.BottomSurface = 0
198
topw1 = Instance.new("Weld", top1)
199
topw1.Part0 = top1
200
topw1.Part1 = staff
201
topw1.C0 = CFrame.new(0, 0, 20)
202
top2 = Instance.new("Part", char)
203
top2.BrickColor = BrickColor.new("Really black")
204
top2.Size = Vector3.new(2, 2, 4)
205
top2.TopSurface = 0
206
top2.Material = "Slate"
207
top2.BottomSurface = 0
208
topw2 = Instance.new("Weld", top2)
209
topw2.Part0 = top2
210
topw2.Part1 = top1
211
topw2.C0 = CFrame.new(2, 0, 2.4) * CFrame.Angles(rad(0), rad(10), 0)
212
top3 = Instance.new("Part", char)
213
top3.BrickColor = BrickColor.new("Really black")
214
top3.Size = Vector3.new(2, 2, 4)
215
top3.TopSurface = 0
216
top3.Material = "Slate"
217
top3.BottomSurface = 0
218
topw3 = Instance.new("Weld", top3)
219
topw3.Part0 = top3
220
topw3.Part1 = top1
221
topw3.C0 = CFrame.new(-2, 0, 2.4) * CFrame.Angles(0, rad(-10), 0)
222
LerpTo = {RightArm = CFrame.new(9, 3, 0), LeftArm = CFrame.new(-9, 3, 0), Staff = CFrame.new(0, 6, -5), LeftLeg = CFrame.new(-3, -6, 0), RightLeg = CFrame.new(3, -6, 0), Body = Torso2.C0 * CFrame.new(0, 0, 0), Head = CFrame.new(0, 6, 0), Crystal = CFrame.new(0, 0, 23)}
223
if dorment == true then
224
  fakela = Instance.new("Part", char)
225
  fakela.Material = "Slate"
226
  fakela.TopSurface = 0
227
  fakela.BottomSurface = 0
228
  fakela.BrickColor = char.Torso.BrickColor
229
  fakela.Size = char["Left Arm"].Size + Vector3.new(0.1, 0.1, 0.1)
230
  fakelaw = Instance.new("Weld", fakela)
231
  fakelaw.Part0 = fakela
232
  fakelaw.Part1 = char["Left Arm"]
233
  fakera = Instance.new("Part", char)
234
  fakera.Material = "Slate"
235
  fakera.TopSurface = 0
236
  fakera.BottomSurface = 0
237
  fakera.BrickColor = char.Torso.BrickColor
238
  fakera.Size = char["Right Arm"].Size + Vector3.new(0.1, 0.1, 0.1)
239
  fakeraw = Instance.new("Weld", fakera)
240
  fakeraw.Part0 = fakera
241
  fakeraw.Part1 = char["Right Arm"]
242
  fakell = Instance.new("Part", char)
243
  fakell.Material = "Slate"
244
  fakell.TopSurface = 0
245
  fakell.BottomSurface = 0
246
  fakell.BrickColor = char.Torso.BrickColor
247
  fakell.Size = char["Left Leg"].Size + Vector3.new(0.1, 0.1, 0.1)
248
  fakellw = Instance.new("Weld", fakell)
249
  fakellw.Part0 = fakell
250
  fakellw.Part1 = char["Left Leg"]
251
  fakerl = Instance.new("Part", char)
252
  fakerl.Material = "Slate"
253
  fakerl.TopSurface = 0
254
  fakerl.BottomSurface = 0
255
  fakerl.BrickColor = char.Torso.BrickColor
256
  fakerl.Size = char["Right Leg"].Size + Vector3.new(0.1, 0.1, 0.1)
257
  fakerlw = Instance.new("Weld", fakerl)
258
  fakerlw.Part0 = fakerl
259
  fakerlw.Part1 = char["Right Leg"]
260
  faket = Instance.new("Part", char)
261
  faket.Material = "Slate"
262
  faket.TopSurface = 0
263
  faket.BottomSurface = 0
264
  faket.BrickColor = char.Torso.BrickColor
265
  faket.Size = char.Torso.Size + Vector3.new(0.1, 0.1, 0.1)
266
  faketw = Instance.new("Weld", faket)
267
  faketw.Part0 = faket
268
  faketw.Part1 = char.Torso
269
  char.Humanoid.Health = math.huge
270
  LerpTo.Body = Torso2.C0 * CFrame.new(0, 0, -3) * CFrame.Angles(rad(0.1), 0, 0)
271
  LerpTo.LeftLeg = CFrame.new(-3, -5, -4) * CFrame.Angles(rad(0.1), 0, 0)
272
  LerpTo.LeftArm = CFrame.new(-9, 3, 0) * CFrame.Angles(7.9, 0, 0)
273
  LerpTo.Head = Neck.C0 * CFrame.Angles(rad(-0.1), 0, 0)
274
  LerpTo.RightArm = RightShoulder.C0 * CFrame.Angles(0, 0, rad(0.2))
275
  LerpTo.Staff = CFrame.new(0, 6, 0) * CFrame.Angles(rad(0), 0, 0)
276
  LerpTo.RightLeg = CFrame.new(3, -6, -2.3) * CFrame.Angles(rad(-69.75), 0, 0)
277
end
278
updateanims = function()
279
  
280
  if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
281
    anglespeed = 0.5
282
    if active == false then
283
      as_2 = 0.3
284
      LerpTo.RightArm = CFrame.new(9, 3, 0) * CFrame.Angles(sin(angle) * 0.1, 0, rad(0.1))
285
      LerpTo.Body = org
286
      LerpTo.LeftArm = CFrame.new(-8.5, 3, -1) * CFrame.Angles(sin(angle) * 0.02, rad(0), rad(0)) * CFrame.Angles(1.5, 0, -0.2)
287
      LerpTo.RightLeg = CFrame.new(3.2, -6, -0.7) * CFrame.Angles(math.rad(-1), math.rad(-10), 0)
288
      LerpTo.Staff = CFrame.new(0, 6, -5)
289
      LerpTo.LeftLeg = CFrame.new(-3, -6, 0.1) * CFrame.Angles(math.rad(-5), math.rad(4), 0)
290
    end
291
  else
292
    if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
293
      anglespeed = 1
294
      if active == false then
295
        LerpTo.Body = org
296
        LerpTo.RightLeg = CFrame.new(3, -6, 0) * CFrame.Angles(-sin(angle * 1) * 0.3, 0, 0)
297
        LerpTo.LeftLeg = CFrame.new(-3, -6, 0) * CFrame.Angles(sin(angle * 1) * 0.3, 0, 0)
298
        LerpTo.Staff = CFrame.new(0, 6, -5)
299
        LerpTo.Head = CFrame.new(0, 6, 0)
300
        LerpTo.RightArm = CFrame.new(9, 3, 0) * CFrame.Angles(-sin(angle) * 0.4, 0, rad(3))
301
        as_2 = 0.05
302
        LerpTo.LeftArm = CFrame.new(-8.5, 3, -1) * CFrame.Angles(sin(angle) * 0.02, rad(0), rad(0)) * CFrame.Angles(1.3, 0, -0.2)
303
      end
304
    end
305
  end
306
end
307
308
Spawn(function()
309
  
310
  while wait() do
311
    angle = angle % 100 + anglespeed / 10
312
    t = t + 0.25 * Smooth
313
  end
314
end
315
)
316
m.KeyDown:connect(function(k)
317
  
318
  if k == string.char(52) and canactivate == true then
319
    canactivate = false
320
    dorment = false
321
    ch = Instance.new("Sound", char)
322
    ch.SoundId = "rbxassetid://257001355"
323
    ch.Volume = 1
324
    ch:Play()
325
    spark = Instance.new("Part", char)
326
    spark.Size = Vector3.new(2, 2, 2)
327
    spark.BrickColor = BrickColor.new("Lime green")
328
    spark.Material = "Neon"
329
    spark.TopSurface = 0
330
    sparkw = Instance.new("Weld", spark)
331
    sparkw.Part0 = spark
332
    sparkw.Part1 = top
333
    spark.BottomSurface = 0
334
    sparkm = Instance.new("SpecialMesh", spark)
335
    sparkm.MeshType = "Sphere"
336
    for i = 2, 30, 0.5 do
337
      wait()
338
      sparkm.Scale = Vector3.new(i, i, i)
339
      spark.Transparency = i / 10
340
    end
341
    char.Humanoid.WalkSpeed = 6
342
    char.Humanoid.MaxHealth = 1000000
343
    wait()
344
    char.Humanoid.Health = 1000000
345
    active = false
346
    faket:Remove()
347
    fakela:Remove()
348
    fakera:Remove()
349
    fakerl:Remove()
350
    fakell:Remove()
351
    wait(0.6)
352
    mus.SoundId = "rbxassetid://151514610"
353
    mus.Volume = 1
354
  end
355
end
356
)
357
poos = top.Position + Vector3.new(0, 20, 0)
358
m.KeyDown:connect(function(k)
359
  
360
  if k == "q" and beama == true then
361
    beama = false
362
    active = true
363
    s1 = Instance.new("Sound", char)
364
    s1.SoundId = "rbxassetid://154230112"
365
    s1.Volume = 1
366
    s1.Pitch = 1
367
    s1:Play()
368
    local ray = Ray.new(poos, Mouse.Hit.p - poos.unit * 999)
369
    local part, position = workspace:FindPartOnRay(ray, p.Character, false, true)
370
    local part, position = workspace:FindPartOnRay(ray, top, false, true)
371
    local part, position = workspace:FindPartOnRay(ray, top2, false, true)
372
    local part, position = workspace:FindPartOnRay(ray, top1, false, true)
373
    local hit, pos, normal = Workspace:FindPartOnRay(ray, character)
374
    if hit then
375
      local beam = Instance.new("Part", workspace)
376
      beam.BrickColor = BrickColor.new("Lime green")
377
      beam.FormFactor = "Custom"
378
      beam.Material = "Neon"
379
      beam.Transparency = 0
380
      beam.Anchored = true
381
      beam.Locked = true
382
      beam.CanCollide = false
383
      local distance = top.CFrame.p
384
      beam.Size = Vector3.new(3, 3, distance)
385
      beam.CFrame = CFrame.new(top.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
386
      game:GetService("Debris"):AddItem(beam, 1)
387
      portal = Instance.new("Part", char)
388
      portal.Anchored = true
389
      portal.Material = "Neon"
390
      portal.CanCollide = false
391
      portal.Size = Vector3.new(3, 0.2, 3)
392
      portal.CFrame = CFrame.new(pos, pos + normal) * CFrame.Angles(math.pi / 2, 0, 0)
393
      portal.BrickColor = BrickColor.new("Lime green")
394
      local portalm = Instance.new("CylinderMesh", portal)
395
      for i = 1, 7, 0.3 do
396
        wait()
397
        portalm.Scale = Vector3.new(i, 0.2, i)
398
      end
399
      s = Instance.new("Sound", char)
400
      s.SoundId = "rbxassetid://228343271"
401
      s.Volume = 1
402
      s.Pitch = 1
403
      s:Play()
404
      do
405
        for i = 1, 20 do
406
          wait()
407
          local CreateRegion3FromLocAndSize = function(Position, Size)
408
    
409
    local SizeOffset = Size / 2
410
    local Point1 = Position - SizeOffset
411
    local Point2 = Position + SizeOffset
412
    return Region3.new(Point1, Point2)
413
  end
414
415
          local reg = CreateRegion3FromLocAndSize(portal.Position, portal.Size * 10)
416
          do
417
            for i,v in pairs(game:service("Workspace"):FindPartsInRegion3WithIgnoreList(reg, char:GetChildren(), 100)) do
418
              print(v)
419
              Spawn(function()
420
    
421
    ypcall(function()
422
      
423
      if not v.Parent:FindFirstChild("Humanoid") then
424
        local humanoid = v.Parent.Parent:FindFirstChild("Humanoid")
425
      end
426
      humanoid:TakeDamage(math.random(1, 4))
427
    end
428
)
429
  end
430
)
431
            end
432
            local rng1 = Instance.new("Part", char)
433
            rng1.Anchored = true
434
            rng1.BrickColor = BrickColor.new("Lime green")
435
            rng1.CanCollide = false
436
            rng1.FormFactor = 3
437
            rng1.Name = "Ring"
438
            rng1.Size = Vector3.new(1, 1, 1)
439
            rng1.Transparency = 0.35
440
            rng1.TopSurface = 0
441
            rng1.BottomSurface = 0
442
            rng1.Position = portal.Position
443
            rng1.CFrame = rng1.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
444
            local rngm1 = Instance.new("SpecialMesh", rng1)
445
            rngm1.MeshId = "http://www.roblox.com/asset/?id=3270017"
446
            rngm1.Scale = Vector3.new(1, 1.3, 2)
447
            local rng = Instance.new("Part", char)
448
            rng.Anchored = true
449
            rng.BrickColor = BrickColor.new("Lime green")
450
            rng.CanCollide = false
451
            rng.FormFactor = 3
452
            rng.Name = "Ring"
453
            rng.Size = Vector3.new(1, 1, 1)
454
            rng.Transparency = 0
455
            rng.TopSurface = 0
456
            rng.BottomSurface = 0
457
            rng.Material = "Neon"
458
            rng.Position = portal.Position - Vector3.new(0, 0, 0)
459
            rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
460
            local rngm = Instance.new("SpecialMesh", rng)
461
            rngm.MeshType = "Sphere"
462
            rngm.Scale = Vector3.new(1, 1.3, 2)
463
            local rng3 = Instance.new("Part", char)
464
            rng3.Anchored = true
465
            rng3.BrickColor = BrickColor.new("Lime green")
466
            rng3.CanCollide = false
467
            rng3.FormFactor = 3
468
            rng3.Name = "Ring"
469
            rng3.Size = Vector3.new(1, 1, 1)
470
            rng3.Transparency = 0
471
            rng3.TopSurface = 0
472
            rng3.BottomSurface = 0
473
            rng3.Material = "Neon"
474
            rng3.Position = portal.Position - Vector3.new(0, 2, 0)
475
            rng3.CFrame = rng3.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
476
            local rngm3 = Instance.new("CylinderMesh", rng3)
477
            rngm3.Scale = Vector3.new(1, 1.3, 2)
478
            wait(0.1)
479
            coroutine.wrap(function()
480
    
481
    for i = 1, 7, 0.5 do
482
      rngm.Scale = Vector3.new(2 + i * 6, 2 + i * 6, 2 + i * 6)
483
      rng.Transparency = i / 7
484
      rngm3.Scale = Vector3.new(3 + i, 10 + i * 30, 3 + i)
485
      rng3.Transparency = i / 7
486
      rngm1.Scale = Vector3.new(2 + i * 12, 2 + i * 12, 1)
487
      rng1.Transparency = i / 7
488
      wait()
489
    end
490
    wait()
491
    rng:Destroy()
492
    rng1:Remove()
493
    rng3:Remove()
494
    wait()
495
  end
496
)()
497
          end
498
        end
499
      end
500
      active = false
501
      for i = 10, 0, -2 do
502
        wait()
503
        portalm.Scale = Vector3.new(i, i, i)
504
      end
505
    end
506
  end
507
  do
508
    wait(2)
509
    beama = true
510
  end
511
end
512
)
513
m.KeyDown:connect(function(k)
514
  
515
  if k == "x" and rift == true then
516
    rift = false
517
    active = true
518
    LerpTo.LeftArm = LeftShoulder.C0 * CFrame.Angles(math.rad(40), 0, 0)
519
    LerpTo.Head = Neck.C0 * CFrame.Angles(math.rad(20), 0, 0)
520
    LerpTo.Staff = staffw.C0 * CFrame.Angles(rad(0.6), 0, 0) * CFrame.new(0, 5, 10)
521
    wait()
522
    spark = Instance.new("Part", char)
523
    spark.Size = Vector3.new(2, 2, 2)
524
    spark.BrickColor = BrickColor.new("Lime green")
525
    spark.Material = "Neon"
526
    spark.TopSurface = 0
527
    sparkw = Instance.new("Weld", spark)
528
    sparkw.Part0 = spark
529
    sparkw.Part1 = staff
530
    sparkw.C0 = CFrame.new(0, 0, 20)
531
    spark.BottomSurface = 0
532
    sparkm = Instance.new("SpecialMesh", spark)
533
    sparkm.MeshType = "Sphere"
534
    for i = 2, 10, 0.5 do
535
      wait()
536
      sparkm.Scale = Vector3.new(i, i, i)
537
      spark.Transparency = i / 10
538
    end
539
    wait(2)
540
    m = p:GetMouse()
541
    LerpTo.LeftArm = LeftShoulder.C0 * CFrame.Angles(math.rad(40), math.rad(20), 0)
542
    LerpTo.RightArm = RightShoulder.C0 * CFrame.Angles(math.rad(40), math.rad(-20), 0)
543
    LerpTo.Head = Neck.C0 * CFrame.Angles(math.rad(20), 0, 0)
544
    LerpTo.Staff = staffw.C0 * CFrame.Angles(0, 0, 0)
545
    local rng = Instance.new("Part", char)
546
    rng.Anchored = true
547
    rng.BrickColor = BrickColor.new("Lime green")
548
    rng.CanCollide = false
549
    rng.FormFactor = 3
550
    rng.Name = "Ring"
551
    rng.Size = Vector3.new(1.5, 1.5, 1.1)
552
    rng.Transparency = 0
553
    rng.TopSurface = 0
554
    rng.BottomSurface = 0
555
    rng.Material = "Neon"
556
    rng.CFrame = char.Torso.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) * CFrame.new(0, 0, -50)
557
    rng.CFrame = CFrame.new(rng.Position, Vector3.new(m.Hit.p.x, m.Hit.p.y, m.Hit.p.z)) * CFrame.Angles(math.rad(90), 0, 0)
558
    local rngm = Instance.new("SpecialMesh", rng)
559
    rngm.MeshType = "Sphere"
560
    do
561
      for i = 1, 20, 0.5 do
562
        wait()
563
        rngm.Scale = Vector3.new(60, 0.5, i)
564
      end
565
    end
566
    endpoint = Instance.new("Part", char)
567
    endpoint.Transparency = 1
568
    wait(0.5)
569
    LerpTo.LeftArm = CFrame.new(-9, 3, 0) * CFrame.Angles(math.rad(90), math.rad(0), 0)
570
    LerpTo.RightArm = CFrame.new(9, 3, 0) * CFrame.Angles(math.rad(0), math.rad(40), 0)
571
    LerpTo.Head = CFrame.new(0, 6, 0) * CFrame.Angles(math.rad(0), 0, 0)
572
    LerpTo.Staff = CFrame.new(0, 5, -6) * CFrame.Angles(rad(-50), 0, 0)
573
    s1 = Instance.new("Sound", char)
574
    s1.SoundId = "rbxassetid://130792236"
575
    s1:Play()
576
    wait(0.4)
577
    s = Instance.new("Sound", char)
578
    s.SoundId = "rbxassetid://254847708"
579
    s.Volume = 1
580
    s.Pitch = 1
581
    s:Play()
582
    for i = 1, 85 do
583
      wait()
584
      local ray = Ray.new(rng.CFrame.p, rng.CFrame.p - rng.CFrame * CFrame.new(0, 20, 0).p.unit * 900)
585
      local part, position = workspace:FindPartOnRay(ray, p.Character, false, true)
586
      local beam = Instance.new("Part", workspace)
587
      beam.BrickColor = BrickColor.new("Lime green")
588
      beam.FormFactor = "Custom"
589
      beam.Material = "Neon"
590
      beam.Transparency = 0
591
      beam.Anchored = true
592
      beam.Locked = true
593
      beam.CanCollide = false
594
      local distance = rng.CFrame.p
595
      beam.Size = Vector3.new(30, 17, distance)
596
      beam.CFrame = CFrame.new(rng.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
597
      endpoint.Position = position
598
      game:GetService("Debris"):AddItem(beam, 0.5)
599
      local rng2 = Instance.new("Part", char)
600
      rng2.Anchored = true
601
      rng2.BrickColor = BrickColor.new("Lime green")
602
      rng2.CanCollide = false
603
      rng2.FormFactor = 3
604
      rng2.Name = "Ring"
605
      rng2.Size = Vector3.new(1, 1, 1)
606
      rng2.Transparency = 0
607
      rng2.TopSurface = 0
608
      rng2.BottomSurface = 0
609
      rng2.CFrame = rng.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) * CFrame.new(0, -3, 0)
610
      local rngm2 = Instance.new("SpecialMesh", rng2)
611
      rngm2.MeshId = "http://www.roblox.com/asset/?id=20329976"
612
      rngm2.Scale = Vector3.new(1, 1.3, 2)
613
      local rng3 = Instance.new("Part", char)
614
      rng3.Anchored = true
615
      rng3.BrickColor = BrickColor.new("Lime green")
616
      rng3.CanCollide = false
617
      rng3.FormFactor = 3
618
      rng3.Name = "Ring"
619
      rng3.Size = Vector3.new(1, 1, 1)
620
      rng3.Transparency = 0
621
      rng3.TopSurface = 0
622
      rng3.BottomSurface = 0
623
      rng3.Material = "Neon"
624
      rng3.Position = endpoint.Position
625
      rng3.CFrame = rng3.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
626
      local rngm3 = Instance.new("SpecialMesh", rng3)
627
      rngm3.MeshType = "Sphere"
628
      rngm3.Scale = Vector3.new(1, 1.3, 2)
629
      local rng4 = Instance.new("Part", char)
630
      rng4.Anchored = true
631
      rng4.BrickColor = BrickColor.new("Lime green")
632
      rng4.CanCollide = false
633
      rng4.FormFactor = 3
634
      rng4.Name = "Ring"
635
      rng4.Size = Vector3.new(1, 1, 1)
636
      rng4.Transparency = 0
637
      rng4.TopSurface = 0
638
      rng4.BottomSurface = 0
639
      rng4.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) * CFrame.new(0, -3, 0)
640
      local rngm4 = Instance.new("SpecialMesh", rng4)
641
      do
642
        rngm4.MeshId = "http://www.roblox.com/asset/?id=3270017"
643
        rngm4.Scale = Vector3.new(1, 1.3, 2)
644
        local rng5 = Instance.new("Part", char)
645
        rng5.Anchored = true
646
        rng5.BrickColor = BrickColor.new("Lime green")
647
        rng5.CanCollide = false
648
        rng5.FormFactor = 3
649
        rng5.Name = "Ring"
650
        rng5.Size = Vector3.new(1, 1, 1)
651
        rng5.Transparency = 0
652
        rng5.TopSurface = 0
653
        rng5.BottomSurface = 0
654
        rng5.CFrame = rng3.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) * CFrame.new(0, -15, 0)
655
        local rngm5 = Instance.new("SpecialMesh", rng5)
656
        rngm5.MeshId = "http://www.roblox.com/asset/?id=3270017"
657
        rngm5.Scale = Vector3.new(1, 1.3, 2)
658
        wait(0.1)
659
        coroutine.wrap(function()
660
    
661
    for i = 1, 30, 3 do
662
      rngm2.Scale = Vector3.new(30 + i * 2, 30 + i, 30 + i * 2)
663
      rng2.Transparency = i / 30
664
      rngm4.Scale = Vector3.new(100 + i * 2, 100 + i, 2)
665
      rng4.Transparency = i / 30
666
      rngm5.Scale = Vector3.new(10 + i * 10, 10 + i * 10, 2)
667
      rng5.Transparency = i / 30
668
      rngm3.Scale = Vector3.new(50 + i, 50 + i, 50 + i)
669
      rng3.Transparency = i / 30
670
      wait()
671
    end
672
    wait()
673
    rng5:Remove()
674
    rng2:Remove()
675
    rng4:Remove()
676
    rng3:Remove()
677
    wait()
678
  end
679
)()
680
        local CreateRegion3FromLocAndSize = function(Position, Size)
681
    
682
    local SizeOffset = Size / 2
683
    local Point1 = Position - SizeOffset
684
    local Point2 = Position + SizeOffset
685
    return Region3.new(Point1, Point2)
686
  end
687
688
        local reg = CreateRegion3FromLocAndSize(endpoint.Position, endpoint.Size * 20)
689
        for i,v in pairs(game:service("Workspace"):FindPartsInRegion3WithIgnoreList(reg, char:GetChildren(), 100)) do
690
          print(v)
691
          Spawn(function()
692
    
693
    ypcall(function()
694
      
695
      if not v.Parent:FindFirstChild("Humanoid") then
696
        local humanoid = v.Parent.Parent:FindFirstChild("Humanoid")
697
      end
698
      humanoid:TakeDamage(math.random(1, 4))
699
    end
700
)
701
  end
702
)
703
        end
704
      end
705
    end
706
    active = false
707
    for i = 20, 0, -0.5 do
708
      wait()
709
      rngm.Scale = Vector3.new(49, 0.5, i)
710
    end
711
    rng:Remove()
712
    wait(0.5)
713
    rift = true
714
  end
715
end
716
)
717
RunService = game:service("RunService")
718
RunService.RenderStepped:connect(function()
719
  
720
  updateanims()
721
  if char.Humanoid.PlatformStand == true then
722
    char.Humanoid.PlatformStand = false
723
  end
724
  Torso2.C0 = Lerp.CFrame(Torso2.C0, LerpTo.Body, as)
725
  RightShoulder.C0 = Lerp.CFrame(RightShoulder.C0, LerpTo.RightArm, as)
726
  LeftShoulder.C0 = Lerp.CFrame(LeftShoulder.C0, LerpTo.LeftArm, as_2)
727
  RightHip.C0 = Lerp.CFrame(RightHip.C0, LerpTo.RightLeg, as)
728
  LeftHip.C0 = Lerp.CFrame(LeftHip.C0, LerpTo.LeftLeg, as)
729
  Neck.C0 = Lerp.CFrame(Neck.C0, LerpTo.Head, as)
730
  staffw.C0 = Lerp.CFrame(staffw.C0, LerpTo.Staff, as)
731
  topw.C0 = Lerp.CFrame(topw.C0, LerpTo.Crystal, as)
732
end
733
)
734
while 1 do
735
  if wait(1.1) and canstep ~= true or Vector3.new(char.Torso.Velocity.X, 0, char.Torso.Velocity.Z).magnitude <= 2 or Vector3.new(0, char.Torso.Velocity.Y, 0).magnitude < 2 then
736
    FootStep()
737
  end
738
end