View difference between Paste ID: H4KnaKg2 and rLagveE3
SHOW: | | - or go back to the newest paste.
1
--//====================================================\\--
2
--|| CREATED BY BRANNON1964802, EDITED BY KARMARANGE
3
--\\====================================================//--
4
5
--[[c=script.Parent:getChildren()
6
for i = 1, #c do
7
if c[i].className=="BodyColors" then
8
c[i]:Remove()
9
end
10
end]]--
11
local e = script.Parent:FindFirstChild("Body Colors")
12
if e then
13
e:Destroy()
14
end
15
16
wait(1 / 60)
17
18
19
20
Player = game:GetService("Players").LocalPlayer
21
PlayerGui = Player.PlayerGui
22
Cam = workspace.CurrentCamera
23
Backpack = Player.Backpack
24
Character = Player.Character
25
Humanoid = Character.Humanoid
26
Mouse = Player:GetMouse()
27
RootPart = Character["HumanoidRootPart"]
28
Torso = Character["Torso"]
29
Head = Character["Head"]
30
RightArm = Character["Right Arm"]
31
LeftArm = Character["Left Arm"]
32
RightLeg = Character["Right Leg"]
33
LeftLeg = Character["Left Leg"]
34
RootJoint = RootPart["RootJoint"]
35
Neck = Torso["Neck"]
36
RightShoulder = Torso["Right Shoulder"]
37
LeftShoulder = Torso["Left Shoulder"]
38
RightHip = Torso["Right Hip"]
39
LeftHip = Torso["Left Hip"]
40
Humanoid.WalkSpeed = 5
41
Humanoid.JumpPower = 0
42
Humanoid.MaxHealth = "inf"
43
Humanoid.Health = "inf"
44
kkk = Instance.new("Sound",Character)
45
kkk.Volume = 5
46
kkk.PlaybackSpeed = 1
47
kkk.Pitch = 0.3
48
kkk.SoundId = "rbxassetid://162611981"
49
kkk:Play()
50
kkk.Name = "PowerUpSound"
51
52
function chatfunc(text)
53
local chat = coroutine.wrap(function()
54
if Character:FindFirstChild("TalkingBillBoard")~= nil then
55
Character:FindFirstChild("TalkingBillBoard"):destroy()
56
end
57
local naeeym2 = Instance.new("BillboardGui",Character)
58
naeeym2.Size = UDim2.new(0,100,0,40)
59
naeeym2.StudsOffset = Vector3.new(0,4,0)
60
naeeym2.Adornee = Character.Head
61
naeeym2.Name = "TalkingBillBoard"
62
local tecks2 = Instance.new("TextLabel",naeeym2)
63
tecks2.BackgroundTransparency = 1
64
tecks2.BorderSizePixel = 0
65
tecks2.Text = ""
66
tecks2.Font = "Fantasy"
67
tecks2.TextSize = 30
68
tecks2.TextStrokeTransparency = 0
69
tecks2.TextColor3 = Color3.new(0,0,0)
70
tecks2.TextStrokeColor3 = Color3.new(0,0,0)
71
tecks2.Size = UDim2.new(1,0,0.5,0)
72
local tecks3 = Instance.new("TextLabel",naeeym2)
73
tecks3.BackgroundTransparency = 1
74
tecks3.BorderSizePixel = 0
75
tecks3.Text = ""
76
tecks3.Font = "Fantasy"
77
tecks3.TextSize = 30
78
tecks3.TextStrokeTransparency = 0
79
tecks3.TextColor3 = Color3.new(0,0,0)
80
tecks3.TextStrokeColor3 = Color3.new(0,0,0)
81
tecks3.Size = UDim2.new(1,0,0.5,0)
82
for i = 1,string.len(text),1 do
83
tecks2.Text = string.sub(text,1,i)
84
tecks3.Text = string.sub(text,1,i)
85
wait(0.01)
86
end
87
wait(2)
88
for i = 1, 50 do
89
wait()
90
tecks2.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
91
tecks2.Rotation = tecks2.Rotation - .8
92
tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
93
tecks2.TextTransparency = tecks2.TextTransparency + .04
94
tecks3.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
95
tecks3.Rotation = tecks2.Rotation + .8
96
tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
97
tecks3.TextTransparency = tecks2.TextTransparency + .04
98
end
99
naeeym2:Destroy()
100
end)
101
chat()
102
end
103
function onChatted(msg)
104
chatfunc(msg)
105
end
106
Player.Chatted:connect(onChatted)
107
108
wait(3)
109
local color = script.Parent:FindFirstChild("Body Colors")
110
Head.face.Texture = "rbxassetid://8560915"
111
Head.Mesh:Destroy()
112
local mesh = Instance.new("BlockMesh")
113
mesh.Parent = Head
114
Head.BrickColor = BrickColor.new("Light stone grey")
115
RightArm.BrickColor = BrickColor.new("Light stone grey")
116
LeftArm.BrickColor = BrickColor.new("Light stone grey")
117
LeftLeg.BrickColor = BrickColor.new("Light stone grey")
118
RightLeg.BrickColor = BrickColor.new("Light stone grey")
119
Torso.BrickColor = BrickColor.new("Light stone grey")
120
script.Parent.Shirt.ShirtTemplate = "rbxassetid://46810244"
121
script.Parent.Pants.PantsTemplate = "rbxassetid://55631376"
122
kkk = Instance.new("Sound",Character)
123
kkk.Volume = 1.5
124
kkk.PlaybackSpeed = 1
125
kkk.Pitch = 1
126
kkk.SoundId = "rbxassetid://313961026"
127
kkk:Play()
128
kkk.Name = "BackgroundMusic"
129
kkk.Looped = true
130
chatfunc("I am Sorcus! And I have come for your judgement! Fear me mortal!")
131
c=script.Parent:getChildren()
132
for i = 1, #c do
133
if c[i].className=="CharacterMesh" then
134
c[i]:Remove()
135
end
136
end
137
wait(0.0005)
138
Humanoid.WalkSpeed = 35
139
Humanoid.JumpPower = 150
140
Head.BrickColor = BrickColor.new("Light stone grey")
141
RightArm.BrickColor = BrickColor.new("Light stone grey")
142
LeftArm.BrickColor = BrickColor.new("Light stone grey")
143
LeftLeg.BrickColor = BrickColor.new("Light stone grey")
144
RightLeg.BrickColor = BrickColor.new("Light stone grey")
145
Torso.BrickColor = BrickColor.new("Light stone grey")
146
147
148
IT = Instance.new
149
CF = CFrame.new
150
VT = Vector3.new
151
RAD = math.rad
152
C3 = Color3.new
153
UD2 = UDim2.new
154
BRICKC = BrickColor.new
155
ANGLES = CFrame.Angles
156
EULER = CFrame.fromEulerAnglesXYZ
157
COS = math.cos
158
ACOS = math.acos
159
SIN = math.sin
160
ASIN = math.asin
161
ABS = math.abs
162
MRANDOM = math.random
163
FLOOR = math.floor
164
165
166
167
168
function reap(t)
169
if t.Name ~= "Corpse" then
170
local s = Instance.new("Model")
171
s.Name = "Corpse"
172
local larm = t:FindFirstChild("Left Arm")
173
local rarm = t:FindFirstChild("Right Arm")
174
local lleg = t:FindFirstChild("Left Leg")
175
local rleg = t:FindFirstChild("Right Leg")
176
s.Parent = workspace
177
local tor = Instance.new("Part")
178
tor.Name = "Torso"
179
tor.Size = Vector3.new(2,2,1)
180
tor.Parent = s
181
tor.CFrame = t.Torso.CFrame
182
local LL = Instance.new("Part")
183
LL.Name = "Left Leg"
184
LL.Size = Vector3.new(1,2,1)
185
LL.Parent = s
186
LL.CFrame = lleg.CFrame
187
LL.CanCollide = true
188
local RL = Instance.new("Part")
189
RL.Name = "Right Leg"
190
RL.Size = Vector3.new(1,2,1)
191
RL.Parent = s
192
RL.CFrame = rleg.CFrame
193
RL.CanCollide = true
194
local RA = Instance.new("Part")
195
RA.Name = "Right Arm"
196
RA.Size = Vector3.new(1,2,1)
197
RA.Parent = s
198
RA.CFrame = rarm.CFrame
199
RA.CanCollide = true
200
local LA = Instance.new("Part")
201
LA.Name = "Left Arm"
202
LA.Size = Vector3.new(1,2,1)
203
LA.Parent = s
204
LA.CFrame = larm.CFrame
205
LA.CanCollide = true
206
local head = Instance.new("Part")
207
head.Name = "Head"
208
head.Size = Vector3.new(2,1,1)
209
head.Parent = s
210
head.CFrame = t.Head.CFrame
211
local tor = Instance.new("CharacterMesh")
212
tor.Parent = s
213
tor.BodyPart = "Torso"
214
tor.MeshId = "36780113"
215
tor.OverlayTextureId = "494636944"
216
local tor = Instance.new("CharacterMesh")
217
tor.Parent = s
218
tor.BodyPart = "RightLeg"
219
tor.MeshId = "36780195"
220
tor.OverlayTextureId = "494636944"
221
local tor = Instance.new("CharacterMesh")
222
tor.Parent = s
223
tor.BodyPart = "LeftLeg"
224
tor.MeshId = "36780079"
225
tor.OverlayTextureId = "494636944"
226
local tor = Instance.new("CharacterMesh")
227
tor.Parent = s
228
tor.BodyPart = "LeftArm"
229
tor.MeshId = "36780032"
230
tor.OverlayTextureId = "494636944"
231
local tor = Instance.new("CharacterMesh")
232
tor.Parent = s
233
tor.BodyPart = "RightArm"
234
tor.MeshId = "36780156"
235
tor.OverlayTextureId = "494636944"
236
local tor = Instance.new("SpecialMesh")
237
tor.Scale = Vector3.new(0.9, 0.9, 0.9)
238
tor.MeshType = "FileMesh"
239
tor.MeshId = "http://www.roblox.com/asset/?id=181343290"
240
tor.TextureId = "rbxassetid://494637850"
241
tor.Parent = head
242
local human = t.Humanoid
243
human.Parent = s
244
t:Destroy()
245
end
246
end
247
248
--//=================================\\
249
--||		  CUSTOMIZATION
250
--\\=================================//
251
252
Class_Name = "Sorcus"
253
Weapon_Name = "Sword"
254
255
Custom_Colors = {
256
	Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
257
	Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
258
259
	Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
260
	Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
261
	Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
262
	Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
263
	Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
264
265
	Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
266
	Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
267
	Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
268
	Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
269
	Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
270
}
271
272
Mana_Bar_Background_Transparency = 0 --Transparency for the background of the mana bar.
273
Secondary_Mana_Bar_Background_Transparency = 0 --Transparency for the background of the secondary mana bar.
274
Health_Bar_Background_Transparency = 0 --Transparency for the background of the health bar.
275
Stun_Bar_Background_Transparency = 0 --Transparency for the background of the stun bar.
276
Ability_Background_Transparency = 0  --Transparency for the background of the abilities.
277
Stat_Background_Transparency = 0 --Transparency for the background of the stats.
278
279
Player_Size = 5 --Size of the player.
280
Animation_Speed = 3
281
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
282
283
Enable_Gui = false --Enables or disables the Weapon Gui. Also functions as hiding or showing the Gui.
284
Enable_Stats = false --Enables or disables stats.
285
Put_Stats_In_Character = false --Places stats in Character.
286
Enable_Stagger_Hit = false --Enables or disables staggering when hitting a hitbox of some sort.
287
Play_Hitbox_Hit_Sound = true --Plays a hit sound when hitting a hitbox of some sort.
288
Enable_Stagger = false --Enables or disables staggering.
289
Enable_Stun = false --Enables or disables the stun mechanic.
290
Enable_Abilities = false --Enables abilites with cooldowns and mana costs.
291
Enable_Secondary_Bar = false --Enables the secondary mana bar, if true.
292
293
Start_Equipped = false --Starts the player equipped with their weapon.
294
Start_Equipped_With_Equipped_Animation = false --Used in conjunction with the above option. Starts your equip animation.
295
Can_Equip_Or_Unequip = true --Enables or disables the ability to unequip or equip your weapon.
296
Disable_Animator = true --Disables the Animator in the humanoid.
297
Disable_Animate = true --Disables the Animate script in the character.
298
Disable_Moving_Arms = false --Keeps the arms from moving around.
299
Use_Motors_Instead_Of_Welds = false --Uses motors instead of welds to disable moving arms.
300
Walkspeed_Depends_On_Movement_Value = false --Walkspeed depends on movement value. Self-explanatory.
301
Disable_Jump = false --Disables jumping.
302
Use_HopperBin = true --Uses a hopperbin to do things.
303
304
Cooldown_1 = 0 --Cooldowns for abilites.
305
Cooldown_2 = 0
306
Cooldown_3 = 0
307
Cooldown_4 = 0
308
Skill_1_Mana_Cost = 0 --How much mana is required to use the skill.
309
Skill_2_Mana_Cost = 0
310
Skill_3_Mana_Cost = 0
311
Skill_4_Mana_Cost = 0
312
Max_Mana = 0 --Maximum amount of mana you can have.
313
Max_Secondary_Mana = 0 --Maximum amount of secondary mana you can have.
314
Mana_Name = "Mana" --Name for the mana bar.
315
Secondary_Mana_Name = "Block" --Name for the secondary mana bar.
316
Max_Stun = 1 --Maximum amount of stun you can have.
317
Recover_Mana = 0 --How much mana you gain.
318
Mana_Regen_Mode = "1" --Basically switches from one mana regen system to another.
319
Secondary_Mana_Regen_Mode = "1" --Basically switches from one secondary mana regen system to another.
320
Stun_Lose_Mode = "1" --Basically switches from one secondary stun loss system to another.
321
Recover_Secondary_Mana = 0 --How much secondary mana you gain.
322
Lose_Stun = 0 --How much stun you lose.
323
Stun_Wait = 0 --Delay between losing stun.
324
Mana_Wait = 0 --Delay between gaining mana.
325
Secondary_Mana_Wait = 0 --Delay between gaining secondary mana.
326
Menu_Update_Speed = 0 --How fast the Weapon Gui will update.
327
Constant_Update = false --Removes the delay between updating the Weapon GUI.
328
Show_Stats = false --Hides or shows stats.
329
Stat_Offset = 0.74 --For cosmetic purposes. {0.74, 0.78}
330
331
--//=================================\\
332
--|| 	  END OF CUSTOMIZATION
333
--\\=================================//
334
335
336
337
338
339
--//=================================\\
340
--|| 	      USEFUL VALUES
341
--\\=================================//
342
343
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
344
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
345
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
346
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
347
local CO1 = 0
348
local CO2 = 0
349
local CO3 = 0
350
local CO4 = 0
351
local CHANGEDEFENSE = 0
352
local CHANGEDAMAGE = 0
353
local CHANGEMOVEMENT = 0
354
local ANIM = "Idle"
355
local ATTACK = false
356
local EQUIPPED = false
357
local HOLD = false
358
local COMBO = 4
359
local LASTPOINT = nil
360
local BLCF = nil
361
local SCFR = nil
362
local STAGGERHITANIM = false
363
local STAGGERANIM = false
364
local STUNANIM = false
365
local CRITCHANCENUMBER = 0
366
local IDLENUMBER = 0
367
local DONUMBER = 0
368
local HANDIDLE = false
369
local SINE = 0
370
local CHANGE = 2 / Animation_Speed
371
local WALKINGANIM = false
372
local WALK = 0
373
local DISABLEJUMPING = false
374
local HASBEENBLOCKED = false
375
local STUNDELAYNUMBER = 0
376
local MANADELAYNUMBER = 0
377
local SECONDARYMANADELAYNUMBER = 0
378
local ROBLOXIDLEANIMATION = IT("Animation")
379
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
380
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
381
--ROBLOXIDLEANIMATION.Parent = Humanoid
382
local WEAPONGUI = IT("ScreenGui", nil)
383
WEAPONGUI.Name = "Weapon GUI"
384
local WEAPONTOOL = IT("HopperBin", nil)
385
WEAPONTOOL.Name = Weapon_Name
386
local Weapon = IT("Model")
387
Weapon.Name = Weapon_Name
388
local Effects = IT("Folder", Weapon)
389
Effects.Name = "Effects"
390
local ANIMATOR = Humanoid.Animator
391
local ANIMATE = Character.Animate
392
local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
393
local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
394
local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
395
local HITBLOCKSOUNDS = {"199148933", "199148947"}
396
397
--//=================================\\
398
--\\=================================//
399
400
401
402
403
404
--//=================================\\
405
--||			  STATS
406
--\\=================================//
407
408
if Character:FindFirstChild("Stats") ~= nil then
409
Character:FindFirstChild("Stats").Parent = nil
410
end
411
412
local Stats = IT("Folder", nil)
413
Stats.Name = "Stats"
414
local ChangeStat = IT("Folder", Stats)
415
ChangeStat.Name = "ChangeStat"
416
local Defense = IT("NumberValue", Stats)
417
Defense.Name = "Defense"
418
Defense.Value = 1
419
local Movement = IT("NumberValue", Stats)
420
Movement.Name = "Movement"
421
Movement.Value = 1
422
local Damage = IT("NumberValue", Stats)
423
Damage.Name = "Damage"
424
Damage.Value = 1
425
local Mana = IT("NumberValue", Stats)
426
Mana.Name = "Mana"
427
Mana.Value = 0
428
local SecondaryMana = IT("NumberValue", Stats)
429
SecondaryMana.Name = "SecondaryMana"
430
SecondaryMana.Value = 0
431
local CanCrit = IT("BoolValue", Stats)
432
CanCrit.Name = "CanCrit"
433
CanCrit.Value = false
434
local CritChance = IT("NumberValue", Stats)
435
CritChance.Name = "CritChance"
436
CritChance.Value = 20
437
local CanPenetrateArmor = IT("BoolValue", Stats)
438
CanPenetrateArmor.Name = "CanPenetrateArmor"
439
CanPenetrateArmor.Value = false
440
local AntiTeamKill = IT("BoolValue", Stats)
441
AntiTeamKill.Name = "AntiTeamKill"
442
AntiTeamKill.Value = false
443
local Rooted = IT("BoolValue", Stats)
444
Rooted.Name = "Rooted"
445
Rooted.Value = false
446
local Block = IT("BoolValue", Stats)
447
Block.Name = "Block"
448
Block.Value = false
449
local RecentEnemy = IT("ObjectValue", Stats)
450
RecentEnemy.Name = "RecentEnemy"
451
RecentEnemy.Value = nil
452
local StaggerHit = IT("BoolValue", Stats)
453
StaggerHit.Name = "StaggerHit"
454
StaggerHit.Value = false
455
local Stagger = IT("BoolValue", Stats)
456
Stagger.Name = "Stagger"
457
Stagger.Value = false
458
local Stun = IT("BoolValue", Stats)
459
Stun.Name = "Stun"
460
Stun.Value = false
461
local StunValue = IT("NumberValue", Stats)
462
StunValue.Name = "StunValue"
463
StunValue.Value = 0
464
465
if Enable_Stats == true and Put_Stats_In_Character == true then
466
	Stats.Parent = Character
467
end
468
469
--//=================================\\
470
--\\=================================//
471
472
473
474
475
476
--//=================================\\
477
--|| 	     DEBUFFS / BUFFS
478
--\\=================================//
479
480
local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
481
DEFENSECHANGE1.Name = "ChangeDefense"
482
DEFENSECHANGE1.Value = 0
483
484
local MOVEMENTCHANGE1 = IT("NumberValue", nil)
485
MOVEMENTCHANGE1.Name = "ChangeMovement"
486
MOVEMENTCHANGE1.Value = 0
487
488
--//=================================\\
489
--\\=================================//
490
491
492
493
494
495
--//=================================\\
496
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
497
--\\=================================//
498
499
ArtificialHB = Instance.new("BindableEvent", script)
500
ArtificialHB.Name = "ArtificialHB"
501
502
script:WaitForChild("ArtificialHB")
503
504
frame = Frame_Speed
505
tf = 0
506
allowframeloss = false
507
tossremainder = false
508
lastframe = tick()
509
script.ArtificialHB:Fire()
510
511
game:GetService("RunService").Heartbeat:connect(function(s, p)
512
	tf = tf + s
513
	if tf >= frame then
514
		if allowframeloss then
515
			script.ArtificialHB:Fire()
516
			lastframe = tick()
517
		else
518
			for i = 1, math.floor(tf / frame) do
519
				script.ArtificialHB:Fire()
520
			end
521
		lastframe = tick()
522
		end
523
		if tossremainder then
524
			tf = 0
525
		else
526
			tf = tf - frame * math.floor(tf / frame)
527
		end
528
	end
529
end)
530
531
--//=================================\\
532
--\\=================================//
533
534
535
536
537
538
--//=================================\\
539
--|| 	      SOME FUNCTIONS
540
--\\=================================//
541
542
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
543
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
544
end
545
546
function PositiveAngle(NUMBER)
547
	if NUMBER >= 0 then
548
		NUMBER = 0
549
	end
550
	return NUMBER
551
end
552
553
function NegativeAngle(NUMBER)
554
	if NUMBER <= 0 then
555
		NUMBER = 0
556
	end
557
	return NUMBER
558
end
559
560
function Swait(NUMBER)
561
	if NUMBER == 0 or NUMBER == nil then
562
		ArtificialHB.Event:wait()
563
	else
564
		for i = 1, NUMBER do
565
			ArtificialHB.Event:wait()
566
		end
567
	end
568
end
569
570
function QuaternionFromCFrame(cf)
571
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
572
	local trace = m00 + m11 + m22
573
	if trace > 0 then 
574
		local s = math.sqrt(1 + trace)
575
		local recip = 0.5 / s
576
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
577
	else
578
		local i = 0
579
		if m11 > m00 then
580
			i = 1
581
		end
582
		if m22 > (i == 0 and m00 or m11) then
583
			i = 2
584
		end
585
		if i == 0 then
586
			local s = math.sqrt(m00 - m11 - m22 + 1)
587
			local recip = 0.5 / s
588
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
589
		elseif i == 1 then
590
			local s = math.sqrt(m11 - m22 - m00 + 1)
591
			local recip = 0.5 / s
592
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
593
		elseif i == 2 then
594
			local s = math.sqrt(m22 - m00 - m11 + 1)
595
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
596
		end
597
	end
598
end
599
 
600
function QuaternionToCFrame(px, py, pz, x, y, z, w)
601
	local xs, ys, zs = x + x, y + y, z + z
602
	local wx, wy, wz = w * xs, w * ys, w * zs
603
	local xx = x * xs
604
	local xy = x * ys
605
	local xz = x * zs
606
	local yy = y * ys
607
	local yz = y * zs
608
	local zz = z * zs
609
	return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
610
end
611
 
612
function QuaternionSlerp(a, b, t)
613
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
614
	local startInterp, finishInterp;
615
	if cosTheta >= 0.0001 then
616
		if (1 - cosTheta) > 0.0001 then
617
			local theta = ACOS(cosTheta)
618
			local invSinTheta = 1 / SIN(theta)
619
			startInterp = SIN((1 - t) * theta) * invSinTheta
620
			finishInterp = SIN(t * theta) * invSinTheta
621
		else
622
			startInterp = 1 - t
623
			finishInterp = t
624
		end
625
	else
626
		if (1 + cosTheta) > 0.0001 then
627
			local theta = ACOS(-cosTheta)
628
			local invSinTheta = 1 / SIN(theta)
629
			startInterp = SIN((t - 1) * theta) * invSinTheta
630
			finishInterp = SIN(t * theta) * invSinTheta
631
		else
632
			startInterp = t - 1
633
			finishInterp = t
634
		end
635
	end
636
	return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
637
end
638
639
function Clerp(a, b, t)
640
	local qa = {QuaternionFromCFrame(a)}
641
	local qb = {QuaternionFromCFrame(b)}
642
	local ax, ay, az = a.x, a.y, a.z
643
	local bx, by, bz = b.x, b.y, b.z
644
	local _t = 1 - t
645
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
646
end
647
648
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
649
	local frame = IT("Frame")
650
	frame.BackgroundTransparency = TRANSPARENCY
651
	frame.BorderSizePixel = BORDERSIZEPIXEL
652
	frame.Position = POSITION
653
	frame.Size = SIZE
654
	frame.BackgroundColor3 = COLOR
655
	frame.BorderColor3 = BORDERCOLOR
656
	frame.Name = NAME
657
	frame.Parent = PARENT
658
	return frame
659
end
660
661
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
662
	local label = IT("TextLabel")
663
	label.BackgroundTransparency = 1
664
	label.Size = UD2(1, 0, 1, 0)
665
	label.Position = UD2(0, 0, 0, 0)
666
	label.TextColor3 = C3(255, 255, 255)
667
	label.TextStrokeTransparency = STROKETRANSPARENCY
668
	label.TextTransparency = TRANSPARENCY
669
	label.FontSize = TEXTFONTSIZE
670
	label.Font = TEXTFONT
671
	label.BorderSizePixel = BORDERSIZEPIXEL
672
	label.TextScaled = true
673
	label.Text = TEXT
674
	label.Name = NAME
675
	label.Parent = PARENT
676
	return label
677
end
678
679
function NoOutlines(PART)
680
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
681
end
682
683
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
684
	local NEWPART = IT("Part")
685
	NEWPART.formFactor = FORMFACTOR
686
	NEWPART.Reflectance = REFLECTANCE
687
	NEWPART.Transparency = TRANSPARENCY
688
	NEWPART.CanCollide = false
689
	NEWPART.Locked = true
690
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
691
	NEWPART.Name = NAME
692
	NEWPART.Size = SIZE
693
	NEWPART.Position = Torso.Position
694
	NoOutlines(NEWPART)
695
	NEWPART.Material = MATERIAL
696
	NEWPART:BreakJoints()
697
	NEWPART.Parent = PARENT
698
	return NEWPART
699
end
700
701
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
702
	local NEWMESH = IT(MESH)
703
	if MESH == "SpecialMesh" then
704
		NEWMESH.MeshType = MESHTYPE
705
		if MESHID ~= "nil" and MESHID ~= "" then
706
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id=53351910"
707
		end
708
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
709
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id=53352041"
710
		end
711
	end
712
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
713
	NEWMESH.Scale = Vector3.new(1,-1.15,1)
714
	NEWMESH.Parent = PARENT
715
	return NEWMESH
716
end
717
718
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
719
	local NEWWELD = IT(TYPE)
720
	NEWWELD.Part0 = PART0
721
	NEWWELD.Part1 = PART1
722
	NEWWELD.C0 = C0
723
	NEWWELD.C1 = C1
724
	NEWWELD.Parent = PARENT
725
	return NEWWELD
726
end
727
728
function CreateSound(ID, PARENT, VOLUME, PITCH)
729
	coroutine.resume(coroutine.create(function()
730
		local NEWSOUND = IT("Sound", PARENT)
731
		NEWSOUND.Volume = VOLUME
732
		NEWSOUND.Pitch = PITCH
733
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
734
		Swait()
735
		NEWSOUND:play()
736
		game:GetService("Debris"):AddItem(NEWSOUND, 10)
737
	end))
738
end
739
740
function CFrameFromTopBack(at, top, back)
741
	local right = top:Cross(back)
742
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
743
end
744
745
function Lightning(POSITION1, POSITION2, MULTIPLIERTIME, LIGHTNINGDELAY, OFFSET, BRICKCOLOR, MATERIAL, SIZE, TRANSPARENCY, LASTINGTIME)
746
	local MAGNITUDE = (POSITION1 - POSITION2).magnitude 
747
	local CURRENTPOSITION = POSITION1
748
	local LIGHTNINGOFFSET = {-OFFSET, OFFSET}
749
	coroutine.resume(coroutine.create(function()
750
		for i = 1, MULTIPLIERTIME do 
751
			local LIGHTNINGPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR,"Effect", VT(SIZE * Player_Size, SIZE * Player_Size, MAGNITUDE / MULTIPLIERTIME))
752
			LIGHTNINGPART.Anchored = true
753
			local LIGHTNINGOFFSET2 = VT(LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)]) 
754
			local LIGHTNINGPOSITION1 = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME).p + LIGHTNINGOFFSET2
755
			if MULTIPLIERTIME == i then 
756
				local LIGHTNINGMAGNITUDE1 = (CURRENTPOSITION - POSITION2).magnitude
757
				LIGHTNINGPART.Size = VT(SIZE * Player_Size, SIZE * Player_Size, LIGHTNINGMAGNITUDE1)
758
				LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, -LIGHTNINGMAGNITUDE1 / 2)
759
			else
760
				LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, LIGHTNINGPOSITION1) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2)
761
			end
762
			CURRENTPOSITION=LIGHTNINGPART.CFrame * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2).p
763
			game.Debris:AddItem(LIGHTNINGPART, LASTINGTIME)
764
			coroutine.resume(coroutine.create(function()
765
				while LIGHTNINGPART.Transparency ~= 1 do
766
					--local StartTransparency = tra
767
					for i=0, 1, LASTINGTIME do
768
						Swait()
769
						LIGHTNINGPART.Transparency = LIGHTNINGPART.Transparency + (0.1 / LASTINGTIME)
770
					end
771
				end
772
			end))
773
		Swait(LIGHTNINGDELAY / Animation_Speed)
774
		end
775
	end))
776
end
777
778
function MagicBlock(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
779
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
780
	EFFECTPART.Anchored = true
781
	EFFECTPART.CFrame = CFRAME
782
	local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
783
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
784
	coroutine.resume(coroutine.create(function(PART, MESH)
785
		for i = 0, 1, delay do
786
			Swait()
787
			PART.CFrame = PART.CFrame * ROTATION
788
			PART.Transparency = i
789
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
790
		end
791
		PART.Parent = nil
792
	end), EFFECTPART, EFFECTMESH)
793
end
794
795
function MagicSphere(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
796
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
797
	EFFECTPART.Anchored = true
798
	EFFECTPART.CFrame = CFRAME
799
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Sphere", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
800
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
801
	coroutine.resume(coroutine.create(function(PART, MESH)
802
		for i = 0, 1, delay do
803
			Swait()
804
			PART.CFrame = PART.CFrame * ROTATION
805
			PART.Transparency = i
806
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
807
		end
808
		PART.Parent = nil
809
	end), EFFECTPART, EFFECTMESH)
810
end
811
812
function MagicCylinder(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
813
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
814
	EFFECTPART.Anchored = true
815
	EFFECTPART.CFrame = CFRAME
816
	local EFFECTMESH = CreateMesh("CylinderMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
817
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
818
	coroutine.resume(coroutine.create(function(PART, MESH)
819
		for i = 0, 1, delay do
820
			Swait()
821
			PART.CFrame = PART.CFrame * ROTATION
822
			PART.Transparency = i
823
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
824
		end
825
		PART.Parent = nil
826
	end), EFFECTPART, EFFECTMESH)
827
end
828
829
function MagicHead(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
830
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
831
	EFFECTPART.Anchored = true
832
	EFFECTPART.CFrame = CFRAME
833
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Head", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
834
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
835
	coroutine.resume(coroutine.create(function(PART, MESH)
836
		for i = 0, 1, delay do
837
			Swait()
838
			PART.CFrame = PART.CFrame * ROTATION
839
			PART.Transparency = i
840
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
841
		end
842
		PART.Parent = nil
843
	end), EFFECTPART, EFFECTMESH)
844
end
845
846
function MagicRing(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
847
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
848
	EFFECTPART.Anchored = true
849
	EFFECTPART.CFrame = CFRAME
850
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "3270017", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
851
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
852
	coroutine.resume(coroutine.create(function(PART, MESH)
853
		for i = 0, 1, delay do
854
			Swait()
855
			PART.CFrame = PART.CFrame * ROTATION
856
			PART.Transparency = i
857
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
858
		end
859
		PART.Parent = nil
860
	end), EFFECTPART, EFFECTMESH)
861
end
862
863
function MagicWave(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
864
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
865
	EFFECTPART.Anchored = true
866
	EFFECTPART.CFrame = CFRAME
867
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "20329976", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), VT(0, 0, (-0.1 * Z1)) + (OFFSET * Player_Size))
868
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
869
	coroutine.resume(coroutine.create(function(PART, MESH)
870
		for i = 0, 1, delay do
871
			Swait()
872
			PART.CFrame = PART.CFrame * ROTATION
873
			PART.Transparency = i
874
			MESH.Offset = VT(0, 0, (-0.1 * MESH.Scale.Z))
875
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
876
		end
877
		PART.Parent = nil
878
	end), EFFECTPART, EFFECTMESH)
879
end
880
881
function MagicCrystal(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
882
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
883
	EFFECTPART.Anchored = true
884
	EFFECTPART.CFrame = CFRAME
885
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "9756362", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
886
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
887
	coroutine.resume(coroutine.create(function(PART, MESH)
888
		for i = 0, 1, delay do
889
			Swait()
890
			PART.CFrame = PART.CFrame * ROTATION
891
			PART.Transparency = i
892
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
893
		end
894
		PART.Parent = nil
895
	end), EFFECTPART, EFFECTMESH)
896
end
897
898
function MagicSwirl(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
899
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
900
	EFFECTPART.Anchored = true
901
	EFFECTPART.CFrame = CFRAME
902
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1051557", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
903
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
904
	coroutine.resume(coroutine.create(function(PART, MESH)
905
		for i = 0, 1, delay do
906
			Swait()
907
			PART.CFrame = PART.CFrame * ROTATION
908
			PART.Transparency = i
909
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
910
		end
911
		PART.Parent = nil
912
	end), EFFECTPART, EFFECTMESH)
913
end
914
915
function MagicSharpCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
916
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
917
	EFFECTPART.Anchored = true
918
	EFFECTPART.CFrame = CFRAME
919
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1778999", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
920
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
921
	coroutine.resume(coroutine.create(function(PART, MESH)
922
		for i = 0, 1, delay do
923
			Swait()
924
			PART.CFrame = PART.CFrame * ROTATION
925
			PART.Transparency = i
926
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
927
		end
928
		PART.Parent = nil
929
	end), EFFECTPART, EFFECTMESH)
930
end
931
932
function MagicFlatCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
933
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
934
	EFFECTPART.Anchored = true
935
	EFFECTPART.CFrame = CFRAME
936
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1033714", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
937
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
938
	coroutine.resume(coroutine.create(function(PART, MESH)
939
		for i = 0, 1, delay do
940
			Swait()
941
			PART.CFrame = PART.CFrame * ROTATION
942
			PART.Transparency = i
943
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
944
		end
945
		PART.Parent = nil
946
	end), EFFECTPART, EFFECTMESH)
947
end
948
949
function MagicSpikedCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
950
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
951
	EFFECTPART.Anchored = true
952
	EFFECTPART.CFrame = CFRAME
953
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1323306", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
954
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
955
	coroutine.resume(coroutine.create(function(PART, MESH)
956
		for i = 0, 1, delay do
957
			Swait()
958
			PART.CFrame = PART.CFrame * ROTATION
959
			PART.Transparency = i
960
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
961
		end
962
		PART.Parent = nil
963
	end), EFFECTPART, EFFECTMESH)
964
end
965
966
function MagicFlatCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
967
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
968
	EFFECTPART.Anchored = true
969
	EFFECTPART.CFrame = CFRAME
970
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1078075", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
971
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
972
	coroutine.resume(coroutine.create(function(PART, MESH)
973
		for i = 0, 1, delay do
974
			Swait()
975
			PART.CFrame = PART.CFrame * ROTATION
976
			PART.Transparency = i
977
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
978
		end
979
		PART.Parent = nil
980
	end), EFFECTPART, EFFECTMESH)
981
end
982
983
function MagicSkull(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay)
984
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
985
	EFFECTPART.Anchored = true
986
	EFFECTPART.CFrame = CFRAME
987
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size)
988
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
989
	coroutine.resume(coroutine.create(function(PART, MESH)
990
		for i = 0, 1, delay do
991
			Swait()
992
			PART.CFrame = PART.CFrame * ROTATION
993
			PART.Transparency = i
994
			MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size)
995
		end
996
		PART.Parent = nil
997
	end), EFFECTPART, EFFECTMESH)
998
end
999
1000
function ElectricEffect(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X, Y, Z, delay)
1001
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT())
1002
	EFFECTPART.Anchored = true
1003
	EFFECTPART.CFrame = CFRAME
1004
	local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X * Player_Size, Y * Player_Size, Z * Player_Size), OFFSET * Player_Size)
1005
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
1006
	local XVALUE = MRANDOM()
1007
	local YVALUE = MRANDOM()
1008
	local ZVALUE = MRANDOM()
1009
	coroutine.resume(coroutine.create(function(PART, MESH, THEXVALUE, THEYVALUE, THEZVALUE)
1010
		for i = 0, 1, delay do
1011
			Swait()
1012
			PART.CFrame = PART.CFrame * ROTATION
1013
			PART.Transparency = i
1014
			THEXVALUE = THEXVALUE - 0.1 * (delay * 10)
1015
			THEYVALUE = THEYVALUE - 0.1 * (delay * 10)
1016
			THEZVALUE = THEZVALUE - 0.1 * (delay * 10)
1017
			MESH.Scale = MESH.Scale + VT(THEXVALUE * Player_Size, THEYVALUE * Player_Size, THEZVALUE * Player_Size)
1018
		end
1019
		PART.Parent = nil
1020
	end), EFFECTPART, EFFECTMESH, XVALUE, YVALUE, ZVALUE)
1021
end
1022
1023
function TrailEffect(BRICKCOLOR, MATERIAL, CURRENTCFRAME, OLDCFRAME, MESHTYPE, REFLECTANCE, SIZE, ROTATION, X, Y, Z, delay)
1024
	local MAGNITUDECFRAME = (CURRENTCFRAME.p - OLDCFRAME.p).magnitude
1025
	if MAGNITUDECFRAME > (1 / 100) then
1026
		local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT(1, MAGNITUDECFRAME, 1))
1027
		EFFECTPART.Anchored = true
1028
		EFFECTPART.CFrame = CF((CURRENTCFRAME.p + OLDCFRAME.p) / 2, OLDCFRAME.p) * ANGLES(RAD(90), 0, 0)
1029
		local THEMESHTYPE = "BlockMesh"
1030
		if MESHTYPE == "Cylinder" then
1031
			THEMESHTYPE = "CylinderMesh"
1032
		end
1033
		local EFFECTMESH = CreateMesh(THEMESHTYPE, EFFECTPART, "", "", "", VT(0 + SIZE * Player_Size, 1, 0 + SIZE * Player_Size), VT(0, 0, 0))
1034
		game:GetService("Debris"):AddItem(EFFECTPART, 10)
1035
		coroutine.resume(coroutine.create(function(PART, MESH)
1036
			for i = 0, 1, delay do
1037
				Swait()
1038
				PART.CFrame = PART.CFrame * ROTATION
1039
				PART.Transparency = i
1040
				MESH.Scale = MESH.Scale + VT(X * Player_Size, Y * Player_Size, Z * Player_Size)
1041
			end
1042
			PART.Parent = nil
1043
		end), EFFECTPART, EFFECTMESH)
1044
	end
1045
end
1046
1047
function ClangEffect(BRICKCOLOR, MATERIAL, CFRAME, ANGLE, DURATION, SIZE, POWER, REFLECTANCE, X, Y, Z, delay)
1048
	local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 1, BRICKCOLOR, "Effect", VT())
1049
	EFFECTPART.Anchored = true
1050
	EFFECTPART.CFrame = CFRAME
1051
	local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(0, 0, 0), VT(0, 0, 0))
1052
	game:GetService("Debris"):AddItem(EFFECTPART, 10)
1053
	local THELASTPOINT = CFRAME
1054
	coroutine.resume(coroutine.create(function(PART)
1055
		for i = 1, DURATION do
1056
			Swait()
1057
			PART.CFrame = PART.CFrame * ANGLES(RAD(ANGLE), 0, 0) * CF(0, POWER * Player_Size, 0)
1058
			TrailEffect(BRICKCOLOR, MATERIAL, PART.CFrame, THELASTPOINT, "Cylinder", REFLECTANCE, SIZE * Player_Size, ANGLES(0, 0, 0), X * Player_Size, Y * Player_Size, Z * Player_Size, delay)
1059
			THELASTPOINT = PART.CFrame
1060
		end
1061
		PART.Parent = nil
1062
	end), EFFECTPART)
1063
end
1064
1065
--local list={}
1066
function Triangle(Color, Material, a, b, c, delay)
1067
	local edge1 = (c - a):Dot((b - a).unit)
1068
	local edge2 = (a - b):Dot((c - b).unit)
1069
	local edge3 = (b - c):Dot((a - c).unit)
1070
	if edge1 <= (b - a).magnitude and edge1 >= 0 then
1071
		a, b, c=a, b, c
1072
	elseif edge2 <= (c - b).magnitude and edge2 >= 0 then
1073
		a, b, c=b, c, a
1074
	elseif edge3 <= (a - c).magnitude and edge3 >= 0 then
1075
		a, b, c=c, a, b
1076
	else
1077
		assert(false, "unreachable")
1078
	end
1079
	local len1 = (c - a):Dot((b - a).unit)
1080
	local len2 = (b - a).magnitude - len1
1081
	local width = (a + (b - a).unit * len1 - c).magnitude
1082
	local maincf = CFrameFromTopBack(a, (b - a):Cross(c - b).unit, - (b - a).unit)
1083
	if len1 > 1 / 100 then
1084
		local sz = VT(0.2, width, len1)
1085
		local w1 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz)
1086
		local sp = CreateMesh("SpecialMesh", w1, "Wedge", "", "", VT(0, 1, 1) * sz / w1.Size, VT(0, 0, 0))
1087
		w1.Anchored = true
1088
		w1.CFrame = maincf * ANGLES(math.pi, 0, math.pi / 2) * CF(0, width / 2, len1 / 2)
1089
		coroutine.resume(coroutine.create(function()
1090
			for i = 0.5, 1, delay * (2 / Animation_Speed) do
1091
				Swait()
1092
				w1.Transparency = i
1093
			end
1094
			w1.Parent = nil
1095
		end))
1096
		game:GetService("Debris"):AddItem(w1, 10)
1097
		--table.insert(list, w1)
1098
	end
1099
	if len2 > 1 / 100 then
1100
		local sz = VT(0.2, width, len2)
1101
		local w2 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz)
1102
		local sp = CreateMesh("SpecialMesh", w2, "Wedge", "", "", VT(0, 1, 1) * sz / w2.Size, VT(0, 0, 0))
1103
		w2.Anchored = true
1104
		w2.CFrame = maincf * ANGLES(math.pi, math.pi, -math.pi / 2) * CF(0, width / 2, -len1 - len2 / 2)
1105
		coroutine.resume(coroutine.create(function()
1106
			for i = 0.5, 1, delay * (2 / Animation_Speed) do
1107
				Swait()
1108
				w2.Transparency = i
1109
			end
1110
			w2.Parent = nil
1111
		end))
1112
		game:GetService("Debris"):AddItem(w2, 10)
1113
		--table.insert(list, w2)
1114
	end
1115
	--return unpack(list)
1116
end
1117
1118
--[[Usage:
1119
	local Pos = Part
1120
	local Offset = Part.CFrame * CF(0, 0, 0)
1121
	local Color = "Institutional white"
1122
	local Material = "Neon"
1123
	local TheDelay = 0.01
1124
	local Height = 4
1125
	BLCF = Offset
1126
	if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then
1127
		local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay)
1128
		if a then game:GetService("Debris"):AddItem(a, 1) end
1129
		if b then game:GetService("Debris"):AddItem(b, 1) end
1130
		local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay)
1131
		if a then game:GetService("Debris"):AddItem(a, 1) end
1132
		if b then game:GetService("Debris"):AddItem(b, 1) end
1133
		SCFR = BLCF
1134
	elseif not SCFR then
1135
		SCFR = BLCF
1136
	end
1137
--
1138
BLCF = nil
1139
SCFR = nil
1140
--]]
1141
1142
--//=================================\\
1143
--\\=================================//
1144
1145
1146
1147
1148
1149
--//=================================\\
1150
--||	      RESIZE PLAYER
1151
--\\=================================//
1152
1153
if Player_Size ~= 1 then
1154
RootPart.Size = RootPart.Size * Player_Size
1155
Torso.Size = Torso.Size * Player_Size
1156
Head.Size = Head.Size * Player_Size
1157
RightArm.Size = RightArm.Size * Player_Size
1158
LeftArm.Size = LeftArm.Size * Player_Size
1159
RightLeg.Size = RightLeg.Size * Player_Size
1160
LeftLeg.Size = LeftLeg.Size * Player_Size
1161
RootJoint.Parent = RootPart
1162
Neck.Parent = Torso
1163
RightShoulder.Parent = Torso
1164
LeftShoulder.Parent = Torso
1165
RightHip.Parent = Torso
1166
LeftHip.Parent = Torso
1167
	
1168
RootJoint.C0 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
1169
	RootJoint.C1 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
1170
	Neck.C0 = NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0))
1171
	Neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180))
1172
	RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0
1173
	LeftShoulder.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0
1174
	if Disable_Moving_Arms == false then
1175
		RightShoulder.C1 = ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5)
1176
		LeftShoulder.C1 = ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5)
1177
	else
1178
		RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
1179
		LeftShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
1180
	end
1181
	RightHip.C0 = CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
1182
	LeftHip.C0 = CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
1183
	RightHip.C1 = CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
1184
	LeftHip.C1 = CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
1185
end
1186
1187
1188
--//=================================\\
1189
--\\=================================//
1190
1191
1192
1193
1194
1195
--//=================================\\
1196
--||	     WEAPON CREATION
1197
--\\=================================//
1198
1199
local HandlePart = CreatePart(3, Weapon, "Granite", 0, 0, "Really black", "Handle", VT(0, 0, 0))
1200
local HandleMesh = CreateMesh("SpecialMesh", HandlePart, "FileMesh", "93180631", "93180676", VT(1, 1, 1), VT(0, 3.1 * Player_Size, 0))
1201
local HandleWeld = CreateWeldOrSnapOrMotor("Weld", HandlePart, Torso, HandlePart, CF(2 * Player_Size, 2 * Player_Size, 0.6 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(135)), CF(0, 0, 0))
1202
1203
local HitboxPart = CreatePart(3, Weapon, "Granite", 0, 1, "Really black", "Hitbox", VT(0, 0, 0))
1204
local HitboxWeld = CreateWeldOrSnapOrMotor("Weld", HitboxPart, HandlePart, HitboxPart, CF(0 * Player_Size, 4 * Player_Size, 0 * Player_Size), CF(0, 0, 0))
1205
1206
local EffectPart = CreatePart(3, Weapon, "Granite", 0, 1, "Really black", "Effect Part", VT(0, 0, 0))
1207
local EffectWeld = CreateWeldOrSnapOrMotor("Weld", EffectPart, HandlePart, EffectPart, CF(0 * Player_Size, 7 * Player_Size, 0 * Player_Size), CF(0, 0, 0))
1208
1209
if Player_Size ~= 1 then
1210
	for _, v in pairs (Weapon:GetChildren()) do
1211
		if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then
1212
			local p1 = v.Part1
1213
			v.Part1 = nil
1214
			local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components()
1215
			v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
1216
			v.Part1 = p1
1217
		elseif v.ClassName == "Part" then
1218
			for _, b in pairs (v:GetChildren()) do
1219
				if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then
1220
					b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size)
1221
				end
1222
			end
1223
		end
1224
	end
1225
end
1226
1227
for _, c in pairs(Weapon:GetChildren()) do
1228
	if c.ClassName == "Part" then
1229
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
1230
	end
1231
end
1232
1233
if Start_Equipped == true and Start_Equipped_With_Equipped_Animation == false then
1234
	HandleWeld.Part0 = RightArm
1235
	HandleWeld.C0 = CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
1236
end
1237
1238
Weapon.Parent = Character
1239
1240
Humanoid.Died:connect(function()
1241
	ATTACK = true
1242
end)
1243
1244
print(Class_Name.." loaded.")
1245
1246
--//=================================\\
1247
--\\=================================//
1248
1249
1250
1251
1252
1253
--//=================================\\
1254
--||	     DAMAGE FUNCTIONS
1255
--\\=================================//
1256
1257
function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
1258
	local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
1259
	STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
1260
	local BODYGYRO = IT("BodyGyro", STATPART)
1261
	local BODYPOSITION = IT("BodyPosition", STATPART)
1262
	BODYPOSITION.P = 2000
1263
	BODYPOSITION.D = 100
1264
	BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
1265
	if LABELTYPE == "Normal" then
1266
		BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
1267
	elseif LABELTYPE == "Debuff" then
1268
		BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2))
1269
	elseif LABELTYPE == "Interruption" then
1270
		BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2))
1271
	end
1272
	game:GetService("Debris"):AddItem(STATPART ,5)
1273
	local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
1274
	BILLBOARDGUI.Adornee = STATPART
1275
	BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
1276
	BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
1277
	BILLBOARDGUI.AlwaysOnTop = false
1278
	local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
1279
	TEXTLABEL.BackgroundTransparency = 1
1280
	TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
1281
	TEXTLABEL.Text = "INF"
1282
	TEXTLABEL.Font = "SourceSans"
1283
	TEXTLABEL.FontSize="Size42"
1284
	TEXTLABEL.TextColor3 = COLOR
1285
	TEXTLABEL.TextStrokeTransparency = 0
1286
	TEXTLABEL.TextScaled = true
1287
	TEXTLABEL.TextWrapped = true
1288
	coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
1289
		wait(0.2)
1290
		for i=1, 5 do
1291
			wait()
1292
			THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0)
1293
		end
1294
		wait(1.2)
1295
		for i=1, 5 do
1296
			wait()
1297
			THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2
1298
			THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2
1299
			THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0)
1300
		end
1301
		THEPART.Parent = nil
1302
	end),STATPART, BODYPOSITION, TEXTLABEL)
1303
end
1304
1305
function IncreaseOrDecreaseStat(LOCATION, STAT, AMOUNT, DURATION, SHOWTHESTAT)
1306
	if LOCATION:FindFirstChild("Stats") ~= nil then
1307
		if LOCATION.Stats:FindFirstChild("Block") ~= nil then
1308
			if LOCATION.Stats:FindFirstChild("Block").Value == true then
1309
				return
1310
			end
1311
		end
1312
		if LOCATION.Stats:FindFirstChild("ChangeStat") ~= nil and LOCATION.Stats:FindFirstChild("Block").Value == false then
1313
			local NewStatChange = IT("NumberValue")
1314
			NewStatChange.Value = AMOUNT
1315
			if STAT == "Defense" then
1316
				NewStatChange.Name = "ChangeDefense"
1317
			elseif STAT == "Damage" then
1318
				NewStatChange.Name = "ChangeDamage"
1319
			elseif STAT == "Movement" then
1320
				NewStatChange.Name = "ChangeMovement"
1321
			end
1322
			if SHOWTHESTAT == true then
1323
				if AMOUNT < 0 then
1324
					StatLabel("Debuff", LOCATION.Head.CFrame * CF(0, 0 + (LOCATION.Head.Size.z - 1), 0), "-"..STAT, C3(1, 1, 1))
1325
				elseif AMOUNT > 0 then
1326
					StatLabel("Debuff", LOCATION.Head.CFrame * CF(0, 0 + (LOCATION.Head.Size.z - 1), 0), "+"..STAT, C3(1, 1, 1))
1327
				end
1328
			end
1329
			if DURATION ~= nil and DURATION ~= 0 then
1330
				local StatDuration = IT("NumberValue")
1331
				StatDuration.Name = "Duration"
1332
				StatDuration.Value = DURATION
1333
				StatDuration.Parent = NewStatChange
1334
			end
1335
			NewStatChange.Parent = LOCATION.Stats:FindFirstChild("ChangeStat")
1336
		end
1337
	end
1338
end
1339
1340
--Usage: DamageFunction(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, hit, false, 5, 10, MRANDOM(5, 10), "Normal", Part, 0.5, false, true, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false)
1341
function DamageFunction(HITWEAPONSOUND, HITARMORSOUND, HITBLOCKSOUND, HITPLAYERSOUND, HITWEAPONSOUNDPITCH, HITARMORSOUNDPITCH, HITBLOCKSOUNDPITCH, HITPLAYERSOUNDPITCH, HIT, HITEVENWHENDEAD, MINIMUMDAMAGE, MAXIMUMDAMAGE, KNOCKBACK, TYPE, PROPERTY, DELAY, KNOCKBACKTYPE, INCREASESTUN, STAGGER, STAGGERHIT, RANGED, DECREASETHESTAT, DECREASEAMOUNT, DECREASEDURATION, SHOWDECREASEDSTAT)
1342
Humanoid.MaxHealth = "inf"
1343
Humanoid.Health = "inf"
1344
	if HIT.Parent == nil then
1345
		return
1346
	end
1347
	local HITHUMANOID = HIT.Parent:FindFirstChild("Humanoid")
1348
	for _, v in pairs(HIT.Parent:GetChildren()) do
1349
		if v:IsA("Humanoid") then
1350
			HITHUMANOID = v
1351
            HITHUMANOID.MaxHealth = 100
1352
		end
1353
	end
1354
	if HIT.Name == "Hitbox" and RANGED ~= true and HIT.Parent ~= Weapon and Enable_Stagger_Hit == true then
1355
		StaggerHit.Value = true
1356
		if Play_Hitbox_Hit_Sound == true then
1357
			if HITWEAPONSOUND ~= "" and HITWEAPONSOUND ~= "nil" then
1358
				CreateSound(HITWEAPONSOUND, HIT, 1, HITWEAPONSOUNDPITCH)
1359
			end
1360
		end
1361
		return
1362
	end
1363
	if HIT.Parent.Parent:FindFirstChild("Torso") ~= nil or HIT.Parent.Parent:FindFirstChild("UpperTorso") ~= nil then
1364
		HITHUMANOID = HIT.Parent.Parent:FindFirstChild("Humanoid")
1365
	end
1366
	if HIT.Parent.ClassName == "Hat" or HIT.ClassName == "Accessory" then
1367
		HIT = HIT.Parent.Parent:FindFirstChild("Head")
1368
	end
1369
	if HITHUMANOID ~= nil and HIT.Parent.Name ~= Character.Name and (HIT.Parent:FindFirstChild("Torso") ~= nil or HIT.Parent:FindFirstChild("UpperTorso") ~= nil) then
1370
		if HIT.Parent:FindFirstChild("DebounceHit") ~= nil then
1371
			if HIT.Parent.DebounceHit.Value == true then
1372
				return
1373
			end
1374
		end
1375
		if AntiTeamKill.Value == true then
1376
			if Player.Neutral == false and game.Players:GetPlayerFromCharacter(HIT.Parent) ~= nil then
1377
				if game.Players:GetPlayerFromCharacter(HIT.Parent).TeamColor == Player.TeamColor then
1378
					return
1379
				end
1380
			end
1381
		end
1382
		if HITEVENWHENDEAD == false then
1383
			if HIT.Parent:FindFirstChild("Humanoid") ~= nil then
1384
				if HIT.Parent:FindFirstChild("Humanoid").Health <= 0 then
1385
					return
1386
				end
1387
			end
1388
		end
1389
		if HIT.Parent:FindFirstChild("Stats") ~= nil then
1390
			if HIT.Parent.Stats:FindFirstChild("StunValue") ~= nil then
1391
				HIT.Parent.Stats:FindFirstChild("StunValue").Value = HIT.Parent.Stats:FindFirstChild("StunValue").Value + INCREASESTUN
1392
			end
1393
		end
1394
		if HIT.Parent:FindFirstChild("Stats") ~= nil then
1395
			if HIT.Parent.Stats:FindFirstChild("Stagger") ~= nil then
1396
				if STAGGER == true and Enable_Stagger == true then
1397
					HIT.Parent.Stats:FindFirstChild("Stagger").Value = true
1398
				end
1399
			end
1400
		end
1401
		if HIT.Parent:FindFirstChild("Stats") ~= nil then
1402
			if HIT.Parent.Stats:FindFirstChild("Block") ~= nil then
1403
				if HIT.Parent.Stats:FindFirstChild("Block").Value == true then
1404
					HASBEENBLOCKED = true
1405
					if HIT.Parent.Stats:FindFirstChild("Block"):FindFirstChild("BlockDebounce") == nil then
1406
						StatLabel("Interruption", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Blocked!", C3(0, 100 / 255, 255 / 255))
1407
						if RANGED ~= true then
1408
							if HITBLOCKSOUND ~= "" and HITBLOCKSOUND ~= "nil" then
1409
								CreateSound(HITBLOCKSOUND, HIT, 1, HITBLOCKSOUNDPITCH)
1410
							end
1411
						end
1412
						local BlockDebounce = IT("BoolValue", HIT.Parent.Stats:FindFirstChild("Block"))
1413
						BlockDebounce.Name = "BlockDebounce"
1414
						BlockDebounce.Value = true
1415
						if RANGED ~= true then
1416
							game:GetService("Debris"):AddItem(BlockDebounce, 0.5)
1417
						else
1418
							game:GetService("Debris"):AddItem(BlockDebounce, 0.1)
1419
						end
1420
					end
1421
					if RANGED ~= true and Enable_Stagger == true then
1422
						HIT.Parent.Stats:FindFirstChild("Block").Value = false
1423
						Stagger.Value = true
1424
					end
1425
					return
1426
				end
1427
			end
1428
		end
1429
		if DECREASETHESTAT ~= nil then
1430
			if HIT.Parent:FindFirstChild("Stats") ~= nil then
1431
				IncreaseOrDecreaseStat(HIT.Parent, DECREASETHESTAT, DECREASEAMOUNT, DECREASEDURATION, SHOWDECREASEDSTAT)
1432
			end
1433
		end
1434
		local DAMAGE = MRANDOM(MINIMUMDAMAGE,MAXIMUMDAMAGE) * Damage.Value
1435
		if HIT.Parent:FindFirstChild("Stats") ~= nil then
1436
			if HIT.Parent.Stats:FindFirstChild("Defense") ~= nil then
1437
				if CanPenetrateArmor.Value == true then
1438
					DAMAGE = DAMAGE
1439
				else
1440
					DAMAGE = DAMAGE / HIT.Parent.Stats:FindFirstChild("Defense").Value
1441
				end
1442
			elseif HIT.Parent.Stats:FindFirstChild("Defense") == nil then
1443
				DAMAGE = DAMAGE
1444
			end
1445
		end
1446
		if CanCrit.Value == true then
1447
			CRITCHANCENUMBER = MRANDOM(1, CritChance.Value)
1448
			if CRITCHANCENUMBER == 1 then
1449
				DAMAGE = DAMAGE * 2
1450
			end
1451
		end
1452
		DAMAGE = math.floor(DAMAGE)
1453
		if HASBEENBLOCKED == false then
1454
			HITHUMANOID.Health = HITHUMANOID.Health - DAMAGE
1455
		end
1456
		if DAMAGE <= 3 and HASBEENBLOCKED == false then
1457
			if STAGGERHIT == true and Enable_Stagger_Hit == true and RANGED ~= true then
1458
				StaggerHit.Value = true
1459
			end
1460
			if HITARMORSOUND ~= "" and HITARMORSOUND ~= "nil" then
1461
				CreateSound(HITARMORSOUND, HIT, 1, HITARMORSOUNDPITCH)
1462
			end
1463
		elseif DAMAGE > 3 and HASBEENBLOCKED == false then
1464
			if HITPLAYERSOUND ~= "" and HITPLAYERSOUND ~= "nil" then
1465
				CreateSound(HITPLAYERSOUND, HIT, 1, HITPLAYERSOUNDPITCH)
1466
			end
1467
		end
1468
		if DAMAGE > 3 and DAMAGE < 20 and HASBEENBLOCKED == false then
1469
			if CanCrit.Value == true and CRITCHANCENUMBER == 1 then
1470
				StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Crit! \n"..DAMAGE, C3(200/255, 0, 0))
1471
				CreateSound("296102734", HIT, 1, 1)
1472
			else
1473
				StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), DAMAGE, C3(255/255, 220/255, 0))
1474
			end
1475
		elseif DAMAGE >= 20 and HASBEENBLOCKED == false then
1476
			if CanCrit.Value == true and CRITCHANCENUMBER == 1 then
1477
				StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Crit! \n"..DAMAGE, C3(200/255, 0, 0))
1478
				CreateSound("296102734", HIT, 1, 1)
1479
			else
1480
				StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), DAMAGE, C3(255/255, 0, 0))
1481
			end
1482
		elseif DAMAGE <= 3 and HASBEENBLOCKED == false then
1483
			if CanCrit.Value == true and CRITCHANCENUMBER == 1 then
1484
				StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Crit! \n"..DAMAGE, C3(200/255, 0, 0))
1485
				CreateSound("296102734", HIT, 1, 1)
1486
			else
1487
				StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), DAMAGE, C3(225/255, 225/255, 225/255))
1488
			end
1489
		end
1490
		if TYPE == "Normal" then
1491
			local vp = IT("BodyVelocity")
1492
			vp.P=500
1493
			vp.maxForce = VT(math.huge, 0, math.huge)
1494
			if KNOCKBACKTYPE == 1 then
1495
				vp.Velocity = PROPERTY.CFrame.lookVector * KNOCKBACK + PROPERTY.Velocity / 1.05
1496
			elseif KNOCKBACKTYPE == 2 then
1497
				vp.Velocity = PROPERTY.CFrame.lookVector * KNOCKBACK
1498
			end
1499
			if KNOCKBACK > 0 and HASBEENBLOCKED == false then
1500
				vp.Parent = HIT--.Parent.Torso
1501
			end
1502
			game:GetService("Debris"):AddItem(vp, 0.5)
1503
		end
1504
		HASBEENBLOCKED = false
1505
		RecentEnemy.Value = HIT.Parent
1506
		local DebounceHit = IT("BoolValue", HIT.Parent)
1507
		DebounceHit.Name = "DebounceHit"
1508
		DebounceHit.Value = true
1509
		game:GetService("Debris"):AddItem(DebounceHit, DELAY)
1510
	end
1511
    reap(HIT.Parent)
1512
end
1513
1514
--Usage: MagnitudeDamage(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, Part, 5, true, 5, 10, MRANDOM(5, 10), "Normal", Part, 0.5, false, true, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false)
1515
function MagnitudeDamage(HITWEAPONSOUND, HITARMORSOUND, HITBLOCKSOUND, HITPLAYERSOUND, HITWEAPONSOUNDPITCH, HITARMORSOUNDPITCH, HITBLOCKSOUNDPITCH, HITPLAYERSOUNDPITCH, PART, MAGNITUDE, HITEVENWHENDEAD, MINIMUMDAMAGE, MAXIMUMDAMAGE, KNOCKBACK, TYPE, PROPERTY, DELAY, KNOCKBACKTYPE, INCREASESTUN, STAGGER, STAGGERHIT, RANGED, MAGNITUDEDECREASETHESTAT, MAGNITUDEDECREASEAMOUNT, MAGNITUDEDECREASEDURATION, MAGNITUDESHOWDECREASEDSTAT)
1516
	for _, c in pairs(workspace:GetChildren()) do
1517
		local HUMANOID = c:FindFirstChild("Humanoid")
1518
		local HEAD = nil
1519
		if HUMANOID ~= nil then
1520
			for _, d in pairs(c:GetChildren()) do
1521
				if d.ClassName == "Model" and RANGED ~= true then
1522
					HEAD = d:FindFirstChild("Hitbox")
1523
					if HEAD ~= nil then
1524
						local THEMAGNITUDE = (HEAD.Position - PART.Position).magnitude
1525
						if THEMAGNITUDE <= (MAGNITUDE * Player_Size) and c.Name ~= Player.Name then
1526
							if Play_Hitbox_Hit_Sound == true then
1527
								local HitRefpart = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
1528
								HitRefpart.Anchored = true
1529
								HitRefpart.CFrame = CF(HEAD.Position)
1530
								CreateSound(HITWEAPONSOUND, HitRefpart, 1, HITWEAPONSOUNDPITCH)
1531
							end
1532
							if Enable_Stagger_Hit == true then
1533
								StaggerHit.Value = true
1534
							end
1535
						end
1536
					end
1537
				elseif d:IsA"BasePart" then
1538
					HEAD = d
1539
					if HEAD ~= nil then
1540
						local THEMAGNITUDE = (HEAD.Position - PART.Position).magnitude
1541
						if THEMAGNITUDE <= (MAGNITUDE * Player_Size) and c.Name ~= Player.Name then
1542
							DamageFunction(HITWEAPONSOUND, HITARMORSOUND, HITBLOCKSOUND, HITPLAYERSOUND, HITWEAPONSOUNDPITCH, HITARMORSOUNDPITCH, HITBLOCKSOUNDPITCH, HITPLAYERSOUNDPITCH, HEAD, HITEVENWHENDEAD, MINIMUMDAMAGE, MAXIMUMDAMAGE, KNOCKBACK, TYPE, PROPERTY, DELAY, KNOCKBACKTYPE, INCREASESTUN, STAGGER, STAGGERHIT, RANGED, MAGNITUDEDECREASETHESTAT, MAGNITUDEDECREASEAMOUNT, MAGNITUDEDECREASEDURATION, MAGNITUDESHOWDECREASEDSTAT)
1543
						end
1544
					end
1545
				end
1546
			end
1547
		end
1548
	end
1549
end
1550
1551
--Usage: MagnitudeBuffOrDebuff(Part, 5, "Defense", -0.1, 3, true, true)
1552
function MagnitudeBuffOrDebuff(PART, MAGNITUDE, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF, APPLYTOOTHERSINSTEAD)
1553
	if Player.Neutral == true then
1554
		IncreaseOrDecreaseStat(Character, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF)
1555
	end
1556
	for _, c in pairs(workspace:GetChildren()) do
1557
		local HUMANOID = c:FindFirstChild("Humanoid")
1558
		local THEHEAD = nil
1559
		if HUMANOID ~= nil then
1560
			if c:FindFirstChild("Torso") ~= nil then
1561
				THEHEAD = c:FindFirstChild("Torso")
1562
			elseif c:FindFirstChild("UpperTorso") ~= nil then
1563
				THEHEAD = c:FindFirstChild("UpperTorso")
1564
			end
1565
			if THEHEAD ~= nil then
1566
				local THEMAGNITUDE = (THEHEAD.Position - PART.Position).magnitude
1567
				print("yes 1")
1568
				if APPLYTOOTHERSINSTEAD == true then
1569
					if THEMAGNITUDE <= (MAGNITUDE * Player_Size) and c.Name ~= Player.Name then
1570
						if Player.Neutral == false and game.Players:GetPlayerFromCharacter(THEHEAD.Parent) ~= nil then
1571
							if game.Players:GetPlayerFromCharacter(THEHEAD.Parent).TeamColor == Player.TeamColor then
1572
								IncreaseOrDecreaseStat(THEHEAD.Parent, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF)
1573
							end
1574
						end
1575
					end
1576
				elseif APPLYTOOTHERSINSTEAD == false then
1577
					if THEMAGNITUDE <= (MAGNITUDE * Player_Size) then
1578
						if Player.Neutral == false and game.Players:GetPlayerFromCharacter(THEHEAD.Parent) ~= nil then
1579
							if game.Players:GetPlayerFromCharacter(THEHEAD.Parent).TeamColor == Player.TeamColor then
1580
								IncreaseOrDecreaseStat(THEHEAD.Parent, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF)
1581
							end
1582
						end
1583
					end
1584
				end
1585
			end
1586
		end
1587
	end
1588
end
1589
1590
--//=================================\\
1591
--\\=================================//
1592
1593
1594
1595
1596
1597
--//=================================\\
1598
--||			WEAPON GUI
1599
--\\=================================//
1600
1601
local MANABAR = CreateFrame(WEAPONGUI, Mana_Bar_Background_Transparency, 2, UD2(0.23, 0, 0.82, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_8.r, Custom_Colors.Custom_Color_8.g, Custom_Colors.Custom_Color_8.b), C3(0, 0, 0),"Mana Bar") 
1602
local MANACOVER = CreateFrame(MANABAR, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_5.r, Custom_Colors.Custom_Color_5.g, Custom_Colors.Custom_Color_5.b), C3(0, 0, 0),"Mana Cover")
1603
local MANATEXT = CreateLabel(MANABAR, Mana_Name.." ["..FLOOR(Mana.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Mana Text")
1604
1605
local HEALTHBAR = CreateFrame(WEAPONGUI, Health_Bar_Background_Transparency, 2, UD2(0.5, 0, 0.82, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_11.r, Custom_Colors.Custom_Color_11.g, Custom_Colors.Custom_Color_11.b), C3(0, 0, 0), "Health Bar")
1606
local HEALTHCOVER = CreateFrame(HEALTHBAR, 0, 2,UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_6.r, Custom_Colors.Custom_Color_6.g, Custom_Colors.Custom_Color_6.b), C3(0, 0, 0), "Health Cover")
1607
local HEALTHTEXT = CreateLabel(HEALTHBAR, "Health ["..FLOOR(Humanoid.Health).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Health Text")
1608
1609
local STUNFRAME = CreateFrame(nil, Stun_Bar_Background_Transparency, 2, UD2(0.5, 0, 0.78, 0),UD2(0.26, 0, 0, 0),C3(Custom_Colors.Custom_Color_10.r, Custom_Colors.Custom_Color_10.g, Custom_Colors.Custom_Color_10.b), C3(0, 0, 0), "Stun Frame")
1610
local STUNBAR = CreateFrame(STUNFRAME, 0, 2, UD2(0, 0, 0, 0),UD2(0, 0, 1, 0),C3(Custom_Colors.Custom_Color_7.r, Custom_Colors.Custom_Color_7.g, Custom_Colors.Custom_Color_7.b), C3(0, 0, 0), "Stun Bar")
1611
local STUNTEXT = CreateLabel(STUNFRAME, "Stun ["..FLOOR(StunValue.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Stun Text")
1612
1613
local SECONDARYMANABAR = CreateFrame(nil, Secondary_Mana_Bar_Background_Transparency, 2, UD2(0.23, 0, 0.78, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_9.r, Custom_Colors.Custom_Color_9.g, Custom_Colors.Custom_Color_9.b), C3(0, 0, 0),"Secondary Mana Bar") 
1614
local SECONDARYMANACOVER = CreateFrame(SECONDARYMANABAR, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_4.r, Custom_Colors.Custom_Color_4.g, Custom_Colors.Custom_Color_4.b), C3(0, 0, 0),"Secondary Mana Cover")
1615
local SECONDARYMANATEXT = CreateLabel(SECONDARYMANABAR, Secondary_Mana_Name.." ["..FLOOR(SecondaryMana.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Secondary Mana Text")
1616
1617
local DEFENSEFRAME = CreateFrame(nil, Stat_Background_Transparency, 2, UD2(0.23, 0, Stat_Offset, 0), UD2(0.075, 0, 0, 0), C3(100 / 255, 100 / 255, 255 / 255), C3(0, 0, 0),"Defense Frame")
1618
local DEFENSETEXT = CreateLabel(DEFENSEFRAME, "Defense ["..(Defense.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Defense Text")
1619
1620
local DAMAGEFRAME = CreateFrame(nil, Stat_Background_Transparency, 2, UD2(0.456, 0, Stat_Offset, 0), UD2(0.075, 0, 0, 0), C3(255 / 255, 100 / 255, 100 / 255), C3(0, 0, 0),"Damage Frame")
1621
local DAMAGETEXT = CreateLabel(DAMAGEFRAME, "Damage ["..(Damage.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Damage Text")
1622
1623
local MOVEMENTFRAME = CreateFrame(nil, Stat_Background_Transparency, 2, UD2(0.685, 0, Stat_Offset, 0), UD2(0.075, 0, 0, 0), C3(100 / 255, 255 / 255, 100 / 255), C3(0, 0, 0),"Movement Frame")
1624
local MOVEMENTTEXT = CreateLabel(MOVEMENTFRAME, "Movement ["..(Movement.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Movement Text")
1625
1626
local SKILL1FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.23, 0, 0.86, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 1 Frame")
1627
local SKILL2FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.50, 0, 0.86, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 2 Frame")
1628
local SKILL3FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.23, 0, 0.93, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 3 Frame")
1629
local SKILL4FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.50, 0, 0.93, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 4 Frame")
1630
1631
local SKILL1BAR = CreateFrame(SKILL1FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 1 Bar")
1632
local SKILL2BAR = CreateFrame(SKILL2FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 2 Bar")
1633
local SKILL3BAR = CreateFrame(SKILL3FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 3 Bar")
1634
local SKILL4BAR = CreateFrame(SKILL4FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 4 Bar")
1635
1636
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Ability 1", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 1")
1637
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[X] Ability 2", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 2")
1638
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 3")
1639
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 4")
1640
1641
if Enable_Gui == true then
1642
	WEAPONGUI.Parent = PlayerGui
1643
end
1644
1645
if Enable_Stats == true and Show_Stats == true then
1646
	DEFENSEFRAME.Parent = WEAPONGUI
1647
	DAMAGEFRAME.Parent = WEAPONGUI
1648
	MOVEMENTFRAME.Parent = WEAPONGUI
1649
end
1650
1651
if Enable_Secondary_Bar == true then
1652
	SECONDARYMANABAR.Parent = WEAPONGUI
1653
end
1654
1655
if Enable_Abilities == true then
1656
	SKILL1FRAME.Parent = WEAPONGUI
1657
	SKILL2FRAME.Parent = WEAPONGUI
1658
	SKILL3FRAME.Parent = WEAPONGUI
1659
	SKILL4FRAME.Parent = WEAPONGUI
1660
end
1661
1662
if Enable_Stun == true then
1663
	STUNFRAME.Parent = WEAPONGUI
1664
end
1665
1666
function UpdateGUI()
1667
	MANABAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1668
	MANACOVER:TweenSize(UD2(1 * (Mana.Value / Max_Mana), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1669
	MANATEXT.Text = Mana_Name.." ["..FLOOR(Mana.Value).."]"
1670
	HEALTHBAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1671
	HEALTHCOVER:TweenSize(UD2(1 * (Humanoid.Health / Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1672
	HEALTHTEXT.Text = "Health ["..FLOOR(Humanoid.Health).."]"
1673
	if Enable_Abilities == true then
1674
		SKILL1FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1675
		SKILL2FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1676
		SKILL3FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1677
		SKILL4FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1678
		SKILL1BAR:TweenSize(UD2(1 * (CO1 / Cooldown_1), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1679
		SKILL2BAR:TweenSize(UD2(1 * (CO2 / Cooldown_2), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1680
		SKILL3BAR:TweenSize(UD2(1 * (CO3 / Cooldown_3), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1681
		SKILL4BAR:TweenSize(UD2(1 * (CO4 / Cooldown_4), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1682
	end
1683
	if Enable_Stats == true and Show_Stats == true then
1684
		DEFENSEFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1685
		DEFENSETEXT.Text = "Defense ["..(Defense.Value * 100).."%]"
1686
		DAMAGEFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1687
		DAMAGETEXT.Text = "Damage ["..(Damage.Value * 100).."%]"
1688
		MOVEMENTFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1689
		MOVEMENTTEXT.Text = "Movement ["..(Movement.Value * 100).."%]"
1690
	end
1691
	if Enable_Stun == true then
1692
		STUNFRAME:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1693
		STUNBAR:TweenSize(UD2(1 * (StunValue.Value / Max_Stun), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1694
		STUNTEXT.Text = "Stun ["..FLOOR(StunValue.Value).."]"
1695
	end
1696
	if Enable_Secondary_Bar == true then
1697
		SECONDARYMANABAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1698
		SECONDARYMANACOVER:TweenSize(UD2(1 * (SecondaryMana.Value / Max_Secondary_Mana), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
1699
		SECONDARYMANATEXT.Text = Secondary_Mana_Name.." ["..FLOOR(SecondaryMana.Value).."]"
1700
	end
1701
end
1702
1703
if Enable_Gui == true then
1704
	UpdateGUI()
1705
	for _, v in pairs (WEAPONGUI:GetChildren()) do
1706
		if v.ClassName == "Frame" then
1707
			for _, b in pairs (v:GetChildren()) do
1708
				if b.ClassName == "TextLabel" then
1709
					coroutine.resume(coroutine.create(function(THETEXTLABEL)
1710
						wait(Menu_Update_Speed)
1711
						for i = 1, 0, -0.1 do
1712
							Swait()
1713
							THETEXTLABEL.TextTransparency = i
1714
							THETEXTLABEL.TextStrokeTransparency = i
1715
							end
1716
						THETEXTLABEL.TextTransparency = 0
1717
						THETEXTLABEL.TextStrokeTransparency = 0
1718
					end), b)
1719
				end
1720
			end
1721
		end
1722
	end
1723
end
1724
1725
--//=================================\\
1726
--\\=================================//
1727
1728
1729
1730
1731
1732
--//=================================\\
1733
--||	     SKILL FUNCTIONS
1734
--\\=================================//
1735
1736
function UpdateSkillsAndStuff()
1737
	if Mana_Regen_Mode == "1" then
1738
		if Mana.Value >= Max_Mana then
1739
			Mana.Value = Max_Mana
1740
		elseif Mana.Value < 0 then
1741
			Mana.Value = 0
1742
		else
1743
			if MANADELAYNUMBER <= Mana_Wait then
1744
				MANADELAYNUMBER = MANADELAYNUMBER + 1
1745
			else
1746
				MANADELAYNUMBER = 0
1747
				Mana.Value = Mana.Value + Recover_Mana
1748
			end
1749
		end
1750
	elseif Mana_Regen_Mode == "2" then
1751
		if Mana.Value <= Max_Mana then
1752
			Mana.Value = Mana.Value + (Recover_Mana / 30) / Animation_Speed
1753
		elseif Mana.Value >= Max_Mana then
1754
			Mana.Value = Max_Mana
1755
		elseif Mana.Value < 0 then
1756
			Mana.Value = 0
1757
		end
1758
	end
1759
	if Enable_Secondary_Bar == true then
1760
		if Secondary_Mana_Regen_Mode == "1" then
1761
			if SecondaryMana.Value >= Max_Secondary_Mana then
1762
				SecondaryMana.Value = Max_Secondary_Mana
1763
			elseif SecondaryMana.Value < 0 then
1764
				SecondaryMana.Value = 0
1765
			else
1766
				if SECONDARYMANADELAYNUMBER <= Secondary_Mana_Wait then
1767
					SECONDARYMANADELAYNUMBER = SECONDARYMANADELAYNUMBER + 1
1768
				else
1769
					SECONDARYMANADELAYNUMBER = 0
1770
					SecondaryMana.Value = SecondaryMana.Value + Recover_Secondary_Mana
1771
				end
1772
			end
1773
		elseif Secondary_Mana_Regen_Mode == "2" then
1774
			if SecondaryMana.Value <= Max_Secondary_Mana then
1775
				SecondaryMana.Value = SecondaryMana.Value + (Recover_Secondary_Mana / 30) / Animation_Speed
1776
			elseif SecondaryMana.Value >= Max_Secondary_Mana then
1777
				SecondaryMana.Value = Max_Secondary_Mana
1778
			elseif SecondaryMana.Value < 0 then
1779
				SecondaryMana.Value = 0
1780
			end
1781
		end
1782
	else
1783
		SecondaryMana.Value = 0
1784
	end
1785
	if Enable_Stun == true then
1786
		if Stun_Lose_Mode == "1" then
1787
			if StunValue.Value > Max_Stun then
1788
				StunValue.Value = Max_Stun
1789
			elseif StunValue.Value <= 0 then
1790
				StunValue.Value = 0
1791
			else
1792
				if STUNDELAYNUMBER <= Stun_Wait then
1793
					STUNDELAYNUMBER = STUNDELAYNUMBER + 1
1794
				else
1795
					STUNDELAYNUMBER = 0
1796
					StunValue.Value = StunValue.Value - Lose_Stun
1797
				end
1798
			end
1799
		elseif Stun_Lose_Mode == "2" then
1800
			if StunValue.Value <= Max_Stun and StunValue.Value > 0 then
1801
				StunValue.Value = StunValue.Value - (Lose_Stun / 30) / Animation_Speed
1802
			elseif StunValue.Value > Max_Stun then
1803
				StunValue.Value = Max_Stun
1804
			elseif StunValue.Value <= 0 then
1805
				StunValue.Value = 0
1806
			end
1807
		end
1808
	else
1809
		StunValue.Value = 0
1810
	end
1811
	if Enable_Abilities == true then
1812
		if CO1 <= Cooldown_1 then
1813
			CO1 = CO1 + (1 / 30) / Animation_Speed
1814
		elseif CO1 >= Cooldown_1 then
1815
			CO1 = Cooldown_1
1816
		end
1817
		if CO2 <= Cooldown_2 then
1818
			CO2 = CO2 + (1 / 30) / Animation_Speed
1819
		elseif CO2 >= Cooldown_2 then
1820
			CO2 = Cooldown_2
1821
		end
1822
		if CO3 <= Cooldown_3 then
1823
			CO3 = CO3 + (1 / 30) / Animation_Speed
1824
		elseif CO3 >= Cooldown_3 then
1825
			CO3 = Cooldown_3
1826
		end
1827
		if CO4 <= Cooldown_4 then
1828
			CO4 = CO4 + (1 / 30) / Animation_Speed
1829
		elseif CO4 >= Cooldown_4 then
1830
			CO4 = Cooldown_4
1831
		end
1832
	end
1833
end
1834
1835
--//=================================\\
1836
--\\=================================//
1837
1838
1839
1840
1841
1842
--//=================================\\
1843
--||	ATTACK FUNCTIONS AND STUFF
1844
--\\=================================//
1845
1846
function EquipWeapon()
1847
	--ATTACK = true
1848
	DEFENSECHANGE1.Parent = nil
1849
	MOVEMENTCHANGE1.Parent = ChangeStat
1850
	for i=0, 1, 0.5 / Animation_Speed do
1851
		Swait()
1852
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed)
1853
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(-20)), 0.3 / Animation_Speed)
1854
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.75 * Player_Size, 0 * Player_Size) * ANGLES(RAD(140), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(45), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
1855
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
1856
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed)
1857
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed)
1858
	end
1859
	for i=0, 1, 0.08 / Animation_Speed do
1860
		Swait()
1861
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed)
1862
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(-20)), 0.3 / Animation_Speed)
1863
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.75 * Player_Size, 0 * Player_Size) * ANGLES(RAD(210), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
1864
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
1865
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed)
1866
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed)
1867
	end
1868
	HandleWeld.Part0 = RightArm
1869
	HandleWeld.C0 = CF(-0.05 * Player_Size, -1 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(-27), RAD(0), RAD(-19)) * ANGLES(RAD(0), RAD(110), RAD(0))
1870
	CreateSound("174884033", HitboxPart, 1, 1.5)
1871
	for i=0, 1, 0.5 / Animation_Speed do
1872
		Swait()
1873
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed)
1874
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-2.5), RAD(0), RAD(30)), 0.3 / Animation_Speed)
1875
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(80)) * ANGLES(RAD(20), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
1876
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
1877
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed)
1878
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed)
1879
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-70), RAD(90), RAD(0)), 0.3 / Animation_Speed)
1880
	end
1881
	LASTPOINT = EffectPart.CFrame
1882
	for i=0, 1, 0.08 / Animation_Speed do
1883
		Swait()
1884
		TrailEffect("Institutional white", "Neon", EffectPart.CFrame, LASTPOINT, "Block", 0, 0.2, ANGLES(0, 0, 0), -0.01, 0, -0.01, 0.1)
1885
		LASTPOINT = EffectPart.CFrame
1886
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.4 / Animation_Speed)
1887
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-2.5), RAD(0), RAD(30)), 0.4 / Animation_Speed)
1888
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(80)) * ANGLES(RAD(-60), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
1889
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
1890
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.4 / Animation_Speed)
1891
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.4 / Animation_Speed)
1892
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-140), RAD(90), RAD(0)), 0.3 / Animation_Speed)
1893
	end
1894
	LASTPOINT = nil
1895
	--ATTACK = false
1896
end
1897
1898
function UnequipWeapon()
1899
	--ATTACK = true
1900
	for i=0, 1, 0.5 / Animation_Speed do
1901
		Swait()
1902
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed)
1903
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(-20)), 0.3 / Animation_Speed)
1904
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.75 * Player_Size, 0 * Player_Size) * ANGLES(RAD(140), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(45), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
1905
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
1906
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed)
1907
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed)
1908
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(-0.05 * Player_Size, -1 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(-27), RAD(0), RAD(-19)) * ANGLES(RAD(0), RAD(110), RAD(0)), 0.3 / Animation_Speed)
1909
	end
1910
	CreateSound("245542809", HitboxPart, 1, 1.2)
1911
	for i=0, 1, 0.08 / Animation_Speed do
1912
		Swait()
1913
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed)
1914
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(-20)), 0.3 / Animation_Speed)
1915
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.75 * Player_Size, 0 * Player_Size) * ANGLES(RAD(210), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
1916
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
1917
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed)
1918
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed)
1919
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(-0.05 * Player_Size, -1 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(-27), RAD(0), RAD(-19)) * ANGLES(RAD(0), RAD(110), RAD(0)), 0.3 / Animation_Speed)
1920
	end
1921
	HandleWeld.Part0 = Torso
1922
	HandleWeld.C0 = CF(2 * Player_Size, 2 * Player_Size, 0.6 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(135))
1923
	for i=0, 1, 0.5 / Animation_Speed do
1924
		Swait()
1925
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed)
1926
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-2.5), RAD(0), RAD(30)), 0.3 / Animation_Speed)
1927
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.75 * Player_Size, 0 * Player_Size) * ANGLES(RAD(140), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(45), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
1928
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
1929
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed)
1930
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed)
1931
	end
1932
	for i=0, 1, 0.08 / Animation_Speed do
1933
		Swait()
1934
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed)
1935
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed)
1936
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed)
1937
		Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)), 0.3 / Animation_Speed)
1938
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
1939
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
1940
		if Disable_Moving_Arms == false then
1941
			RightShoulder.C1 = Clerp(RightShoulder.C1, ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5), 0.3 / Animation_Speed)
1942
			LeftShoulder.C1 = Clerp(LeftShoulder.C1, ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5), 0.3 / Animation_Speed)
1943
		else
1944
			RightShoulder.C1 = Clerp(RightShoulder.C1, CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size), 0.3 / Animation_Speed)
1945
			LeftShoulder.C1 = Clerp(LeftShoulder.C1, CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size), 0.3 / Animation_Speed)
1946
		end
1947
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed)
1948
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed)
1949
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed)
1950
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed)
1951
	end
1952
	RootJoint.C0 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
1953
	RootJoint.C1 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
1954
	Neck.C0 = NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0))
1955
	Neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180))
1956
	RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0
1957
	LeftShoulder.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0
1958
	if Disable_Moving_Arms == false then
1959
		RightShoulder.C1 = ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5)
1960
		LeftShoulder.C1 = ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5)
1961
	else
1962
		RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
1963
		LeftShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
1964
	end
1965
	RightHip.C0 = CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
1966
	LeftHip.C0 = CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
1967
	RightHip.C1 = CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
1968
	LeftHip.C1 = CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
1969
	--ATTACK = false
1970
	DEFENSECHANGE1.Parent = ChangeStat
1971
	MOVEMENTCHANGE1.Parent = nil
1972
end
1973
1974
function StaggerHitAnimation()
1975
	ATTACK = true
1976
	if Weapon:FindFirstChild("Hitbox") ~= nil then
1977
		for i = 1, MRANDOM(2, 4) do
1978
			ClangEffect("Black", "Neon", CF(Weapon:FindFirstChild("Hitbox").Position) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), 20, 5, 0.2, MRANDOM(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1)
1979
		end
1980
	end
1981
	for i = 0, 1, 0.1 / Animation_Speed do
1982
		Swait()
1983
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-10), RAD(0), RAD(-30)), 0.3 / Animation_Speed)
1984
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(30)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.3 / Animation_Speed)
1985
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-30), RAD(0), RAD(60)) * ANGLES(RAD(0), RAD(-30), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
1986
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-20)) * ANGLES(RAD(0), RAD(20), RAD(0)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
1987
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.9 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-20)), 0.3 / Animation_Speed)
1988
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1.1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(10)), 0.3 / Animation_Speed)
1989
		if Stagger.Value == true or Stun.Value == true then
1990
			break
1991
		end
1992
	end
1993
	ATTACK = false
1994
end
1995
1996
function StaggerAnimation()
1997
	ATTACK = true
1998
	if Weapon:FindFirstChild("Hitbox") ~= nil then
1999
		for i = 1, MRANDOM(2, 4) do
2000
			ClangEffect("White", "Neon", CF(Weapon:FindFirstChild("Hitbox").Position) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), 20, 5, 0.2, MRANDOM(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1)
2001
		end
2002
	end
2003
	DISABLEJUMPING = true
2004
	COMBO = 1
2005
	StatLabel("Interruption", Head.CFrame * CF(0, 0 + (Head.Size.z - 1), 0), "Staggered!", C3(255 / 255, 255 / 255, 0))
2006
	local STAGGERVELOCITY = Instance.new("BodyVelocity",Torso)
2007
	STAGGERVELOCITY.P = 500
2008
	STAGGERVELOCITY.maxForce = VT(math.huge, 0, math.huge)
2009
	if Rooted.Value == false then
2010
		STAGGERVELOCITY.Velocity = RootPart.CFrame.lookVector * -40
2011
	end
2012
	for i = 0, 1, 0.35 / Animation_Speed do
2013
		Swait()
2014
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.3 / Animation_Speed)
2015
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(2.5), RAD(0), RAD(20)), 0.3 / Animation_Speed)
2016
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size,0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
2017
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size,0 * Player_Size) * ANGLES(RAD(-7.5), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
2018
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size,0 * Player_Size) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(30)), 0.3 / Animation_Speed)
2019
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size,0 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(5)), 0.3 / Animation_Speed)
2020
	end
2021
	for i = 0, 1, 0.2 / Animation_Speed do
2022
		Swait()
2023
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-25), RAD(0), RAD(-20)), 0.4 / Animation_Speed)
2024
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.4 / Animation_Speed)
2025
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2026
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-7.5), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2027
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(50)), 0.4 / Animation_Speed)
2028
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(25)), 0.4 / Animation_Speed)
2029
	end
2030
	STAGGERVELOCITY.Parent = nil
2031
	for i = 1, 50 * Animation_Speed do
2032
		Swait()
2033
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -1.8 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-20)) * ANGLES(RAD(-5), RAD(-5), RAD(0)), 0.3 / Animation_Speed)
2034
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(5), RAD(0)), 0.3 / Animation_Speed)
2035
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(-20), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
2036
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(-10)) * ANGLES(RAD(0), RAD(15), RAD(0)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
2037
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.4 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(70)) * ANGLES(RAD(0), RAD(30), RAD(0)), 0.3 / Animation_Speed)
2038
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, 0.5 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(-10)), 0.3 / Animation_Speed)
2039
	end
2040
	DISABLEJUMPING = false
2041
	ATTACK = false
2042
end
2043
2044
function StunAnimation()
2045
	ATTACK = true
2046
	DISABLEJUMPING = true
2047
	COMBO = 1
2048
	StatLabel("Interruption", Head.CFrame * CF(0, 0 + (Head.Size.z - 1), 0), "Stunned!", C3(255 / 255, 255 / 255, 0))
2049
	for i = 0, 1, 0.3 / Animation_Speed do
2050
		Swait()
2051
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(15), RAD(0), RAD(-150)), 0.3 / Animation_Speed)
2052
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-10), RAD(0), RAD(-20)), 0.3 / Animation_Speed)
2053
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(30), RAD(0), RAD(40)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
2054
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-50)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
2055
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(30)), 0.3 / Animation_Speed)
2056
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(20)), 0.3 / Animation_Speed)
2057
	end
2058
	for i = 0, 1, 0.3 / Animation_Speed do
2059
		Swait()
2060
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(45), RAD(0), RAD(-180)), 0.4 / Animation_Speed)
2061
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-15), RAD(0), RAD(-30)), 0.4 / Animation_Speed)
2062
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(30), RAD(0), RAD(40)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2063
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-50)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2064
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(15)), 0.4 / Animation_Speed)
2065
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(50)), 0.4 / Animation_Speed)
2066
	end
2067
	for i = 0, 1, 0.3 / Animation_Speed do
2068
		Swait()
2069
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(75), RAD(0), RAD(-180)), 0.4 / Animation_Speed)
2070
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-15), RAD(0), RAD(-60)), 0.4 / Animation_Speed)
2071
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(20), RAD(0), RAD(70)) * ANGLES(RAD(0), RAD(30), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2072
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-10), RAD(0), RAD(-80)) * ANGLES(RAD(0), RAD(-40), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2073
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(10)), 0.4 / Animation_Speed)
2074
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(80)), 0.4 / Animation_Speed)
2075
	end
2076
	for i = 1, 70 * Animation_Speed do
2077
		Swait()
2078
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -2.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-180)), 0.3 / Animation_Speed)
2079
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.3 / Animation_Speed)
2080
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(-10), RAD(90)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed)
2081
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.3 / Animation_Speed)
2082
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(0)), 0.3 / Animation_Speed)
2083
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(0)), 0.3 / Animation_Speed)
2084
	end
2085
	for i = 0, 1, 0.2 / Animation_Speed do
2086
		Swait()
2087
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -1.5 * Player_Size) * ANGLES(RAD(20), RAD(0), RAD(100)), 0.4 / Animation_Speed)
2088
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-30)), 0.4 / Animation_Speed)
2089
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(-10), RAD(30)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2090
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(80), RAD(0), RAD(20)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2091
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(70)), 0.4 / Animation_Speed)
2092
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.25 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(20)), 0.4 / Animation_Speed)
2093
	end
2094
	DISABLEJUMPING = false
2095
	ATTACK = false
2096
end
2097
2098
function EAbility()
2099
	ATTACK = true
2100
	ATTACK = false
2101
end
2102
2103
function Attack1()
2104
	ATTACK = true
2105
	for i=0, 1, 0.1 / Animation_Speed do
2106
		Swait()
2107
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(-40)), 0.4 / Animation_Speed)
2108
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5), RAD(0), RAD(35)), 0.4 / Animation_Speed)
2109
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(150), RAD(0), RAD(-20)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2110
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.25 * Player_Size, 0.5 * Player_Size, -0.75 * Player_Size) * ANGLES(RAD(160), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2111
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-5)), 0.4 / Animation_Speed)
2112
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.075 * Player_Size) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(-15)), 0.4 / Animation_Speed)
2113
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-80), RAD(90), RAD(0)), 0.4 / Animation_Speed)
2114
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
2115
			break
2116
		end
2117
	end
2118
    chatfunc("Wragh!")
2119
	CreateSound("553461842", HitboxPart, 1.2, MRANDOM(8, 9) / 10)
2120
	local HASHITFLOOR = false
2121
	for i=0, 1, 0.1 / Animation_Speed do
2122
		Swait()
2123
		local Pos = HitboxPart
2124
		local Offset = HitboxPart.CFrame * CF(0, 0.1 * Player_Size, 0)
2125
		local Color = "Institutional white"
2126
		local Material = "Neon"
2127
		local TheDelay = 0.01
2128
		local Height = 6.2 * Player_Size
2129
		BLCF = Offset
2130
		if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then
2131
			local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay)
2132
			if a then game:GetService("Debris"):AddItem(a, 1) end
2133
			if b then game:GetService("Debris"):AddItem(b, 1) end
2134
			local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay)
2135
			if a then game:GetService("Debris"):AddItem(a, 1) end
2136
			if b then game:GetService("Debris"):AddItem(b, 1) end
2137
			SCFR = BLCF
2138
		elseif not SCFR then
2139
			SCFR = BLCF
2140
		end
2141
		local SWORDHIT, SWORDPOS = Raycast(EffectPart.Position, (CF(EffectPart.Position, EffectPart.Position + VT(0, -1, 0))).lookVector, 1 * Player_Size, Character)
2142
		if SWORDHIT ~= nil and HASHITFLOOR == false and SWORDHIT.Parent:FindFirstChild("Humanoid") == nil then
2143
			HASHITFLOOR = true
2144
			--print(SWORDHIT.Material)
2145
			if SWORDHIT.Material == Enum.Material.Grass or SWORDHIT.Material == Enum.Material.Ice or SWORDHIT.Material == Enum.Material.Fabric or SWORDHIT.Material == Enum.Material.SmoothPlastic or SWORDHIT.Material == Enum.Material.Sand or SWORDHIT.Material == Enum.Material.Plastic or SWORDHIT.Material == Enum.Material.Neon or SWORDHIT.Material == Enum.Material.Foil then
2146
				CreateSound("525717773", EffectPart, 1.2 , MRANDOM(8, 12) / 10)
2147
			elseif SWORDHIT.Material == Enum.Material.Metal or SWORDHIT.Material == Enum.Material.Concrete or SWORDHIT.Material == Enum.Material.Brick or SWORDHIT.Material == Enum.Material.CorrodedMetal or SWORDHIT.Material == Enum.Material.Slate or SWORDHIT.Material == Enum.Material.Marble or SWORDHIT.Material == Enum.Material.Granite or SWORDHIT.Material == Enum.Material.DiamondPlate or SWORDHIT.Material == Enum.Material.Pebble or SWORDHIT.Material == Enum.Material.Cobblestone then
2148
				CreateSound("470790670", EffectPart, 1 , MRANDOM(8, 12) / 10)
2149
				for i = 1, MRANDOM(2, 4) do
2150
					ClangEffect("Really black", "Neon", CF(SWORDPOS) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), 10, 3, 0.2, MRANDOM(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1)
2151
				end
2152
			elseif SWORDHIT.Material == Enum.Material.Wood or SWORDHIT.Material == Enum.Material.WoodPlanks then
2153
				CreateSound("514586161", EffectPart, 1 , MRANDOM(8, 12) / 10)
2154
			end
2155
		end
2156
		MagnitudeDamage(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, HitboxPart, 4, false, 35, 45, MRANDOM(5, 10), "Normal", RootPart, 0.5, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false)
2157
		if HASHITFLOOR == true then
2158
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(30)), 0.4 / Animation_Speed)
2159
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-20)), 0.4 / Animation_Speed)
2160
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(40), RAD(0), RAD(5)) * ANGLES(RAD(0), RAD(-30), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2161
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(0 * Player_Size, 0.25 * Player_Size, -0.75 * Player_Size) * ANGLES(RAD(20), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2162
			RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.075 * Player_Size) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(17.5)), 0.4 / Animation_Speed)
2163
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(5)), 0.4 / Animation_Speed)
2164
			HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-132.5), RAD(90), RAD(0)), 0.4 / Animation_Speed)
2165
		else
2166
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(30)), 0.4 / Animation_Speed)
2167
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-20)), 0.4 / Animation_Speed)
2168
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(30), RAD(0), RAD(5)) * ANGLES(RAD(0), RAD(-30), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2169
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(0 * Player_Size, 0.25 * Player_Size, -0.75 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2170
			RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.075 * Player_Size) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(17.5)), 0.4 / Animation_Speed)
2171
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(5)), 0.4 / Animation_Speed)
2172
			HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-150), RAD(90), RAD(0)), 0.4 / Animation_Speed)
2173
		end
2174
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
2175
			break
2176
		end
2177
	end
2178
	BLCF = nil
2179
	SCFR = nil
2180
	ATTACK = false
2181
end
2182
2183
function Attack2()
2184
	ATTACK = true
2185
	for i=0, 1, 0.1 / Animation_Speed do
2186
		Swait()
2187
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(20)), 0.4 / Animation_Speed)
2188
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-15)), 0.4 / Animation_Speed)
2189
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.25 * Player_Size, 0.5 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2190
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-25), RAD(0), RAD(-35)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2191
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(15)), 0.4 / Animation_Speed)
2192
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.4 / Animation_Speed)
2193
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-110), RAD(90), RAD(0)), 0.4 / Animation_Speed)
2194
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
2195
			break
2196
		end
2197
	end
2198
    chatfunc("Hyuah!")
2199
	CreateSound("553461718", HitboxPart, 1.2, MRANDOM(7, 9) / 10)
2200
	for i=0, 1, 0.1 / Animation_Speed do
2201
		Swait()
2202
		local Pos = HitboxPart
2203
		local Offset = HitboxPart.CFrame * CF(0, 0.1 * Player_Size, 0)
2204
		local Color = "Institutional white"
2205
		local Material = "Neon"
2206
		local TheDelay = 0.01
2207
		local Height = 6.2 * Player_Size
2208
		BLCF = Offset
2209
		if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then
2210
			local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay)
2211
			if a then game:GetService("Debris"):AddItem(a, 1) end
2212
			if b then game:GetService("Debris"):AddItem(b, 1) end
2213
			local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay)
2214
			if a then game:GetService("Debris"):AddItem(a, 1) end
2215
			if b then game:GetService("Debris"):AddItem(b, 1) end
2216
			SCFR = BLCF
2217
		elseif not SCFR then
2218
			SCFR = BLCF
2219
		end
2220
		MagnitudeDamage(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, HitboxPart, 4, false, 35, 45, MRANDOM(5, 10), "Normal", RootPart, 0.5, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false)
2221
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(-30)), 0.4 / Animation_Speed)
2222
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(2.5), RAD(0), RAD(30)), 0.4 / Animation_Speed)
2223
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(100)) * ANGLES(RAD(-30), RAD(80), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2224
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(-55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2225
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(5)), 0.4 / Animation_Speed)
2226
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-65), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-15)), 0.4 / Animation_Speed)
2227
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-130), RAD(90), RAD(0)), 0.4 / Animation_Speed)
2228
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
2229
			break
2230
		end
2231
	end
2232
	BLCF = nil
2233
	SCFR = nil
2234
	ATTACK = false
2235
end
2236
2237
function ShootFireball(POSITION1, POSITION2, SPEED, SIZE, DURATION, LOWDAMAGE, HIGHDAMAGE)
2238
	local POS1 = POSITION1
2239
	local POS2 = POSITION2
2240
	local MOUSELOOK = CF((POS1 + POS2) / 2, POS2)
2241
	local FIREBALLSPEED = SPEED * Player_Size
2242
	local FIREBALLDURATION = DURATION
2243
	local FIREBALLCOLORS = {"Really black", "Black", "White"}
2244
	local FIREBALLHITSOUNDS = {"522282998", "527535379", "304448425"}
2245
	coroutine.resume(coroutine.create(function()
2246
		repeat
2247
			Swait()
2248
			local FIREBALLHIT, FIREBALLPOS = Raycast(POS1, MOUSELOOK.lookVector, FIREBALLSPEED, Character)
2249
			POS1 = POS1 + (MOUSELOOK.lookVector * FIREBALLSPEED)
2250
			MagicBlock(FIREBALLCOLORS[MRANDOM(1, #FIREBALLCOLORS)], "Neon", CF(POS1) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), SIZE, SIZE, SIZE, SIZE / -10, SIZE / -10, SIZE / -10, 0.1)
2251
			if FIREBALLHIT ~= nil or FIREBALLDURATION <= 0.1 then
2252
				FIREBALLDURATION = 0
2253
				local FireballHitRefpart = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
2254
				FireballHitRefpart.Anchored = true
2255
				FireballHitRefpart.CFrame = CF(FIREBALLPOS)
2256
				game:GetService("Debris"):AddItem(FireballHitRefpart, 5)
2257
				CreateSound(FIREBALLHITSOUNDS[MRANDOM(1, #FIREBALLHITSOUNDS)], FireballHitRefpart, 1.4, MRANDOM(14, 16) / 10)
2258
				for i = 1, MRANDOM(4, 8) do
2259
					MagicBlock(FIREBALLCOLORS[MRANDOM(1, #FIREBALLCOLORS)], "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360))), CF(0, MRANDOM(5, 7) / 10 * Player_Size, 0), VT(0, 0, 0), 5, 5, 5, 0, 0, 0, MRANDOM(3, 5) / 100)
2260
				end
2261
				MagicBlock("Really black", "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), SIZE, SIZE, SIZE, SIZE / 3, SIZE / 3, SIZE / 3, 0.05)
2262
				MagicBlock("Black", "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), SIZE * 0.5, SIZE * 0.5, SIZE * 0.5, SIZE / 4, SIZE / 4, SIZE / 4, 0.05)
2263
				MagicBlock("White", "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), SIZE * 0.25, SIZE * 0.25, SIZE * 0.25, SIZE / 5, SIZE / 5, SIZE / 5, 0.05)
2264
				MagnitudeDamage("", "", "", "", 1, 1, 1, 1, FireballHitRefpart, SIZE / 2, false, 50, 50, 0, "Normal", RootPart, 0, 1, MRANDOM(10, 15), nil, false, true, nil, 0, 0, false)
2265
			else
2266
				FIREBALLDURATION = FIREBALLDURATION - (1 / 30) / Animation_Speed
2267
			end
2268
		until FIREBALLHIT ~= nil or FIREBALLDURATION <= 0
2269
	end))
2270
end
2271
2272
function FirePillar(POSITION1, POSITION2, SIZE, RISE, RANGE, LOWDAMAGE, HIGHDAMAGE, LASTINGTIME)
2273
	local POS1 = POSITION1
2274
	local POS2 = POSITION2
2275
	local MOUSELOOK = CF((POS1 + POS2) / 2, POS2)
2276
	local FIREPILLARHITSOUNDS = {"171378971", --[["646619365",--]] "472579737"--[[, "144140670"--]]}
2277
	local FIREPILLARCOLORS = {"White", "Black", "Really black"}
2278
	local FIREPILLAR1HIT, FIREPILLAR1POS = Raycast(POS1, MOUSELOOK.lookVector, RANGE * Player_Size, Character)
2279
	local FirePillarRefpart1 = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
2280
	FirePillarRefpart1.Anchored = true
2281
	FirePillarRefpart1.CFrame = CF(FIREPILLAR1POS) * CF(0, 10, 0)
2282
	game:GetService("Debris"):AddItem(FirePillarRefpart1, 5)
2283
	local FIREPILLAR2HIT, FIREPILLAR2POS = Raycast(FirePillarRefpart1.Position, CF(FirePillarRefpart1.Position, FirePillarRefpart1.Position + VT(0, -1, 0)).lookVector, 999, Character)
2284
	if FIREPILLAR2HIT ~= nil then
2285
		FirePillarRefpart1.Parent = nil
2286
		local FirePillarRefpart2 = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
2287
		FirePillarRefpart2.Anchored = true
2288
		FirePillarRefpart2.CFrame = CF(FIREPILLAR2POS)
2289
		game:GetService("Debris"):AddItem(FirePillarRefpart2, 5)
2290
		CreateSound(FIREPILLARHITSOUNDS[MRANDOM(1, #FIREPILLARHITSOUNDS)], FirePillarRefpart2, 1.2, MRANDOM(11, 13) / 10)
2291
		for i = 1, MRANDOM(5, 10) do
2292
			MagicBlock(FIREPILLARCOLORS[MRANDOM(1, #FIREPILLARCOLORS)], "Neon", FirePillarRefpart2.CFrame * ANGLES(RAD(MRANDOM(-60, 60)), 0, RAD(MRANDOM(-60, 60))), CF(0, MRANDOM(5, 7) / 10 * Player_Size, 0), VT(0, 0, 0), 3, 3, 3, 0, 0, 0, MRANDOM(3, 5) / 100)
2293
		end
2294
		for i = 1, MRANDOM(15, 20) do
2295
			local FIREEFFECTSIZE = MRANDOM(1, 2)
2296
			MagicBlock(FIREPILLARCOLORS[MRANDOM(1, #FIREPILLARCOLORS)], "Neon", FirePillarRefpart2.CFrame, CF(0, MRANDOM(5, 10) / 100, 0) * ANGLES(0, RAD(MRANDOM(-20, 20)), 0), VT(MRANDOM(SIZE / 6, SIZE / 4), 0, 0), FIREEFFECTSIZE, FIREEFFECTSIZE, FIREEFFECTSIZE, -0.02, -0.02, -0.02, MRANDOM(1, 2) / 100)
2297
		end
2298
		MagicCylinder("Dark stone gret", "Neon", CF(FIREPILLAR2POS), ANGLES(0, 0, 0), VT(0, 0, 0), SIZE, 0.1, SIZE, 1.5, 0, 1.5, LASTINGTIME)
2299
		MagicSphere("White", "Neon", FirePillarRefpart2.CFrame, ANGLES(0, 0, 0), VT(0, 0, 0), SIZE, 0.1, SIZE, 1.5, RISE, 1.5, LASTINGTIME)
2300
		MagicSphere("Black", "Neon", FirePillarRefpart2.CFrame, ANGLES(0, 0, 0), VT(0, 0, 0), SIZE * 0.5, 0.1, SIZE * 0.5, 1.5, RISE * 0.75, 1.5, LASTINGTIME)
2301
		MagicSphere("Really black", "Neon", FirePillarRefpart2.CFrame, ANGLES(0, 0, 0), VT(0, 0, 0), SIZE * 0.25, 0.1, SIZE * 0.25, 1.5, RISE * 0.375, 1.5, LASTINGTIME)
2302
		MagnitudeDamage("", "", "", "", 1, 1, 1, 1, FirePillarRefpart2, SIZE / 3, false, 60, 60, 0, "Normal", RootPart, 0, 1, MRANDOM(10, 15), nil, false, true, "Movement", -0.1, 3, true)
2303
	end
2304
end
2305
2306
function Attack3()
2307
	ATTACK = true
2308
	local FIREEFFECTCOLORS = {"Black", "Really black", "White"}
2309
	for i=0, 1, 0.1 / Animation_Speed do
2310
		Swait()
2311
		for i = 1, 2 do
2312
			MagicBlock(FIREEFFECTCOLORS[MRANDOM(1, #FIREEFFECTCOLORS)], "Neon", LeftArm.CFrame * CF(0, MRANDOM(-10, 10) / 10 * Player_Size, 0) * ANGLES(RAD(90), 0, RAD(MRANDOM(-360, 360))), CF(0, 0, 0.1) * ANGLES(0, 0, RAD(MRANDOM(-20, 20))), VT(0, 1, 0), 1, 1, 1, -0.05, -0.05, -0.05, 0.05)
2313
		end
2314
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-60)), 0.4 / Animation_Speed)
2315
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(60)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.4 / Animation_Speed)
2316
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2317
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-55)) * ANGLES(RAD(5), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2318
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.4 / Animation_Speed)
2319
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, 0.05 * Player_Size) * ANGLES(RAD(0), RAD(-40), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-10)), 0.4 / Animation_Speed)
2320
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-20), RAD(90), RAD(0)), 0.4 / Animation_Speed)
2321
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
2322
			break
2323
		end
2324
	end
2325
    chatfunc("Take this!")
2326
	CreateSound("154324879", LeftArm, 1.4, 1.5)
2327
	ShootFireball((LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size)).p, Mouse.hit.p, 1, 10, 2.1, 5, 10)
2328
	MagicBlock("Black", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 5, 5, 5, 0.5, 0.5, 0.5, 0.05)
2329
	MagicBlock("Really black", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.05)
2330
	MagicBlock("White", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 0.05, 0.05, 0.05, 0.5, 0.5, 0.5, 0.05)
2331
	for i=0, 1, 0.1 / Animation_Speed do
2332
		Swait()
2333
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-50)), 0.4 / Animation_Speed)
2334
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(50)) * ANGLES(RAD(2.5), RAD(0), RAD(0)), 0.4 / Animation_Speed)
2335
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2336
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25 * Player_Size, 0.25 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-55)) * ANGLES(RAD(40), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2337
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-12.5), RAD(0), RAD(-5)), 0.4 / Animation_Speed)
2338
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.05 * Player_Size) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-5)), 0.4 / Animation_Speed)
2339
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-20), RAD(90), RAD(0)), 0.4 / Animation_Speed)
2340
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
2341
			break
2342
		end
2343
	end
2344
	ATTACK = false
2345
end
2346
2347
function Attack4()
2348
	ATTACK = true
2349
	local FIREEFFECTCOLORS = {"Really black", "Black", "White"}
2350
	for i=0, 1, 0.1 / Animation_Speed do
2351
		Swait()
2352
		MagicBlock(FIREEFFECTCOLORS[MRANDOM(1, #FIREEFFECTCOLORS)], "Neon", LeftArm.CFrame * CF(0 * Player_Size, MRANDOM(-15, -10) / 10 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), 0, RAD(MRANDOM(-360, 360))), CF(0, 0, -0.1) * ANGLES(0, 0, RAD(MRANDOM(-20, 20))), VT(0, 1, 0), 1, 1, 1, -0.05, -0.05, -0.05, 0.05)
2353
		--MagicBlock(FIREEFFECTCOLORS[MRANDOM(1, #FIREEFFECTCOLORS)], "Neon", RootPart.CFrame * CF(0 * Player_Size, MRANDOM(-2, 2) * Player_Size, 0 * Player_Size) * ANGLES(0, RAD(MRANDOM(-360, 360)), 0), CF(0, MRANDOM(5, 10) / 100, 0) * ANGLES(0, RAD(MRANDOM(-10, 10)), 0), VT(MRANDOM(20, 40) / 10, 0, 0), 1, 1, 1, -0.05, -0.05, -0.05, 0.05)
2354
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-40)), 0.4 / Animation_Speed)
2355
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(35)) * ANGLES(RAD(2.5), RAD(0), RAD(0)), 0.4 / Animation_Speed)
2356
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2357
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.75 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(50)) * ANGLES(RAD(80), RAD(-20), RAD(-30)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2358
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.4 / Animation_Speed)
2359
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, 0.05 * Player_Size) * ANGLES(RAD(0), RAD(-40), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-10)), 0.4 / Animation_Speed)
2360
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-20), RAD(90), RAD(0)), 0.4 / Animation_Speed)
2361
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
2362
			break
2363
		end
2364
	end
2365
    chatfunc("Huah!")
2366
	CreateSound("549224856", LeftArm, 1, MRANDOM(11, 13) / 10)
2367
	FirePillar(RootPart.Position, Mouse.hit.p, 25, 7.5, 20, 5, 10, 0.025)
2368
	MagicBlock("Really black", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 5, 5, 5, 0.5, 0.5, 0.5, 0.05)
2369
	MagicBlock("White", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.05)
2370
	MagicBlock("Black", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 0.05, 0.05, 0.05, 0.5, 0.5, 0.5, 0.05)
2371
	for i=0, 1, 0.1 / Animation_Speed do
2372
		Swait()
2373
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.4 / Animation_Speed)
2374
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(25)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.4 / Animation_Speed)
2375
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2376
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.25 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-20 + MRANDOM(-2.5, 2.5))) * ANGLES(RAD(70 + MRANDOM(-2.5, 2.5)), RAD(40), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2377
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.4 / Animation_Speed)
2378
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, 0.05 * Player_Size) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(-12.5)), 0.4 / Animation_Speed)
2379
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-20), RAD(90), RAD(0)), 0.4 / Animation_Speed)
2380
		--[[
2381
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(40)), 0.4 / Animation_Speed)
2382
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-30)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.4 / Animation_Speed)
2383
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
2384
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-10 + MRANDOM(-2.5, 2.5))) * ANGLES(RAD(40 + MRANDOM(-2.5, 2.5)), RAD(70), RAD(20)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
2385
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(10)), 0.4 / Animation_Speed)
2386
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(5)), 0.4 / Animation_Speed)
2387
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-20), RAD(90), RAD(0)), 0.4 / Animation_Speed)
2388
		--]]
2389
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
2390
			break
2391
		end
2392
	end
2393
	ATTACK = false
2394
end
2395
2396
function Move1()
2397
	ATTACK = true
2398
	ATTACK = false
2399
end
2400
2401
function Move2()
2402
	ATTACK = true
2403
	ATTACK = false
2404
end
2405
2406
function Move3()
2407
	ATTACK = true
2408
	ATTACK = false
2409
end
2410
2411
function Move4()
2412
	ATTACK = true
2413
	ATTACK = false
2414
end
2415
2416
--//=================================\\
2417
--\\=================================//
2418
2419
2420
2421
2422
2423
--//=================================\\
2424
--||	      SET THINGS UP
2425
--\\=================================//
2426
2427
if Start_Equipped == true then
2428
	ATTACK = true
2429
	EQUIPPED = true
2430
	if Disable_Animate == true then
2431
		ANIMATE.Parent = nil
2432
		local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
2433
		IDLEANIMATION:Play()
2434
	end
2435
	if Disable_Animator == true then
2436
		ANIMATOR.Parent = nil
2437
	end
2438
	if Disable_Moving_Arms == true then
2439
		RSH = Torso["Right Shoulder"]
2440
		LSH = Torso["Left Shoulder"]
2441
		RSH.Parent = nil
2442
		LSH.Parent = nil
2443
		if Use_Motors_Instead_Of_Welds == true then
2444
			RightShoulder = IT("Motor")
2445
			LeftShoulder = IT("Motor")
2446
		else
2447
			RightShoulder = IT("Weld")
2448
			LeftShoulder = IT("Weld")
2449
		end
2450
		RightShoulder.Name = "Right Shoulder"
2451
		RightShoulder.Part0 = Torso
2452
		RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
2453
		RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) 
2454
		RightShoulder.Part1 = Character["Right Arm"]
2455
		RightShoulder.Parent = Torso
2456
		LeftShoulder.Name = "Left Shoulder"
2457
		LeftShoulder.Part0 = Torso
2458
		LeftShoulder.C0=CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
2459
		LeftShoulder.C1=CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
2460
		LeftShoulder.Part1 = Character["Left Arm"]
2461
		LeftShoulder.Parent = Torso
2462
		RIGHTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0))
2463
		LEFTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0))
2464
	end
2465
	if Start_Equipped_With_Equipped_Animation == true then
2466
		Swait()
2467
		EquipWeapon()
2468
	end
2469
	ATTACK = false
2470
end
2471
2472
--//=================================\\
2473
--\\=================================//
2474
2475
2476
2477
2478
2479
--//=================================\\
2480
--||	  ASSIGN THINGS TO KEYS
2481
--\\=================================//
2482
2483
Humanoid.Changed:connect(function(Jump)
2484
	if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
2485
		Humanoid.Jump = false
2486
	end
2487
end)
2488
2489
function MouseDown(Mouse)
2490
	if ATTACK == true or EQUIPPED == false then
2491
		return
2492
	end
2493
	HOLD = true
2494
	if COMBO == 1 then
2495
		COMBO = 2
2496
		Attack1()
2497
	elseif COMBO == 2 then
2498
		COMBO = 3
2499
		Attack2()
2500
	elseif COMBO == 3 then
2501
		COMBO = 4
2502
		Attack3()
2503
	elseif COMBO == 4 then
2504
		COMBO = 1
2505
		Attack4()
2506
	end
2507
	coroutine.resume(coroutine.create(function()
2508
		for i=1, 50 do
2509
			if ATTACK == false then
2510
				Swait()
2511
			end
2512
		end
2513
		if ATTACK == false then
2514
			COMBO = 1
2515
		end
2516
	end))
2517
end
2518
2519
function MouseUp(Mouse)
2520
HOLD = false
2521
end
2522
2523
function KeyDown(Key)
2524
	if Key == "f" and Can_Equip_Or_Unequip == true and ATTACK == false then
2525
		ATTACK = true
2526
		COMBO = 1
2527
		if EQUIPPED == false then
2528
			EQUIPPED = true
2529
			if Disable_Animate == true then
2530
				ANIMATE.Parent = nil
2531
				local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
2532
				IDLEANIMATION:Play()
2533
			end
2534
			if Disable_Animator == true then
2535
				ANIMATOR.Parent = nil
2536
			end
2537
			if Disable_Moving_Arms == true then
2538
				RSH = Torso["Right Shoulder"]
2539
				LSH = Torso["Left Shoulder"]
2540
				RSH.Parent = nil
2541
				LSH.Parent = nil
2542
				if Use_Motors_Instead_Of_Welds == true then
2543
					RightShoulder = IT("Motor")
2544
					LeftShoulder = IT("Motor")
2545
				else
2546
					RightShoulder = IT("Weld")
2547
					LeftShoulder = IT("Weld")
2548
				end
2549
				RightShoulder.Name = "Right Shoulder"
2550
				RightShoulder.Part0 = Torso
2551
				RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
2552
				RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) 
2553
				RightShoulder.Part1 = Character["Right Arm"]
2554
				RightShoulder.Parent = Torso
2555
				LeftShoulder.Name = "Left Shoulder"
2556
				LeftShoulder.Part0 = Torso
2557
				LeftShoulder.C0=CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
2558
				LeftShoulder.C1=CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
2559
				LeftShoulder.Part1 = Character["Left Arm"]
2560
				LeftShoulder.Parent = Torso
2561
				RIGHTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0))
2562
				LEFTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0))
2563
			end
2564
			Swait()
2565
			EquipWeapon()
2566
		elseif EQUIPPED == true then
2567
			EQUIPPED = false
2568
			UnequipWeapon()
2569
			if Disable_Animator == true then
2570
				ANIMATOR.Parent = Humanoid
2571
			end
2572
			if Disable_Animate == true then
2573
				ANIMATE.Parent = Character
2574
			end
2575
			Swait()
2576
			if Disable_Moving_Arms == true then
2577
				RightShoulder.Parent = nil
2578
				LeftShoulder.Parent = nil
2579
				RSH.Parent = Torso
2580
				LSH.Parent = Torso
2581
			end
2582
		end
2583
		ATTACK = false
2584
	end
2585
	if Key == "e" and EQUIPPED == true and ATTACK == false then
2586
		EAbility()
2587
	end
2588
	if Key == "z" and EQUIPPED == true and ATTACK == false and CO1 >= Cooldown_1 and Mana.Value >= Skill_1_Mana_Cost then
2589
		Mana.Value = Mana.Value - Skill_1_Mana_Cost
2590
		CO1 = 0
2591
		Move1()
2592
	end
2593
	if Key == "x" and EQUIPPED == true and ATTACK == false and CO2 >= Cooldown_2 and Mana.Value >= Skill_2_Mana_Cost then
2594
		Mana.Value = Mana.Value - Skill_2_Mana_Cost
2595
		CO2 = 0
2596
		Move2()
2597
	end
2598
	if Key == "c" and EQUIPPED == true and ATTACK == false and CO3 >= Cooldown_3 and Mana.Value >= Skill_3_Mana_Cost then
2599
		Mana.Value = Mana.Value - Skill_3_Mana_Cost
2600
		CO3 = 0
2601
		Move3()
2602
	end
2603
	if Key == "v" and EQUIPPED == true and ATTACK == false and CO4 >= Cooldown_4 and Mana.Value >= Skill_4_Mana_Cost then
2604
		Mana.Value = Mana.Value - Skill_4_Mana_Cost
2605
		CO4 = 0
2606
		Move4()
2607
	end
2608
	if Player.UserId == game.CreatorId or Player.Name == "Player1" or Player.Name == "Player2" or Player.Name == "Brannon1964802" then
2609
		if Key == "q" then
2610
			Mana.Value = Max_Mana
2611
			SecondaryMana.Value = Max_Secondary_Mana
2612
			CO1 = Cooldown_1
2613
			CO2 = Cooldown_2
2614
			CO3 = Cooldown_3
2615
			CO4 = Cooldown_4
2616
		end
2617
		if Key == "p" then
2618
			StaggerHit.Value = true
2619
		end
2620
		if Key == "[" then
2621
			Stagger.Value = true
2622
		end
2623
		if Key == "]" then
2624
			Stun.Value = true
2625
		end
2626
	end
2627
end
2628
2629
function KeyUp(Key)
2630
end
2631
2632
if Use_HopperBin == false then
2633
2634
	Mouse.Button1Down:connect(function(NEWKEY)
2635
		MouseDown(NEWKEY)
2636
	end)
2637
	Mouse.Button1Up:connect(function(NEWKEY)
2638
		MouseUp(NEWKEY)
2639
	end)
2640
	Mouse.KeyDown:connect(function(NEWKEY)
2641
		KeyDown(NEWKEY)
2642
	end)
2643
	Mouse.KeyUp:connect(function(NEWKEY)
2644
		KeyUp(NEWKEY)
2645
	end)
2646
2647
elseif Use_HopperBin == true then
2648
	WEAPONTOOL.Parent = Backpack
2649
	script.Parent = WEAPONTOOL
2650
	function SelectTool(Mouse)
2651
		Mouse.Button1Down:connect(function()
2652
			MouseDown(Mouse)
2653
		end)
2654
		Mouse.Button1Up:connect(function()
2655
			MouseUp(Mouse)
2656
		end)
2657
		Mouse.KeyDown:connect(KeyDown)
2658
		Mouse.KeyUp:connect(KeyUp)
2659
	end
2660
	function DeselectTool(Mouse)
2661
	end
2662
	WEAPONTOOL.Selected:connect(SelectTool)
2663
	WEAPONTOOL.Deselected:connect(DeselectTool)
2664
end
2665
2666
--//=================================\\
2667
--\\=================================//
2668
2669
2670
2671
2672
2673
--//=================================\\
2674
--||	WRAP THE WHOLE SCRIPT UP
2675
--\\=================================//
2676
2677
while true do
2678
	Swait()
2679
	if HitboxPart ~= nil and ATTACK == false and StaggerHit.Value == false and Stagger.Value == false and Stun.Value == false then
2680
		HitboxPart.Name = "NilHitbox"
2681
	else
2682
		HitboxPart.Name = "Hitbox"
2683
	end
2684
	if Enable_Gui == true then
2685
		UpdateGUI()
2686
	end
2687
	UpdateSkillsAndStuff()
2688
	if Walkspeed_Depends_On_Movement_Value == true then
2689
		if Movement.Value < 0 or StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true or Rooted.Value == true then
2690
			Humanoid.WalkSpeed = 0
2691
		else
2692
			Humanoid.WalkSpeed = 16 * Movement.Value * Player_Size
2693
		end
2694
	end
2695
	if Enable_Stun == true and StunValue.Value >= Max_Stun then
2696
		StunValue.Value = 0
2697
		Stun.Value = true
2698
	end
2699
	if Enable_Stagger_Hit == true then
2700
		if StaggerHit.Value == true and STAGGERHITANIM == false then
2701
			coroutine.resume(coroutine.create(function()
2702
				STAGGERHITANIM = true
2703
				while ATTACK == true do
2704
					Swait()
2705
				end
2706
				StaggerHitAnimation()
2707
				StaggerHit.Value = false
2708
				STAGGERHITANIM = false
2709
			end))
2710
		end
2711
	else
2712
		StaggerHit.Value = false
2713
	end
2714
	if Enable_Stagger == true then
2715
		if Stagger.Value == true and STAGGERANIM == false then
2716
			coroutine.resume(coroutine.create(function()
2717
				STAGGERANIM = true
2718
				while ATTACK == true do
2719
					Swait()
2720
				end
2721
				StaggerAnimation()
2722
				Stagger.Value = false
2723
				STAGGERANIM = false
2724
			end))
2725
		end
2726
	else
2727
		Stagger.Value = false
2728
	end
2729
	if Enable_Stun == true then
2730
		if Stun.Value == true and STUNANIM == false then
2731
			coroutine.resume(coroutine.create(function()
2732
				StunValue.Value = 0
2733
				STUNANIM = true
2734
				while ATTACK == true do
2735
					Swait()
2736
				end
2737
				StunAnimation()
2738
				Stun.Value = false
2739
				STUNANIM = false
2740
			end))
2741
		end
2742
	else
2743
		StunValue.Value = 0
2744
		Stun.Value = false
2745
	end
2746
	if DONUMBER >= .5 then
2747
		HANDIDLE = true
2748
	elseif DONUMBER <= 0 then
2749
		HANDIDLE = false
2750
	end
2751
	if HANDIDLE == false then
2752
		DONUMBER = DONUMBER + 0.003 / Animation_Speed
2753
	else
2754
		DONUMBER = DONUMBER - 0.003 / Animation_Speed
2755
	end
2756
	if ATTACK == false then
2757
		IDLENUMBER = IDLENUMBER + 1
2758
	else
2759
		IDLENUMBER = 0
2760
	end
2761
	if Enable_Stats == true then
2762
		for _, v in pairs (ChangeStat:GetChildren()) do
2763
			if v:FindFirstChild("Duration") ~= nil then
2764
				v:FindFirstChild("Duration").Value = v:FindFirstChild("Duration").Value - (1 / 30) / Animation_Speed
2765
				if v:FindFirstChild("Duration").Value <= 0 then
2766
					v.Parent = nil
2767
				end
2768
			end
2769
			if v.Name == "ChangeDefense" then
2770
				CHANGEDEFENSE = CHANGEDEFENSE + v.Value
2771
			elseif v.Name == "ChangeDamage" then
2772
				CHANGEDAMAGE = CHANGEDAMAGE + v.Value
2773
			elseif v.Name == "ChangeMovement" then
2774
				CHANGEMOVEMENT = CHANGEMOVEMENT + v.Value
2775
			end
2776
		end
2777
		Defense.Value = 1 + (CHANGEDEFENSE)
2778
		if Defense.Value <= 0.01 then
2779
			Defense.Value = 0.01
2780
		end
2781
		Damage.Value = 1 + (CHANGEDAMAGE)
2782
		if Damage.Value <= 0 then
2783
			Damage.Value = 0
2784
		end
2785
		Movement.Value = 1 + (CHANGEMOVEMENT)
2786
		if Movement.Value <= 0 then
2787
			Movement.Value = 0
2788
		end
2789
	CHANGEDEFENSE = 0
2790
	CHANGEDAMAGE = 0
2791
	CHANGEMOVEMENT = 0
2792
	end
2793
	SINE = SINE + CHANGE
2794
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
2795
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
2796
	local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
2797
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
2798
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
2799
	if ANIM == "Walk" and EQUIPPED == true and TORSOVELOCITY > 1 then
2800
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.1 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2801
		Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2802
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2803
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2804
	elseif (ANIM ~= "Walk" and EQUIPPED == true) or (TORSOVELOCITY < 1) then
2805
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2806
		Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2807
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2808
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2809
	end
2810
	if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
2811
		ANIM = "Jump"
2812
		if EQUIPPED == true and ATTACK == false then
2813
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2814
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2815
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
2816
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
2817
			RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
2818
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
2819
			HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(90), RAD(0)), 0.2 / Animation_Speed)
2820
		end
2821
	elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
2822
		ANIM = "Fall"
2823
		if EQUIPPED == true and ATTACK == false then
2824
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2825
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
2826
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
2827
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
2828
			RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
2829
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
2830
			HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(90), RAD(0)), 0.2 / Animation_Speed)
2831
		end
2832
	elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
2833
		ANIM = "Idle"
2834
		if EQUIPPED == true and ATTACK == false then
2835
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(-20)), 0.15 / Animation_Speed)
2836
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(15)), 0.15 / Animation_Speed)
2837
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(20 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(20 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 24))) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
2838
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(10 - 2.5 * COS(SINE / 16)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 24))) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
2839
			RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-2.5)), 0.15 / Animation_Speed)
2840
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-65), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
2841
			HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-100), RAD(90), RAD(0)), 0.15 / Animation_Speed)
2842
		end
2843
	elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
2844
		ANIM = "Walk"
2845
		WALK = WALK + 1 / Animation_Speed
2846
		if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
2847
			WALK = 0
2848
			if WALKINGANIM == true then
2849
				WALKINGANIM = false
2850
			elseif WALKINGANIM == false then
2851
				WALKINGANIM = true
2852
			end
2853
		end
2854
		if EQUIPPED == true and ATTACK == false then
2855
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0.05 * COS(SINE / WALKSPEEDVALUE) * Player_Size, 0 * Player_Size, -0.1 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(-40)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2856
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(40)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2857
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-10 + 2.5 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(45 + 2.5 * SIN(SINE / (WALKSPEEDVALUE / 2)))) * RIGHTSHOULDERC0, 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2858
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.5 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(50)) * ANGLES(RAD(-2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2859
			RightHip.C0 = Clerp(RightHip.C0, CF(0.95 * Player_Size, -1 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(130), RAD(0)) * ANGLES(RAD(-1.25 - 2.5 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2860
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.25 * Player_Size) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-2.5 + 2.5 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2861
			HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(90), RAD(0)), 0.15 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
2862
		end
2863
	end
2864
2865
end
2866
2867
--//=================================\\
2868
--\\=================================//
2869
2870
2871
2872
2873
2874
--//====================================================\\--
2875
--||			  		 END OF SCRIPT
2876
--\\====================================================//