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