View difference between Paste ID: RRa3DV7k and TLWkKzPH
SHOW: | | - or go back to the newest paste.
1
Player = game.Players.LocalPlayer
2
	Character = Player.Character
3
	local txt = Instance.new("BillboardGui", Character)
4
	txt.Adornee = Character.Head
5
	txt.Name = "_status"
6
	txt.Size = UDim2.new(2, 0, 1.2, 0)
7
	txt.StudsOffset = Vector3.new(-9, 8, 0)
8
	local text = Instance.new("TextLabel", txt)
9
	text.Size = UDim2.new(10, 0, 7, 0)
10
	text.FontSize = "Size24"
11
	text.TextScaled = true
12
	text.TextTransparency = 0
13
	text.BackgroundTransparency = 1 
14
	text.TextTransparency = 0
15
	text.TextStrokeTransparency = 0
16
	text.Font = "Antique"
17
	text.TextStrokeColor3 = Color3.new(196, 40, 28)
18
        text.Text = "The Last God"
19
script.Name = "Banisher Gun V3 / 1"
20
--//====================================================\\--
21
--||			   CREATED BY SHACKLUSTER
22
--\\====================================================//--
23
24
script:ClearAllChildren()
25
wait(0.2)
26
27
Player = game:GetService("Players").LocalPlayer
28
PlayerGui = Player.PlayerGui
29
Cam = workspace.CurrentCamera
30
Backpack = Player.Backpack
31
Character = Player.Character
32
Humanoid = Character.Humanoid
33
Mouse = Player:GetMouse()
34
RootPart = Character["HumanoidRootPart"]
35
Torso = Character["Torso"]
36
Head = Character["Head"]
37
RightArm = Character["Right Arm"]
38
LeftArm = Character["Left Arm"]
39
RightLeg = Character["Right Leg"]
40
LeftLeg = Character["Left Leg"]
41
RootJoint = RootPart["RootJoint"]
42
Neck = Torso["Neck"]
43
RightShoulder = Torso["Right Shoulder"]
44
LeftShoulder = Torso["Left Shoulder"]
45
RightHip = Torso["Right Hip"]
46
LeftHip = Torso["Left Hip"]
47
local TIME = 0
48
local sick = Instance.new("Sound",Torso)
49
50
51
for i,v in pairs(Character:GetChildren()) do
52
	if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "CharacterMesh" then
53
		v:Destroy()
54
	end
55
end
56
57
for i,v in pairs(Character:GetChildren()) do
58
	if v.ClassName == "Accessory" or v.ClassName == "Hat" then
59
		v:Destroy()
60
	end
61
end
62
63
local Shirt = Instance.new("Shirt",Character)
64
local Pants = Instance.new("Pants",Character)
65
Shirt.ShirtTemplate = "rbxassetid://1390096242"
66
Pants.PantsTemplate = "rbxassetid://1756876037"
67
68
IT = Instance.new
69
CF = CFrame.new
70
VT = Vector3.new
71
RAD = math.rad
72
C3 = Color3.new
73
UD2 = UDim2.new
74
BRICKC = BrickColor.new
75
ANGLES = CFrame.Angles
76
EULER = CFrame.fromEulerAnglesXYZ
77
COS = math.cos
78
ACOS = math.acos
79
SIN = math.sin
80
ASIN = math.asin
81
ABS = math.abs
82
MRANDOM = math.random
83
FLOOR = math.floor
84
85
Player = game:GetService("Players").LocalPlayer
86
PlayerGui = Player.PlayerGui
87
Cam = workspace.CurrentCamera
88
Backpack = Player.Backpack
89
Character = Player.Character
90
Humanoid = Character.Humanoid
91
Mouse = Player:GetMouse()
92
RootPart = Character["HumanoidRootPart"]
93
Torso = Character["Torso"]
94
Head = Character["Head"]
95
RightArm = Character["Right Arm"]
96
LeftArm = Character["Left Arm"]
97
RightLeg = Character["Right Leg"]
98
LeftLeg = Character["Left Leg"]
99
RootJoint = RootPart["RootJoint"]
100
Neck = Torso["Neck"]
101
RightShoulder = Torso["Right Shoulder"]
102
LeftShoulder = Torso["Left Shoulder"]
103
RightHip = Torso["Right Hip"]
104
LeftHip = Torso["Left Hip"]
105
warn("Anti-Death Loaded (edited by promlg112)")
106
107
IT = Instance.new
108
CF = CFrame.new
109
VT = Vector3.new
110
RAD = math.rad
111
C3 = Color3.new
112
UD2 = UDim2.new
113
BRICKC = BrickColor.new
114
ANGLES = CFrame.Angles
115
EULER = CFrame.fromEulerAnglesXYZ
116
COS = math.cos
117
ACOS = math.acos
118
SIN = math.sin
119
ASIN = math.asin
120
ABS = math.abs
121
MRANDOM = math.random
122
FLOOR = math.floor
123
124
local Speed = 55
125
local Rooted = false
126
local Effects = IT("Folder", Character)
127
Effects.Name = "Effects"
128
local UNANCHOR = true
129
local HITPOS = nil
130
local HITFLOOR = nil
131
local LEFTWINGS = {}
132
local RIGHTWINGS = {}
133
local BODY = {}
134
135
for _, c in pairs(Character:GetChildren()) do
136
	if c.ClassName == "Part" then
137
		table.insert(BODY,{c,Character})
138
		for _, q in pairs(c:GetChildren()) do
139
			if q.ClassName == "Motor6D" or q.ClassName == "Weld" or q.ClassName == "ManualWeld" then
140
				table.insert(BODY,{q,c})
141
			end
142
		end
143
	end
144
end
145
146
function refit()
147
	Character.Parent = workspace
148
	for e = 1, #BODY do
149
		if BODY[e] ~= nil then
150
			local STUFF = BODY[e]
151
			local PART = STUFF[1]
152
			local PARENT = STUFF[2]
153
			PART.Parent = PARENT
154
		end
155
	end
156
end
157
158
Humanoid.HealthChanged:connect(function()
159
	Humanoid.Parent = nil
160
	Humanoid.MaxHealth = "inf"
161
	Humanoid.Health = "inf"
162
	refit()
163
	Humanoid.Parent = Character
164
end)
165
166
Humanoid.Died:connect(function()
167
	Humanoid.Parent = nil
168
	Humanoid.MaxHealth = "inf"
169
	Humanoid.Health = "inf"
170
	refit()
171
	Humanoid.Parent = Character
172
end)
173
--//=================================\\
174
--||		  CUSTOMIZATION
175
--\\=================================//
176
177
Player_Size = 1 --Size of the player.
178
Animation_Speed = 3
179
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
180
181
local Speed = 16
182
local Effects2 = {}
183
184
--//=================================\\
185
--|| 	  END OF CUSTOMIZATION
186
--\\=================================//
187
188
	local function weldBetween(a, b)
189
	    local weldd = Instance.new("ManualWeld")
190
	    weldd.Part0 = a
191
	    weldd.Part1 = b
192
	    weldd.C0 = CFrame.new()
193
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
194
	    weldd.Parent = a
195
	    return weldd
196
	end
197
--//=================================\\
198
--|| 	      PARTICLES N STUFF
199
--\\=================================//
200
201
local particleemitter = Instance.new('ParticleEmitter', LeftArm)
202
        particleemitter.VelocitySpread = 350
203
        particleemitter.Lifetime = NumberRange.new(1)
204
        particleemitter.Speed = NumberRange.new(0)
205
cringememe= {}
206
for i=0, 19 do
207
  cringememe[#cringememe + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
208
end
209
particleemitter.Size = NumberSequence.new(cringememe)
210
        particleemitter.Rate = 20
211
        particleemitter.LockedToPart = true
212
        particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
213
        particleemitter.LightEmission = 1
214
        particleemitter.Texture = "rbxassetid://38727848"
215
        particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color)
216
217
        local particleemitter = Instance.new('ParticleEmitter', Torso)
218
        particleemitter.VelocitySpread = 250
219
        particleemitter.Lifetime = NumberRange.new(3)
220
        particleemitter.Speed = NumberRange.new(1.5)
221
youAreATHOT = {}
222
for i=0, 19 do
223
  youAreATHOT[#youAreATHOT + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
224
end
225
particleemitter.Size = NumberSequence.new(youAreATHOT)
226
        particleemitter.Rate = 10
227
        particleemitter.LockedToPart = false
228
        particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
229
        particleemitter.LightEmission = 1
230
        particleemitter.Texture = "rbxassetid://253188763"
231
        particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color)
232
233
        local particleemitter = Instance.new('ParticleEmitter', RightArm)
234
        particleemitter.VelocitySpread = 350
235
        particleemitter.Lifetime = NumberRange.new(1)
236
        particleemitter.Speed = NumberRange.new(0)
237
cringememe2= {}
238
for i=0, 19 do
239
  cringememe2[#cringememe2 + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
240
end
241
particleemitter.Size = NumberSequence.new(cringememe2)
242
        particleemitter.Rate = 20
243
        particleemitter.LockedToPart = true
244
        particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
245
        particleemitter.LightEmission = 1
246
        particleemitter.Texture = "rbxassetid://38727848"
247
        particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color)
248
249
        local particleemitter = Instance.new('ParticleEmitter', RightLeg)
250
        particleemitter.VelocitySpread = 350
251
        particleemitter.Lifetime = NumberRange.new(1)
252
        particleemitter.Speed = NumberRange.new(0)
253
cringememe3= {}
254
for i=0, 19 do
255
  cringememe3[#cringememe3 + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
256
end
257
particleemitter.Size = NumberSequence.new(cringememe3)
258
        particleemitter.Rate = 30
259
        particleemitter.LockedToPart = true
260
        particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
261
        particleemitter.LightEmission = 1
262
        particleemitter.Texture = "rbxassetid://38727848"
263
        particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color)
264
265
        local particleemitter = Instance.new('ParticleEmitter', LeftLeg)
266
        particleemitter.VelocitySpread = 350
267
        particleemitter.Lifetime = NumberRange.new(1)
268
        particleemitter.Speed = NumberRange.new(0)
269
cringememe4= {}
270
for i=0, 19 do
271
  cringememe4[#cringememe4 + 1] = NumberSequenceKeypoint.new(i/19, math.random(1, 1))
272
end
273
particleemitter.Size = NumberSequence.new(cringememe4)
274
        particleemitter.Rate = 30
275
        particleemitter.LockedToPart = true
276
        particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
277
        particleemitter.LightEmission = 1
278
        particleemitter.Texture = "rbxassetid://38727848"
279
        particleemitter.Color = ColorSequence.new(BrickColor.new("Really red").Color)
280
--//=================================\\
281
--|| 	      USEFUL VALUES
282
--\\=================================//
283
284
Animation_Speed = 3
285
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
286
local Speed = 35
287
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
288
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
289
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
290
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
291
local DAMAGEMULTIPLIER = 1
292
local ANIM = "Idle"
293
local ATTACK = false
294
local EQUIPPED = false
295
local HOLD = false
296
local COMBO = 1
297
local Rooted = false
298
local SINE = 0
299
local KEYHOLD = false
300
local CHANGE = 2 / Animation_Speed
301
local WALKINGANIM = false
302
local VALUE1 = false
303
local VALUE2 = false
304
local ROBLOXIDLEANIMATION = IT("Animation")
305
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
306
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
307
--ROBLOXIDLEANIMATION.Parent = Humanoid
308
local WEAPONGUI = IT("ScreenGui", PlayerGui)
309
WEAPONGUI.Name = "Weapon GUI"
310
local Effects = IT("Folder", Character)
311
Effects.Name = "Effects"
312
local ANIMATOR = Humanoid.Animator
313
local ANIMATE = Character.Animate
314
local UNANCHOR = true
315
local LAUGHS = {834001699,834001752,834001797,834001828}
316
317
Animation_Speed = 3
318
local FORCERESET = false
319
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
320
local Speed = 16
321
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
322
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
323
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
324
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
325
local DAMAGEMULTIPLIER = 1
326
local ANIM = "Idle"
327
local ATTACK = false
328
local EQUIPPED = false
329
local HOLD = true
330
local COMBO = 3
331
local Rooted = false
332
local SINE = 5
333
local KEYHOLD = false
334
local CHANGE = 2 / Animation_Speed
335
local WALKINGANIM = false
336
local VALUE1 = false
337
local VALUE2 = false
338
local ROBLOXIDLEANIMATION = IT("Animation")
339
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
340
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
341
--ROBLOXIDLEANIMATION.Parent = Humanoid
342
local WEAPONGUI = IT("ScreenGui", PlayerGui)
343
WEAPONGUI.Name = "BanishV4Gui"
344
local Weapon = IT("Model")
345
Weapon.Name = "Adds"
346
local Effects = IT("Folder", Weapon)
347
Effects.Name = "Effects"
348
local ANIMATOR = Humanoid.Animator
349
local ANIMATE = Character:FindFirstChild("Animate")
350
local UNANCHOR = true
351
local TOBANISH = {}
352
script.Parent = PlayerGui
353
354
--//=================================\\
355
--\\=================================//
356
357
358
--//=================================\\
359
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
360
--\\=================================//
361
362
ArtificialHB = Instance.new("BindableEvent", script)
363
ArtificialHB.Name = "ArtificialHB"
364
365
script:WaitForChild("ArtificialHB")
366
367
frame = Frame_Speed
368
tf = 0
369
allowframeloss = false
370
tossremainder = false
371
lastframe = tick()
372
script.ArtificialHB:Fire()
373
374
game:GetService("RunService").Heartbeat:connect(function(s, p)
375
	tf = tf + s
376
	if tf >= frame then
377
		if allowframeloss then
378
			script.ArtificialHB:Fire()
379
			lastframe = tick()
380
		else
381
			for i = 1, math.floor(tf / frame) do
382
				script.ArtificialHB:Fire()
383
			end
384
		lastframe = tick()
385
		end
386
		if tossremainder then
387
			tf = 0
388
		else
389
			tf = tf - frame * math.floor(tf / frame)
390
		end
391
	end
392
end)
393
394
--//=================================\\
395
--\\=================================//
396
397
--//=================================\\
398
--|| 	      SOME FUNCTIONS
399
--\\=================================//
400
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
401
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
402
end
403
404
function PositiveAngle(NUMBER)
405
	if NUMBER >= 0 then
406
		NUMBER = 0
407
	end
408
	return NUMBER
409
end
410
411
function NegativeAngle(NUMBER)
412
	if NUMBER <= 0 then
413
		NUMBER = 0
414
	end
415
	return NUMBER
416
end
417
418
function Swait(NUMBER)
419
	if NUMBER == 0 or NUMBER == nil then
420
		ArtificialHB.Event:wait()
421
	else
422
		for i = 1, NUMBER do
423
			ArtificialHB.Event:wait()
424
		end
425
	end
426
end
427
428
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
429
	local NEWMESH = IT(MESH)
430
	if MESH == "SpecialMesh" then
431
		NEWMESH.MeshType = MESHTYPE
432
		if MESHID ~= "nil" and MESHID ~= "" then
433
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
434
		end
435
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
436
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
437
		end
438
	end
439
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
440
	NEWMESH.Scale = SCALE
441
	NEWMESH.Parent = PARENT
442
	return NEWMESH
443
end
444
445
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
446
	local NEWPART = IT("Part")
447
	NEWPART.formFactor = FORMFACTOR
448
	NEWPART.Reflectance = REFLECTANCE
449
	NEWPART.Transparency = TRANSPARENCY
450
	NEWPART.CanCollide = false
451
	NEWPART.Locked = true
452
	NEWPART.Anchored = true
453
	if ANCHOR == false then
454
		NEWPART.Anchored = false
455
	end
456
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
457
	NEWPART.Name = NAME
458
	NEWPART.Size = SIZE
459
	NEWPART.Position = Torso.Position
460
	NEWPART.Material = MATERIAL
461
	NEWPART:BreakJoints()
462
	NEWPART.Parent = PARENT
463
	return NEWPART
464
end
465
466
	local function weldBetween(a, b)
467
	    local weldd = Instance.new("ManualWeld")
468
	    weldd.Part0 = a
469
	    weldd.Part1 = b
470
	    weldd.C0 = CFrame.new()
471
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
472
	    weldd.Parent = a
473
	    return weldd
474
	end
475
476
477
function QuaternionFromCFrame(cf)
478
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
479
	local trace = m00 + m11 + m22
480
	if trace > 0 then 
481
		local s = math.sqrt(1 + trace)
482
		local recip = 0.5 / s
483
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
484
	else
485
		local i = 0
486
		if m11 > m00 then
487
			i = 1
488
		end
489
		if m22 > (i == 0 and m00 or m11) then
490
			i = 2
491
		end
492
		if i == 0 then
493
			local s = math.sqrt(m00 - m11 - m22 + 1)
494
			local recip = 0.5 / s
495
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
496
		elseif i == 1 then
497
			local s = math.sqrt(m11 - m22 - m00 + 1)
498
			local recip = 0.5 / s
499
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
500
		elseif i == 2 then
501
			local s = math.sqrt(m22 - m00 - m11 + 1)
502
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
503
		end
504
	end
505
end
506
 
507
function QuaternionToCFrame(px, py, pz, x, y, z, w)
508
	local xs, ys, zs = x + x, y + y, z + z
509
	local wx, wy, wz = w * xs, w * ys, w * zs
510
	local xx = x * xs
511
	local xy = x * ys
512
	local xz = x * zs
513
	local yy = y * ys
514
	local yz = y * zs
515
	local zz = z * zs
516
	return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
517
end
518
 
519
function QuaternionSlerp(a, b, t)
520
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
521
	local startInterp, finishInterp;
522
	if cosTheta >= 0.0001 then
523
		if (1 - cosTheta) > 0.0001 then
524
			local theta = ACOS(cosTheta)
525
			local invSinTheta = 1 / SIN(theta)
526
			startInterp = SIN((1 - t) * theta) * invSinTheta
527
			finishInterp = SIN(t * theta) * invSinTheta
528
		else
529
			startInterp = 1 - t
530
			finishInterp = t
531
		end
532
	else
533
		if (1 + cosTheta) > 0.0001 then
534
			local theta = ACOS(-cosTheta)
535
			local invSinTheta = 1 / SIN(theta)
536
			startInterp = SIN((t - 1) * theta) * invSinTheta
537
			finishInterp = SIN(t * theta) * invSinTheta
538
		else
539
			startInterp = t - 1
540
			finishInterp = t
541
		end
542
	end
543
	return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
544
end
545
546
function Clerp(a, b, t)
547
	local qa = {QuaternionFromCFrame(a)}
548
	local qb = {QuaternionFromCFrame(b)}
549
	local ax, ay, az = a.x, a.y, a.z
550
	local bx, by, bz = b.x, b.y, b.z
551
	local _t = 1 - t
552
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
553
end
554
555
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
556
	local frame = IT("Frame")
557
	frame.BackgroundTransparency = TRANSPARENCY
558
	frame.BorderSizePixel = BORDERSIZEPIXEL
559
	frame.Position = POSITION
560
	frame.Size = SIZE
561
	frame.BackgroundColor3 = COLOR
562
	frame.BorderColor3 = BORDERCOLOR
563
	frame.Name = NAME
564
	frame.Parent = PARENT
565
	return frame
566
end
567
568
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
569
	local label = IT("TextLabel")
570
	label.BackgroundTransparency = 1
571
	label.Size = UD2(1, 0, 1, 0)
572
	label.Position = UD2(0, 0, 0, 0)
573
	label.TextColor3 = TEXTCOLOR
574
	label.TextStrokeTransparency = STROKETRANSPARENCY
575
	label.TextTransparency = TRANSPARENCY
576
	label.FontSize = TEXTFONTSIZE
577
	label.Font = TEXTFONT
578
	label.BorderSizePixel = BORDERSIZEPIXEL
579
	label.TextScaled = false
580
	label.Text = TEXT
581
	label.Name = NAME
582
	label.Parent = PARENT
583
	return label
584
end
585
586
function NoOutlines(PART)
587
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
588
end
589
590
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
591
	local NEWWELD = IT(TYPE)
592
	NEWWELD.Part0 = PART0
593
	NEWWELD.Part1 = PART1
594
	NEWWELD.C0 = C0
595
	NEWWELD.C1 = C1
596
	NEWWELD.Parent = PARENT
597
	return NEWWELD
598
end
599
600
local S = IT("Sound")
601
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
602
	local NEWSOUND = nil
603
	coroutine.resume(coroutine.create(function()
604
		NEWSOUND = S:Clone()
605
		NEWSOUND.Parent = PARENT
606
		NEWSOUND.Volume = VOLUME
607
		NEWSOUND.Pitch = PITCH
608
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
609
		NEWSOUND:play()
610
		if DOESLOOP == true then
611
			NEWSOUND.Looped = true
612
		else
613
			repeat wait(1) until NEWSOUND.Playing == false
614
			NEWSOUND:remove()
615
		end
616
	end))
617
	return NEWSOUND
618
end
619
620
621
local EyeSizes={
622
	NumberSequenceKeypoint.new(0,2,0),
623
	NumberSequenceKeypoint.new(1,0,0)
624
}
625
local EyeTrans={
626
	NumberSequenceKeypoint.new(0,0.5,0),
627
	NumberSequenceKeypoint.new(1,1,0)
628
}
629
local PE=Instance.new("ParticleEmitter",nil)
630
PE.LightEmission=.8
631
PE.Color = ColorSequence.new(BRICKC("Lime green").Color,BRICKC("Lime green").Color)
632
PE.Size=NumberSequence.new(EyeSizes)
633
PE.Transparency=NumberSequence.new(EyeTrans)
634
PE.Lifetime=NumberRange.new(0.35,1)
635
PE.Rotation=NumberRange.new(0,360)
636
PE.Rate=100
637
PE.VelocitySpread = 10000
638
PE.Acceleration = Vector3.new(0,85,0)
639
PE.Drag = 5
640
PE.Speed = NumberRange.new(0.1,5)
641
PE.Texture="http://www.roblox.com/asset/?id=1460745664"
642
PE.ZOffset = 0.5
643
PE.Name = "PE"
644
PE.Enabled = false
645
646
function Fire(art)
647
	local PARTICLES = PE:Clone()
648
	PARTICLES.Parent = art
649
	PARTICLES.Enabled = true
650
	return PARTICLES
651
end
652
653
function CFrameFromTopBack(at, top, back)
654
	local right = top:Cross(back)
655
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
656
end
657
658
--WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
659
function WACKYEFFECT(Table)
660
	local TYPE = (Table.EffectType or "Sphere")
661
	local SIZE = (Table.Size or VT(1,1,1))
662
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
663
	local TRANSPARENCY = (Table.Transparency or 0)
664
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
665
	local CFRAME = (Table.CFrame or Torso.CFrame)
666
	local MOVEDIRECTION = (Table.MoveToPos or nil)
667
	local ROTATION1 = (Table.RotationX or 0)
668
	local ROTATION2 = (Table.RotationY or 0)
669
	local ROTATION3 = (Table.RotationZ or 0)
670
	local MATERIAL = (Table.Material or "Neon")
671
	local COLOR = (Table.Color or C3(1,1,1))
672
	local TIME = (Table.Time or 45)
673
	local SOUNDID = (Table.SoundID or nil)
674
	local SOUNDPITCH = (Table.SoundPitch or nil)
675
	local SOUNDVOLUME = (Table.SoundVolume or nil)
676
	coroutine.resume(coroutine.create(function()
677
		local PLAYSSOUND = false
678
		local SOUND = nil
679
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Lime green"), "Effect", VT(1,1,1), true)
680
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
681
			PLAYSSOUND = true
682
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
683
		end
684
		EFFECT.Color = COLOR
685
		local MSH = nil
686
		if TYPE == "Sphere" then
687
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
688
		elseif TYPE == "Block" or TYPE == "Box" then
689
			MSH = IT("BlockMesh",EFFECT)
690
			MSH.Scale = SIZE
691
		elseif TYPE == "Wave" then
692
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
693
		elseif TYPE == "Ring" then
694
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
695
		elseif TYPE == "Slash" then
696
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
697
		elseif TYPE == "Round Slash" then
698
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
699
		elseif TYPE == "Swirl" then
700
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
701
		elseif TYPE == "Skull" then
702
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
703
		elseif TYPE == "Crystal" then
704
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
705
		end
706
		if MSH ~= nil then
707
			local MOVESPEED = nil
708
			if MOVEDIRECTION ~= nil then
709
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
710
			end
711
			local GROWTH = SIZE - ENDSIZE
712
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
713
			if TYPE == "Block" then
714
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
715
			else
716
				EFFECT.CFrame = CFRAME
717
			end
718
			for LOOP = 1, TIME+1 do
719
				Swait()
720
				MSH.Scale = MSH.Scale - GROWTH/TIME
721
				if TYPE == "Wave" then
722
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
723
				end
724
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
725
				if TYPE == "Block" then
726
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
727
				else
728
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
729
				end
730
				if MOVEDIRECTION ~= nil then
731
					local ORI = EFFECT.Orientation
732
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
733
					EFFECT.Orientation = ORI
734
				end
735
			end
736
			if PLAYSSOUND == false then
737
				EFFECT:remove()
738
			else
739
				repeat wait(1) until SOUND.Playing == false
740
				EFFECT:remove()
741
			end
742
		else
743
			if PLAYSSOUND == false then
744
				EFFECT:remove()
745
			else
746
				repeat Swait() until SOUND.Playing == false
747
				EFFECT:remove()
748
			end
749
		end
750
	end))
751
end
752
753
function MakeForm(PART,TYPE)
754
	if TYPE == "Cyl" then
755
		local MSH = IT("CylinderMesh",PART)
756
	elseif TYPE == "Ball" then
757
		local MSH = IT("SpecialMesh",PART)
758
		MSH.MeshType = "Sphere"
759
	elseif TYPE == "Wedge" then
760
		local MSH = IT("SpecialMesh",PART)
761
		MSH.MeshType = "Wedge"
762
	end
763
end
764
765
Debris = game:GetService("Debris")
766
767
function CastProperRay(StartPos, EndPos, Distance, Ignore)
768
	local DIRECTION = CF(StartPos,EndPos).lookVector
769
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
770
end
771
772
local HATWELD = nil
773
function Pose(WhichPose,Speed,Time,Magic,Gyro,Tors)
774
	PLAYMAINANIM = false
775
	if WhichPose == "Cast1" then
776
		for i=0, Time, 0.1 / Animation_Speed do
777
			Swait()
778
			if Magic == true then
779
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
780
			end
781
			if Gyro ~= nil and Gyro ~= false then
782
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
783
			end
784
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(35)), Speed / Animation_Speed)
785
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-35)), Speed / Animation_Speed)
786
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(125), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
787
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
788
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
789
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
790
		end
791
	elseif WhichPose == "Cast2" then
792
		for i=0, Time, 0.1 / Animation_Speed do
793
			Swait()
794
			if Magic == true then
795
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
796
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = LeftArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
797
			end
798
			if Gyro ~= nil and Gyro ~= false then
799
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
800
			end
801
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
802
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
803
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(15)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
804
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
805
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
806
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
807
		end
808
	elseif WhichPose == "RightArmUp" then
809
		for i=0, Time, 0.1 / Animation_Speed do
810
			Swait()
811
			if Magic == true then
812
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lime green".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
813
			end
814
			if Gyro ~= nil and Gyro ~= false then
815
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
816
			end
817
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(15)), Speed / Animation_Speed)
818
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-15)), Speed / Animation_Speed)
819
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.2) * ANGLES(RAD(125), RAD(0), RAD(25)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
820
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
821
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
822
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
823
		end
824
	elseif WhichPose == "Taunt" then
825
		for i=0, Time, 0.1 / Animation_Speed do
826
			Swait()
827
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
828
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
829
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
830
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
831
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
832
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
833
		end
834
		HATWELD.Part0 = RightArm
835
		HATWELD.C0 = CF(0,-1.1,-0.4) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(-20), RAD(0), RAD(0))
836
		CreateSound(137473066,Torso,10,1,false)
837
		for i=0, Time*2, 0.1 / Animation_Speed do
838
			Swait()
839
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
840
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
841
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(145), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
842
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(5), RAD(25), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
843
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
844
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
845
		end
846
		for i=0, Time, 0.1 / Animation_Speed do
847
			Swait()
848
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
849
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), Speed / Animation_Speed)
850
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.65, -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
851
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
852
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
853
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
854
			HATWELD.C0 = Clerp(HATWELD.C0, CF(-0.5,-1.2,-0.3) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(35), RAD(0), RAD(35)), Speed / Animation_Speed)
855
		end
856
		HATWELD.Part0 = Head
857
		HATWELD.C0 = CF(0,0.35,0)
858
	elseif WhichPose == "Prepare key" then
859
		for i=0, Time, 0.1 / Animation_Speed do
860
			Swait()
861
			if Gyro ~= nil and Gyro ~= false then
862
				Gyro.cframe = CF(RootPart.Position,Tors.Position)
863
			end
864
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(65)), Speed / Animation_Speed)
865
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-65)), Speed / Animation_Speed)
866
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(65)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
867
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
868
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
869
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
870
		end
871
	elseif WhichPose == "Turn key" then
872
		for i=0, Time, 0.1 / Animation_Speed do
873
			Swait()
874
			if Gyro ~= nil and Gyro ~= false then
875
				Gyro.cframe = CF(RootPart.Position,Tors.Position)
876
			end
877
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(75)), Speed / Animation_Speed)
878
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-75)), Speed / Animation_Speed)
879
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(75)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
880
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
881
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
882
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
883
		end
884
	end
885
	PLAYMAINANIM = true
886
end
887
888
--Lightning({Color = C3(1,1,1), Start = Torso.Position, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = 400, Branches = false})
889
function Lightning(Table)
890
	local Color = Table.Color or C3(1,1,1)
891
	local StartPos = Table.Start or Torso.Position
892
	local EndPos = Table.End or Mouse.Hit.p
893
	local SegmentLength = Table.SegmentL or 2
894
	local Thickness = Table.Thickness or 0.1
895
	local Dissapear = Table.DoesFade or false
896
	local Parent = Table.Ignore or Character
897
	local MaxDist = Table.MaxDist or 400
898
	local Branches = Table.Branches or false
899
	local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent)
900
	local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength)
901
	local LIGHTNINGMODEL = IT("Model",Effects)
902
	LIGHTNINGMODEL.Name = "Lightning"
903
	local LastBolt = nil
904
	for E = 1, DISTANCE do
905
		local ExtraSize = (DISTANCE-E)/15
906
		local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Lime green"), "LightningPart"..E, VT(Thickness+ExtraSize,SegmentLength,Thickness+ExtraSize))
907
		PART.Color = Color
908
		MakeForm(PART,"Cyl")
909
		if LastBolt == nil then
910
			PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
911
		else
912
			PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,CF(HITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SegmentLength/3+(DISTANCE-E)).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
913
		end
914
		LastBolt = PART
915
		if Branches == true then
916
			local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2))
917
			if CHOICE == 1 then
918
				local LASTBRANCH = nil
919
				for i = 1, MRANDOM(2,5) do
920
					local ExtraSize2 = ((DISTANCE-E)/25)/i
921
					local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Crimson"), "Branch"..E.."-"..i, VT(Thickness+ExtraSize2,SegmentLength,Thickness+ExtraSize2))
922
					PART.Color = Color
923
					MakeForm(PART,"Cyl")
924
					if LASTBRANCH == nil then
925
						PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*7,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
926
					else
927
						PART.CFrame = CF(LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0).p,LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*3,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
928
					end
929
					LASTBRANCH = PART
930
				end
931
			end
932
		end
933
	end
934
	if Dissapear == true then
935
		coroutine.resume(coroutine.create(function()
936
			for i = 1, 10 do
937
				Swait()
938
				for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do
939
					if c.ClassName == "Part" then
940
						c.Transparency = i/10
941
					end
942
				end
943
			end
944
			LIGHTNINGMODEL:remove()
945
		end))
946
	elseif Dissapear == false then
947
		Debris:AddItem(LIGHTNINGMODEL,0.1)
948
	end
949
	return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL}
950
end
951
952
function PositiveAngle(NUMBER)
953
	if NUMBER >= 0 then
954
		NUMBER = 0
955
	end
956
	return NUMBER
957
end
958
959
function NegativeAngle(NUMBER)
960
	if NUMBER <= 0 then
961
		NUMBER = 0
962
	end
963
	return NUMBER
964
end
965
966
function Swait(NUMBER)
967
	if NUMBER == 0 or NUMBER == nil then
968
		ArtificialHB.Event:wait()
969
	else
970
		for i = 1, NUMBER do
971
			ArtificialHB.Event:wait()
972
		end
973
	end
974
end
975
976
function QuaternionFromCFrame(cf)
977
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
978
	local trace = m00 + m11 + m22
979
	if trace > 0 then 
980
		local s = math.sqrt(1 + trace)
981
		local recip = 0.5 / s
982
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
983
	else
984
		local i = 0
985
		if m11 > m00 then
986
			i = 1
987
		end
988
		if m22 > (i == 0 and m00 or m11) then
989
			i = 2
990
		end
991
		if i == 0 then
992
			local s = math.sqrt(m00 - m11 - m22 + 1)
993
			local recip = 0.5 / s
994
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
995
		elseif i == 1 then
996
			local s = math.sqrt(m11 - m22 - m00 + 1)
997
			local recip = 0.5 / s
998
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
999
		elseif i == 2 then
1000
			local s = math.sqrt(m22 - m00 - m11 + 1)
1001
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
1002
		end
1003
	end
1004
end
1005
 
1006
function QuaternionToCFrame(px, py, pz, x, y, z, w)
1007
	local xs, ys, zs = x + x, y + y, z + z
1008
	local wx, wy, wz = w * xs, w * ys, w * zs
1009
	local xx = x * xs
1010
	local xy = x * ys
1011
	local xz = x * zs
1012
	local yy = y * ys
1013
	local yz = y * zs
1014
	local zz = z * zs
1015
	return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
1016
end
1017
 
1018
function QuaternionSlerp(a, b, t)
1019
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
1020
	local startInterp, finishInterp;
1021
	if cosTheta >= 0.0001 then
1022
		if (1 - cosTheta) > 0.0001 then
1023
			local theta = ACOS(cosTheta)
1024
			local invSinTheta = 1 / SIN(theta)
1025
			startInterp = SIN((1 - t) * theta) * invSinTheta
1026
			finishInterp = SIN(t * theta) * invSinTheta
1027
		else
1028
			startInterp = 1 - t
1029
			finishInterp = t
1030
		end
1031
	else
1032
		if (1 + cosTheta) > 0.0001 then
1033
			local theta = ACOS(-cosTheta)
1034
			local invSinTheta = 1 / SIN(theta)
1035
			startInterp = SIN((t - 1) * theta) * invSinTheta
1036
			finishInterp = SIN(t * theta) * invSinTheta
1037
		else
1038
			startInterp = t - 1
1039
			finishInterp = t
1040
		end
1041
	end
1042
	return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
1043
end
1044
1045
function Clerp(a, b, t)
1046
	local qa = {QuaternionFromCFrame(a)}
1047
	local qb = {QuaternionFromCFrame(b)}
1048
	local ax, ay, az = a.x, a.y, a.z
1049
	local bx, by, bz = b.x, b.y, b.z
1050
	local _t = 1 - t
1051
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
1052
end
1053
1054
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
1055
	local frame = IT("Frame")
1056
	frame.BackgroundTransparency = TRANSPARENCY
1057
	frame.BorderSizePixel = BORDERSIZEPIXEL
1058
	frame.Position = POSITION
1059
	frame.Size = SIZE
1060
	frame.BackgroundColor3 = COLOR
1061
	frame.BorderColor3 = BORDERCOLOR
1062
	frame.Name = NAME
1063
	frame.Parent = PARENT
1064
	return frame
1065
end
1066
1067
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
1068
	local label = IT("TextLabel")
1069
	label.BackgroundTransparency = 1
1070
	label.Size = UD2(1, 0, 1, 0)
1071
	label.Position = UD2(0, 0, 0, 0)
1072
	label.TextColor3 = TEXTCOLOR
1073
	label.TextStrokeTransparency = STROKETRANSPARENCY
1074
	label.TextTransparency = TRANSPARENCY
1075
	label.FontSize = TEXTFONTSIZE
1076
	label.Font = TEXTFONT
1077
	label.BorderSizePixel = BORDERSIZEPIXEL
1078
	label.TextScaled = false
1079
	label.Text = TEXT
1080
	label.Name = NAME
1081
	label.Parent = PARENT
1082
	return label
1083
end
1084
1085
function NoOutlines(PART)
1086
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
1087
end
1088
1089
1090
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
1091
	local NEWWELD = IT(TYPE)
1092
	NEWWELD.Part0 = PART0
1093
	NEWWELD.Part1 = PART1
1094
	NEWWELD.C0 = C0
1095
	NEWWELD.C1 = C1
1096
	NEWWELD.Parent = PARENT
1097
	return NEWWELD
1098
end
1099
1100
function CreateSound(ID, PARENT, VOLUME, PITCH)
1101
	local NEWSOUND = nil
1102
	coroutine.resume(coroutine.create(function()
1103
		NEWSOUND = IT("Sound", PARENT)
1104
		NEWSOUND.Volume = VOLUME
1105
		NEWSOUND.Pitch = PITCH
1106
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
1107
		Swait()
1108
		NEWSOUND:play()
1109
		game:GetService("Debris"):AddItem(NEWSOUND, 10)
1110
	end))
1111
	return NEWSOUND
1112
end
1113
1114
function CFrameFromTopBack(at, top, back)
1115
	local right = top:Cross(back)
1116
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
1117
end
1118
1119
function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
1120
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true)
1121
	local mesh = IT("SpecialMesh",wave)
1122
	mesh.MeshType = "FileMesh"
1123
	mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
1124
	mesh.Scale = SIZE
1125
	mesh.Offset = VT(0,0,-SIZE.X/8)
1126
	wave.CFrame = CFRAME
1127
	coroutine.resume(coroutine.create(function(PART)
1128
		for i = 1, WAIT do
1129
			Swait()
1130
			mesh.Scale = mesh.Scale + GROW
1131
			mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
1132
			if DOESROT == true then
1133
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
1134
			end
1135
			wave.Transparency = wave.Transparency + (0.5/WAIT)
1136
			if wave.Transparency > 0.99 then
1137
				wave:remove()
1138
			end
1139
		end
1140
	end))
1141
end
1142
1143
function CreateWave2(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
1144
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true)
1145
	local mesh = IT("SpecialMesh",wave)
1146
	mesh.MeshType = "FileMesh"
1147
	mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
1148
	mesh.Scale = SIZE
1149
	--mesh.Offset = VT(0,0,-SIZE.X/8)
1150
	wave.CFrame = CFRAME
1151
	coroutine.resume(coroutine.create(function(PART)
1152
		for i = 1, WAIT do
1153
			Swait()
1154
			mesh.Scale = mesh.Scale + GROW
1155
			--mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
1156
			if DOESROT == true then
1157
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
1158
			end
1159
			wave.Transparency = wave.Transparency + (0.5/WAIT)
1160
			if wave.Transparency > 0.99 then
1161
				wave:remove()
1162
			end
1163
		end
1164
	end))
1165
end
1166
1167
function CreateSwirl(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
1168
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true)
1169
	local mesh = IT("SpecialMesh",wave)
1170
	mesh.MeshType = "FileMesh"
1171
	mesh.MeshId = "http://www.roblox.com/asset/?id=1051557"
1172
	mesh.Scale = SIZE
1173
	wave.CFrame = CFRAME
1174
	coroutine.resume(coroutine.create(function(PART)
1175
		for i = 1, WAIT do
1176
			Swait()
1177
			mesh.Scale = mesh.Scale + GROW
1178
			mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
1179
			if DOESROT == true then
1180
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
1181
			end
1182
			wave.Transparency = wave.Transparency + (0.5/WAIT)
1183
			if wave.Transparency > 0.99 then
1184
				wave:remove()
1185
			end
1186
		end
1187
	end))
1188
end
1189
1190
1191
function Slice(SIZE,WAIT,CFRAME,COLOR,GROW)
1192
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC("Really red"), "Effect", VT(1,1,1), true)
1193
	local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
1194
	wave.CFrame = CFRAME
1195
	coroutine.resume(coroutine.create(function(PART)
1196
		for i = 1, WAIT do
1197
			Swait()
1198
			mesh.Scale = mesh.Scale * GROW
1199
			wave.Transparency = wave.Transparency + (0.5/WAIT)
1200
			if wave.Transparency > 0.99 then
1201
				wave:remove()
1202
			end
1203
		end
1204
	end))
1205
end
1206
1207
function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
1208
	local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC("Really red"), "Effect", VT(1,1,1), true)
1209
	local mesh = IT("SpecialMesh",wave)
1210
	mesh.MeshType = "Sphere"
1211
	mesh.Scale = SIZE
1212
	mesh.Offset = VT(0,0,0)
1213
	wave.CFrame = CFRAME
1214
	coroutine.resume(coroutine.create(function(PART)
1215
		for i = 1, WAIT do
1216
			Swait()
1217
			mesh.Scale = mesh.Scale + GROW
1218
			wave.Transparency = wave.Transparency + (1/WAIT)
1219
			if wave.Transparency > 0.99 then
1220
				wave:remove()
1221
			end
1222
		end
1223
	end))
1224
end
1225
1226
function MakeForm(PART,TYPE)
1227
	if TYPE == "Cyl" then
1228
		local MSH = IT("CylinderMesh",PART)
1229
	elseif TYPE == "Ball" then
1230
		local MSH = IT("SpecialMesh",PART)
1231
		MSH.MeshType = "Sphere"
1232
	elseif TYPE == "Wedge" then
1233
		local MSH = IT("SpecialMesh",PART)
1234
		MSH.MeshType = "Wedge"
1235
	end
1236
end
1237
1238
function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT)
1239
	if FLOOR ~= nil then
1240
		coroutine.resume(coroutine.create(function()
1241
			local PART = CreatePart(3, Effects, "Neon", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0))
1242
			PART.CFrame = CF(POSITION)
1243
			for i = 1, 45 do
1244
				local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE)
1245
				RingPiece.Material = FLOOR.Material
1246
				RingPiece.Color = FLOOR.Color
1247
				RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE*4, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
1248
				Debris:AddItem(RingPiece,SWAIT/100)
1249
			end
1250
			PART:remove()
1251
		end))
1252
	end
1253
end
1254
1255
function CheckTableForString(Table, String)
1256
	for i, v in pairs(Table) do
1257
		if string.find(string.lower(String), string.lower(v)) then
1258
			return true
1259
		end
1260
	end
1261
	return false
1262
end
1263
1264
function CheckIntangible(Hit)
1265
	local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
1266
	if Hit and Hit.Parent then
1267
		if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
1268
			return true
1269
		end
1270
	end
1271
	return false
1272
end
1273
1274
Debris = game:GetService("Debris")
1275
1276
function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
1277
	local Direction = CFrame.new(StartPos, Vec).lookVector
1278
	local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
1279
	local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
1280
	if RayHit and CheckIntangible(RayHit) then
1281
		if DelayIfHit then
1282
			wait()
1283
		end
1284
		RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
1285
	end
1286
	return RayHit, RayPos, RayNormal
1287
end
1288
1289
function turnto(position)
1290
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
1291
end
1292
1293
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
1294
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
1295
end
1296
1297
function PositiveAngle(NUMBER)
1298
	if NUMBER >= 0 then
1299
		NUMBER = 0
1300
	end
1301
	return NUMBER
1302
end
1303
1304
function NegativeAngle(NUMBER)
1305
	if NUMBER <= 0 then
1306
		NUMBER = 0
1307
	end
1308
	return NUMBER
1309
end
1310
1311
function Swait(NUMBER)
1312
	if NUMBER == 0 or NUMBER == nil then
1313
		ArtificialHB.Event:wait()
1314
	else
1315
		for i = 1, NUMBER do
1316
			ArtificialHB.Event:wait()
1317
		end
1318
	end
1319
end
1320
1321
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
1322
	local NEWMESH = IT(MESH)
1323
	if MESH == "SpecialMesh" then
1324
		NEWMESH.MeshType = MESHTYPE
1325
		if MESHID ~= "nil" and MESHID ~= "" then
1326
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
1327
		end
1328
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
1329
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
1330
		end
1331
	end
1332
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
1333
	NEWMESH.Scale = SCALE
1334
	NEWMESH.Parent = PARENT
1335
	return NEWMESH
1336
end
1337
1338
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
1339
	local NEWPART = IT("Part")
1340
	NEWPART.formFactor = FORMFACTOR
1341
	NEWPART.Reflectance = REFLECTANCE
1342
	NEWPART.Transparency = TRANSPARENCY
1343
	NEWPART.CanCollide = false
1344
	NEWPART.Locked = true
1345
	NEWPART.Anchored = true
1346
	if ANCHOR == false then
1347
		NEWPART.Anchored = false
1348
	end
1349
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
1350
	NEWPART.Name = NAME
1351
	NEWPART.Size = SIZE
1352
	NEWPART.Position = Torso.Position
1353
	NEWPART.Material = MATERIAL
1354
	NEWPART:BreakJoints()
1355
	NEWPART.Parent = PARENT
1356
	return NEWPART
1357
end
1358
1359
	local function weldBetween(a, b)
1360
	    local weldd = IT("Weld")
1361
	    weldd.Part0 = a
1362
	    weldd.Part1 = b
1363
	    weldd.C0 = CF()
1364
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
1365
	    weldd.Parent = a
1366
	    return weldd
1367
	end
1368
1369
1370
function QuaternionFromCFrame(cf)
1371
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
1372
	local trace = m00 + m11 + m22
1373
	if trace > 0 then 
1374
		local s = math.sqrt(1 + trace)
1375
		local recip = 0.5 / s
1376
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
1377
	else
1378
		local i = 0
1379
		if m11 > m00 then
1380
			i = 1
1381
		end
1382
		if m22 > (i == 0 and m00 or m11) then
1383
			i = 2
1384
		end
1385
		if i == 0 then
1386
			local s = math.sqrt(m00 - m11 - m22 + 1)
1387
			local recip = 0.5 / s
1388
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
1389
		elseif i == 1 then
1390
			local s = math.sqrt(m11 - m22 - m00 + 1)
1391
			local recip = 0.5 / s
1392
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
1393
		elseif i == 2 then
1394
			local s = math.sqrt(m22 - m00 - m11 + 1)
1395
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
1396
		end
1397
	end
1398
end
1399
 
1400
function QuaternionToCFrame(px, py, pz, x, y, z, w)
1401
	local xs, ys, zs = x + x, y + y, z + z
1402
	local wx, wy, wz = w * xs, w * ys, w * zs
1403
	local xx = x * xs
1404
	local xy = x * ys
1405
	local xz = x * zs
1406
	local yy = y * ys
1407
	local yz = y * zs
1408
	local zz = z * zs
1409
	return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
1410
end
1411
 
1412
function QuaternionSlerp(a, b, t)
1413
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
1414
	local startInterp, finishInterp;
1415
	if cosTheta >= 0.0001 then
1416
		if (1 - cosTheta) > 0.0001 then
1417
			local theta = ACOS(cosTheta)
1418
			local invSinTheta = 1 / SIN(theta)
1419
			startInterp = SIN((1 - t) * theta) * invSinTheta
1420
			finishInterp = SIN(t * theta) * invSinTheta
1421
		else
1422
			startInterp = 1 - t
1423
			finishInterp = t
1424
		end
1425
	else
1426
		if (1 + cosTheta) > 0.0001 then
1427
			local theta = ACOS(-cosTheta)
1428
			local invSinTheta = 1 / SIN(theta)
1429
			startInterp = SIN((t - 1) * theta) * invSinTheta
1430
			finishInterp = SIN(t * theta) * invSinTheta
1431
		else
1432
			startInterp = t - 1
1433
			finishInterp = t
1434
		end
1435
	end
1436
	return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
1437
end
1438
1439
function Clerp(a, b, t)
1440
	local qa = {QuaternionFromCFrame(a)}
1441
	local qb = {QuaternionFromCFrame(b)}
1442
	local ax, ay, az = a.x, a.y, a.z
1443
	local bx, by, bz = b.x, b.y, b.z
1444
	local _t = 1 - t
1445
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
1446
end
1447
1448
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
1449
	local frame = IT("Frame")
1450
	frame.BackgroundTransparency = TRANSPARENCY
1451
	frame.BorderSizePixel = BORDERSIZEPIXEL
1452
	frame.Position = POSITION
1453
	frame.Size = SIZE
1454
	frame.BackgroundColor3 = COLOR
1455
	frame.BorderColor3 = BORDERCOLOR
1456
	frame.Name = NAME
1457
	frame.Parent = PARENT
1458
	return frame
1459
end
1460
1461
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
1462
	local label = IT("TextLabel")
1463
	label.BackgroundTransparency = 1
1464
	label.Size = UD2(1, 0, 1, 0)
1465
	label.Position = UD2(0, 0, 0, 0)
1466
	label.TextColor3 = TEXTCOLOR
1467
	label.TextStrokeTransparency = STROKETRANSPARENCY
1468
	label.TextTransparency = TRANSPARENCY
1469
	label.FontSize = TEXTFONTSIZE
1470
	label.Font = TEXTFONT
1471
	label.BorderSizePixel = BORDERSIZEPIXEL
1472
	label.TextScaled = false
1473
	label.Text = TEXT
1474
	label.Name = NAME
1475
	label.Parent = PARENT
1476
	return label
1477
end
1478
1479
function NoOutlines(PART)
1480
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
1481
end
1482
1483
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
1484
	local NEWWELD = IT(TYPE)
1485
	NEWWELD.Part0 = PART0
1486
	NEWWELD.Part1 = PART1
1487
	NEWWELD.C0 = C0
1488
	NEWWELD.C1 = C1
1489
	NEWWELD.Parent = PARENT
1490
	return NEWWELD
1491
end
1492
1493
local S = IT("Sound")
1494
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
1495
	local NEWSOUND = nil
1496
	coroutine.resume(coroutine.create(function()
1497
		NEWSOUND = S:Clone()
1498
		NEWSOUND.Parent = PARENT
1499
		NEWSOUND.Volume = VOLUME
1500
		NEWSOUND.Pitch = PITCH
1501
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
1502
		NEWSOUND:play()
1503
		if DOESLOOP == true then
1504
			NEWSOUND.Looped = true
1505
		else
1506
			repeat wait(1) until NEWSOUND.Playing == false
1507
			NEWSOUND:remove()
1508
		end
1509
	end))
1510
	return NEWSOUND
1511
end
1512
1513
function CFrameFromTopBack(at, top, back)
1514
	local right = top:Cross(back)
1515
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
1516
end
1517
1518
--WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
1519
function WACKYEFFECT(Table)
1520
	local TYPE = (Table.EffectType or "Sphere")
1521
	local SIZE = (Table.Size or VT(1,1,1))
1522
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
1523
	local TRANSPARENCY = (Table.Transparency or 0)
1524
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
1525
	local CFRAME = (Table.CFrame or Torso.CFrame)
1526
	local MOVEDIRECTION = (Table.MoveToPos or nil)
1527
	local ROTATION1 = (Table.RotationX or 0)
1528
	local ROTATION2 = (Table.RotationY or 0)
1529
	local ROTATION3 = (Table.RotationZ or 0)
1530
	local MATERIAL = (Table.Material or "Neon")
1531
	local COLOR = (Table.Color or C3(1,1,1))
1532
	local TIME = (Table.Time or 45)
1533
	local SOUNDID = (Table.SoundID or nil)
1534
	local SOUNDPITCH = (Table.SoundPitch or nil)
1535
	local SOUNDVOLUME = (Table.SoundVolume or nil)
1536
	coroutine.resume(coroutine.create(function()
1537
		local PLAYSSOUND = false
1538
		local SOUND = nil
1539
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
1540
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
1541
			PLAYSSOUND = true
1542
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
1543
		end
1544
		EFFECT.Color = COLOR
1545
		local MSH = nil
1546
		if TYPE == "Sphere" then
1547
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
1548
		elseif TYPE == "Block" then
1549
			MSH = IT("BlockMesh",EFFECT)
1550
			MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
1551
		elseif TYPE == "Wave" then
1552
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
1553
		elseif TYPE == "Ring" then
1554
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
1555
		elseif TYPE == "Slash" then
1556
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
1557
		elseif TYPE == "Round Slash" then
1558
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
1559
		elseif TYPE == "Swirl" then
1560
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
1561
		elseif TYPE == "Skull" then
1562
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
1563
		elseif TYPE == "Crystal" then
1564
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
1565
		end
1566
		if MSH ~= nil then
1567
			local MOVESPEED = nil
1568
			if MOVEDIRECTION ~= nil then
1569
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
1570
			end
1571
			local GROWTH = SIZE - ENDSIZE
1572
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
1573
			if TYPE == "Block" then
1574
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
1575
			else
1576
				EFFECT.CFrame = CFRAME
1577
			end
1578
			for LOOP = 1, TIME+1 do
1579
				Swait()
1580
				MSH.Scale = MSH.Scale - GROWTH/TIME
1581
				if TYPE == "Wave" then
1582
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
1583
				end
1584
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
1585
				if TYPE == "Block" then
1586
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
1587
				else
1588
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
1589
				end
1590
				if MOVEDIRECTION ~= nil then
1591
					local ORI = EFFECT.Orientation
1592
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
1593
					EFFECT.Orientation = ORI
1594
				end
1595
			end
1596
			if PLAYSSOUND == false then
1597
				EFFECT:remove()
1598
			else
1599
				SOUND.Stopped:Connect(function()
1600
					EFFECT:remove()
1601
				end)
1602
			end
1603
		else
1604
			if PLAYSSOUND == false then
1605
				EFFECT:remove()
1606
			else
1607
				repeat Swait() until SOUND.Playing == false
1608
				EFFECT:remove()
1609
			end
1610
		end
1611
	end))
1612
end
1613
1614
function MakeForm(PART,TYPE)
1615
	if TYPE == "Cyl" then
1616
		local MSH = IT("CylinderMesh",PART)
1617
	elseif TYPE == "Ball" then
1618
		local MSH = IT("SpecialMesh",PART)
1619
		MSH.MeshType = "Sphere"
1620
	elseif TYPE == "Wedge" then
1621
		local MSH = IT("SpecialMesh",PART)
1622
		MSH.MeshType = "Wedge"
1623
	end
1624
end
1625
1626
Debris = game:GetService("Debris")
1627
1628
function CastProperRay(StartPos, EndPos, Distance, Ignore)
1629
	local DIRECTION = CF(StartPos,EndPos).lookVector
1630
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
1631
end
1632
1633
function turnto(position)
1634
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
1635
end
1636
1637
function SpawnTrail(FROM,TO,BIG)
1638
	local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0))
1639
	MakeForm(TRAIL,"Cyl")
1640
	local DIST = (FROM - TO).Magnitude
1641
	if BIG == true then
1642
		TRAIL.Size = VT(0.5,DIST,0.5)
1643
	else
1644
		TRAIL.Size = VT(0.25,DIST,0.25)
1645
	end
1646
	TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
1647
	coroutine.resume(coroutine.create(function()
1648
		for i = 1, 5 do
1649
			Swait()
1650
			TRAIL.Transparency = TRAIL.Transparency + 0.1
1651
		end
1652
		TRAIL:remove()
1653
	end))
1654
end
1655
1656
local asd = Instance.new("ParticleEmitter")
1657
asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0))
1658
asd.LightEmission = .1
1659
asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
1660
aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)})
1661
bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
1662
asd.Transparency = bbb
1663
asd.Size = aaa
1664
asd.ZOffset = .9
1665
asd.Acceleration = Vector3.new(0, -15, 0)
1666
asd.LockedToPart = false
1667
asd.EmissionDirection = "Back"
1668
asd.Lifetime = NumberRange.new(1, 2)
1669
asd.Rotation = NumberRange.new(-100, 100)
1670
asd.RotSpeed = NumberRange.new(-100, 100)
1671
asd.Speed = NumberRange.new(10)
1672
asd.Enabled = false
1673
asd.VelocitySpread = 999
1674
1675
function getbloody(victim,amount)
1676
	local PART = CreatePart(3, Effects, "Metal", 0, 1, "Mid gray", "Blood", victim.Size)
1677
	PART.CFrame = victim.CFrame
1678
	local HITPLAYERSOUNDS = {"356551938","264486467"}
1679
	Debris:AddItem(PART,5)
1680
	CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
1681
	CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
1682
	CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
1683
	local prtcl = asd:Clone()
1684
	prtcl.Parent = PART
1685
	prtcl:Emit(amount*10)
1686
end
1687
1688
local Particle = IT("ParticleEmitter",nil)
1689
Particle.Enabled = false
1690
Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(0.3,0.95),NumberSequenceKeypoint.new(1,1)})
1691
Particle.LightEmission = 0.5
1692
Particle.Rate = 150
1693
Particle.ZOffset = 1
1694
Particle.Rotation = NumberRange.new(-180, 180)
1695
Particle.RotSpeed = NumberRange.new(-180, 180)
1696
Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
1697
Particle.Color = ColorSequence.new(C3(1,0,0),C3(0.4,0,0))
1698
1699
--ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
1700
function ParticleEmitter(Table)
1701
	local PRTCL = Particle:Clone()
1702
	local Speed = Table.Speed or 5
1703
	local Drag = Table.Drag or 0
1704
	local Size1 = Table.Size1 or 1
1705
	local Size2 = Table.Size2 or 5
1706
	local Lifetime1 = Table.Lifetime1 or 1
1707
	local Lifetime2 = Table.Lifetime2 or 1.5
1708
	local Parent = Table.Parent or Torso
1709
	local Emit = Table.Emit or 100
1710
	local Offset = Table.Offset or 360
1711
	local Acel = Table.Acel or VT(0,0,0)
1712
	local Enabled = Table.Enabled or false
1713
	PRTCL.Parent = Parent
1714
	PRTCL.Size = NumberSequence.new(Size1,Size2)
1715
	PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
1716
	PRTCL.Speed = NumberRange.new(Speed)
1717
	PRTCL.VelocitySpread = Offset
1718
	PRTCL.Drag = Drag
1719
	PRTCL.Acceleration = Acel
1720
	if Enabled == false then
1721
		PRTCL:Emit(Emit)
1722
		Debris:AddItem(PRTCL,Lifetime2)
1723
	else
1724
		PRTCL.Enabled = true
1725
	end
1726
	return PRTCL
1727
end
1728
1729
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
1730
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
1731
end
1732
1733
function PositiveAngle(NUMBER)
1734
	if NUMBER >= 0 then
1735
		NUMBER = 0
1736
	end
1737
	return NUMBER
1738
end
1739
1740
function NegativeAngle(NUMBER)
1741
	if NUMBER <= 0 then
1742
		NUMBER = 0
1743
	end
1744
	return NUMBER
1745
end
1746
1747
function Swait(NUMBER)
1748
	if NUMBER == 0 or NUMBER == nil then
1749
		ArtificialHB.Event:wait()
1750
	else
1751
		for i = 1, NUMBER do
1752
			ArtificialHB.Event:wait()
1753
		end
1754
	end
1755
end
1756
1757
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
1758
	local NEWMESH = IT(MESH)
1759
	if MESH == "SpecialMesh" then
1760
		NEWMESH.MeshType = MESHTYPE
1761
		if MESHID ~= "nil" and MESHID ~= "" then
1762
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
1763
		end
1764
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
1765
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
1766
		end
1767
	end
1768
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
1769
	NEWMESH.Scale = SCALE
1770
	NEWMESH.Parent = PARENT
1771
	return NEWMESH
1772
end
1773
1774
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
1775
	local NEWPART = IT("Part")
1776
	NEWPART.formFactor = FORMFACTOR
1777
	NEWPART.Reflectance = REFLECTANCE
1778
	NEWPART.Transparency = TRANSPARENCY
1779
	NEWPART.CanCollide = false
1780
	NEWPART.Locked = true
1781
	NEWPART.Anchored = true
1782
	if ANCHOR == false then
1783
		NEWPART.Anchored = false
1784
	end
1785
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
1786
	NEWPART.Name = NAME
1787
	NEWPART.Size = SIZE
1788
	NEWPART.Position = Torso.Position
1789
	NEWPART.Material = MATERIAL
1790
	NEWPART:BreakJoints()
1791
	NEWPART.Parent = PARENT
1792
	return NEWPART
1793
end
1794
1795
	local function weldBetween(a, b)
1796
	    local weldd = Instance.new("ManualWeld")
1797
	    weldd.Part0 = a
1798
	    weldd.Part1 = b
1799
	    weldd.C0 = CFrame.new()
1800
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
1801
	    weldd.Parent = a
1802
	    return weldd
1803
	end
1804
1805
1806
function QuaternionFromCFrame(cf)
1807
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
1808
	local trace = m00 + m11 + m22
1809
	if trace > 0 then 
1810
		local s = math.sqrt(1 + trace)
1811
		local recip = 0.5 / s
1812
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
1813
	else
1814
		local i = 0
1815
		if m11 > m00 then
1816
			i = 1
1817
		end
1818
		if m22 > (i == 0 and m00 or m11) then
1819
			i = 2
1820
		end
1821
		if i == 0 then
1822
			local s = math.sqrt(m00 - m11 - m22 + 1)
1823
			local recip = 0.5 / s
1824
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
1825
		elseif i == 1 then
1826
			local s = math.sqrt(m11 - m22 - m00 + 1)
1827
			local recip = 0.5 / s
1828
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
1829
		elseif i == 2 then
1830
			local s = math.sqrt(m22 - m00 - m11 + 1)
1831
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
1832
		end
1833
	end
1834
end
1835
 
1836
function QuaternionToCFrame(px, py, pz, x, y, z, w)
1837
	local xs, ys, zs = x + x, y + y, z + z
1838
	local wx, wy, wz = w * xs, w * ys, w * zs
1839
	local xx = x * xs
1840
	local xy = x * ys
1841
	local xz = x * zs
1842
	local yy = y * ys
1843
	local yz = y * zs
1844
	local zz = z * zs
1845
	return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
1846
end
1847
 
1848
function QuaternionSlerp(a, b, t)
1849
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
1850
	local startInterp, finishInterp;
1851
	if cosTheta >= 0.0001 then
1852
		if (1 - cosTheta) > 0.0001 then
1853
			local theta = ACOS(cosTheta)
1854
			local invSinTheta = 1 / SIN(theta)
1855
			startInterp = SIN((1 - t) * theta) * invSinTheta
1856
			finishInterp = SIN(t * theta) * invSinTheta
1857
		else
1858
			startInterp = 1 - t
1859
			finishInterp = t
1860
		end
1861
	else
1862
		if (1 + cosTheta) > 0.0001 then
1863
			local theta = ACOS(-cosTheta)
1864
			local invSinTheta = 1 / SIN(theta)
1865
			startInterp = SIN((t - 1) * theta) * invSinTheta
1866
			finishInterp = SIN(t * theta) * invSinTheta
1867
		else
1868
			startInterp = t - 1
1869
			finishInterp = t
1870
		end
1871
	end
1872
	return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
1873
end
1874
1875
function Clerp(a, b, t)
1876
	local qa = {QuaternionFromCFrame(a)}
1877
	local qb = {QuaternionFromCFrame(b)}
1878
	local ax, ay, az = a.x, a.y, a.z
1879
	local bx, by, bz = b.x, b.y, b.z
1880
	local _t = 1 - t
1881
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
1882
end
1883
1884
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
1885
	local frame = IT("Frame")
1886
	frame.BackgroundTransparency = TRANSPARENCY
1887
	frame.BorderSizePixel = BORDERSIZEPIXEL
1888
	frame.Position = POSITION
1889
	frame.Size = SIZE
1890
	frame.BackgroundColor3 = COLOR
1891
	frame.BorderColor3 = BORDERCOLOR
1892
	frame.Name = NAME
1893
	frame.Parent = PARENT
1894
	return frame
1895
end
1896
1897
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
1898
	local label = IT("TextLabel")
1899
	label.BackgroundTransparency = 1
1900
	label.Size = UD2(1, 0, 1, 0)
1901
	label.Position = UD2(0, 0, 0, 0)
1902
	label.TextColor3 = TEXTCOLOR
1903
	label.TextStrokeTransparency = STROKETRANSPARENCY
1904
	label.TextTransparency = TRANSPARENCY
1905
	label.FontSize = TEXTFONTSIZE
1906
	label.Font = TEXTFONT
1907
	label.BorderSizePixel = BORDERSIZEPIXEL
1908
	label.TextScaled = false
1909
	label.Text = TEXT
1910
	label.Name = NAME
1911
	label.Parent = PARENT
1912
	return label
1913
end
1914
1915
function NoOutlines(PART)
1916
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
1917
end
1918
1919
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
1920
	local NEWWELD = IT(TYPE)
1921
	NEWWELD.Part0 = PART0
1922
	NEWWELD.Part1 = PART1
1923
	NEWWELD.C0 = C0
1924
	NEWWELD.C1 = C1
1925
	NEWWELD.Parent = PARENT
1926
	return NEWWELD
1927
end
1928
1929
local S = IT("Sound")
1930
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
1931
	local NEWSOUND = nil
1932
	coroutine.resume(coroutine.create(function()
1933
		NEWSOUND = S:Clone()
1934
		NEWSOUND.Parent = PARENT
1935
		NEWSOUND.Volume = VOLUME
1936
		NEWSOUND.Pitch = PITCH
1937
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
1938
		NEWSOUND:play()
1939
		if DOESLOOP == true then
1940
			NEWSOUND.Looped = true
1941
		else
1942
			repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
1943
			NEWSOUND:remove()
1944
		end
1945
	end))
1946
	return NEWSOUND
1947
end
1948
1949
function CFrameFromTopBack(at, top, back)
1950
	local right = top:Cross(back)
1951
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
1952
end
1953
1954
--WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
1955
function WACKYEFFECT(Table)
1956
	local TYPE = (Table.EffectType or "Sphere")
1957
	local SIZE = (Table.Size or VT(1,1,1))
1958
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
1959
	local TRANSPARENCY = (Table.Transparency or 0)
1960
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
1961
	local CFRAME = (Table.CFrame or Torso.CFrame)
1962
	local MOVEDIRECTION = (Table.MoveToPos or nil)
1963
	local ROTATION1 = (Table.RotationX or 0)
1964
	local ROTATION2 = (Table.RotationY or 0)
1965
	local ROTATION3 = (Table.RotationZ or 0)
1966
	local MATERIAL = (Table.Material or "Neon")
1967
	local COLOR = (Table.Color or C3(1,1,1))
1968
	local TIME = (Table.Time or 45)
1969
	local SOUNDID = (Table.SoundID or nil)
1970
	local SOUNDPITCH = (Table.SoundPitch or nil)
1971
	local SOUNDVOLUME = (Table.SoundVolume or nil)
1972
	coroutine.resume(coroutine.create(function()
1973
		local PLAYSSOUND = false
1974
		local SOUND = nil
1975
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
1976
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
1977
			PLAYSSOUND = true
1978
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
1979
		end
1980
		EFFECT.Color = COLOR
1981
		local MSH = nil
1982
		if TYPE == "Sphere" then
1983
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
1984
		elseif TYPE == "Block" then
1985
			MSH = IT("BlockMesh",EFFECT)
1986
			MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
1987
		elseif TYPE == "Wave" then
1988
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
1989
		elseif TYPE == "Ring" then
1990
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
1991
		elseif TYPE == "Slash" then
1992
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
1993
		elseif TYPE == "Round Slash" then
1994
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
1995
		elseif TYPE == "Swirl" then
1996
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
1997
		elseif TYPE == "Skull" then
1998
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
1999
		elseif TYPE == "Crystal" then
2000
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
2001
		end
2002
		if MSH ~= nil then
2003
			local MOVESPEED = nil
2004
			if MOVEDIRECTION ~= nil then
2005
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
2006
			end
2007
			local GROWTH = SIZE - ENDSIZE
2008
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
2009
			if TYPE == "Block" then
2010
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
2011
			else
2012
				EFFECT.CFrame = CFRAME
2013
			end
2014
			for LOOP = 1, TIME+1 do
2015
				Swait()
2016
				MSH.Scale = MSH.Scale - GROWTH/TIME
2017
				if TYPE == "Wave" then
2018
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
2019
				end
2020
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
2021
				if TYPE == "Block" then
2022
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
2023
				else
2024
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
2025
				end
2026
				if MOVEDIRECTION ~= nil then
2027
					local ORI = EFFECT.Orientation
2028
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
2029
					EFFECT.Orientation = ORI
2030
				end
2031
			end
2032
			if PLAYSSOUND == false then
2033
				EFFECT:remove()
2034
			else
2035
				SOUND.Stopped:Connect(function()
2036
					EFFECT:remove()
2037
				end)
2038
			end
2039
		else
2040
			if PLAYSSOUND == false then
2041
				EFFECT:remove()
2042
			else
2043
				repeat Swait() until SOUND.Playing == false
2044
				EFFECT:remove()
2045
			end
2046
		end
2047
	end))
2048
end
2049
2050
function MakeForm(PART,TYPE)
2051
	if TYPE == "Cyl" then
2052
		local MSH = IT("CylinderMesh",PART)
2053
	elseif TYPE == "Ball" then
2054
		local MSH = IT("SpecialMesh",PART)
2055
		MSH.MeshType = "Sphere"
2056
	elseif TYPE == "Wedge" then
2057
		local MSH = IT("SpecialMesh",PART)
2058
		MSH.MeshType = "Wedge"
2059
	end
2060
end
2061
2062
function SpawnTrail(FROM,TO,BIG)
2063
	local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0))
2064
	MakeForm(TRAIL,"Cyl")
2065
	local DIST = (FROM - TO).Magnitude
2066
	if BIG == true then
2067
		TRAIL.Size = VT(0.5,DIST,0.5)
2068
	else
2069
		TRAIL.Size = VT(0.25,DIST,0.25)
2070
	end
2071
	TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
2072
	coroutine.resume(coroutine.create(function()
2073
		for i = 1, 5 do
2074
			Swait()
2075
			TRAIL.Transparency = TRAIL.Transparency + 0.1
2076
		end
2077
		TRAIL:remove()
2078
	end))
2079
end
2080
2081
Debris = game:GetService("Debris")
2082
2083
function CastProperRay(StartPos, EndPos, Distance, Ignore)
2084
	local DIRECTION = CF(StartPos,EndPos).lookVector
2085
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
2086
end
2087
2088
function turnto(position)
2089
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
2090
end
2091
2092
--//=================================\\
2093
--||	     WEAPON CREATION
2094
--\\=================================//
2095
2096
2097
local FIST = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Neon Gauntlet Part", VT(1.01*Player_Size,1.4*Player_Size,1.01*Player_Size),false)
2098
local weld = CreateWeldOrSnapOrMotor("Weld", FIST, RightArm, FIST, CF(0 * Player_Size, -0.25 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2099
local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.2*Player_Size,0.3*Player_Size,1.2*Player_Size),false)
2100
local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.6 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2101
2102
local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false)
2103
local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2104
local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false)
2105
local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.2 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2106
local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false)
2107
local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.3 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2108
local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.05*Player_Size,0.05*Player_Size,1.05*Player_Size),false)
2109
local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, 0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2110
2111
local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,1.1*Player_Size),false)
2112
local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0 * Player_Size, -0.35 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2113
local part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Neon Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,1*Player_Size),false)
2114
local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.05 * Player_Size, -0.375 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2115
local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,0.3*Player_Size),false)
2116
local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.1 * Player_Size, -0.4 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2117
local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,0.3*Player_Size),false)
2118
local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.1 * Player_Size, -0.4 * Player_Size, 0.33 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2119
local part = CreatePart(3, Weapon, "Granite", 0, 0, "Really red", "Gauntlet Part", VT(1.1*Player_Size,0.8*Player_Size,0.3*Player_Size),false)
2120
local weld = CreateWeldOrSnapOrMotor("Weld", part, FIST, part, CF(0.1 * Player_Size, -0.4 * Player_Size, -0.33 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2121
2122
ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.1, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.5, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
2123
--ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 0.2, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.7, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
2124
 
2125
for _, c in pairs(Weapon:GetDescendants()) do
2126
    if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
2127
        c.Material = "Glass"
2128
        c.Color = C3(0,0,0)
2129
    elseif c.ClassName == "Part" and c.Name == "Eye" then
2130
        c.Color = C3(1,0,0)
2131
        c.Material = "Neon"
2132
    end
2133
end
2134
 
2135
Weapon.Parent = Character
2136
for _, c in pairs(Weapon:GetChildren()) do
2137
    if c.ClassName == "Part" then
2138
        c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
2139
    end
2140
end
2141
2142
New = function(Object, Parent, Name, Data)
2143
	local Object = Instance.new(Object)
2144
	for Index, Value in pairs(Data or {}) do
2145
		Object[Index] = Value
2146
	end
2147
	Object.Parent = Parent
2148
	Object.Name = Name
2149
	return Object
2150
end
2151
2152
2153
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.330000252, 0.660000384, 0.0500000007),CFrame = CFrame.new(-67.6787415, 1.33912802, 93.9772263, 0, 0, -1, 0, 1, 0, 1, 0, 0),})
2154
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = LeftLeg,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.0127105713, 0.339127064, 0.487541199, 0, 0, 1, 0, 1, 0, -1, 0, 0),})
2155
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.330000252, 0.660000384, 0.0500000007),CFrame = CFrame.new(-66.6787415, 1.33912802, 93.9772263, 0, 0, -1, 0, 1, 0, 1, 0, 0),})
2156
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = LeftLeg,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.0127105713, 0.339127064, -0.512458801, 0, 0, 1, 0, 1, 0, -1, 0, 0),})
2157
2158
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.740000069, 0.140000015, 0.0500000007),CFrame = CFrame.new(-67.6787415, 3.12643075, 92.6921463, -9.31322575e-10, -1.86264515e-09, -0.999999285, 0.777135551, 0.629333496, 9.31322575e-10, 0.6293329, -0.777134895, 0),})
2159
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0.777135491, 0.629333377, 0, 0.629333377, -0.777135491, -1, 0, 0),C1 = CFrame.new(-0.766067505, 0.138611317, 0.515716553, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
2160
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1.12999988, 1.12000012, 0.0500000007),CFrame = CFrame.new(-67.6951752, 3.43133378, 93.991272, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
2161
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.533157349, 0.443484068, 0.50994873, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
2162
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.450000018, 0.590000272, 0.0500000007),CFrame = CFrame.new(-67.6951752, 2.60608268, 94.3512573, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
2163
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.893096924, -0.381786108, 0.509513855, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
2164
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.330000013, 0.590000272, 0.0500000007),CFrame = CFrame.new(-66.6951752, 2.60608268, 94.2912598, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
2165
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.817497253, -0.388065577, -0.489402771, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
2166
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.220000237, 0.660000384, 0.0500000007),CFrame = CFrame.new(-66.6787338, 2.57395577, 93.9222183, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
2167
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.448242188, -0.420258999, -0.49987793, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
2168
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1.07999992, 1.12000012, 0.0500000007),CFrame = CFrame.new(-66.6951752, 3.43133354, 93.9662704, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
2169
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(0.492546082, 0.437201023, -0.489517212, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
2170
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.740000069, 0.340000302, 0.0500000007),CFrame = CFrame.new(-66.6787415, 3.2281816, 93.1287689, 0, -9.31322575e-10, -0.999999285, 0, 1, 9.31322575e-10, 0.999999225, 0, 0),})
2171
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),C1 = CFrame.new(-0.345108032, 0.234031916, -0.491600037, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
2172
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1.0999999, 0.0500000007, 1.00999975),CFrame = CFrame.new(-67.1759109, 3.99574399, 93.9762726, 0, -0.0260759834, -0.999659359, 0, 0.999660075, -0.0260760002, 0.999999225, -2.91038305e-11, -9.31322575e-10),})
2173
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = Torso,C0 = CFrame.new(0, 0, 0, 0, 0, 1, -0.0260760002, 0.999660015, 0, -0.999660015, -0.0260760002, 0),C1 = CFrame.new(0.510047913, 1.00462079, -0.0125579834, -0.0156119959, -4.38656264e-11, 0.999877751, -0.0062854127, 0.999980271, -9.81397825e-05, -0.999858022, -0.00628618058, -0.0156116877),})
2174
2175
Corruption = New("Part",Character,"Corruption",{BrickColor = BrickColor.new("Really red"),Material = Enum.Material.Neon,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.740000069, 0.419999987, 0.870000064),CFrame = CFrame.new(-67.0815201, 2.81366396, 91.9528885, 0, 0, -1, 0.777135491, 0.629333377, 0, 0.629333377, -0.777135491, 0),})
2176
mot = New("Motor",Corruption,"mot",{Part0 = Corruption,Part1 = LeftArm,C0 = CFrame.new(0, 0, 0, 0, 0.777135491, 0.629333377, 0, 0.629333377, -0.777135491, -1, 0, 0),C1 = CFrame.new(-0.00936126709, -0.184385061, -0.0693511963, 0, 0, 1, 0, 1, 0, -1, 0, 0),})
2177
2178
local Trail = IT("Trail",Leftbarrel)
2179
Trail.Attachment0 = A
2180
Trail.Attachment1 = B
2181
Trail.Lifetime = 0.2
2182
Trail.Color = ColorSequence.new(BRICKC"Really red".Color)
2183
Trail.Transparency = NumberSequence.new(0, 1)
2184
Trail.Enabled = true
2185
2186
local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = RightLeg, Emit = 100, Offset = 360, Enabled = true})
2187
PRT.LockedToPart = true
2188
local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = LeftLeg, Emit = 100, Offset = 360, Enabled = true})
2189
PRT.LockedToPart = true
2190
local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.3, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = true})
2191
PRT.LockedToPart = true
2192
local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = RightArm, Emit = 100, Offset = 360, Enabled = true})
2193
PRT.LockedToPart = true
2194
local PRT = ParticleEmitter({Speed = 3, Drag = 3, Size1 = 1, Size2 = 3, Lifetime1 = 0.2, Lifetime2 = 1, Parent = LeftArm, Emit = 100, Offset = 360, Enabled = true})
2195
PRT.LockedToPart = true
2196
2197
local HAT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Tophat", VT(1,1,1),false)
2198
local Hatweld = CreateWeldOrSnapOrMotor("Weld", Head, Head, HAT, CF(0,1,0), CF(0, 0, 0))
2199
CreateMesh("SpecialMesh", HAT, "FileMesh", "97094619", "97094572", VT(1,1,1), VT(0,0,0))
2200
for i = 1, 16 do
2201
	local FACE = CreatePart(3, Character, "Neon", 0, 0+(i-1)/16.2, "White", "FaceGradient", VT(1.01,0.65,1.01),false)
2202
	FACE.Color = C3(0,0,0)
2203
	Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
2204
	CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.45-(i-1)/25,0), CF(0, 0, 0))
2205
end
2206
local EYE = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
2207
MakeForm(EYE,"Ball")
2208
CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.26,-0.55), CF(0, 0, 0))
2209
local EYE2 = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
2210
MakeForm(EYE2,"Ball")
2211
CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE2, CF(-0.15,0.26,-0.55), CF(0, 0, 0))
2212
2213
local Particle = IT("ParticleEmitter",nil)
2214
Particle.Enabled = false
2215
Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
2216
Particle.LightEmission = 5
2217
Particle.Rate = 300
2218
Particle.ZOffset = 0.2
2219
Particle.Rotation = NumberRange.new(-180, 180)
2220
Particle.RotSpeed = NumberRange.new(-180, 180)
2221
Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
2222
Particle.Color = ColorSequence.new(C3(1,0,0),C3(0.4,0,0),C3(1,0,0),C3(0,4,0),C3(1,0,0),C3(1,0,0),C3(1,0,0),C3(1,0,0))
2223
2224
--ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
2225
function ParticleEmitter(Table)
2226
	local PRTCL = Particle:Clone()
2227
	local Speed = Table.Speed or 5
2228
	local Drag = Table.Drag or 0
2229
	local Size1 = Table.Size1 or 1
2230
	local Size2 = Table.Size2 or 5
2231
	local Lifetime1 = Table.Lifetime1 or 1
2232
	local Lifetime2 = Table.Lifetime2 or 1.5
2233
	local Parent = Table.Parent or Torso
2234
	local Emit = Table.Emit or 100
2235
	local Offset = Table.Offset or 360
2236
	local Acel = Table.Acel or VT(0,0,0)
2237
	local Enabled = Table.Enabled or false
2238
	PRTCL.Parent = Parent
2239
	PRTCL.Size = NumberSequence.new(Size1,Size2)
2240
	PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
2241
	PRTCL.Speed = NumberRange.new(Speed)
2242
	PRTCL.VelocitySpread = Offset
2243
	PRTCL.Drag = Drag
2244
	PRTCL.Acceleration = Acel
2245
	if Enabled == false then
2246
		PRTCL:Emit(Emit)
2247
		Debris:AddItem(PRTCL,Lifetime2)
2248
	else
2249
		PRTCL.Enabled = true
2250
	end
2251
	return PRTCL
2252
end
2253
2254
local Handle = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.6,0.2),false)
2255
local RightArmGrasp = CreateWeldOrSnapOrMotor("Weld", Handle, RightArm, Handle, CF(0,-1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.21, 0))
2256
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
2257
MakeForm(Part,"Wedge")
2258
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.3, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0))
2259
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.3,0.2),false)
2260
MakeForm(Part,"Wedge")
2261
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(180)), CF(0, 0, 0))
2262
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.3,0.3),false)
2263
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2264
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.5,0.5),false)
2265
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2266
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.4,0.4,0.4),false)
2267
MakeForm(Part,"Cyl")
2268
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
2269
for i = 1, 8 do
2270
	local Piece = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0,0.35,0.41),false)
2271
	CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
2272
end
2273
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.38,0.41,0.38),false)
2274
MakeForm(Part,"Cyl")
2275
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
2276
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.37,0.5,0.37),false)
2277
MakeForm(Part,"Ball")
2278
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.3) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
2279
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.7,0.4),false)
2280
MakeForm(Part,"Wedge")
2281
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.7, 0.5) * ANGLES(RAD(90), RAD(180), RAD(180)), CF(0, 0, 0))
2282
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.4,0.2),false)
2283
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
2284
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.35,0.35,0.35),false)
2285
MakeForm(Part,"Cyl")
2286
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
2287
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.5),false)
2288
MakeForm(Part,"Cyl")
2289
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
2290
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.45),false)
2291
MakeForm(Part,"Cyl")
2292
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1.1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
2293
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
2294
MakeForm(Part,"Wedge")
2295
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0))
2296
local LASTPART = Handle
2297
for i = 1, 10 do
2298
	if LASTPART == Handle then
2299
		local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.2,0),false)
2300
		LASTPART = Part
2301
		CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.1, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
2302
	else
2303
		local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.05,0),false)
2304
		CreateWeldOrSnapOrMotor("Weld", Handle, LASTPART, Part, CF(0, 0.025, 0) * ANGLES(RAD(8), RAD(0), RAD(0)), CF(0, -0.025, 0))
2305
		LASTPART = Part
2306
	end
2307
end
2308
2309
local Barrel = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.15,2,0.15),false)
2310
MakeForm(Barrel,"Cyl")
2311
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Barrel, CF(0, -0.6, 1.8) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
2312
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.25,1,0.25),false)
2313
MakeForm(Part,"Cyl")
2314
CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, -0.6, 0), CF(0, 0, 0))
2315
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0.1,0.2),false)
2316
MakeForm(Part,"Wedge")
2317
CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, 0.945, 0.1) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
2318
local Hole = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.125,0,0.125),false)
2319
MakeForm(Hole,"Cyl")
2320
CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Hole, CF(0, 0.98, 0), CF(0, 0, 0))
2321
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0,0),false)
2322
local GEARWELD = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
2323
CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.8,0.8,1.5), VT(0,0,0.2))
2324
local Part = CreatePart(3, Weapon, "Metal", 0, 0.5, "Mid gray", "Eye", VT(0,0,0),false)
2325
local GEARWELD2 = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
2326
CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.9,0.9,0.3), VT(0,0,0.2))
2327
coroutine.resume(coroutine.create(function()
2328
	while wait() do
2329
		GEARWELD.C0 = GEARWELD.C0 * ANGLES(RAD(0), RAD(0), RAD(5))
2330
		GEARWELD2.C0 = GEARWELD2.C0 * ANGLES(RAD(0), RAD(0), RAD(-5))
2331
	end
2332
end))
2333
2334
ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.7, Size2 = 0, Lifetime1 = 0.7, Lifetime2 = 0.7, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
2335
--ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 10, Size2 = 0, Lifetime1 = 0.8, Lifetime2 = 0.9, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
2336
2337
for _, c in pairs(Weapon:GetDescendants()) do
2338
	if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
2339
		c.Material = "Glass"
2340
		c.Color = C3(0,0,0)
2341
	elseif c.ClassName == "Part" and c.Name == "Eye" then
2342
		c.Color = C3(1,0,0)
2343
		c.Material = "Neon"
2344
	end
2345
end
2346
2347
Weapon.Parent = Character
2348
for _, c in pairs(Weapon:GetChildren()) do
2349
	if c.ClassName == "Part" then
2350
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
2351
	end
2352
end
2353
2354
local SKILLTEXTCOLOR = C3(1,0,0)
2355
local SKILLFONT = "Antique"
2356
local SKILLTEXTSIZE = 7
2357
2358
Humanoid.Died:connect(function()
2359
	ATTACK = true
2360
end)
2361
2362
local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.1, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
2363
--[[local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.63, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
2364
local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.215, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
2365
local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.525, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
2366
local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
2367
]]
2368
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Banisher Bullet", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 1")
2369
--[[local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Ability 2", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 2")
2370
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 3")
2371
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 4")
2372
local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Mercy", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 5")
2373
]]
2374
function printbye(Name)
2375
	local MESSAGES = {"You cannot struggle, ","Your existance is an insult, ","Fade, ","Your existance is not desired, ","You are not permitted here, ","You are not to decide your fate, ","Be gone, ","You are already dead, ","Your live is an anomaly, ","Don't dare to return, ","Why are you resisting, ","You cannot exist here, ","Why are you struggling, ","Your fate was already decided, ","Goodbye, ","You cannot ignore my command, ","You cannot resist my command, ","You already died, "}
2376
	warn(MESSAGES[MRANDOM(1,#MESSAGES)]..Name..".")	
2377
end
2378
2379
workspace.ChildAdded:connect(function(instance)
2380
    for BANISH = 1, #TOBANISH do
2381
		if TOBANISH[BANISH] ~= nil then
2382
			if instance.Name == TOBANISH[BANISH] then
2383
				coroutine.resume(coroutine.create(function()
2384
					printbye(instance.Name)
2385
					instance:ClearAllChildren()
2386
					Debris:AddItem(instance,0.0005)
2387
				end))
2388
			end
2389
		end
2390
	end
2391
end)
2392
2393
function refit()
2394
	Character.Parent = workspace
2395
	for e = 1, #BODY do
2396
		if BODY[e] ~= nil then
2397
			local STUFF = BODY[e]
2398
			local PART = STUFF[1]
2399
			local PARENT = STUFF[2]
2400
			local MATERIAL = STUFF[3]
2401
			local COLOR = STUFF[4]
2402
			local TRANSPARENCY = STUFF[5]
2403
			if PART.ClassName == "Part" and PART ~= RootPart then
2404
				PART.Material = MATERIAL
2405
				PART.Color = COLOR
2406
				PART.Transparency = TRANSPARENCY
2407
			end
2408
			if PART.Parent ~= PARENT then
2409
				Humanoid:remove()
2410
				PART.Parent = PARENT
2411
				Humanoid = IT("Humanoid",Character)
2412
			end
2413
		end
2414
	end
2415
end
2416
--//=================================\\
2417
--||	     DAMAGE FUNCTIONS
2418
--\\=================================//
2419
function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
2420
	local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
2421
	STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
2422
	local BODYGYRO = IT("BodyGyro", STATPART)
2423
	local BODYPOSITION = IT("BodyPosition", STATPART)
2424
	BODYPOSITION.P = 2000
2425
	BODYPOSITION.D = 100
2426
	BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
2427
	BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
2428
	game:GetService("Debris"):AddItem(STATPART ,5)
2429
	local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
2430
	BILLBOARDGUI.Adornee = STATPART
2431
	BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
2432
	BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
2433
	BILLBOARDGUI.AlwaysOnTop = false
2434
	local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
2435
	TEXTLABEL.BackgroundTransparency = 1
2436
	TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
2437
	TEXTLABEL.Text = TEXT
2438
	TEXTLABEL.Font = "SciFi"
2439
	TEXTLABEL.FontSize="Size42"
2440
	TEXTLABEL.TextColor3 = ("255,215,0")
2441
	TEXTLABEL.TextStrokeTransparency = 1
2442
	TEXTLABEL.TextScaled = true
2443
	TEXTLABEL.TextWrapped = true
2444
	coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
2445
		if LABELTYPE == "Normal" then
2446
			for i = 1, 30 do
2447
				Swait()
2448
				STATPART.Position = STATPART.Position + VT(0, (15-i)/10 ,0)
2449
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
2450
			end
2451
		elseif LABELTYPE == "Debuff" then
2452
			for i = 1, 30 do
2453
				Swait()
2454
				STATPART.Position = STATPART.Position - VT(0, i/10 ,0)
2455
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
2456
			end
2457
		elseif LABELTYPE == "Shock" then
2458
			local ORIGIN = STATPART.Position
2459
			for i = 1, 30 do
2460
				Swait()
2461
				STATPART.Position = ORIGIN + VT(MRANDOM(-2,2),MRANDOM(-2,2),MRANDOM(-2,2))
2462
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
2463
			end
2464
		end
2465
		THEPART.Parent = nil
2466
	end),STATPART, BODYPOSITION, TEXTLABEL)
2467
end
2468
2469
function StatLabel(CFRAME, TEXT, COLOR)
2470
	local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
2471
	STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
2472
	local BODYGYRO = IT("BodyGyro", STATPART)
2473
	game:GetService("Debris"):AddItem(STATPART ,5)
2474
	local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
2475
	BILLBOARDGUI.Adornee = STATPART
2476
	BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
2477
	BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
2478
	BILLBOARDGUI.AlwaysOnTop = false
2479
	local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
2480
	TEXTLABEL.BackgroundTransparency = 1
2481
	TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
2482
	TEXTLABEL.Text = TEXT
2483
	TEXTLABEL.Font = SKILLFONT
2484
	TEXTLABEL.FontSize="Size42"
2485
	TEXTLABEL.TextColor3 = COLOR
2486
	TEXTLABEL.TextStrokeTransparency = 0
2487
	TEXTLABEL.TextScaled = true
2488
	TEXTLABEL.TextWrapped = true
2489
	coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
2490
		for i = 1, 50 do
2491
			Swait()
2492
			STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
2493
			TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
2494
			TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
2495
		end
2496
		THEPART.Parent = nil
2497
	end),STATPART, TEXTLABEL)
2498
end
2499
2500
function StatLabel(CFRAME, TEXT, COLOR)
2501
	local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
2502
	STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
2503
	local BODYGYRO = IT("BodyGyro", STATPART)
2504
	game:GetService("Debris"):AddItem(STATPART ,5)
2505
	local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
2506
	BILLBOARDGUI.Adornee = STATPART
2507
	BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
2508
	BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
2509
	BILLBOARDGUI.AlwaysOnTop = false
2510
	local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
2511
	TEXTLABEL.BackgroundTransparency = 1
2512
	TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
2513
	TEXTLABEL.Text = TEXT
2514
	TEXTLABEL.Font = SKILLFONT
2515
	TEXTLABEL.FontSize="Size42"
2516
	TEXTLABEL.TextColor3 = COLOR
2517
	TEXTLABEL.TextStrokeTransparency = 0
2518
	TEXTLABEL.TextScaled = true
2519
	TEXTLABEL.TextWrapped = true
2520
	coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
2521
		for i = 1, 50 do
2522
			Swait()
2523
			STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
2524
			TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
2525
			TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
2526
		end
2527
		THEPART.Parent = nil
2528
	end),STATPART, TEXTLABEL)
2529
end
2530
2531
function StatLabel(CFRAME, TEXT, COLOR)
2532
	local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
2533
	STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
2534
	local BODYGYRO = IT("BodyGyro", STATPART)
2535
	game:GetService("Debris"):AddItem(STATPART ,5)
2536
	local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
2537
	BILLBOARDGUI.Adornee = STATPART
2538
	BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
2539
	BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
2540
	BILLBOARDGUI.AlwaysOnTop = false
2541
	local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
2542
	TEXTLABEL.BackgroundTransparency = 1
2543
	TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
2544
	TEXTLABEL.Text = TEXT
2545
	TEXTLABEL.Font = SKILLFONT
2546
	TEXTLABEL.FontSize="Size42"
2547
	TEXTLABEL.TextColor3 = COLOR
2548
	TEXTLABEL.TextStrokeTransparency = 1
2549
	TEXTLABEL.TextScaled = true
2550
	TEXTLABEL.TextWrapped = true
2551
	coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
2552
		for i = 1, 50 do
2553
			Swait()
2554
			STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
2555
			TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
2556
		end
2557
		THEPART.Parent = nil
2558
	end),STATPART, TEXTLABEL)
2559
end
2560
--//=================================\\
2561
--||			DAMAGING
2562
--\\=================================//
2563
function killnearest(position,range,maxstrength,direction)
2564
	for i,v in ipairs(workspace:GetChildren()) do
2565
	local body = v:GetChildren()
2566
		for part = 1, #body do
2567
			if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
2568
				if(body[part].Position - position).Magnitude < range then
2569
					if v.ClassName == "Model" then
2570
						--v:BreakJoints()
2571
					end
2572
					local POS = position
2573
					coroutine.resume(coroutine.create(function()
2574
						body[part].Anchored = true
2575
						body[part].Parent = Effects
2576
						body[part].CanCollide = true
2577
						local SIZE = body[part].Size
2578
						body[part].Material = "Neon"
2579
						CreateSound("952306739", body[part], 2, MRANDOM(7, 12) / 10)
2580
						for i = 1, 75 do
2581
							Swait()
2582
							body[part].Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100)
2583
							body[part].Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2))
2584
						end
2585
						coroutine.resume(coroutine.create(function()
2586
							while true do
2587
								Swait()
2588
								body[part].Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100)
2589
								body[part].Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2))
2590
							end
2591
						end))
2592
						body[part].Anchored = false
2593
						body[part].Velocity = direction.lookVector*maxstrength
2594
					end))
2595
				end
2596
			end
2597
		end
2598
		if v.ClassName == "Part" then
2599
			if v.Anchored == false and (v.Position - position).Magnitude < range then
2600
				local POS = position
2601
				coroutine.resume(coroutine.create(function()
2602
					v.Anchored = true
2603
					v.Parent = Effects
2604
					local SIZE = v.Size
2605
					v.Material = "Neon"
2606
					CreateSound("952306739", v, 2, MRANDOM(7, 12) / 10)
2607
					for i = 1, 75 do
2608
						Swait()
2609
						v.Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100)
2610
						v.Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2))
2611
					end
2612
					coroutine.resume(coroutine.create(function()
2613
						while true do
2614
							Swait()
2615
							v.Color = C3(MRANDOM(0,100)/100,MRANDOM(0,100)/100,MRANDOM(0,100)/100)
2616
							v.Size = VT(SIZE.X+MRANDOM(-2,2),SIZE.Y+MRANDOM(-2,2),SIZE.Z+MRANDOM(-2,2))
2617
						end
2618
					end))
2619
					v.Anchored = false
2620
					v.Velocity = direction.lookVector*maxstrength
2621
				end))
2622
			end
2623
		end
2624
	end
2625
end
2626
2627
function Kill(Char)
2628
	local NewCharacter = IT("Model",Effects)
2629
	NewCharacter.Name = "Ow im ded ;-;"
2630
	for _, c in pairs(Char:GetDescendants()) do
2631
		if c:IsA("BasePart") and c.Transparency == 0 then
2632
			if c.Parent == Char then
2633
				getbloody(c,5)
2634
			end
2635
			c:BreakJoints()
2636
			c.Material = "Glass"
2637
			c.Color = C3(0.5,0,0)
2638
			c.CanCollide = true
2639
			c.Transparency = 0.3
2640
			if c:FindFirstChildOfClass("SpecialMesh") then
2641
				c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
2642
			end
2643
			if c.Name == "Head" then
2644
				c:ClearAllChildren()
2645
				c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y)
2646
			end
2647
			if c.ClassName == "MeshPart" then
2648
				c.TextureID = ""
2649
			end
2650
			if c:FindFirstChildOfClass("BodyPosition") then
2651
				c:FindFirstChildOfClass("BodyPosition"):remove()
2652
			end
2653
			if c:FindFirstChildOfClass("ParticleEmitter") then
2654
				c:FindFirstChildOfClass("ParticleEmitter"):remove()
2655
			end
2656
			c.Parent = NewCharacter
2657
			c.Name = "DeadPart"
2658
			c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15
2659
			c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45))
2660
		end
2661
	end
2662
	Char:remove()
2663
	Debris:AddItem(NewCharacter,5)
2664
end
2665
2666
function ApplyAoE(POSITION,RANGE,BRUTAL)
2667
	local CHILDREN = workspace:GetDescendants()
2668
	for index, CHILD in pairs(CHILDREN) do
2669
		if CHILD.ClassName == "Model" and CHILD ~= Character then
2670
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
2671
			if HUM then
2672
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
2673
				if TORSO then
2674
					if (TORSO.Position - POSITION).Magnitude <= RANGE then
2675
						if BRUTAL == true then
2676
							Kill(CHILD)
2677
						else
2678
							CHILD:BreakJoints()
2679
						end
2680
					end
2681
				end
2682
			end
2683
		end
2684
	end
2685
end
2686
2687
function Kill(Char)
2688
	local NewCharacter = IT("Model",Effects)
2689
	NewCharacter.Name = "Ow im ded ;-;"
2690
	for _, c in pairs(Char:GetDescendants()) do
2691
		if c:IsA("BasePart") and c.Transparency == 0 then
2692
			if c.Parent == Char then
2693
				getbloody(c,5)
2694
			end
2695
			c:BreakJoints()
2696
			c.Material = "Glass"
2697
			c.Color = C3(0.5,0,0)
2698
			c.CanCollide = true
2699
			c.Transparency = 0.3
2700
			if c:FindFirstChildOfClass("SpecialMesh") then
2701
				c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
2702
			end
2703
			if c.Name == "Head" then
2704
				c:ClearAllChildren()
2705
				c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y)
2706
			end
2707
			if c.ClassName == "MeshPart" then
2708
				c.TextureID = ""
2709
			end
2710
			if c:FindFirstChildOfClass("BodyPosition") then
2711
				c:FindFirstChildOfClass("BodyPosition"):remove()
2712
			end
2713
			if c:FindFirstChildOfClass("ParticleEmitter") then
2714
				c:FindFirstChildOfClass("ParticleEmitter"):remove()
2715
			end
2716
			c.Parent = NewCharacter
2717
			c.Name = "DeadPart"
2718
			c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15
2719
			c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45))
2720
		end
2721
	end
2722
	Char:remove()
2723
	Debris:AddItem(NewCharacter,5)
2724
end
2725
2726
function ApplyAoE(POSITION,RANGE,BRUTAL)
2727
	local CHILDREN = workspace:GetDescendants()
2728
	for index, CHILD in pairs(CHILDREN) do
2729
		if CHILD.ClassName == "Model" and CHILD ~= Character then
2730
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
2731
			if HUM then
2732
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
2733
				if TORSO then
2734
					if (TORSO.Position - POSITION).Magnitude <= RANGE then
2735
						if BRUTAL == true then
2736
							Kill(CHILD)
2737
						else
2738
							CHILD:BreakJoints()
2739
						end
2740
					end
2741
				end
2742
			end
2743
		end
2744
	end
2745
end
2746
2747
function Kill(Char)
2748
	local NewCharacter = IT("Model",Effects)
2749
	NewCharacter.Name = "Ow im ded ;-;"
2750
	for _, c in pairs(Char:GetDescendants()) do
2751
		if c:IsA("BasePart") and c.Transparency == 0 then
2752
			if c.Parent == Char then
2753
				getbloody(c,5)
2754
			end
2755
			c:BreakJoints()
2756
			c.Material = "Glass"
2757
			c.Color = C3(0.5,0,0)
2758
			c.CanCollide = true
2759
			c.Transparency = 0.3
2760
			if c:FindFirstChildOfClass("SpecialMesh") then
2761
				c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
2762
			end
2763
			if c.Name == "Head" then
2764
				c:ClearAllChildren()
2765
				c.Size = VT(c.Size.Y,c.Size.Y,c.Size.Y)
2766
			end
2767
			if c.ClassName == "MeshPart" then
2768
				c.TextureID = ""
2769
			end
2770
			if c:FindFirstChildOfClass("BodyPosition") then
2771
				c:FindFirstChildOfClass("BodyPosition"):remove()
2772
			end
2773
			if c:FindFirstChildOfClass("ParticleEmitter") then
2774
				c:FindFirstChildOfClass("ParticleEmitter"):remove()
2775
			end
2776
			c.Parent = NewCharacter
2777
			c.Name = "DeadPart"
2778
			c.Velocity = VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45))/15
2779
			c.RotVelocity = VT(MRANDOM(-45,45),MRANDOM(-15,85),MRANDOM(-45,45))
2780
		end
2781
	end
2782
	Char:remove()
2783
	Debris:AddItem(NewCharacter,5)
2784
end
2785
2786
function ApplyAoE(POSITION,RANGE,BRUTAL)
2787
	local CHILDREN = workspace:GetDescendants()
2788
	for index, CHILD in pairs(CHILDREN) do
2789
		if CHILD.ClassName == "Model" and CHILD ~= Character then
2790
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
2791
			if HUM then
2792
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
2793
				if TORSO then
2794
					if (TORSO.Position - POSITION).Magnitude <= RANGE then
2795
						if BRUTAL == true then
2796
							Kill(CHILD)
2797
						else
2798
							CHILD:BreakJoints()
2799
						end
2800
					end
2801
				end
2802
			end
2803
		end
2804
	end
2805
end
2806
2807
function BulletDetection(FROM,TO,BRUTAL)
2808
	local AIMHIT,AIMPOS,NORMAL = CastProperRay(FROM,TO,2000,Character)
2809
	coroutine.resume(coroutine.create(function()
2810
		if AIMHIT ~= nil then
2811
			if AIMHIT.Parent ~= Character then
2812
				if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") or AIMHIT.Parent.Parent:FindFirstChildOfClass("Humanoid") then
2813
					if AIMHIT.Parent:FindFirstChildOfClass("Humanoid") then
2814
						if BRUTAL == true then
2815
							Kill(AIMHIT.Parent)
2816
						else
2817
							getbloody(AIMHIT,15)
2818
							AIMHIT.Parent:BreakJoints()
2819
							if AIMHIT.Name == "Head" then
2820
								AIMHIT.Name = "HEADSHOT"
2821
								AIMHIT:remove()
2822
							end
2823
						end
2824
					else
2825
						if BRUTAL == true then
2826
							Kill(AIMHIT.Parent.Parent)
2827
						else
2828
							AIMHIT.Parent.Parent:BreakJoints()
2829
						end
2830
					end
2831
				end
2832
			end
2833
		end
2834
	end))
2835
	SpawnTrail(FROM,AIMPOS)
2836
	return AIMHIT,AIMPOS,NORMAL
2837
end
2838
2839
function ApplyDamage(Humanoid,Damage,CritRate,CritMultiplier,DoesOneShot)
2840
	coroutine.resume(coroutine.create(function()
2841
		local defence = Instance.new("BoolValue",Humanoid.Parent)
2842
		defence.Name = ("HitBy"..Player.Name)
2843
		game:GetService("Debris"):AddItem(defence, 0.001)
2844
		Damage = Damage * DAMAGEMULTIPLIER
2845
		if Humanoid.Health ~= 0 then
2846
			local CritChance = MRANDOM(1,100)
2847
			if CritChance < CritRate + 1 then
2848
				Damage = Damage*CritMultiplier
2849
			end
2850
			if Damage > Humanoid.Health then
2851
				Damage = math.ceil(Humanoid.Health)
2852
				if Damage == 0 then
2853
					Damage = 0.1
2854
				end
2855
			end
2856
			if DoesOneShot == false then
2857
				for _, c in pairs(Humanoid.Parent:GetChildren()) do
2858
					if c.Name ~= "HumanoidRootPart" and c.Name ~= "Torso" and c.Name ~= "Head" and c.Name ~= "UpperTorso" and c.Name ~= "LowerTorso" then
2859
						if c.ClassName == "Part" or c.ClassName == "MeshPart" then
2860
							if MRANDOM(1,20) == 1 then
2861
								Shatter(c)
2862
							end
2863
						end
2864
					end
2865
				end
2866
				Humanoid.Health = Humanoid.Health - Damage
2867
				if Humanoid.Parent:FindFirstChild("Head") then
2868
					CreateSound(HITPLAYERSOUNDS[MRANDOM(1,#HITPLAYERSOUNDS)], Humanoid.Parent.Head, 5, 1)
2869
					if CritChance < CritRate + 1 then
2870
						StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "CRIT//"..Damage, C3(1, 0, 0))
2871
					else
2872
						StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), Damage, C3(0, 0, 0))
2873
					end
2874
				end
2875
			elseif DoesOneShot == true then
2876
				--print("["..Humanoid.Parent.Name.."]: One shot!? Really!?!?")
2877
				Humanoid.Parent:BreakJoints()
2878
				if Humanoid.Parent:FindFirstChild("Head") then
2879
					StatLabel(Humanoid.Parent.Head.CFrame * CF(0, 0 + (Humanoid.Parent.Head.Size.z - 1), 0), "INF", C3(1, 0, 0))
2880
				end
2881
				for _, c in pairs(Humanoid.Parent:GetChildren()) do
2882
					if c.ClassName == "Part" or c.ClassName == "MeshPart" then
2883
						Shatter(c)
2884
					end
2885
				end
2886
			end
2887
			if Humanoid.Health == 0 then
2888
				--print("["..Humanoid.Parent.Name.."]: It's like stepping on glass, but worse!")
2889
				SpawnSoul(Humanoid)
2890
				for _, c in pairs(Humanoid.Parent:GetChildren()) do
2891
					if c.ClassName == "Part" or c.ClassName == "MeshPart" then
2892
						Shatter(c)
2893
					end
2894
				end
2895
			end
2896
		end
2897
	end))
2898
end
2899
2900
function AoEDamage(position,radius,min,max,maxstrength,critrate,critmultiplier,BESERK)
2901
	local dmg = math.random(10000,100000)
2902
	for i,v in ipairs(workspace:GetChildren()) do
2903
	if v:FindFirstChild("HitBy"..Player.Name) == nil then
2904
		local body = v:GetChildren()
2905
			for part = 1, #body do
2906
				if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
2907
					if(body[part].Position - position).Magnitude < radius then
2908
						if v.ClassName == "Model" then
2909
							if v:FindFirstChildOfClass("Humanoid") then
2910
								ApplyDamage(v:FindFirstChildOfClass("Humanoid"),dmg,critrate,critmultiplier,BESERK)
2911
								local bv = Instance.new("BodyVelocity") 
2912
								bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
2913
								bv.velocity = CF(position,body[part].Position).lookVector*maxstrength
2914
								bv.Parent = body[part]
2915
								Debris:AddItem(bv,0.2)
2916
							end
2917
						end
2918
					end
2919
				end
2920
			end
2921
		end
2922
		if v:FindFirstChild("HitBy"..Player.Name) then
2923
			v:FindFirstChild("HitBy"..Player.Name):remove()
2924
		end
2925
	end
2926
end
2927
2928
function Banish(Foe)
2929
	if Foe then
2930
		coroutine.resume(coroutine.create(function()
2931
			--if game.Players:FindFirstChild(Foe.Name) then
2932
				table.insert(TOBANISH,Foe.Name)
2933
				printbye(Foe.Name)
2934
			--end
2935
			Foe.Archivable = true
2936
			local CLONE = Foe:Clone()
2937
			Foe:Destroy()
2938
			CLONE.Parent = Effects
2939
			CLONE:BreakJoints()
2940
			local MATERIALS = {"Glass","Neon"}
2941
			for _, c in pairs(CLONE:GetDescendants()) do
2942
				if c:IsA("BasePart") then
2943
					if c.Name == "Torso" or c.Name == "UpperTorso" or c == CLONE.PrimaryPart then
2944
 						CreateSound(340722848, c, 10, 1, false)
2945
					end
2946
					c.Anchored = true
2947
					c.Transparency = c.Transparency + 0.2
2948
					c.Material = MATERIALS[MRANDOM(1,2)]
2949
					c.Color = C3(1,0,0)
2950
					if c.ClassName == "MeshPart" then
2951
						c.TextureID = ""
2952
					end
2953
					if c:FindFirstChildOfClass("SpecialMesh") then
2954
						c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
2955
					end
2956
					if c:FindFirstChildOfClass("Decal") then
2957
						c:FindFirstChildOfClass("Decal"):remove()
2958
					end
2959
					c.Name = "Banished"
2960
					c.CanCollide = false
2961
				else
2962
					c:remove()
2963
				end
2964
			end
2965
			local A = false
2966
			for i = 1, 35 do
2967
				if A == false then
2968
					A = true
2969
				elseif A == true then
2970
					A = false
2971
				end
2972
				for _, c in pairs(CLONE:GetDescendants()) do
2973
					if c:IsA("BasePart") then
2974
						c.Anchored = true
2975
						c.Material = MATERIALS[MRANDOM(1,2)]
2976
						c.Transparency = c.Transparency + 0.8/35
2977
						if A == false then
2978
							c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
2979
						elseif A == true then
2980
							c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)						
2981
						end
2982
					end
2983
				end
2984
				Swait()
2985
			end
2986
			CLONE:remove()
2987
		end))
2988
	end
2989
end
2990
2991
function ApplyAoE(POSITION,RANGE,ISBANISH)
2992
	local CHILDREN = workspace:GetDescendants()
2993
	for index, CHILD in pairs(CHILDREN) do
2994
		if CHILD.ClassName == "Model" and CHILD ~= Character then
2995
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
2996
			if HUM then
2997
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
2998
				if TORSO then
2999
					if (TORSO.Position - POSITION).Magnitude <= RANGE then
3000
						if ISBANISH == true then
3001
							Banish(CHILD)
3002
						else
3003
							if ISBANISH == "Gravity" then
3004
								HUM.PlatformStand = true
3005
								if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
3006
									local grav = Instance.new("BodyPosition",TORSO)
3007
									grav.D = 15
3008
									grav.P = 20000
3009
									grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
3010
									grav.position = TORSO.Position
3011
									grav.Name = "V3BanishForce"..Player.Name
3012
								else
3013
									TORSO:FindFirstChild("V3BanishForce"..Player.Name).position = TORSO.Position+VT(0,0.3,0)
3014
									TORSO.RotVelocity = VT(MRANDOM(-25,25),MRANDOM(-25,25),MRANDOM(-25,25))
3015
								end
3016
							else
3017
								HUM.PlatformStand = false
3018
							end
3019
						end
3020
					elseif ISBANISH == "Gravity" then
3021
						if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
3022
							TORSO:FindFirstChild("V3BanishForce"..Player.Name):remove()
3023
							HUM.PlatformStand = false
3024
						end
3025
					end
3026
				end
3027
			end
3028
		end
3029
	end
3030
end
3031
3032
--//=================================\\
3033
--||	ATTACK FUNCTIONS AND STUFF
3034
--\\=================================//
3035
function FireArc(Part,ToLocation,AmountOfTime,Height,DoesCourontine)
3036
    if DoesCourontine == false then
3037
        local Direction = CF(Part.Position,ToLocation)
3038
        local Distance = (Part.Position - ToLocation).magnitude
3039
        for i = 1, AmountOfTime do
3040
            Swait()
3041
            Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime)
3042
            Direction = Part.CFrame
3043
        end
3044
        Part:remove()
3045
    elseif DoesCourontine == true then
3046
        coroutine.resume(coroutine.create(function()
3047
            local Direction = CF(Part.Position,ToLocation)
3048
            local Distance = (Part.Position - ToLocation).magnitude
3049
            for i = 1, AmountOfTime do
3050
                Swait()
3051
                Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime)
3052
                Direction = Part.CFrame
3053
            end
3054
            Part:remove()
3055
        end))
3056
    end
3057
end
3058
3059
function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
3060
    local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
3061
    local mesh = nil
3062
    if KIND == "Base" then
3063
        mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
3064
    elseif KIND == "Thin" then
3065
        mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
3066
    elseif KIND == "Round" then
3067
        mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
3068
    end
3069
    wave.CFrame = CFRAME
3070
    coroutine.resume(coroutine.create(function(PART)
3071
        for i = 1, WAIT do
3072
            Swait()
3073
            mesh.Scale = mesh.Scale + GROW/10
3074
            wave.Transparency = wave.Transparency + (0.5/WAIT)
3075
            if wave.Transparency > 0.99 then
3076
                wave:remove()
3077
            end
3078
        end
3079
    end))
3080
end
3081
3082
function killnearest(position,range,maxstrength)
3083
    for i,v in ipairs(workspace:GetChildren()) do
3084
    local body = v:GetChildren()
3085
        for part = 1, #body do
3086
            if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
3087
                if(body[part].Position - position).Magnitude < range then
3088
                    if v.ClassName == "Model" then
3089
                        v:BreakJoints()
3090
                    end
3091
                    --table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2})
3092
                    local bv = Instance.new("BodyVelocity")
3093
                    bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
3094
                    bv.velocity = CF(position,body[part].Position).lookVector*maxstrength
3095
                    bv.Parent = body[part]
3096
                    Debris:AddItem(bv,0.2)
3097
                end
3098
            end
3099
        end
3100
        if v.ClassName == "Part" then
3101
            if v.Anchored == false and (v.Position - position).Magnitude < range then
3102
                --table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2})
3103
                v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
3104
            end
3105
        end
3106
    end
3107
end
3108
3109
function Supernova()
3110
    local HITFLOOR,HITPOS,NORMAL = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 7 * Player_Size, Character)
3111
    if HITFLOOR ~= nil then
3112
        local HITBODIES = {}
3113
        ATTACK = true
3114
        Rooted = true
3115
        local ABSOLUTE = CreatePart(3, Effects, "Neon", 0, 1, "Relly red", "Star", VT(0,0,0))
3116
        MakeForm(ABSOLUTE,"Ball")
3117
        CreateSound("429459101", ABSOLUTE, 10, 1)
3118
        for i=0, 4, 0.1 / Animation_Speed do
3119
            Swait()
3120
            ABSOLUTE.Size = ABSOLUTE.Size + VT(0.2,0.2,0.2)
3121
            ABSOLUTE.CFrame = RootPart.CFrame*CF(0,5+(ABSOLUTE.Size.Y/2),0)
3122
            ABSOLUTE.Transparency = ABSOLUTE.Transparency - 0.01
3123
            local CHARGE = CreatePart(3, Effects, "Neon", 0, 0, "Really red", "Star", VT(1,1,1))
3124
            MakeForm(CHARGE,"Ball")
3125
            CHARGE.Color = C3(1,0,0)
3126
            CHARGE.CFrame = CF(RootPart.Position) * CF(MRANDOM(-15,15),-6,MRANDOM(-15,15))
3127
            FireArc(CHARGE,ABSOLUTE.Position,45,45,true)
3128
            RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(15 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
3129
            Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(25), RAD(-15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
3130
            RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 1.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(170), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(-12 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
3131
            LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
3132
            RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
3133
            LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
3134
        end
3135
        CreateSound("907330103", Head, 10, 1.2)
3136
        for i = 1, 75 do
3137
            Swait()
3138
            RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(4 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(15 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
3139
            Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(25), RAD(-15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
3140
            RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 1.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(170), RAD(0 - 7.5 * SIN(SINE / 12)), RAD(-12 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
3141
            LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.25 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(0 + 7.5 * SIN(SINE / 12)), RAD(-12 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
3142
            RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
3143
            LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-7.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
3144
        end
3145
        coroutine.resume(coroutine.create(function()
3146
            for i = 1, 13 do
3147
                for e = 1, 8 do
3148
                    Swait()
3149
                    MagicSphere(VT(1,1,1),15,CF(ABSOLUTE.Position)*CF(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45)),C3(255,0,0),VT(0,0,0))
3150
                    CreateSwirl(ABSOLUTE.Size/2,15,CF(HITPOS),true,15,BRICKC"Reakky red".Color,VT(i,0.3,i)*2)
3151
                end
3152
                for i = 1, 5 do
3153
                    Slice("Round",0,35,CF(ABSOLUTE.Position)*ANGLES(RAD(MRANDOM(-18,18)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-18,18))),C3(1,1,1),VT(i,0,i)/3)
3154
                    Slice("Thin",i,55,ABSOLUTE.CFrame * CF(0,-1.1,0) * ANGLES(RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180)),RAD(MRANDOM(-180,180))),C3(255,0,0),VT(0,0,0))
3155
                end
3156
                CreateSwirl(ABSOLUTE.Size/2,25,CF(ABSOLUTE.Position),true,-25,BRICKC"Relly red".Color,VT(i,i*2,i))
3157
                CreateSwirl(ABSOLUTE.Size/2,55,CF(ABSOLUTE.Position),true,25,C3(255,0,0),VT(i,i*2,i))
3158
                CreateSound("168586621", ABSOLUTE, 4, 0.8)
3159
                CreateSound("201858144", ABSOLUTE, 10, 0.8)
3160
                killnearest(ABSOLUTE.Position,i*18,i)
3161
                ABSOLUTE.Size = ABSOLUTE.Size*0.9
3162
                MagicSphere(ABSOLUTE.Size,25,CF(ABSOLUTE.Position),BRICKC"Relly red".Color,VT(i,i,i)/1.1)
3163
                MagicSphere(ABSOLUTE.Size,45,CF(ABSOLUTE.Position),C3(255,0,0),VT(i,i,i))
3164
            end
3165
            ABSOLUTE.Transparency = 1
3166
            Debris:AddItem(ABSOLUTE,10)
3167
        end))
3168
        ATTACK = false
3169
        Rooted = false
3170
    end
3171
end
3172
3173
function DeathAgreement()
3174
	ATTACK = true
3175
	Rooted = false
3176
	local SPEED = Speed
3177
	Speed = 8
3178
	CreateSound("357202141", RightArm, 10, 1.1)
3179
	for i=0, 0, 0.01 / Animation_Speed do
3180
		Swait()
3181
		turnto(Mouse.Hit.p)
3182
		MagicSphere(VT(1,1,1),15,RightArm.CFrame * CF(MRANDOM(-3,3),MRANDOM(-3,3),MRANDOM(-3,3)),"Deep orange",VT(-1/15,-1/15,-1/15))
3183
		MagicSphere(VT(2,2,2),15,RightArm.CFrame * CF(MRANDOM(-3,3),MRANDOM(-3,3),MRANDOM(-3,3)),"Deep orange",VT(-2/15,-2/15,-2/15))
3184
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-85)), 0.15 / Animation_Speed)
3185
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(85)), 0.2 / Animation_Speed)
3186
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90+(MRANDOM(-45,45)/10)), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 3 / Animation_Speed)
3187
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-85)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
3188
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
3189
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
3190
	end
3191
	for i=0, 0, 0.01 / Animation_Speed do
3192
		Swait()
3193
		turnto(Mouse.Hit.p)
3194
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(65)), 1 / Animation_Speed)
3195
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(25), RAD(0), RAD(35)), 1 / Animation_Speed)
3196
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(65)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
3197
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed)
3198
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
3199
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
3200
	end
3201
	local PART = CreatePart(3, Effects, "Neon", 0, 0.8, "Deep orange", "Punch", VT(50,50,50),false)
3202
	PART.CFrame = RootPart.CFrame * CF(0,0,-25)
3203
	PART.Shape = "Ball"
3204
	local bv = Instance.new("BodyVelocity") 
3205
	bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
3206
	bv.velocity = RootPart.CFrame.lookVector*600
3207
	bv.Parent = PART
3208
	bv.Name = "PROJECTILEVELOCITY"
3209
	CreateWave(VT(1,5,1),55,RootPart.CFrame * CF(0,0,-6)*ANGLES(RAD(-90),RAD(0),RAD(0)),true,1,"Lime green",VT(3,0.2,3))
3210
	CreateSwirl(VT(3,5,3),75,RootPart.CFrame * CF(0,0,-15)*ANGLES(RAD(-90),RAD(0),RAD(0)),true,1,"Lime green",VT(2.2,0.6,2.2))
3211
	CreateSound("414517163", Effects, 10, MRANDOM(7, 12) / 10)
3212
	coroutine.resume(coroutine.create(function()
3213
		for i = 1, 3 do
3214
			Swait()
3215
			PART.Transparency = PART.Transparency + 0.2/10
3216
			PART.Size = PART.Size + VT(5,5,5)
3217
			killnearest(PART.Position,PART.Size.Y/2+15,100,RootPart.CFrame)
3218
		end
3219
		PART:Destroy()
3220
	end))
3221
	for i=0, 0, 0.01 / Animation_Speed do
3222
		Swait()
3223
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(15), RAD(0), RAD(95)), 2 / Animation_Speed)
3224
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(25), RAD(0), RAD(35)), 3 / Animation_Speed)
3225
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 3 / Animation_Speed)
3226
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-70), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 3 / Animation_Speed)
3227
		RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 3 / Animation_Speed)
3228
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 3 / Animation_Speed)
3229
	end
3230
	Speed = SPEED
3231
	ATTACK = false
3232
	Rooted = false
3233
end
3234
3235
function Morning_Star()
3236
	ATTACK = true
3237
	Rooted = true
3238
	CreateSound(LAUGHS[MRANDOM(1,#LAUGHS)], Torso, 7, 1, false)
3239
	for i=0, 1, 0.1 / Animation_Speed do
3240
		Swait()
3241
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0  + 0.25 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
3242
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
3243
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.5) * ANGLES(RAD(0), RAD(0), RAD(-85)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
3244
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.15, -0.5) * ANGLES(RAD(-15), RAD(0), RAD(85)) * LEFTSHOULDERC0, 1 / Animation_Speed)
3245
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
3246
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
3247
	end	
3248
	coroutine.resume(coroutine.create(function()
3249
		local POS = Mouse.Hit.p
3250
		local RAY = CreatePart(3, Effects, "Neon", 0, 0, "Really red", "Strike", VT(0,2000,0))
3251
		MakeForm(RAY,"Cyl")
3252
		local SPHERE = CreatePart(3, Effects, "Neon", 0, 0, "Really red", "Strike", VT(0,0,0))
3253
		MakeForm(SPHERE,"Ball")
3254
		local SHIELD = CreatePart(3, Effects, "Neon", 0, 0.5, "Really black", "Strike", VT(0,0,0))
3255
		MakeForm(SHIELD,"Ball")
3256
		SHIELD.CFrame = CF(POS)
3257
		RAY.CFrame = CF(POS)
3258
		SPHERE.CFrame = CF(POS)
3259
		CreateSound(440145570, SPHERE, 10, 0.8, false)
3260
		CreateSound(415700134, SPHERE, 10, 0.8, false)
3261
		for i = 1, 200 do
3262
			Swait()
3263
			WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(0,0,0), Size2 = VT(SPHERE.Size.X*1.2,5+(i),SPHERE.Size.X*1.2), Transparency = 0, Transparency2 = 1, CFrame = SPHERE.CFrame*ANGLES(RAD(0), RAD(i), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = i, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
3264
			RAY.Size = RAY.Size + VT(0.05,0,0.05)
3265
			SPHERE.Size = SPHERE.Size + VT(2,2,2)
3266
			SHIELD.Size = SPHERE.Size + VT(3,3,3)
3267
			ApplyAoE(SPHERE.Position,SPHERE.Size.X/2,true)
3268
		end	
3269
		for i = 1, 45 do
3270
			Swait()
3271
			RAY.Transparency = RAY.Transparency + 1/45
3272
			SPHERE.Transparency = RAY.Transparency 
3273
			SHIELD.Transparency = SPHERE.Transparency + 1/45
3274
		end
3275
		RAY:remove()
3276
		SHIELD:remove()
3277
		SPHERE:remove()
3278
	end))
3279
	for i=0, 1, 0.1 / Animation_Speed do
3280
		Swait()
3281
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0  + 0.25 * COS(SINE / 12)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
3282
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
3283
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.15) * ANGLES(RAD(65), RAD(-45), RAD(85)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
3284
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.15) * ANGLES(RAD(65), RAD(45), RAD(-85)) * LEFTSHOULDERC0, 1 / Animation_Speed)
3285
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-35-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
3286
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(-35-2.5 * SIN(SINE / 12)), RAD(-90), RAD(0)) * ANGLES(RAD(-8 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
3287
	end
3288
	ATTACK = false
3289
	Rooted = false
3290
end
3291
3292
function Shot()
3293
	ATTACK = true
3294
	Rooted = false
3295
	for i=0, 0.05, 0.1 / Animation_Speed do
3296
		Swait()
3297
		turnto(Mouse.Hit.p)
3298
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
3299
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
3300
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
3301
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
3302
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
3303
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
3304
	end
3305
	repeat
3306
		for i=0, 0.05, 0.1 / Animation_Speed do
3307
			Swait()
3308
			turnto(Mouse.Hit.p)
3309
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
3310
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
3311
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
3312
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
3313
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
3314
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
3315
		end
3316
		local HIT,POS = CastProperRay(Hole.Position, Mouse.Hit.p, 1000, Character)
3317
		SpawnTrail(Hole.Position,POS)
3318
		if HIT ~= nil then
3319
			if HIT.Parent ~= workspace and HIT.Parent.ClassName ~= "Folder" then
3320
				Banish(HIT.Parent)
3321
			end
3322
		end
3323
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,7.5,6), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = Hole.CFrame*CF(0,0.5,0).p, RotationX = 0, RotationY = -15, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
3324
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,6.5,6), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = 904440937, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
3325
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,6.5,6), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = -5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
3326
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(1,0,1), Size2 = VT(6,6.5,6), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
3327
		for i=0, 0.05, 0.1 / Animation_Speed do
3328
			Swait()
3329
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
3330
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.25 / Animation_Speed)
3331
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(15), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
3332
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
3333
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
3334
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
3335
		end
3336
	until KEYHOLD == false
3337
	ATTACK = false
3338
	Rooted = false
3339
end
3340
3341
function AttackTemplate()
3342
	ATTACK = true
3343
	Rooted = false
3344
	for i=0, 1, 0.1 / Animation_Speed do
3345
		Swait()
3346
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
3347
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
3348
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
3349
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
3350
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
3351
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
3352
	end
3353
	ATTACK = false
3354
	Rooted = false
3355
end
3356
3357
--//=================================\\
3358
--||	  ASSIGN THINGS TO KEYS
3359
--\\=================================//
3360
3361
function MouseDown(Mouse)
3362
	if ATTACK == false then
3363
	end
3364
end
3365
3366
function MouseUp(Mouse)
3367
HOLD = false
3368
end
3369
3370
function KeyDown(Key)
3371
	KEYHOLD = true
3372
	if Key == "z" and ATTACK == false then
3373
		Shot()
3374
	end
3375
3376
	if Key == "q" and ATTACK == false then
3377
		Morning_Star()
3378
	end
3379
3380
	if Key == "f" and ATTACK == false then
3381
		Supernova()
3382
	end
3383
3384
	if Key == "e" and ATTACK == false then
3385
		DeathAgreement()
3386
	end
3387
3388
	if Key == "b" and ATTACK == false then
3389
	end
3390
3391
	if Key == "c" and ATTACK == false then
3392
	end
3393
3394
	if Key == "q" and ATTACK == false then
3395
	end
3396
3397
	if Key == "x" and ATTACK == false then
3398
	end
3399
end
3400
3401
function KeyUp(Key)
3402
	KEYHOLD = false
3403
end
3404
3405
	Mouse.Button1Down:connect(function(NEWKEY)
3406
		MouseDown(NEWKEY)
3407
	end)
3408
	Mouse.Button1Up:connect(function(NEWKEY)
3409
		MouseUp(NEWKEY)
3410
	end)
3411
	Mouse.KeyDown:connect(function(NEWKEY)
3412
		KeyDown(NEWKEY)
3413
	end)
3414
	Mouse.KeyUp:connect(function(NEWKEY)
3415
		KeyUp(NEWKEY)
3416
	end)
3417
3418
--//=================================\\
3419
--\\=================================//
3420
3421
3422
function unanchor()
3423
	if UNANCHOR == true then
3424
		g = Character:GetChildren()
3425
		for i = 1, #g do
3426
			if g[i].ClassName == "Part" then
3427
				g[i].Anchored = false
3428
			end
3429
		end
3430
	end
3431
end
3432
3433
3434
--//=================================\\
3435
--||	WRAP THE WHOLE SCRIPT UP
3436
--\\=================================//
3437
3438
Humanoid.Changed:connect(function(Jump)
3439
	if Jump == "Jump" and (Disable_Jump == true) then
3440
		Humanoid.Jump = false
3441
	end
3442
end)
3443
3444
local CONNECT = nil
3445
3446
while true do
3447
	Swait()
3448
	ANIMATE.Parent = nil
3449
	if Character:FindFirstChildOfClass("Humanoid") == nil then
3450
		Humanoid = IT("Humanoid",Character)
3451
	end
3452
	for _,v in next, Humanoid:GetPlayingAnimationTracks() do
3453
	    v:Stop();
3454
	end
3455
	SINE = SINE + CHANGE
3456
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
3457
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
3458
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
3459
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
3460
	if ANIM == "Walk" and TORSOVELOCITY > 1 then
3461
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
3462
		Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
3463
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
3464
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
3465
	elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
3466
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
3467
		Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
3468
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
3469
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
3470
	end
3471
	if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
3472
		ANIM = "Jump"
3473
		if ATTACK == false then
3474
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
3475
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
3476
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
3477
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
3478
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
3479
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
3480
	    end
3481
	elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
3482
		ANIM = "Fall"
3483
		if ATTACK == false then
3484
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
3485
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
3486
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
3487
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
3488
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
3489
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
3490
		end
3491
	elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
3492
		ANIM = "Idle"
3493
		if ATTACK == false then
3494
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
3495
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.15 / Animation_Speed)
3496
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.5) * ANGLES(RAD(75), RAD(45), RAD(-25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
3497
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
3498
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
3499
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
3500
		end
3501
	elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
3502
		ANIM = "Walk"
3503
		if ATTACK == false then
3504
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
3505
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
3506
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.1, -0.4) * ANGLES(RAD(150), RAD(0), RAD(0))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
3507
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
3508
			RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
3509
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
3510
		end
3511
	end
3512
	unanchor()
3513
	Humanoid.MaxHealth = "inf"
3514
	Humanoid.Health = "inf"
3515
	if Rooted == false then
3516
		Disable_Jump = false
3517
		Humanoid.WalkSpeed = Speed
3518
	elseif Rooted == true then
3519
		Disable_Jump = true
3520
		Humanoid.WalkSpeed = 0
3521
	end
3522
	sick.Parent = Torso
3523
	sick:resume()
3524
	sick.Volume = 8.2
3525
	sick.Pitch = 1
3526
	sick.SoundId = "rbxassetid://151224226"
3527
	sick.Name = "Dead"
3528
end
3529
3530
--//=================================\\
3531
--\\=================================//
3532
3533
3534
3535
3536
3537
--//====================================================\\--
3538
--||			  		 END OF SCRIPT
3539
--\\====================================================//--