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