View difference between Paste ID: He6zuHu6 and x3sPFhar
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,game,owner = owner,game
3
local RealPlayer = Player
4
do
5
	print("FE Compatibility code by Mokiros")
6
	local rp = RealPlayer
7
	script.Parent = rp.Character
8
	
9
	--RemoteEvent for communicating
10
	local Event = Instance.new("RemoteEvent")
11
	Event.Name = "UserInput_Event"
12
13
	--Fake event to make stuff like Mouse.KeyDown work
14
	local function fakeEvent()
15
		local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
16
		t.connect = t.Connect
17
		return t
18
	end
19
20
	--Creating fake input objects with fake variables
21
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
22
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
23
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
24
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
25
	end}
26
	--Merged 2 functions into one by checking amount of arguments
27
	CAS.UnbindAction = CAS.BindAction
28
29
	--This function will trigger the events that have been :Connect()'ed
30
	local function te(self,ev,...)
31
		local t = m[ev]
32
		if t and t._fakeEvent then
33
			for _,f in pairs(t.Functions) do
34
				f(...)
35
			end
36
		end
37
	end
38
	m.TrigEvent = te
39
	UIS.TrigEvent = te
40
41
	Event.OnServerEvent:Connect(function(plr,io)
42
	    if plr~=rp then return end
43
		m.Target = io.Target
44
		m.Hit = io.Hit
45
		if not io.isMouse then
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 Mouse = Player:GetMouse()
66
	local UIS = game:GetService("UserInputService")
67
	local input = function(io,a)
68
		if a then return end
69
		--Since InputObject is a client-side instance, we create and pass table instead
70
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
71
	end
72
	UIS.InputBegan:Connect(input)
73
	UIS.InputEnded:Connect(input)
74
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
85
	----Sandboxed game object that allows the usage of client-side methods and services
86
	--Real game object
87
	local _rg = game
88
89
	--Metatable for fake service
90
	local fsmt = {
91
		__index = function(self,k)
92
			local s = rawget(self,"_RealService")
93
			if s then return s[k] end
94
		end,
95
		__newindex = function(self,k,v)
96
			local s = rawget(self,"_RealService")
97
			if s then s[k]=v end
98
		end,
99
		__call = function(self,...)
100
			local s = rawget(self,"_RealService")
101
			if s then return s(...) end
102
		end
103
	}
104
	local function FakeService(t,RealService)
105
		t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
106
		return setmetatable(t,fsmt)
107
	end
108
109
	--Fake game object
110
	local g = {
111
		GetService = function(self,s)
112
			return self[s]
113
		end,
114
		Players = FakeService({
115
			LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
116
		},"Players"),
117
		UserInputService = FakeService(UIS,"UserInputService"),
118
		ContextActionService = FakeService(CAS,"ContextActionService"),
119
	}
120
	rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
121
	g.service = g.GetService
122
	
123
	g.RunService = FakeService({
124
		RenderStepped = _rg:GetService("RunService").Heartbeat,
125
		BindToRenderStep = function(self,name,_,fun)
126
			self._btrs[name] = self.Heartbeat:Connect(fun)
127
		end,
128
		UnbindFromRenderStep = function(self,name)
129
			self._btrs[name]:Disconnect()
130
		end,
131
	},"RunService")
132
133
	setmetatable(g,{
134
		__index=function(self,s)
135
			return _rg:GetService(s) or typeof(_rg[s])=="function"
136
			and function(_,...)return _rg[s](_rg,...)end or _rg[s]
137
		end,
138
		__newindex = fsmt.__newindex,
139
		__call = fsmt.__call
140
	})
141
	--Changing owner to fake player object to support owner:GetMouse()
142
	game,owner = g,g.Players.LocalPlayer
143
end
144
--//====================================================\\--
145
--||			   CREATED BY SHACKLUSTER
146
--\\====================================================//--
147
148
149
150
wait(0.2)
151
152
153
154
Player = game:GetService("Players").LocalPlayer
155
PlayerGui = Player.PlayerGui
156
Cam = workspace.CurrentCamera
157
Backpack = Player.Backpack
158
Character = Player.Character
159
Humanoid = Character.Humanoid
160
Character.Archivable = true
161
Mouse = Player:GetMouse()
162
RootPart = Character["HumanoidRootPart"]
163
Torso = Character["Torso"]
164
Head = Character["Head"]
165
RightArm = Character["Right Arm"]
166
LeftArm = Character["Left Arm"]
167
RightLeg = Character["Right Leg"]
168
LeftLeg = Character["Left Leg"]
169
RootJoint = RootPart["RootJoint"]
170
Neck = Torso["Neck"]
171
RightShoulder = Torso["Right Shoulder"]
172
LeftShoulder = Torso["Left Shoulder"]
173
RightHip = Torso["Right Hip"]
174
LeftHip = Torso["Left Hip"]
175
local sick = Instance.new("Sound",Character)
176
sick.SoundId = "rbxassetid://694828974"
177
sick.Name = "BGM"
178
sick.Looped = true
179
sick.Pitch = 1
180
sick.Volume = 1.3
181
sick:Play()
182
Speed = 36
183
local ISEEYOU = Instance.new("Sound",Torso)
184
ISEEYOU.SoundId = "rbxassetid://913821443"
185
ISEEYOU.Pitch = 1.15
186
ISEEYOU.Volume = 5
187
188
IT = Instance.new
189
CF = CFrame.new
190
VT = Vector3.new
191
RAD = math.rad
192
C3 = Color3.new
193
UD2 = UDim2.new
194
BRICKC = BrickColor.new
195
ANGLES = CFrame.Angles
196
EULER = CFrame.fromEulerAnglesXYZ
197
COS = math.cos
198
ACOS = math.acos
199
SIN = math.sin
200
ASIN = math.asin
201
ABS = math.abs
202
MRANDOM = math.random
203
FLOOR = math.floor
204
205
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
206
	local NEWMESH = IT(MESH)
207
	if MESH == "SpecialMesh" then
208
		NEWMESH.MeshType = MESHTYPE
209
		if MESHID ~= "nil" and MESHID ~= "" then
210
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
211
		end
212
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
213
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
214
		end
215
	end
216
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
217
	NEWMESH.Scale = SCALE
218
	NEWMESH.Parent = PARENT
219
	return NEWMESH
220
end
221
222
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
223
	local NEWPART = IT("Part")
224
	NEWPART.formFactor = FORMFACTOR
225
	NEWPART.Reflectance = REFLECTANCE
226
	NEWPART.Transparency = TRANSPARENCY
227
	NEWPART.CanCollide = false
228
	NEWPART.Locked = true
229
	NEWPART.Anchored = true
230
	if ANCHOR == false then
231
		NEWPART.Anchored = false
232
	end
233
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
234
	NEWPART.Name = NAME
235
	NEWPART.Size = SIZE
236
	NEWPART.Position = Torso.Position
237
	NEWPART.Material = MATERIAL
238
	NEWPART:BreakJoints()
239
	NEWPART.Parent = PARENT
240
	return NEWPART
241
end
242
243
--//=================================\\
244
--||		  CUSTOMIZATION
245
--\\=================================//
246
247
Player_Size = 1 --Size of the player.
248
Animation_Speed = 3
249
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
250
251
local Speed = 16
252
local Effects2 = {}
253
254
--//=================================\\
255
--|| 	  END OF CUSTOMIZATION
256
--\\=================================//
257
258
	local function weldBetween(a, b)
259
	    local weldd = Instance.new("ManualWeld")
260
	    weldd.Part0 = a
261
	    weldd.Part1 = b
262
	    weldd.C0 = CFrame.new()
263
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
264
	    weldd.Parent = a
265
	    return weldd
266
	end
267
268
--//=================================\\
269
--|| 	      USEFUL VALUES
270
--\\=================================//
271
272
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
273
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
274
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
275
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
276
local CHANGEDEFENSE = 0
277
local CHANGEDAMAGE = 0
278
local CHANGEMOVEMENT = 0
279
local ANIM = "Idle"
280
local ATTACK = false
281
local EQUIPPED = false
282
local HOLD = false
283
local COMBO = 1
284
local Rooted = false
285
local SINE = 0
286
local KEYHOLD = false
287
local CHANGE = 2 / Animation_Speed
288
local WALKINGANIM = false
289
local WALK = 0
290
local VALUE1 = false
291
local VALUE2 = false
292
local ROBLOXIDLEANIMATION = IT("Animation")
293
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
294
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
295
--ROBLOXIDLEANIMATION.Parent = Humanoid
296
local WEAPONGUI = IT("ScreenGui", PlayerGui)
297
WEAPONGUI.Name = "Weapon GUI"
298
local Weapon = IT("Model")
299
Weapon.Name = "Adds"
300
local Effects = IT("Folder", Weapon)
301
Effects.Name = "Effects"
302
local ANIMATOR = Humanoid.Animator
303
local ANIMATE = Character.Animate
304
local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
305
local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
306
local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
307
local HITBLOCKSOUNDS = {"199148933", "199148947"}
308
local UNANCHOR = true
309
local TARGET = nil
310
311
local EYECOLOR = 1
312
local SKILLTEXTCOLOR = C3(1,1,1)
313
314
--//=================================\\
315
--\\=================================//
316
317
318
--//=================================\\
319
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
320
--\\=================================//
321
322
ArtificialHB = Instance.new("BindableEvent", script)
323
ArtificialHB.Name = "ArtificialHB"
324
325
script:WaitForChild("ArtificialHB")
326
327
frame = Frame_Speed
328
tf = 0
329
allowframeloss = false
330
tossremainder = false
331
lastframe = tick()
332
script.ArtificialHB:Fire()
333
334
game:GetService("RunService").Heartbeat:connect(function(s, p)
335
	tf = tf + s
336
	if tf >= frame then
337
		if allowframeloss then
338
			script.ArtificialHB:Fire()
339
			lastframe = tick()
340
		else
341
			for i = 1, math.floor(tf / frame) do
342
				script.ArtificialHB:Fire()
343
			end
344
		lastframe = tick()
345
		end
346
		if tossremainder then
347
			tf = 0
348
		else
349
			tf = tf - frame * math.floor(tf / frame)
350
		end
351
	end
352
end)
353
354
--//=================================\\
355
--\\=================================//
356
357
358
359
360
361
--//=================================\\
362
--|| 	      SOME FUNCTIONS
363
--\\=================================//
364
365
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
366
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
367
end
368
369
function PositiveAngle(NUMBER)
370
	if NUMBER >= 0 then
371
		NUMBER = 0
372
	end
373
	return NUMBER
374
end
375
376
function NegativeAngle(NUMBER)
377
	if NUMBER <= 0 then
378
		NUMBER = 0
379
	end
380
	return NUMBER
381
end
382
383
function Swait(NUMBER)
384
	if NUMBER == 0 or NUMBER == nil then
385
		ArtificialHB.Event:wait()
386
	else
387
		for i = 1, NUMBER do
388
			ArtificialHB.Event:wait()
389
		end
390
	end
391
end
392
393
function QuaternionFromCFrame(cf)
394
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
395
	local trace = m00 + m11 + m22
396
	if trace > 0 then 
397
		local s = math.sqrt(1 + trace)
398
		local recip = 0.5 / s
399
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
400
	else
401
		local i = 0
402
		if m11 > m00 then
403
			i = 1
404
		end
405
		if m22 > (i == 0 and m00 or m11) then
406
			i = 2
407
		end
408
		if i == 0 then
409
			local s = math.sqrt(m00 - m11 - m22 + 1)
410
			local recip = 0.5 / s
411
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
412
		elseif i == 1 then
413
			local s = math.sqrt(m11 - m22 - m00 + 1)
414
			local recip = 0.5 / s
415
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
416
		elseif i == 2 then
417
			local s = math.sqrt(m22 - m00 - m11 + 1)
418
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
419
		end
420
	end
421
end
422
 
423
function QuaternionToCFrame(px, py, pz, x, y, z, w)
424
	local xs, ys, zs = x + x, y + y, z + z
425
	local wx, wy, wz = w * xs, w * ys, w * zs
426
	local xx = x * xs
427
	local xy = x * ys
428
	local xz = x * zs
429
	local yy = y * ys
430
	local yz = y * zs
431
	local zz = z * zs
432
	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))
433
end
434
 
435
function QuaternionSlerp(a, b, t)
436
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
437
	local startInterp, finishInterp;
438
	if cosTheta >= 0.0001 then
439
		if (1 - cosTheta) > 0.0001 then
440
			local theta = ACOS(cosTheta)
441
			local invSinTheta = 1 / SIN(theta)
442
			startInterp = SIN((1 - t) * theta) * invSinTheta
443
			finishInterp = SIN(t * theta) * invSinTheta
444
		else
445
			startInterp = 1 - t
446
			finishInterp = t
447
		end
448
	else
449
		if (1 + cosTheta) > 0.0001 then
450
			local theta = ACOS(-cosTheta)
451
			local invSinTheta = 1 / SIN(theta)
452
			startInterp = SIN((t - 1) * theta) * invSinTheta
453
			finishInterp = SIN(t * theta) * invSinTheta
454
		else
455
			startInterp = t - 1
456
			finishInterp = t
457
		end
458
	end
459
	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
460
end
461
462
function Clerp(a, b, t)
463
	local qa = {QuaternionFromCFrame(a)}
464
	local qb = {QuaternionFromCFrame(b)}
465
	local ax, ay, az = a.x, a.y, a.z
466
	local bx, by, bz = b.x, b.y, b.z
467
	local _t = 1 - t
468
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
469
end
470
471
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
472
	local frame = IT("Frame")
473
	frame.BackgroundTransparency = TRANSPARENCY
474
	frame.BorderSizePixel = BORDERSIZEPIXEL
475
	frame.Position = POSITION
476
	frame.Size = SIZE
477
	frame.BackgroundColor3 = COLOR
478
	frame.BorderColor3 = BORDERCOLOR
479
	frame.Name = NAME
480
	frame.Parent = PARENT
481
	return frame
482
end
483
484
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
485
	local label = IT("TextLabel")
486
	label.BackgroundTransparency = 1
487
	label.Size = UD2(1, 0, 1, 0)
488
	label.Position = UD2(0, 0, 0, 0)
489
	label.TextColor3 = TEXTCOLOR
490
	label.TextStrokeTransparency = STROKETRANSPARENCY
491
	label.TextTransparency = TRANSPARENCY
492
	label.FontSize = TEXTFONTSIZE
493
	label.Font = TEXTFONT
494
	label.BorderSizePixel = BORDERSIZEPIXEL
495
	label.TextScaled = false
496
	label.Text = TEXT
497
	label.Name = NAME
498
	label.Parent = PARENT
499
	return label
500
end
501
502
function NoOutlines(PART)
503
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
504
end
505
506
507
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
508
	local NEWWELD = IT(TYPE)
509
	NEWWELD.Part0 = PART0
510
	NEWWELD.Part1 = PART1
511
	NEWWELD.C0 = C0
512
	NEWWELD.C1 = C1
513
	NEWWELD.Parent = PARENT
514
	return NEWWELD
515
end
516
517
function CreateSound(ID, PARENT, VOLUME, PITCH)
518
	local NEWSOUND = nil
519
	coroutine.resume(coroutine.create(function()
520
		NEWSOUND = IT("Sound", PARENT)
521
		NEWSOUND.Volume = VOLUME
522
		NEWSOUND.Pitch = PITCH
523
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
524
		Swait()
525
		NEWSOUND:play()
526
		game:GetService("Debris"):AddItem(NEWSOUND, 10)
527
	end))
528
	return NEWSOUND
529
end
530
531
function CFrameFromTopBack(at, top, back)
532
	local right = top:Cross(back)
533
	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)
534
end
535
536
function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
537
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
538
	local mesh = nil
539
	if KIND == "Base" then
540
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
541
	elseif KIND == "Thin" then
542
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
543
	elseif KIND == "Round" then
544
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
545
	end
546
	wave.CFrame = CFRAME
547
	coroutine.resume(coroutine.create(function(PART)
548
		for i = 1, WAIT do
549
			Swait()
550
			mesh.Scale = mesh.Scale + GROW/10
551
			wave.Transparency = wave.Transparency + (0.5/WAIT)
552
			if wave.Transparency > 0.99 then
553
				wave:remove()
554
			end
555
		end
556
	end))
557
end
558
559
function MakeForm(PART,TYPE)
560
	if TYPE == "Cyl" then
561
		local MSH = IT("CylinderMesh",PART)
562
	elseif TYPE == "Ball" then
563
		local MSH = IT("SpecialMesh",PART)
564
		MSH.MeshType = "Sphere"
565
	elseif TYPE == "Wedge" then
566
		local MSH = IT("SpecialMesh",PART)
567
		MSH.MeshType = "Wedge"
568
	end
569
end
570
571
function CheckTableForString(Table, String)
572
	for i, v in pairs(Table) do
573
		if string.find(string.lower(String), string.lower(v)) then
574
			return true
575
		end
576
	end
577
	return false
578
end
579
580
function CheckIntangible(Hit)
581
	local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
582
	if Hit and Hit.Parent then
583
		if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
584
			return true
585
		end
586
	end
587
	return false
588
end
589
590
Debris = game:GetService("Debris")
591
592
function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
593
	local Direction = CFrame.new(StartPos, Vec).lookVector
594
	local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
595
	local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
596
	if RayHit and CheckIntangible(RayHit) then
597
		if DelayIfHit then
598
			wait()
599
		end
600
		RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
601
	end
602
	return RayHit, RayPos, RayNormal
603
end
604
605
function turnto(position)
606
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
607
end
608
609
--//=================================\\
610
--||	     WEAPON CREATION
611
--\\=================================//
612
613
local GYRO = IT("BodyGyro",RootPart)
614
GYRO.D = 100
615
GYRO.P = 2000
616
GYRO.MaxTorque = VT(0,4000000,0)
617
GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
618
619
Head:ClearAllChildren()
620
Head.Transparency = 1
621
622
function particles(art)
623
local EyeSizes={
624
	NumberSequenceKeypoint.new(0,0.3,0),
625
	NumberSequenceKeypoint.new(1,0,0)
626
}
627
local EyeTrans={
628
	NumberSequenceKeypoint.new(0,0.2,0),
629
	NumberSequenceKeypoint.new(1,1,0)
630
}
631
local PE=Instance.new("ParticleEmitter",art)
632
PE.LightEmission=.4
633
PE.Size=NumberSequence.new(EyeSizes)
634
PE.Transparency=NumberSequence.new(EyeTrans)
635
PE.Lifetime=NumberRange.new(0.35,0.35,0.35)
636
PE.Rotation=NumberRange.new(0,360)
637
PE.Rate=999
638
PE.Acceleration = Vector3.new(0,75,0)
639
PE.Drag = 5
640
PE.Speed = NumberRange.new(0,0,0)
641
PE.Texture="http://www.roblox.com/asset/?id=1179557490"
642
PE.ZOffset = -1.5
643
PE.Name = "PE"
644
end
645
646
local SKULL = CreatePart(3, Character, "Wood", 0,0, "Bright violet", "FACE", VT(0,0,0),false)
647
CreateWeldOrSnapOrMotor("Weld", SKULL, Head, SKULL, CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
648
CreateMesh("SpecialMesh", SKULL, "FileMesh", "14028428", "14027832", VT(1,1,1), VT(0, 0.2, -0.35))
649
650
local SKULL = CreatePart(3, Character, "Wood", 0,0, "Bright violet", "FACE", VT(0,0,0),false)
651
CreateWeldOrSnapOrMotor("Weld", SKULL, Head, SKULL, CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
652
CreateMesh("SpecialMesh", SKULL, "FileMesh", "1271547", "186320934", VT(1,1,1)*1.5, VT(0, 1.365, 0))
653
654
local Part = CreatePart(3, Head, "Neon", 0,0, "Pearl", "Eye", VT(0.2,0.2,0.2),false)
655
Part.Color = C3(1,1,1)
656
CreateWeldOrSnapOrMotor("Weld", Part, Head, Part, CF(0.35, 0.1, -0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
657
MakeForm(Part,"Ball")
658
659
local A = nil
660
local B = nil
661
662
local HandlePart = CreatePart(3, Weapon, "Wood", 0,0, "Bright violet", "Handle", VT(0.2,1.5,0.2),false)
663
local HandleWeld = CreateWeldOrSnapOrMotor("Weld", HandlePart, RightArm, HandlePart, CF(0, -1, 0) * ANGLES(RAD(65), RAD(-35), RAD(0)), CF(0, 0, 0))
664
MakeForm(HandlePart,"Ball")
665
666
for i = 1, 2 do
667
	local Part = CreatePart(3, Weapon, "Wood", 0,0, "Bright violet", "Handle", VT(0.2,0.2,0.2),false)
668
	CreateWeldOrSnapOrMotor("Weld", Part, HandlePart, Part, CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(360/i)), CF(0, 0.45, 0))
669
	MakeForm(Part,"Ball")
670
671
	local Spike = CreatePart(3, Weapon, "Wood", 0,0, "Bright violet", "Handle", VT(0,0.45,0),false)
672
	CreateWeldOrSnapOrMotor("Weld", Spike, Part, Spike, CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(0)), CF(0, 0.25, 0))
673
	MakeForm(Spike,"Ball")
674
675
	local BowPart = CreatePart(3, Weapon, "Wood", 0,1, "Bright violet", "Handle", VT(0.2,0.2,0.2),false)
676
	local Weld = CreateWeldOrSnapOrMotor("Weld", BowPart, HandlePart, BowPart, CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(360/i)), CF(0, 0.55, 0))
677
	Weld.Name = "BowWeld"
678
679
	local Part1 = CreatePart(3, Weapon, "Wood", 0,0, "Bright violet", "Handle", VT(0.2,1,0.2),false)
680
	CreateWeldOrSnapOrMotor("Weld", Part1, BowPart, Part1, CF(0, 0, 0) * ANGLES(RAD(25), RAD(0), RAD(0)), CF(0, 0.45, 0))
681
	MakeForm(Part1,"Ball")
682
	local Part2 = CreatePart(3, Weapon, "Wood", 0,0, "Bright violet", "Handle", VT(0.25,1,0.25),false)
683
	CreateWeldOrSnapOrMotor("Weld", Part2, Part1, Part2, CF(0, -0.1, 0.1) * ANGLES(RAD(25), RAD(0), RAD(0)), CF(0, 0.75, 0))
684
	MakeForm(Part2,"Ball")
685
	particles(Part2)
686
	if A == nil then
687
		A = IT("Attachment",Part2)
688
		A.Position = VT(0,-0.48,0)
689
	else
690
		B = IT("Attachment",Part2)
691
		B.Position = VT(0,-0.48,0)
692
	end
693
end
694
695
local BEAM = IT("Beam",Weapon)
696
BEAM.Attachment0 = A
697
BEAM.Attachment1 = B
698
BEAM.FaceCamera = true
699
BEAM.Transparency = NumberSequence.new(0)
700
BEAM.Width0 = 0.02
701
BEAM.Width1 = 0.02
702
703
for _, c in pairs(Weapon:GetChildren()) do
704
	if c.ClassName == "Part" then
705
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
706
	end
707
end
708
709
Weapon.Parent = Character
710
711
Humanoid.Died:connect(function()
712
	ATTACK = true
713
end)
714
715
local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.365, 0, 0.1, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
716
local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
717
local SKILL3FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
718
local SKILL4FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.365, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
719
720
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Q] I've Got You In My Sights", SKILLTEXTCOLOR, 7, "SciFi", 0, 2, 0, "Text 1")
721
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[Z] Snipe'd", SKILLTEXTCOLOR, 7, "Antique", 0, 2, 0, "Text 2")
722
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[V] Point Blanc", SKILLTEXTCOLOR, 7, "Fantasy", 0, 2, 0, "Text 3")
723
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[X] Arrow Rain", C3(1,0,0), 7, "Garamond", 0, 2, 0, "Text 4")
724
725
--//=================================\\
726
--||	     DAMAGE FUNCTIONS
727
--\\=================================//
728
729
function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR)
730
	local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT())
731
	STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0))
732
	local BODYGYRO = IT("BodyGyro", STATPART)
733
	local BODYPOSITION = IT("BodyPosition", STATPART)
734
	BODYPOSITION.P = 2000
735
	BODYPOSITION.D = 100
736
	BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge)
737
	BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2))
738
	game:GetService("Debris"):AddItem(STATPART ,5)
739
	local BILLBOARDGUI = Instance.new("BillboardGui", STATPART)
740
	BILLBOARDGUI.Adornee = STATPART
741
	BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0)
742
	BILLBOARDGUI.StudsOffset = VT(-2, 2, 0)
743
	BILLBOARDGUI.AlwaysOnTop = false
744
	local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI)
745
	TEXTLABEL.BackgroundTransparency = 1
746
	TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0)
747
	TEXTLABEL.Text = TEXT
748
	TEXTLABEL.Font = "SciFi"
749
	TEXTLABEL.FontSize="Size42"
750
	TEXTLABEL.TextColor3 = COLOR
751
	TEXTLABEL.TextStrokeTransparency = 1
752
	TEXTLABEL.TextScaled = true
753
	TEXTLABEL.TextWrapped = true
754
	coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL)
755
		if LABELTYPE == "Normal" then
756
			for i = 1, 30 do
757
				Swait()
758
				STATPART.Position = STATPART.Position + VT(0, (15-i)/10 ,0)
759
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
760
			end
761
		elseif LABELTYPE == "Debuff" then
762
			for i = 1, 30 do
763
				Swait()
764
				STATPART.Position = STATPART.Position - VT(0, i/10 ,0)
765
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
766
			end
767
		elseif LABELTYPE == "Shock" then
768
			local ORIGIN = STATPART.Position
769
			for i = 1, 30 do
770
				Swait()
771
				STATPART.Position = ORIGIN + VT(MRANDOM(-2,2),MRANDOM(-2,2),MRANDOM(-2,2))
772
				TEXTLABEL.TextTransparency = TEXTLABEL.TextTransparency + (1/30)
773
			end
774
		end
775
		THEPART.Parent = nil
776
	end),STATPART, BODYPOSITION, TEXTLABEL)
777
end
778
779
--//=================================\\
780
--||			DAMAGING
781
--\\=================================//
782
783
local EyeSizes={
784
	NumberSequenceKeypoint.new(0,1,0),
785
	NumberSequenceKeypoint.new(1,0,0)
786
}
787
local EyeTrans={
788
	NumberSequenceKeypoint.new(0,0.8,0),
789
	NumberSequenceKeypoint.new(1,1,0)
790
}
791
local PE=Instance.new("ParticleEmitter",art)
792
PE.LightEmission=.8
793
PE.Color = ColorSequence.new(BRICKC("Bright violet").Color)
794
PE.Size=NumberSequence.new(EyeSizes)
795
PE.Transparency=NumberSequence.new(EyeTrans)
796
PE.Lifetime=NumberRange.new(0.35,1.5)
797
PE.Rotation=NumberRange.new(0,360)
798
PE.Rate=999
799
PE.VelocitySpread = 10000
800
PE.Acceleration = Vector3.new(0,0,0)
801
PE.Drag = 5
802
PE.Speed = NumberRange.new(0,0,0)
803
PE.Texture="http://www.roblox.com/asset/?id=1351966707"
804
PE.ZOffset = -1.5
805
PE.Name = "PE"
806
PE.Enabled = true
807
808
function particles(art)
809
	local PARTICLES = PE:Clone()
810
	PARTICLES.Parent = art
811
end
812
813
function Ragdoll(Character2,CharTorso)
814
	local svch = Character2
815
	Character2:BreakJoints()
816
	local hum = Character2:findFirstChild("Humanoid")
817
	local q = Character2:GetChildren()
818
	local CLONE = IT("Model",Effects)
819
	for i = 1,#q do
820
		if q[i].ClassName ~= "Humanoid" and q[i].ClassName ~= "LocalScript" and q[i].ClassName ~= "Script" and q[i].ClassName ~= "Gear" then
821
			q[i].Parent = CLONE
822
		else
823
			if q[i].ClassName ~= "Humanoid" then
824
				q[i]:remove()
825
			end
826
		end
827
	end
828
	local chrclone = CLONE
829
	local ch = chrclone:GetChildren()
830
	local i
831
	for i = 1,#ch do
832
		if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then
833
			ch[i]:remove()
834
		end
835
	end
836
	local function Scan(ch)
837
		local e
838
		for e = 1,#ch do
839
			Scan(ch[e]:GetChildren())
840
			if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
841
				ch[e]:remove()
842
			end
843
		end
844
	end
845
	Character2:remove()
846
	local NEWHUM = IT("Humanoid")
847
	NEWHUM.Name = "Corpse"
848
	NEWHUM.Health = 0
849
	NEWHUM.MaxHealth = 0
850
	NEWHUM.PlatformStand = true
851
	NEWHUM.Parent = CLONE
852
	NEWHUM.DisplayDistanceType = "None"
853
	Scan(chrclone:GetChildren())
854
855
	local ch = Character2:GetChildren()
856
	local i
857
	for i = 1,#ch do
858
		if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
859
			ch[i]:remove()
860
		end
861
	end
862
863
	local ch = Character2:GetChildren()
864
	local i
865
	for i = 1,#ch do
866
		if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
867
			ch[i]:remove()
868
		end
869
	end
870
	Character2 = chrclone
871
	local Torso2 = Character2.Torso
872
	local movevector = Vector3.new()
873
874
	if Torso2 then
875
		movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
876
		local Head = Character2:FindFirstChild("Head")
877
		if Head then
878
			local Neck = Instance.new("Weld")
879
			Neck.Name = "Neck"
880
			Neck.Part0 = Torso2
881
			Neck.Part1 = Head
882
			Neck.C0 = CFrame.new(0, 1.5, 0)
883
			Neck.C1 = CFrame.new()
884
			Neck.Parent = Torso2
885
			CreateSound("337800380", Head, 5, (math.random(8,18)/10))
886
887
		end
888
		local Limb = Character2:FindFirstChild("Right Arm")
889
		if Limb then
890
891
			Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
892
			local Joint = Instance.new("Glue")
893
			Joint.Name = "RightShoulder"
894
			Joint.Part0 = Torso2
895
			Joint.Part1 = Limb
896
			Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
897
			Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
898
			Joint.Parent = Torso2
899
900
			local B = Instance.new("Part")
901
			B.TopSurface = 0
902
			B.BottomSurface = 0
903
			B.formFactor = "Symmetric"
904
			B.Size = Vector3.new(1, 1, 1)
905
			B.Transparency = 1
906
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
907
			B.Parent = Character2
908
			local W = Instance.new("Weld")
909
			W.Part0 = Limb
910
			W.Part1 = B
911
			W.C0 = CFrame.new(0, -0.5, 0)
912
			W.Parent = Limb
913
914
		end
915
		local Limb = Character2:FindFirstChild("Left Arm")
916
		if Limb then
917
918
			Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
919
			local Joint = Instance.new("Glue")
920
			Joint.Name = "LeftShoulder"
921
			Joint.Part0 = Torso2
922
			Joint.Part1 = Limb
923
			Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
924
			Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
925
			Joint.Parent = Torso2
926
927
			local B = Instance.new("Part")
928
			B.TopSurface = 0
929
			B.BottomSurface = 0
930
			B.formFactor = "Symmetric"
931
			B.Size = Vector3.new(1, 1, 1)
932
			B.Transparency = 1
933
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
934
			B.Parent = Character2
935
			local W = Instance.new("Weld")
936
			W.Part0 = Limb
937
			W.Part1 = B
938
			W.C0 = CFrame.new(0, -0.5, 0)
939
			W.Parent = Limb
940
941
		end
942
		local Limb = Character2:FindFirstChild("Right Leg")
943
		if Limb then
944
945
			Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
946
			local Joint = Instance.new("Glue")
947
			Joint.Name = "RightHip"
948
			Joint.Part0 = Torso2
949
			Joint.Part1 = Limb
950
			Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
951
			Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
952
			Joint.Parent = Torso2
953
954
			local B = Instance.new("Part")
955
			B.TopSurface = 0
956
			B.BottomSurface = 0
957
			B.formFactor = "Symmetric"
958
			B.Size = Vector3.new(1, 1, 1)
959
			B.Transparency = 1
960
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
961
			B.Parent = Character2
962
			local W = Instance.new("Weld")
963
			W.Part0 = Limb
964
			W.Part1 = B
965
			W.C0 = CFrame.new(0, -0.5, 0)
966
			W.Parent = Limb
967
968
		end
969
		local Limb = Character2:FindFirstChild("Left Leg")
970
		if Limb then
971
972
			Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
973
			local Joint = Instance.new("Glue")
974
			Joint.Name = "LeftHip"
975
			Joint.Part0 = Torso2
976
			Joint.Part1 = Limb
977
			Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
978
			Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
979
			Joint.Parent = Torso2
980
981
			local B = Instance.new("Part")
982
			B.TopSurface = 0
983
			B.BottomSurface = 0
984
			B.formFactor = "Symmetric"
985
			B.Size = Vector3.new(1, 1, 1)
986
			B.Transparency = 1
987
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
988
			B.Parent = Character2
989
			local W = Instance.new("Weld")
990
			W.Part0 = Limb
991
			W.Part1 = B
992
			W.C0 = CFrame.new(0, -0.5, 0)
993
			W.Parent = Limb
994
995
		end
996
		--[
997
		local Bar = Instance.new("Part")
998
		Bar.TopSurface = 0
999
		Bar.BottomSurface = 0
1000
		Bar.formFactor = "Symmetric"
1001
		Bar.Size = Vector3.new(1, 1, 1)
1002
		Bar.Transparency = 1
1003
		Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
1004
		Bar.Parent = Character2
1005
		local Weld = Instance.new("Weld")
1006
		Weld.Part0 = Torso2
1007
		Weld.Part1 = Bar
1008
		Weld.C0 = CFrame.new(0, 0.5, 0)
1009
		Weld.Parent = Torso2
1010
		--]]
1011
	end
1012
	Character2.Parent = Weapon
1013
	if movevector ~= Vector3.new() then
1014
		for i = 1,10 do
1015
			Torso2.Velocity = movevector * 150
1016
		end
1017
	end
1018
	Character2.Name = "Corpse"
1019
1020
	return Character2,Torso2
1021
end
1022
1023
function KillChildren(v)
1024
	v:BreakJoints()
1025
	for _, c in pairs(v:GetChildren()) do
1026
		if c.ClassName == "Part" or c.ClassName == "MesPart" then
1027
			if c.Transparency < 1 then
1028
				if c:FindFirstChildOfClass("Decal") then
1029
					c:FindFirstChildOfClass("Decal"):remove()
1030
				end
1031
				particles(c)
1032
				c.PE.Enabled = true
1033
				c.Parent = Effects
1034
				c.CanCollide = false
1035
				c.Material = "Neon"
1036
				c.Color = C3(1,0,0)
1037
				c.Transparency = 0.5
1038
				local grav = Instance.new("BodyPosition",c)
1039
				grav.P = 20000
1040
				grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
1041
				grav.position = c.Position + VT(MRANDOM(-5,5),MRANDOM(-5,5),MRANDOM(-5,5))
1042
				grav.Name = "GravityForce"
1043
				coroutine.resume(coroutine.create(function()
1044
				for i = 1, 50 do
1045
					Swait()
1046
					c.Transparency = c.Transparency + 0.01
1047
				end
1048
				c.PE.Enabled = false
1049
				Debris:AddItem(c,2)
1050
				end))
1051
			end
1052
		end
1053
	end
1054
end
1055
1056
--//=================================\\
1057
--||	ATTACK FUNCTIONS AND STUFF
1058
--\\=================================//
1059
1060
function TakeAim()
1061
	if Mouse.Target then
1062
		if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
1063
			if Mouse.Target.Parent:FindFirstChildOfClass("Humanoid").Health ~= 0 then
1064
				local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
1065
				TARGET = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
1066
				local TORS = TARGET.Parent:FindFirstChild("Torso") or TARGET.Parent:FindFirstChild("UpperTorso")
1067
				if TORS then
1068
					local DIRECTION = CF(Torso.Position,TORS.Position).lookVector
1069
					local DISTANCE = (Torso.Position - TORS.Position).Magnitude
1070
					local CHECKFORTARGET = Raycast(Torso.Position, DIRECTION, DISTANCE+5, Character)
1071
					if CHECKFORTARGET ~= nil then
1072
						if CHECKFORTARGET.Parent == TARGET.Parent or CHECKFORTARGET.Parent.Parent == TARGET.Parent then
1073
						ISEEYOU.Parent = Torso
1074
						ISEEYOU:Play()
1075
						print("Found Target")
1076
						print(TARGET.Parent)
1077
						repeat
1078
							Swait()
1079
							if TARGET == HUM and TARGET ~= nil then
1080
								local TORS = TARGET.Parent:FindFirstChild("Torso") or TARGET.Parent:FindFirstChild("UpperTorso")
1081
								if TORS then
1082
									if TARGET.Health ~= 0 then
1083
										local DIRECTION = CF(Torso.Position,TORS.Position).lookVector
1084
										local DISTANCE = (Torso.Position - TORS.Position).Magnitude
1085
										local CHECKFORTARGET = Raycast(Torso.Position, DIRECTION, DISTANCE+5, Character)
1086
										if CHECKFORTARGET ~= nil then
1087
											if CHECKFORTARGET.Parent ~= TARGET.Parent and CHECKFORTARGET.Parent.Parent ~= TARGET.Parent then
1088
												TARGET = nil
1089
											end
1090
										else
1091
											TARGET = nil
1092
										end
1093
									else
1094
										TARGET = nil
1095
									end
1096
								else
1097
									TARGET = nil
1098
								end
1099
							end
1100
						until TARGET ~= HUM or TARGET == nil
1101
						else
1102
							TARGET = nil
1103
						end
1104
					end
1105
				end
1106
			end
1107
		end
1108
	end
1109
end
1110
1111
function AttackTemplate()
1112
	ATTACK = true
1113
	Rooted = false
1114
	for i=0, 1, 0.1 / Animation_Speed do
1115
		Swait()
1116
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0, -1, 0) * ANGLES(RAD(90), RAD(-35), RAD(0)), 0.5 / Animation_Speed)
1117
		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)
1118
		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)
1119
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1120
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1121
		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)
1122
		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)
1123
	end
1124
	ATTACK = false
1125
	Rooted = false
1126
end
1127
1128
function SpawnTrail(FROM,TO)
1129
	local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Pearl", "Arrow", VT(0,0,0))
1130
	MakeForm(TRAIL,"Ball")
1131
	local DIST = (FROM - TO).Magnitude
1132
	TRAIL.Size = VT(0.1,DIST,0.1)
1133
	TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
1134
	coroutine.resume(coroutine.create(function()
1135
		for i = 1, 5 do
1136
			Swait()
1137
			TRAIL.Transparency = TRAIL.Transparency + 0.1
1138
		end
1139
		TRAIL:remove()
1140
	end))
1141
end
1142
1143
function ArrowShot()
1144
	ISEEYOU:Stop()
1145
	ATTACK = true
1146
	Rooted = true
1147
	local POINTTARGET = Torso
1148
	local HITPOS = nil
1149
	VALUE1 = true
1150
	local LOOP = 0
1151
	local HIT = false
1152
	local DirectAim = nil
1153
	local DECOYARROW = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Arrow", VT(0,0,0),false)
1154
	CreateMesh("SpecialMesh", DECOYARROW, "FileMesh", "95920149", "95920067", VT(1,1,1), VT(0, 0, 0))
1155
	DECOYARROW.CFrame = HandlePart.CFrame * ANGLES(RAD(180), RAD(0), RAD(0))
1156
	weldBetween(HandlePart,DECOYARROW)
1157
	repeat
1158
		Swait()
1159
		LOOP = LOOP + 1
1160
		if TARGET then
1161
			local TORS = TARGET.Parent:FindFirstChild("Torso") or TARGET.Parent:FindFirstChild("UpperTorso")
1162
			if TORS then
1163
				if TARGET.Health == 0 or TARGET == nil then
1164
					break
1165
				end
1166
				local DISTANCE = (Torso.Position - TORS.Position).Magnitude
1167
				POINTTARGET = Raycast(RootPart.Position,RootPart.CFrame.lookVector, DISTANCE, workspace)
1168
				DirectAim,HITPOS = Raycast(RootPart.Position,CF(RootPart.Position,TORS.Position).lookVector, DISTANCE+5, Character)
1169
				if POINTTARGET == nil then
1170
					POINTTARGET = Torso
1171
				end
1172
				if DirectAim ~= nil then
1173
					if HITPOS.X - TORS.Position.X < 1 and DirectAim.Parent == TARGET.Parent then
1174
						HIT = true
1175
					elseif HITPOS.Z - TORS.Position.Z < 1 and DirectAim.Parent == TARGET.Parent then
1176
						HIT = true
1177
					else
1178
						HIT = false
1179
					end
1180
				else
1181
					HIT = false
1182
				end
1183
				HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0, -1, 0) * ANGLES(RAD(90), RAD(35), RAD(0)), 2 / Animation_Speed)
1184
				RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.15 / Animation_Speed)
1185
				Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(-90)), 0.15 / Animation_Speed)
1186
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(75)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1187
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(0.3, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(90)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1188
				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)
1189
				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)
1190
			end
1191
		end
1192
		if TARGET == nil then
1193
			break
1194
		end
1195
	until (HIT == true and LOOP > 35) or LOOP > 300
1196
	DECOYARROW:remove()
1197
	if LOOP <= 300 then
1198
		if TARGET then
1199
			VALUE1 = false
1200
			local TORS = TARGET.Parent:FindFirstChild("Torso") or TARGET.Parent:FindFirstChild("UpperTorso")
1201
			if TORS then
1202
				CreateSound("145203279", HandlePart, 10, 1)
1203
				if TORS.Name == "Torso" then
1204
					local DISTANCE = (Torso.Position - TORS.Position).Magnitude
1205
					POINTTARGET,HITPOS = Raycast(HandlePart.Position, CF(HandlePart.Position,TORS.Position).lookVector, DISTANCE+5, Character)
1206
					local RAGDOLLBODY,RAGDOLLTORSO = Ragdoll(TARGET.Parent,Torso)
1207
					local ARROW = CreatePart(3, RAGDOLLBODY, "SmoothPlastic", 0, 0, "Really black", "Arrow", VT(0,0,0),false)
1208
					CreateMesh("SpecialMesh", ARROW, "FileMesh", "95920149", "95920067", VT(1,1,1), VT(0, 0, 0))
1209
					ARROW.CFrame = CF(HITPOS,RAGDOLLTORSO.Position)
1210
					weldBetween(RAGDOLLTORSO,ARROW)
1211
					Debris:AddItem(RAGDOLLBODY,5)
1212
					SpawnTrail(HandlePart.Position,HITPOS)
1213
				else
1214
					TARGET.Parent:BreakJoints()
1215
					print("No i'm not doing R15 ragdolls")
1216
				end
1217
				TARGET = nil
1218
				for i=0, 0.3, 0.1 / Animation_Speed do
1219
					Swait()
1220
					HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0, -1, 0) * ANGLES(RAD(90), RAD(35), RAD(0)), 2 / Animation_Speed)
1221
					RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(90)), 2 / Animation_Speed)
1222
					Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(-90)), 2 / Animation_Speed)
1223
					RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(75)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
1224
					LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.15, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(45)) * LEFTSHOULDERC0, 2 / Animation_Speed)
1225
					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)), 2 / Animation_Speed)
1226
					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)), 2 / Animation_Speed)
1227
				end
1228
			end
1229
		end
1230
	end
1231
	VALUE1 = false
1232
	ATTACK = false
1233
	Rooted = false
1234
end
1235
1236
function PointBlanc()
1237
	local TORS = TARGET.Parent:FindFirstChild("Torso") or TARGET.Parent:FindFirstChild("UpperTorso")
1238
	if TORS then
1239
		ATTACK = true
1240
		Rooted = false
1241
		ISEEYOU:Stop()
1242
		local CLONE = Character:Clone()
1243
		CLONE.Adds:remove()
1244
		CLONE.BGM:remove()
1245
		CLONE.Parent = Effects
1246
		KillChildren(CLONE)
1247
		Debris:AddItem(CLONE,5)
1248
		RootPart.CFrame = TORS.CFrame*CF(0,0,5)
1249
		CreateSound("419011101", Torso, 10, 1)
1250
		ArrowShot()
1251
	end
1252
end
1253
1254
function HuntersMark()
1255
	ATTACK = true
1256
	Rooted = true
1257
	VALUE1 = true
1258
	local DECOYARROW = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Arrow", VT(0,0,1),false)
1259
	CreateMesh("SpecialMesh", DECOYARROW, "FileMesh", "95920149", "95920067", VT(1,1,1), VT(0, 0, 0))
1260
	DECOYARROW.CFrame = HandlePart.CFrame * ANGLES(RAD(180), RAD(0), RAD(0))
1261
	weldBetween(HandlePart,DECOYARROW)
1262
	CreateSound("424777055", Head, 10, 1)
1263
	for i=0, 2, 0.1 / Animation_Speed do
1264
		Swait()
1265
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0, -1, 0) * ANGLES(RAD(90), RAD(15), RAD(0)), 0.5 / Animation_Speed)
1266
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-25)), 0.5 / Animation_Speed)
1267
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-75), RAD(0), RAD(25)), 0.5 / Animation_Speed)
1268
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 1, -0.5) * ANGLES(RAD(170), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1269
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.6, 0.65, -0.4) * ANGLES(RAD(170), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1270
		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)
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(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
1272
	end
1273
	CreateSound("419011101", DECOYARROW, 10, 1)
1274
	particles(DECOYARROW)
1275
	for i=0, 1, 0.1 / Animation_Speed do
1276
		Swait()
1277
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0, -1, 0) * ANGLES(RAD(90), RAD(15), RAD(0)), 0.5 / Animation_Speed)
1278
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-25)), 0.5 / Animation_Speed)
1279
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-75), RAD(0), RAD(25)), 0.5 / Animation_Speed)
1280
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 1, -0.5) * ANGLES(RAD(170), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1281
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.6, 0.65, -0.4) * ANGLES(RAD(170), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1282
		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)
1283
		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)
1284
	end
1285
	local ROOF,ROOFPOS = Raycast(RootPart.Position, CF(RootPart.Position,RootPart.Position+VT(0,1,0)).lookVector, 10000, Character)
1286
	DECOYARROW:remove()
1287
	VALUE1 = false
1288
	SpawnTrail(HandlePart.Position,ROOFPOS)
1289
	CreateSound("145203279", HandlePart, 10, 1)
1290
	for i=0, 0.3, 0.1 / Animation_Speed do
1291
		Swait()
1292
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0, -1, 0) * ANGLES(RAD(90), RAD(15), RAD(0)), 0.5 / Animation_Speed)
1293
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-25)), 0.5 / Animation_Speed)
1294
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-75), RAD(0), RAD(25)), 0.5 / Animation_Speed)
1295
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 1, -0.5) * ANGLES(RAD(170), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1296
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.6, 0.25, -0.3) * ANGLES(RAD(160), RAD(0), RAD(25)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1297
		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)
1298
		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)
1299
	end
1300
	if ROOF == nil then
1301
		for i=0, 1, 0.1 / Animation_Speed do
1302
			Swait()
1303
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)), 0.15 / Animation_Speed)
1304
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(15), RAD(25)), 0.15 / Animation_Speed)
1305
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1306
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1307
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.65, 0.35, -0.2) * ANGLES(RAD(45), RAD(0), RAD(-22)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1308
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.5, 0.5, -1) * ANGLES(RAD(-65), RAD(0), RAD(90)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1309
			HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0, -1, 0) * ANGLES(RAD(65), RAD(35), RAD(0)), 0.2 / Animation_Speed)
1310
		end
1311
		for i = 1, 15 do
1312
			Swait(5)
1313
			local AIMPART,AIMPOS = Raycast(Mouse.Hit.p+VT(0,500,0), CF(Mouse.Hit.p+VT(0,500,0),Mouse.Hit.p).lookVector, 600, Character)
1314
			SpawnTrail(Mouse.Hit.p+VT(0,500,0),AIMPOS)
1315
			if AIMPART ~= nil then
1316
				local ARROW = CreatePart(3, Effects, "SmoothPlastic", 0, 0, "Really black", "Arrow", VT(0,0,0),false)
1317
				CreateMesh("SpecialMesh", ARROW, "FileMesh", "95920149", "95920067", VT(1,1,1), VT(0, 0, 0))
1318
				ARROW.CFrame = CF(AIMPOS+VT(0,0.5,0),AIMPOS)
1319
				CreateSound("166423137", ARROW, 10, 1)
1320
				if AIMPART.Parent:FindFirstChildOfClass("Humanoid") then
1321
					if AIMPART.Parent:FindFirstChild("Torso") then
1322
						local RAGDOLLBODY = Ragdoll(AIMPART.Parent,ARROW)
1323
						ARROW.Parent = RAGDOLLBODY
1324
						weldBetween(AIMPART,ARROW)
1325
						Debris:AddItem(RAGDOLLBODY)
1326
					else
1327
						AIMPART.Parent:BreakJoints()
1328
					end
1329
				elseif AIMPART.Parent.Parent:FindFirstChildOfClass("Humanoid") then
1330
					if AIMPART.Parent.Parent:FindFirstChild("Torso") then
1331
						local RAGDOLLBODY = Ragdoll(AIMPART.Parent.Parent,ARROW)
1332
						ARROW.Parent = RAGDOLLBODY
1333
						weldBetween(AIMPART,ARROW)
1334
						Debris:AddItem(RAGDOLLBODY)
1335
					else
1336
						AIMPART.Parent:BreakJoints()
1337
					end
1338
				else
1339
					weldBetween(AIMPART,ARROW)
1340
					Debris:AddItem(ARROW,5)
1341
				end
1342
			end
1343
		end
1344
	end
1345
	ATTACK = false
1346
	Rooted = false
1347
end
1348
1349
--//=================================\\
1350
--||	  ASSIGN THINGS TO KEYS
1351
--\\=================================//
1352
1353
function MouseDown(Mouse)
1354
	if ATTACK == false then
1355
	end
1356
end
1357
1358
function MouseUp(Mouse)
1359
HOLD = false
1360
end
1361
1362
function KeyDown(Key)
1363
	KEYHOLD = true
1364
	if Key == "q" and ATTACK == false then
1365
		TakeAim()
1366
	end
1367
1368
	if TARGET ~= nil then
1369
		if Key == "z" and ATTACK == false then
1370
			ArrowShot()
1371
		end
1372
	
1373
		if Key == "v" and ATTACK == false then
1374
			PointBlanc()
1375
		end
1376
	end
1377
	if Key == "x" and ATTACK == false then
1378
		HuntersMark()
1379
	end
1380
end
1381
1382
function KeyUp(Key)
1383
	KEYHOLD = false
1384
end
1385
1386
	Mouse.Button1Down:connect(function(NEWKEY)
1387
		MouseDown(NEWKEY)
1388
	end)
1389
	Mouse.Button1Up:connect(function(NEWKEY)
1390
		MouseUp(NEWKEY)
1391
	end)
1392
	Mouse.KeyDown:connect(function(NEWKEY)
1393
		KeyDown(NEWKEY)
1394
	end)
1395
	Mouse.KeyUp:connect(function(NEWKEY)
1396
		KeyUp(NEWKEY)
1397
	end)
1398
1399
--//=================================\\
1400
--\\=================================//
1401
1402
1403
function unanchor()
1404
	if UNANCHOR == true then
1405
		g = Character:GetChildren()
1406
		for i = 1, #g do
1407
			if g[i].ClassName == "Part" then
1408
				g[i].Anchored = false
1409
			end
1410
		end
1411
	end
1412
end
1413
1414
1415
--//=================================\\
1416
--||	WRAP THE WHOLE SCRIPT UP
1417
--\\=================================//
1418
1419
Humanoid.Changed:connect(function(Jump)
1420
	if Jump == "Jump" and (Disable_Jump == true) then
1421
		Humanoid.Jump = false
1422
	end
1423
end)
1424
1425
while true do
1426
	Swait()
1427
	ANIMATE.Parent = nil
1428
	local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
1429
	IDLEANIMATION:Play()
1430
	SINE = SINE + CHANGE
1431
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
1432
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
1433
	local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
1434
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
1435
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
1436
	if ANIM == "Walk" and TORSOVELOCITY > 1 then
1437
		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)
1438
		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)
1439
		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)
1440
		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)
1441
	elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
1442
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1443
		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)
1444
		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)
1445
		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)
1446
	end
1447
	if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
1448
		ANIM = "Jump"
1449
		if ATTACK == false then
1450
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1451
			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)
1452
			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)
1453
			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)
1454
	    end
1455
	elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
1456
		ANIM = "Fall"
1457
		if ATTACK == false then
1458
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1459
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1460
			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)
1461
			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)
1462
		end
1463
	elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
1464
		ANIM = "Idle"
1465
		if ATTACK == false then
1466
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)), 0.15 / Animation_Speed)
1467
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(15), RAD(25)), 0.15 / Animation_Speed)
1468
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1469
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1470
		end
1471
	elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
1472
		ANIM = "Walk"
1473
		WALK = WALK + 1 / Animation_Speed
1474
		if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
1475
			WALK = 0
1476
			if WALKINGANIM == true then
1477
				WALKINGANIM = false
1478
			elseif WALKINGANIM == false then
1479
				WALKINGANIM = true
1480
			end
1481
		end
1482
		--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)
1483
		--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)
1484
		if ATTACK == false then
1485
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1486
			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)
1487
			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)
1488
			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)
1489
		end
1490
	end
1491
	if ATTACK == false then
1492
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.65, 0.35, -0.2) * ANGLES(RAD(45), RAD(0), RAD(-22)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1493
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.5, 0.5, -1) * ANGLES(RAD(-65), RAD(0), RAD(90)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1494
		HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0, -1, 0) * ANGLES(RAD(65), RAD(35), RAD(0)), 0.2 / Animation_Speed)
1495
	end
1496
	unanchor()
1497
	Humanoid.MaxHealth = "inf"
1498
	Humanoid.Health = "inf"
1499
	if Rooted == false then
1500
		Disable_Jump = false
1501
		Humanoid.WalkSpeed = Speed
1502
	elseif Rooted == true then
1503
		Disable_Jump = true
1504
		Humanoid.WalkSpeed = 0
1505
	end
1506
	for _, c in pairs(Character:GetChildren()) do
1507
		if c.ClassName == "Part" and c.Transparency < 1 then
1508
			if c.Name == "Hood" or c.Name == "FACE" then
1509
				c.Color = C3(0,0,0)
1510
			end
1511
			if c:FindFirstChild("Aura") == nil and c.Name ~= "FACE" then
1512
				local AURA = CreatePart(3, c, "Neon", 0, 0.3, "Really black", "Aura", c.Size*1.02,false)
1513
				AURA.CFrame = c.CFrame
1514
				weldBetween(c,AURA)
1515
				if c:FindFirstChildOfClass("SpecialMesh") then
1516
					local COPY = c:FindFirstChildOfClass("SpecialMesh"):Clone()
1517
					COPY.Parent = AURA
1518
					COPY.Scale = COPY.Scale * 1.01
1519
				end
1520
			end
1521
		elseif c.ClassName == "Part" and c.Transparency == 1 then
1522
			if c:FindFirstChild("Aura") then
1523
				c.Aura:remove()
1524
			end
1525
		elseif c.ClassName == "Accessory" then
1526
			c:remove()
1527
		end
1528
	end
1529
	if Head:FindFirstChild("face") then
1530
		Head.face:remove()
1531
	end
1532
	for _, c in pairs(Head:GetChildren()) do
1533
		if c.Name == "Eye" then
1534
			if TARGET == nil then
1535
				if EYECOLOR < 1 then
1536
					EYECOLOR = EYECOLOR + 0.01
1537
					c.Color = C3(1,EYECOLOR,EYECOLOR)
1538
				end
1539
			elseif TARGET ~= nil then
1540
				if EYECOLOR > 0 then
1541
					if EYECOLOR > 0 then
1542
						EYECOLOR = EYECOLOR - 0.01
1543
						c.Color = C3(1,EYECOLOR,EYECOLOR)
1544
					end
1545
				end
1546
			end
1547
		end
1548
	end
1549
	for _, c in pairs(Weapon:GetChildren()) do
1550
		if c.ClassName == "Part" then
1551
			c.Anchored = false
1552
			if c:FindFirstChild("BowWeld") then
1553
				local WELD = c.BowWeld
1554
				if VALUE1 == false then
1555
					WELD.C1 = Clerp(WELD.C1, CF(0, 0.55, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
1556
				elseif VALUE1 == true then
1557
					WELD.C1 = Clerp(WELD.C1, CF(0, 0.45, -0.55) * ANGLES(RAD(-45), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1558
				end
1559
			end
1560
		end
1561
	end
1562
	if TARGET == nil then
1563
		GYRO.cframe = CF(RootPart.Position,Mouse.Hit.p)
1564
	else
1565
		local TORS = TARGET.Parent:FindFirstChild("Torso") or TARGET.Parent:FindFirstChild("UpperTorso")
1566
		if TORS ~= nil then
1567
			GYRO.cframe = CF(RootPart.Position,TORS.Position)
1568
		end
1569
	end
1570
	sick.Parent = Character
1571
	Humanoid.Name = "Dread Hunter"
1572
	Humanoid.PlatformStand = false
1573
	Humanoid.Parent = Character
1574
	script.Parent = WEAPONGUI
1575
end
1576
1577
--//=================================\\
1578
--\\=================================//
1579
1580
1581
1582
1583
1584
--//====================================================\\--
1585
--||			  		 END OF SCRIPT
1586
--\\====================================================//--