View difference between Paste ID: b4Uw2kRK and QY6Z9NEq
SHOW: | | - or go back to the newest paste.
1
local s = Instance.new("Sound")
2
s.Name = "BGMusic"
3
s.SoundId = "https://www.roblox.com/asset/?id=690672961"
4
s.Pitch = 1
5-
s.Volume = 1
5+
s.Volume = 80
6
s.Looped = true
7
s.archivable = false
8
s.Parent = game.Workspace
9
wait(0.1)
10
s:play()
11
12
math.randomseed(tick())
13
plr = game:service("Players").LocalPlayer
14
ch, char = plr.Character, plr.Character
15
hum = ch.Humanoid
16
tor, torso, rootpart, rj = ch.Torso, ch.Torso, ch.HumanoidRootPart, ch.HumanoidRootPart.RootJoint
17
m, mouse = plr:GetMouse(), plr:GetMouse()
18
cfn, ang, mr, int = CFrame.new, CFrame.Angles, math.rad, Instance.new
19
bc = BrickColor.new
20
head = ch.Head
21
cam = workspace.CurrentCamera
22
rj.C0 = cfn()
23
rj.C1 = cfn()
24
lib = {}
25
lib.cone = "1033714"
26
lib.ring = "3270017"
27
lib.yato = "579392805"
28
rbx = "rbxassetid://"
29
v3 = Vector3.new
30
cn = CFrame.new
31
ca2 = CFrame.Angles
32
mf = math.floor
33
mran = math.random
34
rn = mran
35
mrad = math.rad
36
rd = mrad
37
mdeg = math.deg
38
dg = mdeg
39
function ca(x, y, z)
40
  return ca2(mrad(x), mrad(y), mrad(z))
41
end
42
function mran2(a, b)
43
  return mran(a * 1000, b * 1000) / 1000
44
end
45
ud = UDim2.new
46
bn = BrickColor.new
47
c3 = Color3.new
48
function getSound(id)
49
  game:service("ContentProvider"):Preload("rbxassetid" .. tostring(id))
50
  local s = int("Sound", ch.Head)
51
  s.SoundId = "rbxassetid://" .. tostring(id - 1)
52
  s.Volume = 1
53
  return s
54
end
55
local combostring = ""
56
local attackstring = ""
57
blocksound = getSound(260433722)
58
blocksound.Pitch = 1
59
startsound = getSound(588738950)
60
startsound.Pitch = 1
61
endsound = getSound(588736246)
62
endsound.Pitch = 1
63
endsound.Volume = 2
64
swsound = getSound(588736970)
65
swexp = getSound(365002939)
66
swexp.Pitch = 1
67
spexp = getSound(365002939)
68
spexp.Pitch = 1.2
69
startsound2 = getSound(260433769)
70
startsound2.Pitch = 0.8
71
startsound3 = getSound(260433769)
72
startsound3.Pitch = 0.89
73
chargesound = getSound(181004944)
74
chargesound.Pitch = 1
75
basicsound = getSound(588736246)
76
basicsound.Pitch = 1.2
77
dodgesound = getSound(177162407)
78
dodgesound.Pitch = 1.4
79
landsound = getSound(315775190)
80
rushsound = getSound(134012323)
81
swoosh = getSound(231917988)
82
swoosh.Volume = 2
83
aerialcharge = getSound(265109959)
84
aerialcharge.Pitch = 1.1
85
curse = getSound(231917971)
86
glass = getSound(130779172)
87
magictone1 = getSound(588738950)
88
tweenTable = {}
89
altTweenTable = {}
90
local alljoints = {}
91
textTable = {}
92
local fx = {}
93
moves = {}
94
connectlist = {}
95
cooldowns = {}
96
movers = {}
97
local linetable = {}
98
local run = false
99
idle = false
100
local animPlaying = false
101
local runLeg = false
102
canRunLeg = false
103
local deb = false
104
local basicswitch = false
105
local canExecuteMoves = true
106
maxmana = 90000
107
mana = 90000
108
chain = 0
109
hum.MaxHealth = 90000
110
spawn(function()
111
  wait()
112
  hum.Health = 90000
113
end)
114
local managui = int("ScreenGui", plr.PlayerGui)
115
managui.Name = "Mana Gui"
116
local frame = int("Frame", managui)
117
frame.Size = UDim2.new(0.15, 0, 0.02, 0)
118
frame.Position = UDim2.new(0.83, 0, 0.7, 0)
119
frame.BackgroundColor3 = BrickColor.new("Black").Color
120
frame.BorderColor3 = BrickColor.new("Really black").Color
121
frame.BorderSizePixel = 6
122
local manabartext = int("TextLabel", frame)
123
manabartext.ZIndex = 2
124
manabartext.Size = UDim2.new(1, 0, 1, 0)
125
manabartext.TextColor3 = BrickColor.new("White").Color
126
manabartext.TextStrokeTransparency = 1
127
manabartext.Font = "SourceSansLight"
128
manabartext.Text = tostring(mana) .. "/" .. tostring(maxmana)
129
manabartext.FontSize = "Size18"
130
manabartext.BackgroundTransparency = 1
131
local manabar = int("Frame", frame)
132
manabar.Size = UDim2.new(1, 0, 1, 0)
133
manabar.BorderSizePixel = 0
134
manabar.BackgroundColor3 = BrickColor.new("Bright blue").Color
135
manabar.Size = UDim2.new(mana / maxmana, 0, 1, 0)
136
local chainframe = int("Frame", managui)
137
chainframe.Size = frame.Size
138
chainframe.BackgroundTransparency = 1
139
chainframe.Position = frame.Position + UDim2.new(0.07, 0, -0.05, 0)
140
local chaintext = int("TextLabel", chainframe)
141
chaintext.BackgroundTransparency = 1
142
chaintext.TextStrokeColor3 = BrickColor.new("White").Color
143
chaintext.TextStrokeTransparency = 0
144
chaintext.Size = UDim2.new(1, 0, 1, 0)
145
chaintext.Font = "Antique"
146
chaintext.FontSize = "Size48"
147
chaintext.Text = "0x"
148
ypcall(function()
149
  ch.Animate:Destroy()
150
  ch.Humanoid.Animator:Destroy()
151
end)
152
if ch:findFirstChild("Riven") then
153
  ch.Riven:Destroy()
154
end
155
local tube = int("Model", ch)
156
tube.Name = "Riven"
157
script.Parent = tube
158
function Weld(p0, p1, x, y, z, rx, ry, rz, par)
159
  p0.Position = p1.Position
160
  local w = Instance.new("Motor", par or p0)
161
  w.Part0 = p1
162
  w.Part1 = p0
163
  w.C0 = CFrame.new(x or 0, y or 0, z or 0) * CFrame.Angles(rx or 0, ry or 0, rz or 0)
164
  w.MaxVelocity = 0.1
165
  return w
166
end
167
function clerp(c1, c2, sp)
168
  local R1, R2, R3 = c1:toEulerAnglesXYZ()
169
  local R21, R22, R23 = c2:toEulerAnglesXYZ()
170
  return CFrame.new(c1.X + (c2.X - c1.X) * sp, c1.Y + (c2.Y - c1.Y) * sp, c1.Z + (c2.Z - c1.Z) * sp) * CFrame.Angles(R1 + (R21 - R1) * sp, R2 + (R22 - R2) * sp, R3 + (R23 - R3) * sp)
171
end
172
function Tween(Weld, Stop, Step, a)
173
  ypcall(function()
174
    local function func()
175
      local Start = Weld.C1
176
      local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
177
      local Stop = Stop
178
      local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
179
      if not Step then
180
        Step = 0.1
181
      end
182
      table.insert(tweenTable, {
183
        th = 0,
184
        Weld = Weld,
185
        Step = Step,
186
        Start = Start,
187
        X1 = X1,
188
        Y1 = Y1,
189
        Z1 = Z1,
190
        Stop = Stop,
191
        X2 = X2,
192
        Y2 = Y2,
193
        Z2 = Z2
194
      })
195
    end
196
    if a then
197
      coroutine.wrap(func)()
198
    else
199
      func()
200
    end
201
  end)
202
end
203
function altTween(Weld, Stop, Step, a)
204
  ypcall(function()
205
    local function func()
206
      local Start = Weld.C1
207
      local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
208
      local Stop = Stop
209
      local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
210
      if not Step then
211
        Step = 0.1
212
      end
213
      table.insert(altTweenTable, {
214
        th = 0,
215
        Weld = Weld,
216
        Step = Step,
217
        Start = Start,
218
        X1 = X1,
219
        Y1 = Y1,
220
        Z1 = Z1,
221
        Stop = Stop,
222
        X2 = X2,
223
        Y2 = Y2,
224
        Z2 = Z2
225
      })
226
    end
227
    if a then
228
      coroutine.wrap(func)()
229
    else
230
      func()
231
    end
232
  end)
233
end
234
function weld(p0, p1, c0)
235
  local w = Instance.new("Weld", p0)
236
  w.Part0 = p0
237
  w.Part1 = p1
238
  w.C0 = c0
239
  return w
240
end
241
function cp(parent, color, size, anchored, cancollide)
242
  local newp = Instance.new("Part", parent)
243
  newp.TopSurface = "SmoothNoOutlines"
244
  newp.BottomSurface = "SmoothNoOutlines"
245
  newp.FrontSurface = "SmoothNoOutlines"
246
  newp.BackSurface = "SmoothNoOutlines"
247
  newp.RightSurface = "SmoothNoOutlines"
248
  newp.LeftSurface = "SmoothNoOutlines"
249
  newp.FormFactor = "Custom"
250
  newp.BrickColor = bc(color)
251
  local rn = math.random(3)
252
  if rn == 1 then
253
  end
254
  newp.Size = size
255
  newp.Anchored = anchored
256
  newp.CanCollide = cancollide
257
  newp:BreakJoints()
258
  return newp
259
end
260
function destroyJoints()
261
  for i = 1, 5 do
262
    for _, v in pairs(alljoints) do
263
      ypcall(function()
264
        v:Destroy()
265
        table.remove(alljoints, _)
266
      end)
267
    end
268
  end
269
end
270
function initializeJoints()
271
  destroyJoints()
272
  rabr = cp(tube, "White", Vector3.new(1, 1, 1), false, false)
273
  rabr.Transparency = 1
274
  rabr.Name = "Locker"
275
  rabr.Position = torso.Position
276
  rw = Weld(rabr, torso, 1.5, 0.5, 0, 0, 0, 0)
277
  rw.Parent = tube
278
  rw.Name = "rw"
279
  w = Instance.new("Weld", tube)
280
  w.Part0, w.Part1 = ch["Right Arm"], rabr
281
  w.C1 = CFrame.new(0, -0.5, 0)
282
  labr = cp(tube, "White", Vector3.new(1, 1, 1), false, false)
283
  labr.Transparency = 1
284
  labr.Name = "Locker"
285
  labr.Position = torso.Position
286
  lw = Weld(labr, torso, -1.5, 0.5, 0, 0, 0, 0)
287
  lw.Parent = tube
288
  lw.Name = "lw"
289
  ww = Instance.new("Weld", tube)
290
  ww.Part0, ww.Part1 = ch["Left Arm"], labr
291
  ww.C1 = CFrame.new(0, -0.5, 0)
292
  rlabr = cp(tube, "White", Vector3.new(1, 1, 1), false, false)
293
  rlabr.Transparency = 1
294
  rlabr.Name = "Locker"
295
  rlabr.Position = torso.Position
296
  rlw = Weld(rlabr, torso, 0.5, -1.5, 0, 0, 0, 0)
297
  rlw.Parent = tube
298
  rlw.Name = "rlw"
299
  wl = Instance.new("Weld", tube)
300
  wl.Part0, wl.Part1 = ch["Right Leg"], rlabr
301
  wl.C1 = CFrame.new(0, -0.5, 0)
302
  llabr = cp(tube, "White", Vector3.new(1, 1, 1), false, false)
303
  llabr.Transparency = 1
304
  llabr.Name = "Locker"
305
  llabr.Position = torso.Position
306
  llw = Weld(llabr, torso, -0.5, -1.5, 0, 0, 0, 0)
307
  llw.Parent = tube
308
  llw.Name = "llw"
309
  wwl = Instance.new("Weld", tube)
310
  wwl.Part0, wwl.Part1 = ch["Left Leg"], llabr
311
  wwl.C1 = CFrame.new(0, -0.5, 0)
312
  nk = cp(tube, "White", Vector3.new(1, 1, 1), false, false)
313
  nk.Transparency = 1
314
  nk.Name = "Locker"
315
  nk.Position = torso.Position
316
  neck = Weld(nk, torso, 0, 2, 0, 0, 0, 0)
317
  neck.Parent = tube
318
  neck.Name = "neck"
319
  www = Instance.new("Weld", tube)
320
  www.Part0, www.Part1 = ch.Head, nk
321
  www.C1 = CFrame.new(0, -0.5, 0)
322
  table.insert(alljoints, rabr)
323
  table.insert(alljoints, labr)
324
  table.insert(alljoints, rw)
325
  table.insert(alljoints, lw)
326
  table.insert(alljoints, w)
327
  table.insert(alljoints, ww)
328
  table.insert(alljoints, rlabr)
329
  table.insert(alljoints, llabr)
330
  table.insert(alljoints, rlw)
331
  table.insert(alljoints, llw)
332
  table.insert(alljoints, wl)
333
  table.insert(alljoints, wwl)
334
  table.insert(alljoints, nk)
335
  table.insert(alljoints, neck)
336
  table.insert(alljoints, www)
337
end
338
function cyl(prt)
339
  local c = int("CylinderMesh", prt)
340
  return c
341
end
342
function blo(prt)
343
  local c = int("BlockMesh", prt)
344
  c.Name = "bmsh"
345
  return c
346
end
347
function sphere(prt)
348
  local c = int("SpecialMesh", prt)
349
  c.MeshType = "Sphere"
350
  return c
351
end
352
initializeJoints()
353
function reset()
354
  if run == false and animPlaying == false then
355
    altTweenTable = {}
356
    Tween(llw, cfn(0, -0.08 * math.sin(tick() * 1.5), 0) * ang(0, 0, mr(5)))
357
    Tween(rlw, cfn(0, -0.08 * math.sin(tick() * 1.5), 0) * ang(0, 0, mr(-5)))
358
    Tween(rw, cfn(0, 0.1 * math.sin(tick() * 1.5), 0) * ang(0, 0, mr(-15) + mr(-5 * math.sin(tick() * 1.5))))
359
    Tween(lw, cfn(0, 0.1 * math.sin(tick() * 1.5), 0) * ang(0, 0, mr(15) + mr(5 * math.sin(tick() * 1.5))))
360
    Tween(neck, cfn())
361
    Tween(rj, cfn(0, 0.08 * math.sin(tick() * 1.5), 0), 0.3)
362
  end
363
end
364
function resetLegs()
365
  altTweenTable = {}
366
  Tween(llw, cfn())
367
  Tween(rlw, cfn())
368
end
369
function walkCycle()
370
  if run == true and animPlaying == false then
371
    tweenTable = {}
372
    Tween(rj, cfn())
373
    Tween(llw, cfn(0, 0, -0.2 * math.sin(tick() * 8)) * ang(mr(10) + mr(40 * math.sin(tick() * 8)), 0, 0), 0.6)
374
    Tween(rlw, cfn(0, 0, 0.2 * math.sin(tick() * 8)) * ang(mr(10) + mr(-40 * math.sin(tick() * 8)), 0, 0), 0.6)
375
    Tween(rw, cfn() * ang(mr(-40), 0, mr(-30)), 0.07)
376
    Tween(lw, cfn() * ang(mr(20), 0, mr(20)), 0.07)
377
  end
378
end
379
function walkLegs()
380
  if runLeg == true then
381
    altTweenTable = {}
382
    altTween(llw, cfn(0, 0, -0.2 * math.sin(tick() * 8)) * ang(mr(20) + mr(50 * math.sin(tick() * 8)), 0, 0), 0.6)
383
    altTween(rlw, cfn(0, 0, 0.2 * math.sin(tick() * 8)) * ang(mr(20) + mr(-50 * math.sin(tick() * 8)), 0, 0), 0.6)
384
  end
385
end
386
function dealDamage(man, damage, crit, multi, lifesteal)
387
  if man and man:findFirstChild("Humanoid") and man.Head then
388
    local dm = damage
389
    local cr = false
390
    local hm = man.Humanoid
391
    if crit and crit > 0 then
392
      local c = math.random(crit)
393
      if c == 1 then
394
        cr = true
395
      end
396
    end
397
    if cr == true then
398
      if not multi then
399
        dm = dm * 1.5
400
      else
401
        dm = dm * multi
402
      end
403
    end
404
    hm:TakeDamage(dm)
405
    if lifesteal then
406
      local plife = lifesteal * dm
407
      if hum.Health < hum.MaxHealth then
408
        hum.Health = hum.Health + plife
409
        local bbg = int("BillboardGui", tube)
410
        bbg.Size = UDim2.new(1, 0, 1, 0)
411
        bbg.StudsOffset = Vector3.new(0, 2, 0)
412
        bbg.StudsOffset = bbg.StudsOffset + Vector3.new(math.random(-math.random(50) / 10, math.random(50) / 10), 0, math.random(-math.random(50) / 10, math.random(50) / 10))
413
        bbg.Adornee = ch.Head
414
        bbg.AlwaysOnTop = true
415
        local tlabl = int("TextLabel", bbg)
416
        tlabl.Size = UDim2.new(1, 0, 1, 0)
417
        tlabl.Text = tostring(plife)
418
        tlabl.BackgroundTransparency = 1
419
        tlabl.TextColor3 = BrickColor.new("Bright green").Color
420
        tlabl.TextStrokeColor3 = BrickColor.new("White").Color
421
        tlabl.TextStrokeTransparency = 0
422
        tlabl.Font = "Antique"
423
        tlabl.FontSize = "Size60"
424
        table.insert(textTable, bbg)
425
      end
426
    end
427
    chain = chain + 1
428
    if hm.MaxHealth >= 99999 then
429
      hm.Parent:BreakJoints()
430
    end
431
    local bbg = int("BillboardGui", tube)
432
    bbg.Size = UDim2.new(1, 0, 1, 0)
433
    bbg.StudsOffset = Vector3.new(0, 2, 0)
434
    bbg.StudsOffset = bbg.StudsOffset + Vector3.new(math.random(-math.random(50) / 10, math.random(50) / 10), 0, math.random(-math.random(50) / 10, math.random(50) / 10))
435
    bbg.Adornee = man.Head
436
    bbg.AlwaysOnTop = true
437
    local tlabl = int("TextLabel", bbg)
438
    tlabl.Size = UDim2.new(1, 0, 1, 0)
439
    tlabl.Text = tostring(dm)
440
    tlabl.BackgroundTransparency = 1
441
    tlabl.TextColor3 = BrickColor.new("Really black").Color
442
    tlabl.TextStrokeColor3 = BrickColor.new("White").Color
443
    if cr == true then
444
      tlabl.TextColor3 = BrickColor.new("Really red").Color
445
      tlabl.TextStrokeColor3 = BrickColor.new("Really black").Color
446
    end
447
    tlabl.TextStrokeTransparency = 0
448
    tlabl.Font = "Antique"
449
    tlabl.FontSize = "Size60"
450
    table.insert(textTable, bbg)
451
    return dm
452
  end
453
end
454
local tp = cp(tube, "White", Vector3.new(1, 1, 1))
455
tp.Transparency = 1
456
weld(ch["Right Arm"], tp, cfn(0, -1, 0))
457
function addFx(item, int, final, func)
458
  table.insert(fx, {
459
    item = item,
460
    int = int,
461
    func = func,
462
    final = final,
463
    stepval = 0
464
  })
465
end
466
function addMove(name, key, cooldown, func, manacost)
467
  moves[name] = {
468
    key = key,
469
    cooldown = cooldown,
470
    func = func,
471
    manacost = manacost
472
  }
473
end
474
function drawLine(point_a, point_b, bc_code, angle)
475
  local dist = (point_a - point_b).magnitude
476
  if dist > 1 then
477
    local rad = dist / 2
478
    local line = Instance.new("Part", tube)
479
    line.Anchored = true
480
    line.FormFactor = "Custom"
481
    line.BrickColor = BrickColor.new(bc_code)
482
    line.TopSurface = "SmoothNoOutlines"
483
    line.BottomSurface = "SmoothNoOutlines"
484
    line.LeftSurface = "SmoothNoOutlines"
485
    line.RightSurface = "SmoothNoOutlines"
486
    line.FrontSurface = "SmoothNoOutlines"
487
    line.BackSurface = "SmoothNoOutlines"
488
    line.Material = "Neon"
489
    line.CanCollide = false
490
    line.Size = Vector3.new(0.7, 0.7, dist)
491
    Instance.new("BlockMesh", line).Name = "blok"
492
    line.CFrame = CFrame.new(point_a, point_b) * CFrame.new(0, 0, -rad)
493
    return line
494
  end
495
end
496
function depleteMana(amount)
497
  if mana > 0 then
498
    if mana - amount > 0 then
499
      mana = mana - amount
500
      return true
501
    else
502
      return false
503
    end
504
  end
505
end
506
function executeMove(name)
507
  if canExecuteMoves == true and ch and hum and hum.Health > 0 then
508
    local can = true
509
    for _, v in pairs(cooldowns) do
510
      if v.move == name then
511
        can = false
512
        break
513
      end
514
    end
515
    if can == true then
516
      local can2 = true
517
      if moves[name].manacost then
518
        local a = depleteMana(moves[name].manacost)
519
        if not a then
520
          can2 = false
521
        end
522
      end
523
      if can2 then
524
        moves[name].func()
525
      end
526
    end
527
  end
528
end
529
function addToCList(what, key)
530
  local a = {
531
    what,
532
    key = key,
533
    up = false
534
  }
535
  table.insert(connectlist, a)
536
  return a
537
end
538
function waitForUp(what)
539
  repeat
540
    wait()
541
  until what.up == true
542
end
543
function addMover(what, step, func)
544
  table.insert(movers, {
545
    mover = what,
546
    step = step,
547
    lastpoint = what.CFrame,
548
    func = func
549
  })
550
end
551
local CreateRegion3FromLocAndSize = function(Position, Size)
552
  local SizeOffset = Size / 2
553
  local Point1 = Position - SizeOffset
554
  local Point2 = Position + SizeOffset
555
  return Region3.new(Point1, Point2)
556
end
557
local righthandle = cp(tube, "White", Vector3.new(1, 1, 1))
558
weld(ch["Right Arm"], righthandle, cfn(0, -1, 0))
559
righthandle.Transparency = 1
560
local lefthandle = cp(tube, "White", Vector3.new(1, 1, 1))
561
weld(ch["Left Arm"], lefthandle, cfn(0, -1, 0))
562
lefthandle.Transparency = 1
563
function addCoolDown(move)
564
  local a = {
565
    timeleft = moves[move].cooldown,
566
    move = move
567
  }
568
  table.insert(cooldowns, a)
569
end
570
addMove("block_normal", "f", 0.5, function()
571
  deb = true
572
  idle = false
573
  local ws = hum.WalkSpeed
574
  tor.CFrame = CFrame.new(tor.Position, Vector3.new(mouse.Hit.p.X, tor.Position.Y, mouse.Hit.p.Z))
575
  hum.WalkSpeed = 0
576
  tweenTable = {}
577
  animPlaying = true
578
  local pcf = tor.CFrame
579
  Tween(rj, cfn() * ang(0, mr(-45), 0), 0.2)
580
  Tween(rw, cfn() * ang(mr(-86), mr(-15), 0), 0.2)
581
  Tween(lw, cfn() * ang(0, mr(5), mr(20)), 0.2)
582
  blocksound:Play()
583
  local block = cp(workspace, "Really black", Vector3.new(8, 6, 1), true, true)
584
  block.CFrame = pcf * CFrame.new(0, 0, -5)
585
  block.Material = "Neon"
586
  local bm = blo(block)
587
  bm.Scale = Vector3.new(0, 0, 0.9)
588
  addFx(block, 0.05, nil, function()
589
    bm.Scale = bm.Scale + Vector3.new(0.05, 0.05, 0)
590
  end)
591
  local a = addToCList("block_connect", "f")
592
  waitForUp(a)
593
  addCoolDown("block_normal")
594
  hum.WalkSpeed = ws
595
  deb = false
596
  addFx(block, 0.05, "destroy", function()
597
    block.Transparency = block.Transparency + 0.05
598
    block.bmsh.Scale = block.bmsh.Scale + Vector3.new(0.07, 0.07, 0)
599
  end)
600
  idle = true
601
  reset()
602
  animPlaying = false
603
end, 15)
604
addMove("curse", "g", 10, function()
605
  deb = true
606
  idle = false
607
  animPlaying = true
608
  canRunLeg = true
609
  tweenTable = {}
610
  altTweenTable = {}
611
  Tween(rj, cfn() * ang(0, mr(-90), 0), 0.2)
612
  Tween(rw, cfn() * ang(0, 0, mr(-90)), 0.2)
613
  Tween(lw, cfn() * ang(0, mr(5), mr(20)), 0.2)
614
  tor.CFrame = CFrame.new(tor.Position, Vector3.new(mouse.Hit.p.X, tor.Position.Y, mouse.Hit.p.Z))
615
  wait(0.15)
616
  curse:Play()
617
  addCoolDown("curse")
618
  local bullet = cp(tube, "Really black", Vector3.new(1, 1, 1))
619
  bullet.CFrame = CFrame.new(righthandle.CFrame.p, Vector3.new(m.Hit.p.X, m.Hit.p.Y, m.Hit.p.Z))
620
  bullet.Transparency = 1
621
  local bulletfx = bullet:clone()
622
  bulletfx.Transparency = 1
623
  bulletfx.Parent = bullet
624
  bulletfx.Anchored = true
625
  sphere(bulletfx)
626
  local angle = 0
627
  local lastpoint = bullet.CFrame
628
  addMover(bullet, 0.8, function()
629
    angle = angle + 1
630
    local angles = CFrame.Angles(0, 0, mr(angle))
631
    bulletfx.CFrame = bullet.CFrame
632
    local fxp = cp(tube, "Really black", Vector3.new(1, 1, 1), true)
633
    fxp.CFrame = bulletfx.CFrame
634
    local bmesh = int("SpecialMesh", fxp)
635
    bmesh.MeshType = "FileMesh"
636
    bmesh.MeshId = rbx .. lib.ring
637
    bmesh.Scale = Vector3.new(2, 2, 2)
638
    addFx(fxp, 0.07, "destroy", function()
639
      bulletfx.CFrame = bullet.CFrame
640
      bmesh.Scale = bmesh.Scale - Vector3.new(0.1, 0.1, 0)
641
      fxp.Transparency = fxp.Transparency + 0.07
642
    end)
643
  end)
644
  bullet.Touched:connect(function(p)
645
    if not p:isDescendantOf(ch) then
646
      do
647
        local thing
648
        local region = CreateRegion3FromLocAndSize(bullet.Position, bullet.Size * 2)
649
        for _, v in pairs(workspace:findPartsInRegion3WithIgnoreList(region, {ch}, 50)) do
650
          if v.Parent and v.Parent:findFirstChild("Humanoid") then
651
            thing = v
652
            break
653
          end
654
        end
655
        local mgp = cp(tube, "White", Vector3.new(1, 1, 1), true)
656
        mgp.Transparency = 1
657
        mgp.CFrame = bullet.CFrame
658
        game.Debris:AddItem(mgp, 3)
659
        local tsound = glass:clone()
660
        tsound.Volume = 2
661
        tsound.Parent = mgp
662
        tsound:Play()
663
        local position = bullet.CFrame
664
        if thing and thing.Parent then
665
          dealDamage(thing.Parent, 50000, 50000)
666
          do
667
            local humin = thing.Parent.Humanoid
668
            spawn(function()
669
              for i = 1, 10 do
670
                wait(1)
671
                if thing.Parent then
672
                  dealDamage(thing.Parent, 0.05 * humin.MaxHealth, 10000, 10000, 10000)
673
                end
674
              end
675
            end)
676
          end
677
        end
678
        local blast = cp(tube, "Really black", Vector3.new(2, 2, 2), true, false)
679
        blast.Material = "Neon"
680
        local spm2 = blo(blast)
681
        spm2.Name = "mesh"
682
        blast.CFrame = CFrame.new(position.X, position.Y, position.Z) * ang(mr(math.random(90)), mr(math.random(90)), mr(math.random(90)))
683
        if p.Name == "Torso" or p.Parent and p.Parent:findFirstChild("Torso") then
684
          blast.CFrame = p.Parent.Torso.CFrame * ang(mr(math.random(90)), mr(math.random(90)), mr(math.random(90)))
685
        end
686
        for i = 1, 5 do
687
          do
688
            local fx = blast:clone()
689
            fx.Parent = tube
690
            fx.CFrame = blast.CFrame * ang(mr(math.random(90)), mr(math.random(90)), mr(math.random(90)))
691
            addFx(fx, 0.05, "destroy", function()
692
              fx.mesh.Scale = fx.mesh.Scale + Vector3.new(0.1, 0.1, 0.1)
693
              fx.Transparency = fx.Transparency + 0.05
694
            end)
695
          end
696
        end
697
        addFx(blast, 0.05, "destroy", function()
698
          spm2.Scale = spm2.Scale + Vector3.new(0.1, 0.1, 0.1)
699
          blast.Transparency = blast.Transparency + 0.05
700
        end)
701
        bullet:Destroy()
702
        bulletfx:Destroy()
703
      end
704
    end
705
  end)
706
  game.Debris:AddItem(bullet, 3)
707
  local bv = int("BodyVelocity", bullet)
708
  bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
709
  bv.Velocity = bullet.CFrame.lookVector * 150
710
  wait(0.5)
711
  reset()
712
  deb = false
713
  canRunLeg = false
714
  animPlaying = false
715
end, 60)
716
local bg = false
717
addMove("beam", "e", 5, function()
718
  tweenTable = {}
719
  animPlaying = true
720
  idle = false
721
  deb = true
722
  local pcf = tor.CFrame
723
  canRunLeg = true
724
  startsound:Play()
725
  chargesound.Looped = true
726
  chargesound:Play()
727
  Tween(rj, cfn() * ang(0, mr(-90), 0), 0.2)
728
  Tween(rw, cfn() * ang(0, 0, mr(-90)), 0.2)
729
  Tween(lw, cfn() * ang(0, mr(5), mr(20)), 0.2)
730
  bg = true
731
  local a = addToCList("beam_connect", "e")
732
  local charge = cp(tube, "Really black", Vector3.new(1, 1, 1))
733
  charge.Material = "Neon"
734
  local spm = int("SpecialMesh", charge)
735
  spm.MeshType = "Sphere"
736
  spm.Name = "sphere"
737
  weld(ch["Right Arm"], charge, cfn(0, -2, 0))
738
  local up = false
739
  local multiplier = 1
740
  local cn = chargesound.DidLoop:connect(function()
741
    local fx = charge:clone()
742
    fx.Parent = tube
743
    fx.CFrame = charge.CFrame
744
    weld(charge, fx, cfn())
745
    addFx(fx, 0.07, "destroy", function()
746
      if fx and fx:findFirstChild("sphere") then
747
        fx.sphere.Scale = fx.sphere.Scale + Vector3.new(0.1, 0.1, 0.1)
748
        fx.Transparency = fx.Transparency + 0.07
749
      end
750
    end)
751
  end)
752
  spawn(function()
753
    repeat
754
      wait()
755
      if spm.Scale.X < 2 then
756
        spm.Scale = spm.Scale + Vector3.new(0.05, 0.05, 0.05)
757
        multiplier = multiplier + 0.1
758
      end
759
    until up == true
760
  end)
761
  waitForUp(a)
762
  cn:Disconnect()
763
  up = true
764
  addCoolDown("beam")
765
  chargesound:Stop()
766
  endsound:Play()
767
  local ringFx = cp(tube, "Really black", Vector3.new(2, 2, 2), true, false)
768
  ringFx.CFrame = charge.CFrame * ang(mr(-90), 0, 0)
769
  ringFx.Material = "Neon"
770
  local spm = int("SpecialMesh", ringFx)
771
  spm.MeshId = rbx .. lib.ring
772
  spm.Scale = Vector3.new(2, 2, 2)
773
  addFx(ringFx, 0.08, "destroy", function()
774
    spm.Scale = spm.Scale + Vector3.new(0.2, 0.2, 0)
775
    ringFx.Transparency = ringFx.Transparency + 0.08
776
  end)
777
  local beam = cp(tube, "Really black", Vector3.new(1, 1, 1), true, false)
778
  local ray = Ray.new(charge.CFrame.p, (mouse.Hit.p - charge.CFrame.p).unit * 300)
779
  local part, position = workspace:FindPartOnRay(ray, ch, false, true)
780
  local distance = (charge.CFrame.p - position).magnitude
781
  beam.Size = Vector3.new(1, 1, distance)
782
  beam.Material = "Neon"
783
  beam.CFrame = CFrame.new(charge.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
784
  local blast = cp(tube, "Really black", Vector3.new(8, 8, 8), true, false)
785
  blast.Material = "Neon"
786
  blast.CFrame = CFrame.new(position.X, position.Y, position.Z)
787
  local region = CreateRegion3FromLocAndSize(blast.Position, blast.Size * 2)
788
  local people = {}
789
  for _, v in pairs(workspace:findPartsInRegion3WithIgnoreList(region, {ch}, 100)) do
790
    if v and v.Parent and v.className == "Part" and v.Parent:findFirstChild("Humanoid") then
791
      local can = false
792
      if not v.Parent:findFirstChild("HitDeb") then
793
        can = true
794
      end
795
      if can == true then
796
        local db = Instance.new("StringValue", v.Parent)
797
        db.Name = "HitDeb"
798
        game.Debris:AddItem(db, 0.5)
799
        local humin = v.Parent.Humanoid
800
        if humin then
801
          local php = humin.Health
802
          dealDamage(humin.Parent, 20 * multiplier, 10000)
803
          humin.Sit = true
804
          humin.PlatformStand = true
805
          if php <= humin.Health and humin.MaxHealth ~= math.huge then
806
            print("equal")
807
            humin:TakeDamage(20 * multiplier)
808
          end
809
        end
810
      end
811
    end
812
  end
813
  local blastsound = getSound(262562443)
814
  blastsound.Parent = blast
815
  blastsound.Volume = 5
816
  blastsound:Play()
817
  blastsound:Stop()
818
  blastsound:Play()
819
  canRunLeg = false
820
  runLeg = false
821
  animPlaying = false
822
  tweenTable = {}
823
  local spm2 = int("SpecialMesh", blast)
824
  spm2.MeshType = "Sphere"
825
  addFx(blast, 0.008, "destroy", function()
826
    spm2.Scale = spm2.Scale + Vector3.new(0.05, 0.05, 0.05)
827
    blast.Transparency = blast.Transparency + 0.008
828
  end)
829
  addFx(beam, 0.1, "destroy", function()
830
    beam.Transparency = beam.Transparency + 0.1
831
  end)
832
  addFx(charge, 0.1, "destroy", function()
833
    charge.Transparency = charge.Transparency + 0.1
834
  end)
835
  bg = false
836
  run = false
837
  idle = true
838
  reset()
839
  deb = false
840
end, 60)
841
addMove("downslam", "q", 4, function()
842
  currentkey = key
843
  deb = true
844
  animPlaying = true
845
  altTweenTable = {}
846
  tweenTable = {}
847
  local rv = tor.CFrame.upVector
848
  local bv = int("BodyVelocity", tor)
849
  bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
850
  bv.Velocity = rv * -150
851
  rushsound:Play()
852
  Tween(rj, cfn() * ang(mr(180), 0, 0))
853
  Tween(rw, cfn() * ang(mr(-180), 0, 0))
854
  Tween(lw, cfn() * ang(mr(-180), 0, 0))
855
  addCoolDown("downslam", 4)
856
  spawn(function()
857
    while true do
858
      wait()
859
      do
860
        local cfx = cp(tube, "Really black", Vector3.new(6, 6, 6), true, false)
861
        cfx.CFrame = tor.CFrame * CFrame.Angles(math.rad(math.random(90)), math.rad(math.random(90)), 0)
862
        local b = blo(cfx)
863
        addFx(cfx, 0.05, "destroy", function()
864
          cfx.Transparency = cfx.Transparency + 0.05
865
          b.Scale = b.Scale + Vector3.new(0.1, 0.1, 0.1)
866
        end)
867
        if Vector3.new(0, tor.Velocity.Y, 0).magnitude < 2 then
868
          break
869
        end
870
      end
871
    end
872
  end)
873
  wait()
874
  bv:Destroy()
875
  multiplier = 1
876
  repeat
877
    wait()
878
  until Vector3.new(0, tor.Velocity.Y, 0).magnitude < 2
879
  local bhit, pos = FindGround(cn(tor.CFrame.p), ch)
880
  local blast = cp(tube, "Really black", Vector3.new(10, 10, 10), true, false)
881
  blast.CFrame = pos
882
  local region = CreateRegion3FromLocAndSize(blast.Position, blast.Size * 3)
883
  local people = {}
884
  for _, v in pairs(workspace:findPartsInRegion3WithIgnoreList(region, {ch}, 100)) do
885
    if v and v.Parent and v.className == "Part" and v.Parent:findFirstChild("Humanoid") then
886
      local can = false
887
      if not v.Parent:findFirstChild("HitDeb") then
888
        can = true
889
      end
890
      if can == true then
891
        local db = Instance.new("StringValue", v.Parent)
892
        db.Name = "HitDeb"
893
        game.Debris:AddItem(db, 0.5)
894
        local humin = v.Parent.Humanoid
895
        if humin then
896
          local php = humin.Health
897
          dealDamage(humin.Parent, 20 * multiplier, 10000)
898
          humin.Sit = true
899
          humin.PlatformStand = true
900
          if php <= humin.Health and humin.MaxHealth ~= math.huge then
901
            print("equal")
902
            humin:TakeDamage(20 * multiplier)
903
          end
904
        end
905
      end
906
    end
907
  end
908
  local sp = sphere(blast)
909
  blast.Material = "Neon"
910
  landsound:Play()
911
  addFx(blast, 0.02, "destroy", function()
912
    sp.Scale = sp.Scale + Vector3.new(0.1, 0.1, 0.1)
913
    blast.Transparency = blast.Transparency + 0.02
914
  end)
915
  animPlaying = false
916
  deb = false
917
end, 40)
918
addMove("aerialsword", "r", 15, function()
919
  deb = true
920
  animPlaying = true
921
  tweenTable = {}
922
  altTweenTable = {}
923
  canExecuteMoves = false
924
  idle = false
925
  run = false
926
  aerialcharge:Play()
927
  Tween(rw, cfn() * ang(mr(-90), 0, 0))
928
  local bp, bgg
929
  local a = addToCList("aerialsword", "r")
930
  local still = true
931
  bp = int("BodyPosition", tor)
932
  bp.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
933
  bp.Position = tor.Position
934
  local sphr = cp(tube, "Really black", Vector3.new(8, 8, 8), true)
935
  sphr.Transparency = 1
936
  sphr.Material = "Neon"
937
  local spho = sphere(sphr)
938
  spho.Name = "spho"
939
  spho.Scale = Vector3.new(0, 0, 0)
940
  sphr.CFrame = tor.CFrame
941
  addFx(sphr, 0.07, nil, function()
942
    spho.Scale = spho.Scale + Vector3.new(0.1, 0.1, 0.1)
943
    sphr.Transparency = sphr.Transparency - 0.07
944
  end)
945
  Delay(6, function()
946
    if not a.up then
947
      a.up = true
948
    end
949
  end)
950
  repeat
951
    wait(0.3)
952
    local b = depleteMana(35)
953
    if b then
954
      swsound:Play()
955
      do
956
        local fx = sphr:clone()
957
        fx.Parent = tube
958
        fx.CFrame = sphr.CFrame
959
        addFx(fx, 0.07, "destroy", function()
960
          fx.spho.Scale = fx.spho.Scale + Vector3.new(0.1, 0.1, 0.1)
961
          fx.Transparency = fx.Transparency + 0.07
962
        end)
963
        local sw = int("Part")
964
        game.Debris:AddItem(sw, 6)
965
        sw.CanCollide = false
966
        sw.Anchored = false
967
        sw.BrickColor = BrickColor.new("Really black")
968
        sw.Material = "Neon"
969
        sw.Size = Vector3.new(1, 1, 2)
970
        sw.CFrame = CFrame.new(righthandle.CFrame.p, Vector3.new(m.Hit.p.X, m.Hit.p.Y, m.Hit.p.Z))
971
        sw.Parent = tube
972
        sw.Transparency = 1
973
        addFx(sw, 0.1, nil, function()
974
          sw.Transparency = sw.Transparency - 0.1
975
        end)
976
        local spm = int("SpecialMesh", sw)
977
        spm.MeshType = "FileMesh"
978
        spm.MeshId = rbx .. lib.yato
979
        spm.Scale = Vector3.new(0.05, 0.05, 0.05)
980
        local vel = int("BodyVelocity", sw)
981
        vel.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
982
        vel.Velocity = sw.CFrame.lookVector * 152
983
        sw.CFrame = sw.CFrame * ang(0, mr(180), 0)
984
        sw.Touched:connect(function(p)
985
          if p:IsDescendantOf(ch) == false then
986
            sw.Anchored = true
987
            do
988
              local mgp = cp(tube, "White", Vector3.new(1, 1, 1), true, false)
989
              mgp.CFrame = sw.CFrame
990
              mgp.Transparency = 1
991
              game.Debris:AddItem(mgp, 2)
992
              ssp = swexp:clone()
993
              ssp.Parent = mgp
994
              ssp.Volume = 2
995
              ssp:Play()
996
              local blast = cp(tube, "Really black", Vector3.new(8, 8, 8), true)
997
              blast.CFrame = sw.CFrame
998
              local sp = sphere(blast)
999
              addFx(sw, 0.05, "destroy", function()
1000
                sw.Transparency = sw.Transparency + 0.05
1001
                spm.Scale = spm.Scale + Vector3.new(0.01, 0.01, 0.01)
1002
              end)
1003
              addFx(blast, 0.07, "destroy", function()
1004
                blast.Transparency = blast.Transparency + 0.07
1005
                sp.Scale = sp.Scale + Vector3.new(0.1, 0.1, 0.1)
1006
              end)
1007
              local region = CreateRegion3FromLocAndSize(blast.Position, blast.Size * 2)
1008
              local people = {}
1009
              for _, v in pairs(workspace:findPartsInRegion3WithIgnoreList(region, {ch}, 100)) do
1010
                if v and v.Parent and v.className == "Part" and v.Parent:findFirstChild("Humanoid") then
1011
                  local can = false
1012
                  if not v.Parent:findFirstChild("HitDeb") then
1013
                    can = true
1014
                  end
1015
                  if can == true then
1016
                    local db = Instance.new("StringValue", v.Parent)
1017
                    db.Name = "HitDeb"
1018
                    game.Debris:AddItem(db, 0.2)
1019
                    local humin = v.Parent.Humanoid
1020
                    if humin then
1021
                      local php = humin.Health
1022
                      dealDamage(humin.Parent, 20 + math.random(50000), 50000)
1023
                      humin.Sit = true
1024
                      if php <= humin.Health and humin.MaxHealth ~= math.huge then
1025
                        print("equal")
1026
                        humin:TakeDamage(20000)
1027
                      end
1028
                    end
1029
                  end
1030
                end
1031
              end
1032
            end
1033
          end
1034
        end)
1035
      end
1036
    else
1037
      a.up = true
1038
    end
1039
  until a.up == true
1040
  addFx(sphr, 0.07, "destroy", function()
1041
    sphr.Transparency = sphr.Transparency + 0.07
1042
    spho.Scale = spho.Scale + Vector3.new(0.1, 0.1, 0.1)
1043
  end)
1044
  still = false
1045
  spawn(function()
1046
    wait(0.3)
1047
    canExecuteMoves = true
1048
  end)
1049
  bp:Destroy()
1050
  tor.Anchored = false
1051
  deb = false
1052
  animPlaying = false
1053
  reset()
1054
end, 200)
1055
addMove("basic", "mb1", 0.1, function()
1056
  tweenTable = {}
1057
  animPlaying = true
1058
  deb = true
1059
  canRunLeg = true
1060
  tor.CFrame = CFrame.new(tor.Position, Vector3.new(mouse.Hit.p.X, tor.Position.Y, mouse.Hit.p.Z))
1061
  bg = true
1062
  idle = false
1063
  basicsound:Play()
1064
  if basicswitch == false then
1065
    Tween(rw, cfn() * ang(mr(-100), mr(45), 0), 0.2)
1066
    Tween(rj, cfn() * ang(0, mr(-45), 0), 0.2)
1067
  else
1068
    Tween(lw, cfn() * ang(mr(-100), mr(-45), 0), 0.2)
1069
    Tween(rj, cfn() * ang(0, mr(45), 0), 0.2)
1070
  end
1071
  wait(0.06)
1072
  local bullet = cp(tube, "Really black", Vector3.new(1, 1, 1), false, false)
1073
  bullet.Transparency = 1
1074
  if basicswitch == false then
1075
    bullet.CFrame = righthandle.CFrame
1076
    bullet.CFrame = CFrame.new(righthandle.CFrame.p, Vector3.new(m.Hit.p.X, m.Hit.p.Y, m.Hit.p.Z))
1077
    basicswitch = true
1078
  else
1079
    bullet.CFrame = lefthandle.CFrame
1080
    bullet.CFrame = CFrame.new(lefthandle.CFrame.p, Vector3.new(m.Hit.p.X, m.Hit.p.Y, m.Hit.p.Z))
1081
    basicswitch = false
1082
  end
1083
  local bv = int("BodyVelocity", bullet)
1084
  bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
1085
  bv.Velocity = bullet.CFrame.lookVector * 150
1086
  local bulletfx = cp(tube, "Really black", Vector3.new(1, 1, 1), true, false)
1087
  bulletfx.CFrame = bullet.CFrame
1088
  bulletfx.Material = "Neon"
1089
  sphere(bulletfx)
1090
  local angle = 0
1091
  local lastpoint = bulletfx.CFrame
1092
  addCoolDown("basic")
1093
  addMover(bullet, 0.8, function()
1094
    angle = angle + 1
1095
    local angles = CFrame.Angles(math.rad(angle), mr(angle), 0)
1096
    bulletfx.CFrame = bullet.CFrame
1097
    bulletfx.CFrame = bulletfx.CFrame * angles
1098
    if 1 < (lastpoint.p - bulletfx.CFrame.p).magnitude then
1099
      do
1100
        local line = drawLine(lastpoint.p, bulletfx.CFrame.p, "Really black", angles)
1101
        addFx(line, 0.05, "destroy", function()
1102
          line.blok.Scale = line.blok.Scale + Vector3.new(0.05, 0.05, 0)
1103
          line.Transparency = line.Transparency + 0.05
1104
        end)
1105
        lastpoint = bulletfx.CFrame
1106
      end
1107
    end
1108
  end)
1109
  bullet.Touched:connect(function(p)
1110
    if not p:isDescendantOf(ch) then
1111
      do
1112
        local thing
1113
        local region = CreateRegion3FromLocAndSize(bullet.Position, bullet.Size * 2)
1114
        for _, v in pairs(workspace:findPartsInRegion3WithIgnoreList(region, {ch}, 50)) do
1115
          if v.Parent and v.Parent:findFirstChild("Humanoid") then
1116
            thing = v
1117
            break
1118
          end
1119
        end
1120
        local explosound = getSound(142070128)
1121
        explosound.Volume = 0.8
1122
        explosound.Pitch = 1.2
1123
        explosound.Parent = p
1124
        explosound:Play()
1125
        local position = bullet.CFrame
1126
        if thing and thing.Parent then
1127
          dealDamage(thing.Parent, 20000, 50000)
1128
        end
1129
        local blast = cp(tube, "Really black", Vector3.new(2, 2, 2), true, false)
1130
        blast.Material = "Neon"
1131
        local spm2 = sphere(blast)
1132
        blast.CFrame = CFrame.new(position.X, position.Y, position.Z)
1133
        addFx(blast, 0.05, "destroy", function()
1134
          spm2.Scale = spm2.Scale + Vector3.new(0.1, 0.1, 0.1)
1135
          blast.Transparency = blast.Transparency + 0.05
1136
        end)
1137
        bullet:Destroy()
1138
        bulletfx:Destroy()
1139
      end
1140
    end
1141
  end)
1142
  game.Debris:AddItem(bullet, 2.5)
1143
  game.Debris:AddItem(bulletfx, 2.5)
1144
  wait(0.1)
1145
  idle = true
1146
  reset()
1147
  deb = false
1148
  animPlaying = false
1149
  bg = false
1150
end, 20)
1151
local dumbbox, dhand
1152
local darknum = 1
1153
addMove("darkslash", "r", 2, function()
1154
  local oldspeed = hum.WalkSpeed
1155
  hum.WalkSpeed = 0
1156
  local meshd = "http://www.roblox.com/asset/?id=12171188"
1157
  tweenTable = {}
1158
  altTweenTable = {}
1159
  deb = true
1160
  animPlaying = true
1161
  canRunLeg = true
1162
  startsound2:Play()
1163
  local sp = cp(tube, "Really black", Vector3.new(10, 10, 10), false, false)
1164
  sp.CFrame = tor.CFrame
1165
  sp.Transparency = 0.5
1166
  local sph = sphere(sp)
1167
  addFx(sp, 0.07, "destroy", function()
1168
    sph.Scale = sph.Scale - Vector3.new(0.05, 0.05, 0.05)
1169
    sp.Transparency = sp.Transparency + 0.035
1170
  end)
1171
  spawn(function()
1172
    for i = 1, 10 do
1173
      wait()
1174
      do
1175
        local cool1 = cp(tube, "Really black", Vector3.new(1.5, 1.5, 1.5), true)
1176
        local ms1 = blo(cool1)
1177
        cool1.CFrame = righthandle.CFrame * ang(mr(math.random(90)), mr(math.random(90)), mr(math.random(90)))
1178
        addFx(cool1, 0.07, "destroy", function()
1179
          ms1.Scale = ms1.Scale + Vector3.new(0.08, 0.08, 0.08)
1180
          cool1.Transparency = cool1.Transparency + 0.07
1181
        end)
1182
      end
1183
    end
1184
  end)
1185
  addCoolDown("darkslash")
1186
  local allahsword = cp(tube, "White", Vector3.new(1, 1, 1))
1187
  local critmultiplier = 2.4
1188
  local spm = int("SpecialMesh", allahsword)
1189
  spm.MeshType = "FileMesh"
1190
  spm.MeshId = meshd
1191
  allahsword.Transparency = 1
1192
  tor.CFrame = CFrame.new(tor.Position, Vector3.new(mouse.Hit.p.X, tor.Position.Y, mouse.Hit.p.Z))
1193
  local tv = Vector3.new(tor.CFrame.lookVector.X, 0, tor.CFrame.lookVector.Z)
1194
  local col = BrickColor.new("Really black").Color
1195
  spm.TextureId = rbx .. "132155326"
1196
  spm.Name = "mesh"
1197
  spm.VertexColor = Vector3.new(0, 0, 0)
1198
  spm.Scale = Vector3.new(1, 1, 1)
1199
  addFx(allahsword, 0.05, nil, function()
1200
    allahsword.Transparency = allahsword.Transparency - 0.05
1201
  end)
1202
  weld(ch["Right Arm"], allahsword, cfn(0, -4, -0.5) * ang(mr(110), 0, mr(180)))
1203
  Tween(rj, cfn() * ang(0, mr(-90), 0))
1204
  Tween(rw, cfn(0.5, 0.5, 0.5) * ang(mr(-55), mr(-35), 0))
1205
  Tween(lw, cfn(-0.5, 0.5, 0.5) * ang(mr(-55), mr(35), 0))
1206
  Delay(0.08, function()
1207
    local tstvel = int("BodyVelocity", tor)
1208
    tstvel.MaxForce = Vector3.new(math.huge, 0, math.huge)
1209
    tstvel.Velocity = tv * 35
1210
    game.Debris:AddItem(tstvel, 0.24)
1211
  end)
1212
  wait(0.22)
1213
  local hitbox = cp(tube, "White", Vector3.new(2, 12, 2))
1214
  hitbox.Transparency = 1
1215
  hitbox.CFrame = allahsword.CFrame
1216
  dumbbox = hitbox
1217
  dumbhand = allahsword
1218
  swoosh:Play()
1219
  spawn(function()
1220
    for i = 1, 10 do
1221
      wait()
1222
      do
1223
        local trl = allahsword:clone()
1224
        trl.Parent = tube
1225
        trl.CFrame = allahsword.CFrame
1226
        addFx(trl, 0.07, "destroy", function()
1227
          trl.Transparency = trl.Transparency + 0.07
1228
        end)
1229
      end
1230
    end
1231
  end)
1232
  addFx(allahsword, 0.05, "destroy", function()
1233
    allahsword.Transparency = allahsword.Transparency + 0.05
1234
    spm.Scale = spm.Scale + Vector3.new(0.1, 0.1, 0.1)
1235
  end)
1236
  hitbox.Touched:connect(function(v)
1237
    if v and v.Parent and v.Parent:findFirstChild("Humanoid") and not v:IsDescendantOf(ch) then
1238
      local can = false
1239
      if not v.Parent:findFirstChild("HitDeb") then
1240
        can = true
1241
      end
1242
      if can == true then
1243
        local sls = getSound(220834020)
1244
        sls.Pitch = 1 + math.random(3) / 10
1245
        sls.Parent = v
1246
        sls:Play()
1247
        local db = Instance.new("StringValue", v.Parent)
1248
        db.Name = "HitDeb"
1249
        game.Debris:AddItem(db, 0.5)
1250
        dealDamage(v.Parent, 20 + math.random(20000), 20000, critmultiplier)
1251
      end
1252
    end
1253
  end)
1254
  Tween(rj, cfn(0, 0, 0) * ang(mr(0), mr(90), 0))
1255
  Tween(rw, cfn(0.5, 0.8, 0) * ang(mr(-80), mr(-35), 0))
1256
  Tween(lw, cfn(-0.5, 0.8, 0) * ang(mr(-90), mr(35), 0))
1257
  wait(0.2)
1258
  hitbox:Destroy()
1259
  hum.WalkSpeed = oldspeed
1260
  reset()
1261
  animPlaying = false
1262
  canRunLeg = false
1263
  deb = false
1264
end, 80)
1265
addMove("darkspikes", "t", 0.4, function()
1266
  local lv = tor.CFrame
1267
  tweenTable = {}
1268
  animPlaying = true
1269
  deb = true
1270
  canRunLeg = true
1271
  magictone1:Play()
1272
  Tween(rj, cfn() * ang(0, mr(25), 0), 0.2)
1273
  Tween(rw, cfn() * ang(mr(25), mr(-20), 0), 0.2)
1274
  wait(0.2)
1275
  Tween(rj, cfn() * ang(0, mr(-55), 0), 0.15)
1276
  Tween(rw, cfn() * ang(mr(-115), mr(45), 0), 0.15)
1277
  Tween(neck, cfn() * ang(0, mr(55), 0))
1278
  local spot = 4
1279
  for i = 1, 10 do
1280
    wait(0.1)
1281
    do
1282
      local v = lv.lookVector * spot
1283
      spot = spot + 14
1284
      local spike = cp(tube, "Really black", Vector3.new(10, 1, 10), true, false)
1285
      spike.CFrame = lv * CFrame.new(0, 0, -spot)
1286
      local dam = cp(tube, "Really black", Vector3.new(7, 10, 7), true, false)
1287
      local dml = cyl(dam)
1288
      local angls = CFrame.Angles(spike.CFrame:toEulerAnglesXYZ())
1289
      local bhit, pos = FindGround(cn(spike.CFrame.p), ch)
1290
      if bhit then
1291
        spike.CFrame = pos * CFrame.new(0, 0, 0)
1292
        do
1293
          local mgp = cp(tube, "White", Vector3.new(1, 1, 1), true, false)
1294
          mgp.Transparency = 1
1295
          mgp.CFrame = spike.CFrame
1296
          game.Debris:AddItem(mgp, 2)
1297
          local sn = spexp:clone()
1298
          sn.Parent = mgp
1299
          sn.Volume = 2
1300
          sn:Play()
1301
          dam.CFrame = spike.CFrame * CFrame.new(0, 5, 0)
1302
          local blast = dam
1303
          local region = CreateRegion3FromLocAndSize(blast.Position, blast.Size * 2)
1304
          local people = {}
1305
          for _, v in pairs(workspace:findPartsInRegion3WithIgnoreList(region, {ch}, 100)) do
1306
            if v and v.Parent and v.className == "Part" and v.Parent:findFirstChild("Humanoid") then
1307
              local can = false
1308
              if not v.Parent:findFirstChild("HitDeb") then
1309
                can = true
1310
              end
1311
              if can == true then
1312
                local db = Instance.new("StringValue", v.Parent)
1313
                db.Name = "HitDeb"
1314
                game.Debris:AddItem(db, 0.2)
1315
                local humin = v.Parent.Humanoid
1316
                if humin then
1317
                  local php = humin.Health
1318
                  dealDamage(humin.Parent, 10 + math.random(30000), 20000)
1319
                  local testvel = int("BodyVelocity", v)
1320
                  testvel.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
1321
                  testvel.Velocity = lv.lookVector * 100
1322
                  game.Debris:addItem(testvel, 1)
1323
                  humin.Sit = true
1324
                  if php <= humin.Health and humin.MaxHealth ~= math.huge then
1325
                    print("equal")
1326
                    humin:TakeDamage(20000)
1327
                  end
1328
                end
1329
              end
1330
            end
1331
          end
1332
          local cl = cyl(spike)
1333
          addFx(spike, 0.05, "destroy", function()
1334
            cl.Scale = cl.Scale - Vector3.new(0.05, 0, 0.05)
1335
            spike.Transparency = spike.Transparency + 0.05
1336
          end)
1337
          addFx(dml, 0.05, "destroy", function()
1338
            dml.Scale = dml.Scale - Vector3.new(0.05, -0.05, 0.05)
1339
            dam.Transparency = dam.Transparency + 0.05
1340
          end)
1341
        end
1342
      else
1343
        spike:Destroy()
1344
      end
1345
    end
1346
  end
1347
  wait(0.7)
1348
  deb = false
1349
  canRunLeg = false
1350
  animPlaying = false
1351
  reset()
1352
end, 30)
1353
mouse.Button1Down:connect(function()
1354
  executeMove("basic")
1355
end)
1356
local vt
1357
local dodgecool = false
1358
function iPart(tab)
1359
  local v = Instance.new(tab.type or "Part")
1360
  if tab.type ~= "CornerWedgePart" then
1361
    v.formFactor = "Custom"
1362
  end
1363
  v.CanCollide = false
1364
  v.TopSurface = 0
1365
  v.BottomSurface = 0
1366
  v.Size = v3(tab[2], tab[3], tab[4])
1367
  if tab.co then
1368
    v.BrickColor = bn(tab.co)
1369
  end
1370
  if tab.tr then
1371
    v.Transparency = tab.tr
1372
  end
1373
  if tab.rf then
1374
    v.Reflectance = tab.rf
1375
  end
1376
  if tab.cf then
1377
    v.CFrame = tab.cf
1378
  end
1379
  if tab.an then
1380
    v.Anchored = tab.an
1381
  end
1382
  v.Parent = tab[1]
1383
  LastMade = v
1384
  return v
1385
end
1386
function iNew(tab)
1387
  local v = Instance.new(tab[1])
1388
  for Ind, Val in pairs(tab) do
1389
    if Ind ~= 1 and Ind ~= 2 then
1390
      v[Ind] = Val
1391
    end
1392
  end
1393
  v.Parent = tab[2] == 0 and LastMade or tab[2]
1394
  LastMade = v
1395
  return v
1396
end
1397
local ppart = iPart({
1398
  nil,
1399
  0.2,
1400
  0.2,
1401
  0.2
1402
})
1403
ppart.Material = "SmoothPlastic"
1404
ppart.TopSurface = "SmoothNoOutlines"
1405
ppart.BottomSurface = "SmoothNoOutlines"
1406
ppart.RightSurface = "SmoothNoOutlines"
1407
ppart.LeftSurface = "SmoothNoOutlines"
1408
ppart.Transparency = 0
1409
ppart.Anchored = true
1410
local CFrameFromTopBack = function(at, top, back)
1411
  local right = top:Cross(back)
1412
  return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
1413
end
1414
function Triangle(a, b, c)
1415
  local edg1 = (c - a):Dot((b - a).unit)
1416
  local edg2 = (a - b):Dot((c - b).unit)
1417
  local edg3 = (b - c):Dot((a - c).unit)
1418
  if edg1 <= (b - a).magnitude and edg1 >= 0 then
1419
    a, b = a, b
1420
  elseif edg2 <= (c - b).magnitude and edg2 >= 0 then
1421
    a, b, c = b, c, a
1422
  elseif edg3 <= (a - c).magnitude and edg3 >= 0 then
1423
    a, b, c = c, a, b
1424
  else
1425
    print("unreachable")
1426
  end
1427
  local len1 = (c - a):Dot((b - a).unit)
1428
  local len2 = (b - a).magnitude - len1
1429
  local width = (a + (b - a).unit * len1 - c).magnitude
1430
  local maincf = CFrameFromTopBack(a, (b - a):Cross(c - b).unit, -(b - a).unit)
1431
  local list = {}
1432
  if len1 > 0.01 then
1433
    do
1434
      local w1 = iNew({
1435
        "WedgePart",
1436
        Pack,
1437
        FormFactor = "Custom",
1438
        BrickColor = ppart.BrickColor,
1439
        Transparency = ppart.Transparency,
1440
        Reflectance = ppart.Reflectance,
1441
        Material = ppart.Material,
1442
        CanCollide = ppart.CanCollide
1443
      })
1444
      w1.Parent = tube
1445
      local sz = v3(0.2, width, len1)
1446
      w1.Size = sz
1447
      local sp = iNew({
1448
        "SpecialMesh",
1449
        w1,
1450
        MeshType = "Wedge",
1451
        Scale = v3(0, 1, 1) * sz / w1.Size
1452
      })
1453
      w1:BreakJoints()
1454
      w1.Anchored = true
1455
      w1.Transparency = 0.7
1456
      Spawn(function()
1457
        for i = 0, 1, 0.1 do
1458
          wait()
1459
          w1.Transparency = w1.Transparency + 0.03
1460
        end
1461
      end)
1462
      w1.CFrame = maincf * ca2(math.pi, 0, math.pi / 2) * cn(0, width / 2, len1 / 2)
1463
      table.insert(list, w1)
1464
    end
1465
  end
1466
  if len2 > 0.01 then
1467
    do
1468
      local w2 = iNew({
1469
        "WedgePart",
1470
        Pack,
1471
        FormFactor = "Custom",
1472
        BrickColor = ppart.BrickColor,
1473
        Transparency = ppart.Transparency,
1474
        Reflectance = ppart.Reflectance,
1475
        Material = ppart.Material,
1476
        CanCollide = ppart.CanCollide
1477
      })
1478
      local sz = v3(0.2, width, len2)
1479
      w2.Size = sz
1480
      local sp = iNew({
1481
        "SpecialMesh",
1482
        w2,
1483
        MeshType = "Wedge",
1484
        Scale = v3(0, 1, 1) * sz / w2.Size
1485
      })
1486
      w2:BreakJoints()
1487
      w2.Anchored = true
1488
      w2.Transparency = 0.7
1489
      Spawn(function()
1490
        for i = 0, 1, 0.1 do
1491
          wait()
1492
          w2.Transparency = w2.Transparency + 0.03
1493
        end
1494
      end)
1495
      w2.CFrame = maincf * ca2(math.pi, math.pi, -math.pi / 2) * cn(0, width / 2, -len1 - len2 / 2)
1496
      w2.Parent = tube
1497
      table.insert(list, w2)
1498
    end
1499
  end
1500
  return unpack(list)
1501
end
1502
bclf = ch["Right Arm"].CFrame
1503
scfr = bclf
1504
ca = CFrame.Angles
1505
cn = CFrame.new
1506
v3 = Vector3.new
1507
function Raycast(Pos, Dir, Ign)
1508
  return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * 300), Ign)
1509
end
1510
function FindGround(cf, ig)
1511
  local ax, ay, az = cf:toEulerAnglesXYZ()
1512
  local bhit, bpos = Raycast(cf.p, cf.p - (cf.p + v3(0, 200, 0)), ig)
1513
  if bhit and bpos then
1514
    return bhit, cn(bpos) * ca(ax, ay, az)
1515
  end
1516
end
1517
currentkey = ""
1518
mouse.KeyDown:connect(function(key)
1519
  if key == "q" and currentkey == "32" and Vector3.new(0, tor.Velocity.Y, 0).magnitude > 2 then
1520
    executeMove("downslam")
1521
  elseif key == "r" and currentkey == "32" and Vector3.new(0, tor.Velocity.Y, 0).magnitude > 2 then
1522
    executeMove("aerialsword")
1523
  end
1524
  if string.byte(key) == 32 and canExecuteMoves == true then
1525
    combostring = combostring .. "."
1526
    if combostring:match("..") and dodgecool == false then
1527
      currentkey = tostring(string.byte(key))
1528
      animPlaying = true
1529
      altTween(rj, cfn() * ang(mr(-15), 0, 0))
1530
      altTween(rw, cfn() * ang(mr(10), 0, mr(-15)))
1531
      altTween(lw, cfn() * ang(mr(10), 0, mr(15)))
1532
      dodgecool = true
1533
      combostring = ""
1534
      local rv = tor.CFrame.upVector
1535
      local bv = int("BodyVelocity", tor)
1536
      dodgesound:Play()
1537
      bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
1538
      bv.Velocity = rv * 150
1539
      spawn(function()
1540
        for i = 1, 14 do
1541
          wait()
1542
          do
1543
            local cfx = cp(tube, "Really black", Vector3.new(6, 6, 6), true, false)
1544
            cfx.CFrame = tor.CFrame * CFrame.Angles(math.rad(math.random(90)), math.rad(math.random(90)), 0)
1545
            local b = blo(cfx)
1546
            addFx(cfx, 0.05, "destroy", function()
1547
              cfx.Transparency = cfx.Transparency + 0.05
1548
              b.Scale = b.Scale + Vector3.new(0.1, 0.1, 0.1)
1549
            end)
1550
          end
1551
        end
1552
      end)
1553
      wait()
1554
      bv:Destroy()
1555
      wait(0.4)
1556
      reset()
1557
      dodgecool = false
1558
      wait(0.4)
1559
      if currentkey == "32" then
1560
        currentkey = ""
1561
      end
1562
      if not deb then
1563
        animPlaying = false
1564
      end
1565
    end
1566
  end
1567
  if key == "d" and canExecuteMoves == true then
1568
    combostring = combostring .. "d"
1569
    if combostring:match("dd") and dodgecool == false then
1570
      dodgecool = true
1571
      combostring = ""
1572
      local rv = cam.CFrame.rightVector
1573
      local bv = int("BodyVelocity", tor)
1574
      dodgesound:Play()
1575
      bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
1576
      bv.Velocity = rv * 150
1577
      spawn(function()
1578
        for i = 1, 16 do
1579
          wait()
1580
          do
1581
            local cfx = cp(tube, "Really black", Vector3.new(6, 6, 6), true, false)
1582
            cfx.CFrame = tor.CFrame * CFrame.Angles(math.rad(math.random(90)), math.rad(math.random(90)), 0)
1583
            local b = blo(cfx)
1584
            addFx(cfx, 0.05, "destroy", function()
1585
              cfx.Transparency = cfx.Transparency + 0.05
1586
              b.Scale = b.Scale + Vector3.new(0.1, 0.1, 0.1)
1587
            end)
1588
          end
1589
        end
1590
      end)
1591
      wait()
1592
      bv:Destroy()
1593
      wait(0.4)
1594
      dodgecool = false
1595
    end
1596
  elseif key == "w" and canExecuteMoves == true then
1597
    combostring = combostring .. "w"
1598
    if combostring:match("ww") and dodgecool == false then
1599
      dodgecool = true
1600
      combostring = ""
1601
      local rv = cam.CFrame:vectorToWorldSpace(Vector3.new(0, 0, -1))
1602
      local bv = int("BodyVelocity", tor)
1603
      dodgesound:Play()
1604
      bv.MaxForce = Vector3.new(math.huge, 0, math.huge)
1605
      bv.Velocity = rv * 150
1606
      spawn(function()
1607
        for i = 1, 16 do
1608
          wait()
1609
          do
1610
            local cfx = cp(tube, "Really black", Vector3.new(6, 6, 6), true, false)
1611
            cfx.CFrame = tor.CFrame * CFrame.Angles(math.rad(math.random(90)), math.rad(math.random(90)), 0)
1612
            local b = blo(cfx)
1613
            addFx(cfx, 0.05, "destroy", function()
1614
              cfx.Transparency = cfx.Transparency + 0.05
1615
              b.Scale = b.Scale + Vector3.new(0.1, 0.1, 0.1)
1616
            end)
1617
          end
1618
        end
1619
      end)
1620
      wait()
1621
      bv:Destroy()
1622
      wait(0.4)
1623
      dodgecool = false
1624
    end
1625
  elseif key == "s" and canExecuteMoves == true then
1626
    combostring = combostring .. "s"
1627
    if combostring:match("ss") and dodgecool == false then
1628
      dodgecool = true
1629
      combostring = ""
1630
      local rv = cam.CFrame:vectorToWorldSpace(Vector3.new(0, 0, 1))
1631
      local bv = int("BodyVelocity", tor)
1632
      dodgesound:Play()
1633
      bv.MaxForce = Vector3.new(math.huge, 0, math.huge)
1634
      bv.Velocity = rv * 150
1635
      spawn(function()
1636
        for i = 1, 16 do
1637
          wait()
1638
          do
1639
            local cfx = cp(tube, "Really black", Vector3.new(6, 6, 6), true, false)
1640
            cfx.CFrame = tor.CFrame * CFrame.Angles(math.rad(math.random(90)), math.rad(math.random(90)), 0)
1641
            local b = blo(cfx)
1642
            addFx(cfx, 0.05, "destroy", function()
1643
              cfx.Transparency = cfx.Transparency + 0.05
1644
              b.Scale = b.Scale + Vector3.new(0.1, 0.1, 0.1)
1645
            end)
1646
          end
1647
        end
1648
      end)
1649
      wait()
1650
      bv:Destroy()
1651
      wait(0.4)
1652
      dodgecool = false
1653
    end
1654
  elseif key == "a" and canExecuteMoves == true then
1655
    combostring = combostring .. "a"
1656
    if combostring:match("aa") and dodgecool == false then
1657
      dodgecool = true
1658
      combostring = ""
1659
      local rv = cam.CFrame.rightVector
1660
      local bv = int("BodyVelocity", tor)
1661
      dodgesound:Play()
1662
      bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
1663
      bv.Velocity = rv * -150
1664
      spawn(function()
1665
        for i = 1, 16 do
1666
          wait()
1667
          do
1668
            local cfx = cp(tube, "Really black", Vector3.new(6, 6, 6), true, false)
1669
            cfx.CFrame = tor.CFrame * CFrame.Angles(math.rad(math.random(90)), math.rad(math.random(90)), 0)
1670
            local b = blo(cfx)
1671
            addFx(cfx, 0.05, "destroy", function()
1672
              cfx.Transparency = cfx.Transparency + 0.05
1673
              b.Scale = b.Scale + Vector3.new(0.1, 0.1, 0.1)
1674
            end)
1675
          end
1676
        end
1677
      end)
1678
      wait()
1679
      bv:Destroy()
1680
      wait(0.4)
1681
      dodgecool = false
1682
    end
1683
  end
1684
  if key == "f" then
1685
    if deb == false then
1686
      executeMove("block_normal")
1687
    end
1688
  elseif key == "e" then
1689
    if deb == false then
1690
      executeMove("beam")
1691
    end
1692
  elseif key == "t" then
1693
    if deb == false then
1694
      executeMove("darkspikes")
1695
    end
1696
  elseif key == "g" then
1697
    if deb == false then
1698
      executeMove("curse")
1699
    end
1700
  elseif key == "r" and deb == false and Vector3.new(0, tor.Velocity.Y, 0).magnitude < 2 and currentkey ~= "32" then
1701
    executeMove("darkslash")
1702
  end
1703
end)
1704
mouse.KeyUp:connect(function(key)
1705
  for _, v in pairs(connectlist) do
1706
    if v.up == false and v.key == key then
1707
      v.up = true
1708
      table.remove(connectlist, _)
1709
    end
1710
  end
1711
end)
1712
mouse.Button1Up:connect(function()
1713
  for _, v in pairs(connectlist) do
1714
    if v.up == false then
1715
      v.up = true
1716
      table.remove(connectlist, _)
1717
    end
1718
  end
1719
end)
1720
local oldsize = mana / maxmana
1721
local oldchain = 0
1722
spawn(function()
1723
  while wait(1) do
1724
    if deb == false then
1725
      if chain == oldchain then
1726
        chain = 0
1727
      end
1728
      oldchain = chain
1729
    end
1730
  end
1731
end)
1732
game:service("RunService").Stepped:connect(function()
1733
  chaintext.Text = tostring(chain) .. "x"
1734
  manabartext.Text = tostring(mana) .. "/" .. tostring(maxmana)
1735
  if mana / maxmana ~= oldsize then
1736
    manabar:TweenSize(UDim2.new(mana / maxmana, 0, 1, 0), "Out", "Sine", 1, true)
1737
    oldsize = mana / maxmana
1738
  end
1739
  if dumbbox then
1740
    dumbbox.CFrame = dumbhand.CFrame * cfn(0, 0, 4) * ang(mr(-90), 0, 0)
1741
  end
1742
  for _, v in pairs(textTable) do
1743
    if 1 > v.TextLabel.TextTransparency then
1744
      v.TextLabel.TextTransparency = v.TextLabel.TextTransparency + 0.02
1745
      v.TextLabel.TextStrokeTransparency = v.TextLabel.TextStrokeTransparency + 0.02
1746
      v.StudsOffset = v.StudsOffset + Vector3.new(0, 0.02, 0)
1747
    else
1748
      v:Destroy()
1749
      table.remove(textTable, _)
1750
    end
1751
  end
1752
  if Vector3.new(tor.Velocity.X, 0, tor.Velocity.Z).magnitude > 2 then
1753
    run = true
1754
  elseif Vector3.new(tor.Velocity.X, 0, tor.Velocity.Z).magnitude < 2 then
1755
    run = false
1756
    idle = true
1757
  end
1758
  if Vector3.new(tor.Velocity.X, 0, tor.Velocity.Z).magnitude > 2 and canRunLeg == true then
1759
    runLeg = true
1760
  elseif Vector3.new(tor.Velocity.X, 0, tor.Velocity.Z).magnitude < 2 and canRunLeg == true then
1761
    runLeg = false
1762
    resetLegs()
1763
  end
1764
  for _, v in pairs(movers) do
1765
    if v.mover and v.mover:IsDescendantOf(tube) then
1766
      v.func()
1767
    else
1768
      table.remove(movers, _)
1769
    end
1770
  end
1771
  if bg and 0 < hum.Health then
1772
    tor.CFrame = CFrame.new(tor.Position, Vector3.new(mouse.Hit.p.X, tor.Position.Y, mouse.Hit.p.Z))
1773
  end
1774
  for _, v in pairs(fx) do
1775
    if 1 > v.stepval then
1776
      v.func()
1777
      v.stepval = v.stepval + v.int
1778
    elseif v.final then
1779
      if v.final == "destroy" then
1780
        v.item:Destroy()
1781
        table.remove(fx, _)
1782
      end
1783
    else
1784
      table.remove(fx, _)
1785
    end
1786
  end
1787
  for _, v in pairs(tweenTable) do
1788
    if v.Weld.C1 == v.Stop then
1789
      table.remove(tweenTable, _)
1790
    elseif v.th < 1 - v.Step then
1791
      v.th = v.th + v.Step
1792
      i = v.th
1793
      v.Weld.C1 = v.Weld.C1:lerp(CFrame.new(v.Start.p.X * (1 - i) + v.Stop.p.X * i, v.Start.p.Y * (1 - i) + v.Stop.p.Y * i, v.Start.p.Z * (1 - i) + v.Stop.p.Z * i) * CFrame.fromEulerAnglesXYZ(v.X1 * (1 - i) + v.X2 * i, v.Y1 * (1 - i) + v.Y2 * i, v.Z1 * (1 - i) + v.Z2 * i), 1)
1794
    else
1795
      v.Weld.C1 = v.Stop
1796
    end
1797
  end
1798
  for _, v in pairs(altTweenTable) do
1799
    if v.Weld.C1 == v.Stop then
1800
      table.remove(tweenTable, _)
1801
    elseif v.th < 1 - v.Step then
1802
      v.th = v.th + v.Step
1803
      i = v.th
1804
      v.Weld.C1 = v.Weld.C1:lerp(CFrame.new(v.Start.p.X * (1 - i) + v.Stop.p.X * i, v.Start.p.Y * (1 - i) + v.Stop.p.Y * i, v.Start.p.Z * (1 - i) + v.Stop.p.Z * i) * CFrame.fromEulerAnglesXYZ(v.X1 * (1 - i) + v.X2 * i, v.Y1 * (1 - i) + v.Y2 * i, v.Z1 * (1 - i) + v.Z2 * i), 1)
1805
    else
1806
      v.Weld.C1 = v.Stop
1807
    end
1808
  end
1809
end)
1810
local oldcombo
1811
local thingz = false
1812
spawn(function()
1813
  while wait(0.1) do
1814
    for _, v in pairs(cooldowns) do
1815
      if 0.1 > v.timeleft then
1816
        table.remove(cooldowns, _)
1817
      else
1818
        v.timeleft = v.timeleft - 0.1
1819
      end
1820
    end
1821
  end
1822
end)
1823
spawn(function()
1824
  while wait(0.1) do
1825
    if thingz == false then
1826
      oldcombo = combostring
1827
      thingz = true
1828
    else
1829
      if string.len(oldcombo) == string.len(combostring) then
1830
        combostring = ""
1831
        oldcombo = ""
1832
      end
1833
      thingz = false
1834
    end
1835
  end
1836
end)
1837
while wait() do
1838
  if mana < maxmana and not deb and not animPlaying then
1839
    mana = mana + 2
1840
    if mana == maxmana + 1 then
1841
      mana = maxmana
1842
    end
1843
  end
1844
  if animPlaying == true and runLeg == true then
1845
    walkLegs()
1846
  end
1847
  if run == true and animPlaying == false then
1848
    altTweenTable = {}
1849
    tweenTable = {}
1850
    walkCycle()
1851
  elseif idle == true and animPlaying == false then
1852
    tweenTable = {}
1853
    reset()
1854
  end
1855
end