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