View difference between Paste ID: a8eas6Ty and 1yybsjsB
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
 
3
local Player,game,owner = owner,game
4
 
5
local RealPlayer = Player
6
 
7
do print("FE Compatibility code V3 by Desered_ROBLOX")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
8
--//====================================================\\--
9
--||			   CREATED BY PSYCHO SHACKLUSTER
10
--\\====================================================//--
11
12
13
14
wait(0.3)
15
16
17
18
Player = game:GetService("Players").LocalPlayer
19
PlayerGui = Player.PlayerGui
20
Cam = workspace.CurrentCamera
21
Backpack = Player.Backpack
22
Character = Player.Character
23
Humanoid = Character.Humanoid
24
Mouse = Player:GetMouse()
25
RootPart = Character["HumanoidRootPart"]
26
Torso = Character["Torso"]
27
Head = Character["Head"]
28
RightArm = Character["Right Arm"]
29
LeftArm = Character["Left Arm"]
30
RightLeg = Character["Right Leg"]
31
LeftLeg = Character["Left Leg"]
32
RootJoint = RootPart["RootJoint"]
33
Neck = Torso["Neck"]
34
RightShoulder = Torso["Right Shoulder"]
35
LeftShoulder = Torso["Left Shoulder"]
36
RightHip = Torso["Right Hip"]
37
LeftHip = Torso["Left Hip"]
38
hasdied = false
39
demon = false
40
41
IT = Instance.new
42
CF = CFrame.new
43
VT = Vector3.new
44
RAD = math.rad
45
C3 = Color3.new
46
UD2 = UDim2.new
47
BRICKC = BrickColor.new
48
ANGLES = CFrame.Angles
49
EULER = CFrame.fromEulerAnglesXYZ
50
COS = math.cos
51
ACOS = math.acos
52
SIN = math.sin
53
ASIN = math.asin
54
ABS = math.abs
55
MRANDOM = math.random
56
FLOOR = math.floor
57
58
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
59
	local NEWMESH = IT(MESH)
60
	if MESH == "SpecialMesh" then
61
		NEWMESH.MeshType = MESHTYPE
62
		if MESHID ~= "nil" and MESHID ~= "" then
63
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
64
		end
65
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
66
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
67
		end
68
	end
69
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
70
	NEWMESH.Scale = SCALE
71
	NEWMESH.Parent = PARENT
72
	return NEWMESH
73
end
74
75
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
76
	local NEWPART = IT("Part")
77
	NEWPART.formFactor = FORMFACTOR
78
	NEWPART.Reflectance = REFLECTANCE
79
	NEWPART.Transparency = TRANSPARENCY
80
	NEWPART.CanCollide = false
81
	NEWPART.Locked = true
82
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
83
	NEWPART.Name = NAME
84
	NEWPART.Size = SIZE
85
	NEWPART.Position = Torso.Position
86
	NEWPART.Material = MATERIAL
87
	NEWPART:BreakJoints()
88
	NEWPART.Parent = PARENT
89
	return NEWPART
90
end
91
92
93
--//=================================\\
94
--||		  CUSTOMIZATION
95
--\\=================================//
96
97
Class_Name = "Chainiac"
98
Weapon_Name = "Chainiac"
99
100
Custom_Colors = {
101
	Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
102
	Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
103
104
	Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
105
	Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
106
	Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
107
	Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
108
	Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
109
110
	Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
111
	Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
112
	Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
113
	Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
114
	Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
115
}
116
117
Mana_Bar_Background_Transparency = 0 --Transparency for the background of the mana bar.
118
Secondary_Mana_Bar_Background_Transparency = 0 --Transparency for the background of the secondary mana bar.
119
Health_Bar_Background_Transparency = 0 --Transparency for the background of the health bar.
120
Stun_Bar_Background_Transparency = 0 --Transparency for the background of the stun bar.
121
Ability_Background_Transparency = 0  --Transparency for the background of the abilities.
122
Stat_Background_Transparency = 0 --Transparency for the background of the stats.
123
124
Player_Size = 1 --Size of the player.
125
Animation_Speed = 5.2
126
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
127
128
Enable_Gui = false --Enables or disables the Weapon Gui. Also functions as hiding or showing the Gui.
129
Enable_Stats = false --Enables or disables stats.
130
Put_Stats_In_Character = false --Places stats in Character.
131
Enable_Stagger_Hit = false --Enables or disables staggering when hitting a hitbox of some sort.
132
Play_Hitbox_Hit_Sound = true --Plays a hit sound when hitting a hitbox of some sort.
133
Enable_Stagger = false --Enables or disables staggering.
134
Enable_Stun = false --Enables or disables the stun mechanic.
135
Enable_Abilities = false --Enables abilites with cooldowns and mana costs.
136
Enable_Secondary_Bar = false --Enables the secondary mana bar, if true.
137
138
Start_Equipped = false --Starts the player equipped with their weapon.
139
Start_Equipped_With_Equipped_Animation = false --Used in conjunction with the above option. Starts your equip animation.
140
Can_Equip_Or_Unequip = false --Enables or disables the ability to unequip or equip your weapon.
141
Disable_Animator = false --Disables the Animator in the humanoid.
142
Disable_Animate = true --Disables the Animate script in the character.
143
Disable_Moving_Arms = false --Keeps the arms from moving around.
144
Use_Motors_Instead_Of_Welds = false --Uses motors instead of welds to disable moving arms.
145
Walkspeed_Depends_On_Movement_Value = false --Walkspeed depends on movement value. Self-explanatory.
146
Disable_Jump = false --Disables jumping.
147
Use_HopperBin = false --Uses a hopperbin to do things.
148
149
Cooldown_1 = 0 --Cooldowns for abilites.
150
Cooldown_2 = 0
151
Cooldown_3 = 0
152
Cooldown_4 = 0
153
Skill_1_Mana_Cost = 0 --How much mana is required to use the skill.
154
Skill_2_Mana_Cost = 0
155
Skill_3_Mana_Cost = 0
156
Skill_4_Mana_Cost = 0
157
Max_Mana = 0 --Maximum amount of mana you can have.
158
Max_Secondary_Mana = 0 --Maximum amount of secondary mana you can have.
159
Mana_Name = "Mana" --Name for the mana bar.
160
Secondary_Mana_Name = "Block" --Name for the secondary mana bar.
161
Max_Stun = 1 --Maximum amount of stun you can have.
162
Recover_Mana = 0 --How much mana you gain.
163
Mana_Regen_Mode = "1" --Basically switches from one mana regen system to another.
164
Secondary_Mana_Regen_Mode = "1" --Basically switches from one secondary mana regen system to another.
165
Stun_Lose_Mode = "1" --Basically switches from one secondary stun loss system to another.
166
Recover_Secondary_Mana = 0 --How much secondary mana you gain.
167
Lose_Stun = 0 --How much stun you lose.
168
Stun_Wait = 0 --Delay between losing stun.
169
Mana_Wait = 0 --Delay between gaining mana.
170
Secondary_Mana_Wait = 0 --Delay between gaining secondary mana.
171
Menu_Update_Speed = 0 --How fast the Weapon Gui will update.
172
Constant_Update = false --Removes the delay between updating the Weapon GUI.
173
Show_Stats = false --Hides or shows stats.
174
Stat_Offset = 0.74 --For cosmetic purposes. {0.74, 0.78}
175
176
--//=================================\\
177
--|| 	  END OF CUSTOMIZATION
178
--\\=================================//
179
180
	local function weldBetween(a, b)
181
	    local weldd = Instance.new("ManualWeld")
182
	    weldd.Part0 = a
183
	    weldd.Part1 = b
184
	    weldd.C0 = CFrame.new()
185
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
186
	    weldd.Parent = a
187
	    return weldd
188
	end
189
190
function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
191
local acs = Instance.new("Part")
192
acs.CanCollide = false
193
acs.Anchored = false
194
acs.Size = Vector3.new(0,0,0)
195
acs.CFrame = attachmentpart.CFrame
196
acs.Parent = Character
197
acs.BrickColor = color
198
    local meshs = Instance.new("SpecialMesh")
199
    meshs.MeshId = mesh
200
    meshs.TextureId = texture
201
    meshs.Parent = acs
202
    meshs.Scale = scale
203
    meshs.Offset = offset
204
weldBetween(attachmentpart,acs)
205
end
206
207
local accessories = Instance.new("Folder",Character)
208
accessories.Name = "Add-ons"
209
210
function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
211
if TYPE == "Gem" then
212
	local acs = CreatePart(3, accessories, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
213
	acs.Anchored = false
214
    acs.CanCollide = false
215
	acs.CFrame = PART.CFrame
216
	local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
217
weldBetween(PART,acs)
218
elseif TYPE == "Skull" then
219
	local acs = CreatePart(3, accessories, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
220
	acs.Anchored = false
221
    acs.CanCollide = false
222
	acs.CFrame = PART.CFrame
223
	local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
224
weldBetween(PART,acs)
225
elseif TYPE == "Eye" then
226
	local acs = CreatePart(3, accessories, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
227
	acs.Anchored = false
228
    acs.CanCollide = false
229
	acs.CFrame = PART.CFrame
230
	local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
231
weldBetween(PART,acs)
232
end
233
end
234
235
--//=================================\\
236
--|| 	      USEFUL VALUES
237
--\\=================================//
238
239
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
240
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
241
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
242
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
243
local CO1 = 0
244
local CO2 = 0
245
local CO3 = 0
246
local CO4 = 0
247
local KEYHOLD = false
248
local CHANGEDEFENSE = 0
249
local CHANGEDAMAGE = 0
250
local CHANGEMOVEMENT = 0
251
local ANIM = "Idle"
252
local ATTACK = false
253
local EQUIPPED = false
254
local HOLD = false
255
local COMBO = 1
256
local LASTPOINT = nil
257
local BLCF = nil
258
local SCFR = nil
259
local STAGGERHITANIM = false
260
local STAGGERANIM = false
261
local STUNANIM = false
262
local CRITCHANCENUMBER = 0
263
local IDLENUMBER = 0
264
local DONUMBER = 0
265
local HANDIDLE = false
266
local SINE = 0
267
local CHANGE = 2 / Animation_Speed
268
local WALKINGANIM = false
269
local WALK = 0
270
local DISABLEJUMPING = false
271
local HASBEENBLOCKED = false
272
local INTRODONE = false
273
local STUNDELAYNUMBER = 0
274
local MANADELAYNUMBER = 0
275
local SECONDARYMANADELAYNUMBER = 0
276
local ROBLOXIDLEANIMATION = IT("Animation")
277
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
278
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
279
--ROBLOXIDLEANIMATION.Parent = Humanoid
280
local WEAPONGUI = IT("ScreenGui", nil)
281
WEAPONGUI.Name = "Weapon GUI"
282
local WEAPONTOOL = IT("HopperBin", nil)
283
WEAPONTOOL.Name = Weapon_Name
284
local Weapon = IT("Model")
285
Weapon.Name = Weapon_Name
286
local Effects = IT("Folder", Weapon)
287
Effects.Name = "Effects"
288
local ANIMATOR = Humanoid.Animator
289
local ANIMATE = Character.Animate
290
local HITPLAYERSOUNDS = {"703633905","264486467","356551938"}
291
local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
292
local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
293
local HITBLOCKSOUNDS = {"199148933", "199148947"}
294
local CHAINSAWIDLE = Instance.new("Sound",Torso)
295
CHAINSAWIDLE.SoundId = "rbxassetid://1165167610"
296
CHAINSAWIDLE.Volume = 3
297
CHAINSAWIDLE.Looped = true
298
local REV = Instance.new("Sound",Torso)
299
REV.SoundId = "rbxassetid://1165167936"
300
REV.Looped = true
301
REV.Volume = 1.6
302
local CHAINSAWSTRIKE = Instance.new("Sound",Torso)
303
CHAINSAWSTRIKE.Playing = false
304
CHAINSAWSTRIKE.SoundId = "rbxassetid://862701802"
305
local Taunt1 = Instance.new("Sound",Torso)
306
Taunt1.Volume = 3
307
Taunt1.SoundId = "rbxassetid://834001699"
308
local Taunt2 = Instance.new("Sound",Torso)
309
Taunt2.Volume = 3
310
Taunt2.SoundId = "rbxassetid://834001752"
311
local Taunt3 = Instance.new("Sound",Torso)
312
Taunt3.Volume = 3
313
Taunt3.SoundId = "rbxassetid://834001797"
314
local Taunt4 = Instance.new("Sound",Torso)
315
Taunt4.Volume = 3
316
Taunt4.SoundId = "rbxassetid://834001828"
317
local TAUNTS = {Taunt1,Taunt2,Taunt3,Taunt4}
318
local FRESHMEAT = Instance.new("Sound",Torso)
319
FRESHMEAT.Playing = false
320
FRESHMEAT.Volume = 5
321
FRESHMEAT.SoundId = "rbxassetid://2767085"
322
local sick = Instance.new("Sound",Character)
323
sick.SoundId = "rbxassetid://1120185600"
324
sick.Looped = true
325
sick.Pitch = 0.6
326
sick.Volume = 1
327
--//=================================\\
328
--\\=================================//
329
330
--//=================================\\
331
--||			  STATS
332
--\\=================================//
333
334
if Character:FindFirstChild("Stats") ~= nil then
335
Character:FindFirstChild("Stats").Parent = nil
336
end
337
338
local Stats = IT("Folder", nil)
339
Stats.Name = "Stats"
340
local ChangeStat = IT("Folder", Stats)
341
ChangeStat.Name = "ChangeStat"
342
local Defense = IT("NumberValue", Stats)
343
Defense.Name = "Defense"
344
Defense.Value = 1
345
local Movement = IT("NumberValue", Stats)
346
Movement.Name = "Movement"
347
Movement.Value = 1
348
local Damage = IT("NumberValue", Stats)
349
Damage.Name = "Damage"
350
Damage.Value = 1
351
local Mana = IT("NumberValue", Stats)
352
Mana.Name = "Mana"
353
Mana.Value = 0
354
local SecondaryMana = IT("NumberValue", Stats)
355
SecondaryMana.Name = "SecondaryMana"
356
SecondaryMana.Value = 0
357
local CanCrit = IT("BoolValue", Stats)
358
CanCrit.Name = "CanCrit"
359
CanCrit.Value = false
360
local CritChance = IT("NumberValue", Stats)
361
CritChance.Name = "CritChance"
362
CritChance.Value = 20
363
local CanPenetrateArmor = IT("BoolValue", Stats)
364
CanPenetrateArmor.Name = "CanPenetrateArmor"
365
CanPenetrateArmor.Value = false
366
local AntiTeamKill = IT("BoolValue", Stats)
367
AntiTeamKill.Name = "AntiTeamKill"
368
AntiTeamKill.Value = false
369
local Rooted = IT("BoolValue", Stats)
370
Rooted.Name = "Rooted"
371
Rooted.Value = false
372
local Block = IT("BoolValue", Stats)
373
Block.Name = "Block"
374
Block.Value = false
375
local RecentEnemy = IT("ObjectValue", Stats)
376
RecentEnemy.Name = "RecentEnemy"
377
RecentEnemy.Value = nil
378
local StaggerHit = IT("BoolValue", Stats)
379
StaggerHit.Name = "StaggerHit"
380
StaggerHit.Value = false
381
local Stagger = IT("BoolValue", Stats)
382
Stagger.Name = "Stagger"
383
Stagger.Value = false
384
local Stun = IT("BoolValue", Stats)
385
Stun.Name = "Stun"
386
Stun.Value = false
387
local StunValue = IT("NumberValue", Stats)
388
StunValue.Name = "StunValue"
389
StunValue.Value = 0
390
391
if Enable_Stats == true and Put_Stats_In_Character == true then
392
	Stats.Parent = Character
393
end
394
395
--//=================================\\
396
--\\=================================//
397
398
399
400
401
402
--//=================================\\
403
--|| 	     DEBUFFS / BUFFS
404
--\\=================================//
405
406
local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
407
DEFENSECHANGE1.Name = "ChangeDefense"
408
DEFENSECHANGE1.Value = 0
409
410
local MOVEMENTCHANGE1 = IT("NumberValue", nil)
411
MOVEMENTCHANGE1.Name = "ChangeMovement"
412
MOVEMENTCHANGE1.Value = 0
413
414
--//=================================\\
415
--\\=================================//
416
417
418
419
420
421
--//=================================\\
422
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
423
--\\=================================//
424
425
ArtificialHB = Instance.new("BindableEvent", script)
426
ArtificialHB.Name = "ArtificialHB"
427
428
script:WaitForChild("ArtificialHB")
429
430
frame = Frame_Speed
431
tf = 0
432
allowframeloss = false
433
tossremainder = false
434
lastframe = tick()
435
script.ArtificialHB:Fire()
436
437
game:GetService("RunService").Heartbeat:connect(function(s, p)
438
	tf = tf + s
439
	if tf >= frame then
440
		if allowframeloss then
441
			script.ArtificialHB:Fire()
442
			lastframe = tick()
443
		else
444
			for i = 1, math.floor(tf / frame) do
445
				script.ArtificialHB:Fire()
446
			end
447
		lastframe = tick()
448
		end
449
		if tossremainder then
450
			tf = 0
451
		else
452
			tf = tf - frame * math.floor(tf / frame)
453
		end
454
	end
455
end)
456
457
--//=================================\\
458
--\\=================================//
459
460
461
462
463
464
--//=================================\\
465
--|| 	      SOME FUNCTIONS
466
--\\=================================//
467
468
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
469
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
470
end
471
472
function PositiveAngle(NUMBER)
473
	if NUMBER >= 0 then
474
		NUMBER = 0
475
	end
476
	return NUMBER
477
end
478
479
function NegativeAngle(NUMBER)
480
	if NUMBER <= 0 then
481
		NUMBER = 0
482
	end
483
	return NUMBER
484
end
485
486
function Swait(NUMBER)
487
	if NUMBER == 0 or NUMBER == nil then
488
		ArtificialHB.Event:wait()
489
	else
490
		for i = 1, NUMBER do
491
			ArtificialHB.Event:wait()
492
		end
493
	end
494
end
495
496
function QuaternionFromCFrame(cf)
497
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
498
	local trace = m00 + m11 + m22
499
	if trace > 0 then 
500
		local s = math.sqrt(1 + trace)
501
		local recip = 0.5 / s
502
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
503
	else
504
		local i = 0
505
		if m11 > m00 then
506
			i = 1
507
		end
508
		if m22 > (i == 0 and m00 or m11) then
509
			i = 2
510
		end
511
		if i == 0 then
512
			local s = math.sqrt(m00 - m11 - m22 + 1)
513
			local recip = 0.5 / s
514
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
515
		elseif i == 1 then
516
			local s = math.sqrt(m11 - m22 - m00 + 1)
517
			local recip = 0.5 / s
518
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
519
		elseif i == 2 then
520
			local s = math.sqrt(m22 - m00 - m11 + 1)
521
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
522
		end
523
	end
524
end
525
 
526
function QuaternionToCFrame(px, py, pz, x, y, z, w)
527
	local xs, ys, zs = x + x, y + y, z + z
528
	local wx, wy, wz = w * xs, w * ys, w * zs
529
	local xx = x * xs
530
	local xy = x * ys
531
	local xz = x * zs
532
	local yy = y * ys
533
	local yz = y * zs
534
	local zz = z * zs
535
	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))
536
end
537
 
538
function QuaternionSlerp(a, b, t)
539
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
540
	local startInterp, finishInterp;
541
	if cosTheta >= 0.0001 then
542
		if (1 - cosTheta) > 0.0001 then
543
			local theta = ACOS(cosTheta)
544
			local invSinTheta = 1 / SIN(theta)
545
			startInterp = SIN((1 - t) * theta) * invSinTheta
546
			finishInterp = SIN(t * theta) * invSinTheta
547
		else
548
			startInterp = 1 - t
549
			finishInterp = t
550
		end
551
	else
552
		if (1 + cosTheta) > 0.0001 then
553
			local theta = ACOS(-cosTheta)
554
			local invSinTheta = 1 / SIN(theta)
555
			startInterp = SIN((t - 1) * theta) * invSinTheta
556
			finishInterp = SIN(t * theta) * invSinTheta
557
		else
558
			startInterp = t - 1
559
			finishInterp = t
560
		end
561
	end
562
	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
563
end
564
565
function Clerp(a, b, t)
566
	local qa = {QuaternionFromCFrame(a)}
567
	local qb = {QuaternionFromCFrame(b)}
568
	local ax, ay, az = a.x, a.y, a.z
569
	local bx, by, bz = b.x, b.y, b.z
570
	local _t = 1 - t
571
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
572
end
573
574
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
575
	local frame = IT("Frame")
576
	frame.BackgroundTransparency = TRANSPARENCY
577
	frame.BorderSizePixel = BORDERSIZEPIXEL
578
	frame.Position = POSITION
579
	frame.Size = SIZE
580
	frame.BackgroundColor3 = COLOR
581
	frame.BorderColor3 = BORDERCOLOR
582
	frame.Name = NAME
583
	frame.Parent = PARENT
584
	return frame
585
end
586
587
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
588
	local label = IT("TextLabel")
589
	label.BackgroundTransparency = 1
590
	label.Size = UD2(1, 0, 1, 0)
591
	label.Position = UD2(0, 0, 0, 0)
592
	label.TextColor3 = C3(255, 255, 255)
593
	label.TextStrokeTransparency = STROKETRANSPARENCY
594
	label.TextTransparency = TRANSPARENCY
595
	label.FontSize = TEXTFONTSIZE
596
	label.Font = TEXTFONT
597
	label.BorderSizePixel = BORDERSIZEPIXEL
598
	label.TextScaled = true
599
	label.Text = TEXT
600
	label.Name = NAME
601
	label.Parent = PARENT
602
	return label
603
end
604
605
function NoOutlines(PART)
606
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
607
end
608
609
610
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
611
	local NEWWELD = IT(TYPE)
612
	NEWWELD.Part0 = PART0
613
	NEWWELD.Part1 = PART1
614
	NEWWELD.C0 = C0
615
	NEWWELD.C1 = C1
616
	NEWWELD.Parent = PARENT
617
	return NEWWELD
618
end
619
620
function CreateSound(ID, PARENT, VOLUME, PITCH)
621
	coroutine.resume(coroutine.create(function()
622
		local NEWSOUND = IT("Sound", PARENT)
623
		NEWSOUND.Volume = VOLUME
624
		NEWSOUND.Pitch = PITCH
625
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
626
		Swait()
627
		NEWSOUND:play()
628
		game:GetService("Debris"):AddItem(NEWSOUND, 10)
629
	end))
630
end
631
632
function CFrameFromTopBack(at, top, back)
633
	local right = top:Cross(back)
634
	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)
635
end
636
637
function Lightning(POSITION1, POSITION2, MULTIPLIERTIME, LIGHTNINGDELAY, OFFSET, BRICKCOLOR, MATERIAL, SIZE, TRANSPARENCY, LASTINGTIME)
638
	local MAGNITUDE = (POSITION1 - POSITION2).magnitude 
639
	local CURRENTPOSITION = POSITION1
640
	local LIGHTNINGOFFSET = {-OFFSET, OFFSET}
641
	coroutine.resume(coroutine.create(function()
642
		for i = 1, MULTIPLIERTIME do 
643
			local LIGHTNINGPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR,"Effect", VT(SIZE * Player_Size, SIZE * Player_Size, MAGNITUDE / MULTIPLIERTIME))
644
			LIGHTNINGPART.Anchored = true
645
			local LIGHTNINGOFFSET2 = VT(LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)]) 
646
			local LIGHTNINGPOSITION1 = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME).p + LIGHTNINGOFFSET2
647
			if MULTIPLIERTIME == i then 
648
				local LIGHTNINGMAGNITUDE1 = (CURRENTPOSITION - POSITION2).magnitude
649
				LIGHTNINGPART.Size = VT(SIZE * Player_Size, SIZE * Player_Size, LIGHTNINGMAGNITUDE1)
650
				LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, -LIGHTNINGMAGNITUDE1 / 2)
651
			else
652
				LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, LIGHTNINGPOSITION1) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2)
653
			end
654
			CURRENTPOSITION=LIGHTNINGPART.CFrame * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2).p
655
			game.Debris:AddItem(LIGHTNINGPART, LASTINGTIME)
656
			coroutine.resume(coroutine.create(function()
657
				while LIGHTNINGPART.Transparency ~= 1 do
658
					--local StartTransparency = tra
659
					for i=0, 1, LASTINGTIME do
660
						Swait()
661
						LIGHTNINGPART.Transparency = LIGHTNINGPART.Transparency + (0.1 / LASTINGTIME)
662
					end
663
				end
664
			end))
665
		Swait(LIGHTNINGDELAY / Animation_Speed)
666
		end
667
	end))
668
end
669
670
--[[Usage:
671
	local Pos = Part
672
	local Offset = Part.CFrame * CF(0, 0, 0)
673
	local Color = "Institutional white"
674
	local Material = "Neon"
675
	local TheDelay = 0.01
676
	local Height = 4
677
	BLCF = Offset
678
	if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then
679
		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)
680
		if a then game:GetService("Debris"):AddItem(a, 1) end
681
		if b then game:GetService("Debris"):AddItem(b, 1) end
682
		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)
683
		if a then game:GetService("Debris"):AddItem(a, 1) end
684
		if b then game:GetService("Debris"):AddItem(b, 1) end
685
		SCFR = BLCF
686
	elseif not SCFR then
687
		SCFR = BLCF
688
	end
689
--
690
BLCF = nil
691
SCFR = nil
692
--]]
693
694
--//=================================\\
695
--\\=================================//
696
697
698
699
700
701
--//=================================\\
702
--||	      RESIZE PLAYER
703
--\\=================================//
704
705
if Player_Size ~= 1 then
706
RootPart.Size = RootPart.Size * Player_Size
707
Torso.Size = Torso.Size * Player_Size
708
Head.Size = Head.Size * Player_Size
709
RightArm.Size = RightArm.Size * Player_Size
710
LeftArm.Size = LeftArm.Size * Player_Size
711
RightLeg.Size = RightLeg.Size * Player_Size
712
LeftLeg.Size = LeftLeg.Size * Player_Size
713
RootJoint.Parent = RootPart
714
Neck.Parent = Torso
715
RightShoulder.Parent = Torso
716
LeftShoulder.Parent = Torso
717
RightHip.Parent = Torso
718
LeftHip.Parent = Torso
719
	
720
RootJoint.C0 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
721
	RootJoint.C1 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0))
722
	Neck.C0 = NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0))
723
	Neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180))
724
	RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0
725
	LeftShoulder.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0
726
	if Disable_Moving_Arms == false then
727
		RightShoulder.C1 = ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5)
728
		LeftShoulder.C1 = ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5)
729
	else
730
		RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
731
		LeftShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size)
732
	end
733
	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))
734
	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))
735
	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))
736
	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))
737
--------------------
738
end
739
740
741
--//=================================\\
742
--\\=================================//
743
744
745
746
747
--//=================================\\
748
--||	     WEAPON CREATION
749
--\\=================================//
750
751
local HandlePart = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Really black", "Handle", VT(0.25*Player_Size,0.25*Player_Size,1.5*Player_Size))
752
local HandleWeld = CreateWeldOrSnapOrMotor("Weld", HandlePart, RightArm, HandlePart, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
753
local chainsaw = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Reddish brown", "Handle", VT(1.2*Player_Size,1.2*Player_Size,5*Player_Size))
754
local axeweld = CreateWeldOrSnapOrMotor("Weld", HandlePart, chainsaw, HandlePart, CF(0 * Player_Size, 0 * Player_Size, 1.6 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
755
local HandleMesh = CreateMesh("SpecialMesh", chainsaw, "FileMesh", "2766469", "184182370", VT(1.3, 1.3, 1.3), VT(0, 0 * Player_Size, 0))
756
local chainsawoverlay = CreatePart(3, Weapon, "SmoothPlastic", 0, 1, "Really red", "Handle", VT(1.2*Player_Size,1.2*Player_Size,5*Player_Size))
757
local axeweld = CreateWeldOrSnapOrMotor("Weld", HandlePart, chainsawoverlay, HandlePart, CF(0 * Player_Size, 0 * Player_Size, 1.6 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
758
local HandleMesh = CreateMesh("SpecialMesh", chainsawoverlay, "FileMesh", "2766469", "", VT(1.4, 1.6, 1.35), VT(0, 0 * Player_Size, 0))
759
760
if Player_Size ~= 1 then
761
	for _, v in pairs (Weapon:GetChildren()) do
762
		if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then
763
			local p1 = v.Part1
764
			v.Part1 = nil
765
			local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components()
766
			v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
767
			v.Part1 = p1
768
		elseif v.ClassName == "Part" then
769
			for _, b in pairs (v:GetChildren()) do
770
				if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then
771
					b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size)
772
				end
773
			end
774
		end
775
	end
776
end
777
778
for _, c in pairs(Weapon:GetChildren()) do
779
	if c.ClassName == "Part" then
780
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
781
	end
782
end
783
784
Weapon.Parent = Character
785
786
Humanoid.Died:connect(function()
787
	ATTACK = true
788
end)
789
790
print(Class_Name.." loaded.")
791
792
--//=================================\\
793
--\\=================================//
794
795
796
--//=================================\\
797
--||			WEAPON GUI
798
--\\=================================//
799
800
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") 
801
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")
802
local MANATEXT = CreateLabel(MANABAR, Mana_Name.." ["..FLOOR(Mana.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Mana Text")
803
804
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")
805
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")
806
local HEALTHTEXT = CreateLabel(HEALTHBAR, "Health ["..FLOOR(Humanoid.Health).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Health Text")
807
808
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")
809
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")
810
local STUNTEXT = CreateLabel(STUNFRAME, "Stun ["..FLOOR(StunValue.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Stun Text")
811
812
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") 
813
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")
814
local SECONDARYMANATEXT = CreateLabel(SECONDARYMANABAR, Secondary_Mana_Name.." ["..FLOOR(SecondaryMana.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Secondary Mana Text")
815
816
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")
817
local DEFENSETEXT = CreateLabel(DEFENSEFRAME, "Defense ["..(Defense.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Defense Text")
818
819
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")
820
local DAMAGETEXT = CreateLabel(DAMAGEFRAME, "Damage ["..(Damage.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Damage Text")
821
822
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")
823
local MOVEMENTTEXT = CreateLabel(MOVEMENTFRAME, "Movement ["..(Movement.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Movement Text")
824
825
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")
826
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")
827
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")
828
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")
829
830
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")
831
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")
832
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")
833
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")
834
835
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Ability 1", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 1")
836
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[X] Ability 2", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 2")
837
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 3")
838
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 4")
839
840
if Enable_Gui == true then
841
	WEAPONGUI.Parent = PlayerGui
842
end
843
844
if Enable_Stats == true and Show_Stats == true then
845
	DEFENSEFRAME.Parent = WEAPONGUI
846
	DAMAGEFRAME.Parent = WEAPONGUI
847
	MOVEMENTFRAME.Parent = WEAPONGUI
848
end
849
850
if Enable_Secondary_Bar == true then
851
	SECONDARYMANABAR.Parent = WEAPONGUI
852
end
853
854
if Enable_Abilities == true then
855
	SKILL1FRAME.Parent = WEAPONGUI
856
	SKILL2FRAME.Parent = WEAPONGUI
857
	SKILL3FRAME.Parent = WEAPONGUI
858
	SKILL4FRAME.Parent = WEAPONGUI
859
end
860
861
if Enable_Stun == true then
862
	STUNFRAME.Parent = WEAPONGUI
863
end
864
865
function UpdateGUI()
866
	MANABAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
867
	MANACOVER:TweenSize(UD2(1 * (Mana.Value / Max_Mana), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
868
	MANATEXT.Text = Mana_Name.." ["..FLOOR(Mana.Value).."]"
869
	HEALTHBAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
870
	HEALTHCOVER:TweenSize(UD2(1 * (Humanoid.Health / Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
871
	HEALTHTEXT.Text = "Health ["..FLOOR(Humanoid.Health).."]"
872
	if Enable_Abilities == true then
873
		SKILL1FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
874
		SKILL2FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
875
		SKILL3FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
876
		SKILL4FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
877
		SKILL1BAR:TweenSize(UD2(1 * (CO1 / Cooldown_1), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
878
		SKILL2BAR:TweenSize(UD2(1 * (CO2 / Cooldown_2), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
879
		SKILL3BAR:TweenSize(UD2(1 * (CO3 / Cooldown_3), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
880
		SKILL4BAR:TweenSize(UD2(1 * (CO4 / Cooldown_4), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
881
	end
882
	if Enable_Stats == true and Show_Stats == true then
883
		DEFENSEFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update)
884
		DEFENSETEXT.Text = "Defense ["..(Defense.Value * 100).."%]"
885
		DAMAGEFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update)
886
		DAMAGETEXT.Text = "Damage ["..(Damage.Value * 100).."%]"
887
		MOVEMENTFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update)
888
		MOVEMENTTEXT.Text = "Movement ["..(Movement.Value * 100).."%]"
889
	end
890
	if Enable_Stun == true then
891
		STUNFRAME:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
892
		STUNBAR:TweenSize(UD2(1 * (StunValue.Value / Max_Stun), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
893
		STUNTEXT.Text = "Stun ["..FLOOR(StunValue.Value).."]"
894
	end
895
	if Enable_Secondary_Bar == true then
896
		SECONDARYMANABAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
897
		SECONDARYMANACOVER:TweenSize(UD2(1 * (SecondaryMana.Value / Max_Secondary_Mana), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update)
898
		SECONDARYMANATEXT.Text = Secondary_Mana_Name.." ["..FLOOR(SecondaryMana.Value).."]"
899
	end
900
end
901
902
if Enable_Gui == true then
903
	UpdateGUI()
904
	for _, v in pairs (WEAPONGUI:GetChildren()) do
905
		if v.ClassName == "Frame" then
906
			for _, b in pairs (v:GetChildren()) do
907
				if b.ClassName == "TextLabel" then
908
					coroutine.resume(coroutine.create(function(THETEXTLABEL)
909
						wait(Menu_Update_Speed)
910
						for i = 1, 0, -0.1 do
911
							Swait()
912
							THETEXTLABEL.TextTransparency = i
913
							THETEXTLABEL.TextStrokeTransparency = i
914
							end
915
						THETEXTLABEL.TextTransparency = 0
916
						THETEXTLABEL.TextStrokeTransparency = 0
917
					end), b)
918
				end
919
			end
920
		end
921
	end
922
end
923
924
--//=================================\\
925
--\\=================================//
926
927
928
929
930
931
--//=================================\\
932
--||	     SKILL FUNCTIONS
933
--\\=================================//
934
935
function UpdateSkillsAndStuff()
936
	if Mana_Regen_Mode == "1" then
937
		if Mana.Value >= Max_Mana then
938
			Mana.Value = Max_Mana
939
		elseif Mana.Value < 0 then
940
			Mana.Value = 0
941
		else
942
			if MANADELAYNUMBER <= Mana_Wait then
943
				MANADELAYNUMBER = MANADELAYNUMBER + 1
944
			else
945
				MANADELAYNUMBER = 0
946
				Mana.Value = Mana.Value + Recover_Mana
947
			end
948
		end
949
	elseif Mana_Regen_Mode == "2" then
950
		if Mana.Value <= Max_Mana then
951
			Mana.Value = Mana.Value + (Recover_Mana / 30) / Animation_Speed
952
		elseif Mana.Value >= Max_Mana then
953
			Mana.Value = Max_Mana
954
		elseif Mana.Value < 0 then
955
			Mana.Value = 0
956
		end
957
	end
958
	if Enable_Secondary_Bar == true then
959
		if Secondary_Mana_Regen_Mode == "1" then
960
			if SecondaryMana.Value >= Max_Secondary_Mana then
961
				SecondaryMana.Value = Max_Secondary_Mana
962
			elseif SecondaryMana.Value < 0 then
963
				SecondaryMana.Value = 0
964
			else
965
				if SECONDARYMANADELAYNUMBER <= Secondary_Mana_Wait then
966
					SECONDARYMANADELAYNUMBER = SECONDARYMANADELAYNUMBER + 1
967
				else
968
					SECONDARYMANADELAYNUMBER = 0
969
					SecondaryMana.Value = SecondaryMana.Value + Recover_Secondary_Mana
970
				end
971
			end
972
		elseif Secondary_Mana_Regen_Mode == "2" then
973
			if SecondaryMana.Value <= Max_Secondary_Mana then
974
				SecondaryMana.Value = SecondaryMana.Value + (Recover_Secondary_Mana / 30) / Animation_Speed
975
			elseif SecondaryMana.Value >= Max_Secondary_Mana then
976
				SecondaryMana.Value = Max_Secondary_Mana
977
			elseif SecondaryMana.Value < 0 then
978
				SecondaryMana.Value = 0
979
			end
980
		end
981
	else
982
		SecondaryMana.Value = 0
983
	end
984
	if Enable_Stun == true then
985
		if Stun_Lose_Mode == "1" then
986
			if StunValue.Value > Max_Stun then
987
				StunValue.Value = Max_Stun
988
			elseif StunValue.Value <= 0 then
989
				StunValue.Value = 0
990
			else
991
				if STUNDELAYNUMBER <= Stun_Wait then
992
					STUNDELAYNUMBER = STUNDELAYNUMBER + 1
993
				else
994
					STUNDELAYNUMBER = 0
995
					StunValue.Value = StunValue.Value - Lose_Stun
996
				end
997
			end
998
		elseif Stun_Lose_Mode == "2" then
999
			if StunValue.Value <= Max_Stun and StunValue.Value > 0 then
1000
				StunValue.Value = StunValue.Value - (Lose_Stun / 30) / Animation_Speed
1001
			elseif StunValue.Value > Max_Stun then
1002
				StunValue.Value = Max_Stun
1003
			elseif StunValue.Value <= 0 then
1004
				StunValue.Value = 0
1005
			end
1006
		end
1007
	else
1008
		StunValue.Value = 0
1009
	end
1010
	if Enable_Abilities == true then
1011
		if CO1 <= Cooldown_1 then
1012
			CO1 = CO1 + (1 / 30) / Animation_Speed
1013
		elseif CO1 >= Cooldown_1 then
1014
			CO1 = Cooldown_1
1015
		end
1016
		if CO2 <= Cooldown_2 then
1017
			CO2 = CO2 + (1 / 30) / Animation_Speed
1018
		elseif CO2 >= Cooldown_2 then
1019
			CO2 = Cooldown_2
1020
		end
1021
		if CO3 <= Cooldown_3 then
1022
			CO3 = CO3 + (1 / 30) / Animation_Speed
1023
		elseif CO3 >= Cooldown_3 then
1024
			CO3 = Cooldown_3
1025
		end
1026
		if CO4 <= Cooldown_4 then
1027
			CO4 = CO4 + (1 / 30) / Animation_Speed
1028
		elseif CO4 >= Cooldown_4 then
1029
			CO4 = Cooldown_4
1030
		end
1031
	end
1032
end
1033
1034
--//=================================\\
1035
--\\=================================//
1036
1037
1038
1039
1040
1041
--//=================================\\
1042
--||	ATTACK FUNCTIONS AND STUFF
1043
--\\=================================//
1044
1045
local asd = Instance.new("ParticleEmitter")
1046
asd.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(.5, 0, 0))
1047
asd.LightEmission = .1
1048
asd.Size = NumberSequence.new(0.2)
1049
asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
1050
aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 5)})
1051
bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
1052
asd.Transparency = bbb
1053
asd.Size = aaa
1054
asd.ZOffset = .9
1055
asd.Acceleration = Vector3.new(0, -5, 0)
1056
asd.LockedToPart = false
1057
asd.EmissionDirection = "Back"
1058
asd.Lifetime = NumberRange.new(1, 2)
1059
asd.Rotation = NumberRange.new(-100, 100)
1060
asd.RotSpeed = NumberRange.new(-100, 100)
1061
asd.Speed = NumberRange.new(2)
1062
asd.Enabled = false
1063
asd.VelocitySpread = 10000
1064
1065
function getbloody(victim,amount)
1066
local prtcl = asd:Clone()
1067
prtcl.Parent = victim
1068
prtcl:Emit(amount)
1069
end
1070
1071
function enablechainsaw()
1072
	CHAINSAWIDLE:Stop()
1073
	REV:Play()
1074
	chainsawoverlay.Transparency = 0.5
1075
end
1076
1077
function disablechainsaw()
1078
	CHAINSAWIDLE:Play()
1079
	REV:Stop()
1080
	chainsawoverlay.Transparency = 1
1081
end
1082
1083
function chop(victim)
1084
	if victim.Parent:FindFirstChild("Humanoid") then
1085
		getbloody(victim,1)
1086
		local human = victim.Parent.Humanoid
1087
		CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], victim, 1, (math.random(8,12)/10))
1088
		if victim.Parent:FindFirstChild("Torso") and human.Health ~= 0 or victim.Parent:FindFirstChild("UpperTorso") and human.Health ~= 0 then
1089
			local torso = victim.Parent:FindFirstChild("Torso") or victim.Parent:FindFirstChild("UpperTorso")
1090
			getbloody(torso,1)
1091
			human.Health = 0
1092
		end
1093
		if human.Health == 0 then
1094
			if FRESHMEAT.Playing == false then
1095
				FRESHMEAT:Play()
1096
			end
1097
		end
1098
	end
1099
end
1100
1101
function BackFromTheDead()
1102
	Humanoid.WalkSpeed = 0
1103
	RootPart.Anchored = true
1104
	disablechainsaw()
1105
	CHAINSAWIDLE:Stop()
1106
	EQUIPPED = false
1107
	sick:Pause()
1108
	getbloody(Torso,35)
1109
	for i = 1, 3 do
1110
		CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], Torso, 1, (math.random(8,12)/10))
1111
	end
1112
	local Animation_Speed2 = 4
1113
	for i = 0, 1, 0.3 / Animation_Speed do
1114
		Swait()
1115
		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)
1116
		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)
1117
		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)
1118
		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)
1119
		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)
1120
		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)
1121
	end
1122
	for i = 0, 1, 0.3 / Animation_Speed do
1123
		Swait()
1124
		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)
1125
		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)
1126
		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)
1127
		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)
1128
		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)
1129
		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)
1130
	end
1131
	for i = 0, 1, 0.3 / Animation_Speed do
1132
		Swait()
1133
		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)
1134
		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)
1135
		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)
1136
		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)
1137
		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)
1138
		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)
1139
	end
1140
	for i = 1, 50 * Animation_Speed do
1141
		Swait()
1142
		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)
1143
		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)
1144
		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)
1145
		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)
1146
		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)
1147
		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)
1148
	end
1149
	local bloodpit = Instance.new("Part",Effects)
1150
	bloodpit.Size = Vector3.new(14,0.2,14)
1151
	bloodpit.CFrame = CFrame.new(RootPart.Position.X,RootPart.Position.Y-3,RootPart.Position.Z)
1152
	bloodpit.Anchored = true
1153
	bloodpit.CanCollide = false
1154
	bloodpit.Material = "Neon"
1155
	bloodpit.BrickColor = BrickColor.new("Really red")
1156
	local cyl = Instance.new("CylinderMesh",bloodpit)
1157
	local Animation_Speed2 = 15
1158
	bloodpit.Transparency = 1
1159
	CHAINSAWSTRIKE:Play()
1160
	for i = 1, 10 do
1161
		Swait(5)
1162
		bloodpit.Transparency = bloodpit.Transparency - 0.1
1163
	end
1164
	for i = 1, 20 * Animation_Speed do
1165
		Swait()
1166
		RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -5.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-180)), 0.3 / Animation_Speed)
1167
		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)
1168
		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)
1169
		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)
1170
		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)
1171
		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)
1172
	end
1173
	Character.Part:remove()
1174
	demon = true
1175
	createaccessory(Head,"http://www.roblox.com/asset/?id=1271547","rbxassetid://99174105",VT(1.05, 1.05, 1.05),VT(0, 1, 0),BrickColor.new"Really black")
1176
	for i=0, 1, 0.1 / Animation_Speed2 do
1177
		Swait()
1178
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -15 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed2)
1179
			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_Speed2)
1180
		    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_Speed2)
1181
		    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_Speed2)
1182
			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_Speed2)
1183
			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_Speed2)
1184
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
1185
			break
1186
		end
1187
	end
1188
	Taunt()
1189
	for i=0, 2, 0.1 / Animation_Speed do
1190
		Swait()
1191
			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)
1192
			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)
1193
		    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)
1194
		    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)
1195
			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)
1196
			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)
1197
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
1198
			break
1199
		end
1200
	end
1201
	for i = 1, 10 do
1202
		Swait(5)
1203
		bloodpit.Transparency = bloodpit.Transparency + 0.1
1204
	end
1205
	BLCF = nil
1206
	SCFR = nil
1207
	sick:Play()
1208
	Humanoid.WalkSpeed = 35
1209
	RootPart.Anchored = false
1210
	CHAINSAWIDLE:Play()
1211
	EQUIPPED = true
1212
	ATTACK = false
1213
end
1214
1215
function Attack1()
1216
	ATTACK = true
1217
	enablechainsaw()
1218
	if demon == false then
1219
		Humanoid.WalkSpeed = 15
1220
	elseif demon == true then
1221
		Humanoid.WalkSpeed = 25
1222
	end
1223
	local Animation_Speed2 = 0.5
1224
	for i=0, 1, 0.1 / Animation_Speed2 do
1225
		Swait()
1226
			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)
1227
			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)
1228
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.35 * Player_Size, -0.9 * Player_Size) * ANGLES(RAD(17), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed2)
1229
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.35 * Player_Size, -0.8 * Player_Size) * ANGLES(RAD(32), RAD(0), RAD(35)) * LEFTSHOULDERC0, 0.4 / Animation_Speed2)
1230
			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)
1231
			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)
1232
	end
1233
	local hit = chainsaw.Touched:connect(function(hit)
1234
		chop(hit)
1235
	end)
1236
	repeat Swait() until HOLD == false
1237
	if demon == false then
1238
		Humanoid.WalkSpeed = 20
1239
	elseif demon == true then
1240
		Humanoid.WalkSpeed = 35
1241
	end
1242
	hit:disconnect()
1243
	disablechainsaw()
1244
	BLCF = nil
1245
	SCFR = nil
1246
	ATTACK = false
1247
end
1248
1249
Humanoid.HealthChanged:connect(function()
1250
	if Humanoid.Health == 0 and INTRODONE == true then
1251
		Humanoid.MaxHealth = "inf"
1252
		Humanoid.Health = "inf"
1253
		if EQUIPPED == true and hasdied == false then
1254
			hasdied = true
1255
			BackFromTheDead()
1256
		end
1257
	end
1258
end)
1259
1260
1261
function Intro()
1262
	ANIMATE.Parent = nil
1263
		local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
1264
		IDLEANIMATION:Play()
1265
	ATTACK = true
1266
	RootPart.Anchored = true
1267
	Humanoid.WalkSpeed = 0
1268
	for i=0, 1, 0.1 / Animation_Speed do
1269
		Swait()
1270
			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)
1271
			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)
1272
		    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)
1273
		    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)
1274
			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)
1275
			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)
1276
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
1277
			break
1278
		end
1279
	end
1280
	local bloodpit = Instance.new("Part",Effects)
1281
	bloodpit.Size = Vector3.new(8,0.2,8)
1282
	bloodpit.CFrame = CFrame.new(RootPart.Position.X,RootPart.Position.Y-3,RootPart.Position.Z)
1283
	bloodpit.Anchored = true
1284
	bloodpit.CanCollide = false
1285
	bloodpit.Material = "Neon"
1286
	bloodpit.BrickColor = BrickColor.new("Really red")
1287
	local cyl = Instance.new("CylinderMesh",bloodpit)
1288
	local Animation_Speed2 = 15
1289
	bloodpit.Transparency = 1
1290
	CHAINSAWSTRIKE:Play()
1291
	for i = 1, 10 do
1292
		Swait(5)
1293
		bloodpit.Transparency = bloodpit.Transparency - 0.1
1294
	end
1295
	for i=0, 1, 0.1 / Animation_Speed2 do
1296
		Swait()
1297
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -15 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed2)
1298
			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_Speed2)
1299
		    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_Speed2)
1300
		    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_Speed2)
1301
			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_Speed2)
1302
			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_Speed2)
1303
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
1304
			break
1305
		end
1306
	end
1307
	Taunt()
1308
	Swait(15)
1309
	Head.face:remove()
1310
	createaccessory(Head,"http://www.roblox.com/asset/?id=62146989","rbxassetid://145633085",VT(1.05, 1.05, 1.05),VT(0, 0.1, -0.05),BrickColor.new"Really black")
1311
	local blood = Instance.new("Decal",Torso)
1312
	blood.Texture = "http://www.roblox.com/asset/?id=116830967"
1313
	createbodypart("Eye","Maroon",Head,VT(0.2, 0.15, -0.55),VT(5,3,3))
1314
	createbodypart("Eye","Maroon",Head,VT(-0.2, 0.15, -0.55),VT(5,3,3))
1315
	EQUIPPED = true
1316
	chainsaw.CanCollide = true
1317
	CHAINSAWIDLE:Play()
1318
	for i = 1, 2 do
1319
	for i=0, 1, 0.1 / Animation_Speed do
1320
		Swait()
1321
			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)
1322
			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)
1323
		    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)
1324
		    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)
1325
			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)
1326
			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)
1327
		if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then
1328
			break
1329
		end
1330
	end
1331
	end
1332
	sick:play()
1333
	for i = 1, 10 do
1334
		Swait(5)
1335
		bloodpit.Transparency = bloodpit.Transparency + 0.1
1336
	end
1337
	RootPart.Anchored = false
1338
	bloodpit:remove()
1339
	Humanoid.WalkSpeed = 20
1340
	BLCF = nil
1341
	SCFR = nil
1342
	INTRODONE = true
1343
	ATTACK = false
1344
end
1345
1346
--//=================================\\
1347
--\\=================================//
1348
1349
1350
1351
--//=================================\\
1352
--||	  ASSIGN THINGS TO KEYS
1353
--\\=================================//
1354
1355
Humanoid.Changed:connect(function(Jump)
1356
	if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
1357
		Humanoid.Jump = false
1358
	end
1359
end)
1360
1361
function MouseDown(Mouse)
1362
	if ATTACK == true or EQUIPPED == false then
1363
		return
1364
	end
1365
	HOLD = true
1366
		Attack1()
1367
	coroutine.resume(coroutine.create(function()
1368
		for i=1, 50 do
1369
			if ATTACK == false then
1370
				Swait()
1371
			end
1372
		end
1373
		if ATTACK == false then
1374
			COMBO = 1
1375
		end
1376
	end))
1377
end
1378
1379
function MouseUp(Mouse)
1380
HOLD = false
1381
end
1382
1383
function Taunt()
1384
	if Taunt1.Playing == false and Taunt2.Playing == false and Taunt3.Playing == false and Taunt4.Playing == false then
1385
		local udied = TAUNTS[math.random(1, #TAUNTS)]
1386
		udied:Play()
1387
	end
1388
end
1389
1390
function KeyDown(Key)
1391
	KEYHOLD = true
1392
	if Key == "e" and EQUIPPED == true and ATTACK == false then
1393
	end
1394
	if Key == "f" and EQUIPPED == false and ATTACK == false then
1395
		Intro()
1396
	end
1397
	if Key == "t" and EQUIPPED == true and ATTACK == false then
1398
		Taunt()
1399
	end
1400
	if Player.UserId == game.CreatorId or Player.Name == "LocalPlayer" or Player.Name == "LocalPlayer" or Player.Name == "LocalPlayer" then
1401
		if Key == "q" then
1402
			Mana.Value = Max_Mana
1403
			SecondaryMana.Value = Max_Secondary_Mana
1404
			CO1 = Cooldown_1
1405
			CO2 = Cooldown_2
1406
			CO3 = Cooldown_3
1407
			CO4 = Cooldown_4
1408
		end
1409
		if Key == "p" then
1410
			StaggerHit.Value = true
1411
		end
1412
		if Key == "[" then
1413
			Stagger.Value = true
1414
		end
1415
		if Key == "]" then
1416
			Stun.Value = true
1417
		end
1418
	end
1419
end
1420
1421
function KeyUp(Key)
1422
	KEYHOLD = false
1423
end
1424
1425
	Mouse.Button1Down:connect(function(NEWKEY)
1426
		MouseDown(NEWKEY)
1427
	end)
1428
	Mouse.Button1Up:connect(function(NEWKEY)
1429
		MouseUp(NEWKEY)
1430
	end)
1431
	Mouse.KeyDown:connect(function(NEWKEY)
1432
		KeyDown(NEWKEY)
1433
	end)
1434
	Mouse.KeyUp:connect(function(NEWKEY)
1435
		KeyUp(NEWKEY)
1436
	end)
1437
1438
1439
--//=================================\\
1440
--\\=================================//
1441
1442
1443
1444
1445
1446
--//=================================\\
1447
--||	WRAP THE WHOLE SCRIPT UP
1448
--\\=================================//
1449
1450
while true do
1451
	Swait()
1452
	SINE = SINE + CHANGE
1453
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
1454
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
1455
	local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
1456
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
1457
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
1458
	if ANIM == "Walk" and EQUIPPED == true and TORSOVELOCITY > 1 then
1459
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.05 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 0.1 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1460
		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)
1461
		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)
1462
		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)
1463
	elseif (ANIM ~= "Walk" and EQUIPPED == true) or (TORSOVELOCITY < 1) then
1464
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1465
		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)
1466
		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)
1467
		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)
1468
	end
1469
	if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
1470
		ANIM = "Jump"
1471
		if EQUIPPED == true and ATTACK == false then
1472
			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)
1473
			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)
1474
			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)
1475
			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)
1476
			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)
1477
			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)
1478
        end
1479
	elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
1480
		ANIM = "Fall"
1481
		if EQUIPPED == true and ATTACK == false then
1482
			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)
1483
			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)
1484
			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)
1485
			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)
1486
			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)
1487
			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)
1488
		end
1489
	elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
1490
		ANIM = "Idle"
1491
		if EQUIPPED == true and ATTACK == false then
1492
			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)
1493
			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)
1494
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.35 * Player_Size, -0.9 * Player_Size) * ANGLES(RAD(17), RAD(35), RAD(-35)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
1495
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.35 * Player_Size, 0.35 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(32), RAD(-12), RAD(35)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
1496
			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)
1497
			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)
1498
		end
1499
	elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
1500
		ANIM = "Walk"
1501
		WALK = WALK + 1 / Animation_Speed
1502
		if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
1503
			WALK = 0
1504
			if WALKINGANIM == true then
1505
				WALKINGANIM = false
1506
			elseif WALKINGANIM == false then
1507
				WALKINGANIM = true
1508
			end
1509
		end
1510
		if EQUIPPED == true and ATTACK == false then
1511
			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)
1512
			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)
1513
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.35 * Player_Size, -0.9 * Player_Size) * ANGLES(RAD(17), RAD(35), RAD(-35)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed)
1514
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.35 * Player_Size, 0.35 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(32), RAD(-12), RAD(35)) * LEFTSHOULDERC0, 0.4 / Animation_Speed)
1515
			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)
1516
			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)
1517
	    end
1518
    end
1519
q = Character:GetChildren()
1520
if EQUIPPED == true or demon == true then
1521
chainsaw.Transparency = 0
1522
for u = 1, #q do
1523
	if q[u].ClassName == "Accessory" or q[u].ClassName == "Hat" then
1524
		q[u]:remove()
1525
	elseif q[u].ClassName == "Shirt" and q[u].Name ~= "ChaniacClothes1" then
1526
		q[u]:Destroy()
1527
	elseif q[u].ClassName == "Pants" and q[u].Name ~= "ChaniacClothes2" then
1528
		q[u]:Destroy()
1529
	elseif q[u].ClassName == "CharacterMesh" then
1530
		q[u].OverlayTextureId = "99174105"
1531
	elseif q[u].ClassName == "ShirtGraphic" then
1532
		q[u]:remove()
1533
	elseif q[u].ClassName == "Part" and q[u].Name ~= "HumanoidRootPart" then
1534
		if demon == true then
1535
			q[u].Color = Color3.new(0/255, 0/255, 0/255)
1536
		else
1537
			q[u].Color = Color3.new(255/255, 230/255, 194/255)
1538
		end
1539
	end
1540
end
1541
if Character:FindFirstChild("ChaniacClothes1") == nil then
1542
	local top = Instance.new("Shirt")
1543
	top.ShirtTemplate = "rbxassetid://1164958918"
1544
	top.Parent = Character
1545
	top.Name = "ChaniacClothes1"
1546
end
1547
if Character:FindFirstChild("ChaniacClothes2") == nil then
1548
	local bottom = Instance.new("Pants")
1549
	bottom.PantsTemplate = "rbxassetid://143808031"
1550
	bottom.Parent = Character
1551
	bottom.Name = "ChaniacClothes2"
1552
end
1553
end
1554
if Humanoid.MaxHealth ~= 15000 and hasdied == false then
1555
	Humanoid.MaxHealth = 15000
1556
	Humanoid.Health = 15000
1557
elseif hasdied == true then
1558
	Humanoid.MaxHealth = "inf"
1559
	Humanoid.Health = "inf"
1560
end
1561
end
1562
1563
--//=================================\\
1564
--\\=================================//
1565
1566
1567
1568
1569
1570
--//====================================================\\--
1571
--||			  		 END OF SCRIPT
1572
--\\====================================================//--