View difference between Paste ID: jbZSYcAN and Q673146Z
SHOW: | | - or go back to the newest paste.
1
-- This script has been converted to FE by iPxter
2
3
4
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6
do
7-
Player = game:GetService("Players").LocalPlayer
7+
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8
	script.Parent = Player.Character
9
10
	--RemoteEvent for communicating
11
	local Event = Instance.new("RemoteEvent")
12
	Event.Name = "UserInput_Event"
13-
Mouse = Player:GetMouse()
13+
14
	--Fake event to make stuff like Mouse.KeyDown work
15
	local function fakeEvent()
16
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
17
		t.connect = t.Connect
18
		return t
19
	end
20
21
	--Creating fake input objects with fake variables
22
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
23
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26
	end}
27
	--Merged 2 functions into one by checking amount of arguments
28
	CAS.UnbindAction = CAS.BindAction
29
30
	--This function will trigger the events that have been :Connect()'ed
31
	local function te(self,ev,...)
32
		local t = m[ev]
33
		if t and t._fakeEvent and t.Function then
34
			t.Function(...)
35
		end
36
	end
37
	m.TrigEvent = te
38
	UIS.TrigEvent = te
39
40
	Event.OnServerEvent:Connect(function(plr,io)
41
	    if plr~=Player then return end
42
		if io.isMouse then
43
			m.Target = io.Target
44
			m.Hit = io.Hit
45
		else
46
			local b = io.UserInputState == Enum.UserInputState.Begin
47
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
48
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
49
			end
50
			for _,t in pairs(CAS.Actions) do
51
				for _,k in pairs(t.Keys) do
52
					if k==io.KeyCode then
53
						t.Function(t.Name,io.UserInputState,io)
54
					end
55
				end
56
			end
57
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59
	    end
60
	end)
61
	Event.Parent = NLS([==[
62
	local Player = game:GetService("Players").LocalPlayer
63
	local Event = script:WaitForChild("UserInput_Event")
64
65
	local UIS = game:GetService("UserInputService")
66
	local input = function(io,a)
67
		if a then return end
68
		--Since InputObject is a client-side instance, we create and pass table instead
69
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70
	end
71
	UIS.InputBegan:Connect(input)
72
	UIS.InputEnded:Connect(input)
73
74
	local Mouse = Player:GetMouse()
75
	local h,t
76
	--Give the server mouse data 30 times every second, but only if the values changed
77
	--If player is not moving their mouse, client won't fire events
78
	while wait(1/30) do
79
		if h~=Mouse.Hit or t~=Mouse.Target then
80
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82
		end
83
	end]==],Player.Character)
84
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85
end
86
87
88
--//====================================================\\--
89
--||			   CREATED BY SHACKLUSTER
90
--\\====================================================//--
91
92
wait(0.2)
93
94
Player = owner
95
PlayerGui = Player.PlayerGui
96
Cam = workspace.CurrentCamera
97
Backpack = Player.Backpack
98
Character = Player.Character
99
Humanoid = Character.Humanoid
100
RootPart = Character["HumanoidRootPart"]
101
Torso = Character["Torso"]
102
Head = Character["Head"]
103
RightArm = Character["Right Arm"]
104
LeftArm = Character["Left Arm"]
105
RightLeg = Character["Right Leg"]
106
LeftLeg = Character["Left Leg"]
107
RootJoint = RootPart["RootJoint"]
108
Neck = Torso["Neck"]
109
RightShoulder = Torso["Right Shoulder"]
110
LeftShoulder = Torso["Left Shoulder"]
111
RightHip = Torso["Right Hip"]
112
LeftHip = Torso["Left Hip"]
113
114
IT = Instance.new
115
CF = CFrame.new
116
VT = Vector3.new
117
RAD = math.rad
118
C3 = Color3.new
119
UD2 = UDim2.new
120
BRICKC = BrickColor.new
121
ANGLES = CFrame.Angles
122
EULER = CFrame.fromEulerAnglesXYZ
123
COS = math.cos
124
ACOS = math.acos
125
SIN = math.sin
126
ASIN = math.asin
127
ABS = math.abs
128
MRANDOM = math.random
129
FLOOR = math.floor
130
131
--//=================================\\
132
--|| 	      USEFUL VALUES
133
--\\=================================//
134
135
Animation_Speed = 3
136
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
137
local Speed = 12
138
local SIZE = 1
139
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
140
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
141
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
142
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
143
local DAMAGEMULTIPLIER = 1
144
local ANIM = "Idle"
145
local ATTACK = false
146
local EQUIPPED = false
147
local HOLD = false
148
local COMBO = 1
149
local Rooted = false
150
local SINE = 0
151
local KEYHOLD = false
152
local CHANGE = 2 / Animation_Speed
153
local WALKINGANIM = false
154
local VALUE1 = false
155
local VALUE2 = false
156
local ROBLOXIDLEANIMATION = IT("Animation")
157
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
158
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
159
--ROBLOXIDLEANIMATION.Parent = Humanoid
160
local WEAPONGUI = IT("ScreenGui", PlayerGui)
161
WEAPONGUI.Name = "Weapon GUI"
162
local Weapon = IT("Model")
163
Weapon.Name = "Adds"
164
local Effects = IT("Folder", Weapon)
165
Effects.Name = "Effects"
166
local ANIMATOR = Humanoid.Animator
167
local ANIMATE = Character.Animate
168
local UNANCHOR = true
169
local PLAYANIMS = true
170
local CLOAKED = false
171
172
--//=================================\\
173
--\\=================================//
174
175
176
--//=================================\\
177
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
178
--\\=================================//
179
180
ArtificialHB = Instance.new("BindableEvent", script)
181
ArtificialHB.Name = "ArtificialHB"
182
183
script:WaitForChild("ArtificialHB")
184
185
frame = Frame_Speed
186
tf = 0
187
allowframeloss = false
188
tossremainder = false
189
lastframe = tick()
190
script.ArtificialHB:Fire()
191
192
game:GetService("RunService").Heartbeat:connect(function(s, p)
193
	tf = tf + s
194
	if tf >= frame then
195
		if allowframeloss then
196
			script.ArtificialHB:Fire()
197
			lastframe = tick()
198
		else
199
			for i = 1, math.floor(tf / frame) do
200
				script.ArtificialHB:Fire()
201
			end
202
		lastframe = tick()
203
		end
204
		if tossremainder then
205
			tf = 0
206
		else
207
			tf = tf - frame * math.floor(tf / frame)
208
		end
209
	end
210
end)
211
212
--//=================================\\
213
--\\=================================//
214
215
--//=================================\\
216
--|| 	      SOME FUNCTIONS
217
--\\=================================//
218
219
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
220
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
221
end
222
223
function PositiveAngle(NUMBER)
224
	if NUMBER >= 0 then
225
		NUMBER = 0
226
	end
227
	return NUMBER
228
end
229
230
function NegativeAngle(NUMBER)
231
	if NUMBER <= 0 then
232
		NUMBER = 0
233
	end
234
	return NUMBER
235
end
236
237
function Swait(NUMBER)
238
	if NUMBER == 0 or NUMBER == nil then
239
		ArtificialHB.Event:wait()
240
	else
241
		for i = 1, NUMBER do
242
			ArtificialHB.Event:wait()
243
		end
244
	end
245
end
246
247
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
248
	local NEWMESH = IT(MESH)
249
	if MESH == "SpecialMesh" then
250
		NEWMESH.MeshType = MESHTYPE
251
		if MESHID ~= "nil" and MESHID ~= "" then
252
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
253
		end
254
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
255
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
256
		end
257
	end
258
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
259
	NEWMESH.Scale = SCALE
260
	NEWMESH.Parent = PARENT
261
	return NEWMESH
262
end
263
264
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
265
	local NEWPART = IT("Part")
266
	NEWPART.formFactor = FORMFACTOR
267
	NEWPART.Reflectance = REFLECTANCE
268
	NEWPART.Transparency = TRANSPARENCY
269
	NEWPART.CanCollide = false
270
	NEWPART.Locked = true
271
	NEWPART.Anchored = true
272
	if ANCHOR == false then
273
		NEWPART.Anchored = false
274
	end
275
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
276
	NEWPART.Name = NAME
277
	NEWPART.Size = SIZE
278
	NEWPART.Position = Torso.Position
279
	NEWPART.Material = MATERIAL
280
	NEWPART:BreakJoints()
281
	NEWPART.Parent = PARENT
282
	return NEWPART
283
end
284
285
	local function weldBetween(a, b)
286
	    local weldd = Instance.new("ManualWeld")
287
	    weldd.Part0 = a
288
	    weldd.Part1 = b
289
	    weldd.C0 = CFrame.new()
290
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
291
	    weldd.Parent = a
292
	    return weldd
293
	end
294
295
296
function QuaternionFromCFrame(cf)
297
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
298
	local trace = m00 + m11 + m22
299
	if trace > 0 then 
300
		local s = math.sqrt(1 + trace)
301
		local recip = 0.5 / s
302
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
303
	else
304
		local i = 0
305
		if m11 > m00 then
306
			i = 1
307
		end
308
		if m22 > (i == 0 and m00 or m11) then
309
			i = 2
310
		end
311
		if i == 0 then
312
			local s = math.sqrt(m00 - m11 - m22 + 1)
313
			local recip = 0.5 / s
314
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
315
		elseif i == 1 then
316
			local s = math.sqrt(m11 - m22 - m00 + 1)
317
			local recip = 0.5 / s
318
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
319
		elseif i == 2 then
320
			local s = math.sqrt(m22 - m00 - m11 + 1)
321
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
322
		end
323
	end
324
end
325
 
326
function QuaternionToCFrame(px, py, pz, x, y, z, w)
327
	local xs, ys, zs = x + x, y + y, z + z
328
	local wx, wy, wz = w * xs, w * ys, w * zs
329
	local xx = x * xs
330
	local xy = x * ys
331
	local xz = x * zs
332
	local yy = y * ys
333
	local yz = y * zs
334
	local zz = z * zs
335
	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))
336
end
337
 
338
function QuaternionSlerp(a, b, t)
339
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
340
	local startInterp, finishInterp;
341
	if cosTheta >= 0.0001 then
342
		if (1 - cosTheta) > 0.0001 then
343
			local theta = ACOS(cosTheta)
344
			local invSinTheta = 1 / SIN(theta)
345
			startInterp = SIN((1 - t) * theta) * invSinTheta
346
			finishInterp = SIN(t * theta) * invSinTheta
347
		else
348
			startInterp = 1 - t
349
			finishInterp = t
350
		end
351
	else
352
		if (1 + cosTheta) > 0.0001 then
353
			local theta = ACOS(-cosTheta)
354
			local invSinTheta = 1 / SIN(theta)
355
			startInterp = SIN((t - 1) * theta) * invSinTheta
356
			finishInterp = SIN(t * theta) * invSinTheta
357
		else
358
			startInterp = t - 1
359
			finishInterp = t
360
		end
361
	end
362
	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
363
end
364
365
function Clerp(a, b, t)
366
	local qa = {QuaternionFromCFrame(a)}
367
	local qb = {QuaternionFromCFrame(b)}
368
	local ax, ay, az = a.x, a.y, a.z
369
	local bx, by, bz = b.x, b.y, b.z
370
	local _t = 1 - t
371
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
372
end
373
374
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
375
	local frame = IT("Frame")
376
	frame.BackgroundTransparency = TRANSPARENCY
377
	frame.BorderSizePixel = BORDERSIZEPIXEL
378
	frame.Position = POSITION
379
	frame.Size = SIZE
380
	frame.BackgroundColor3 = COLOR
381
	frame.BorderColor3 = BORDERCOLOR
382
	frame.Name = NAME
383
	frame.Parent = PARENT
384
	return frame
385
end
386
387
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
388
	local label = IT("TextLabel")
389
	label.BackgroundTransparency = 1
390
	label.Size = UD2(1, 0, 1, 0)
391
	label.Position = UD2(0, 0, 0, 0)
392
	label.TextColor3 = TEXTCOLOR
393
	label.TextStrokeTransparency = STROKETRANSPARENCY
394
	label.TextTransparency = TRANSPARENCY
395
	label.FontSize = TEXTFONTSIZE
396
	label.Font = TEXTFONT
397
	label.BorderSizePixel = BORDERSIZEPIXEL
398
	label.TextScaled = false
399
	label.Text = TEXT
400
	label.Name = NAME
401
	label.Parent = PARENT
402
	return label
403
end
404
405
function NoOutlines(PART)
406
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
407
end
408
409
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
410
	local NEWWELD = IT(TYPE)
411
	NEWWELD.Part0 = PART0
412
	NEWWELD.Part1 = PART1
413
	NEWWELD.C0 = C0
414
	NEWWELD.C1 = C1
415
	NEWWELD.Parent = PARENT
416
	return NEWWELD
417
end
418
419
local S = IT("Sound")
420
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
421
	local NEWSOUND = nil
422
	coroutine.resume(coroutine.create(function()
423
		NEWSOUND = S:Clone()
424
		NEWSOUND.Parent = PARENT
425
		NEWSOUND.Volume = VOLUME
426
		NEWSOUND.Pitch = PITCH
427
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
428
		NEWSOUND:play()
429
		if DOESLOOP == true then
430
			NEWSOUND.Looped = true
431
		else
432
			repeat wait(1) until NEWSOUND.Playing == false
433
			NEWSOUND:remove()
434
		end
435
	end))
436
	return NEWSOUND
437
end
438
439
function MakeForm(PART,TYPE)
440
	if TYPE == "Cyl" then
441
		local MSH = IT("CylinderMesh",PART)
442
	elseif TYPE == "Ball" then
443
		local MSH = IT("SpecialMesh",PART)
444
		MSH.MeshType = "Sphere"
445
	elseif TYPE == "Wedge" then
446
		local MSH = IT("SpecialMesh",PART)
447
		MSH.MeshType = "Wedge"
448
	end
449
end
450
451
function CFrameFromTopBack(at, top, back)
452
	local right = top:Cross(back)
453
	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)
454
end
455
456
function PuddleOfBlood(Position,MaxDrop,Model,MaxSize)
457
	local HITFLOOR, HITPOS, NORMAL = Raycast(Position, (CF(Position, Position + VT(0, -1, 0))).lookVector, MaxDrop, Model)
458
	if HITFLOOR ~= nil then
459
		if HITFLOOR.Parent ~= Weapon and HITFLOOR.Parent ~= Character then
460
			if HITFLOOR.Name == "BloodPuddle" then
461
				local DIST = (Position - HITFLOOR.Position).Magnitude
462
				if (HITFLOOR.Size.Z <= 5 and HITFLOOR.Size.Z < MaxSize) or (HITFLOOR.Size.Z > 5 and HITFLOOR.Size.Z < MaxSize and DIST < HITFLOOR.Size.Z/3) then
463
					HITFLOOR.Size = HITFLOOR.Size + VT(0.1,0,0.1)
464
				end
465
			else
466
				if HITFLOOR.Anchored == true then
467
					local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(2,0,2))
468
					BLOOD.CFrame = CF(HITPOS,HITPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0))
469
					MakeForm(BLOOD,"Cyl")
470
					coroutine.resume(coroutine.create(function()
471
						Swait(75)
472
						while true do
473
							Swait()
474
							BLOOD.Size = BLOOD.Size - VT(0.02,0,0.02)
475
							if BLOOD.Size.Z < 0.051 then
476
								BLOOD:remove()
477
								break
478
							end
479
						end
480
					end))
481
				end
482
			end
483
		end
484
	end
485
end
486
487
--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})
488
function WACKYEFFECT(Table)
489
	local TYPE = (Table.EffectType or "Sphere")
490
	local SIZE = (Table.Size or VT(1,1,1))
491
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
492
	local TRANSPARENCY = (Table.Transparency or 0)
493
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
494
	local CFRAME = (Table.CFrame or Torso.CFrame)
495
	local MOVEDIRECTION = (Table.MoveToPos or nil)
496
	local ROTATION1 = (Table.RotationX or 0)
497
	local ROTATION2 = (Table.RotationY or 0)
498
	local ROTATION3 = (Table.RotationZ or 0)
499
	local MATERIAL = (Table.Material or "Neon")
500
	local COLOR = (Table.Color or C3(1,1,1))
501
	local TIME = (Table.Time or 45)
502
	local SOUNDID = (Table.SoundID or nil)
503
	local SOUNDPITCH = (Table.SoundPitch or nil)
504
	local SOUNDVOLUME = (Table.SoundVolume or nil)
505
	coroutine.resume(coroutine.create(function()
506
		local PLAYSSOUND = false
507
		local SOUND = nil
508
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
509
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
510
			PLAYSSOUND = true
511
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
512
		end
513
		EFFECT.Color = COLOR
514
		local MSH = nil
515
		if TYPE == "Sphere" then
516
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
517
		elseif TYPE == "Block" or TYPE == "Box" then
518
			MSH = IT("BlockMesh",EFFECT)
519
			MSH.Scale = SIZE
520
		elseif TYPE == "Wave" then
521
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
522
		elseif TYPE == "Ring" then
523
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
524
		elseif TYPE == "Slash" then
525
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
526
		elseif TYPE == "Round Slash" then
527
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
528
		elseif TYPE == "Swirl" then
529
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
530
		elseif TYPE == "Skull" then
531
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
532
		elseif TYPE == "Crystal" then
533
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
534
		end
535
		if MSH ~= nil then
536
			local MOVESPEED = nil
537
			if MOVEDIRECTION ~= nil then
538
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
539
			end
540
			local GROWTH = SIZE - ENDSIZE
541
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
542
			if TYPE == "Block" then
543
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
544
			else
545
				EFFECT.CFrame = CFRAME
546
			end
547
			for LOOP = 1, TIME+1 do
548
				Swait()
549
				MSH.Scale = MSH.Scale - GROWTH/TIME
550
				if TYPE == "Wave" then
551
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
552
				end
553
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
554
				if TYPE == "Block" then
555
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
556
				else
557
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
558
				end
559
				if MOVEDIRECTION ~= nil then
560
					local ORI = EFFECT.Orientation
561
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
562
					EFFECT.Orientation = ORI
563
				end
564
			end
565
			if PLAYSSOUND == false then
566
				EFFECT:remove()
567
			else
568
				repeat wait(1) until SOUND.Playing == false
569
				EFFECT:remove()
570
			end
571
		else
572
			if PLAYSSOUND == false then
573
				EFFECT:remove()
574
			else
575
				repeat Swait() until SOUND.Playing == false
576
				EFFECT:remove()
577
			end
578
		end
579
	end))
580
end
581
582
function SprayBlood(POSITION,DIRECTION,BloodSize)
583
	local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(0.3,0.3,0.3),false)
584
	BLOOD.CFrame = CF(POSITION)
585
	MakeForm(BLOOD,"Ball")
586
	local bv = Instance.new("BodyVelocity",BLOOD) 
587
	bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
588
	bv.velocity = CF(POSITION,DIRECTION+VT(MRANDOM(-3,3)/30,MRANDOM(-3,3)/30,MRANDOM(-3,3)/30)).lookVector*75
589
	bv.Name = "MOVE"
590
	Debris:AddItem(bv,0.05)
591
	coroutine.resume(coroutine.create(function()
592
		local HASTOUCHEDGROUND = false
593
		local HIT = BLOOD.Touched:Connect(function(hit)
594
			if hit.Anchored == true then
595
				HASTOUCHEDGROUND = true
596
				PuddleOfBlood(BLOOD.Position+VT(0,1,0),2,BLOOD,BloodSize)
597
			end
598
		end)
599
		wait(5)
600
		if HASTOUCHEDGROUND == false then
601
			BLOOD:remove()
602
		end
603
	end))
604
end
605
606
Debris = game:GetService("Debris")
607
608
function CastProperRay(StartPos, EndPos, Distance, Ignore)
609
	local DIRECTION = CF(StartPos,EndPos).lookVector
610
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
611
end
612
613
function turnto(position)
614
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
615
end
616
617
function recurse(root,callback,i)
618
	i= i or 0
619
	for _,v in pairs(root:GetChildren()) do
620
		i = i + 1
621
		callback(i,v)
622
		
623
		if #v:GetChildren() > 0 then
624
			i = recurse(v,callback,i)
625
		end
626
	end
627
	
628
	return i
629
end
630
631
function ragdollJoint(character, part0, part1, attachmentName, className, properties)
632
	attachmentName = attachmentName.."RigAttachment"
633
	local constraint = Instance.new(className.."Constraint")
634
	constraint.Attachment0 = part0:FindFirstChild(attachmentName)
635
	constraint.Attachment1 = part1:FindFirstChild(attachmentName)
636
	constraint.Name = "RagdollConstraint"..part1.Name
637
	
638
	for _,propertyData in next,properties or {} do
639
		constraint[propertyData[1]] = propertyData[2]
640
	end
641
	
642
	constraint.Parent = character
643
end
644
645
function getAttachment0(character, attachmentName)
646
	for _,child in next,character:GetChildren() do
647
		local attachment = child:FindFirstChild(attachmentName)
648
		if attachment then
649
			return attachment
650
		end
651
	end
652
end
653
654
function R15Ragdoll(character)
655
	recurse(character, function(_,v)
656
		if v:IsA("Attachment") then
657
			v.Axis = Vector3.new(0, 1, 0)
658
			v.SecondaryAxis = Vector3.new(0, 0, 1)
659
			v.Rotation = Vector3.new(0, 0, 0)
660
		end
661
	end)
662
	for _,child in next,character:GetChildren() do
663
		if child:IsA("Accoutrement") then
664
			for _,part in next,child:GetChildren() do
665
				if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
666
					local attachment1 = part:FindFirstChildOfClass("Attachment")
667
					local attachment0 = getAttachment0(character,attachment1.Name)
668
					if attachment0 and attachment1 then
669
						local constraint = Instance.new("HingeConstraint")
670
						constraint.Attachment0 = attachment0
671
						constraint.Attachment1 = attachment1
672
						constraint.LimitsEnabled = true
673
						constraint.UpperAngle = 0
674
						constraint.LowerAngle = 0
675
						constraint.Parent = character
676
					end
677
				elseif part.Name == "HumanoidRootPart" then
678
					part:remove()
679
				end
680
			end
681
		end
682
	end
683
	
684
	ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
685
		{"LimitsEnabled",true};
686
		{"UpperAngle",5};
687
	})
688
	ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
689
		{"LimitsEnabled",true};
690
		{"UpperAngle",15};
691
	})
692
	
693
	local handProperties = {
694
		{"LimitsEnabled", true};
695
		{"UpperAngle",0};
696
		{"LowerAngle",0};
697
	}
698
	ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
699
	ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
700
	
701
	local shinProperties = {
702
		{"LimitsEnabled", true};
703
		{"UpperAngle", 0};
704
		{"LowerAngle", -75};
705
	}
706
	ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
707
	ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
708
	
709
	local footProperties = {
710
		{"LimitsEnabled", true};
711
		{"UpperAngle", 15};
712
		{"LowerAngle", -45};
713
	}
714
	ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
715
	ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
716
	
717
	ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
718
	ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
719
	ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
720
	ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
721
	ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
722
	ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
723
end
724
725
function Ragdoll(Character2,CharTorso)
726
	Character2:BreakJoints()
727
	local hum = Character2:findFirstChild("Humanoid")
728
	hum:remove()
729
	local function Scan(ch)
730
		local e
731
		for e = 1,#ch do
732
			Scan(ch[e]:GetChildren())
733
			if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
734
				ch[e]:remove()
735
			end
736
		end
737
	end
738
	local NEWHUM = IT("Humanoid")
739
	NEWHUM.Name = "Corpse"
740
	NEWHUM.Health = 0
741
	NEWHUM.MaxHealth = 0
742
	NEWHUM.PlatformStand = true
743
	NEWHUM.Parent = Character2
744
	NEWHUM.DisplayDistanceType = "None"
745
746
	local ch = Character2:GetChildren()
747
	local i
748
	for i = 1,#ch do
749
		if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
750
			ch[i]:remove()
751
		end
752
	end
753
754
	local Torso2 = Character2.Torso
755
	local movevector = Vector3.new()
756
757
	if Torso2 then
758
		movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
759
		local Head = Character2:FindFirstChild("Head")
760
		if Head then
761
			local Neck = Instance.new("Weld")
762
			Neck.Name = "Neck"
763
			Neck.Part0 = Torso2
764
			Neck.Part1 = Head
765
			Neck.C0 = CFrame.new(0, 1.5, 0)
766
			Neck.C1 = CFrame.new()
767
			Neck.Parent = Torso2
768
769
		end
770
		local Limb = Character2:FindFirstChild("Right Arm")
771
		if Limb then
772
773
			Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
774
			local Joint = Instance.new("Glue")
775
			Joint.Name = "RightShoulder"
776
			Joint.Part0 = Torso2
777
			Joint.Part1 = Limb
778
			Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
779
			Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
780
			Joint.Parent = Torso2
781
782
			local B = Instance.new("Part")
783
			B.TopSurface = 0
784
			B.BottomSurface = 0
785
			B.formFactor = "Symmetric"
786
			B.Size = Vector3.new(1, 1, 1)
787
			B.Transparency = 1
788
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
789
			B.Parent = Character2
790
			local W = Instance.new("Weld")
791
			W.Part0 = Limb
792
			W.Part1 = B
793
			W.C0 = CFrame.new(0, -0.5, 0)
794
			W.Parent = Limb
795
796
		end
797
		local Limb = Character2:FindFirstChild("Left Arm")
798
		if Limb then
799
800
			Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
801
			local Joint = Instance.new("Glue")
802
			Joint.Name = "LeftShoulder"
803
			Joint.Part0 = Torso2
804
			Joint.Part1 = Limb
805
			Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
806
			Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
807
			Joint.Parent = Torso2
808
809
			local B = Instance.new("Part")
810
			B.TopSurface = 0
811
			B.BottomSurface = 0
812
			B.formFactor = "Symmetric"
813
			B.Size = Vector3.new(1, 1, 1)
814
			B.Transparency = 1
815
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
816
			B.Parent = Character2
817
			local W = Instance.new("Weld")
818
			W.Part0 = Limb
819
			W.Part1 = B
820
			W.C0 = CFrame.new(0, -0.5, 0)
821
			W.Parent = Limb
822
823
		end
824
		local Limb = Character2:FindFirstChild("Right Leg")
825
		if Limb then
826
827
			Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
828
			local Joint = Instance.new("Glue")
829
			Joint.Name = "RightHip"
830
			Joint.Part0 = Torso2
831
			Joint.Part1 = Limb
832
			Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
833
			Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
834
			Joint.Parent = Torso2
835
836
			local B = Instance.new("Part")
837
			B.TopSurface = 0
838
			B.BottomSurface = 0
839
			B.formFactor = "Symmetric"
840
			B.Size = Vector3.new(1, 1, 1)
841
			B.Transparency = 1
842
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
843
			B.Parent = Character2
844
			local W = Instance.new("Weld")
845
			W.Part0 = Limb
846
			W.Part1 = B
847
			W.C0 = CFrame.new(0, -0.5, 0)
848
			W.Parent = Limb
849
850
		end
851
		local Limb = Character2:FindFirstChild("Left Leg")
852
		if Limb then
853
854
			Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
855
			local Joint = Instance.new("Glue")
856
			Joint.Name = "LeftHip"
857
			Joint.Part0 = Torso2
858
			Joint.Part1 = Limb
859
			Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
860
			Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
861
			Joint.Parent = Torso2
862
863
			local B = Instance.new("Part")
864
			B.TopSurface = 0
865
			B.BottomSurface = 0
866
			B.formFactor = "Symmetric"
867
			B.Size = Vector3.new(1, 1, 1)
868
			B.Transparency = 1
869
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
870
			B.Parent = Character2
871
			local W = Instance.new("Weld")
872
			W.Part0 = Limb
873
			W.Part1 = B
874
			W.C0 = CFrame.new(0, -0.5, 0)
875
			W.Parent = Limb
876
877
		end
878
		--[
879
		local Bar = Instance.new("Part")
880
		Bar.TopSurface = 0
881
		Bar.BottomSurface = 0
882
		Bar.formFactor = "Symmetric"
883
		Bar.Size = Vector3.new(1, 1, 1)
884
		Bar.Transparency = 1
885
		Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
886
		Bar.Parent = Character2
887
		local Weld = Instance.new("Weld")
888
		Weld.Part0 = Torso2
889
		Weld.Part1 = Bar
890
		Weld.C0 = CFrame.new(0, 0.5, 0)
891
		Weld.Parent = Torso2
892
		--]]
893
	end
894
	Character2.Parent = workspace
895
	Debris:AddItem(Character2,5)
896
897
	return Character2,Torso2
898
end
899
900
--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})
901
function WACKYEFFECT(Table)
902
	local TYPE = (Table.EffectType or "Sphere")
903
	local SIZE = (Table.Size or VT(1,1,1))
904
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
905
	local TRANSPARENCY = (Table.Transparency or 0)
906
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
907
	local CFRAME = (Table.CFrame or Torso.CFrame)
908
	local MOVEDIRECTION = (Table.MoveToPos or nil)
909
	local ROTATION1 = (Table.RotationX or 0)
910
	local ROTATION2 = (Table.RotationY or 0)
911
	local ROTATION3 = (Table.RotationZ or 0)
912
	local MATERIAL = (Table.Material or "Neon")
913
	local COLOR = (Table.Color or C3(1,1,1))
914
	local TIME = (Table.Time or 45)
915
	local SOUNDID = (Table.SoundID or nil)
916
	local SOUNDPITCH = (Table.SoundPitch or nil)
917
	local SOUNDVOLUME = (Table.SoundVolume or nil)
918
	coroutine.resume(coroutine.create(function()
919
		local PLAYSSOUND = false
920
		local SOUND = nil
921
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
922
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
923
			PLAYSSOUND = true
924
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
925
		end
926
		EFFECT.Color = COLOR
927
		local MSH = nil
928
		if TYPE == "Sphere" then
929
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
930
		elseif TYPE == "Block" or TYPE == "Box" then
931
			MSH = IT("BlockMesh",EFFECT)
932
			MSH.Scale = SIZE
933
		elseif TYPE == "Wave" then
934
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
935
		elseif TYPE == "Ring" then
936
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
937
		elseif TYPE == "Slash" then
938
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
939
		elseif TYPE == "Round Slash" then
940
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
941
		elseif TYPE == "Swirl" then
942
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
943
		elseif TYPE == "Skull" then
944
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
945
		elseif TYPE == "Crystal" then
946
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
947
		end
948
		if MSH ~= nil then
949
			local MOVESPEED = nil
950
			if MOVEDIRECTION ~= nil then
951
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
952
			end
953
			local GROWTH = SIZE - ENDSIZE
954
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
955
			if TYPE == "Block" then
956
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
957
			else
958
				EFFECT.CFrame = CFRAME
959
			end
960
			for LOOP = 1, TIME+1 do
961
				Swait()
962
				MSH.Scale = MSH.Scale - GROWTH/TIME
963
				if TYPE == "Wave" then
964
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
965
				end
966
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
967
				if TYPE == "Block" then
968
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
969
				else
970
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
971
				end
972
				if MOVEDIRECTION ~= nil then
973
					local ORI = EFFECT.Orientation
974
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
975
					EFFECT.Orientation = ORI
976
				end
977
			end
978
			if PLAYSSOUND == false then
979
				EFFECT:remove()
980
			else
981
				repeat Swait() until SOUND.Playing == false
982
				EFFECT:remove()
983
			end
984
		else
985
			if PLAYSSOUND == false then
986
				EFFECT:remove()
987
			else
988
				repeat Swait() until SOUND.Playing == false
989
				EFFECT:remove()
990
			end
991
		end
992
	end))
993
end
994
995
--//=================================\\
996
--||	     WEAPON CREATION
997
--\\=================================//
998
999
local BMUSIC = IT("Sound",RootPart)
1000
local VOLUME = 0.8
1001
local PITCH = 0.8
1002
local SONGID = 521970657
1003
local A = IT("Attachment",Torso)
1004
1005
local GUN = CreatePart(3, Weapon, "Neon", 0, 0, "Really black", "Gun", VT(1, 0.8, 3),false)
1006
CreateMesh("SpecialMesh", GUN, "FileMesh", "623102664", "623102879", VT(0.01, 0.01, 0.01), VT(0,0,0))
1007
local GUNWELD = CreateWeldOrSnapOrMotor("Weld", GUN, Torso, GUN, CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90)), CF(0, 0, 0))
1008
1009
local Knife = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,1.2,0.2),false)
1010
local Grip = CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, Knife, CF(0,-1.2, -0.5) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(45), RAD(0), RAD(0)), CF(0, 0.3, 0))
1011
CreateMesh("SpecialMesh", Knife, "FileMesh", "470094777", "470149026", VT(0.2,0.2,0.2), VT(0,0,0))
1012
local A = IT("Attachment",Knife)
1013
A.Position = VT(-0, 0.2, 0.136)
1014
local B = IT("Attachment",Knife)
1015
B.Position = VT(-0, -0.95, -0.982)
1016
local Trail = IT("Trail",Knife)
1017
Trail.Attachment0 = B
1018
Trail.Attachment1 = A
1019
Trail.Lifetime = 0.1
1020
Trail.Transparency = NumberSequence.new(0.5, 1)
1021
Trail.Texture = "http://www.roblox.com/asset/?id=1472703539"
1022
Trail.Enabled = true
1023
Humanoid.DisplayDistanceType = "None"
1024
Humanoid.MaxHealth = 800
1025
Humanoid.Health = 800
1026
1027
local STEP = CreateSound(131436155, Torso, 3, 1, true)
1028
STEP.Playing = false
1029
STEP.Looped = false
1030
local STEPPING = false
1031
Humanoid.Running:Connect(function(speed)
1032
	if STEPPING == false then
1033
		STEPPING = true
1034
		repeat
1035
			local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
1036
			wait(8/TORSOVELOCITY)
1037
			local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
1038
			if TORSOVELOCITY > 1 and Torso.Transparency ~= 1 and HITFLOOR ~= nil then
1039
				STEP.Parent = Torso
1040
				STEP.Pitch = MRANDOM(8,12)/10
1041
				STEP:Play()
1042
			end
1043
		until TORSOVELOCITY < 0.6
1044
		STEPPING = false
1045
	end
1046
end)
1047
1048
for _, c in pairs(Weapon:GetChildren()) do
1049
	if c.ClassName == "Part" then
1050
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
1051
	end
1052
end
1053
1054
local SKILLTEXTCOLOR = C3(0,0,0)
1055
local SKILLFONT = "SciFi"
1056
local SKILLTEXTSIZE = 7
1057
1058
Weapon.Parent = Character
1059
1060
Humanoid.Died:connect(function()
1061
	ATTACK = true
1062
end)
1063
1064
--//=================================\\
1065
--||	     DAMAGE FUNCTIONS
1066
--\\=================================//
1067
1068
function StatLabel(CFRAME, TEXT, COLOR)
1069
	local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
1070
	STATPART.CFrame = CF(CFRAME.p,CFRAME.p+VT(MRANDOM(-5,5),MRANDOM(0,5),MRANDOM(-5,5)))
1071
	local BODYGYRO = IT("BodyGyro", STATPART)
1072
	game:GetService("Debris"):AddItem(STATPART ,5)
1073
	local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
1074
	BILLBOARDGUI.Adornee = STATPART
1075
	BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
1076
	BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
1077
	BILLBOARDGUI.AlwaysOnTop = false
1078
	local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
1079
	TEXTLABEL.BackgroundTransparency = 1
1080
	TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
1081
	TEXTLABEL.Text = TEXT
1082
	TEXTLABEL.Font = SKILLFONT
1083
	TEXTLABEL.FontSize="Size42"
1084
	TEXTLABEL.TextColor3 = COLOR
1085
	TEXTLABEL.TextStrokeTransparency = 0
1086
	TEXTLABEL.TextScaled = true
1087
	TEXTLABEL.TextWrapped = true
1088
	coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
1089
		for i = 1, 50 do
1090
			Swait()
1091
			STATPART.CFrame = STATPART.CFrame * CF(0,0,-0.2)
1092
			TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/50)
1093
			TEXTLABEL.TextStrokeTransparency = TEXTLABEL.TextTransparency
1094
		end
1095
		THEPART.Parent = nil
1096
	end),STATPART, TEXTLABEL)
1097
end
1098
1099
--//=================================\\
1100
--||			DAMAGING
1101
--\\=================================//
1102
1103
function CameraEnshaking(Length, Intensity)
1104
	coroutine.resume(coroutine.create(function()
1105
		local intensity = 1 * Intensity
1106
		local rotM = 0.01 * Intensity
1107
		for i = 0, Length, 0.1 do
1108
			Swait()
1109
			intensity = intensity - 0.05 * Intensity / Length
1110
			rotM = rotM - 5.0E-4 * Intensity / Length
1111
			hum.CameraOffset = Vector3.new(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)))
1112
			cam.CFrame = cam.CFrame * CF(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity))) * Euler(Rad(Mrandom(-intensity, intensity)) * rotM, Rad(Mrandom(-intensity, intensity)) * rotM, Rad(Mrandom(-intensity, intensity)) * rotM)
1113
		end
1114
		hum.CameraOffset = Vector3.new(0, 0, 0)
1115
	end))
1116
end
1117
1118
function ApplyDamage(Humanoid,Damage,TorsoPart)
1119
	local defence = Instance.new("BoolValue",Humanoid.Parent)
1120
	defence.Name = ("HitBy"..Player.Name)
1121
	game:GetService("Debris"):AddItem(defence, 0.001)
1122
	Damage = Damage * DAMAGEMULTIPLIER
1123
	if Humanoid.Health ~= 0 then
1124
		local CritChance = MRANDOM(1,100)
1125
		if Damage > Humanoid.Health then
1126
			Damage = math.ceil(Humanoid.Health)
1127
			if Damage == 0 then
1128
				Damage = 0.1
1129
			end
1130
		end
1131
		Humanoid.Health = Humanoid.Health - Damage
1132
		StatLabel(TorsoPart.CFrame * CF(0, 0 + (TorsoPart.Size.z - 1), 0), Damage, C3(0, 0, 0))
1133
	end
1134
end
1135
1136
function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,INSTAKILL)
1137
	local CHILDREN = workspace:GetDescendants()
1138
	for index, CHILD in pairs(CHILDREN) do
1139
		if CHILD.ClassName == "Model" and CHILD ~= Character then
1140
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
1141
			if HUM then
1142
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
1143
				if TORSO then
1144
					if (TORSO.Position - POSITION).Magnitude <= RANGE then
1145
						if INSTAKILL == true then
1146
							CHILD:BreakJoints()
1147
						else
1148
							local DMG = MRANDOM(MINDMG,MAXDMG)
1149
							ApplyDamage(HUM,DMG,TORSO)
1150
						end
1151
						if FLING > 0 then
1152
							for _, c in pairs(CHILD:GetChildren()) do
1153
								if c:IsA("BasePart") then
1154
									local bv = Instance.new("BodyVelocity") 
1155
									bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
1156
									bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
1157
									bv.Parent = c
1158
									Debris:AddItem(bv,0.05)
1159
								end
1160
							end
1161
						end
1162
					end
1163
				end
1164
			end
1165
		end
1166
	end
1167
end
1168
1169
function ApplyDamages(Humanoid,Damage)
1170
	Damage = Damage * DAMAGEMULTIPLIER
1171
	local DEAD = false
1172
	if Humanoid.Health < 2000 then
1173
		if Humanoid.Health - Damage > 0 then
1174
			Humanoid.Health = Humanoid.Health - Damage
1175
		else
1176
			DEAD = true
1177
			Humanoid.Parent:BreakJoints()
1178
		end
1179
	else
1180
		DEAD = true
1181
		Humanoid.Parent:BreakJoints()
1182
	end
1183
end
1184
1185
--//=================================\\
1186
--||	ATTACK FUNCTIONS AND STUFF
1187
--\\=================================//
1188
1189
function Cloaked()
1190
	CLOAKED = true
1191
	Speed = 0
1192
	local POS = RootPart.Position
1193
	local DISTANCE = 99999
1194
	for i = 1, 15 do
1195
		wait()
1196
		for _, c in pairs(Character:GetChildren()) do
1197
			if c:IsA("BasePart") and c ~= RootPart then
1198
				c.Transparency = c.Transparency + 1/15
1199
			elseif c.ClassName == "Accessory" then
1200
				c.Handle.Transparency = c.Handle.Transparency + 1/15
1201
			end
1202
		end
1203
		Trail.Transparency = NumberSequence.new(0.5+((i/15)/2), 1)
1204
		Knife.Transparency = Knife.Transparency + 1/15
1205
	end
1206
	Speed = 5
1207
	repeat
1208
		wait()
1209
		DISTANCE = (RootPart.Position - POS).Magnitude
1210
	until DISTANCE > 45 or CLOAKED == false
1211
	Speed = 0
1212
	for i = 1, 15 do
1213
		wait()
1214
		for _, c in pairs(Character:GetChildren()) do
1215
			if c:IsA("BasePart") and c ~= RootPart then
1216
				c.Transparency = 1 - i/15
1217
			elseif c.ClassName == "Accessory" then
1218
				c.Handle.Transparency = 1 - i/15
1219
			end
1220
		end
1221
		Trail.Transparency = NumberSequence.new(1-((0.5/15)*i), 1)
1222
		Knife.Transparency = 1 - i/15
1223
	end
1224
	Speed = 12
1225
	CLOAKED = false
1226
end
1227
1228
function Attack()
1229
	PLAYANIMS = false
1230
	ATTACK = true
1231
	Rooted = false
1232
	local TARGET = nil
1233
	Knife.CanCollide = true
1234
	local HUMAN = nil
1235
	local TORSOPART = nil
1236
	local HIT = Knife.Touched:Connect(function(hit)
1237
		if hit.Parent:FindFirstChildOfClass("Humanoid") then
1238
			local HITBODY = hit.Parent
1239
			local HUM = hit.Parent:FindFirstChildOfClass("Humanoid")
1240
			local TORSO = HITBODY:FindFirstChild("Torso") or HITBODY:FindFirstChild("UpperTorso")
1241
			if TORSO and HUM.Health > 0 then
1242
				TARGET = HITBODY
1243
				TORSOPART = TORSO
1244
				HUMAN = HUM
1245
			end
1246
		end
1247
	end)
1248
	for i=0, 0.4, 0.1 / Animation_Speed do
1249
		Swait()
1250
		if TARGET then
1251
			break
1252
		end
1253
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 1 / Animation_Speed)
1254
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(15)), 1 / Animation_Speed)
1255
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1256
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1257
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1258
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1259
	end
1260
	CreateSound(143501853,Knife,2,MRANDOM(8,13)/10,false)
1261
	for i=0, 0.5, 0.1 / Animation_Speed do
1262
		Swait()
1263
		if TARGET then
1264
			break
1265
		end
1266
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(35)), 1 / Animation_Speed)
1267
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(-35)), 1 / Animation_Speed)
1268
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -0.4) * ANGLES(RAD(90), RAD(0), RAD(35)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1269
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, -0.3) * ANGLES(RAD(90), RAD(0), RAD(35)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1270
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1271
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1272
	end
1273
	Knife.CanCollide = false
1274
	if TARGET then
1275
		CLOAKED = false
1276
		local DISPOSE = false
1277
		Rooted = true
1278
		coroutine.resume(coroutine.create(function()
1279
			repeat
1280
				Swait()
1281
				if TORSOPART then
1282
					TORSOPART.Anchored = true
1283
					TORSOPART.CFrame = RootPart.CFrame*CF(0,0,-2.2)
1284
				end
1285
			until DISPOSE == true
1286
			TORSOPART.Anchored = false
1287
		end))
1288
		for i=0, 0.5, 0.1 / Animation_Speed do
1289
			Swait()
1290
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 1 / Animation_Speed)
1291
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(15)), 1 / Animation_Speed)
1292
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.75, -1.3) * ANGLES(RAD(90), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1293
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1294
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1295
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1296
		end
1297
		CreateSound(28144268,Knife,2,MRANDOM(8,13)/10,false)
1298
		CreateSound(180083298,TORSOPART,5,MRANDOM(8,13)/10,false)
1299
		coroutine.resume(coroutine.create(function()
1300
			for i = 1, 750 do
1301
				Swait()
1302
				if HUMAN and TORSOPART then
1303
					if HUMAN.Health > 0 then
1304
						SprayBlood(TORSOPART.CFrame*CF(0,TORSOPART.Size.Y/2,-TORSOPART.Size.Z/2).p,TORSOPART.CFrame*CF(MRANDOM(-3,3)/15,TORSOPART.Size.Y+MRANDOM(-3,3)/35,-TORSOPART.Size.Z*MRANDOM(8,25)/10).p,MRANDOM(15,35)/10)
1305
						HUMAN.Health = HUMAN.Health - 1
1306
						HUMAN.WalkSpeed = MRANDOM(5,45)
1307
					else
1308
						break
1309
					end
1310
				else
1311
					break
1312
				end
1313
			end
1314
			local SCREAMS = {160718677,337800380}
1315
			if HUMAN and TORSOPART then
1316
				if HUMAN.Health == 0 then
1317
					local HEAD = TORSOPART.Parent:FindFirstChild("Head")
1318
					if HEAD then
1319
						CreateSound(SCREAMS[MRANDOM(1,#SCREAMS)],HEAD,5,MRANDOM(13,15)/10,false)
1320
						local FACE = HEAD:FindFirstChild("face")
1321
						if FACE then
1322
							FACE.Texture = "http://www.roblox.com/asset/?id=145854465"
1323
						end
1324
					end
1325
					if TORSOPART.Name == "Torso" then
1326
						Ragdoll(TORSOPART.Parent,Torso)
1327
					elseif TORSOPART.Name == "UpperTorso" then
1328
						R15Ragdoll(TORSOPART.Parent)
1329
					end
1330
				end
1331
				HUMAN.WalkSpeed = 16
1332
			end
1333
		end))
1334
		for i=0, 0.2, 0.1 / Animation_Speed do
1335
			Swait()
1336
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 1 / Animation_Speed)
1337
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(15)), 1 / Animation_Speed)
1338
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(2, 0.75, -1.3) * ANGLES(RAD(90), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1339
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1340
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1341
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1342
		end
1343
		DISPOSE = true
1344
		local bv = Instance.new("BodyVelocity") 
1345
		bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
1346
		bv.velocity = CF(TORSOPART.Position,TORSOPART.CFrame*CF(0,5,-15).p).lookVector*75
1347
		bv.Parent = TORSOPART
1348
		Debris:AddItem(bv,0.05)
1349
		for i=0, 0.5, 0.1 / Animation_Speed do
1350
			Swait()
1351
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-35)), 1 / Animation_Speed)
1352
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(35)), 1 / Animation_Speed)
1353
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-25), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1354
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.15, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(-35)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1355
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(110), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1356
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-65), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1357
		end
1358
	end
1359
	HIT:disconnect()
1360
	ATTACK = false
1361
	Rooted = false
1362
	PLAYANIMS = true
1363
end
1364
1365
function Taunt()
1366
	ATTACK = true
1367
	Rooted = true
1368
	PLAYANIMS = false
1369
	CreateSound(2062482384,Torso,5,MRANDOM(8,9)/10,false)
1370
	for i=0, 1.5, 0.1 / Animation_Speed do
1371
		Swait()
1372
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1373
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(35), RAD(0)), 1 / Animation_Speed)
1374
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(140)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1375
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-140)) * ANGLES(RAD(0), RAD(90), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1376
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1377
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1378
	end
1379
	PLAYANIMS = true
1380
	ATTACK = false
1381
	Rooted = false
1382
end
1383
1384
function Silence()
1385
	Speed = 6
1386
	ATTACK = true
1387
	Rooted = false
1388
	local GYRO = IT("BodyGyro",RootPart)
1389
	GYRO.D = 2
1390
	GYRO.P = 20000
1391
	GYRO.MaxTorque = VT(0,4000000,0)
1392
	coroutine.resume(coroutine.create(function()
1393
		repeat
1394
			Swait()
1395
			GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p)
1396
		until ATTACK == false
1397
		GYRO:Remove()
1398
	end))
1399
	for i=0, 0.2, 0.1 / Animation_Speed do
1400
		Swait()
1401
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1402
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed)
1403
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1404
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1405
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1406
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1407
	end
1408
	local AMMO = 6
1409
	local FIRING = true
1410
	local SHOOTING = false
1411
	local TIMER = 70
1412
	CreateSound(147722227, GUN, 6, 1.3, false)
1413
	GUNWELD.Part0 = LeftArm
1414
	GUNWELD.C0 = CF(0,-1.5,0) * ANGLES(RAD(0), RAD(90), RAD(-90))
1415
	local MOUSE = Mouse.Button1Down:connect(function(NEWKEY)
1416
		if SHOOTING == false and AMMO > 0 then
1417
			SHOOTING = true
1418
			AMMO = AMMO - 1
1419
			local GUNPOS = GUN.CFrame*CF(1.2, 0.5, 0).p
1420
			local HIT,POS = CastProperRay(GUNPOS,Mouse.Hit.p,1000,Character)
1421
			local DISTANCE = (POS - GUNPOS).Magnitude
1422
			if HIT then
1423
				if HIT.Parent:FindFirstChildOfClass("Humanoid") then
1424
					if HIT.Parent:FindFirstChildOfClass("Humanoid").Health > 0 then
1425
						CreateSound(160432334, HIT, 10, 1, false)
1426
						ApplyDamages(HIT.Parent:FindFirstChildOfClass("Humanoid"),35)
1427
					end
1428
				end
1429
			end
1430
			TIMER = 55
1431
			WACKYEFFECT({Time = 15, EffectType = "Block", Size = VT(0,0,0), Size2 = VT(0.3,0.3,0.3), Transparency = 0, Transparency2 = 1, CFrame = CF(GUNPOS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,0), SoundID = 330704232, SoundPitch = 1, SoundVolume = 4})
1432
			WACKYEFFECT({Time = 6, EffectType = "Box", Size = VT(0,0,DISTANCE), Size2 = VT(0.1,0.1,DISTANCE), Transparency = 0, Transparency2 = 1, CFrame = CF(GUNPOS,POS)*CF(0,0,-DISTANCE/2), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
1433
			for i=0, 0.3, 0.1 / Animation_Speed do
1434
				Swait()
1435
				RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed)
1436
				Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed)
1437
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1438
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(100), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1439
				RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1440
				LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
1441
			end
1442
			if AMMO <= 0 then
1443
				FIRING = false
1444
			end
1445
			SHOOTING = false
1446
		end
1447
	end)
1448
	repeat
1449
		Swait()
1450
		if SHOOTING == false then
1451
			TIMER = TIMER - 1
1452
			if TIMER <= 0 then
1453
				FIRING = false
1454
			end
1455
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed)
1456
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed)
1457
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1458
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1459
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1460
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
1461
		end
1462
	until FIRING == false and SHOOTING == false
1463
	MOUSE:Disconnect()
1464
	for i=0, 0.3, 0.1 / Animation_Speed do
1465
		Swait()
1466
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1467
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25), RAD(0), RAD(15)), 1 / Animation_Speed)
1468
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1469
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.525, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1470
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1471
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1472
	end
1473
	GUNWELD.Part0 = Torso
1474
	GUNWELD.C0 = CF(-1.1,-1.1,0) * ANGLES(RAD(0), RAD(90), RAD(-90))
1475
	Speed = 20
1476
	ATTACK = false
1477
	Rooted = false
1478
end
1479
1480
function ee()
1481
	    ATTACK = true
1482
	    Rooted = true
1483
		for i=0, 1, 0.1 / Animation_Speed do
1484
			Swait()
1485
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1486
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.25*SIZE) - 1)) * ANGLES(RAD(35), RAD(0), RAD(0)), 1 / Animation_Speed)
1487
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(0), RAD(0), RAD(200)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1488
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(0), RAD(0), RAD(-200)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1489
			RightHip.C0 = Clerp(RightHip.C0, CF(1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1490
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1491
		end
1492
		CameraEnshaking(1,45)
1493
		CreateSound(363808674, Torso, 6, 1, false)
1494
		for i=0, 0.5, 0.1 / Animation_Speed do
1495
			Swait()
1496
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1497
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.25*SIZE) - 1)) * ANGLES(RAD(35), RAD(0), RAD(25)), 1 / Animation_Speed)
1498
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(-40), RAD(50), RAD(200)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1499
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(40), RAD(50), RAD(-200)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1500
			RightHip.C0 = Clerp(RightHip.C0, CF(1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1501
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1502
		end
1503
		CameraEnshaking(1,45)
1504
		CreateSound(363808674, Torso, 6, 1, false)
1505
		for i=0, 0.5, 0.1 / Animation_Speed do
1506
			Swait()
1507
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1508
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1.25*SIZE) - 1)) * ANGLES(RAD(35), RAD(0), RAD(-25)), 1 / Animation_Speed)
1509
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(40), RAD(-50), RAD(200)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1510
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.3*SIZE, 0.5*SIZE, 0) * ANGLES(RAD(-40), RAD(-50), RAD(-200)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1511
			RightHip.C0 = Clerp(RightHip.C0, CF(1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1512
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1*SIZE, -1*SIZE - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-83), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1513
		end
1514
		ATTACK = false
1515
		Rooted = false
1516
end
1517
1518
--//=================================\\
1519
--||	  ASSIGN THINGS TO KEYS
1520
--\\=================================//
1521
1522
function MouseDown(Mouse)
1523
	HOLD = true
1524
	if ATTACK == false then
1525
		Attack()
1526
	end
1527
end
1528
1529
function MouseUp(Mouse)
1530
HOLD = false
1531
end
1532
1533
function KeyDown(Key)
1534
	KEYHOLD = true
1535
	if Key == "z" and ATTACK == false then
1536
		if CLOAKED == false then
1537
			Cloaked()
1538
		else
1539
			CLOAKED = false
1540
		end
1541
	end
1542
1543
	if Key == "t" and ATTACK == false then
1544
		Taunt()
1545
	end
1546
1547
	if Key == "y" and ATTACK == false then
1548
		ee()
1549
	end
1550
1551
	if Key == "q" and ATTACK == false then
1552
		Silence()
1553
	end
1554
1555
	if string.byte(Key) == 50 and ATTACK == false and CLOAKED == false then
1556
		if Speed == 12 then
1557
			Speed = 30
1558
		elseif Speed == 30 then
1559
			Speed = 12
1560
		end
1561
	end
1562
end
1563
1564
function KeyUp(Key)
1565
	KEYHOLD = false
1566
end
1567
1568
	Mouse.Button1Down:connect(function(NEWKEY)
1569
		MouseDown(NEWKEY)
1570
	end)
1571
	Mouse.Button1Up:connect(function(NEWKEY)
1572
		MouseUp(NEWKEY)
1573
	end)
1574
	Mouse.KeyDown:connect(function(NEWKEY)
1575
		KeyDown(NEWKEY)
1576
	end)
1577
	Mouse.KeyUp:connect(function(NEWKEY)
1578
		KeyUp(NEWKEY)
1579
	end)
1580
1581
--//=================================\\
1582
--\\=================================//
1583
1584
function unanchor()
1585
	if UNANCHOR == true then
1586
		g = Character:GetChildren()
1587
		for i = 1, #g do
1588
			if g[i].ClassName == "Part" then
1589
				g[i].Anchored = false
1590
			end
1591
		end
1592
	end
1593
end
1594
1595
--//=================================\\
1596
--||	WRAP THE WHOLE SCRIPT UP
1597
--\\=================================//
1598
1599
Humanoid.Changed:connect(function(Jump)
1600
	if Jump == "Jump" and (Disable_Jump == true) then
1601
		Humanoid.Jump = false
1602
	end
1603
end)
1604
1605
while true do
1606
	Swait()
1607
	script.Parent = WEAPONGUI
1608
	ANIMATE.Parent = nil
1609
	for _,v in next, Humanoid:GetPlayingAnimationTracks() do
1610
	    v:Stop();
1611
	end
1612
	SINE = SINE + CHANGE
1613
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
1614
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
1615
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
1616
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
1617
	if ANIM == "Walk" and TORSOVELOCITY > 1 then
1618
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1619
		Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1620
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1621
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1622
	elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
1623
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1624
		Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1625
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1626
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1627
	end
1628
	if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
1629
		ANIM = "Jump"
1630
		if PLAYANIMS == true then
1631
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1632
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1633
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
1634
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
1635
			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)
1636
			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)
1637
	    end
1638
	elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
1639
		ANIM = "Fall"
1640
		if PLAYANIMS == true then
1641
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1642
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1643
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
1644
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
1645
			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)
1646
			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)
1647
		end
1648
	elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
1649
		ANIM = "Idle"
1650
		if PLAYANIMS == true then
1651
			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)
1652
			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)
1653
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(15), RAD(35), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1654
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1655
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1656
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1657
		end
1658
	elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
1659
		ANIM = "Walk"
1660
		if PLAYANIMS == true then
1661
			if Humanoid.WalkSpeed <= 17 then
1662
				RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1663
				Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1664
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(20 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 0.35 / Animation_Speed)
1665
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-20 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
1666
				RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
1667
				LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
1668
			else
1669
				RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(35), RAD(0), RAD(5 * SIN(SINE / (WALKSPEEDVALUE / 2)))), 0.15 / Animation_Speed)
1670
				Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25 - 1 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(-5 * SIN(SINE / (WALKSPEEDVALUE / 2)))), 0.15 / Animation_Speed)
1671
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -0.2) * ANGLES(RAD(0), RAD(35), RAD(0)) * ANGLES(RAD(35+20 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1672
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.2) * ANGLES(RAD(0), RAD(-35), RAD(0)) * ANGLES(RAD(35-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1673
				RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(5)), 2 / Animation_Speed)
1674
				LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-5)), 2 / Animation_Speed)
1675
			end
1676
		end
1677
	end
1678
	BMUSIC.SoundId = "rbxassetid://"..SONGID
1679
	BMUSIC.Looped = true
1680
	BMUSIC.Pitch = PITCH
1681
	BMUSIC.Volume = VOLUME
1682
	BMUSIC.Playing = true
1683
	if BMUSIC.Parent ~= RootPart then
1684
		BMUSIC = IT("Sound",RootPart)
1685
	end
1686
	unanchor()
1687
	if Rooted == false then
1688
		Disable_Jump = false
1689
		Humanoid.WalkSpeed = Speed
1690
	elseif Rooted == true then
1691
		Disable_Jump = true
1692
		Humanoid.WalkSpeed = 0
1693
	end
1694
	if Head:FindFirstChild("face") then
1695
		Head.face:remove()
1696
	elseif Head:FindFirstChildOfClass("Sound") then
1697
		Head:FindFirstChildOfClass("Sound"):remove()
1698
	end
1699
	Humanoid.Health = Humanoid.Health + 1
1700
end
1701
1702
--//=================================\\
1703
--\\=================================//
1704
1705
1706
1707
1708
1709
--//====================================================\\--
1710
--||			  		 END OF SCRIPT
1711
--\\====================================================//--