View difference between Paste ID: cEYFjd7P and EHEPg3gN
SHOW: | | - or go back to the newest paste.
1-
print("Guardian of light loaded (edit by promlg112)")
1+
2-
script.Name = "Banisher Gun V3 / 1"
2+
3
wait(0.2)
4-
--||			   CREATED BY SHACKLUSTER
4+
5-
--\\====================================================//--
5+
Player = game:GetService("Players").MasterPiece9876
6
PlayerGui = Player.PlayerGui
7
Cam = workspace.CurrentCamera
8
Backpack = Player.Backpack
9
Character = Player.Character
10-
Player = game:GetService("Players").LocalPlayer
10+
11
Mouse = Player:GetMouse()
12
RootPart = Character["HumanoidRootPart"]
13
Torso = Character["Torso"]
14
Head = Character["Head"]
15
RightArm = Character["Right Arm"]
16
LeftArm = Character["Left Arm"]
17
RightLeg = Character["Right Leg"]
18
LeftLeg = Character["Left Leg"]
19
RootJoint = RootPart["RootJoint"]
20
Neck = Torso["Neck"]
21
RightShoulder = Torso["Right Shoulder"]
22
LeftShoulder = Torso["Left Shoulder"]
23
RightHip = Torso["Right Hip"]
24
LeftHip = Torso["Left Hip"]
25
local TIME = 0
26
local sick = Instance.new("Sound",Torso)
27
28
IT = Instance.new
29
CF = CFrame.new
30
VT = Vector3.new
31
RAD = math.rad
32
C3 = Color3.new
33
UD2 = UDim2.new
34
BRICKC = BrickColor.new
35
ANGLES = CFrame.Angles
36
EULER = CFrame.fromEulerAnglesXYZ
37
COS = math.cos
38
ACOS = math.acos
39
SIN = math.sin
40
ASIN = math.asin
41
ABS = math.abs
42
MRANDOM = math.random
43
FLOOR = math.floor
44
45
--//=================================\\
46
--|| 	      USEFUL VALUES
47
--\\=================================//
48
local SKILLTEXTCOLOR = C3(1,1,1)
49
50
local naeeym2 = Instance.new("BillboardGui",Character)
51
naeeym2.AlwaysOnTop = true
52
naeeym2.Size = UDim2.new(5,35,2,35)
53
naeeym2.StudsOffset = Vector3.new(0,2,0)
54
naeeym2.Adornee = Character.Head
55
naeeym2.Name = "Name"
56
local tecks2 = Instance.new("TextLabel",naeeym2)
57
tecks2.BackgroundTransparency = 1
58
tecks2.TextScaled = true
59
tecks2.BorderSizePixel = 0
60
tecks2.Text = "₱ⱤłS₥"
61
tecks2.Font = "SciFi"
62
tecks2.TextSize = 60
63
tecks2.TextStrokeTransparency = 0
64
tecks2.TextColor3 = Color3.new(255,255,255)
65-
tecks2.Text = "Guardian of light"
65+
66-
tecks2.Font = "Antique"
66+
67
tecks2.Parent = naeeym2
68
69-
tecks2.TextColor3 = Color3.new(0,0,0)
69+
70
local FORCERESET = false
71
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
72
local Speed = 16
73
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
74
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
75
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
76
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
77
local DAMAGEMULTIPLIER = 1
78
local ANIM = "Idle"
79
local ATTACK = false
80
local EQUIPPED = false
81
local HOLD = false
82
local COMBO = 1
83
local Rooted = false
84
local SINE = 0
85
local KEYHOLD = false
86
local CHANGE = 2 / Animation_Speed
87
local WALKINGANIM = false
88
local VALUE1 = false
89
local VALUE2 = false
90
local ROBLOXIDLEANIMATION = IT("Animation")
91
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
92
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
93
--ROBLOXIDLEANIMATION.Parent = Humanoid
94
local WEAPONGUI = IT("ScreenGui", PlayerGui)
95
WEAPONGUI.Name = "BanishV3Gui"
96
local Weapon = IT("Model")
97
Weapon.Name = "Adds"
98
local Effects = IT("Folder", Weapon)
99
Effects.Name = "Effects"
100
local ANIMATOR = Humanoid.Animator
101
local ANIMATE = Character:FindFirstChild("Animate")
102
local UNANCHOR = true
103
local TOBANISH = {}
104
script.Parent = PlayerGui
105
106
--//=================================\\
107
--\\=================================//
108
109
110
--//=================================\\
111
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
112
--\\=================================//
113
114
ArtificialHB = Instance.new("BindableEvent", script)
115
ArtificialHB.Name = "ArtificialHB"
116
117
script:WaitForChild("ArtificialHB")
118
119
frame = Frame_Speed
120
tf = 0
121
allowframeloss = false
122
tossremainder = false
123
lastframe = tick()
124
script.ArtificialHB:Fire()
125
126
game:GetService("RunService").Heartbeat:connect(function(s, p)
127
	tf = tf + s
128
	if tf >= frame then
129
		if allowframeloss then
130
			script.ArtificialHB:Fire()
131
			lastframe = tick()
132
		else
133
			for i = 1, math.floor(tf / frame) do
134
				script.ArtificialHB:Fire()
135
			end
136
		lastframe = tick()
137
		end
138
		if tossremainder then
139
			tf = 0
140
		else
141
			tf = tf - frame * math.floor(tf / frame)
142
		end
143
	end
144
end)
145
146
--//=================================\\
147
--\\=================================//
148
149
--//=================================\\
150
--|| 	      SOME FUNCTIONS
151
--\\=================================//
152
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
153
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
154
end
155
156
function PositiveAngle(NUMBER)
157
	if NUMBER >= 0 then
158
		NUMBER = 0
159
	end
160
	return NUMBER
161
end
162
163
function NegativeAngle(NUMBER)
164
	if NUMBER <= 0 then
165
		NUMBER = 0
166
	end
167
	return NUMBER
168
end
169
170
function Swait(NUMBER)
171
	if NUMBER == 0 or NUMBER == nil then
172
		ArtificialHB.Event:wait()
173
	else
174
		for i = 1, NUMBER do
175
			ArtificialHB.Event:wait()
176
		end
177
	end
178
end
179
180
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
181
	local NEWMESH = IT(MESH)
182
	if MESH == "SpecialMesh" then
183
		NEWMESH.MeshType = MESHTYPE
184
		if MESHID ~= "nil" and MESHID ~= "" then
185
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
186
		end
187
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
188
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
189
		end
190
	end
191
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
192
	NEWMESH.Scale = SCALE
193
	NEWMESH.Parent = PARENT
194
	return NEWMESH
195
end
196
197
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
198
	local NEWPART = IT("Part")
199
	NEWPART.formFactor = FORMFACTOR
200
	NEWPART.Reflectance = REFLECTANCE
201
	NEWPART.Transparency = TRANSPARENCY
202
	NEWPART.CanCollide = false
203
	NEWPART.Locked = true
204
	NEWPART.Anchored = true
205
	if ANCHOR == false then
206
		NEWPART.Anchored = false
207
	end
208
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
209
	NEWPART.Name = NAME
210
	NEWPART.Size = SIZE
211
	NEWPART.Position = Torso.Position
212
	NEWPART.Material = MATERIAL
213
	NEWPART:BreakJoints()
214
	NEWPART.Parent = PARENT
215
	return NEWPART
216
end
217
218
	local function weldBetween(a, b)
219
	    local weldd = Instance.new("ManualWeld")
220
	    weldd.Part0 = a
221
	    weldd.Part1 = b
222
	    weldd.C0 = CFrame.new()
223
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
224
	    weldd.Parent = a
225
	    return weldd
226
	end
227
228
229
function QuaternionFromCFrame(cf)
230
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
231
	local trace = m00 + m11 + m22
232
	if trace > 0 then 
233
		local s = math.sqrt(1 + trace)
234
		local recip = 0.5 / s
235
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
236
	else
237
		local i = 0
238
		if m11 > m00 then
239
			i = 1
240
		end
241
		if m22 > (i == 0 and m00 or m11) then
242
			i = 2
243
		end
244
		if i == 0 then
245
			local s = math.sqrt(m00 - m11 - m22 + 1)
246
			local recip = 0.5 / s
247
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
248
		elseif i == 1 then
249
			local s = math.sqrt(m11 - m22 - m00 + 1)
250
			local recip = 0.5 / s
251
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
252
		elseif i == 2 then
253
			local s = math.sqrt(m22 - m00 - m11 + 1)
254
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
255
		end
256
	end
257
end
258
 
259
function QuaternionToCFrame(px, py, pz, x, y, z, w)
260
	local xs, ys, zs = x + x, y + y, z + z
261
	local wx, wy, wz = w * xs, w * ys, w * zs
262
	local xx = x * xs
263
	local xy = x * ys
264
	local xz = x * zs
265
	local yy = y * ys
266
	local yz = y * zs
267
	local zz = z * zs
268
	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))
269
end
270
 
271
function QuaternionSlerp(a, b, t)
272
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
273
	local startInterp, finishInterp;
274
	if cosTheta >= 0.0001 then
275
		if (1 - cosTheta) > 0.0001 then
276
			local theta = ACOS(cosTheta)
277
			local invSinTheta = 1 / SIN(theta)
278
			startInterp = SIN((1 - t) * theta) * invSinTheta
279
			finishInterp = SIN(t * theta) * invSinTheta
280
		else
281
			startInterp = 1 - t
282
			finishInterp = t
283
		end
284
	else
285
		if (1 + cosTheta) > 0.0001 then
286
			local theta = ACOS(-cosTheta)
287
			local invSinTheta = 1 / SIN(theta)
288
			startInterp = SIN((t - 1) * theta) * invSinTheta
289
			finishInterp = SIN(t * theta) * invSinTheta
290
		else
291
			startInterp = t - 1
292
			finishInterp = t
293
		end
294
	end
295
	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
296
end
297
298
function Clerp(a, b, t)
299
	local qa = {QuaternionFromCFrame(a)}
300
	local qb = {QuaternionFromCFrame(b)}
301
	local ax, ay, az = a.x, a.y, a.z
302
	local bx, by, bz = b.x, b.y, b.z
303
	local _t = 1 - t
304
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
305
end
306
307
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
308
	local frame = IT("Frame")
309
	frame.BackgroundTransparency = TRANSPARENCY
310
	frame.BorderSizePixel = BORDERSIZEPIXEL
311
	frame.Position = POSITION
312
	frame.Size = SIZE
313
	frame.BackgroundColor3 = COLOR
314
	frame.BorderColor3 = BORDERCOLOR
315
	frame.Name = NAME
316
	frame.Parent = PARENT
317
	return frame
318
end
319
320
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
321
	local label = IT("TextLabel")
322
	label.BackgroundTransparency = 1
323
	label.Size = UD2(1, 0, 1, 0)
324
	label.Position = UD2(0, 0, 0, 0)
325
	label.TextColor3 = TEXTCOLOR
326
	label.TextStrokeTransparency = STROKETRANSPARENCY
327
	label.TextTransparency = TRANSPARENCY
328
	label.FontSize = TEXTFONTSIZE
329
	label.Font = TEXTFONT
330
	label.BorderSizePixel = BORDERSIZEPIXEL
331
	label.TextScaled = false
332
	label.Text = TEXT
333
	label.Name = NAME
334
	label.Parent = PARENT
335
	return label
336
end
337
338
function NoOutlines(PART)
339
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
340
end
341
342
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
343
	local NEWWELD = IT(TYPE)
344
	NEWWELD.Part0 = PART0
345
	NEWWELD.Part1 = PART1
346
	NEWWELD.C0 = C0
347
	NEWWELD.C1 = C1
348
	NEWWELD.Parent = PARENT
349
	return NEWWELD
350
end
351
352
local S = IT("Sound")
353
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
354
	local NEWSOUND = nil
355
	coroutine.resume(coroutine.create(function()
356
		NEWSOUND = S:Clone()
357
		NEWSOUND.Parent = PARENT
358
		NEWSOUND.Volume = VOLUME
359
		NEWSOUND.Pitch = PITCH
360
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
361
		NEWSOUND:play()
362
		if DOESLOOP == true then
363
			NEWSOUND.Looped = true
364
		else
365
			repeat wait(1) until NEWSOUND.Playing == false
366
			NEWSOUND:remove()
367
		end
368
	end))
369
	return NEWSOUND
370
end
371
372
function CFrameFromTopBack(at, top, back)
373
	local right = top:Cross(back)
374
	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)
375
end
376
377
--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})
378
function WACKYEFFECT(Table)
379
	local TYPE = (Table.EffectType or "Sphere")
380
	local SIZE = (Table.Size or VT(1,1,1))
381
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
382
	local TRANSPARENCY = (Table.Transparency or 0)
383
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
384
	local CFRAME = (Table.CFrame or Torso.CFrame)
385
	local MOVEDIRECTION = (Table.MoveToPos or nil)
386
	local ROTATION1 = (Table.RotationX or 0)
387
	local ROTATION2 = (Table.RotationY or 0)
388
	local ROTATION3 = (Table.RotationZ or 0)
389
	local MATERIAL = (Table.Material or "Neon")
390
	local COLOR = (Table.Color or C3(1,1,1))
391
	local TIME = (Table.Time or 45)
392
	local SOUNDID = (Table.SoundID or nil)
393
	local SOUNDPITCH = (Table.SoundPitch or nil)
394
	local SOUNDVOLUME = (Table.SoundVolume or nil)
395
	coroutine.resume(coroutine.create(function()
396
		local PLAYSSOUND = false
397
		local SOUND = nil
398
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
399
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
400
			PLAYSSOUND = true
401
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
402
		end
403
		EFFECT.Color = COLOR
404
		local MSH = nil
405
		if TYPE == "Sphere" then
406
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
407
		elseif TYPE == "Block" then
408
			MSH = IT("BlockMesh",EFFECT)
409
			MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
410
		elseif TYPE == "Wave" then
411
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
412
		elseif TYPE == "Ring" then
413
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
414
		elseif TYPE == "Slash" then
415
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
416
		elseif TYPE == "Round Slash" then
417
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
418
		elseif TYPE == "Swirl" then
419
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
420
		elseif TYPE == "Skull" then
421
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
422
		elseif TYPE == "Crystal" then
423
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
424
		end
425
		if MSH ~= nil then
426
			local MOVESPEED = nil
427
			if MOVEDIRECTION ~= nil then
428
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
429
			end
430
			local GROWTH = SIZE - ENDSIZE
431
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
432
			if TYPE == "Block" then
433
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
434
			else
435
				EFFECT.CFrame = CFRAME
436
			end
437
			for LOOP = 1, TIME+1 do
438
				Swait()
439
				MSH.Scale = MSH.Scale - GROWTH/TIME
440
				if TYPE == "Wave" then
441
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
442
				end
443
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
444
				if TYPE == "Block" then
445
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
446
				else
447
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
448
				end
449
				if MOVEDIRECTION ~= nil then
450
					local ORI = EFFECT.Orientation
451
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
452
					EFFECT.Orientation = ORI
453
				end
454
			end
455
			if PLAYSSOUND == false then
456
				EFFECT:remove()
457
			else
458
				repeat Swait() until SOUND.Playing == false
459
				EFFECT:remove()
460
			end
461
		else
462
			if PLAYSSOUND == false then
463
				EFFECT:remove()
464
			else
465
				repeat Swait() until SOUND.Playing == false
466
				EFFECT:remove()
467
			end
468
		end
469
	end))
470
end
471
472
function MakeForm(PART,TYPE)
473
	if TYPE == "Cyl" then
474
		local MSH = IT("CylinderMesh",PART)
475
	elseif TYPE == "Ball" then
476
		local MSH = IT("SpecialMesh",PART)
477
		MSH.MeshType = "Sphere"
478
	elseif TYPE == "Wedge" then
479
		local MSH = IT("SpecialMesh",PART)
480
		MSH.MeshType = "Wedge"
481
	end
482
end
483
484
Debris = game:GetService("Debris")
485
486
function CastProperRay(StartPos, EndPos, Distance, Ignore)
487
	local DIRECTION = CF(StartPos,EndPos).lookVector
488
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
489
end
490
491
function CharacterFade(COLOR,TIMER)
492
	coroutine.resume(coroutine.create(function()
493
		local FADE = IT("Model",Effects)
494
		for _, c in pairs(Character:GetChildren()) do
495
			if c.ClassName == "Part" and c ~= RootPart then
496
				local FADER = c:Clone()
497
				FADER.Color = COLOR
498
				FADER.CFrame = c.CFrame
499
				FADER.Parent = FADE
500
				FADER.Anchored = true
501
				FADER.Transparency = 0.25
502
				FADER:BreakJoints()
503
				FADER.Material = "Glass"
504
				FADER:ClearAllChildren()
505
				if FADER.Name == "Head" then
506
					FADER.Size = VT(1,1,1)
507
				end
508
			end
509
		end
510
		local TRANS = 0.75/TIMER
511
		for i = 1, TIMER do
512
			Swait()
513
			for _, c in pairs(FADE:GetChildren()) do
514
				if c.ClassName == "Part" then
515
					c.Transparency = c.Transparency + TRANS
516
				end
517
			end
518
		end
519
		FADE:remove()
520
	end))
521
end
522
523
local PE=Instance.new("ParticleEmitter")
524
PE.LightEmission=0.3
525
PE.Size=NumberSequence.new(0)
526
PE.Transparency=NumberSequence.new(0,1)
527
PE.Rotation=NumberRange.new(0,360)
528
PE.LockedToPart = false
529
PE.Speed = NumberRange.new(0,0,0)
530
PE.ZOffset = 0.3
531
PE.Rate = 999
532
PE.VelocitySpread = 25
533
PE.Name = "Particles"
534
535
function CreateParticles(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed)
536
    local particle = nil
537
    coroutine.resume(coroutine.create(function(PART)
538
        particle = PE:Clone()
539
        Swait()
540
        particle.Rate = 999
541
        particle.Parent = art
542
        particle.Acceleration = accel
543
        if type == "Fire" then
544
            local EyeSizes={
545
                NumberSequenceKeypoint.new(0,size,size/2),
546
                NumberSequenceKeypoint.new(1,size/4,size/8)
547
            }
548
            particle.Size = NumberSequence.new(EyeSizes)
549
        elseif type == "Smoke" then
550
            local EyeSizes={
551
                NumberSequenceKeypoint.new(0,size/5,0),
552
                NumberSequenceKeypoint.new(1,size*2,0.5)
553
            }
554
            particle.Size = NumberSequence.new(EyeSizes)
555
        elseif type == "Solid" then
556
            local EyeSizes={
557
                NumberSequenceKeypoint.new(0,size,0),
558
                NumberSequenceKeypoint.new(1,size,0)
559
            }
560
            particle.Size = NumberSequence.new(EyeSizes)
561
        end
562
        particle.Lifetime=NumberRange.new(lifetime)
563
        particle.Drag = drag
564
        if locked == true then
565
            particle.LockedToPart = true
566
        end
567
        particle.Speed = NumberRange.new(speed*0.8,speed)
568
        particle.Texture = "http://www.roblox.com/asset/?id=1179557490"
569
        particle.Enabled = isenabledbydefault
570
        particle.Color = ColorSequence.new(Color3.new(255/255, 176/255, 0))
571
    end))
572
return particle
573
end
574
575
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
576
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
577
end
578
579
function PositiveAngle(NUMBER)
580
	if NUMBER >= 0 then
581
		NUMBER = 0
582
	end
583
	return NUMBER
584
end
585
586
function NegativeAngle(NUMBER)
587
	if NUMBER <= 0 then
588
		NUMBER = 0
589
	end
590
	return NUMBER
591
end
592
593
function Swait(NUMBER)
594
	if NUMBER == 0 or NUMBER == nil then
595
		ArtificialHB.Event:wait()
596
	else
597
		for i = 1, NUMBER do
598
			ArtificialHB.Event:wait()
599
		end
600
	end
601
end
602
603
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
604
	local NEWMESH = IT(MESH)
605
	if MESH == "SpecialMesh" then
606
		NEWMESH.MeshType = MESHTYPE
607
		if MESHID ~= "nil" and MESHID ~= "" then
608
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
609
		end
610
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
611
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
612
		end
613
	end
614
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
615
	NEWMESH.Scale = SCALE
616
	NEWMESH.Parent = PARENT
617
	return NEWMESH
618
end
619
620
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
621
	local NEWPART = IT("Part")
622
	NEWPART.formFactor = FORMFACTOR
623
	NEWPART.Reflectance = REFLECTANCE
624
	NEWPART.Transparency = TRANSPARENCY
625
	NEWPART.CanCollide = false
626
	NEWPART.Locked = true
627
	NEWPART.Anchored = true
628
	if ANCHOR == false then
629
		NEWPART.Anchored = false
630
	end
631
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
632
	NEWPART.Name = NAME
633
	NEWPART.Size = SIZE
634
	NEWPART.Position = Torso.Position
635
	NEWPART.Material = MATERIAL
636
	NEWPART:BreakJoints()
637
	NEWPART.Parent = PARENT
638
	return NEWPART
639
end
640
641
	local function weldBetween(a, b)
642
	    local weldd = Instance.new("ManualWeld")
643
	    weldd.Part0 = a
644
	    weldd.Part1 = b
645
	    weldd.C0 = CFrame.new()
646
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
647
	    weldd.Parent = a
648
	    return weldd
649
	end
650
651
652
function QuaternionFromCFrame(cf)
653
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
654
	local trace = m00 + m11 + m22
655
	if trace > 0 then 
656
		local s = math.sqrt(1 + trace)
657
		local recip = 0.5 / s
658
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
659
	else
660
		local i = 0
661
		if m11 > m00 then
662
			i = 1
663
		end
664
		if m22 > (i == 0 and m00 or m11) then
665
			i = 2
666
		end
667
		if i == 0 then
668
			local s = math.sqrt(m00 - m11 - m22 + 1)
669
			local recip = 0.5 / s
670
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
671
		elseif i == 1 then
672
			local s = math.sqrt(m11 - m22 - m00 + 1)
673
			local recip = 0.5 / s
674
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
675
		elseif i == 2 then
676
			local s = math.sqrt(m22 - m00 - m11 + 1)
677
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
678
		end
679
	end
680
end
681
 
682
function QuaternionToCFrame(px, py, pz, x, y, z, w)
683
	local xs, ys, zs = x + x, y + y, z + z
684
	local wx, wy, wz = w * xs, w * ys, w * zs
685
	local xx = x * xs
686
	local xy = x * ys
687
	local xz = x * zs
688
	local yy = y * ys
689
	local yz = y * zs
690
	local zz = z * zs
691
	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))
692
end
693
 
694
function QuaternionSlerp(a, b, t)
695
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
696
	local startInterp, finishInterp;
697
	if cosTheta >= 0.0001 then
698
		if (1 - cosTheta) > 0.0001 then
699
			local theta = ACOS(cosTheta)
700
			local invSinTheta = 1 / SIN(theta)
701
			startInterp = SIN((1 - t) * theta) * invSinTheta
702
			finishInterp = SIN(t * theta) * invSinTheta
703
		else
704
			startInterp = 1 - t
705
			finishInterp = t
706
		end
707
	else
708
		if (1 + cosTheta) > 0.0001 then
709
			local theta = ACOS(-cosTheta)
710
			local invSinTheta = 1 / SIN(theta)
711
			startInterp = SIN((t - 1) * theta) * invSinTheta
712
			finishInterp = SIN(t * theta) * invSinTheta
713
		else
714
			startInterp = t - 1
715
			finishInterp = t
716
		end
717
	end
718
	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
719
end
720
721
function Clerp(a, b, t)
722
	local qa = {QuaternionFromCFrame(a)}
723
	local qb = {QuaternionFromCFrame(b)}
724
	local ax, ay, az = a.x, a.y, a.z
725
	local bx, by, bz = b.x, b.y, b.z
726
	local _t = 1 - t
727
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
728
end
729
730
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
731
	local frame = IT("Frame")
732
	frame.BackgroundTransparency = TRANSPARENCY
733
	frame.BorderSizePixel = BORDERSIZEPIXEL
734
	frame.Position = POSITION
735
	frame.Size = SIZE
736
	frame.BackgroundColor3 = COLOR
737
	frame.BorderColor3 = BORDERCOLOR
738
	frame.Name = NAME
739
	frame.Parent = PARENT
740
	return frame
741
end
742
743
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
744
	local label = IT("TextLabel")
745
	label.BackgroundTransparency = 1
746
	label.Size = UD2(1, 0, 1, 0)
747
	label.Position = UD2(0, 0, 0, 0)
748
	label.TextColor3 = TEXTCOLOR
749
	label.TextStrokeTransparency = STROKETRANSPARENCY
750
	label.TextTransparency = TRANSPARENCY
751
	label.FontSize = TEXTFONTSIZE
752
	label.Font = TEXTFONT
753
	label.BorderSizePixel = BORDERSIZEPIXEL
754
	label.TextScaled = false
755
	label.Text = TEXT
756
	label.Name = NAME
757
	label.Parent = PARENT
758
	return label
759
end
760
761
function NoOutlines(PART)
762
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
763
end
764
765
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
766
	local NEWWELD = IT(TYPE)
767
	NEWWELD.Part0 = PART0
768
	NEWWELD.Part1 = PART1
769
	NEWWELD.C0 = C0
770
	NEWWELD.C1 = C1
771
	NEWWELD.Parent = PARENT
772
	return NEWWELD
773
end
774
775
local S = IT("Sound")
776
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
777
	local NEWSOUND = nil
778
	coroutine.resume(coroutine.create(function()
779
		NEWSOUND = S:Clone()
780
		NEWSOUND.Parent = PARENT
781
		NEWSOUND.Volume = VOLUME
782
		NEWSOUND.Pitch = PITCH
783
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
784
		NEWSOUND:play()
785
		if DOESLOOP == true then
786
			NEWSOUND.Looped = true
787
		else
788
			repeat wait(1) until NEWSOUND.Playing == false
789
			NEWSOUND:remove()
790
		end
791
	end))
792
	return NEWSOUND
793
end
794
795
796
local EyeSizes={
797
	NumberSequenceKeypoint.new(0,2,0),
798
	NumberSequenceKeypoint.new(1,0,0)
799
}
800
local EyeTrans={
801
	NumberSequenceKeypoint.new(0,0.5,0),
802
	NumberSequenceKeypoint.new(1,1,0)
803
}
804
local PE=Instance.new("ParticleEmitter",nil)
805
PE.LightEmission=.8
806
PE.Color = ColorSequence.new(BRICKC("Lime green").Color,BRICKC("Lime green").Color)
807
PE.Size=NumberSequence.new(EyeSizes)
808
PE.Transparency=NumberSequence.new(EyeTrans)
809
PE.Lifetime=NumberRange.new(0.35,1)
810
PE.Rotation=NumberRange.new(0,360)
811
PE.Rate=100
812
PE.VelocitySpread = 10000
813
PE.Acceleration = Vector3.new(0,85,0)
814
PE.Drag = 5
815
PE.Speed = NumberRange.new(0.1,5)
816
PE.Texture="http://www.roblox.com/asset/?id=1460745664"
817
PE.ZOffset = 0.5
818
PE.Name = "PE"
819
PE.Enabled = false
820
821
function Fire(art)
822
	local PARTICLES = PE:Clone()
823
	PARTICLES.Parent = art
824
	PARTICLES.Enabled = true
825
	return PARTICLES
826
end
827
828
function CFrameFromTopBack(at, top, back)
829
	local right = top:Cross(back)
830
	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)
831
end
832
833
--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})
834
function WACKYEFFECT(Table)
835
	local TYPE = (Table.EffectType or "Sphere")
836
	local SIZE = (Table.Size or VT(1,1,1))
837
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
838
	local TRANSPARENCY = (Table.Transparency or 0)
839
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
840
	local CFRAME = (Table.CFrame or Torso.CFrame)
841
	local MOVEDIRECTION = (Table.MoveToPos or nil)
842
	local ROTATION1 = (Table.RotationX or 0)
843
	local ROTATION2 = (Table.RotationY or 0)
844
	local ROTATION3 = (Table.RotationZ or 0)
845
	local MATERIAL = (Table.Material or "Neon")
846
	local COLOR = (Table.Color or C3(1,1,1))
847
	local TIME = (Table.Time or 45)
848
	local SOUNDID = (Table.SoundID or nil)
849
	local SOUNDPITCH = (Table.SoundPitch or nil)
850
	local SOUNDVOLUME = (Table.SoundVolume or nil)
851
	coroutine.resume(coroutine.create(function()
852
		local PLAYSSOUND = false
853
		local SOUND = nil
854
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Lime green"), "Effect", VT(1,1,1), true)
855
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
856
			PLAYSSOUND = true
857
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
858
		end
859
		EFFECT.Color = COLOR
860
		local MSH = nil
861
		if TYPE == "Sphere" then
862
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
863
		elseif TYPE == "Block" or TYPE == "Box" then
864
			MSH = IT("BlockMesh",EFFECT)
865
			MSH.Scale = SIZE
866
		elseif TYPE == "Wave" then
867
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
868
		elseif TYPE == "Ring" then
869
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
870
		elseif TYPE == "Slash" then
871
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
872
		elseif TYPE == "Round Slash" then
873
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
874
		elseif TYPE == "Swirl" then
875
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
876
		elseif TYPE == "Skull" then
877
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
878
		elseif TYPE == "Crystal" then
879
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
880
		end
881
		if MSH ~= nil then
882
			local MOVESPEED = nil
883
			if MOVEDIRECTION ~= nil then
884
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
885
			end
886
			local GROWTH = SIZE - ENDSIZE
887
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
888
			if TYPE == "Block" then
889
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
890
			else
891
				EFFECT.CFrame = CFRAME
892
			end
893
			for LOOP = 1, TIME+1 do
894
				Swait()
895
				MSH.Scale = MSH.Scale - GROWTH/TIME
896
				if TYPE == "Wave" then
897
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
898
				end
899
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
900
				if TYPE == "Block" then
901
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
902
				else
903
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
904
				end
905
				if MOVEDIRECTION ~= nil then
906
					local ORI = EFFECT.Orientation
907
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
908
					EFFECT.Orientation = ORI
909
				end
910
			end
911
			if PLAYSSOUND == false then
912
				EFFECT:remove()
913
			else
914
				repeat wait(1) until SOUND.Playing == false
915
				EFFECT:remove()
916
			end
917
		else
918
			if PLAYSSOUND == false then
919
				EFFECT:remove()
920
			else
921
				repeat Swait() until SOUND.Playing == false
922
				EFFECT:remove()
923
			end
924
		end
925
	end))
926
end
927
928
function MakeForm(PART,TYPE)
929
	if TYPE == "Cyl" then
930
		local MSH = IT("CylinderMesh",PART)
931
	elseif TYPE == "Ball" then
932
		local MSH = IT("SpecialMesh",PART)
933
		MSH.MeshType = "Sphere"
934
	elseif TYPE == "Wedge" then
935
		local MSH = IT("SpecialMesh",PART)
936
		MSH.MeshType = "Wedge"
937
	end
938
end
939
940
Debris = game:GetService("Debris")
941
942
function CastProperRay(StartPos, EndPos, Distance, Ignore)
943
	local DIRECTION = CF(StartPos,EndPos).lookVector
944
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
945
end
946
947
local HATWELD = nil
948
function Pose(WhichPose,Speed,Time,Magic,Gyro,Tors)
949
	PLAYMAINANIM = false
950
	if WhichPose == "Cast1" then
951
		for i=0, Time, 0.1 / Animation_Speed do
952
			Swait()
953
			if Magic == true then
954
				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})
955
			end
956
			if Gyro ~= nil and Gyro ~= false then
957
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
958
			end
959
			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)
960
			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)
961
			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)
962
			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)
963
			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)
964
			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)
965
		end
966
	elseif WhichPose == "Cast2" then
967
		for i=0, Time, 0.1 / Animation_Speed do
968
			Swait()
969
			if Magic == true then
970
				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})
971
				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})
972
			end
973
			if Gyro ~= nil and Gyro ~= false then
974
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
975
			end
976
			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)
977
			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)
978
			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)
979
			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)
980
			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)
981
			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)
982
		end
983
	elseif WhichPose == "RightArmUp" then
984
		for i=0, Time, 0.1 / Animation_Speed do
985
			Swait()
986
			if Magic == true then
987
				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})
988
			end
989
			if Gyro ~= nil and Gyro ~= false then
990
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
991
			end
992
			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)
993
			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)
994
			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)
995
			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)
996
			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)
997
			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)
998
		end
999
	elseif WhichPose == "Taunt" then
1000
		for i=0, Time, 0.1 / Animation_Speed do
1001
			Swait()
1002
			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)
1003
			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)
1004
			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)
1005
			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)
1006
			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)
1007
			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)
1008
		end
1009
		HATWELD.Part0 = RightArm
1010
		HATWELD.C0 = CF(0,-1.1,-0.4) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(-20), RAD(0), RAD(0))
1011
		CreateSound(137473066,Torso,10,1,false)
1012
		for i=0, Time*2, 0.1 / Animation_Speed do
1013
			Swait()
1014
			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)
1015
			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)
1016
			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)
1017
			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)
1018
			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)
1019
			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)
1020
		end
1021
		for i=0, Time, 0.1 / Animation_Speed do
1022
			Swait()
1023
			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)
1024
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), Speed / Animation_Speed)
1025
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.65, -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
1026
			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)
1027
			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)
1028
			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)
1029
			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)
1030
		end
1031
		HATWELD.Part0 = Head
1032
		HATWELD.C0 = CF(0,0.35,0)
1033
	elseif WhichPose == "Prepare key" then
1034
		for i=0, Time, 0.1 / Animation_Speed do
1035
			Swait()
1036
			if Gyro ~= nil and Gyro ~= false then
1037
				Gyro.cframe = CF(RootPart.Position,Tors.Position)
1038
			end
1039
			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)
1040
			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)
1041
			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)
1042
			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)
1043
			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)
1044
			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)
1045
		end
1046
	elseif WhichPose == "Turn key" then
1047
		for i=0, Time, 0.1 / Animation_Speed do
1048
			Swait()
1049
			if Gyro ~= nil and Gyro ~= false then
1050
				Gyro.cframe = CF(RootPart.Position,Tors.Position)
1051
			end
1052
			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)
1053
			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)
1054
			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)
1055
			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)
1056
			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)
1057
			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)
1058
		end
1059
	end
1060
	PLAYMAINANIM = true
1061
end
1062
1063
--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})
1064
function Lightning(Table)
1065
	local Color = Table.Color or C3(1,1,1)
1066
	local StartPos = Table.Start or Torso.Position
1067
	local EndPos = Table.End or Mouse.Hit.p
1068
	local SegmentLength = Table.SegmentL or 2
1069
	local Thickness = Table.Thickness or 0.1
1070
	local Dissapear = Table.DoesFade or false
1071
	local Parent = Table.Ignore or Character
1072
	local MaxDist = Table.MaxDist or 400
1073
	local Branches = Table.Branches or false
1074
	local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent)
1075
	local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength)
1076
	local LIGHTNINGMODEL = IT("Model",Effects)
1077
	LIGHTNINGMODEL.Name = "Lightning"
1078
	local LastBolt = nil
1079
	for E = 1, DISTANCE do
1080
		local ExtraSize = (DISTANCE-E)/15
1081
		local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Lime green"), "LightningPart"..E, VT(Thickness+ExtraSize,SegmentLength,Thickness+ExtraSize))
1082
		PART.Color = Color
1083
		MakeForm(PART,"Cyl")
1084
		if LastBolt == nil then
1085
			PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
1086
		else
1087
			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)
1088
		end
1089
		LastBolt = PART
1090
		if Branches == true then
1091
			local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2))
1092
			if CHOICE == 1 then
1093
				local LASTBRANCH = nil
1094
				for i = 1, MRANDOM(2,5) do
1095
					local ExtraSize2 = ((DISTANCE-E)/25)/i
1096
					local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Crimson"), "Branch"..E.."-"..i, VT(Thickness+ExtraSize2,SegmentLength,Thickness+ExtraSize2))
1097
					PART.Color = Color
1098
					MakeForm(PART,"Cyl")
1099
					if LASTBRANCH == nil then
1100
						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)
1101
					else
1102
						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)
1103
					end
1104
					LASTBRANCH = PART
1105
				end
1106
			end
1107
		end
1108
	end
1109
	if Dissapear == true then
1110
		coroutine.resume(coroutine.create(function()
1111
			for i = 1, 10 do
1112
				Swait()
1113
				for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do
1114
					if c.ClassName == "Part" then
1115
						c.Transparency = i/10
1116
					end
1117
				end
1118
			end
1119
			LIGHTNINGMODEL:remove()
1120
		end))
1121
	elseif Dissapear == false then
1122
		Debris:AddItem(LIGHTNINGMODEL,0.1)
1123
	end
1124
	return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL}
1125
end
1126
1127
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
1128
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
1129
end
1130
1131
function PositiveAngle(NUMBER)
1132
	if NUMBER >= 0 then
1133
		NUMBER = 0
1134
	end
1135
	return NUMBER
1136
end
1137
1138
function NegativeAngle(NUMBER)
1139
	if NUMBER <= 0 then
1140
		NUMBER = 0
1141
	end
1142
	return NUMBER
1143
end
1144
1145
function Swait(NUMBER)
1146
	if NUMBER == 0 or NUMBER == nil then
1147
		ArtificialHB.Event:wait()
1148
	else
1149
		for i = 1, NUMBER do
1150
			ArtificialHB.Event:wait()
1151
		end
1152
	end
1153
end
1154
1155
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
1156
	local NEWMESH = IT(MESH)
1157
	if MESH == "SpecialMesh" then
1158
		NEWMESH.MeshType = MESHTYPE
1159
		if MESHID ~= "nil" and MESHID ~= "" then
1160
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
1161
		end
1162
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
1163
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
1164
		end
1165
	end
1166
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
1167
	NEWMESH.Scale = SCALE
1168
	NEWMESH.Parent = PARENT
1169
	return NEWMESH
1170
end
1171
1172
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
1173
	local NEWPART = IT("Part")
1174
	NEWPART.formFactor = FORMFACTOR
1175
	NEWPART.Reflectance = REFLECTANCE
1176
	NEWPART.Transparency = TRANSPARENCY
1177
	NEWPART.CanCollide = false
1178
	NEWPART.Locked = true
1179
	NEWPART.Anchored = true
1180
	if ANCHOR == false then
1181
		NEWPART.Anchored = false
1182
	end
1183
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
1184
	NEWPART.Name = NAME
1185
	NEWPART.Size = SIZE
1186
	NEWPART.Position = Torso.Position
1187
	NEWPART.Material = MATERIAL
1188
	NEWPART:BreakJoints()
1189
	NEWPART.Parent = PARENT
1190
	return NEWPART
1191
end
1192
1193
	local function weldBetween(a, b)
1194
	    local weldd = Instance.new("ManualWeld")
1195
	    weldd.Part0 = a
1196
	    weldd.Part1 = b
1197
	    weldd.C0 = CFrame.new()
1198
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
1199
	    weldd.Parent = a
1200
	    return weldd
1201
	end
1202
1203
1204
function QuaternionFromCFrame(cf)
1205
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
1206
	local trace = m00 + m11 + m22
1207
	if trace > 0 then 
1208
		local s = math.sqrt(1 + trace)
1209
		local recip = 0.5 / s
1210
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
1211
	else
1212
		local i = 0
1213
		if m11 > m00 then
1214
			i = 1
1215
		end
1216
		if m22 > (i == 0 and m00 or m11) then
1217
			i = 2
1218
		end
1219
		if i == 0 then
1220
			local s = math.sqrt(m00 - m11 - m22 + 1)
1221
			local recip = 0.5 / s
1222
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
1223
		elseif i == 1 then
1224
			local s = math.sqrt(m11 - m22 - m00 + 1)
1225
			local recip = 0.5 / s
1226
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
1227
		elseif i == 2 then
1228
			local s = math.sqrt(m22 - m00 - m11 + 1)
1229
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
1230
		end
1231
	end
1232
end
1233
 
1234
function QuaternionToCFrame(px, py, pz, x, y, z, w)
1235
	local xs, ys, zs = x + x, y + y, z + z
1236
	local wx, wy, wz = w * xs, w * ys, w * zs
1237
	local xx = x * xs
1238
	local xy = x * ys
1239
	local xz = x * zs
1240
	local yy = y * ys
1241
	local yz = y * zs
1242
	local zz = z * zs
1243
	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))
1244
end
1245
 
1246
function QuaternionSlerp(a, b, t)
1247
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
1248
	local startInterp, finishInterp;
1249
	if cosTheta >= 0.0001 then
1250
		if (1 - cosTheta) > 0.0001 then
1251
			local theta = ACOS(cosTheta)
1252
			local invSinTheta = 1 / SIN(theta)
1253
			startInterp = SIN((1 - t) * theta) * invSinTheta
1254
			finishInterp = SIN(t * theta) * invSinTheta
1255
		else
1256
			startInterp = 1 - t
1257
			finishInterp = t
1258
		end
1259
	else
1260
		if (1 + cosTheta) > 0.0001 then
1261
			local theta = ACOS(-cosTheta)
1262
			local invSinTheta = 1 / SIN(theta)
1263
			startInterp = SIN((t - 1) * theta) * invSinTheta
1264
			finishInterp = SIN(t * theta) * invSinTheta
1265
		else
1266
			startInterp = t - 1
1267
			finishInterp = t
1268
		end
1269
	end
1270
	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
1271
end
1272
1273
function Clerp(a, b, t)
1274
	local qa = {QuaternionFromCFrame(a)}
1275
	local qb = {QuaternionFromCFrame(b)}
1276
	local ax, ay, az = a.x, a.y, a.z
1277
	local bx, by, bz = b.x, b.y, b.z
1278
	local _t = 1 - t
1279
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
1280
end
1281
1282
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
1283
	local frame = IT("Frame")
1284
	frame.BackgroundTransparency = TRANSPARENCY
1285
	frame.BorderSizePixel = BORDERSIZEPIXEL
1286
	frame.Position = POSITION
1287
	frame.Size = SIZE
1288
	frame.BackgroundColor3 = COLOR
1289
	frame.BorderColor3 = BORDERCOLOR
1290
	frame.Name = NAME
1291
	frame.Parent = PARENT
1292
	return frame
1293
end
1294
1295
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
1296
	local label = IT("TextLabel")
1297
	label.BackgroundTransparency = 1
1298
	label.Size = UD2(1, 0, 1, 0)
1299
	label.Position = UD2(0, 0, 0, 0)
1300
	label.TextColor3 = TEXTCOLOR
1301
	label.TextStrokeTransparency = STROKETRANSPARENCY
1302
	label.TextTransparency = TRANSPARENCY
1303
	label.FontSize = TEXTFONTSIZE
1304
	label.Font = TEXTFONT
1305
	label.BorderSizePixel = BORDERSIZEPIXEL
1306
	label.TextScaled = false
1307
	label.Text = TEXT
1308
	label.Name = NAME
1309
	label.Parent = PARENT
1310
	return label
1311
end
1312
1313
function NoOutlines(PART)
1314
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
1315
end
1316
1317
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
1318
	local NEWWELD = IT(TYPE)
1319
	NEWWELD.Part0 = PART0
1320
	NEWWELD.Part1 = PART1
1321
	NEWWELD.C0 = C0
1322
	NEWWELD.C1 = C1
1323
	NEWWELD.Parent = PARENT
1324
	return NEWWELD
1325
end
1326
1327
local S = IT("Sound")
1328
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
1329
	local NEWSOUND = nil
1330
	coroutine.resume(coroutine.create(function()
1331
		NEWSOUND = S:Clone()
1332
		NEWSOUND.Parent = PARENT
1333
		NEWSOUND.Volume = VOLUME
1334
		NEWSOUND.Pitch = PITCH
1335
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
1336
		NEWSOUND:play()
1337
		if DOESLOOP == true then
1338
			NEWSOUND.Looped = true
1339
		else
1340
			repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
1341
			NEWSOUND:remove()
1342
		end
1343
	end))
1344
	return NEWSOUND
1345
end
1346
1347
function CFrameFromTopBack(at, top, back)
1348
	local right = top:Cross(back)
1349
	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)
1350
end
1351
1352
--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})
1353
function WACKYEFFECT(Table)
1354
	local TYPE = (Table.EffectType or "Sphere")
1355
	local SIZE = (Table.Size or VT(1,1,1))
1356
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
1357
	local TRANSPARENCY = (Table.Transparency or 0)
1358
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
1359
	local CFRAME = (Table.CFrame or Torso.CFrame)
1360
	local MOVEDIRECTION = (Table.MoveToPos or nil)
1361
	local ROTATION1 = (Table.RotationX or 0)
1362
	local ROTATION2 = (Table.RotationY or 0)
1363
	local ROTATION3 = (Table.RotationZ or 0)
1364
	local MATERIAL = (Table.Material or "Neon")
1365
	local COLOR = (Table.Color or C3(1,1,1))
1366
	local TIME = (Table.Time or 45)
1367
	local SOUNDID = (Table.SoundID or nil)
1368
	local SOUNDPITCH = (Table.SoundPitch or nil)
1369
	local SOUNDVOLUME = (Table.SoundVolume or nil)
1370
	coroutine.resume(coroutine.create(function()
1371
		local PLAYSSOUND = false
1372
		local SOUND = nil
1373
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
1374
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
1375
			PLAYSSOUND = true
1376
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
1377
		end
1378
		EFFECT.Color = COLOR
1379
		local MSH = nil
1380
		if TYPE == "Sphere" then
1381
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
1382
		elseif TYPE == "Block" then
1383
			MSH = IT("BlockMesh",EFFECT)
1384
			MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
1385
		elseif TYPE == "Wave" then
1386
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
1387
		elseif TYPE == "Ring" then
1388
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
1389
		elseif TYPE == "Slash" then
1390
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
1391
		elseif TYPE == "Round Slash" then
1392
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
1393
		elseif TYPE == "Swirl" then
1394
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
1395
		elseif TYPE == "Skull" then
1396
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
1397
		elseif TYPE == "Crystal" then
1398
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
1399
		end
1400
		if MSH ~= nil then
1401
			local MOVESPEED = nil
1402
			if MOVEDIRECTION ~= nil then
1403
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
1404
			end
1405
			local GROWTH = SIZE - ENDSIZE
1406
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
1407
			if TYPE == "Block" then
1408
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
1409
			else
1410
				EFFECT.CFrame = CFRAME
1411
			end
1412
			for LOOP = 1, TIME+1 do
1413
				Swait()
1414
				MSH.Scale = MSH.Scale - GROWTH/TIME
1415
				if TYPE == "Wave" then
1416
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
1417
				end
1418
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
1419
				if TYPE == "Block" then
1420
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
1421
				else
1422
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
1423
				end
1424
				if MOVEDIRECTION ~= nil then
1425
					local ORI = EFFECT.Orientation
1426
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
1427
					EFFECT.Orientation = ORI
1428
				end
1429
			end
1430
			if PLAYSSOUND == false then
1431
				EFFECT:remove()
1432
			else
1433
				SOUND.Stopped:Connect(function()
1434
					EFFECT:remove()
1435
				end)
1436
			end
1437
		else
1438
			if PLAYSSOUND == false then
1439
				EFFECT:remove()
1440
			else
1441
				repeat Swait() until SOUND.Playing == false
1442
				EFFECT:remove()
1443
			end
1444
		end
1445
	end))
1446
end
1447
1448
function MakeForm(PART,TYPE)
1449
	if TYPE == "Cyl" then
1450
		local MSH = IT("CylinderMesh",PART)
1451
	elseif TYPE == "Ball" then
1452
		local MSH = IT("SpecialMesh",PART)
1453
		MSH.MeshType = "Sphere"
1454
	elseif TYPE == "Wedge" then
1455
		local MSH = IT("SpecialMesh",PART)
1456
		MSH.MeshType = "Wedge"
1457
	end
1458
end
1459
1460
function SpawnTrail(FROM,TO,BIG)
1461
	local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0))
1462
	MakeForm(TRAIL,"Cyl")
1463
	local DIST = (FROM - TO).Magnitude
1464
	if BIG == true then
1465
		TRAIL.Size = VT(0.5,DIST,0.5)
1466
	else
1467
		TRAIL.Size = VT(0.25,DIST,0.25)
1468
	end
1469
	TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
1470
	coroutine.resume(coroutine.create(function()
1471
		for i = 1, 5 do
1472
			Swait()
1473
			TRAIL.Transparency = TRAIL.Transparency + 0.1
1474
		end
1475
		TRAIL:remove()
1476
	end))
1477
end
1478
1479
Debris = game:GetService("Debris")
1480
1481
function CastProperRay(StartPos, EndPos, Distance, Ignore)
1482
	local DIRECTION = CF(StartPos,EndPos).lookVector
1483
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
1484
end
1485
1486
function turnto(position)
1487
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
1488
end
1489
1490
--//=================================\\
1491
--||	     WEAPON CREATION
1492
--\\=================================//
1493
local EYE = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
1494
MakeForm(EYE,"Ball")
1495
CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.26,-0.55), CF(0, 0, 0))
1496
local EYE2 = CreatePart(3, Character, "Neon", 0, 0, "Really red", "Eyeball", VT(0.15,0.15,0.15),false)
1497
MakeForm(EYE2,"Ball")
1498
CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE2, CF(-0.15,0.26,-0.55), CF(0, 0, 0))
1499
local LASTPART = Head
1500
for i = 1, 20 do
1501
    local MATH = (1-(i/25))
1502
    if LASTPART == Head then
1503
        local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Dirt brown", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
1504
        CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, Horn, CF(0.3, 0.7, -0.35) * ANGLES(RAD(-55), RAD(15), RAD(-15)), CF(0, 0, 0))
1505
        LASTPART = Horn
1506
        Horn.Color = C3((i*3-3)/255,0,0)
1507
    else
1508
        local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Dirt brown", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
1509
        CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, Horn, CF(0, Horn.Size.Y/1.8, 0) * ANGLES(RAD(6), RAD(-0.3), RAD(0)), CF(0, 0, 0))
1510
        LASTPART = Horn
1511
        Horn.Color = C3((i*3-3)/255,0,0)
1512
    end
1513
end
1514
local LASTPART = Head
1515
for i = 1, 20 do
1516
    local MATH = (1-(i/25))
1517
    if LASTPART == Head then
1518
        local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Dirt brown", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
1519
        CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, Horn, CF(-0.3, 0.7, -0.35) * ANGLES(RAD(-55), RAD(-15), RAD(15)), CF(0, 0, 0))
1520
        LASTPART = Horn
1521
        Horn.Color = C3((i*3-3)/255,0,0)
1522
    else
1523
        local Horn = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Dirt brown", "Horn", VT(0.25*MATH,0.25,0.25*MATH),false)
1524
        CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, Horn, CF(0, Horn.Size.Y/1.8, 0) * ANGLES(RAD(6), RAD(0.3), RAD(0)), CF(0, 0, 0))
1525
        LASTPART = Horn
1526
        Horn.Color = C3((i*3-3)/255,0,0)
1527
    end
1528
end
1529
 
1530
local Particle = IT("ParticleEmitter",nil)
1531
Particle.Enabled = false
1532
Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
1533
Particle.LightEmission = 0.5
1534
Particle.Rate = 150
1535
Particle.ZOffset = 0.2
1536
Particle.Rotation = NumberRange.new(-180, 180)
1537
Particle.RotSpeed = NumberRange.new(-180, 180)
1538
Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
1539
Particle.Color = ColorSequence.new(C3(255,0,0),C3(255,0,0))
1540
local Particle2 = IT("ParticleEmitter",nil)
1541
Particle2.Enabled = false
1542
Particle2.Texture = "http://www.roblox.com/asset/?id=1369397597"
1543
Particle2.Color = ColorSequence.new(C3(255,0,0),C3(255,0,0))
1544
Particle2.LightEmission = 0
1545
Particle2.RotSpeed = NumberRange.new(0, 180)
1546
Particle2.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
1547
Particle2.LightEmission = 1
1548
Particle2.Rate = 20
1549
Particle2.RotSpeed = NumberRange.new(-20, 20)
1550
local Particle3 = IT("ParticleEmitter",nil)
1551
Particle3.Enabled = false
1552
Particle3.Texture = "http://www.roblox.com/asset/?id=1546470121"
1553
Particle3.Color = ColorSequence.new(C3(255,0,0),C3(255,0,0))
1554
Particle3.LightEmission = 0
1555
Particle3.RotSpeed = NumberRange.new(0, 180)
1556
Particle3.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.7),NumberSequenceKeypoint.new(0.3,.9),NumberSequenceKeypoint.new(1,1)})
1557
Particle3.LightEmission = 1
1558
Particle3.Rate = 20
1559
Particle3.RotSpeed = NumberRange.new(-20, 20)
1560
--ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
1561
function ParticleEmitter(Table)
1562
    local PRTCL = Particle:Clone()
1563
    local Speed = Table.Speed or 5
1564
    local Drag = Table.Drag or 0
1565
    local Size1 = Table.Size1 or 1
1566
    local Size2 = Table.Size2 or 5
1567
    local Lifetime1 = Table.Lifetime1 or 1
1568
    local Lifetime2 = Table.Lifetime2 or 1.5
1569
    local Parent = Table.Parent or Torso
1570
    local Emit = Table.Emit or 100
1571
    local Offset = Table.Offset or 360
1572
    local Acel = Table.Acel or VT(0,0,0)
1573
    local Enabled = Table.Enabled or false
1574
    PRTCL.Parent = Parent
1575
    PRTCL.Size = NumberSequence.new(Size1,Size2)
1576
    PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
1577
    PRTCL.Speed = NumberRange.new(Speed)
1578
    PRTCL.VelocitySpread = Offset
1579
    PRTCL.Drag = Drag
1580
    PRTCL.Acceleration = Acel
1581
    if Enabled == false then
1582
        PRTCL:Emit(Emit)
1583
        Debris:AddItem(PRTCL,Lifetime2)
1584
    else
1585
        PRTCL.Enabled = true
1586
    end
1587
    return PRTCL
1588
end
1589
function ParticleEmitter2(Table)
1590
    local PRTCL2 = Particle2:Clone()
1591
    local LockedToPart = Table.LTP or true
1592
    local Speed = Table.Speed or 0
1593
    local Drag = Table.Drag or 0
1594
    local Size1 = Table.Size1 or 1
1595
    local Size2 = Table.Size2 or 2
1596
    local Lifetime1 = Table.Lifetime1 or 1
1597
    local Lifetime2 = Table.Lifetime2 or 1
1598
    local Parent = Table.Parent or Torso
1599
    local Emit = Table.Emit or 100
1600
    local Offset = Table.Offset or 360
1601
    local Acel = Table.Acel or VT(0,0,0)
1602
    local Enabled = Table.Enabled or false
1603
    PRTCL2.Parent = Parent
1604
    PRTCL2.Size = NumberSequence.new(Size1,Size2)
1605
    PRTCL2.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
1606
    PRTCL2.Speed = NumberRange.new(Speed)
1607
    PRTCL2.VelocitySpread = Offset
1608
    PRTCL2.Drag = Drag
1609
    PRTCL2.Acceleration = Acel
1610
        PRTCL2.Parent = Parent
1611
        PRTCL2.Size = NumberSequence.new(Size1,Size2)
1612
        PRTCL2.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
1613
        PRTCL2.Speed = NumberRange.new(Speed)
1614
        PRTCL2.VelocitySpread = Offset
1615
        PRTCL2.Drag = Drag
1616
        PRTCL2.Acceleration = Acel
1617
        PRTCL2.LockedToPart = true
1618
    if Enabled == false then
1619
        PRTCL2:Emit(Emit)
1620
        Debris:AddItem(PRTCL2,Lifetime2)
1621
    else
1622
        PRTCL2.Enabled = true
1623
    end
1624
    return PRTCL2
1625
end
1626
function ParticleEmitter3(Table)
1627
    local PRTCL3 = Particle2:Clone()
1628
    local Speed = Table.Speed or 0
1629
    local Drag = Table.Drag or 0
1630
    local Size1 = Table.Size1 or 1
1631
    local Size2 = Table.Size2 or 2
1632
    local Lifetime1 = Table.Lifetime1 or 1
1633
    local Lifetime2 = Table.Lifetime2 or 1
1634
    local Parent = Table.Parent or Torso
1635
    local Emit = Table.Emit or 100
1636
    local Offset = Table.Offset or 0
1637
    local Acel = Table.Acel or VT(0,0,0)
1638
    local Enabled = Table.Enabled or false
1639
    PRTCL3.Parent = Parent
1640
    PRTCL3.Size = NumberSequence.new(Size1,Size2)
1641
    PRTCL3.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
1642
    PRTCL3.Speed = NumberRange.new(Speed)
1643
    PRTCL3.VelocitySpread = Offset
1644
    PRTCL3.Drag = Drag
1645
    PRTCL3.Acceleration = Acel
1646
        PRTCL3.Parent = Parent
1647
        PRTCL3.Size = NumberSequence.new(Size1,Size2)
1648
        PRTCL3.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
1649
        PRTCL3.Speed = NumberRange.new(Speed)
1650
        PRTCL3.VelocitySpread = Offset
1651
        PRTCL3.Drag = Drag
1652
        PRTCL3.Acceleration = Acel
1653
    if Enabled == false then
1654
        PRTCL3:Emit(Emit)
1655
        Debris:AddItem(PRTCL3,Lifetime2)
1656
    else
1657
        PRTCL3.Enabled = true
1658
    end
1659
    return PRTCL3
1660
end
1661
1662
local Particle = IT("ParticleEmitter",nil)
1663
Particle.Enabled = false
1664
Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
1665
Particle.LightEmission = 0.5
1666
Particle.Rate = 150
1667
Particle.ZOffset = 0.2
1668
Particle.Rotation = NumberRange.new(-180, 180)
1669
Particle.RotSpeed = NumberRange.new(-180, 180)
1670
Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
1671
Particle.Color = ColorSequence.new(C3(1,0,0),C3(0.4,0,0))
1672
1673
--ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
1674
function ParticleEmitter(Table)
1675
	local PRTCL = Particle:Clone()
1676
	local Speed = Table.Speed or 5
1677
	local Drag = Table.Drag or 0
1678
	local Size1 = Table.Size1 or 1
1679
	local Size2 = Table.Size2 or 5
1680
	local Lifetime1 = Table.Lifetime1 or 1
1681
	local Lifetime2 = Table.Lifetime2 or 1.5
1682
	local Parent = Table.Parent or Torso
1683
	local Emit = Table.Emit or 100
1684
	local Offset = Table.Offset or 360
1685
	local Acel = Table.Acel or VT(0,0,0)
1686
	local Enabled = Table.Enabled or false
1687
	PRTCL.Parent = Parent
1688
	PRTCL.Size = NumberSequence.new(Size1,Size2)
1689
	PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
1690
	PRTCL.Speed = NumberRange.new(Speed)
1691
	PRTCL.VelocitySpread = Offset
1692
	PRTCL.Drag = Drag
1693
	PRTCL.Acceleration = Acel
1694
	if Enabled == false then
1695
		PRTCL:Emit(Emit)
1696
		Debris:AddItem(PRTCL,Lifetime2)
1697
	else
1698
		PRTCL.Enabled = true
1699
	end
1700
	return PRTCL
1701
end
1702
1703
local Handle = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.6,0.2),false)
1704
local RightArmGrasp = CreateWeldOrSnapOrMotor("Weld", Handle, RightArm, Handle, CF(0,-1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.21, 0))
1705
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
1706
MakeForm(Part,"Wedge")
1707
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.3, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0))
1708
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.3,0.2),false)
1709
MakeForm(Part,"Wedge")
1710
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(180)), CF(0, 0, 0))
1711
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.3,0.3),false)
1712
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1713
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.5,0.5),false)
1714
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1715
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.4,0.4,0.4),false)
1716
MakeForm(Part,"Cyl")
1717
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
1718
for i = 1, 8 do
1719
	local Piece = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0,0.35,0.41),false)
1720
	CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
1721
end
1722
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.38,0.41,0.38),false)
1723
MakeForm(Part,"Cyl")
1724
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
1725
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.37,0.5,0.37),false)
1726
MakeForm(Part,"Ball")
1727
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.3) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
1728
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.7,0.4),false)
1729
MakeForm(Part,"Wedge")
1730
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.7, 0.5) * ANGLES(RAD(90), RAD(180), RAD(180)), CF(0, 0, 0))
1731
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.4,0.2),false)
1732
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1733
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.35,0.35,0.35),false)
1734
MakeForm(Part,"Cyl")
1735
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
1736
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.5),false)
1737
MakeForm(Part,"Cyl")
1738
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
1739
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.45),false)
1740
MakeForm(Part,"Cyl")
1741
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1.1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
1742
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
1743
MakeForm(Part,"Wedge")
1744
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0))
1745
local LASTPART = Handle
1746
for i = 1, 10 do
1747
	if LASTPART == Handle then
1748
		local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.2,0),false)
1749
		LASTPART = Part
1750
		CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.1, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
1751
	else
1752
		local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.05,0),false)
1753
		CreateWeldOrSnapOrMotor("Weld", Handle, LASTPART, Part, CF(0, 0.025, 0) * ANGLES(RAD(8), RAD(0), RAD(0)), CF(0, -0.025, 0))
1754
		LASTPART = Part
1755
	end
1756
end
1757
1758
local Barrel = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.15,2,0.15),false)
1759
MakeForm(Barrel,"Cyl")
1760
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Barrel, CF(0, -0.6, 1.8) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
1761
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.25,1,0.25),false)
1762
MakeForm(Part,"Cyl")
1763
CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, -0.6, 0), CF(0, 0, 0))
1764
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0.1,0.2),false)
1765
MakeForm(Part,"Wedge")
1766
CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, 0.945, 0.1) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
1767
local Hole = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.125,0,0.125),false)
1768
MakeForm(Hole,"Cyl")
1769
CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Hole, CF(0, 0.98, 0), CF(0, 0, 0))
1770
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0,0),false)
1771
local GEARWELD = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
1772
CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.8,0.8,1.5), VT(0,0,0.2))
1773
local Part = CreatePart(3, Weapon, "Metal", 0, 0.5, "Mid gray", "Eye", VT(0,0,0),false)
1774
local GEARWELD2 = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
1775
CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.9,0.9,0.3), VT(0,0,0.2))
1776
coroutine.resume(coroutine.create(function()
1777
	while wait() do
1778
		GEARWELD.C0 = GEARWELD.C0 * ANGLES(RAD(0), RAD(0), RAD(5))
1779
		GEARWELD2.C0 = GEARWELD2.C0 * ANGLES(RAD(0), RAD(0), RAD(-5))
1780
	end
1781
end))
1782
1783
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)})
1784
--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)})
1785
1786
for _, c in pairs(Weapon:GetDescendants()) do
1787
	if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
1788
		c.Material = "Glass"
1789
		c.Color = C3(0,0,0)
1790
	elseif c.ClassName == "Part" and c.Name == "Eye" then
1791
		c.Color = C3(1,0,0)
1792
		c.Material = "Neon"
1793
	end
1794
end
1795
1796
Weapon.Parent = Character
1797
for _, c in pairs(Weapon:GetChildren()) do
1798
	if c.ClassName == "Part" then
1799
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
1800
	end
1801
end
1802
1803
local BODY = {}
1804
for _, c in pairs(Character:GetDescendants()) do
1805
	if c:IsA("BasePart") and c.Name ~= "Handle" then
1806
		if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
1807
			c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
1808
		end
1809
		table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency,c.Size,c.Name})
1810
	elseif c:IsA("JointInstance") then
1811
		table.insert(BODY,{c,c.Parent,nil,nil,nil,nil,nil})
1812
	end
1813
end
1814
function refit()
1815
	Character.Parent = workspace
1816
	for e = 1, #BODY do
1817
		if BODY[e] ~= nil then
1818
			local STUFF = BODY[e]
1819
			local PART = STUFF[1]
1820
			local PARENT = STUFF[2]
1821
			local MATERIAL = STUFF[3]
1822
			local COLOR = STUFF[4]
1823
			local TRANSPARENCY = STUFF[5]
1824
			--local SIZE = STUFF[6]
1825
			local NAME = STUFF[7]
1826
			if PART.ClassName == "Part" and PART ~= RootPart then
1827
				PART.Material = MATERIAL
1828
				PART.Transparency = TRANSPARENCY
1829
				PART.Name = NAME
1830
			end
1831
			if PART.Parent ~= PARENT then
1832
				Humanoid:remove()
1833
				PART.Parent = PARENT
1834
				Humanoid = IT("Humanoid",Character)
1835
			end
1836
		end
1837
	end
1838
end
1839
1840
local SKILLTEXTCOLOR = C3(1,0,0)
1841
local SKILLFONT = "Antique"
1842
local SKILLTEXTSIZE = 7
1843
1844
Humanoid.Died:connect(function()
1845
	ATTACK = true
1846
end)
1847
1848
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")
1849
--[[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")
1850
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")
1851
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")
1852
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")
1853
]]
1854
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Banisher Bullet", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 1")
1855
--[[local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Ability 2", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 2")
1856
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 3")
1857
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 4")
1858
local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Mercy", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 5")
1859
]]
1860
function printbye(Name)
1861
	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, "}
1862
	warn(MESSAGES[MRANDOM(1,#MESSAGES)]..Name..".")	
1863
end
1864
1865
local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23-.20, 0, 0.84, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
1866
local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50+.20, 0, 0.84, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
1867
local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
1868
local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
1869
local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
1870
1871
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[E] Warp", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2")
1872
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[X] Lock of truth", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3")
1873
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[Q] Lift", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 4")
1874
local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[R] FINAL ATTACK", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 5")
1875
1876
workspace.ChildAdded:connect(function(instance)
1877
    for BANISH = 1, #TOBANISH do
1878
		if TOBANISH[BANISH] ~= nil then
1879
			if instance.Name == TOBANISH[BANISH] then
1880
				coroutine.resume(coroutine.create(function()
1881
					printbye(instance.Name)
1882
					instance:ClearAllChildren()
1883
					Debris:AddItem(instance,0.0005)
1884
				end))
1885
			end
1886
		end
1887
	end
1888
end)
1889
1890
--//=================================\\
1891
--||			DAMAGING
1892
--\\=================================//
1893
function ApplyAoE(POSITION,RANGE,FLING,BURN)
1894
	local CHILDREN = workspace:GetDescendants()
1895
	for index, CHILD in pairs(CHILDREN) do
1896
		if CHILD.ClassName == "Model" and CHILD ~= Character then
1897
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
1898
			if HUM then
1899
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
1900
				if TORSO then
1901
					if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
1902
						CHILD:BreakJoints()
1903
						if FLING ~= 0 then
1904
							for _, c in pairs(CHILD:GetChildren()) do
1905
								if c:IsA("BasePart") and c.Transparency == 0 then
1906
									if BURN == true then
1907
										Fire(c)
1908
									end
1909
									local bv = Instance.new("BodyVelocity") 
1910
									bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
1911
									bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
1912
									bv.Parent = c
1913
									Debris:AddItem(bv,0.05)
1914
								end
1915
							end
1916
						end
1917
					end
1918
				end
1919
			end
1920
		end
1921
	end
1922
end
1923
1924
function Banish(Foe)
1925
	if Foe then
1926
		coroutine.resume(coroutine.create(function()
1927
			--if game.Players:FindFirstChild(Foe.Name) then
1928
				table.insert(TOBANISH,Foe.Name)
1929
				printbye(Foe.Name)
1930
			--end
1931
			Foe.Archivable = true
1932
			local CLONE = Foe:Clone()
1933
			Foe:Destroy()
1934
			CLONE.Parent = Effects
1935
			CLONE:BreakJoints()
1936
			local MATERIALS = {"Glass","Neon"}
1937
			for _, c in pairs(CLONE:GetDescendants()) do
1938
				if c:IsA("BasePart") then
1939
					if c.Name == "Torso" or c.Name == "UpperTorso" or c == CLONE.PrimaryPart then
1940
 						CreateSound(340722848, c, 10, 1, false)
1941
					end
1942
					c.Anchored = true
1943
					c.Transparency = c.Transparency + 0.2
1944
					c.Material = MATERIALS[MRANDOM(1,2)]
1945
					c.Color = C3(1,0,0)
1946
					if c.ClassName == "MeshPart" then
1947
						c.TextureID = ""
1948
					end
1949
					if c:FindFirstChildOfClass("SpecialMesh") then
1950
						c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
1951
					end
1952
					if c:FindFirstChildOfClass("Decal") then
1953
						c:FindFirstChildOfClass("Decal"):remove()
1954
					end
1955
					c.Name = "Banished"
1956
					c.CanCollide = false
1957
				else
1958
					c:remove()
1959
				end
1960
			end
1961
			local A = false
1962
			for i = 1, 35 do
1963
				if A == false then
1964
					A = true
1965
				elseif A == true then
1966
					A = false
1967
				end
1968
				for _, c in pairs(CLONE:GetDescendants()) do
1969
					if c:IsA("BasePart") then
1970
						c.Anchored = true
1971
						c.Material = MATERIALS[MRANDOM(1,2)]
1972
						c.Transparency = c.Transparency + 0.8/35
1973
						if A == false then
1974
							c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
1975
						elseif A == true then
1976
							c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)						
1977
						end
1978
					end
1979
				end
1980
				Swait()
1981
			end
1982
			CLONE:remove()
1983
		end))
1984
	end
1985
end
1986
1987
function ApplyAoE(POSITION,RANGE,ISBANISH)
1988
	local CHILDREN = workspace:GetDescendants()
1989
	for index, CHILD in pairs(CHILDREN) do
1990
		if CHILD.ClassName == "Model" and CHILD ~= Character then
1991
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
1992
			if HUM then
1993
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
1994
				if TORSO then
1995
					if (TORSO.Position - POSITION).Magnitude <= RANGE then
1996
						if ISBANISH == true then
1997
							Banish(CHILD)
1998
						else
1999
							if ISBANISH == "Gravity" then
2000
								HUM.PlatformStand = true
2001
								if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
2002
									local grav = Instance.new("BodyPosition",TORSO)
2003
									grav.D = 15
2004
									grav.P = 20000
2005
									grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
2006
									grav.position = TORSO.Position
2007
									grav.Name = "V3BanishForce"..Player.Name
2008
								else
2009
									TORSO:FindFirstChild("V3BanishForce"..Player.Name).position = TORSO.Position+VT(0,0.3,0)
2010
									TORSO.RotVelocity = VT(MRANDOM(-25,25),MRANDOM(-25,25),MRANDOM(-25,25))
2011
								end
2012
							else
2013
								HUM.PlatformStand = false
2014
							end
2015
						end
2016
					elseif ISBANISH == "Gravity" then
2017
						if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
2018
							TORSO:FindFirstChild("V3BanishForce"..Player.Name):remove()
2019
							HUM.PlatformStand = false
2020
						end
2021
					end
2022
				end
2023
			end
2024
		end
2025
	end
2026
end
2027
2028
--//=================================\\
2029
--||	ATTACK FUNCTIONS AND STUFF
2030
--\\=================================//
2031
Player_Size = 1
2032
2033
function FireArc(Part,ToLocation,AmountOfTime,Height,DoesCourontine)
2034
    if DoesCourontine == false then
2035
        local Direction = CF(Part.Position,ToLocation)
2036
        local Distance = (Part.Position - ToLocation).magnitude
2037
        for i = 1, AmountOfTime do
2038
            Swait()
2039
            Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime)
2040
            Direction = Part.CFrame
2041
        end
2042
        Part:remove()
2043
    elseif DoesCourontine == true then
2044
        coroutine.resume(coroutine.create(function()
2045
            local Direction = CF(Part.Position,ToLocation)
2046
            local Distance = (Part.Position - ToLocation).magnitude
2047
            for i = 1, AmountOfTime do
2048
                Swait()
2049
                Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime)
2050
                Direction = Part.CFrame
2051
            end
2052
            Part:remove()
2053
        end))
2054
    end
2055
end
2056
2057
function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
2058
    local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
2059
    wave.Color = COLOR
2060
    local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
2061
    wave.CFrame = CFRAME
2062
    coroutine.resume(coroutine.create(function(PART)
2063
        for i = 1, WAIT do
2064
            Swait()
2065
            mesh.Scale = mesh.Scale + GROW
2066
            wave.Transparency = wave.Transparency + (1/WAIT)
2067
            if wave.Transparency > 0.99 then
2068
                wave:remove()
2069
            end
2070
        end
2071
    end))
2072
end
2073
2074
function CreateSwirl(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
2075
    local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
2076
    wave.Color = COLOR
2077
    local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
2078
    wave.CFrame = CFRAME
2079
    coroutine.resume(coroutine.create(function(PART)
2080
        for i = 1, WAIT do
2081
            Swait()
2082
            mesh.Scale = mesh.Scale + GROW
2083
            mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
2084
            if DOESROT == true then
2085
                wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
2086
            end
2087
            wave.Transparency = wave.Transparency + (0.5/WAIT)
2088
            if wave.Transparency > 0.99 then
2089
                wave:remove()
2090
            end
2091
        end
2092
    end))
2093
end
2094
2095
function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
2096
    local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
2097
    local mesh = nil
2098
    if KIND == "Base" then
2099
        mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
2100
    elseif KIND == "Thin" then
2101
        mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
2102
    elseif KIND == "Round" then
2103
        mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
2104
    end
2105
    wave.CFrame = CFRAME
2106
    coroutine.resume(coroutine.create(function(PART)
2107
        for i = 1, WAIT do
2108
            Swait()
2109
            mesh.Scale = mesh.Scale + GROW/10
2110
            wave.Transparency = wave.Transparency + (0.5/WAIT)
2111
            if wave.Transparency > 0.99 then
2112
                wave:remove()
2113
            end
2114
        end
2115
    end))
2116
end
2117
2118
function killnearest(position,range,maxstrength)
2119
    for i,v in ipairs(workspace:GetChildren()) do
2120
    local body = v:GetChildren()
2121
        for part = 1, #body do
2122
            if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
2123
                if(body[part].Position - position).Magnitude < range then
2124
                    if v.ClassName == "Model" then
2125
                        v:BreakJoints()
2126
                    end
2127
                    --table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2})
2128
                    local bv = Instance.new("BodyVelocity")
2129
                    bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
2130
                    bv.velocity = CF(position,body[part].Position).lookVector*maxstrength
2131
                    bv.Parent = body[part]
2132
                    Debris:AddItem(bv,0.2)
2133
                end
2134
            end
2135
        end
2136
        if v.ClassName == "Part" then
2137
            if v.Anchored == false and (v.Position - position).Magnitude < range then
2138
                --table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2})
2139
                v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
2140
            end
2141
        end
2142
    end
2143
end
2144
2145
function Supernova()
2146
    local HITFLOOR,HITPOS,NORMAL = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 7 * Player_Size, Character)
2147
    if HITFLOOR ~= nil then
2148
        local HITBODIES = {}
2149
        ATTACK = true
2150
        Rooted = true
2151
        local ABSOLUTE = CreatePart(3, Effects, "Neon", 0, 1, "Relly red", "Star", VT(0,0,0))
2152
        MakeForm(ABSOLUTE,"Ball")
2153
        CreateSound("429459101", ABSOLUTE, 10, 1)
2154
        for i=0, 4, 0.1 / Animation_Speed do
2155
            Swait()
2156
            ABSOLUTE.Size = ABSOLUTE.Size + VT(0.2,0.2,0.2)
2157
            ABSOLUTE.CFrame = RootPart.CFrame*CF(0,5+(ABSOLUTE.Size.Y/2),0)
2158
            ABSOLUTE.Transparency = ABSOLUTE.Transparency - 0.01
2159
            local CHARGE = CreatePart(3, Effects, "Neon", 0, 0, "Lime green", "Star", VT(1,1,1))
2160
            MakeForm(CHARGE,"Ball")
2161
            CHARGE.Color = C3(255,0,0)
2162
            CHARGE.CFrame = CF(RootPart.Position) * CF(MRANDOM(-15,15),-6,MRANDOM(-15,15))
2163
            FireArc(CHARGE,ABSOLUTE.Position,45,45,true)
2164
            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)
2165
            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)
2166
            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)
2167
            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)
2168
            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)
2169
            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)
2170
        end
2171
        CreateSound("907330103", Head, 10, 1.2)
2172
        for i = 1, 75 do
2173
            Swait()
2174
            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)
2175
            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)
2176
            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)
2177
            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)
2178
            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)
2179
            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)
2180
        end
2181
        coroutine.resume(coroutine.create(function()
2182
            for i = 1, 13 do
2183
                for e = 1, 8 do
2184
                    Swait()
2185
                    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))
2186
                    CreateSwirl(ABSOLUTE.Size/2,15,CF(HITPOS),true,15,BRICKC"Reakky red".Color,VT(i,0.3,i)*2)
2187
                end
2188
                for i = 1, 5 do
2189
                    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)
2190
                    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))
2191
                end
2192
                CreateSwirl(ABSOLUTE.Size/2,25,CF(ABSOLUTE.Position),true,-25,BRICKC"Relly red".Color,VT(i,i*2,i))
2193
                CreateSwirl(ABSOLUTE.Size/2,55,CF(ABSOLUTE.Position),true,25,C3(255,0,0),VT(i,i*2,i))
2194
                CreateSound("168586621", ABSOLUTE, 4, 0.8)
2195
                CreateSound("201858144", ABSOLUTE, 10, 0.8)
2196
                killnearest(ABSOLUTE.Position,i*18,i)
2197
                ABSOLUTE.Size = ABSOLUTE.Size*0.9
2198
                MagicSphere(ABSOLUTE.Size,25,CF(ABSOLUTE.Position),BRICKC"Relly red".Color,VT(i,i,i)/1.1)
2199
                MagicSphere(ABSOLUTE.Size,45,CF(ABSOLUTE.Position),C3(255,0,0),VT(i,i,i))
2200
            end
2201
            ABSOLUTE.Transparency = 1
2202
            Debris:AddItem(ABSOLUTE,10)
2203
        end))
2204
        ATTACK = false
2205
        Rooted = false
2206
    end
2207
end
2208
 
2209
2210
local ENERGYSOUND = 1417051162
2211
local BEAMSOUND = 1417056781
2212
local EXPLOSIONSOUND = 1417056081
2213
local BasePart = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Lime green", "BraceletPart", VT(1.01,0.3,1.01),false)
2214
2215
function Charge(TIME,GYRO)
2216
    local SND = CreateSound(ENERGYSOUND,Torso,6,TIME,false)
2217
    local G = nil
2218
    if GYRO == true then
2219
        G = IT("BodyGyro",RootPart)
2220
        G.D = 250
2221
        G.P = 200000
2222
        G.MaxTorque = VT(math.huge,math.huge,math.huge)
2223
    end
2224
    for i=0, TIME, 0.1 / Animation_Speed do
2225
        Swait()
2226
        if G then
2227
            G.cframe = CF(RootPart.Position,Mouse.Hit.p)
2228
        end
2229
        WACKYEFFECT({TIME = 25, EffectType = "Sphere", Size = VT(1.2,1.2,1.2), Size2 = VT(0,0,0), Transparency = 0.5, Transparency2 = 1, CFrame = BasePart.CFrame, MoveToPos = BasePart.CFrame*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,-4).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = SKILLTEXTCOLOR, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
2230
        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)
2231
        Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
2232
        RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
2233
        LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(45)) * LEFTSHOULDERC0, 2 / Animation_Speed)
2234
        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)
2235
        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)
2236
    end
2237
    SND:remove()
2238
    if G then
2239
        return G
2240
    end
2241
end
2242
2243
function Warp()
2244
	local HITFLOOR,HITPOS = Raycast(Mouse.Hit.p+VT(0,1,0), (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 100, Character)
2245
	if HITFLOOR then
2246
		CharacterFade(C3(0.5,0,0),50)
2247
		HITPOS = HITPOS + VT(0,3.5,0)
2248
		local POS = RootPart.Position
2249
		RootPart.CFrame = CF(HITPOS,CF(POS,HITPOS)*CF(0,0,-100000).p)
2250
		CreateSound(289556450,Torso,2,MRANDOM(8,13)/10,false)
2251
	end
2252
end
2253
2254
function Prison_Key()
2255
	if Mouse.Target ~= nil then
2256
		if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
2257
			local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
2258
			local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
2259
			local GYRO = IT("BodyGyro",RootPart)
2260
			GYRO.D = 750
2261
			GYRO.P = 20000
2262
			GYRO.MaxTorque = VT(0,40000000,0)
2263
			local grav = Instance.new("BodyPosition",TORSO)
2264
			grav.D = 15
2265
			grav.P = 20000
2266
			grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
2267
			grav.position = TORSO.Position
2268
			local GYRO2 = IT("BodyGyro",TORSO)
2269
			GYRO2.D = 750
2270
			GYRO2.P = 20000
2271
			GYRO2.MaxTorque = VT(0,40000000,0)
2272
			GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
2273
			grav.Name = "Jail"
2274
			local LOCKPARTS = {}
2275
			ATTACK = true
2276
			Rooted = false
2277
			local LOCK = IT("Model",Effects)
2278
			LOCK.Name = "Lock"
2279
			local LOCK2 = IT("Model",LOCK)
2280
			LOCK2.Name = "Metal"
2281
			--CREATE LOCK--
2282
				local BASE = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Keylock", VT(3, 2.5, 1))
2283
				LOCK.PrimaryPart = BASE
2284
				BASE.CFrame = CF(TORSO.Position,RootPart.Position)*CF(0,0,-4)
2285
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Keylock", VT(3, 1, 3))
2286
				PRT.CFrame = BASE.CFrame*CF(0,-1.25,0)*ANGLES(RAD(90),RAD(0),RAD(0))
2287-
				local BASE = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 2.5, 1))
2287+
2288
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "Really Black, "Hole", VT(1, 1, 1))
2289
				PRT.Color = C3(0,0,0)
2290-
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 1, 3))
2290+
2291
				MakeForm(PRT,"Cyl")
2292
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "Really Black", "Hole", VT(0.5, 1, 1))
2293-
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(1, 1, 1))
2293+
2294
				PRT.CFrame = BASE.CFrame*CF(0,-0.2,-0.01)
2295
				for i = 1, 45 do
2296
					local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
2297-
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(0.5, 1, 1))
2297+
2298
				end
2299
				local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
2300
				PRT.CFrame = BASE.CFrame*CF(0,1.5,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0)
2301
				LOCK2.PrimaryPart = PRT
2302
			---------------
2303
			local CHILDREN = LOCK:GetDescendants()
2304
			for index, CHILD in pairs(CHILDREN) do
2305
				if CHILD:IsA("BasePart") then
2306
					CHILD.Transparency = 1
2307
				end
2308
			end
2309
			for i = 1, 75 do
2310
				LOCK:SetPrimaryPartCFrame(CF(TORSO.Position,RootPart.Position)*CF(0,0,-4))
2311
				Swait()
2312
				GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
2313
				GYRO.cframe = CF(RootPart.Position,TORSO.Position)
2314
				local CHILDREN = LOCK:GetDescendants()
2315
				for index, CHILD in pairs(CHILDREN) do
2316
					if CHILD:IsA("BasePart") then
2317
						CHILD.Transparency = CHILD.Transparency - 1/75
2318
					end
2319
				end
2320
			end
2321
			HUM.DisplayDistanceType = "None"
2322
			local KEY = IT("Model",Effects)
2323
			KEY.Name = "Key"
2324
			--CREATE KEY--
2325
				local KBASE = CreatePart(3, KEY, "Neon", 0, 0, "White", "KeyBase", VT(0.1, 1, 0.1),false)
2326
				KEY.PrimaryPart = KBASE
2327
				KBASE.CFrame = RightArm.CFrame*CF(0,-2.1,0)*ANGLES(RAD(0),RAD(90),RAD(0))
2328
				local WLD = weldBetween(RightArm,KBASE)
2329
				for i = 1, 45 do
2330-
				local KBASE = CreatePart(3, KEY, "Neon", 0, 0, "Really red", "KeyBase", VT(0.1, 1, 0.1),false)
2330+
					local PRT = CreatePart(3, KEY, "Neon", 0, 0, "White", "Key", VT(0.1, 0.1, 0.1),false)
2331
					PRT.CFrame = KBASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD((360/45*i)))*CF(0,0.25,0)
2332
					weldBetween(KBASE,PRT)
2333
				end
2334
				local PRT = CreatePart(3, KEY, "Neon", 0, 0, "White", "Key", VT(0.3, 0.1, 0.1),false)
2335-
					local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Really red", "Key", VT(0.1, 0.1, 0.1),false)
2335+
2336
				weldBetween(KBASE,PRT)
2337
				local PRT = CreatePart(3, KEY, "Neon", 0, 0, "White", "Key", VT(0.3, 0.1, 0.1),false)
2338
				PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.25,0)
2339-
				local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Really red", "Key", VT(0.3, 0.1, 0.1),false)
2339+
2340
			--------------
2341
			Rooted = true
2342-
				local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Really red", "Key", VT(0.3, 0.1, 0.1),false)
2342+
2343
			coroutine.resume(coroutine.create(function()
2344
				for i = 1, 10 do
2345
					Swait()
2346
					GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
2347
					GYRO.cframe = CF(RootPart.Position,TORSO.Position)
2348
				end
2349
				CreateSound(1149318312,BASE,5,1,false)
2350
				CreateSound(160772554,BASE,3,1,false)
2351
				LOCK2:SetPrimaryPartCFrame(BASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0))
2352
				for i = 1, 4 do
2353
					WACKYEFFECT({Time = 35, EffectType = "Crystal", Size = VT(1,1,1), Size2 = VT(0,15,0), Transparency = 0, Transparency2 = 1, CFrame = BASE.CFrame*CF(1,1.45,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Really red".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
2354
				end
2355
				WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(1,1,1)*25, Transparency = 0, Transparency2 = 1, CFrame = TORSO.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Really red".Color, SoundID = nil, SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
2356
				wait(1)
2357
				TORSO.Parent.Parent = LOCK
2358
				for i = 1, 75 do
2359
					Swait()
2360
					local CHILDREN = KEY:GetDescendants()
2361
					for index, CHILD in pairs(CHILDREN) do
2362
						if CHILD:IsA("BasePart") then
2363
							CHILD.Transparency = i/25
2364
						end
2365
					end
2366
					local CHILDREN = LOCK:GetDescendants()
2367
					for index, CHILD in pairs(CHILDREN) do
2368
						if CHILD:IsA("BasePart") and CHILD.Name ~= "HumanoidRootPart" then
2369
							CHILD.Transparency = CHILD.Transparency + 1/75
2370
						elseif CHILD.ClassName == "Decal" then
2371
							CHILD.Transparency = CHILD.Transparency + 1/75
2372
						end
2373
					end
2374
				end
2375
				TORSO.Parent:ClearAllChildren()
2376
				KEY:remove()
2377
				LOCK:remove()
2378
			end))
2379
			Pose("Turn key",0.8,1.2,false,GYRO,TORSO)
2380
			GYRO:remove()
2381
			ATTACK = false
2382
			Rooted = false
2383
		end
2384
	end
2385
end
2386
2387
function Lift()
2388
	if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
2389
		local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
2390
		local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
2391
		if TORSO and HUM.Health > 0 then
2392
			ATTACK = true
2393
			Rooted = false
2394
			local GYRO = IT("BodyGyro",RootPart)
2395
			GYRO.D = 275
2396
			GYRO.P = 20000
2397
			GYRO.MaxTorque = VT(0,40000,0)
2398
			for i=0, 0.8, 0.1 / Animation_Speed do
2399
				Swait()
2400
				GYRO.cframe = CF(RootPart.Position,TORSO.Position)
2401
				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)
2402
				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)
2403
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.5) * ANGLES(RAD(0), RAD(0), RAD(-85)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2404
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.15, -0.5) * ANGLES(RAD(-15), RAD(0), RAD(85)) * LEFTSHOULDERC0, 1 / Animation_Speed)
2405
				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)
2406
				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)
2407
			end			
2408
			local MAGIC = ParticleEmitter({Speed = 5, Drag = 3, Size1 = 1.7, Size2 = 0, Lifetime1 = 1, Lifetime2 = 3, Parent = TORSO, Emit = 100, Offset = 360, Enabled = true})
2409
			MAGIC.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(1,0)})
2410
			local grav = Instance.new("BodyPosition",TORSO)
2411
			grav.D = 1500
2412
			grav.P = 20000
2413
			grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
2414
			grav.position = TORSO.Position+VT(0,15,0)
2415
			Debris:AddItem(grav,10)
2416
			Debris:AddItem(MAGIC,10)
2417
			CreateSound(902204346, Torso, 7, 1, false)
2418
			CreateSound(902204346, TORSO, 7, 1, false)
2419
			for i=0, 1, 0.1 / Animation_Speed do
2420
				Swait()
2421
				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)
2422
				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)
2423
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(125), RAD(-45), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2424
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(125), RAD(45), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
2425
				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)
2426
				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)
2427
			end
2428
			GYRO:remove()
2429
			ATTACK = false
2430
			Rooted = false
2431
		end
2432
	end
2433
end
2434
2435
function TAUNT1()
2436
	ATTACK = true
2437
	Rooted = false
2438
	CreateSound(865772398, Torso, 6, 1, false)
2439
	for i=0, 0.1, 0.1 / Animation_Speed do
2440
		Swait()
2441
		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(25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2442
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2443
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2444
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(5-3 * COS(SINE / 6)), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
2445
	end
2446
	for i=0, 1, 0.1 / Animation_Speed do
2447
		Swait()
2448
		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(25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2449
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2450
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2451
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.15, 0.5, -0.4) * ANGLES(RAD(-25-3 * COS(SINE / 6)), RAD(25), RAD(90)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
2452
	end
2453
	for i=0, 1, 0.1 / Animation_Speed do
2454
		Swait()
2455
		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(25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2456
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2457
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2458
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25-3 * COS(SINE / 6)), RAD(0), RAD(-90)) * ANGLES(RAD(0), RAD(90), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
2459
	end
2460
	ATTACK = false
2461
	Rooted = false
2462
end
2463
2464
function TAUNT2()
2465
	ATTACK = true
2466
	Rooted = false
2467
	for i=0, 1, 0.1 / Animation_Speed do
2468
		Swait()
2469
		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(25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2470
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2471
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2472
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.25 * COS(SINE / 12), 0.4) * ANGLES(RAD(-45), RAD(0 + 2.5 * SIN(SINE / 12)), RAD(35 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
2473
	end
2474
	ATTACK = false
2475
	Rooted = false
2476
end
2477
2478
function EMOTE()
2479
	ATTACK = true
2480
	Rooted = false
2481
	local LOOP = 0
2482
	for i=0, 0.1, 0.1 / Animation_Speed do
2483
		Swait()
2484
		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)
2485
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-15 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2486
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2487
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(5-3 * COS(SINE / 6)), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
2488
	end
2489
	for i=0, 3, 0.1 / Animation_Speed do
2490
		Swait()
2491
		LOOP = LOOP + 1
2492
		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(5 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2493
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-5 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2494
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2495
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.8, 0.4) * ANGLES(RAD(170), RAD(0), RAD(-25 - 25 * SIN(LOOP / 5))) * ANGLES(RAD(0), RAD(-45), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
2496
	end
2497
	for i=0, 0.1, 0.1 / Animation_Speed do
2498
		Swait()
2499
		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(25 + 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2500
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25 - 2.5 * SIN(SINE / 12))), 1 / Animation_Speed)
2501
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.15 + 0.25 * COS(SINE / 12), -0.3) * ANGLES(RAD(140), RAD(0 - 2.5 * SIN(SINE / 12)), RAD(5 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2502
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.4) * ANGLES(RAD(5-3 * COS(SINE / 6)), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
2503
	end
2504
	ATTACK = false
2505
	Rooted = false
2506
end
2507
2508
function Banisher_Bullet()
2509
	ATTACK = true
2510
	Rooted = false
2511
	for i=0, 0.4, 0.1 / Animation_Speed do
2512
		Swait()
2513
		turnto(Mouse.Hit.p)
2514
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
2515
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
2516
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
2517
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
2518
		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)
2519
		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)
2520
	end
2521
	repeat
2522
		for i=0, 0.2, 0.1 / Animation_Speed do
2523
			Swait()
2524
			turnto(Mouse.Hit.p)
2525
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
2526
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
2527
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
2528
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
2529
			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)
2530
			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)
2531
		end
2532
		local HIT,POS = CastProperRay(Hole.Position, Mouse.Hit.p, 1000, Character)
2533
		SpawnTrail(Hole.Position,POS)
2534
		if HIT ~= nil then
2535
			if HIT.Parent ~= workspace and HIT.Parent.ClassName ~= "Folder" then
2536
				Banish(HIT.Parent)
2537
			end
2538
		end
2539
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(1,1.5,1), 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})
2540
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = 2025904932, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 10})
2541
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), 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})
2542
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), 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})
2543
		for i=0, 0.3, 0.1 / Animation_Speed do
2544
			Swait()
2545-
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), 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})
2545+
2546
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.25 / Animation_Speed)
2547
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(15), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
2548
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
2549
			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)
2550
			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)
2551
		end
2552
	until KEYHOLD == false
2553
	ATTACK = false
2554
	Rooted = false
2555
end
2556
2557
function AttackTemplate()
2558
	ATTACK = true
2559
	Rooted = false
2560
	for i=0, 1, 0.1 / Animation_Speed do
2561
		Swait()
2562
		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)
2563
		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)
2564
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
2565
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
2566
		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)
2567
		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)
2568
	end
2569
	ATTACK = false
2570
	Rooted = false
2571
end
2572
2573
--//=================================\\
2574
--||	  ASSIGN THINGS TO KEYS
2575
--\\=================================//
2576
2577
function MouseDown(Mouse)
2578
	HOLD = true
2579
	if ATTACK == false then
2580
	end
2581
end
2582
2583
function MouseUp(Mouse)
2584
HOLD = false
2585
end
2586
2587
function KeyDown(Key)
2588
	KEYHOLD = true
2589
	if Key == "z" and ATTACK == false then
2590
		Banisher_Bullet()
2591
	end
2592
2593
	if Key == "b" and ATTACK == false then
2594
	end
2595
2596
	if Key == "t" and ATTACK == false then
2597
		TAUNT1()
2598
	end
2599
2600
	if Key == "q" and ATTACK == false then
2601
		Lift()
2602
	end
2603
	
2604
	if Key == "e" and ATTACK == false then
2605
		Warp()
2606
	end
2607
	
2608
	if Key == "r" and ATTACK == false then
2609
		Supernova()
2610
	end
2611
	
2612
	if Key == "x" and ATTACK == false then
2613
		Prison_Key()
2614
	end
2615
2616
	if Key == "c" and ATTACK == false then
2617
	end
2618
2619
	if Key == "v" and ATTACK == false then
2620
	end
2621
2622
	if Key == "x" and ATTACK == false then
2623
	end
2624
end
2625
2626
function KeyUp(Key)
2627
	KEYHOLD = false
2628
end
2629
2630
	Mouse.Button1Down:connect(function(NEWKEY)
2631
		MouseDown(NEWKEY)
2632
	end)
2633
	Mouse.Button1Up:connect(function(NEWKEY)
2634
		MouseUp(NEWKEY)
2635
	end)
2636
	Mouse.KeyDown:connect(function(NEWKEY)
2637
		KeyDown(NEWKEY)
2638
	end)
2639
	Mouse.KeyUp:connect(function(NEWKEY)
2640
		KeyUp(NEWKEY)
2641
	end)
2642
2643
--//=================================\\
2644
--\\=================================//
2645
2646
2647
function unanchor()
2648
	if UNANCHOR == true then
2649
		g = Character:GetChildren()
2650
		for i = 1, #g do
2651
			if g[i].ClassName == "Part" then
2652
				g[i].Anchored = false
2653
			end
2654
		end
2655
	end
2656
end
2657
2658
2659
--//=================================\\
2660
--||	WRAP THE WHOLE SCRIPT UP
2661
--\\=================================//
2662
2663
Humanoid.Changed:connect(function(Jump)
2664
    if Jump == "Jump" and (Disable_Jump == true) then
2665
        Humanoid.Jump = false
2666
    end
2667
end)
2668
 
2669
while true do
2670
    Swait()
2671
    Humanoid.HipHeight = 1.5
2672
    script.Parent = WEAPONGUI
2673
    ANIMATE.Parent = nil
2674
    if Humanoid then
2675
        local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
2676
        IDLEANIMATION:Play()
2677
    end
2678
    SINE = SINE + CHANGE
2679
    local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
2680
    local TORSOVERTICALVELOCITY = RootPart.Velocity.y
2681
    local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
2682
    if ATTACK == false then
2683
        if TORSOVELOCITY < 1 then
2684
            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(25)), 1 / Animation_Speed)
2685
            Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25)), 1 / Animation_Speed)
2686
            RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.35 + 0.15 * COS(SINE / 12), 0) * ANGLES(RAD(110), RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(35 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2687
            LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.35 + 0.15 * COS(SINE / 12), 0) * ANGLES(RAD(140 - 12 * SIN(SINE / 12)), RAD(15 + 2.5 * SIN(SINE / 12)), RAD(-35 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
2688
            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)
2689
            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)
2690
        elseif TORSOVELOCITY > 1 then
2691
            RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.25 * COS(SINE / 12)) * ANGLES(RAD(25 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(25)), 1 / Animation_Speed)
2692
            Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 + 4.5 * SIN(SINE / 12)), RAD(0), RAD(-25)), 1 / Animation_Speed)
2693
            RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.35 + 0.15 * COS(SINE / 12), 0) * ANGLES(RAD(110), RAD(-15 - 2.5 * SIN(SINE / 12)), RAD(35 + 7.5 * SIN(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
2694
            LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.35 + 0.15 * COS(SINE / 12), 0) * ANGLES(RAD(140 - 12 * SIN(SINE / 12)), RAD(15 + 2.5 * SIN(SINE / 12)), RAD(-35 - 7.5 * SIN(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
2695
            RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(-25-2.5 * SIN(SINE / 12)), RAD(75), RAD(0)) * ANGLES(RAD(-8 - 5.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
2696
            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)
2697
        end
2698
    end
2699
    RightArmGrasp.C0 = Clerp(RightArmGrasp.C0, CF(0, -0.815+0.05 * SIN(SINE / 12), 0) * ANGLES(RAD(90-4.5 * SIN(SINE / 12)), RAD(-1.5 * SIN(SINE / 12)), RAD(0)), 1 / Animation_Speed)
2700
    unanchor()
2701
    Humanoid.MaxHealth = "inf"
2702
    Humanoid.Health = "inf"
2703
    if Rooted == false then
2704
        Disable_Jump = false
2705
        Humanoid.WalkSpeed = Speed
2706
    elseif Rooted == true then
2707
        Disable_Jump = true
2708
        Humanoid.WalkSpeed = 0
2709
    end
2710
        for _, c in pairs(Character:GetDescendants()) do
2711
        if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
2712
            c.Material = "Neon"
2713
            c.Color = C3(1,1,1)
2714
            if c:FindFirstChildOfClass("SpecialMesh") then
2715
                c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
2716
            end
2717
            if c == Head then
2718
                if c:FindFirstChild("face") then
2719
                    c.face:remove()
2720
                end
2721
            end
2722
        elseif c.ClassName == "Part" and c.Name == "Eye" then
2723
            c.Color = C3(1,0,0)
2724
            c.Material = "Neon"
2725
        elseif c.ClassName == "CharacterMesh" or c.Name == "Body Colors" then
2726
            c:remove()
2727
        elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
2728
            c:remove()
2729
        end
2730
    end
2731
    refit()
2732
    Humanoid.Name = "Deadeyes"
2733
    sick.Parent = Torso
2734
    sick:resume()
2735
    sick.Volume = 5
2736
    sick.Pitch = 1
2737
    sick.SoundId = "rbxassetid://1167151479"
2738
    if Head:FindFirstChildOfClass("Sound") then
2739
        Head:FindFirstChildOfClass("Sound"):remove()
2740
    end
2741
end
2742-
    sick.SoundId = "rbxassetid://356064698"
2742+
2743
--//=================================\\
2744
--\\=================================//
2745
2746
2747
2748
2749
2750
--//====================================================\\--
2751
--||			  		 END OF SCRIPT
2752
--\\====================================================//--