View difference between Paste ID: 3b2BDexH and TiH60GhN
SHOW: | | - or go back to the newest paste.
1
--//====================================================\\--
2
--||              EDIT by 1x1x1x1x1x1x1x0x0x2
3
--\\====================================================//--
4
 
5
Player = game.Players.LocalPlayer
6
    Character = Player.Character
7
    local txt = Instance.new("BillboardGui", Character)
8
    txt.Adornee = Character.Head
9
    txt.Name = "_status"
10
    txt.Size = UDim2.new(2, 0, 1.2, 0)
11
    txt.StudsOffset = Vector3.new(-9, 8, 0)
12
    local text = Instance.new("TextLabel", txt)
13
    text.Size = UDim2.new(10, 0, 7, 0)
14
    text.FontSize = "Size24"
15
    text.TextScaled = true
16
    text.TextTransparency = 0
17
    text.BackgroundTransparency = 1
18
    text.TextTransparency = 0
19
    text.TextStrokeTransparency = 0
20
    text.Font = "Code"
21
    text.TextStrokeColor3 = Color3.new(0,1,1)
22
        text.Text = Player.Name.." The Ice King"
23
        print("Edited by 1x1x1x1x1x1x1x0x0x2")
24
25
--//====================================================\\--
26
--||			   CREATED BY SHACKLUSTER
27
--\\====================================================//--
28
29
30
31
wait(0.2)
32
33
34
35
Player = game:GetService("Players").LocalPlayer
36
PlayerGui = Player.PlayerGui
37
Cam = workspace.CurrentCamera
38
Backpack = Player.Backpack
39
Character = Player.Character
40
Humanoid = Character.Humanoid
41
Mouse = Player:GetMouse()
42
RootPart = Character["HumanoidRootPart"]
43
Torso = Character["Torso"]
44
Head = Character["Head"]
45
RightArm = Character["Right Arm"]
46
LeftArm = Character["Left Arm"]
47
RightLeg = Character["Right Leg"]
48
LeftLeg = Character["Left Leg"]
49
RootJoint = RootPart["RootJoint"]
50
Neck = Torso["Neck"]
51
RightShoulder = Torso["Right Shoulder"]
52
LeftShoulder = Torso["Left Shoulder"]
53
RightHip = Torso["Right Hip"]
54
LeftHip = Torso["Left Hip"]
55
local sick = Instance.new("Sound",Character)
56
sick.SoundId = "rbxassetid://204863573"
57
sick.Looped = true
58
sick.Pitch = 1
59
sick.Volume = 1
60
sick:Play()
61
62
IT = Instance.new
63
CF = CFrame.new
64
VT = Vector3.new
65
RAD = math.rad
66
C3 = Color3.new
67
UD2 = UDim2.new
68
BRICKC = BrickColor.new
69
ANGLES = CFrame.Angles
70
EULER = CFrame.fromEulerAnglesXYZ
71
COS = math.cos
72
ACOS = math.acos
73
SIN = math.sin
74
ASIN = math.asin
75
ABS = math.abs
76
MRANDOM = math.random
77
FLOOR = math.floor
78
79
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
80
	local NEWMESH = IT(MESH)
81
	if MESH == "SpecialMesh" then
82
		NEWMESH.MeshType = MESHTYPE
83
		if MESHID ~= "nil" and MESHID ~= "" then
84
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
85
		end
86
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
87
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
88
		end
89
	end
90
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
91
	NEWMESH.Scale = SCALE
92
	NEWMESH.Parent = PARENT
93
	return NEWMESH
94
end
95
96
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
97
	local NEWPART = IT("Part")
98
	NEWPART.formFactor = FORMFACTOR
99
	NEWPART.Reflectance = REFLECTANCE
100
	NEWPART.Transparency = TRANSPARENCY
101-
local Speed = 16
101+
102
	NEWPART.Locked = true
103
	NEWPART.Anchored = true
104
	if ANCHOR == false then
105
		NEWPART.Anchored = false
106
	end
107
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
108
	NEWPART.Name = NAME
109
	NEWPART.Size = SIZE
110
	NEWPART.Position = Torso.Position
111
	NEWPART.Material = MATERIAL
112
	NEWPART:BreakJoints()
113
	NEWPART.Parent = PARENT
114
	return NEWPART
115
end
116
117
--//=================================\\
118
--||		  CUSTOMIZATION
119
--\\=================================//
120
121
Player_Size = 1 --Size of the player.
122
Animation_Speed = 3
123
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
124
125
local Speed = 20
126
local Effects2 = {}
127
128
--//=================================\\
129
--|| 	  END OF CUSTOMIZATION
130
--\\=================================//
131
132
	local function weldBetween(a, b)
133
	    local weldd = Instance.new("ManualWeld")
134
	    weldd.Part0 = a
135
	    weldd.Part1 = b
136
	    weldd.C0 = CFrame.new()
137
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
138
	    weldd.Parent = a
139
	    return weldd
140
	end
141
142
function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
143
local acs = Instance.new("Part")
144
acs.CanCollide = false
145
acs.Anchored = false
146
acs.Size = Vector3.new(0,0,0)
147
acs.CFrame = attachmentpart.CFrame
148
acs.Parent = Character
149
acs.BrickColor = color
150
    local meshs = Instance.new("SpecialMesh")
151
    meshs.MeshId = mesh
152
    meshs.TextureId = texture
153
    meshs.Parent = acs
154
    meshs.Scale = scale
155
    meshs.Offset = offset
156
weldBetween(attachmentpart,acs)
157
end
158
159
function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
160
if TYPE == "Gem" then
161
	local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
162
	acs.Anchored = false
163
    acs.CanCollide = false
164
	acs.CFrame = PART.CFrame
165
	local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
166
weldBetween(PART,acs)
167
elseif TYPE == "Skull" then
168
	local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
169
	acs.Anchored = false
170
    acs.CanCollide = false
171
	acs.CFrame = PART.CFrame
172
	local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
173
weldBetween(PART,acs)
174
elseif TYPE == "Eye" then
175
	local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
176
	acs.Anchored = false
177
    acs.CanCollide = false
178
	acs.CFrame = PART.CFrame
179
	local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
180
weldBetween(PART,acs)
181
end
182
end
183
184
--//=================================\\
185
--|| 	      USEFUL VALUES
186
--\\=================================//
187
188
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
189
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
190
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
191
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
192
local CHANGEDEFENSE = 0
193
local CHANGEDAMAGE = 0
194
local CHANGEMOVEMENT = 0
195
local ANIM = "Idle"
196
local ATTACK = false
197
local EQUIPPED = false
198
local HOLD = false
199
local COMBO = 1
200
local Rooted = false
201
local SINE = 0
202
local KEYHOLD = false
203
local CHANGE = 2 / Animation_Speed
204
local WALKINGANIM = false
205
local WALK = 0
206
local VALUE1 = false
207
local VALUE2 = false
208
local ROBLOXIDLEANIMATION = IT("Animation")
209
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
210
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
211
--ROBLOXIDLEANIMATION.Parent = Humanoid
212
local WEAPONGUI = IT("ScreenGui", PlayerGui)
213
WEAPONGUI.Name = "Weapon GUI"
214
local Weapon = IT("Model")
215
Weapon.Name = "Adds"
216
local Effects = IT("Folder", Weapon)
217
Effects.Name = "Effects"
218
local ANIMATOR = Humanoid.Animator
219
local ANIMATE = Character.Animate
220
local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
221
local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
222
local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
223
local HITBLOCKSOUNDS = {"199148933", "199148947"}
224
local UNANCHOR = true
225
226
local SKILLTEXTCOLOR = BRICKC"Pastel blue-green".Color
227
228
--//=================================\\
229
--\\=================================//
230
231
232
--//=================================\\
233
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
234
--\\=================================//
235
236
ArtificialHB = Instance.new("BindableEvent", script)
237
ArtificialHB.Name = "ArtificialHB"
238
239
script:WaitForChild("ArtificialHB")
240
241
frame = Frame_Speed
242
tf = 0
243
allowframeloss = false
244
tossremainder = false
245
lastframe = tick()
246
script.ArtificialHB:Fire()
247
248
game:GetService("RunService").Heartbeat:connect(function(s, p)
249
	tf = tf + s
250
	if tf >= frame then
251
		if allowframeloss then
252
			script.ArtificialHB:Fire()
253
			lastframe = tick()
254
		else
255
			for i = 1, math.floor(tf / frame) do
256
				script.ArtificialHB:Fire()
257
			end
258
		lastframe = tick()
259
		end
260
		if tossremainder then
261
			tf = 0
262
		else
263
			tf = tf - frame * math.floor(tf / frame)
264
		end
265
	end
266
end)
267
268
--//=================================\\
269
--\\=================================//
270
271
272
273
274
275
--//=================================\\
276
--|| 	      SOME FUNCTIONS
277
--\\=================================//
278
279
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
280
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
281
end
282
283
function PositiveAngle(NUMBER)
284
	if NUMBER >= 0 then
285
		NUMBER = 0
286
	end
287
	return NUMBER
288
end
289
290
function NegativeAngle(NUMBER)
291
	if NUMBER <= 0 then
292
		NUMBER = 0
293
	end
294
	return NUMBER
295
end
296
297
function Swait(NUMBER)
298
	if NUMBER == 0 or NUMBER == nil then
299
		ArtificialHB.Event:wait()
300
	else
301
		for i = 1, NUMBER do
302
			ArtificialHB.Event:wait()
303
		end
304
	end
305
end
306
307
function QuaternionFromCFrame(cf)
308
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
309
	local trace = m00 + m11 + m22
310
	if trace > 0 then 
311
		local s = math.sqrt(1 + trace)
312
		local recip = 0.5 / s
313
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
314
	else
315
		local i = 0
316
		if m11 > m00 then
317
			i = 1
318
		end
319
		if m22 > (i == 0 and m00 or m11) then
320
			i = 2
321
		end
322
		if i == 0 then
323
			local s = math.sqrt(m00 - m11 - m22 + 1)
324
			local recip = 0.5 / s
325
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
326
		elseif i == 1 then
327
			local s = math.sqrt(m11 - m22 - m00 + 1)
328
			local recip = 0.5 / s
329
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
330
		elseif i == 2 then
331
			local s = math.sqrt(m22 - m00 - m11 + 1)
332
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
333
		end
334
	end
335
end
336
 
337
function QuaternionToCFrame(px, py, pz, x, y, z, w)
338
	local xs, ys, zs = x + x, y + y, z + z
339
	local wx, wy, wz = w * xs, w * ys, w * zs
340
	local xx = x * xs
341
	local xy = x * ys
342
	local xz = x * zs
343
	local yy = y * ys
344
	local yz = y * zs
345
	local zz = z * zs
346
	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))
347
end
348
 
349
function QuaternionSlerp(a, b, t)
350
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
351
	local startInterp, finishInterp;
352
	if cosTheta >= 0.0001 then
353
		if (1 - cosTheta) > 0.0001 then
354
			local theta = ACOS(cosTheta)
355
			local invSinTheta = 1 / SIN(theta)
356
			startInterp = SIN((1 - t) * theta) * invSinTheta
357
			finishInterp = SIN(t * theta) * invSinTheta
358
		else
359
			startInterp = 1 - t
360
			finishInterp = t
361
		end
362
	else
363
		if (1 + cosTheta) > 0.0001 then
364
			local theta = ACOS(-cosTheta)
365
			local invSinTheta = 1 / SIN(theta)
366
			startInterp = SIN((t - 1) * theta) * invSinTheta
367
			finishInterp = SIN(t * theta) * invSinTheta
368
		else
369
			startInterp = t - 1
370
			finishInterp = t
371
		end
372
	end
373
	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
374
end
375
376
function Clerp(a, b, t)
377
	local qa = {QuaternionFromCFrame(a)}
378
	local qb = {QuaternionFromCFrame(b)}
379
	local ax, ay, az = a.x, a.y, a.z
380
	local bx, by, bz = b.x, b.y, b.z
381
	local _t = 1 - t
382
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
383
end
384
385
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
386
	local frame = IT("Frame")
387
	frame.BackgroundTransparency = TRANSPARENCY
388
	frame.BorderSizePixel = BORDERSIZEPIXEL
389
	frame.Position = POSITION
390
	frame.Size = SIZE
391
	frame.BackgroundColor3 = COLOR
392
	frame.BorderColor3 = BORDERCOLOR
393
	frame.Name = NAME
394
	frame.Parent = PARENT
395
	return frame
396
end
397
398
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
399
	local label = IT("TextLabel")
400
	label.BackgroundTransparency = 1
401
	label.Size = UD2(1, 0, 1, 0)
402
	label.Position = UD2(0, 0, 0, 0)
403
	label.TextColor3 = TEXTCOLOR
404
	label.TextStrokeTransparency = STROKETRANSPARENCY
405
	label.TextTransparency = TRANSPARENCY
406
	label.FontSize = TEXTFONTSIZE
407
	label.Font = TEXTFONT
408
	label.BorderSizePixel = BORDERSIZEPIXEL
409
	label.TextScaled = false
410
	label.Text = TEXT
411
	label.Name = NAME
412
	label.Parent = PARENT
413
	return label
414
end
415
416
function NoOutlines(PART)
417
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
418
end
419
420
421
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
422
	local NEWWELD = IT(TYPE)
423
	NEWWELD.Part0 = PART0
424
	NEWWELD.Part1 = PART1
425
	NEWWELD.C0 = C0
426
	NEWWELD.C1 = C1
427
	NEWWELD.Parent = PARENT
428
	return NEWWELD
429
end
430
431
function CreateSound(ID, PARENT, VOLUME, PITCH)
432
	local NEWSOUND = nil
433
	coroutine.resume(coroutine.create(function()
434
		NEWSOUND = IT("Sound", PARENT)
435
		NEWSOUND.Volume = VOLUME
436
		NEWSOUND.Pitch = PITCH
437
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
438
		Swait()
439
		NEWSOUND:play()
440
		game:GetService("Debris"):AddItem(NEWSOUND, 10)
441
	end))
442
	return NEWSOUND
443
end
444
445
function CFrameFromTopBack(at, top, back)
446
	local right = top:Cross(back)
447
	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)
448
end
449
450
function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
451
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
452
	local mesh = IT("SpecialMesh",wave)
453
	mesh.MeshType = "FileMesh"
454
	mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
455
	mesh.Scale = SIZE
456
	mesh.Offset = VT(0,0,-SIZE.X/8)
457
	wave.CFrame = CFRAME
458
	coroutine.resume(coroutine.create(function(PART)
459
		for i = 1, WAIT do
460
			Swait()
461
			mesh.Scale = mesh.Scale + GROW
462
			mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
463
			if DOESROT == true then
464
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
465
			end
466
			wave.Transparency = wave.Transparency + (0.5/WAIT)
467
			if wave.Transparency > 0.99 then
468
				wave:remove()
469
			end
470
		end
471
	end))
472
end
473
474
function CreateCrown(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
475
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
476
	local mesh = IT("SpecialMesh",wave)
477
	mesh.MeshType = "FileMesh"
478
	mesh.MeshId = "http://www.roblox.com/asset/?id=1078075"
479
	mesh.Scale = SIZE
480
	mesh.Offset = VT(0,0,-SIZE.X/8)
481
	wave.CFrame = CFRAME
482
	coroutine.resume(coroutine.create(function(PART)
483
		for i = 1, WAIT do
484
			Swait()
485
			mesh.Scale = mesh.Scale + GROW
486
			mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
487
			if DOESROT == true then
488
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
489
			end
490
			wave.Transparency = wave.Transparency + (0.5/WAIT)
491
			if wave.Transparency > 0.99 then
492
				wave:remove()
493
			end
494
		end
495
	end))
496
end
497
498
function CreateIceCrown(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
499
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
500
	local mesh = IT("SpecialMesh",wave)
501
	mesh.MeshType = "FileMesh"
502
	mesh.MeshId = "http://www.roblox.com/asset/?id=1323306"
503
	mesh.Scale = SIZE
504
	mesh.Offset = VT(0,0,-SIZE.X/8)
505
	wave.CFrame = CFRAME
506
	coroutine.resume(coroutine.create(function(PART)
507
		for i = 1, WAIT do
508
			Swait()
509
			mesh.Scale = mesh.Scale + GROW
510
			mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
511
			if DOESROT == true then
512
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
513
			end
514
			wave.Transparency = wave.Transparency + (0.5/WAIT)
515
			if wave.Transparency > 0.99 then
516
				wave:remove()
517
			end
518
		end
519
	end))
520
end
521
522
function CreateSpikeball(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
523
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
524
	local mesh = IT("SpecialMesh",wave)
525
	mesh.MeshType = "FileMesh"
526
	mesh.MeshId = "http://www.roblox.com/asset/?id=9982590"
527
	mesh.Scale = SIZE
528
	mesh.Offset = VT(0,0,-SIZE.X/8)
529
	wave.CFrame = CFRAME
530
	coroutine.resume(coroutine.create(function(PART)
531
		for i = 1, WAIT do
532
			Swait()
533
			mesh.Scale = mesh.Scale + GROW
534
			mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
535
			if DOESROT == true then
536
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
537
			end
538
			wave.Transparency = wave.Transparency + (0.5/WAIT)
539
			if wave.Transparency > 0.99 then
540
				wave:remove()
541
			end
542
		end
543
	end))
544
end
545
546
function CreateSwirl(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
547
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
548
	local mesh = IT("SpecialMesh",wave)
549
	mesh.MeshType = "FileMesh"
550
	mesh.MeshId = "http://www.roblox.com/asset/?id=1051557"
551
	mesh.Scale = SIZE
552
	wave.CFrame = CFRAME
553
	coroutine.resume(coroutine.create(function(PART)
554
		for i = 1, WAIT do
555
			Swait()
556
			mesh.Scale = mesh.Scale + GROW
557
			mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
558
			if DOESROT == true then
559
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
560
			end
561
			wave.Transparency = wave.Transparency + (0.5/WAIT)
562
			if wave.Transparency > 0.99 then
563
				wave:remove()
564
			end
565
		end
566
	end))
567
end
568
569
function CreateTornado(SIZE,DOESROT,ROT,WAIT,CFRAME,COLOR,GROW)
570
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
571
	local mesh = IT("SpecialMesh",wave)
572
	mesh.MeshType = "FileMesh"
573
	mesh.MeshId = "http://www.roblox.com/asset/?id=102638417"
574
	mesh.Scale = SIZE
575
	wave.CFrame = CFRAME
576
	coroutine.resume(coroutine.create(function(PART)
577
		for i = 1, WAIT do
578
			Swait()
579
			mesh.Scale = mesh.Scale + GROW
580
			if DOESROT == true then
581
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
582
			end
583
			wave.Transparency = wave.Transparency + (0.5/WAIT)
584
			if wave.Transparency > 0.99 then
585
				wave:remove()
586
			end
587
		end
588
	end))
589
end
590
591
function CreateRing(SIZE,DOESROT,ROT,WAIT,CFRAME,COLOR,GROW)
592
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
593
	local mesh = IT("SpecialMesh",wave)
594
	mesh.MeshType = "FileMesh"
595
	mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
596
	mesh.Scale = SIZE
597
	mesh.Offset = VT(0,0,0)
598
	wave.CFrame = CFRAME
599
	coroutine.resume(coroutine.create(function(PART)
600
		for i = 1, WAIT do
601
			Swait()
602
			mesh.Scale = mesh.Scale + GROW
603
			if DOESROT == true then
604
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
605
			end
606
			wave.Transparency = wave.Transparency + (0.5/WAIT)
607
			if wave.Transparency > 0.99 then
608
				wave:remove()
609
			end
610
		end
611
	end))
612
end
613
614
function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
615
	local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
616
	local mesh = IT("SpecialMesh",wave)
617
	mesh.MeshType = "Sphere"
618
	mesh.Scale = SIZE
619
	mesh.Offset = VT(0,0,0)
620
	wave.CFrame = CFRAME
621
	coroutine.resume(coroutine.create(function(PART)
622
		for i = 1, WAIT do
623
			Swait()
624
			mesh.Scale = mesh.Scale + GROW
625
			wave.Transparency = wave.Transparency + (1/WAIT)
626
			if wave.Transparency > 0.99 then
627
				wave:remove()
628
			end
629
		end
630
	end))
631
end
632
633
function MagicBlock(SIZE,WAIT,CFRAME,COLOR,GROW)
634
	local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(SIZE,SIZE,SIZE), true)
635
	local mesh = IT("BlockMesh",wave)
636
	wave.CFrame = CFRAME
637
	coroutine.resume(coroutine.create(function(PART)
638
		for i = 1, WAIT do
639
			Swait()
640
			mesh.Scale = mesh.Scale + GROW
641
			wave.CFrame = CFRAME * ANGLES(RAD(math.random(-360,360)),RAD(math.random(-360,360)),RAD(math.random(-360,360)))
642
			wave.Transparency = wave.Transparency + (1/WAIT)
643
			if wave.Transparency > 0.99 then
644
				wave:remove()
645
			end
646
		end
647
	end))
648
end
649
650
function MakeForm(PART,TYPE)
651
	if TYPE == "Cyl" then
652
		local MSH = IT("CylinderMesh",PART)
653
	elseif TYPE == "Ball" then
654
		local MSH = IT("SpecialMesh",PART)
655
		MSH.MeshType = "Sphere"
656
	elseif TYPE == "Wedge" then
657
		local MSH = IT("SpecialMesh",PART)
658
		MSH.MeshType = "Wedge"
659
	elseif TYPE == "Cone" then
660
		local MSH = IT("SpecialMesh",PART)
661
		MSH.MeshType = "FileMesh"
662
		MSH.MeshId = "http://www.roblox.com/asset/?id=785967755"
663
		MSH.Scale = PART.Size/50
664
	end
665
end
666
667
function CheckTableForString(Table, String)
668
	for i, v in pairs(Table) do
669
		if string.find(string.lower(String), string.lower(v)) then
670
			return true
671
		end
672
	end
673
	return false
674
end
675
676
function CheckIntangible(Hit)
677
	local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
678
	if Hit and Hit.Parent then
679
		if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
680
			return true
681
		end
682
	end
683
	return false
684
end
685
686
Debris = game:GetService("Debris")
687
688
function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
689
	local Direction = CFrame.new(StartPos, Vec).lookVector
690
	local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
691
	local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
692
	if RayHit and CheckIntangible(RayHit) then
693
		if DelayIfHit then
694
			wait()
695
		end
696
		RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
697
	end
698
	return RayHit, RayPos, RayNormal
699
end
700
701
function turnto(position)
702
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
703
end
704
705
--//=================================\\
706
--|| 			SPEECH
707
--\\=================================//
708
709
function chatfunc(text,waitt)
710
local chat = coroutine.wrap(function()
711
if Character:FindFirstChild("TalkingBillBoard")~= nil then
712
Character:FindFirstChild("TalkingBillBoard"):destroy()
713
end
714
local naeeym2 = Instance.new("BillboardGui",Character)
715
naeeym2.Size = UDim2.new(0,100,0,40)
716
naeeym2.StudsOffset = Vector3.new(0,5,0)
717
naeeym2.Adornee = Character.Head
718
naeeym2.Name = "TalkingBillBoard"
719
naeeym2.AlwaysOnTop = true
720
local tecks2 = Instance.new("TextLabel",naeeym2)
721
tecks2.BackgroundTransparency = 1
722
tecks2.BorderSizePixel = 0
723
tecks2.Text = ""
724
tecks2.Font = "SciFi"
725
tecks2.TextSize = 30
726-
local COLOR = "Pastel blue-green"
726+
727-
local COLOR2 = "Really black"
727+
728
tecks2.TextStrokeColor3 = Color3.new(0,0,0)
729
tecks2.Size = UDim2.new(1,0,0.5,0)
730
for i = 1,string.len(text),1 do
731
tecks2.Text = string.sub(text,1,i)
732
Swait()
733
end
734
wait(waitt)
735
coroutine.resume(coroutine.create(function()
736
	for i = 1, 10 do
737
		tecks2.TextTransparency = tecks2.TextTransparency + 0.1
738-
local part = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "Gauntlet Part", VT(0.6,1.02,0.6),false)
738+
739
	end
740
	naeeym2:Destroy()
741
end))
742
end)
743
chat()
744
end
745-
local part = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "Gauntlet Part", VT(0.2,0.7,1.01),false)
745+
746
--//=================================\\
747
--||	     WEAPON CREATION
748
--\\=================================//
749
750-
local part = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "Gauntlet Part", VT(0.2,0.7,1.01),false)
750+
local COLOR = "Gold"
751
local COLOR2 = "Really Red"
752
753
local part = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "Gauntlet Part", VT(1.01,0.2,1.01),false)
754
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0, -0.8, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
755-
local part = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "Gauntlet Part", VT(0.5,0.725,1.0025),false)
755+
756
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0, -0.8, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
757
local part = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "Gauntlet Part", VT(1.01,0.2,1.01),false)
758
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
759
local part = CreatePart(3, Weapon, "Marble", 0, 0, COLOR2, "Gauntlet Part", VT(1.005,0.25,1.005),false)
760
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
761
762
local part = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "Gauntlet Part", VT(0.6,1.02,0.6),false)
763
MakeForm(part,"Cyl")
764
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0, 0, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
765
local part = CreatePart(3, Weapon, "Marble", 0, 0, COLOR2, "Gauntlet Part", VT(0.7,1.005,0.7),false)
766
MakeForm(part,"Cyl")
767
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0, 0, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
768
769
local part = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "Gauntlet Part", VT(0.2,0.7,1.01),false)
770
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
771
local part = CreatePart(3, Weapon, "Marble", 0, 0, COLOR2, "Gauntlet Part", VT(0.25,0.7,1.005),false)
772
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
773
774
local part = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "Gauntlet Part", VT(0.2,0.7,1.01),false)
775
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(90), RAD(0)), CF(0, 0, 0))
776
local part = CreatePart(3, Weapon, "Marble", 0, 0, COLOR2, "Gauntlet Part", VT(0.25,0.7,1.005),false)
777
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(90), RAD(0)), CF(0, 0, 0))
778
779-
local part = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "Gauntlet Part", VT(0.6,1.02,0.6),false)
779+
local part = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "Gauntlet Part", VT(0.5,0.725,1.0025),false)
780
local weld = CreateWeldOrSnapOrMotor("Weld", part, RightArm, part, CF(0.251, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
781
782
local OFFSET = 0.25
783
784
for i = 1, 2 do
785
	local PART = CreatePart(3, Weapon, "Marble", 0, 1, COLOR, "ClawPart", VT(0,0,0),false)
786-
local part = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "Gauntlet Part", VT(0.2,0.7,1.01),false)
786+
787
	for i = 1, 12 do
788
		local RingPiece = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "ClawPart", VT(0.15-(i/120),0.15-(i/120),0.2),false)
789
		local RingWeld = CreateWeldOrSnapOrMotor("Weld", RingPiece, PART, RingPiece, CF(0, 0, 0) * ANGLES(RAD(0), RAD(-35+i*8), RAD(0)), CF(0, 0, 0) * CF(-1, 0, 0))
790
	end
791-
local part = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "Gauntlet Part", VT(0.2,0.7,1.01),false)
791+
792
end
793
794
local part = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "Gauntlet Part", VT(1.01,0.2,1.01),false)
795
local weld = CreateWeldOrSnapOrMotor("Weld", part, LeftArm, part, CF(0, -0.8, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
796-
local part = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "Gauntlet Part", VT(0.5,0.725,1.0025),false)
796+
797
local weld = CreateWeldOrSnapOrMotor("Weld", part, LeftArm, part, CF(0, -0.8, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
798
local part = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "Gauntlet Part", VT(1.01,0.2,1.01),false)
799-
local CLAW = CreatePart(3, Weapon, "Neon", 0, 1, COLOR, "Grab part", VT(0.2,0.2,0.2),false)
799+
800
local part = CreatePart(3, Weapon, "Marble", 0, 0, COLOR2, "Gauntlet Part", VT(1.005,0.25,1.005),false)
801
local weld = CreateWeldOrSnapOrMotor("Weld", part, LeftArm, part, CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
802
803
local part = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "Gauntlet Part", VT(0.6,1.02,0.6),false)
804
MakeForm(part,"Cyl")
805
local weld = CreateWeldOrSnapOrMotor("Weld", part, LeftArm, part, CF(0, 0, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
806
local part = CreatePart(3, Weapon, "Marble", 0, 0, COLOR2, "Gauntlet Part", VT(0.7,1.005,0.7),false)
807
MakeForm(part,"Cyl")
808
local weld = CreateWeldOrSnapOrMotor("Weld", part, LeftArm, part, CF(0, 0, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
809
810
local part = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "Gauntlet Part", VT(0.2,0.7,1.01),false)
811
local weld = CreateWeldOrSnapOrMotor("Weld", part, LeftArm, part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
812
local part = CreatePart(3, Weapon, "Marble", 0, 0, COLOR2, "Gauntlet Part", VT(0.25,0.7,1.005),false)
813
local weld = CreateWeldOrSnapOrMotor("Weld", part, LeftArm, part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
814
815
local part = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "Gauntlet Part", VT(0.2,0.7,1.01),false)
816
local weld = CreateWeldOrSnapOrMotor("Weld", part, LeftArm, part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(90), RAD(0)), CF(0, 0, 0))
817
local part = CreatePart(3, Weapon, "Marble", 0, 0, COLOR2, "Gauntlet Part", VT(0.25,0.7,1.005),false)
818
local weld = CreateWeldOrSnapOrMotor("Weld", part, LeftArm, part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(90), RAD(0)), CF(0, 0, 0))
819
820
local part = CreatePart(3, Weapon, "Ice", 0, 0, COLOR, "Gauntlet Part", VT(0.5,0.725,1.0025),false)
821
local weld = CreateWeldOrSnapOrMotor("Weld", part, LeftArm, part, CF(-0.251, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
822
823
local CLAW = CreatePart(3, Weapon, "Ice", 0, 1, COLOR, "Grab part", VT(0.2,0.2,0.2),false)
824
local weld = CreateWeldOrSnapOrMotor("Weld", CLAW, RightArm, CLAW, CF(0, -1.2, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
825
826
CLAW.CanCollide = true
827
828
local OFFSET = 0.25
829
830
for i = 1, 2 do
831
	local PART = CreatePart(3, Weapon, "Marble", 0, 1, COLOR, "ClawPart", VT(0,0,0),false)
832
	local weld = CreateWeldOrSnapOrMotor("Weld", PART, LeftArm, PART, CF(0.35, -1.25, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)), CF(0, OFFSET, 0))
833
	for i = 1, 12 do
834
		local RingPiece = CreatePart(3, Weapon, "Neon", 0, 0, COLOR, "ClawPart", VT(0.15-(i/120),0.15-(i/120),0.2),false)
835
		local RingWeld = CreateWeldOrSnapOrMotor("Weld", RingPiece, PART, RingPiece, CF(0, 0, 0) * ANGLES(RAD(0), RAD(-35+i*8), RAD(0)), CF(0, 0, 0) * CF(-1, 0, 0))
836
	end
837
	OFFSET = OFFSET - 0.50
838
end
839
840
for _, c in pairs(Weapon:GetChildren()) do
841
	if c.ClassName == "Part" then
842
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
843
	end
844
end
845
846
Weapon.Parent = Character
847
848
Humanoid.Died:connect(function()
849
	ATTACK = true
850
end)
851
852
local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.23, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
853
local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.50, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
854
local SKILL3FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.365, 0, 0.7, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
855
local SKILL4FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.365, 0, 0.9, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
856
857
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Ice wall", SKILLTEXTCOLOR, 6, "Legacy", 0, 2, 1, "Text 1")
858
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Icicle prison", SKILLTEXTCOLOR, 6, "Legacy", 0, 2, 1, "Text 2")
859
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[V] Frozen kingdom", SKILLTEXTCOLOR, 6, "Legacy", 0, 2, 1, "Text 3")
860
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[C] Ice chuck", SKILLTEXTCOLOR, 6, "Legacy", 0, 2, 1, "Text 4")
861
862
--//=================================\\
863
--||	     DAMAGE FUNCTIONS
864
--\\=================================//
865
866
function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
867
	local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
868
	STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
869
	local BODYGYRO = IT("BodyGyro", STATPART)
870
	local BODYPOSITION = IT("BodyPosition", STATPART)
871
	BODYPOSITION.P = 2000
872
	BODYPOSITION.D = 100
873
	BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
874
	BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
875
	game:GetService("Debris"):AddItem(STATPART ,5)
876
	local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
877
	BILLBOARDGUI.Adornee = STATPART
878
	BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
879
	BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
880
	BILLBOARDGUI.AlwaysOnTop = false
881
	local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
882
	TEXTLABEL.BackgroundTransparency = 1
883
	TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
884
	TEXTLABEL.Text = TEXT
885
	TEXTLABEL.Font = "SciFi"
886
	TEXTLABEL.FontSize="Size42"
887
	TEXTLABEL.TextColor3 = COLOR
888
	TEXTLABEL.TextStrokeTransparency = 1
889
	TEXTLABEL.TextScaled = true
890
	TEXTLABEL.TextWrapped = true
891
	coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
892
		if LABELTYPE == "Normal" then
893
			for i = 1, 30 do
894
				Swait()
895
				STATPART.Position = STATPART.Position + VT(0, (15-i)/10 ,0)
896
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
897
			end
898
		elseif LABELTYPE == "Debuff" then
899
			for i = 1, 30 do
900
				Swait()
901
				STATPART.Position = STATPART.Position - VT(0, i/10 ,0)
902
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
903
			end
904
		elseif LABELTYPE == "Shock" then
905-
				if math.random(1,100) < critrate+1 then
905+
906
			for i = 1, 30 do
907
				Swait()
908
				STATPART.Position = ORIGIN + VT(MRANDOM(-2,2),MRANDOM(-2,2),MRANDOM(-2,2))
909
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
910
			end
911
		end
912
		THEPART.Parent = nil
913
	end),STATPART, BODYPOSITION, TEXTLABEL)
914
end
915
916
--//=================================\\
917
--||			DAMAGING
918
--\\=================================//
919
920
function dealdamage(hit,min,max,maxstrength,beserk,critrate,critmultiplier)
921
	if hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChild("HitBy"..Player.Name) == nil then
922
		local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
923
		local dmg = math.random(min,max)
924
		if humanoid.Health > 0 then
925
			if beserk == true then
926
				humanoid.Health = 0
927
			else
928
				hit.Velocity = CFrame.new(Torso.Position,hit.Position).lookVector*5*maxstrength
929
				if math.random(100,100) < critrate+1 then
930
					humanoid.Health = humanoid.Health - dmg*critmultiplier
931
					StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0))
932
				else
933
					humanoid.Health = humanoid.Health - dmg
934
					StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), dmg, C3(0, 0, 0))
935
				end
936
			end
937
		end
938
	end
939
end
940
941
function AoEDamage(position,radius,min,max,maxstrength,beserk,critrate,critmultiplier,CanBeDodgedByJumping)
942
	local dmg = math.random(min,max)
943
	for i,v in ipairs(workspace:GetChildren()) do
944
	if v:FindFirstChild("HitBy"..Player.Name) == nil then
945
		local body = v:GetChildren()
946
			for part = 1, #body do
947
				if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
948
					if(body[part].Position - position).Magnitude < radius then
949
						if v.ClassName == "Model" then
950
							if v:FindFirstChild("Humanoid") then
951
								if v.Humanoid.Health ~= 0 then
952
									if CanBeDodgedByJumping == true then
953
										if body[part].Position.Y < position.Y+5 then
954
											if math.random(1,100) < critrate+1 then
955
												v.Humanoid.Health = v.Humanoid.Health - dmg*critmultiplier
956
												StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0))
957
											else
958
												v.Humanoid.Health = v.Humanoid.Health - dmg
959
												StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), dmg, C3(0, 0, 0))
960
											end
961
											local defence = Instance.new("BoolValue",v)
962
											defence.Name = ("HitBy"..Player.Name)
963
										end
964
									else
965
										if beserk == true then
966
											v.Humanoid.Health = 0
967
										end
968
										if math.random(1,100) < critrate+1 then
969
											v.Humanoid.Health = v.Humanoid.Health - dmg*critmultiplier
970
											StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0))
971
										else
972
											v.Humanoid.Health = v.Humanoid.Health - dmg
973
											StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), dmg, C3(0, 0, 0))
974
										end
975
										local defence = Instance.new("BoolValue",v)
976
										defence.Name = ("HitBy"..Player.Name)
977
									end
978
								end
979
								body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength
980
							end
981
						end
982
					end
983
				end
984
			end
985
		end	
986
		if v:FindFirstChild("HitBy"..Player.Name) then
987
			v:FindFirstChild("HitBy"..Player.Name):remove()
988
		end
989
	end
990
end
991
992
function AoEStun(POS,RANGE,LAST)
993
	for i,v in ipairs(workspace:GetChildren()) do
994
	if v:FindFirstChild("StunnedBy"..Player.Name) == nil then
995
		local body = v:GetChildren()
996
			for part = 1, #body do
997
				if(v:FindFirstChild("StunnedBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
998
					if(body[part].Position - POS).Magnitude < RANGE then
999
						if v.ClassName == "Model" then
1000
							if v:FindFirstChild("Humanoid") then
1001
								if v.Humanoid.Health ~= 0 then
1002
									Freeze(v.Humanoid,LAST)
1003
									local defence = Instance.new("BoolValue",v)
1004-
					icelayer.BrickColor = BRICKC"Steel blue"
1004+
1005
									game:GetService("Debris"):AddItem(defence, 0.1)
1006
								end
1007
							end
1008
						end
1009
					end
1010
				end
1011
			end
1012
		end
1013
	end
1014
end
1015
1016
function Freeze(HUMANOID,LAST)
1017
	if HUMANOID.Parent:FindFirstChild("StunnedBy"..Player.Name) == nil then
1018
		local q = HUMANOID.Parent:GetChildren()
1019-
			StatLabel("Normal", HUMANOID.Parent.Head.CFrame * CF(0, 0 + (HUMANOID.Parent.Head.Size.z - 1), 0), "Frozen!", C3(0.3, 0.3, 0.3))
1019+
1020
			local bob = q[i]
1021
			if bob.ClassName == "Part" or bob.ClassName == "MeshPart" then
1022
				if bob.Transparency < 1 then
1023
					bob.Anchored = true
1024
					local icelayer = bob:Clone()
1025
					icelayer.Parent = bob
1026
					icelayer.Material = "Ice"
1027
					icelayer.CanCollide = false
1028
					icelayer.BrickColor = BRICKC"Steel Gold"
1029
					icelayer.Transparency = 0.5
1030
					icelayer.CFrame = bob.CFrame
1031
					icelayer.Name = "Ice"
1032
					icelayer.Size = icelayer.Size + VT(0.1,0.1,0.1)
1033
					if icelayer:FindFirstChildOfClass("Decal") then
1034
						icelayer:FindFirstChildOfClass("Decal"):remove()
1035
					end
1036
				end
1037
			end
1038
		end
1039
		local defence = Instance.new("BoolValue",HUMANOID.Parent)
1040
		defence.Name = ("StunnedBy"..Player.Name)
1041
		game:GetService("Debris"):AddItem(defence, LAST)
1042
		if HUMANOID.Parent:FindFirstChild("Head") then
1043
			StatLabel("Normal", HUMANOID.Parent.Head.CFrame * CF(0, 0 + (HUMANOID.Parent.Head.Size.z - 1), 0), "Frozen", C3(0.3, 0.3, 0.3))
1044
		end
1045
		coroutine.resume(coroutine.create(function()
1046
			Swait(LAST*50)
1047
			local q = HUMANOID.Parent:GetChildren()
1048
			for i = 1, #q do
1049
				local bob = q[i]
1050
				if bob.ClassName == "Part" or bob.ClassName == "MeshPart" then
1051
					if bob.Transparency < 1 then
1052
						bob.Anchored = false
1053
						bob.Ice:remove()
1054
					end
1055
				end
1056
			end
1057
		end))
1058
	end
1059
end
1060
1061
function killnearest(position,range,maxstrength)
1062
	for i,v in ipairs(workspace:GetChildren()) do
1063
	local body = v:GetChildren()
1064
		for part = 1, #body do
1065
			if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
1066
				if(body[part].Position - position).Magnitude < range then
1067
					if v.ClassName == "Model" then
1068
						v:BreakJoints()
1069
					end
1070
					--table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2})
1071
					body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength
1072
				end
1073-
				RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE*4, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
1073+
1074
		end
1075
		if v.ClassName == "Part" then
1076
			if v.Anchored == false and (v.Position - position).Magnitude < range then
1077
				--table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2})
1078
				v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength
1079
			end
1080
		end
1081
	end
1082
end
1083
1084
--//=================================\\
1085
--||	ATTACK FUNCTIONS AND STUFF
1086
--\\=================================//
1087
1088
function CreateDebreeRing(FLOOR,POSITION,SIZE,BLOCKSIZE,SWAIT)
1089
	if FLOOR ~= nil then
1090
		coroutine.resume(coroutine.create(function()
1091
			local PART = CreatePart(3, Effects, "Plastic", 0, 1, "Pearl", "DebreeCenter", VT(0,0,0))
1092
			PART.CFrame = CF(POSITION)
1093
			for i = 1, 45 do
1094
				local RingPiece = CreatePart(3, Effects, "Plastic", 0, 0, "Pearl", "DebreePart", BLOCKSIZE)
1095
				RingPiece.Material = FLOOR.Material
1096
				RingPiece.Color = FLOOR.Color
1097
				RingPiece.CFrame = PART.CFrame * ANGLES(RAD(0), RAD(i*8), RAD(0)) * CF(SIZE*100, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
1098
				coroutine.resume(coroutine.create(function()
1099
					Swait(SWAIT)
1100
					RingPiece.Anchored = false
1101
				end))
1102
			end
1103
			PART:remove()
1104
		end))
1105
	end
1106
end
1107
1108
function Strike()
1109
	ATTACK = true
1110
	Rooted = false
1111
	for i=0, 0.3, 0.1 / Animation_Speed do
1112
		Swait()
1113
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.5 / Animation_Speed)
1114
		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.5 / Animation_Speed)
1115
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(25), RAD(-45), RAD(45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1116
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(25), RAD(45), RAD(-45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1117
		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.5 / Animation_Speed)
1118
		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.5 / Animation_Speed)
1119
	end
1120
	for i=0, 0.1, 0.1 / Animation_Speed do
1121
		Swait()
1122
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.5 / Animation_Speed)
1123
		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.5 / Animation_Speed)
1124
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(120), RAD(-45), RAD(-45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1125
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(120), RAD(45), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1126
		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.5 / Animation_Speed)
1127
		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.5 / Animation_Speed)
1128
	end
1129
	AoEDamage(RootPart.CFrame*CF(0,0,-2).p,3,25,35,5,false,2,2,false)
1130
	for i=0, 0.2, 0.1 / Animation_Speed do
1131
		Swait()
1132
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.5 / Animation_Speed)
1133
		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.5 / Animation_Speed)
1134
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(120), RAD(-45), RAD(-45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1135
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(120), RAD(45), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1136
		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.5 / Animation_Speed)
1137
		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.5 / Animation_Speed)
1138
	end
1139
	ATTACK = false
1140
	Rooted = false
1141
end
1142
1143
function IceWall()
1144
	ATTACK = true
1145
	Rooted = true
1146
	local IceMaterializeSounds = {
1147
	  "333476017",
1148
	  "333475981",
1149
	  "333475957",
1150
	  "333475929"
1151
	}
1152
	for i=0, 2, 0.1 / Animation_Speed do
1153
		Swait()
1154
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(45)), 0.5 / Animation_Speed)
1155-
					local WallPiece = CreatePart(3, Effects, "Ice", 0, 0.75, COLOR, "Ice", VT(5,75,5))
1155+
1156
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1157
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1158
		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.5 / Animation_Speed)
1159
		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.5 / Animation_Speed)
1160
	end
1161
	coroutine.resume(coroutine.create(function()
1162
		local POS = RootPart.CFrame * CF(0,0,-5)
1163
		local OFFSET = 0.1
1164
		local WallPiece = CreatePart(3, Effects, "Ice", 0, 0.75, COLOR, "Ice", VT(5,75,5))
1165
		WallPiece.CFrame = POS
1166
		AoEDamage(WallPiece.Position,6,3,4,5,false,2,2,false)
1167
		CreateSound(IceMaterializeSounds[MRANDOM(1,#IceMaterializeSounds)], WallPiece, 3, 1)
1168
		WallPiece.CanCollide = true
1169
		coroutine.resume(coroutine.create(function()
1170
			Swait(150)
1171
			WallPiece.Anchored = false
1172
			WallPiece.CanCollide = false
1173
		end))
1174
		for i = 1, 2 do
1175
			coroutine.resume(coroutine.create(function()
1176
				local OFF = OFFSET
1177
				for i = 1, 30 do
1178
					Swait()
1179
					local WallPiece = CreatePart(3, Effects, "Ice", 0, 0.75, COLOR, "Ice", VT(50,100,50))
1180
					WallPiece.CanCollide = true
1181
					WallPiece.CFrame = POS*CF(OFF*(i*10),0,0)
1182
					coroutine.resume(coroutine.create(function()
1183
						Swait(150-i*1.3)
1184
						WallPiece.Anchored = false
1185
						WallPiece.CanCollide = false
1186
					end))
1187
					AoEDamage(WallPiece.Position,6,3,4,5,false,2,2,false)
1188
				end
1189
			end))
1190
			OFFSET = OFFSET - 0.2
1191
		end
1192
	end))
1193
	for i=0, 2, 0.1 / Animation_Speed do
1194
		Swait()
1195
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.5 / Animation_Speed)
1196
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.5 / Animation_Speed)
1197
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(20), RAD(45), RAD(45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1198
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1199
		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.5 / Animation_Speed)
1200
		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.5 / Animation_Speed)
1201
	end
1202
	ATTACK = false
1203
	Rooted = false
1204
end
1205
1206
function IciclePrison()
1207
	ATTACK = true
1208
	Rooted = false
1209
	local IceMaterializeSounds = {
1210
	  "333476017",
1211
	  "333475981",
1212
	  "333475957",
1213
	  "333475929"
1214
	}
1215
	for i=0, 1, 0.1 / Animation_Speed do
1216
		Swait()
1217
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
1218
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.1 / Animation_Speed)
1219
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1220
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1221
		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(15), RAD(0)), 0.15 / Animation_Speed)
1222
		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(15), RAD(0)), 0.15 / Animation_Speed)
1223
	end
1224
	local WELD = nil
1225
	local TORS = nil
1226
	local GRABBED = nil
1227
	CreateSound("588738712", RightArm, 3, 1)
1228
	local HIT1 = CLAW.Touched:Connect(function(hit)
1229
		if hit.Anchored == false and hit.Parent:FindFirstChildOfClass("Humanoid") then
1230
			TORS = hit.Parent:FindFirstChild("Torso") or hit.Parent:FindFirstChild("UpperTorso")
1231
			if TORS ~= nil then
1232
				VALUE1 = true
1233
				hit.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
1234
				CreateSound("233856097", RightArm, 3, 1)
1235
				--CLAW.CanCollide = false
1236
				GRABBED = hit.Parent
1237
				WELD = CreateWeldOrSnapOrMotor("Weld", CLAW, CLAW, TORS, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(0)), CF(0, 0, 0))
1238
			end
1239
		end
1240
	end)
1241
	for i=0, 0.8, 0.1 / Animation_Speed do
1242
		Swait()
1243
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(85)), 2 / Animation_Speed)
1244
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(-85)), 2 / Animation_Speed)
1245-
		local ICICLE = CreatePart(3, Effects, "Ice", 0, 0.25, COLOR, "Ice", VT(10,25,10))
1245+
1246
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 2 / Animation_Speed)
1247
		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(-26), RAD(0)), 2 / Animation_Speed)
1248-
		CreateDebreeRing(ICICLE,TORS.Position+VT(0,-5,0),0.7,VT(4,4,4),70*5)
1248+
1249-
		CreateDebreeRing(ICICLE,TORS.Position+VT(0,-5,0),0.4,VT(6,6,6),70*5)
1249+
1250
			break
1251
		end
1252
	end
1253
	HIT1:disconnect()
1254
	if GRABBED ~= nil then
1255
		Rooted = true
1256
		VALUE1 = false
1257
		for i=0, 2, 0.1 / Animation_Speed do
1258
			Swait()
1259
			MagicSphere(VT(0.2,0.2,0.2),15,CF(RightArm.CFrame*CF(MRANDOM(-5,5),MRANDOM(-10,-5),MRANDOM(-5,5)).p,RightArm.Position),COLOR,VT(0.001,0.001,1),0)
1260
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(85)), 2 / Animation_Speed)
1261
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(-85)), 2 / Animation_Speed)
1262
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(75)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
1263
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 2 / Animation_Speed)
1264
			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(-26), RAD(0)), 2 / Animation_Speed)
1265
			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(26), RAD(0)), 2 / Animation_Speed)
1266
		end
1267
		WELD:remove()
1268
		TORS.Anchored = true
1269
		local ICICLE = CreatePart(3, Effects, "Ice", 0, 0.25, COLOR, "Ice", VT(100,250,100))
1270
		ICICLE.CFrame = CF(TORS.Position)
1271
		MakeForm(ICICLE,"Cone")
1272
		CreateDebreeRing(ICICLE,TORS.Position+VT(0,-5,0),0.7,VT(50,50,50),70*5)
1273
		CreateDebreeRing(ICICLE,TORS.Position+VT(0,-5,0),0.4,VT(100,100,100),70*5)
1274
		CreateSound(IceMaterializeSounds[MRANDOM(1,#IceMaterializeSounds)], ICICLE, 3, 1)
1275
		coroutine.resume(coroutine.create(function()
1276
			for i = 1, 70 do
1277
				Swait(5)
1278
				dealdamage(TORS,1,1,0,false,0,0)
1279
			end
1280
			GRABBED:FindFirstChildOfClass("Humanoid").PlatformStand = false
1281
			ICICLE.Anchored = false
1282
			TORS.Anchored = false
1283
		end))
1284
	end
1285
	ATTACK = false
1286
	Rooted = false
1287
end
1288
1289
function FireArc(Part,ToLocation,AmountOfTime,Height,DoesCourontine)
1290
	if DoesCourontine == false then
1291
		local Direction = CF(Part.Position,ToLocation)
1292
		local Distance = (Part.Position - ToLocation).magnitude
1293
		for i = 1, AmountOfTime do
1294
			Swait()
1295
			Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime)
1296
			Direction = Part.CFrame
1297
		end
1298
	elseif DoesCourontine == true then
1299
		coroutine.resume(coroutine.create(function()
1300
			local Direction = CF(Part.Position,ToLocation)
1301
			local Distance = (Part.Position - ToLocation).magnitude
1302
			for i = 1, AmountOfTime do
1303
				Swait()
1304
				Part.CFrame = Direction*CF(0,(AmountOfTime/200)+((AmountOfTime/Height)-((i*2)/Height)),-Distance/AmountOfTime)
1305
				Direction = Part.CFrame
1306
			end
1307
		end))
1308
	end
1309
end
1310
1311
function Trail(Part)
1312
	local TRAIL = Part:Clone()
1313
	TRAIL.CanCollide = false
1314
	TRAIL.Anchored = true
1315
	TRAIL.Parent = Effects
1316
	TRAIL.Name = "Trail"
1317
	local TRANS = Part.Transparency
1318
	coroutine.resume(coroutine.create(function()
1319
		for i = 1, 20 do
1320
			Swait()
1321
			TRAIL.Transparency = TRAIL.Transparency + ((1-TRANS)/20)
1322
		end
1323
		TRAIL:remove()
1324
	end))
1325
end
1326
1327
function IceChuck()
1328
	local IceMaterializeSounds = {
1329
	  "333476017",
1330
	  "333475981",
1331
	  "333475957",
1332
	  "333475929"
1333
	}
1334
	ATTACK = true
1335
	Rooted = true
1336
	for i=0, 0.6, 0.1 / Animation_Speed do
1337
		Swait()
1338
		turnto(Mouse.Hit.p)
1339
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(35)), 0.5 / Animation_Speed)
1340
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(-35)), 0.5 / Animation_Speed)
1341
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1342
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1343
		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.5 / Animation_Speed)
1344
		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.5 / Animation_Speed)
1345
	end
1346
	local GEM = CreatePart(3, Effects, "Ice", 0, 0.25, COLOR, "Ice", VT(2,2,2))
1347
	CreateMesh("SpecialMesh", GEM, "FileMesh", "9756362", "", VT(2,2,2), VT(0,0,0))
1348
	GEM.CFrame = CF(RightArm.CFrame*CF(0,-1.3,0).p)
1349
	MagicSphere(GEM.Size,35,GEM.CFrame,COLOR,VT(0.1,0.1,0.1))
1350
	CreateSound(IceMaterializeSounds[MRANDOM(1,#IceMaterializeSounds)], RootPart, 3, 1.3)
1351
	coroutine.resume(coroutine.create(function()
1352
		repeat 
1353
			Swait()
1354
			Trail(GEM)
1355
		until GEM.Parent == nil
1356
	end))
1357
	coroutine.resume(coroutine.create(function()
1358
		FireArc(GEM,Mouse.Hit.p,30,30,false)
1359
		MagicSphere(GEM.Size,35,GEM.CFrame,COLOR,VT(1,1,1))
1360
		MagicSphere(GEM.Size,35,GEM.CFrame,COLOR,VT(0.75,0.75,0.75))
1361
		MagicSphere(GEM.Size,35,GEM.CFrame,COLOR,VT(0.5,0.5,0.5))
1362
		CreateDebreeRing(GEM,GEM.Position+VT(0,0,0),1.5,VT(1,1,1),35)
1363
		AoEDamage(GEM.Position,15,25,54,5,false,2,2,false)
1364
		AoEStun(GEM.Position,5,2)
1365
		GEM.Parent = nil
1366
	end))
1367
	for i=0, 0.6, 0.1 / Animation_Speed do
1368
		Swait()
1369
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-35)), 0.5 / Animation_Speed)
1370
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(35)), 0.5 / Animation_Speed)
1371
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1372
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1373
		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.5 / Animation_Speed)
1374
		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.5 / Animation_Speed)
1375
	end
1376
	ATTACK = false
1377
	Rooted = false
1378
end
1379
1380
function FrozenKingdom()
1381
	ATTACK = true
1382
	Rooted = false
1383
	for i=0, 2, 0.1 / Animation_Speed do
1384
		Swait()
1385-
	local ICICLE = CreatePart(3, Effects, "Ice", 0, 0.25, COLOR, "Ice", VT(10,25,10))
1385+
1386
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1387
		--PupilWeld.C0 = Clerp(PupilWeld.C0, CF(0.13,0.24,-0.58) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1388-
	CreateDebreeRing(ICICLE,Torso.Position+VT(0,-4,0),1,VT(6,6,6),70*5)
1388+
1389
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.75, -0.5) * ANGLES(RAD(35), RAD(0), RAD(65)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1390
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1391
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1392
	end
1393
	for i=0, 0.5, 0.1 / Animation_Speed do
1394
		Swait()
1395
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0.2, 0) * ANGLES(RAD(-15), RAD(0), RAD(0)), 0.5 / Animation_Speed)
1396
		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.5 / Animation_Speed)
1397
		--PupilWeld.C0 = Clerp(PupilWeld.C0, CF(0.13,0.27,-0.58) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1398
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.75,0) * ANGLES(RAD(0), RAD(0), RAD(85)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1399
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.75, 0) * ANGLES(RAD(0), RAD(0), RAD(-85)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1400
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(-15)), 0.5 / Animation_Speed)
1401-
		local ICICLE = CreatePart(3, Effects, "Ice", 0, 0.25, COLOR, "Ice", VT(10,25,10))
1401+
1402
	end
1403
	local IceMaterializeSounds = {
1404
	  "333476017",
1405
	  "333475981",
1406
	  "333475957",
1407
	  "333475929"
1408
	}
1409-
		CreateDebreeRing(ICICLE,Torso.Position+VT(0,-4,0),i+1,VT(6+i,6+i,6+i),400-(50*i))
1409+
	local ICICLE = CreatePart(3, Effects, "Ice", 0, 0.25, COLOR, "Ice", VT(10000,25000,10000))
1410
	MakeForm(ICICLE,"Cone")
1411
	ICICLE.CFrame = CF(Torso.Position)
1412
	CreateDebreeRing(ICICLE,Torso.Position+VT(0,-4,0),1,VT(60,60,60),70*5)
1413
	CreateSound(IceMaterializeSounds[MRANDOM(1,#IceMaterializeSounds)], ICICLE, 3, 1)
1414
	AoEDamage(Torso.Position,2,3,4,5,false,2,2,false)
1415
	AoEStun(Torso.Position,2,5)
1416
	for i = 1, 8 do
1417
		Swait(50)
1418
		CreateSound("231917750", ICICLE, 3, 1)
1419
		CreateSound(IceMaterializeSounds[MRANDOM(1,#IceMaterializeSounds)], ICICLE, 3, 1)
1420
		AoEDamage(Torso.Position,i*10,4,12,5,false,2,2,false)
1421
		AoEStun(Torso.Position,i*10,15)
1422
		ICICLE.Size = ICICLE.Size + VT(5,5,5)
1423
		ICICLE.Mesh.Scale = ICICLE.Size/50
1424
		MagicSphere(ICICLE.Size,35,ICICLE.CFrame,COLOR,VT(0.6,0.6,0.6))
1425
		local ICICLE = CreatePart(3, Effects, "Ice", 0, 0.25, COLOR, "Ice", VT(2000,5000,2000))
1426
		MakeForm(ICICLE,"Cone")
1427
		ICICLE.CFrame = CF(Torso.Position)*CF(MRANDOM(-10,10)*i/3,0,MRANDOM(-10,10)*i/3)*ANGLES(RAD(MRANDOM(-15,15)),RAD(MRANDOM(-15,15)),RAD(MRANDOM(-15,15)))
1428
		coroutine.resume(coroutine.create(function()
1429
			Swait(400-(50*i))
1430
			ICICLE.Anchored = false
1431
		end))
1432
		MagicSphere(ICICLE.Size,35,ICICLE.CFrame,COLOR,VT(0.3,0.3,0.3))
1433
		CreateDebreeRing(ICICLE,Torso.Position+VT(0,-4,0),i+1,VT(60+i,60+i,60+i),400-(50*i))
1434
		CreateSound(IceMaterializeSounds[MRANDOM(1,#IceMaterializeSounds)], ICICLE, 3, 1)
1435
	end
1436-
	local GEM = CreatePart(3, Effects, "Ice", 0, 0.25, COLOR, "Ice", VT(0.3,0.6,0.3))
1436+
1437
	ATTACK = false
1438
	Rooted = false
1439
end
1440
1441
function Taunt()
1442
	local IceMaterializeSounds = {
1443
	  "333476017",
1444
	  "333475981",
1445
	  "333475957",
1446
	  "333475929"
1447
	}
1448
	ATTACK = true
1449
	Rooted = true
1450
	CreateSound("649634100", Head, 10, 0.8)
1451
	for i=0, 0.55, 0.1 / Animation_Speed do
1452
		Swait()
1453
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
1454
		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.5 / Animation_Speed)
1455
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(-45), RAD(-25)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1456
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1457
		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.5 / Animation_Speed)
1458
		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.5 / Animation_Speed)
1459
	end
1460
	local GEM = CreatePart(3, Effects, "Ice", 0, 0.25, COLOR, "Ice", VT(0.4,0.7,0.8))
1461
	CreateMesh("SpecialMesh", GEM, "FileMesh", "9756362", "", VT(0.6,01.2,0.6), VT(0,0,0))
1462
	GEM.CFrame = CF(RightArm.CFrame*CF(0,-1.3,0).p+VT(0,1,0))
1463
	MagicSphere(GEM.Size,35,GEM.CFrame,COLOR,VT(0.1,0.1,0.1))
1464
	CreateSound(IceMaterializeSounds[MRANDOM(1,#IceMaterializeSounds)], GEM, 3, 1)
1465
	for i=0, 5, 0.1 / Animation_Speed do
1466
		Swait()
1467
		GEM.CFrame = GEM.CFrame * ANGLES(RAD(0),RAD(5),RAD(0))
1468
		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)
1469
		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)
1470
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(-45), RAD(-25)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1471
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1472
		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)
1473
		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)
1474
	end
1475
	MagicSphere(GEM.Size,35,GEM.CFrame,COLOR,VT(0.1,0.1,0.1))
1476
	GEM:remove()
1477
	ATTACK = false
1478
	Rooted = false
1479
end
1480
1481
--//=================================\\
1482
--||	  ASSIGN THINGS TO KEYS
1483
--\\=================================//
1484
1485
function MouseDown(Mouse)
1486
	if ATTACK == false then
1487
		Strike()
1488
	end
1489
end
1490
1491
function MouseUp(Mouse)
1492
HOLD = false
1493
end
1494
1495
function KeyDown(Key)
1496
	KEYHOLD = true
1497
	if Key == "z" and ATTACK == false then
1498
		IceWall()
1499
	end
1500
1501
	if Key == "b" and ATTACK == false then
1502
		IciclePrison()
1503
	end
1504
1505
	if Key == "c" and ATTACK == false then
1506
		IceChuck()
1507
	end
1508
1509
	if Key == "v" and ATTACK == false then
1510
		FrozenKingdom()
1511
	end
1512
1513
	if Key == "t" and ATTACK == false then
1514
		Taunt()
1515
	end
1516
end
1517
1518
function KeyUp(Key)
1519
	KEYHOLD = false
1520
end
1521
1522
	Mouse.Button1Down:connect(function(NEWKEY)
1523
		MouseDown(NEWKEY)
1524
	end)
1525
	Mouse.Button1Up:connect(function(NEWKEY)
1526
		MouseUp(NEWKEY)
1527
	end)
1528
	Mouse.KeyDown:connect(function(NEWKEY)
1529
		KeyDown(NEWKEY)
1530
	end)
1531
	Mouse.KeyUp:connect(function(NEWKEY)
1532
		KeyUp(NEWKEY)
1533
	end)
1534
1535
--//=================================\\
1536
--\\=================================//
1537
1538
1539
function unanchor()
1540
	if UNANCHOR == true then
1541
		g = Character:GetChildren()
1542
		for i = 1, #g do
1543
			if g[i].ClassName == "Part" then
1544
				g[i].Anchored = false
1545
			end
1546
		end
1547
	end
1548
end
1549
1550
1551
--//=================================\\
1552
--||	WRAP THE WHOLE SCRIPT UP
1553
--\\=================================//
1554
1555
Humanoid.Changed:connect(function(Jump)
1556
	if Jump == "Jump" and (Disable_Jump == true) then
1557
		Humanoid.Jump = false
1558
	end
1559
end)
1560
1561
while true do
1562
	Swait()
1563
	ANIMATE.Parent = nil
1564
	local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
1565
	IDLEANIMATION:Play()
1566
	SINE = SINE + CHANGE
1567
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
1568
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
1569
	local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
1570
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
1571
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
1572
	if ANIM == "Walk" and TORSOVELOCITY > 1 then
1573
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1574
		Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1575
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1576
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1577
	elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
1578
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1579
		Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1580
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1581
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1582
	end
1583
	if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
1584
		ANIM = "Jump"
1585
		if ATTACK == false then
1586
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1587
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 * Player_Size, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1588
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
1589
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
1590
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
1591
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
1592
	       end
1593
	elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
1594
		ANIM = "Fall"
1595
		if ATTACK == false then
1596
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1597
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1598
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
1599
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
1600
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
1601
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
1602
		end
1603
	elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
1604
		ANIM = "Idle"
1605
		if ATTACK == false then
1606
			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)
1607
			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)
1608
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1609
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1610
			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)
1611
			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)
1612
		end
1613
	elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
1614
		ANIM = "Walk"
1615
		WALK = WALK + 1 / Animation_Speed
1616
		if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
1617
			WALK = 0
1618
			if WALKINGANIM == true then
1619
				WALKINGANIM = false
1620
			elseif WALKINGANIM == false then
1621
				WALKINGANIM = true
1622
			end
1623
		end
1624
		--RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1625
		--LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1626
		if ATTACK == false then
1627
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1628
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1629
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(30 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1630
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-30 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1631
			RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1 - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
1632
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
1633
		end
1634
	end
1635
	unanchor()
1636
	Humanoid.MaxHealth = "inf"
1637
	Humanoid.Health = "inf"
1638
	if Rooted == false then
1639
		Disable_Jump = false
1640
		Humanoid.WalkSpeed = Speed
1641
	elseif Rooted == true then
1642
		Disable_Jump = true
1643
		Humanoid.WalkSpeed = 0
1644
	end
1645
end
1646
1647
--//=================================\\
1648
--\\=================================//
1649
1650
1651
1652
1653
1654
--//====================================================\\--
1655
--||			  		 END OF SCRIPT
1656
--\\====================================================//--