View difference between Paste ID: b1mDb9q5 and YQYBG8k7
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
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
3
local RealPlayer = Player
4
do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
5
 
6
 wait(.2)
7
Player = game:GetService("Players").LocalPlayer
8
9
Character = Player.Character
10
PlayerGui = Player.PlayerGui
11
Backpack = Player.Backpack
12
Torso = Character.Torso
13
Head = Character.Head
14
Humanoid = Character.Humanoid
15
RootPart = Character.HumanoidRootPart
16
local music= Instance.new("Sound",RootPart)
17
music.SoundId = "rbxassetid://5797060674"
18
music.Looped = true
19
music.Name = "musicc"
20
music.Volume = 4
21
music:Play()
22
RootJoint = RootPart.RootJoint
23
LeftArm = Character["Left Arm"]
24
LeftLeg = Character["Left Leg"]
25
RightArm = Character["Right Arm"]
26
RightLeg = Character["Right Leg"]
27
LS = Torso["Left Shoulder"]
28
LH = Torso["Left Hip"]
29
RS = Torso["Right Shoulder"]
30
RH = Torso["Right Hip"]
31
Face = Head.face
32
Neck = Torso.Neck
33
it = Instance.new
34
vt = Vector3.new
35
cf = CFrame.new
36
rad = math.rad
37
euler = CFrame.fromEulerAnglesXYZ
38
angles = CFrame.Angles
39
Mouse = Player:GetMouse()
40
coroutine.resume(coroutine.create(function()
41
game.StarterGui:SetCore("ChatMakeSystemMessage", {
42
	Text = "Fixed by PixelFir3 / Cortana#8155";
43
	Color = Color3.new(0, 1, 1);
44
	Font = Enum.Font.Code;
45
	FontSize = Enum.FontSize.Size24;
46
})
47
end))
48
ArtificialHB = Instance.new("BindableEvent", script)
49
ArtificialHB.Name = "ArtificialHB"
50
script:WaitForChild("ArtificialHB")
51
frame = 0.016666666666667
52
tf = 0
53
allowframeloss = false
54
tossremainder = false
55
lastframe = tick()
56
script.ArtificialHB:Fire()
57
game:GetService("RunService").Heartbeat:connect(function(s, p)
58
	
59
	tf = tf + s
60
	if frame <= tf then
61
		if allowframeloss then
62
			script.ArtificialHB:Fire()
63
			lastframe = tick()
64
		else
65
			for i = 1, math.floor(tf / frame) do
66
				script.ArtificialHB:Fire()
67
			end
68
			lastframe = tick()
69
		end
70
		if tossremainder then
71
			tf = 0
72
		else
73
			tf = tf - frame * math.floor(tf / frame)
74
		end
75
	end
76
end
77
)
78
local animationspeed = 2
79
hbwait = function(number)
80
	
81
	if number == 0 or number == nil then
82
		ArtificialHB.Event:wait()
83
	else
84
		for i = 0, number do
85
			ArtificialHB.Event:wait()
86
		end
87
	end
88
end
89
90
local Stats = Instance.new("Folder", Character)
91
Stats.Name = "Stats"
92
local Defense = Instance.new("NumberValue", Stats)
93
Defense.Name = "Defense"
94
Defense.Value = 0.1
95
local Movement = Instance.new("NumberValue", Stats)
96
Movement.Name = "Movement"
97
Movement.Value = 0.35
98
local Damage = Instance.new("NumberValue", Stats)
99
Damage.Name = "Damage"
100
Damage.Value = 0
101
local Mana = Instance.new("NumberValue", Stats)
102
Mana.Name = "Mana"
103
Mana.Value = 0
104
local Rooted = Instance.new("BoolValue", Stats)
105
Rooted.Name = "Rooted"
106
Rooted.Value = false
107
local BlockValue = Instance.new("BoolValue", Stats)
108
BlockValue.Name = "BlockValue"
109
BlockValue.Value = false
110
local StaggerHitAnim = Instance.new("BoolValue", Stats)
111
StaggerHitAnim.Name = "StaggerHitAnim"
112
StaggerHitAnim.Value = false
113
local StaggerAnim = Instance.new("BoolValue", Stats)
114
StaggerAnim.Name = "StaggerAnim"
115
StaggerAnim.Value = false
116
local StunAnim = Instance.new("BoolValue", Stats)
117
StunAnim.Name = "StunAnim"
118
StunAnim.Value = false
119
local StunValue = Instance.new("NumberValue", Stats)
120
StunValue.Name = "StunValue"
121
StunValue.Value = 0
122
local CanCrit = Instance.new("BoolValue", Stats)
123
CanCrit.Name = "CanCrit"
124
CanCrit.Value = false
125
local CritChance = Instance.new("NumberValue", Stats)
126
CritChance.Name = "CritChance"
127
CritChance.Value = 20
128
local CanPenetrateArmor = Instance.new("BoolValue", Stats)
129
CanPenetrateArmor.Name = "CanPenetrateArmor"
130
CanPenetrateArmor.Value = false
131
local AntiTeamKill = Instance.new("BoolValue", Stats)
132
AntiTeamKill.Name = "AntiTeamKill"
133
AntiTeamKill.Value = false
134
necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
135
RootCF = angles(rad(-90), 0, rad(180))
136
local idle = 0
137
local Anim = "Idle"
138
local animtype = math.floor(math.random(1, 3))
139
local attacktype = 1
140
local attack = false
141
local equipped = false
142
local LastPoint = nil
143
local staggerhitanim = false
144
local staggeranim = false
145
local stunanim = false
146
local CritChanceNumber = 0
147
local idlen = 0
148
local donum = 0
149
local sine = 0
150
local change = 2 / animationspeed
151
local walkinganim = false
152
local handidle = false
153
local walk = 0
154
local stundelay = 0
155
local manadelay = 0
156
local robloxidleanimation = Instance.new("Animation", Torso)
157
robloxidleanimation.Name = "robloxidleanimation"
158
robloxidleanimation.AnimationId = "http://www.roblox.com/asset/?id=180435571"
159
local Animator = Humanoid:FindFirstChild("Animator")
160
local Animate = Character:FindFirstChild("Animate")
161
local HitPlayerSounds = {199149137, 199149186, 199149221, 199149235, 199149269, 199149297}
162
local HitArmorSounds = {199149321, 199149338, 199149367, 199149409, 199149452}
163
local HitWeaponSounds = {199148971, 199149025, 199149072, 199149109, 199149119}
164
local HitBlockSounds = {199148933, 199148947}
165
local cooldown1 = 0
166
local cooldown2 = 0
167
local cooldown3 = 0
168
local cooldown4 = 0
169
local scrn = Instance.new("ScreenGui", PlayerGui)
170
local ud = UDim2.new
171
local c3 = Color3.new
172
local skillcolorscheme = c3(1, 1, 1)
173
subtractmana = function(k)
174
	
175
	if k <= Mana.Value then
176
		Mana.Value = Mana.Value - k
177
	end
178
end
179
180
local co1 = 0
181
local co2 = 0
182
local co3 = 0
183
local co4 = 0
184
local maxmana = 0
185
local maxstun = 1
186
local recovermana = 0
187
local losestun = 0
188
local stunwait = 0
189
local manawait = 0
190
local skill1mana = 0
191
local skill2mana = 0
192
local skill3mana = 0
193
local skill4mana = 0
194
local menuupdatespeed = 0
195
local constantupdate = false
196
local showstats = false
197
local allowstunbar = false
198
local CustomColor = Torso.BrickColor
199
local Colorpart1 = CustomColor.r
200
local Colorpart2 = CustomColor.g
201
local Colorpart3 = CustomColor.b
202
local InverseColor = BrickColor.new(Color3.new(1 - Colorpart1, 1 - Colorpart2, 1 - Colorpart3))
203
makeframe = function(par, trans, pos, size, color, name)
204
	
205
	local frame = Instance.new("Frame")
206
	frame.Parent = par
207
	frame.BackgroundTransparency = trans
208
	frame.BorderSizePixel = 2
209
	frame.Position = pos
210
	frame.Size = size
211
	frame.BackgroundColor3 = color
212
	frame.Name = name
213
	return frame
214
end
215
216
makelabel = function(par, text, trans, stroketrans, name)
217
	
218
	local label = Instance.new("TextLabel")
219
	label.Parent = par
220
	label.BackgroundTransparency = 1
221
	label.Size = ud(1, 0, 1, 0)
222
	label.Position = ud(0, 0, 0, 0)
223
	label.TextColor3 = c3(255, 255, 255)
224
	label.TextStrokeTransparency = stroketrans
225
	label.TextTransparency = trans
226
	label.FontSize = Enum.FontSize.Size32
227
	label.Font = Enum.Font.Legacy
228
	label.BorderSizePixel = 0
229
	label.TextScaled = true
230
	label.Text = text
231
	label.Name = name
232
	return label
233
end
234
235
framesk1 = makeframe(scrn, 0.5, ud(0.23, 0, 0.93, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 1")
236
framesk2 = makeframe(scrn, 0.5, ud(0.5, 0, 0.93, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 2")
237
framesk3 = makeframe(scrn, 0.5, ud(0.5, 0, 0.86, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 3")
238
framesk4 = makeframe(scrn, 0.5, ud(0.23, 0, 0.86, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 4")
239
bar1 = makeframe(framesk1, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 1")
240
bar2 = makeframe(framesk2, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 2")
241
bar3 = makeframe(framesk3, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 3")
242
bar4 = makeframe(framesk4, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 4")
243
text1 = makelabel(framesk1, "[C] Ability 3", 1, 1, "Text 1")
244
text2 = makelabel(framesk2, "[V] Ability 4", 1, 1, "Text 2")
245
text3 = makelabel(framesk3, "[X] Ability 2", 1, 1, "Text 3")
246
text4 = makelabel(framesk4, "[Z] Ability 1", 1, 1, "Text 4")
247
manabar = makeframe(scrn, 0.5, ud(0.23, 0, 0.82, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Mana Bar")
248
manacover = makeframe(manabar, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Mana Cover")
249
manatext = makelabel(manabar, "Mana", 1, 1, "Mana Text")
250
healthbar = makeframe(scrn, 0.5, ud(0.5, 0, 0.82, 0), ud(0.26, 0, 0, 0), c3(1, 0.19607843137255, 0.19607843137255), "Health Bar")
251
healthcover = makeframe(healthbar, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(1, 0.19607843137255, 0.19607843137255), "Health Cover")
252
healthtext = makelabel(healthbar, "Health", 1, 1, "Health Text")
253
if allowstunbar == true then
254
	stunframe = makeframe(scrn, 0.5, ud(0.5, 0, 0.78, 0), ud(0.26, 0, 0, 0), c3(1, 1, 0.19607843137255), "Stun Frame")
255
	stunbar = makeframe(stunframe, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(1, 1, 0.19607843137255), "Stun Bar")
256
	stuntext = makelabel(stunframe, "Stun", 1, 1, "Stun Text")
257
end
258
if showstats == true then
259
	defenseframe = makeframe(scrn, 0.5, ud(0.23, 0, 0.78, 0), ud(0.075, 0, 0, 0), c3(0.3921568627451, 0.3921568627451, 1), "Defense Frame")
260
	damageframe = makeframe(scrn, 0.5, ud(0.3225, 0, 0.78, 0), ud(0.075, 0, 0, 0), c3(1, 0.3921568627451, 0.3921568627451), "Damage Frame")
261
	movementframe = makeframe(scrn, 0.5, ud(0.415, 0, 0.78, 0), ud(0.075, 0, 0, 0), c3(0.3921568627451, 1, 0.3921568627451), "Movement Frame")
262
	defensetext = makelabel(defenseframe, "Defense: " .. Defense.Value, 1, 1, "Defense Text")
263
	damagetext = makelabel(damageframe, "Damage: " .. Damage.Value, 1, 1, "Damage Text")
264
	movementtext = makelabel(movementframe, "Movement: " .. Movement.Value, 1, 1, "Movement Text")
265
end
266
NoOutline = function(Part)
267
	
268
	Part.TopSurface = 10
269
end
270
271
local weldBetween = function(a, b)
272
	
273
	local weldd = Instance.new("ManualWeld")
274
	weldd.Part0 = a
275
	weldd.Part1 = b
276
	weldd.C0 = CFrame.new()
277
	weldd.C1 = b.CFrame:inverse() * a.CFrame
278
	weldd.Parent = a
279
	return weldd
280
end
281
282
nooutline = function(part)
283
	
284
	part.TopSurface = 10
285
end
286
287
part = function(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
288
	
289
	local fp = it("Part")
290
	fp.formFactor = formfactor
291
	fp.Parent = parent
292
	fp.Reflectance = reflectance
293
	fp.Transparency = transparency
294
	fp.CanCollide = false
295
	fp.Locked = true
296
	fp.BrickColor = BrickColor.new(tostring(brickcolor))
297
	fp.Name = name
298
	fp.Size = size
299
	fp.Position = Character.Torso.Position
300
	nooutline(fp)
301
	fp.Material = material
302
	fp:BreakJoints()
303
	return fp
304
end
305
306
mesh = function(Mesh, part, meshtype, meshid, offset, scale)
307
	
308
	local mesh = it(Mesh)
309
	mesh.Parent = part
310
	if Mesh == "SpecialMesh" then
311
		mesh.MeshType = meshtype
312
		mesh.MeshId = meshid
313
	end
314
	mesh.Offset = offset
315
	mesh.Scale = scale
316
	return mesh
317
end
318
319
weld = function(parent, part0, part1, c0, c1)
320
	
321
	local weld = it("Motor")
322
	weld.Parent = parent
323
	weld.Part0 = part0
324
	weld.Part1 = part1
325
	weld.C0 = c0
326
	weld.C1 = c1
327
	return weld
328
end
329
330
local WeaponName = "Russian Kick"
331
local ClassName = "Russian Kick"
332
local PlayerSize = 1
333
local RWC0 = cf(-0.5, 0, 0) * angles(rad(0), rad(90), rad(0))
334
local LWC0 = cf(0.5, 0, 0) * angles(rad(0), rad(-90), rad(0))
335
if PlayerSize ~= 1 then
336
	RootPart.Size = RootPart.Size * PlayerSize
337
	Torso.Size = Torso.Size * PlayerSize
338
	Head.Size = Head.Size * PlayerSize
339
	RightArm.Size = RightArm.Size * PlayerSize
340
	LeftArm.Size = LeftArm.Size * PlayerSize
341
	RightLeg.Size = RightLeg.Size * PlayerSize
342
	LeftLeg.Size = LeftLeg.Size * PlayerSize
343
	RootJoint.Parent = RootPart
344
	Neck.Parent = Torso
345
	LS.Parent = Torso
346
	RS.Parent = Torso
347
	LH.Parent = Torso
348
	RH.Parent = Torso
349
	RootJoint.C0 = RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0))
350
	Neck.C0 = necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(0))
351
	Neck.C1 = angles(rad(90), rad(180), 0) * cf(0, 0, -0.5 * PlayerSize)
352
	RS.C0 = cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0
353
	LS.C0 = cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0
354
	RS.C1 = angles(0, rad(90), 0) * cf(0, 0.5 * PlayerSize, -0.5)
355
	LS.C1 = angles(0, rad(-90), 0) * cf(0, 0.5 * PlayerSize, -0.5)
356
	RH.C0 = cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0))
357
	LH.C0 = cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0))
358
	RH.C1 = angles(0, rad(90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize)
359
	LH.C1 = angles(0, rad(-90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize)
360
	for _,v in pairs(Character:GetChildren()) do
361
		if v.ClassName == "Hat" or v.ClassName == "Accessory" then
362
			v.Parent = nil
363
			v.Parent = Character
364
			v.Handle.Mesh.Scale = v.Handle.Mesh.Scale * PlayerSize
365
			for _,b in pairs(v.Handle:GetChildren()) do
366
				if b.ClassName == "Weld" or b.ClassName == "Motor" then
367
					local p1 = b.Part1
368
					b.Part1 = nil
369
					local c01, c02, c03, c04, c05, c06, c07, c08, c09, c010, c011, c012 = b.C0:components()
370
					local c11, c12, c13, c14, c15, c16, c17, c18, c19, c110, c111, c112 = b.C1:components()
371
					b.C0 = cf(c01 * PlayerSize, c02 * PlayerSize, c03 * PlayerSize, c04, c05, c06, c07, c08, c09, c010, c011, c012)
372
					b.C1 = cf(c11 * PlayerSize, c12 * PlayerSize, c13 * PlayerSize, c14, c15, c16, c17, c18, c19, c110, c111, c112)
373
					b.Part1 = p1
374
				end
375
			end
376
		end
377
	end
378
end
379
	m = Instance.new("Model", Character)
380
	m.Name = WeaponName
381
	Effects = Instance.new("Folder", m)
382
	Effects.Name = "Effects"
383
	Humanoid.Died:connect(function()
384
	
385
	attack = true
386
	for _,v in pairs(Character:GetChildren()) do
387
		if v.ClassName == "Model" then
388
			v:Destroy()
389
		end
390
	end
391
end
392
)
393
	for i,v in pairs(Character:GetChildren()) do
394
		if v.ClassName == "Model" then
395
			for _,c in pairs(v:GetChildren()) do
396
				if c.ClassName == "Part" then
397
					c.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001)
398
				end
399
			end
400
		end
401
	end
402
	print(ClassName .. " loaded.")
403
	clerp = function(a, b, t)
404
return a:lerp(b, t)
405
end
406
407
	positiveangle = function(number)
408
	
409
	if number > 0 then
410
		number = 0
411
	end
412
	return number
413
end
414
415
	negativeangle = function(number)
416
	
417-
		sou.SoundId = "http://roblox.com/asset/?id=" .. id
417+
418
		number = 0
419
	end
420
	return number
421
end
422
423
	so = function(id, par, vol, pit)
424
	
425
	coroutine.resume(coroutine.create(function()
426
		
427
		local sou = Instance.new("Sound", par or workspace)
428
		sou.Volume = vol
429
		sou.Pitch = pit or 1
430
		sou.SoundId = "http://roblox.com/asset/?id=806947472"
431
		hbwait()
432
		sou:play()
433
		game:GetService("Debris"):AddItem(sou, 10)
434
	end
435
))
436
end
437
438
	GetDistance = function(Part1, Part2, magnitude)
439
	
440
	local target = Part1.Position - Part2.Position
441
	local mag = target.magnitude
442
	if mag <= magnitude then
443
		return true
444
	else
445
		return false
446
	end
447
end
448
449
	rayCast = function(Pos, Dir, Max, Ignore)
450
	
451
	return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
452
end
453
454
	DamageStatLabel = function(labeltype, cframe, text, color)
455
	
456
	local c = part(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", vt(0, 0, 0))
457
	c.CFrame = cf(cframe.p + vt(0, 1.5, 0))
458
	game:GetService("Debris"):AddItem(c, 5)
459
	Instance.new("BodyGyro", c)
460
	local f = Instance.new("BodyPosition", c)
461
	f.P = 2000
462
	f.D = 100
463
	f.maxForce = vt(math.huge, math.huge, math.huge)
464
	if labeltype == "Normal" then
465
		f.position = c.Position + vt(math.random(-2, 2), 6, math.random(-2, 2))
466
	else
467
		if labeltype == "Debuff" then
468
			f.position = c.Position + vt(math.random(-2, 2), 8, math.random(-2, 2))
469
		else
470
			if labeltype == "Interruption" then
471
				f.position = c.Position + vt(math.random(-2, 2), 8, math.random(-2, 2))
472
			end
473
		end
474
	end
475
	game:GetService("Debris"):AddItem(c, 5)
476
	local bg = Instance.new("BillboardGui", c)
477
	bg.Adornee = c
478
	bg.Size = UDim2.new(2.5, 0, 2.5, 0)
479
	bg.StudsOffset = vt(-2, 2, 0)
480
	bg.AlwaysOnTop = false
481
	local tl = Instance.new("TextLabel", bg)
482
	tl.BackgroundTransparency = 1
483
	tl.Size = UDim2.new(2.5, 0, 2.5, 0)
484
	tl.Text = text
485
	tl.Font = Enum.Font.SourceSans
486
	tl.FontSize = Enum.FontSize.Size42
487
	tl.TextColor3 = color
488
	tl.TextScaled = false
489
	tl.TextStrokeTransparency = 0
490
	tl.TextScaled = true
491
	tl.TextWrapped = true
492
	f.Parent = c
493
	coroutine.resume(coroutine.create(function(Part, BodyPosition, TextLabel)
494
		
495
		wait(0.25)
496
		for i = 1, 5 do
497
			wait()
498
			BodyPosition.position = Part.Position - vt(0, 0.5, 0)
499
		end
500
		wait(1.25)
501
		for i = 1, 5 do
502
			wait()
503
			TextLabel.TextTransparency = TextLabel.TextTransparency + 0.2
504
			TextLabel.TextStrokeTransparency = TextLabel.TextStrokeTransparency + 0.2
505
			BodyPosition.position = Part.Position + vt(0, 0.5, 0)
506
		end
507
		Part.Parent = nil
508
	end
509
), c, f, tl)
510
end
511
512
	IncreaseStat = function(Location, Stat, Amount, Duration, ShowTheStat)
513
	
514
	-- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1
515
516
	-- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1
517
518
	if Location:FindFirstChild("Stats") ~= nil and Location.Stats:FindFirstChild("BlockValue") ~= nil and Location.Stats:FindFirstChild("BlockValue").Value ~= true and Location.Stats[Stat] ~= nil then
519
		Location.Stats[Stat].Value = Location.Stats[Stat].Value + Amount
520
		if ShowTheStat == true then
521
			if Stat == "Defense" then
522
				DamageStatLabel("Debuff", Location.Head.CFrame, "+Defense", c3(1, 1, 1))
523
			else
524
				if Stat == "Damage" then
525
					DamageStatLabel("Debuff", Location.Head.CFrame, "+Damage", c3(1, 1, 1))
526
				else
527
					if Stat == "Movement" then
528
						DamageStatLabel("Debuff", Location.Head.CFrame, "+Movement", c3(1, 1, 1))
529
					end
530
				end
531
			end
532
		end
533
		coroutine.resume(coroutine.create(function(CurrentDecrease)
534
		
535
		wait(Duration)
536
		CurrentDecrease.Value = CurrentDecrease.Value - Amount
537
	end
538
), Location.Stats[Stat])
539
	end
540
	DamageStatLabel("Interruption", Location.Head.CFrame, "Blocked!", Color3.new(0, 0.3921568627451, 1))
541
end
542
543
	DecreaseStat = function(Location, Stat, Amount, Duration, ShowTheStat)
544
	
545
	-- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1
546
547
	-- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1
548
549
	if Location:FindFirstChild("Stats") ~= nil and Location.Stats:FindFirstChild("BlockValue") ~= nil and Location.Stats:FindFirstChild("BlockValue").Value ~= true and Location.Stats[Stat] ~= nil then
550
		Location.Stats[Stat].Value = Location.Stats[Stat].Value - Amount
551
		if ShowTheStat == true then
552
			if Stat == "Defense" then
553
				DamageStatLabel("Debuff", Location.Head.CFrame, "-Defense", c3(1, 1, 1))
554
			else
555
				if Stat == "Damage" then
556
					DamageStatLabel("Debuff", Location.Head.CFrame, "-Damage", c3(1, 1, 1))
557
				else
558
					if Stat == "Movement" then
559
						DamageStatLabel("Debuff", Location.Head.CFrame, "-Movement", c3(1, 1, 1))
560
					end
561
				end
562
			end
563
		end
564
		coroutine.resume(coroutine.create(function(CurrentDecrease)
565
		
566
		wait(Duration)
567
		CurrentDecrease.Value = CurrentDecrease.Value + Amount
568
	end
569
), Location.Stats[Stat])
570
	end
571
	DamageStatLabel("Interruption", Location.Head.CFrame, "Blocked!", Color3.new(0, 0.3921568627451, 1))
572
end
573
574
	Damagefunc = function(hit, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staggerhit, ranged, DecreaseTheStat, DecreaseAmount, DecreaseDuration, ShowDecreasedStat)
575
	
576
	if hit.Parent == nil then
577
		return 
578
	end
579
	h = hit.Parent:FindFirstChild("Humanoid")
580
	for _,v in pairs(hit.Parent:GetChildren()) do
581
		if v:IsA("Humanoid") then
582
			h = v
583
		end
584
	end
585
	if hit.Name == "Hitbox" and ranged ~= true and hit.Parent ~= m then
586
		StaggerHitAnim.Value = true
587
		so(HitWeaponSounds[math.random(1, #HitWeaponSounds)], hit, 1, 1)
588
		return 
589
	end
590
	if hit.Parent.Parent:FindFirstChild("Torso") ~= nil then
591
		h = hit.Parent.Parent:FindFirstChild("Humanoid")
592
	end
593
	if hit.Parent.className == "Hat" then
594
		hit = hit.Parent.Parent:FindFirstChild("Head")
595
	end
596
	if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
597
		if hit.Parent:FindFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
598
			return 
599
		end
600
		if AntiTeamKill.Value == true and Player.Neutral == false and game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil and game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == Player.TeamColor then
601
			return 
602
		end
603
		if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent:FindFirstChild("Humanoid").Health <= 0 then
604
			return 
605
		end
606
		if hit.Parent:FindFirstChild("Stats") ~= nil and hit.Parent.Stats:FindFirstChild("StunValue") ~= nil then
607
			hit.Parent.Stats:FindFirstChild("StunValue").Value = hit.Parent.Stats:FindFirstChild("StunValue").Value + incstun
608
		end
609
		if hit.Parent:FindFirstChild("Stats") ~= nil and hit.Parent.Stats:FindFirstChild("StaggerAnim") ~= nil and stagger == true then
610
			hit.Parent.Stats:FindFirstChild("StaggerAnim").Value = true
611
		end
612
		if hit.Parent:FindFirstChild("Stats") ~= nil and hit.Parent.Stats:FindFirstChild("BlockValue") ~= nil and hit.Parent.Stats:FindFirstChild("BlockValue").Value == true then
613
			if hit.Parent.Stats:FindFirstChild("BlockDebounce") == nil then
614
				DamageStatLabel("Interruption", hit.Parent.Head.CFrame, "Blocked!", Color3.new(0, 0.3921568627451, 1))
615
				local BlockDebounce = Instance.new("BoolValue", hit.Parent.Stats)
616
				BlockDebounce.Name = "BlockDebounce"
617
				BlockDebounce.Value = true
618
				game:GetService("Debris"):AddItem(BlockDebounce, 0.1)
619
			end
620
			do
621
				if ranged ~= true then
622
					do
623
						if hit.Parent.Stats:FindFirstChild("BlockDebounce2") == nil then
624
							local BlockDebounce2 = Instance.new("BoolValue", hit.Parent.Stats)
625
							BlockDebounce2.Name = "BlockDebounce2"
626
							BlockDebounce2.Value = true
627
							game:GetService("Debris"):AddItem(BlockDebounce2, 0.1)
628
							so(HitBlockSounds[math.random(1, #HitBlockSounds)], hit, 1, 1)
629
						end
630
						hit.Parent.Stats:FindFirstChild("BlockValue").Value = false
631
						StaggerAnim.Value = true
632
						do return  end
633
						if DecreaseTheStat ~= nil and hit.Parent:FindFirstChild("Stats") ~= nil then
634
							if DecreaseTheStat == "Defense" then
635
								DecreaseStat(hit.Parent, "Defense", DecreaseAmount, DecreaseDuration, ShowDecreasedStat)
636
							else
637
								if DecreaseTheStat == "Damage" then
638
									DecreaseStat(hit.Parent, "Damage", DecreaseAmount, DecreaseDuration, ShowDecreasedStat)
639
								else
640
									if DecreaseTheStat == "Movement" then
641
										DecreaseStat(hit.Parent, "Movement", DecreaseAmount, DecreaseDuration, ShowDecreasedStat)
642
									end
643
								end
644
							end
645
						end
646
						local D = math.random(minim, maxim) * Damage.Value
647
						if hit.Parent:FindFirstChild("Stats") ~= nil then
648
							if hit.Parent.Stats:FindFirstChild("Defense") then
649
								if CanPenetrateArmor.Value == true then
650
									D = D / hit.Parent.Stats:FindFirstChild("Defense").Value
651
									-- DECOMPILER ERROR at PC377: Unhandled construct in 'MakeBoolean' P1
652
653
									if hit.Parent.Stats:FindFirstChild("Defense") ~= nil or CanCrit.Value == true then
654
										CritChanceNumber = math.random(1, CritChance.Value)
655
										if CritChanceNumber == CritChance.Value then
656
											D = D * 2
657
										end
658
									end
659
									D = math.floor(D)
660
									h.Health = h.Health - D
661
									if D <= 3 and staggerhit == true then
662
										if ranged ~= true then
663
											StaggerHitAnim.Value = true
664
										end
665
										if ranged ~= true then
666
											so(HitArmorSounds[math.random(1, #HitArmorSounds)], hit, 1, 1)
667
										end
668
									else
669
										if D > 3 and ranged ~= true then
670
											so(HitPlayerSounds[math.random(1, #HitPlayerSounds)], hit, 1, 1)
671
										end
672
									end
673
									if D > 3 and D < 20 then
674
										if CanCrit.Value == true and CritChanceNumber == CritChance.Value then
675
											DamageStatLabel("Normal", hit.Parent.Head.CFrame, "Crit! " .. D, Color3.new(0.7843137254902, 0, 0))
676
											so("296102734", hit, 1, 1)
677
										else
678
											DamageStatLabel("Normal", hit.Parent.Head.CFrame, D, Color3.new(1, 0.86274509803922, 0))
679
										end
680
									else
681
										if D >= 20 then
682
											if CanCrit.Value == true and CritChanceNumber == CritChance.Value then
683
												DamageStatLabel("Normal", hit.Parent.Head.CFrame, "Crit! " .. D, Color3.new(0.7843137254902, 0, 0))
684
												so("296102734", hit, 1, 1)
685
											else
686
												DamageStatLabel("Normal", hit.Parent.Head.CFrame, D, Color3.new(1, 0, 0))
687
											end
688
										else
689
											if D <= 3 then
690
												if CanCrit.Value == true and CritChanceNumber == CritChance.Value then
691
													DamageStatLabel("Normal", hit.Parent.Head.CFrame, "Crit! " .. D, Color3.new(0.7843137254902, 0, 0))
692
													so("296102734", hit, 1, 1)
693
												else
694
													DamageStatLabel("Normal", hit.Parent.Head.CFrame, D, Color3.new(0.88235294117647, 0.88235294117647, 0.88235294117647))
695
												end
696
											end
697
										end
698
									end
699
									do
700
										if Type == "Normal" then
701
											local vp = Instance.new("BodyVelocity")
702
											vp.P = 500
703
											vp.maxForce = vt(math.huge, 0, math.huge)
704
											if KnockbackType == 1 then
705
												vp.Velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
706
											else
707
												if KnockbackType == 2 then
708
													vp.Velocity = Property.CFrame.lookVector * knockback
709
												end
710
											end
711
											if knockback > 0 then
712
												vp.Parent = hit.Parent.Torso
713
											end
714
											game:GetService("Debris"):AddItem(vp, 0.5)
715
										end
716
										local DebounceHit = Instance.new("BoolValue", hit.Parent)
717
										DebounceHit.Name = "DebounceHit"
718
										DebounceHit.Value = true
719
										game:GetService("Debris"):AddItem(DebounceHit, Delay)
720
									end
721
								end
722
							end
723
						end
724
					end
725
				end
726
			end
727
		end
728
	end
729
end
730
731
	MagniDamage = function(Part, magni, mindam, maxdam, knock, Type, Property, Delay, KnockbackType, incstun, stagger, staggerhit, ranged, MagicDecreaseTheStat, MagicDecreaseAmount, MagicDecreaseDuration, MagicShowDecreasedStat)
732
	
733
	for _,c in pairs(workspace:GetChildren()) do
734
		local hum = (c:FindFirstChild("Humanoid"))
735
		local head = nil
736
		if hum ~= nil then
737
			head = c:FindFirstChild("Torso")
738
			if head ~= nil then
739
				local targ = head.Position - Part.Position
740
				local mag = targ.magnitude
741
				if mag <= magni and c.Name ~= Player.Name then
742
					Damagefunc(head, mindam, maxdam, knock, Type, Property, Delay, KnockbackType, incstun, stagger, staggerhit, ranged, MagicDecreaseTheStat, MagicDecreaseAmount, MagicDecreaseDuration, MagicShowDecreasedStat)
743
				end
744
			end
745
			do
746
				for _,d in pairs(c:GetChildren()) do
747
					if d.ClassName == "Model" and ranged ~= true then
748
						head = d:FindFirstChild("Hitbox")
749
						if head ~= nil then
750
							local targ = head.Position - Part.Position
751
							local mag = targ.magnitude
752
							if mag <= magni and c.Name ~= Player.Name then
753
								local hitrefpart = part(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", vt())
754
								hitrefpart.Anchored = true
755
								hitrefpart.CFrame = cf(head.Position)
756
								so(HitWeaponSounds[math.random(1, #HitWeaponSounds)], hitrefpart, 1, 1)
757
								StaggerHitAnim.Value = true
758
							end
759
						end
760
					end
761
				end
762
				do
763
					-- DECOMPILER ERROR at PC107: LeaveBlock: unexpected jumping out DO_STMT
764
765
					-- DECOMPILER ERROR at PC107: LeaveBlock: unexpected jumping out IF_THEN_STMT
766
767
					-- DECOMPILER ERROR at PC107: LeaveBlock: unexpected jumping out IF_STMT
768
769
				end
770
			end
771
		end
772
	end
773
end
774
775
	MagniBufforDebuff = function(Part, Magni, Type, Stat, Amount, Duration, ShowTheBufforDebuff, ApplyToOthersInstead)
776
	
777
	if Player.Neutral == true then
778
		if Type == "Buff" then
779
			IncreaseStat(Character, Stat, Amount, Duration, ShowTheBufforDebuff)
780
		else
781
			if Type == "Debuff" then
782
				DecreaseStat(Character, Stat, Amount, Duration, ShowTheBufforDebuff)
783
			end
784
		end
785
	end
786
	for _,c in pairs(workspace:GetChildren()) do
787
		local hum = (c:FindFirstChild("Humanoid"))
788
		local head = nil
789
		if hum ~= nil then
790
			head = c:FindFirstChild("Torso")
791
			if head ~= nil then
792
				local targ = head.Position - Part.Position
793
				local mag = targ.magnitude
794
				-- DECOMPILER ERROR at PC83: Unhandled construct in 'MakeBoolean' P1
795
796
				if ApplyToOthersInstead == true and mag <= Magni and c.Name ~= Player.Name and Player.Neutral == false and game.Players:GetPlayerFromCharacter(head.Parent) ~= nil and game.Players:GetPlayerFromCharacter(head.Parent).TeamColor == Player.TeamColor then
797
					if Type == "Buff" then
798
						IncreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff)
799
					else
800
						if Type == "Debuff" then
801
							DecreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff)
802
						end
803
					end
804
				end
805
			end
806
		end
807
		if ApplyToOthersInstead == false and mag <= Magni and Player.Neutral == false and game.Players:GetPlayerFromCharacter(head.Parent) ~= nil and game.Players:GetPlayerFromCharacter(head.Parent).TeamColor == Player.TeamColor then
808
			if Type == "Buff" then
809
				IncreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff)
810
			else
811
				if Type == "Debuff" then
812
					DecreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff)
813
				end
814
			end
815
		end
816
	end
817
end
818
819
	Lightning = function(p0, p1, tym, ofs, brickcolor, material, th, tra, last)
820
	
821
	local magz = p0 - p1.magnitude
822
	local curpos = p0
823
	local trz = {-ofs, ofs}
824
	for i = 1, tym do
825
		local li = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt(th, th, magz / tym))
826
		do
827
			li.Anchored = true
828
			local ofz = vt(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
829
			local trolpos = cf(curpos, p1) * cf(0, 0, magz / tym).p + ofz
830
			if tym == i then
831
				local magz2 = curpos - p1.magnitude
832
				li.Size = vt(th, th, magz2)
833
				li.CFrame = cf(curpos, p1) * cf(0, 0, -magz2 / 2)
834
			else
835
				do
836
					do
837
						li.CFrame = cf(curpos, trolpos) * cf(0, 0, magz / tym / 2)
838
						curpos = li.CFrame * cf(0, 0, magz / tym / 2).p
839
						game.Debris:AddItem(li, last)
840
						coroutine.resume(coroutine.create(function()
841
		
842
		while li.Transparency ~= 1 do
843
			for i = 0, 1, last do
844
				hbwait()
845
				li.Transparency = li.Transparency + 0.1 / last
846
			end
847
		end
848
	end
849
))
850
					end
851
					-- DECOMPILER ERROR at PC118: LeaveBlock: unexpected jumping out IF_ELSE_STMT
852
853
					-- DECOMPILER ERROR at PC118: LeaveBlock: unexpected jumping out IF_STMT
854
855
					-- DECOMPILER ERROR at PC118: LeaveBlock: unexpected jumping out DO_STMT
856
857
				end
858
			end
859
		end
860
	end
861
end
862
863
	MagicRing = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay)
864
	
865
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
866
	prt.Anchored = true
867
	prt.CFrame = cframe
868
	local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", vt(0, 0, 0), vt(x1, y1, z1))
869
	game:GetService("Debris"):AddItem(prt, 10)
870
	coroutine.resume(coroutine.create(function(Part, Mesh)
871
		
872
		for i = 0, 1, delay do
873
			hbwait()
874
			Part.CFrame = Part.CFrame
875
			Part.Transparency = i
876
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
877
		end
878
		Part.Parent = nil
879
	end
880
), prt, msh)
881
end
882
883
	MagicWave = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay)
884
	
885
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
886
	prt.Anchored = true
887
	prt.CFrame = cframe
888
	local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, -0.1 * z1), vt(x1, y1, z1))
889
	game:GetService("Debris"):AddItem(prt, 10)
890
	coroutine.resume(coroutine.create(function(Part, Mesh)
891
		
892
		for i = 0, 1, delay do
893
			hbwait()
894
			Part.CFrame = Part.CFrame
895
			Part.Transparency = i
896
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
897
		end
898
		Part.Parent = nil
899
	end
900
), prt, msh)
901
end
902
903
	MagicBlock = function(brickcolor, material, rotate, cframe, x1, y1, z1, x3, y3, z3, delay)
904
	
905
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
906
	prt.Anchored = true
907
	prt.CFrame = cframe * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
908
	local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
909
	game:GetService("Debris"):AddItem(prt, 10)
910
	coroutine.resume(coroutine.create(function(Part, Mesh)
911
		
912
		for i = 0, 1, delay do
913
			hbwait()
914
			if rotate == true then
915
				Part.CFrame = Part.CFrame * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
916
			end
917
			Part.Transparency = i
918
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
919
		end
920
		Part.Parent = nil
921
	end
922
), prt, msh)
923
end
924
925
	MagicBlock2 = function(brickcolor, material, rotate, cframe, x1, y1, z1, x3, y3, z3, delay)
926
	
927
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
928
	prt.Anchored = true
929
	prt.CFrame = cframe * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
930
	local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
931
	game:GetService("Debris"):AddItem(prt, 10)
932
	CF = prt.CFrame
933
	num = math.random(5, 20)
934
	coroutine.resume(coroutine.create(function(Part, Mesh, CF2, Num)
935
		
936
		for i = 0, 1, delay do
937
			hbwait()
938
			if rotate == true then
939
				Part.CFrame = CF2 * cf(0, i * Num, 0) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
940
			else
941
				Part.CFrame = CF2 * cf(0, i * Num, 0)
942
			end
943
			Part.Transparency = i
944
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
945
		end
946
		Part.Parent = nil
947
	end
948
), prt, msh, CF, num)
949
end
950
951
	MagicCylinder = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay)
952
	
953
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
954
	prt.Anchored = true
955
	prt.CFrame = cframe
956
	local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
957
	game:GetService("Debris"):AddItem(prt, 10)
958
	coroutine.resume(coroutine.create(function(Part, Mesh)
959
		
960
		for i = 0, 1, delay do
961
			hbwait()
962
			Part.Transparency = i
963
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
964
		end
965
		Part.Parent = nil
966
	end
967
), prt, msh)
968
end
969
970
	MagicCircle = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay)
971
	
972
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
973
	prt.Anchored = true
974
	prt.CFrame = cframe
975
	local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
976
	game:GetService("Debris"):AddItem(prt, 10)
977
	coroutine.resume(coroutine.create(function(Part, Mesh)
978
		
979
		for i = 0, 1, delay do
980
			hbwait()
981
			Part.Transparency = i
982
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
983
		end
984
		Part.Parent = nil
985
	end
986
), prt, msh)
987
end
988
989
	MagicHead = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay)
990
	
991
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
992
	prt.Anchored = true
993
	prt.CFrame = cframe
994
	local msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1))
995
	game:GetService("Debris"):AddItem(prt, 10)
996
	coroutine.resume(coroutine.create(function(Part, Mesh)
997
		
998
		for i = 0, 1, delay do
999
			hbwait()
1000
			Part.Transparency = i
1001
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
1002
		end
1003
		Part.Parent = nil
1004
	end
1005
), prt, msh)
1006
end
1007
1008
	BreakEffect = function(brickcolor, material, rotate, cframe, x1, y1, z1, delay)
1009
	
1010
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
1011
	prt.Anchored = true
1012
	prt.CFrame = cframe * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1013
	local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
1014
	game:GetService("Debris"):AddItem(prt, 10)
1015
	coroutine.resume(coroutine.create(function(Part, CF, Numbb, randnumb)
1016
		
1017
		CF = Part.CFrame
1018
		Numbb = 0
1019
		randnumb = math.random() - math.random()
1020
		for i = 0, 1, delay do
1021
			hbwait()
1022
			CF = CF * cf(0, 1, 0)
1023
			if rotate == true then
1024
				Part.CFrame = CF * angles(Numbb, 0, 0)
1025
			else
1026
				if rotate == false then
1027
					Part.CFrame = CF
1028
				end
1029
			end
1030
			Part.Transparency = i
1031
			Numbb = Numbb + (randnumb)
1032
		end
1033
		Part.Parent = nil
1034
	end
1035
), prt, CF, Numbb, randnumb)
1036
end
1037
1038
	ElecEffect = function(brickcolor, material, cf, x, y, z, delay)
1039
	
1040
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
1041
	prt.Anchored = true
1042
	prt.CFrame = cf
1043
	xval = math.random()
1044
	yval = math.random()
1045
	zval = math.random()
1046
	local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x, y, z))
1047
	game:GetService("Debris"):AddItem(prt, 10)
1048
	coroutine.resume(coroutine.create(function(Part, Mesh, xvaal, yvaal, zvaal)
1049
		
1050
		for i = 0, 1, delay do
1051
			hbwait()
1052
			Part.CFrame = Part.CFrame
1053
			xvaal = xvaal - 0.1 * (delay * 10)
1054
			yvaal = yvaal - 0.1 * (delay * 10)
1055
			zvaal = zvaal - 0.1 * (delay * 10)
1056
			Mesh.Scale = Mesh.Scale + vt(xvaal, yvaal, zvaal)
1057
			Part.Transparency = i
1058
		end
1059
		Part.Parent = nil
1060
	end
1061
), prt, msh, xval, yval, zval)
1062
end
1063
1064
	TrailEffect = function(brickcolor, material, currentcf, oldcf, meshtype, reflectance, size, x, y, z, delay)
1065
	
1066
	local magnitudecframe = currentcf.p - oldcf.p.magnitude
1067
	if magnitudecframe > 0.01 then
1068
		local prt = part(3, Effects, material, reflectance, 0, brickcolor, "Effect", vt(1, magnitudecframe, 1))
1069
		prt.Anchored = true
1070
		prt.CFrame = cf((currentcf.p + oldcf.p) / 2, oldcf.p) * angles(rad(90), 0, 0)
1071
		local TheMeshType = "BlockMesh"
1072
		if meshtype == "Cylinder" then
1073
			TheMeshType = "CylinderMesh"
1074
		end
1075
		local msh = mesh(TheMeshType, prt, "", "", vt(0, 0, 0), vt(0 + size, 1, 0 + size))
1076
		game:GetService("Debris"):AddItem(prt, 10)
1077
		coroutine.resume(coroutine.create(function(Part, Mesh, TheCurrentCFrame, TheLastCFrame)
1078
		
1079
		for i = 0, 1, delay do
1080
			hbwait()
1081
			Part.Transparency = i
1082
			Mesh.Scale = Mesh.Scale + vt(x, y, z)
1083
		end
1084
		Part.Parent = nil
1085
	end
1086
), prt, msh, currentcf, oldcf)
1087
	end
1088
end
1089
1090
	ClangEffect = function(brickcolor, material, cframe, angle, duration, size, power, reflectance, x, y, z, delay)
1091
	
1092
	local prt = part(3, Effects, material, 0, 1, brickcolor, "Effect", vt())
1093
	prt.Anchored = true
1094
	prt.CFrame = cframe
1095
	local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(0, 0, 0))
1096
	game:GetService("Debris"):AddItem(prt, 10)
1097
	local TheLastPoint = cframe
1098
	coroutine.resume(coroutine.create(function(Part)
1099
		
1100
		for i = 1, duration do
1101
			hbwait()
1102
			Part.CFrame = Part.CFrame * angles(rad(angle), 0, 0) * cf(0, power, 0)
1103
			TrailEffect(brickcolor, material, Part.CFrame, TheLastPoint, "Cylinder", reflectance, size, x, y, z, delay)
1104
			TheLastPoint = Part.CFrame
1105
		end
1106
		Part.Parent = nil
1107
	end
1108
), prt)
1109
end
1110
1111
	MagicCone = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay)
1112
	
1113
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
1114
	prt.Anchored = true
1115
	prt.CFrame = cframe
1116
	local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1778999", vt(0, 0, 0), vt(x1, y1, z1))
1117
	game:GetService("Debris"):AddItem(prt, 10)
1118
	coroutine.resume(coroutine.create(function(Part, Mesh)
1119
		
1120
		for i = 0, 1, delay do
1121
			hbwait()
1122
			Part.Transparency = i
1123
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
1124
		end
1125
		Part.Parent = nil
1126
	end
1127
), prt, msh)
1128
end
1129
1130
	MagicFlatCone = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay)
1131
	
1132
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
1133
	prt.Anchored = true
1134
	prt.CFrame = cframe
1135
	local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1033714", vt(0, 0, 0), vt(x1, y1, z1))
1136
	game:GetService("Debris"):AddItem(prt, 10)
1137
	coroutine.resume(coroutine.create(function(Part, Mesh)
1138
		
1139
		for i = 0, 1, delay do
1140
			hbwait()
1141
			Part.Transparency = i
1142
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
1143
		end
1144
		Part.Parent = nil
1145
	end
1146
), prt, msh)
1147
end
1148
1149
	MagicSpikedCrown = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay)
1150
	
1151
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
1152
	prt.Anchored = true
1153
	prt.CFrame = cframe
1154
	local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1323306", vt(0, 0, 0), vt(x1, y1, z1))
1155
	game:GetService("Debris"):AddItem(prt, 10)
1156
	coroutine.resume(coroutine.create(function(Part, Mesh)
1157
		
1158
		for i = 0, 1, delay do
1159
			hbwait()
1160
			Part.Transparency = i
1161
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
1162
		end
1163
		Part.Parent = nil
1164
	end
1165
), prt, msh)
1166
end
1167
1168
	MagicCrown = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay)
1169
	
1170
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
1171
	prt.Anchored = true
1172
	prt.CFrame = cframe
1173
	local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1078075", vt(0, 0, 0), vt(x1, y1, z1))
1174
	game:GetService("Debris"):AddItem(prt, 10)
1175
	coroutine.resume(coroutine.create(function(Part, Mesh)
1176
		
1177
		for i = 0, 1, delay do
1178
			hbwait()
1179
			Part.Transparency = i
1180
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
1181
		end
1182
		Part.Parent = nil
1183
	end
1184
), prt, msh)
1185
end
1186
1187
	MagicSkull = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay)
1188
	
1189
	local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt())
1190
	prt.Anchored = true
1191
	prt.CFrame = cframe
1192
	local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=4770583", vt(0, 0, 0), vt(x1, y1, z1))
1193
	game:GetService("Debris"):AddItem(prt, 10)
1194
	coroutine.resume(coroutine.create(function(Part, Mesh)
1195
		
1196
		for i = 0, 1, delay do
1197
			hbwait()
1198
			Part.Transparency = i
1199
			Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
1200
		end
1201
		Part.Parent = nil
1202
	end
1203
), prt, msh)
1204
end
1205
1206
	local startequipped = true
1207
	local startequippedwithequipanimation = false
1208
	local disableanimator = true
1209
	local disableanimate = true
1210
	local alternatewalk = false
1211
	local hidemenu = false
1212
	local allowmenutofunction = false
1213
	local allowabilitiestofunction = false
1214
	local canunequiporequip = false
1215
	local allowwalking = false
1216
	local disablemovingarms = false
1217
	local usemotorsinsteadofwelds = false
1218
	local leftarm = false
1219
	local rightarm = false
1220
	local allowhopperbin = false
1221
	local showstunbar = false
1222
	local walkspeeddependsonmovementvalue = true
1223
	local alternatemanaregensystem = false
1224
	local showhealthmanaandstunnumbers = false
1225
	local changebarcolorsifnotenoughmana = false
1226
	local disablejump = false
1227
	if hidemenu == true or allowmenutofunction == false then
1228
		for _,v in pairs(scrn:GetChildren()) do
1229
			if v.ClassName == "Frame" or v.ClassName == "TextLabel" then
1230
				v.Visible = false
1231
				v.BorderSizePixel = 0
1232
			end
1233
		end
1234
	end
1235
	do
1236
		Humanoid.Changed:connect(function(Jump)
1237
	
1238
	if Jump == "Jump" and disablejump == true then
1239
		Humanoid.Jump = false
1240
	end
1241
end
1242
)
1243
		if allowmenutofunction == true then
1244
			for _,v in pairs(scrn:GetChildren()) do
1245
				if v.ClassName == "Frame" then
1246
					for _,b in pairs(v:GetChildren()) do
1247
						if b.ClassName == "TextLabel" then
1248
							coroutine.resume(coroutine.create(function(TheTextLabel)
1249
	
1250
	wait(menuupdatespeed)
1251
	for i = 1, 0, -0.1 do
1252
		hbwait()
1253
		TheTextLabel.TextTransparency = i
1254
		TheTextLabel.TextStrokeTransparency = i
1255
	end
1256
	TheTextLabel.TextTransparency = 0
1257
	TheTextLabel.TextStrokeTransparency = 0
1258
end
1259
), b)
1260
							if showstats == true then
1261
								coroutine.resume(coroutine.create(function(TheTextLabel)
1262
	
1263
	wait(menuupdatespeed)
1264
	for i = 1, 0, -0.1 do
1265
		hbwait()
1266
		TheTextLabel.TextTransparency = i
1267
		TheTextLabel.TextStrokeTransparency = i
1268
	end
1269
	TheTextLabel.TextTransparency = 0
1270
	TheTextLabel.TextStrokeTransparency = 0
1271
end
1272
), b)
1273
							end
1274
							if showstunbar == true then
1275
								coroutine.resume(coroutine.create(function(TheTextLabel)
1276
	
1277
	wait(menuupdatespeed)
1278
	for i = 1, 0, -0.1 do
1279
		hbwait()
1280
		TheTextLabel.TextTransparency = i
1281
		TheTextLabel.TextStrokeTransparency = i
1282
	end
1283
	TheTextLabel.TextTransparency = 0
1284
	TheTextLabel.TextStrokeTransparency = 0
1285
end
1286
), b)
1287
							end
1288
							if allowabilitiestofunction == true then
1289
								coroutine.resume(coroutine.create(function(TheTextLabel)
1290
	
1291
	wait(menuupdatespeed)
1292
	for i = 1, 0, -0.1 do
1293
		hbwait()
1294
		TheTextLabel.TextTransparency = i
1295
		TheTextLabel.TextStrokeTransparency = i
1296
	end
1297
	TheTextLabel.TextTransparency = 0
1298
	TheTextLabel.TextStrokeTransparency = 0
1299
end
1300
), b)
1301
							end
1302
						end
1303
					end
1304
				end
1305
			end
1306
		end
1307
		do
1308
			if allowhopperbin == true then
1309
				if script.Parent.className ~= "HopperBin" then
1310
					Tool = Instance.new("HopperBin")
1311
					Tool.Parent = Backpack
1312
					Tool.Name = WeaponName
1313
					script.Parent = Tool
1314
				end
1315
				Bin = script.Parent
1316
			end
1317
			if disablemovingarms == true then
1318
				RWC0 = cf(0, 0 - (0.5 * PlayerSize - 0.5), 0) * angles(rad(0), rad(0), rad(0))
1319
				LWC0 = cf(0, 0 - (0.5 * PlayerSize - 0.5), 0) * angles(rad(0), rad(0), rad(0))
1320
				RSH = nil
1321
				if usemotorsinsteadofwelds == true then
1322
					RW = Instance.new("Motor")
1323
					LW = Instance.new("Motor")
1324
				else
1325
					RW = Instance.new("Weld")
1326
					LW = Instance.new("Weld")
1327
				end
1328
				RW.Name = "Right Shoulder"
1329
				LW.Name = "Left Shoulder"
1330
				RSH = Torso["Right Shoulder"]
1331
				LSH = Torso["Left Shoulder"]
1332
				RSH.Parent = Torso
1333
				LSH.Parent = Torso
1334
				RW.Name = "Right Shoulder"
1335
				RW.Part0 = Torso
1336
				RW.C0 = cf(1.5, 0.5, 0)
1337
				RW.C1 = cf(0, 0.5, 0)
1338
				RW.Part1 = Character["Right Arm"]
1339
				RW.Parent = nil
1340
				LW.Name = "Left Shoulder"
1341
				LW.Part0 = Torso
1342
				LW.C0 = cf(-1.5, 0.5, 0)
1343
				LW.C1 = cf(0, 0.5, 0)
1344
				LW.Part1 = Character["Left Arm"]
1345
				LW.Parent = nil
1346
			else
1347
				RW = Torso["Right Shoulder"]
1348
				LW = Torso["Left Shoulder"]
1349
				RWC0 = cf(-0.5, 0, 0) * angles(rad(0), rad(90), rad(0))
1350
				LWC0 = cf(0.5, 0, 0) * angles(rad(0), rad(-90), rad(0))
1351
			end
1352
			equipanim = function()
1353
	
1354
	attack = true
1355
	Movement.Value = Movement.Value - 0.1
1356
	Defense.Value = Defense.Value + 0.4
1357
	for i = 0, 1, 0.08 / animationspeed do
1358
		hbwait()
1359
		RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1360
		Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1361
		RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0, 0.3 / animationspeed)
1362
		LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0, 0.3 / animationspeed)
1363
		RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1364
		LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1365
	end
1366
	attack = false
1367
end
1368
1369
			unequipanim = function()
1370
	
1371
	attack = true
1372
	for i = 0, 1, 0.08 / animationspeed do
1373
		hbwait()
1374
		RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1375
		Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)), 0.3 / animationspeed)
1376
		RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0, 0.3 / animationspeed)
1377
		LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0, 0.3 / animationspeed)
1378
		if disablemovingarms == false then
1379
			RW.C1 = clerp(RW.C1, angles(0, rad(90), 0) * cf(0, 0.5 * PlayerSize, -0.5), 0.3 / animationspeed)
1380
			LW.C1 = clerp(LW.C1, angles(0, rad(-90), 0) * cf(0, 0.5 * PlayerSize, -0.5), 0.3 / animationspeed)
1381
		end
1382
		RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1383
		LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1384
		RH.C1 = clerp(RH.C1, angles(0, rad(90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize), 0.3 / animationspeed)
1385
		LH.C1 = clerp(LH.C1, angles(0, rad(-90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize), 0.3 / animationspeed)
1386
	end
1387
	RootJoint.C0 = RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0))
1388
	Neck.C0 = necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(0))
1389
	Neck.C1 = angles(rad(90), rad(180), 0) * cf(0, 0, -0.5 * PlayerSize)
1390
	RW.C0 = cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0
1391
	LW.C0 = cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0
1392
	if disablemovingarms == false then
1393
		RW.C1 = angles(0, rad(90), 0) * cf(0, 0.5 * PlayerSize, -0.5)
1394
		LW.C1 = angles(0, rad(-90), 0) * cf(0, 0.5 * PlayerSize, -0.5)
1395
	end
1396
	RH.C0 = cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0))
1397
	LH.C0 = cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0))
1398
	RH.C1 = angles(0, rad(90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize)
1399
	LH.C1 = angles(0, rad(-90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize)
1400
	Movement.Value = Movement.Value + 0.1
1401
	Defense.Value = Defense.Value - 0.4
1402
	attack = false
1403
end
1404
1405
			if startequipped == true then
1406
				equipped = true
1407
				if disableanimate == true then
1408
					Animate.Disabled = true
1409
					local idleanimation = Humanoid:LoadAnimation(Torso.robloxidleanimation)
1410
					idleanimation:Play()
1411
				end
1412
					if disableanimator == true then
1413
						Animator.Parent = nil
1414
					end
1415
					if disablemovingarms == true then
1416
						RW.Parent = Torso
1417
						LW.Parent = Torso
1418
						RSH.Parent = nil
1419
						LSH.Parent = nil
1420
					end
1421
					Movement.Value = Movement.Value - 0.1
1422
					Defense.Value = Defense.Value + 0.4
1423
end
1424
					if startequippedwithequipanimation == true then
1425
						equipped = true
1426
						if disableanimate == true then
1427
							Animate.Disabled = true
1428
							local idleanimation = Humanoid:LoadAnimation(Torso.robloxidleanimation)
1429
							idleanimation:Play()
1430
						end
1431
							if disableanimator == true then
1432
								Animator.Parent = nil
1433
							end
1434
							if disablemovingarms == true then
1435
								RW.Parent = Torso
1436
								LW.Parent = Torso
1437
								RSH.Parent = nil
1438
								LSH.Parent = nil
1439
							end
1440
							coroutine.resume(coroutine.create(function()
1441
	
1442
	hbwait()
1443
	equipanim()
1444
end
1445
))
1446
end
1447
1448
							StaggerHit = function()
1449
	
1450
	attack = true
1451
	if Hitbox ~= nil then
1452
		for i = 1, math.random(2, 4) do
1453
			ClangEffect("Bright yellow", "Neon", cf(Hitbox.Position) * angles(rad(math.random(-50, 50)), rad(math.random(-50, 50)), rad(math.random(-50, 50))), 20, 5, 0.2, math.random(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1)
1454
		end
1455
	end
1456
	do
1457
		for i = 0, 1, 0.1 / animationspeed do
1458
			hbwait()
1459
			RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(-10), rad(0), rad(-30)), 0.3 / animationspeed)
1460
			Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(30)) * angles(rad(5), rad(0), rad(0)), 0.3 / animationspeed)
1461
			RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-30), rad(0), rad(60)) * angles(rad(0), rad(-30), rad(0)) * RWC0, 0.3 / animationspeed)
1462
			LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-20), rad(0), rad(-20)) * angles(rad(0), rad(20), rad(0)) * LWC0, 0.3 / animationspeed)
1463
			RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.9 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-10), rad(0), rad(-20)), 0.3 / animationspeed)
1464
			LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-70), rad(0)) * angles(rad(-5), rad(0), rad(10)), 0.3 / animationspeed)
1465
			if StaggerAnim.Value ~= true then
1466
				do
1467
					if StunAnim.Value == true then
1468
						break
1469
					end
1470
					-- DECOMPILER ERROR at PC314: LeaveBlock: unexpected jumping out IF_THEN_STMT
1471
1472
					-- DECOMPILER ERROR at PC314: LeaveBlock: unexpected jumping out IF_STMT
1473
1474
				end
1475
			end
1476
		end
1477
		attack = false
1478
	end
1479
end
1480
1481
							Stagger = function()
1482
	
1483
	attack = true
1484
	disablejump = true
1485
	if Hitbox ~= nil then
1486
		for i = 1, math.random(2, 4) do
1487
			ClangEffect("Bright yellow", "Neon", cf(Hitbox.Position) * angles(rad(math.random(-50, 50)), rad(math.random(-50, 50)), rad(math.random(-50, 50))), 20, 5, 0.2, math.random(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1)
1488
		end
1489
	end
1490
	do
1491
		attacktype = 1
1492
		DamageStatLabel("Interruption", Head.CFrame, "Staggered!", Color3.new(1, 1, 0))
1493
		local staggervelocity = Instance.new("BodyVelocity", Torso)
1494
		staggervelocity.P = 500
1495
		staggervelocity.maxForce = vt(math.huge, 0, math.huge)
1496
		if Rooted.Value == false then
1497
			staggervelocity.Velocity = RootPart.CFrame.lookVector * -25
1498
		end
1499
		for i = 0, 1, 0.35 / animationspeed do
1500
			hbwait()
1501
			RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.1 * PlayerSize) * angles(rad(-20), rad(0), rad(-30)), 0.3 / animationspeed)
1502
			Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(35)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1503
			RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(20), rad(-30), rad(40)) * RWC0, 0.3 / animationspeed)
1504
			LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(10), rad(5), rad(-20)) * LWC0, 0.3 / animationspeed)
1505
			RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 * PlayerSize, -0.25 * PlayerSize) * angles(rad(0), rad(100), rad(0)) * angles(rad(-20), rad(0), rad(40)), 0.3 / animationspeed)
1506
			LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0.25 * PlayerSize) * angles(rad(0), rad(-60), rad(0)) * angles(rad(-5), rad(0), rad(10)), 0.3 / animationspeed)
1507
		end
1508
		for i = 0, 1, 0.2 / animationspeed do
1509
			hbwait()
1510
			RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.2 * PlayerSize) * angles(rad(-30), rad(0), rad(-30)), 0.3 / animationspeed)
1511
			Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(35)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1512
			RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(20), rad(-30), rad(40)) * RWC0, 0.3 / animationspeed)
1513
			LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(10), rad(5), rad(-20)) * LWC0, 0.3 / animationspeed)
1514
			RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 * PlayerSize, -0.25 * PlayerSize) * angles(rad(0), rad(100), rad(0)) * angles(rad(-20), rad(0), rad(40)), 0.3 / animationspeed)
1515
			LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.9 * PlayerSize, 0.25 * PlayerSize) * angles(rad(0), rad(-60), rad(0)) * angles(rad(-5), rad(0), rad(30)), 0.3 / animationspeed)
1516
		end
1517
		staggervelocity:Destroy()
1518
		for i = 0, 1, 0.015 / animationspeed do
1519
			hbwait()
1520
			RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -1.8 * PlayerSize) * angles(rad(0), rad(0), rad(-20)) * angles(rad(-5), rad(-5), rad(0)), 0.3 / animationspeed)
1521
			Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(20), rad(0), rad(20)) * angles(rad(0), rad(5), rad(0)), 0.3 / animationspeed)
1522
			RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(20)) * angles(rad(0), rad(-20), rad(0)) * RWC0, 0.3 / animationspeed)
1523
			LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-15), rad(0), rad(-10)) * angles(rad(0), rad(20), rad(0)) * LWC0, 0.3 / animationspeed)
1524
			RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.5 * PlayerSize, -0.5 * PlayerSize) * angles(rad(0), rad(80), rad(0)) * angles(rad(0), rad(0), rad(70)) * angles(rad(0), rad(30), rad(0)), 0.3 / animationspeed)
1525
			LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, 0.4 * PlayerSize, -0.5 * PlayerSize) * angles(rad(0), rad(-80), rad(0)) * angles(rad(-2.5), rad(0), rad(-10)), 0.3 / animationspeed)
1526
			if StunAnim.Value == true then
1527
				break
1528
			end
1529
		end
1530
		do
1531
			attacktype = 1
1532
			disablejump = false
1533
			attack = false
1534
		end
1535
	end
1536
end
1537
1538
							Stun = function()
1539
	
1540
	attack = true
1541
	disablejump = true
1542
	attacktype = 1
1543
	DamageStatLabel("Interruption", Head.CFrame, "Stunned!", Color3.new(1, 1, 0))
1544
	for i = 0, 1, 0.4 / animationspeed do
1545
		hbwait()
1546
		RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(15), rad(0), rad(-160)), 0.3 / animationspeed)
1547
		Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(10), rad(0), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1548
		RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(70), rad(0), rad(15)) * RWC0, 0.3 / animationspeed)
1549
		LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(70), rad(0), rad(-15)) * LWC0, 0.3 / animationspeed)
1550
		RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-5), rad(0), rad(-20)), 0.3 / animationspeed)
1551
		LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-5), rad(0), rad(-20)), 0.3 / animationspeed)
1552
	end
1553
	for i = 0, 1, 0.4 / animationspeed do
1554
		hbwait()
1555
		RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.5 * PlayerSize) * angles(rad(45), rad(0), rad(-170)), 0.3 / animationspeed)
1556
		Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(-30)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1557
		RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(80), rad(0), rad(45)) * RWC0, 0.3 / animationspeed)
1558
		LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(80), rad(0), rad(-45)) * LWC0, 0.3 / animationspeed)
1559
		RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-5), rad(0), rad(-40)), 0.3 / animationspeed)
1560
		LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-5), rad(0), rad(-20)), 0.3 / animationspeed)
1561
	end
1562
	for i = 0, 1, 0.4 / animationspeed do
1563
		hbwait()
1564
		RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -1 * PlayerSize) * angles(rad(75), rad(0), rad(-180)), 0.3 / animationspeed)
1565
		Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(-60)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1566
		RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(90), rad(0), rad(75)) * RWC0, 0.3 / animationspeed)
1567
		LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-45), rad(0), rad(-75)) * LWC0, 0.3 / animationspeed)
1568
		RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-5), rad(0), rad(-40)), 0.3 / animationspeed)
1569
		LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-5), rad(0), rad(-30)), 0.3 / animationspeed)
1570
	end
1571
	Humanoid.AutoRotate = false
1572
	for i = 1, 70 * animationspeed do
1573
		hbwait()
1574
		RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -2.5 * PlayerSize) * angles(rad(90), rad(0), rad(-180)), 0.3 / animationspeed)
1575
		Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(-90)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1576
		RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(90), rad(-10), rad(90)) * RWC0, 0.3 / animationspeed)
1577
		LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-90), rad(0), rad(-90)) * LWC0, 0.3 / animationspeed)
1578
		RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0.2 * PlayerSize) * angles(rad(0), rad(70), rad(0)) * angles(rad(-10), rad(0), rad(0)), 0.3 / animationspeed)
1579
		LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-100), rad(0)) * angles(rad(-10), rad(0), rad(0)), 0.3 / animationspeed)
1580
	end
1581
	for i = 0, 1, 0.15 / animationspeed do
1582
		hbwait()
1583
		RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -1.5 * PlayerSize) * angles(rad(20), rad(0), rad(100)), 0.3 / animationspeed)
1584
		Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(-30)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed)
1585
		RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-20), rad(0), rad(30)) * RWC0, 0.3 / animationspeed)
1586
		LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(80), rad(0), rad(20)) * LWC0, 0.3 / animationspeed)
1587
		RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(60), rad(0)) * angles(rad(-5), rad(0), rad(70)), 0.3 / animationspeed)
1588
		LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.25 * PlayerSize, -1 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-10), rad(0), rad(20)), 0.3 / animationspeed)
1589
	end
1590
	Humanoid.AutoRotate = true
1591
	attacktype = 1
1592
	disablejump = false
1593
	attack = false
1594
end
1595
1596
							EAbility = function()
1597
	
1598
	attack = true
1599
	attack = false
1600
end
1601
1602
							Attack1 = function()
1603
	
1604
	attack = true
1605
	attack = false
1606
end
1607
1608
							Attack2 = function()
1609
	
1610
	attack = true
1611
	attack = false
1612
end
1613
1614
							Attack3 = function()
1615
	
1616
	attack = true
1617
	attack = false
1618
end
1619
1620
							Attack4 = function()
1621
	
1622
	attack = true
1623
	attack = false
1624
end
1625
1626
							Move1 = function()
1627
	
1628
	attack = true
1629
	attack = false
1630
end
1631
1632
							Move2 = function()
1633
	
1634
	attack = true
1635
	attack = false
1636
end
1637
1638
							Move3 = function()
1639
	
1640
	attack = true
1641
	attack = false
1642
end
1643
1644
							Move4 = function()
1645
	
1646
	attack = true
1647
	attack = false
1648
end
1649
1650
							hold = false
1651
							Mouse.Button1Down:connect(function()
1652
	
1653
	if attack == true or equipped == false then
1654
		return 
1655
	end
1656
	hold = true
1657
	if attacktype == 1 then
1658
		attacktype = 2
1659
		Attack1()
1660
	else
1661
		if attacktype == 2 then
1662
			attacktype = 3
1663
			Attack2()
1664
		else
1665
			if attacktype == 3 then
1666
				attacktype = 4
1667
				Attack3()
1668
			else
1669
				if attacktype == 4 then
1670
					attacktype = 1
1671
					Attack4()
1672
				end
1673
			end
1674
		end
1675
	end
1676
	coroutine.resume(coroutine.create(function()
1677
		
1678
		for i = 1, 50 do
1679
			if attack == false then
1680
				hbwait()
1681
			end
1682
		end
1683
		if attack == false then
1684
			attacktype = 1
1685
		end
1686
	end
1687
))
1688
end
1689
)
1690
							if allowhopperbin == true then
1691
								ob1u = function(Mouse)
1692
	
1693
	hold = false
1694
end
1695
1696
							end
1697
							Mouse.KeyDown:connect(function(key)
1698
	
1699
	if key == "f" and canunequiporequip == true and attack == false then
1700
		if equipped == false then
1701
			equipped = true
1702
			if disableanimate == true then
1703
				Animate.Disabled = true
1704
				local idleanimation = Humanoid:LoadAnimation(Torso.robloxidleanimation)
1705
				idleanimation:Play()
1706
			end
1707
				if disableanimator == true then
1708
					Animator.Parent = nil
1709
				end
1710
				if disablemovingarms == true then
1711
					RW.Parent = Torso
1712
					LW.Parent = Torso
1713
					RSH.Parent = nil
1714
					LSH.Parent = nil
1715
				end
1716
				equipanim()
1717
				elseif equipped == true then
1718
					equipped = false
1719
					unequipanim()
1720
					hbwait()
1721
					if disablemovingarms == true then
1722
						RW.Parent = nil
1723
						LW.Parent = nil
1724
						RSH.Parent = Torso
1725
						LSH.Parent = Torso
1726
					end
1727
					if disableanimator == true then
1728
						Animator.Parent = Humanoid
1729
					end
1730
					if disableanimate == true then
1731
						Animate.Disabled = false
1732
					end
1733
				end
1734
end
1735
				if key == "e" and attack == false and equipped == true then
1736
					if animtype < 3 then
1737
						animtype = animtype + 1
1738
					elseif animtype >= 3 then
1739
						animtype = 1
1740
					end
1741
				end
1742
				if key == "z" and attack == false and equipped == true and co1 <= cooldown1 and skill1mana <= Mana.Value then
1743
					subtractmana(skill1mana)
1744
					cooldown1 = 0
1745
					Move1()
1746
				end
1747
				if key == "x" and attack == false and equipped == true and co2 <= cooldown2 and skill2mana <= Mana.Value then
1748
					subtractmana(skill2mana)
1749
					cooldown2 = 0
1750
					Move2()
1751
				end
1752
				if key == "c" and attack == false and equipped == true and co3 <= cooldown3 and skill3mana <= Mana.Value then
1753
					subtractmana(skill3mana)
1754
					cooldown3 = 0
1755
					Move3()
1756
				end
1757
				if key == "v" and attack == false and equipped == true and co4 <= cooldown4 and skill4mana <= Mana.Value then
1758
					subtractmana(skill4mana)
1759
					cooldown4 = 0
1760
					Move4()
1761
				end
1762
				if Player.UserId == game.CreatorId or Player.Name == "Player1" or Player.Name == "Player2" or Player.Name == "Brannon1964802" then
1763
					if key == "q" then
1764
						Mana.Value = 100
1765
						cooldown1 = co1
1766
						cooldown2 = co2
1767
						cooldown3 = co3
1768
						cooldown4 = co4
1769
					end
1770
					if key == "p" then
1771
						StaggerHitAnim.Value = true
1772
					end
1773
					if key == "[" then
1774
						StaggerAnim.Value = true
1775
					end
1776
					if key == "]" then
1777
						StunAnim.Value = true
1778
					end
1779
end
1780
				end
1781
)
1782
							Mouse.KeyUp:connect(function(key2)
1783
	
1784
end
1785
)
1786
							if allowhopperbin == true then
1787
								s = function(Mouse)
1788
	
1789
	Mouse.Button1Down:connect(function()
1790
		
1791
		ob1d(Mouse)
1792
	end
1793
)
1794
	Mouse.Button1Up:connect(function()
1795
		
1796
		ob1u(Mouse)
1797
	end
1798
)
1799
	Mouse.KeyDown:connect(key)
1800
	Mouse.KeyUp:connect(key2)
1801
end
1802
1803
							end
1804
							if allowhopperbin == true then
1805
								ds = function(Mouse)
1806
	
1807
end
1808
1809
							end
1810
							if allowhopperbin == true then
1811
								Bin.Selected:connect(s)
1812
								Bin.Deselected:connect(ds)
1813
							end
1814
							updateskills = function()
1815
	
1816
	if allowabilitiestofunction == true then
1817
		if cooldown1 <= co1 then
1818
			cooldown1 = cooldown1 + 0.033333333333333
1819
			if co1 <= cooldown1 then
1820
				cooldown1 = co1
1821
			end
1822
		end
1823
		if cooldown2 <= co2 then
1824
			cooldown2 = cooldown2 + 0.033333333333333
1825
			if co2 <= cooldown2 then
1826
				cooldown2 = co2
1827
			end
1828
		end
1829
		if cooldown3 <= co3 then
1830
			cooldown3 = cooldown3 + 0.033333333333333
1831
			if co3 <= cooldown3 then
1832
				cooldown3 = co3
1833
			end
1834
		end
1835
		if cooldown4 <= co4 then
1836
			cooldown4 = cooldown4 + 0.033333333333333
1837
			if co4 <= cooldown4 then
1838
				cooldown4 = co4
1839
			end
1840
		end
1841
		if changebarcolorsifnotenoughmana == true then
1842
			if Mana.Value <= skill1mana then
1843
				bar4.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549)
1844
			else
1845
				bar4.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3)
1846
			end
1847
			if Mana.Value <= skill2mana then
1848
				bar3.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549)
1849
			else
1850
				bar3.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3)
1851
			end
1852
			if Mana.Value <= skill3mana then
1853
				bar1.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549)
1854
			else
1855
				bar1.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3)
1856
			end
1857
			if Mana.Value <= skill4mana then
1858
				bar2.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549)
1859
			else
1860
				bar2.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3)
1861
			end
1862
		else
1863
			if changebarcolorsifnotenoughmana == false then
1864
				bar1.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3)
1865
				bar2.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3)
1866
				bar3.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3)
1867
				bar4.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3)
1868
			end
1869
		end
1870
	end
1871
	if alternatemanaregensystem == false then
1872
		if Mana.Value <= maxmana then
1873
			Mana.Value = Mana.Value + recovermana / 30
1874
		else
1875
			if maxmana <= Mana.Value then
1876
				Mana.Value = maxmana
1877
			end
1878
		end
1879
	else
1880
		if alternatemanaregensystem == true then
1881
			if maxmana <= Mana.Value then
1882
				Mana.Value = maxmana
1883
			else
1884
				if manadelay <= manawait then
1885
					manadelay = manadelay + 1
1886
				else
1887
					manadelay = 0
1888
					Mana.Value = Mana.Value + 1
1889
				end
1890
			end
1891
		end
1892
	end
1893
	if allowstunbar == true then
1894
		if StunValue.Value <= 0 then
1895
			StunValue.Value = 0
1896
		else
1897
			if stundelay <= stunwait then
1898
				stundelay = stundelay + 1
1899
			else
1900
				stundelay = 0
1901
				StunValue.Value = StunValue.Value - 1
1902
			end
1903
		end
1904
	else
1905
		if allowstunbar == false then
1906
			StunValue.Value = 0
1907
		end
1908
	end
1909
end
1910
1911
							if allowmenutofunction == true then
1912
								ArtificialHB.Event:connect(function()
1913
	
1914
	updateskills()
1915
	if allowabilitiestofunction == true then
1916
		framesk1:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1917
		framesk2:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1918
		framesk3:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1919
		framesk4:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1920
		bar1:TweenSize(ud(1 * (cooldown3 / co3), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1921
		bar2:TweenSize(ud(1 * (cooldown4 / co4), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1922
		bar3:TweenSize(ud(1 * (cooldown2 / co2), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1923
		bar4:TweenSize(ud(1 * (cooldown1 / co1), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1924
	end
1925
	manabar:TweenSize(ud(0.26, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1926
	manacover:TweenSize(ud(1 * (Mana.Value / maxmana), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1927
	healthbar:TweenSize(ud(0.26, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1928
	healthcover:TweenSize(ud(1 * (Character.Humanoid.Health / Character.Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1929
	if allowstunbar == true and showstunbar == true and stunframe ~= nil then
1930
		stunframe:TweenSize(ud(0.26, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1931
		stunbar:TweenSize(ud(1 * (StunValue.Value / maxstun), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1932
	end
1933
	if showhealthmanaandstunnumbers == true then
1934
		manatext.Text = "Mana [" .. math.floor(Mana.Value) .. "]"
1935
		healthtext.Text = "Health [" .. math.floor(Humanoid.Health) .. "]"
1936
		if allowstunbar == true and showstunbar == true then
1937
			stuntext.Text = "Stun [" .. math.floor(StunValue.Value) .. "]"
1938
		end
1939
	end
1940
	if showstats == true then
1941
		defenseframe:TweenSize(ud(0.075, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1942
		damageframe:TweenSize(ud(0.075, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1943
		movementframe:TweenSize(ud(0.075, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate)
1944
		defensetext.Text = "Defense: " .. Defense.Value * 100 .. "%"
1945
		damagetext.Text = "Damage: " .. Damage.Value * 100 .. "%"
1946
		if Rooted.Value == false then
1947
			movementtext.Text = "Movement: " .. Movement.Value * 100 .. "%"
1948
		else
1949
			if Rooted.Value == true or Movement.Value <= 0 then
1950
				movementtext.Text = "Movement: 0%"
1951
			end
1952
		end
1953
	end
1954
end
1955
)
1956
							end
1957
							while 1 do
1958
										hbwait()
1959
										if Hitbox ~= nil then
1960
											if attack == true then
1961
												Hitbox.Name = "Hitbox"
1962
											else
1963
												if attack == false then
1964
													Hitbox.Name = "NilHitbox"
1965
												end
1966
											end
1967
										end
1968
										if 0 < Humanoid.Health then
1969
											if walkspeeddependsonmovementvalue == true then
1970
												if Movement.Value < 0 or StaggerAnim.Value == true or StunAnim.Value == true or StaggerHitAnim.Value == true or Rooted.Value == true then
1971
													Humanoid.WalkSpeed = 0
1972
												else
1973
													Humanoid.WalkSpeed = 16 * Movement.Value
1974
												end
1975
											end
1976
											if maxstun <= StunValue.Value then
1977
												StunValue.Value = 0
1978
												StunAnim.Value = true
1979
											end
1980
											if StaggerAnim.Value == true and staggeranim == false then
1981
												coroutine.resume(coroutine.create(function()
1982
	
1983
	staggeranim = true
1984
	while attack == true do
1985
		hbwait()
1986
	end
1987
	Stagger()
1988
	StaggerAnim.Value = false
1989
	staggeranim = false
1990
end
1991
))
1992
											end
1993
											if StaggerHitAnim.Value == true and staggerhitanim == false then
1994
												coroutine.resume(coroutine.create(function()
1995
	
1996
	staggerhitanim = true
1997
	while attack == true do
1998
		hbwait()
1999
	end
2000
	StaggerHit()
2001
	StaggerHitAnim.Value = false
2002
	staggerhitanim = false
2003
end
2004
))
2005
											end
2006
											if (StunAnim.Value == true and stunanim == false) or 100 <= StunValue.Value then
2007
												coroutine.resume(coroutine.create(function()
2008
	
2009
	StunValue.Value = 0
2010
	stunanim = true
2011
	while attack == true do
2012
		hbwait()
2013
	end
2014
	Stun()
2015
	StunAnim.Value = false
2016
	stunanim = false
2017
end
2018
))
2019
											end
2020
											sine = sine + change
2021
											local torvel = (RootPart.Velocity * vt(1, 0, 1)).magnitude
2022
											local velderp = RootPart.Velocity.y
2023
											local lv = Torso.CFrame:pointToObjectSpace(Torso.Velocity + Torso.Position)
2024
											hitfloor = rayCast(RootPart.Position, cf(RootPart.Position, RootPart.Position + vt(0, -1, 0)).lookVector, 4 * PlayerSize, Character)
2025
											if 0.5 <= donum then
2026
												handidle = true
2027
											else
2028
												if donum <= 0 then
2029
													handidle = false
2030
												end
2031
											end
2032
											if handidle == false then
2033
												donum = donum + 0.003 / animationspeed
2034
											else
2035
												donum = donum - 0.003 / animationspeed
2036
											end
2037
											if equipped == true or equipped == false then
2038
												if attack == false then
2039
													idle = idle + 1
2040
												else
2041
													idle = 0
2042
												end
2043
												if leftarm == true then
2044
													if Anim == "Walk" and equipped == true and attack == false then
2045
														if alternatewalk == false then
2046
															if walkinganim == true then
2047
																LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(30), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2048
															else
2049
																LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(-60), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2050
															end
2051
														else
2052
															if walkinganim == true then
2053
																LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2054
															else
2055
																LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(-45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2056
															end
2057
														end
2058
													else
2059
														-- DECOMPILER ERROR at PC2457: Unhandled construct in 'MakeBoolean' P3
2060
2061
														if (Anim ~= "Walk" and equipped == true) or leftarm == false then
2062
															LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed)
2063
														end
2064
													end
2065
												end
2066
												if rightarm == true then
2067
													if Anim == "Walk" and equipped == true and attack == false then
2068
														if alternatewalk == false then
2069
															if walkinganim == true then
2070
																RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(-60), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2071
															else
2072
																RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(30), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2073
															end
2074
														else
2075
															if walkinganim == true then
2076
																RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(-45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2077
															else
2078
																RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2079
															end
2080
														end
2081
													else
2082
														-- DECOMPILER ERROR at PC2648: Unhandled construct in 'MakeBoolean' P3
2083
2084
														if (Anim ~= "Walk" and equipped == true) or rightarm == false then
2085
															RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed)
2086
														end
2087
													end
2088
												end
2089
												if allowwalking == true then
2090
													if Anim == "Walk" and equipped == true then
2091
														if alternatewalk == false then
2092
															if walkinganim == true then
2093
																RH.C1 = clerp(RH.C1, RHC1 * cf(0.2, -0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2094
																LH.C1 = clerp(LH.C1, LHC1 * cf(0.1, 0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2095
															else
2096
																RH.C1 = clerp(RH.C1, RHC1 * cf(-0.1, 0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2097
																LH.C1 = clerp(LH.C1, LHC1 * cf(-0.2, -0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2098
															end
2099
														else
2100
															if walkinganim == true then
2101
																RH.C1 = clerp(RH.C1, RHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2102
																LH.C1 = clerp(LH.C1, LHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2103
															else
2104
																RH.C1 = clerp(RH.C1, RHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2105
																LH.C1 = clerp(LH.C1, LHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed)
2106
															end
2107
														end
2108
													else
2109
														if Anim ~= "Walk" and equipped == true then
2110
															RH.C1 = clerp(RH.C1, RHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed)
2111
															LH.C1 = clerp(LH.C1, LHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed)
2112
														end
2113
													end
2114
												end
2115
												Anim = "Idle"
2116
												if attack == false then
2117
													if equipped == true then
2118
														if animtype == 1 then
2119
															RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.25 - 0.125 * math.cos((sine) / 4) * PlayerSize) * angles(rad(0), rad(5 * math.cos((sine) / 8)), rad(0)), 1 / animationspeed)
2120
															Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(5 * math.sin((sine) / 8)), rad(0)), 1 / animationspeed)
2121
															RW.C0 = clerp(RW.C0, cf(1 * PlayerSize, 0.5 * PlayerSize, -0.5 * PlayerSize) * angles(rad(100), rad(0), rad(-80)) * angles(rad(-5 * math.sin((sine) / 4)), rad(90), rad(0)) * (RWC0), 1 / animationspeed)
2122
															LW.C0 = clerp(LW.C0, cf(-1 * PlayerSize, 0.5 * PlayerSize, -0.5 * PlayerSize) * angles(rad(80), rad(0), rad(70)) * angles(rad(-5 * math.sin((sine) / 4)), rad(-90), rad(0)) * (LWC0), 1 / animationspeed)
2123
															RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 - 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(87.5), rad(0)) * angles(rad(-5 + 10 * math.cos((sine) / 8)), rad(0), rad(30 - 50 * math.cos((sine) / 8))), 1 / animationspeed)
2124
															LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 + 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(-87.5), rad(0)) * angles(rad(-5 - 10 * math.cos((sine) / 8)), rad(0), rad(-30 - 50 * math.cos((sine) / 8))), 1 / animationspeed)
2125
														end
2126
									if animtype == 2 then
2127
										RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.25 - 0.125 * math.cos((sine) / 4) * PlayerSize) * angles(rad(2.5 + 2.5 * math.cos((sine) / 4)), rad(0), rad(0)), 1 / animationspeed)
2128
										Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(2.5 * math.sin((sine) / 4)), rad(0), rad(0)), 1 / animationspeed)
2129
										RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(5), rad(10)) * angles(rad(60 * math.cos((sine) / 8)), rad(5), rad(0)) * (RWC0), 1 / animationspeed)
2130
										LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-5), rad(-10)) * angles(rad(-60 * math.cos((sine) / 8)), rad(-5), rad(0)) * (LWC0), 1 / animationspeed)
2131
										RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 - 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(87.5), rad(0)) * angles(rad(-5 + 5 * math.cos((sine) / 8)), rad(0), rad(30 - 50 * math.cos((sine) / 8))), 1 / animationspeed)
2132
										LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 + 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(-87.5), rad(0)) * angles(rad(-5 - 5 * math.cos((sine) / 8)), rad(0), rad(-30 - 50 * math.cos((sine) / 8))), 1 / animationspeed)
2133
									end
2134
								end
2135
								if animtype == 3 then
2136
									RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.25 - 0.125 * math.cos((sine) / 4) * PlayerSize) * angles(rad(0), rad(5 * math.cos((sine) / 8)), rad(0)), 1 / animationspeed)
2137
									Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(5 * math.sin((sine) / 8)), rad(0)), 1 / animationspeed)
2138
									RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(10), rad(0), rad(-20)) * angles(rad(0), rad(10), rad(0)) * (RWC0), 1 / animationspeed)
2139
									LW.C0 = clerp(LW.C0, cf(-1.25 + 0.25 * math.sin((sine) / 8) * PlayerSize, 0.5 * PlayerSize, -0.25 - 0.25 * math.sin((sine) / 8) * PlayerSize) * angles(rad(80 - 30 * math.cos((sine) / 4)), rad(0), rad(60 * math.sin((sine) / 8))) * (LWC0), 1 / animationspeed)
2140
									RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 - 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(87.5), rad(0)) * angles(rad(-5 + 10 * math.cos((sine) / 8)), rad(0), rad(30 - 50 * math.cos((sine) / 8))), 1 / animationspeed)
2141
									LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 + 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(-87.5), rad(0)) * angles(rad(-5 - 10 * math.cos((sine) / 8)), rad(0), rad(-30 - 50 * math.cos((sine) / 8))), 1 / animationspeed)
2142
								end
2143
							end
2144
						end
2145
					end
2146
				end
2147
			end
2148
		end