View difference between Paste ID: gKamKAbE and T3VgWWxs
SHOW: | | - or go back to the newest paste.
1-
Player = game.Players.LocalPlayer
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,Mouse,mouse,UserInputService,ContextActionService = owner
3
do
4
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
5
	script.Parent = Player.Character
6
7
	--RemoteEvent for communicating
8
	local Event = Instance.new("RemoteEvent")
9
	Event.Name = "UserInput_Event"
10
11
	--Fake event to make stuff like Mouse.KeyDown work
12
	local function fakeEvent()
13
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
14
		t.connect = t.Connect
15
		return t
16
	end
17
18
	--Creating fake input objects with fake variables
19
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
20
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
21
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
22
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
23
	end}
24
	--Merged 2 functions into one by checking amount of arguments
25
	CAS.UnbindAction = CAS.BindAction
26
27-
Player = game:GetService("Players").LocalPlayer
27+
	--This function will trigger the events that have been :Connect()'ed
28
	local function te(self,ev,...)
29
		local t = m[ev]
30
		if t and t._fakeEvent and t.Function then
31
			t.Function(...)
32
		end
33-
Mouse = Player:GetMouse()
33+
34
	m.TrigEvent = te
35
	UIS.TrigEvent = te
36
37
	Event.OnServerEvent:Connect(function(plr,io)
38
	    if plr~=Player then return end
39
		if io.isMouse then
40
			m.Target = io.Target
41
			m.Hit = io.Hit
42
		else
43
			local b = io.UserInputState == Enum.UserInputState.Begin
44
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
45
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
46
			end
47
			for _,t in pairs(CAS.Actions) do
48
				for _,k in pairs(t.Keys) do
49
					if k==io.KeyCode then
50
						t.Function(t.Name,io.UserInputState,io)
51
					end
52
				end
53
			end
54
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
55
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
56
	    end
57
	end)
58
	Event.Parent = NLS([==[
59
	local Player = game:GetService("Players").LocalPlayer
60
	local Event = script:WaitForChild("UserInput_Event")
61
62
	local UIS = game:GetService("UserInputService")
63
	local input = function(io,a)
64
		if a then return end
65
		--Since InputObject is a client-side instance, we create and pass table instead
66
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
67
	end
68
	UIS.InputBegan:Connect(input)
69
	UIS.InputEnded:Connect(input)
70
71
	local Mouse = Player:GetMouse()
72
	local h,t
73
	--Give the server mouse data 30 times every second, but only if the values changed
74
	--If player is not moving their mouse, client won't fire events
75
	while wait(1/30) do
76
		if h~=Mouse.Hit or t~=Mouse.Target then
77
			h,t=Mouse.Hit,Mouse.Target
78
			Event:FireServer({isMouse=true,Target=t,Hit=h})
79
		end
80
	end]==],Player.Character)
81
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
82
end
83
Player = owner
84
	Character = Player.Character
85
	local txt = Instance.new("BillboardGui", Character)
86
	txt.Adornee = Character.Head
87
	txt.Name = "_status"
88
	txt.Size = UDim2.new(2, 0, 1.2, 0)
89
	txt.StudsOffset = Vector3.new(-9, 8, 0)
90
	local text = Instance.new("TextLabel", txt)
91
	text.Size = UDim2.new(10, 0, 7, 0)
92
	text.FontSize = "Size24"
93
	text.TextScaled = true
94
	text.TextTransparency = 0
95
	text.BackgroundTransparency = 1 
96
	text.TextTransparency = 0
97
	text.TextStrokeTransparency = 0
98
	text.Font = "ArialBold"
99
	text.TextStrokeColor3 = Color3.new(17, 17, 17)
100
        text.Text = ""
101
script.Name = "Banisher Gun V3 / 1"
102
--//====================================================\\--
103
--||			   CREATED BY SHACKLUSTER
104
--\\====================================================//--
105
106
script:ClearAllChildren()
107
wait(0.2)
108
109
Player = owner
110
PlayerGui = Player.PlayerGui
111
Cam = workspace.CurrentCamera
112
Backpack = Player.Backpack
113
Character = Player.Character
114
Humanoid = Character.Humanoid
115
RootPart = Character["HumanoidRootPart"]
116
Torso = Character["Torso"]
117
Head = Character["Head"]
118
RightArm = Character["Right Arm"]
119
LeftArm = Character["Left Arm"]
120
RightLeg = Character["Right Leg"]
121
LeftLeg = Character["Left Leg"]
122
RootJoint = RootPart["RootJoint"]
123
Neck = Torso["Neck"]
124
RightShoulder = Torso["Right Shoulder"]
125
LeftShoulder = Torso["Left Shoulder"]
126
RightHip = Torso["Right Hip"]
127
LeftHip = Torso["Left Hip"]
128
local TIME = 0
129
local sick = Instance.new("Sound",Torso)
130
131
IT = Instance.new
132
CF = CFrame.new
133
VT = Vector3.new
134
RAD = math.rad
135
C3 = Color3.new
136
UD2 = UDim2.new
137
BRICKC = BrickColor.new
138
ANGLES = CFrame.Angles
139
EULER = CFrame.fromEulerAnglesXYZ
140
COS = math.cos
141
ACOS = math.acos
142
SIN = math.sin
143
ASIN = math.asin
144
ABS = math.abs
145
MRANDOM = math.random
146
FLOOR = math.floor
147
148
--//=================================\\
149
--|| 	      USEFUL VALUES
150
--\\=================================//
151
152
Animation_Speed = 3
153
local FORCERESET = false
154
Frame_Speed = 1 / 170 -- (1 / 30) OR (1 / 170)
155
local Speed = 16
156
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
157
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
158
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
159
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
160
local DAMAGEMULTIPLIER = 1
161
local ANIM = "Idle"
162
local ATTACK = false
163
local EQUIPPED = false
164
local HOLD = false
165
local COMBO = 1
166
local Rooted = false
167
local SINE = 0
168
local KEYHOLD = false
169
local CHANGE = 2 / Animation_Speed
170
local WALKINGANIM = false
171
local VALUE1 = false
172
local VALUE2 = false
173
local ROBLOXIDLEANIMATION = IT("Animation")
174
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
175
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
176
--ROBLOXIDLEANIMATION.Parent = Humanoid
177
local WEAPONGUI = IT("ScreenGui", PlayerGui)
178
WEAPONGUI.Name = "BanishV3Gui"
179
local Weapon = IT("Model")
180
Weapon.Name = "Adds"
181
local Effects = IT("Folder", Weapon)
182
Effects.Name = "Effects"
183
local ANIMATOR = Humanoid.Animator
184
local ANIMATE = Character:FindFirstChild("Animate")
185
local UNANCHOR = true
186
local TOBANISH = {}
187
script.Parent = PlayerGui
188
189
--//=================================\\
190
--\\=================================//
191
192
193
--//=================================\\
194
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
195
--\\=================================//
196
197
ArtificialHB = Instance.new("BindableEvent", script)
198
ArtificialHB.Name = "ArtificialHB"
199
200
script:WaitForChild("ArtificialHB")
201
202
frame = Frame_Speed
203
tf = 0
204
allowframeloss = false
205
tossremainder = false
206
lastframe = tick()
207
script.ArtificialHB:Fire()
208
209
game:GetService("RunService").Heartbeat:connect(function(s, p)
210
	tf = tf + s
211
	if tf >= frame then
212
		if allowframeloss then
213
			script.ArtificialHB:Fire()
214
			lastframe = tick()
215
		else
216
			for i = 1, math.floor(tf / frame) do
217
				script.ArtificialHB:Fire()
218
			end
219
		lastframe = tick()
220
		end
221
		if tossremainder then
222
			tf = 0
223
		else
224
			tf = tf - frame * math.floor(tf / frame)
225
		end
226
	end
227
end)
228
229
--//=================================\\
230
--\\=================================//
231
232
--//=================================\\
233
--|| 	      SOME FUNCTIONS
234
--\\=================================//
235
236
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
237
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
238
end
239
240
function PositiveAngle(NUMBER)
241
	if NUMBER >= 0 then
242
		NUMBER = 0
243
	end
244
	return NUMBER
245
end
246
247
function NegativeAngle(NUMBER)
248
	if NUMBER <= 0 then
249
		NUMBER = 0
250
	end
251
	return NUMBER
252
end
253
254
function Swait(NUMBER)
255
	if NUMBER == 0 or NUMBER == nil then
256
		ArtificialHB.Event:wait()
257
	else
258
		for i = 1, NUMBER do
259
			ArtificialHB.Event:wait()
260
		end
261
	end
262
end
263
264
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
265
	local NEWMESH = IT(MESH)
266
	if MESH == "SpecialMesh" then
267
		NEWMESH.MeshType = MESHTYPE
268
		if MESHID ~= "nil" and MESHID ~= "" then
269
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
270
		end
271
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
272
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
273
		end
274
	end
275
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
276
	NEWMESH.Scale = SCALE
277
	NEWMESH.Parent = PARENT
278
	return NEWMESH
279
end
280
281
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
282
	local NEWPART = IT("Part")
283
	NEWPART.formFactor = FORMFACTOR
284
	NEWPART.Reflectance = REFLECTANCE
285
	NEWPART.Transparency = TRANSPARENCY
286
	NEWPART.CanCollide = false
287
	NEWPART.Locked = true
288
	NEWPART.Anchored = true
289
	if ANCHOR == false then
290
		NEWPART.Anchored = false
291
	end
292
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
293
	NEWPART.Name = NAME
294
	NEWPART.Size = SIZE
295
	NEWPART.Position = Torso.Position
296
	NEWPART.Material = MATERIAL
297
	NEWPART:BreakJoints()
298
	NEWPART.Parent = PARENT
299
	return NEWPART
300
end
301
302
	local function weldBetween(a, b)
303
	    local weldd = Instance.new("ManualWeld")
304
	    weldd.Part0 = a
305
	    weldd.Part1 = b
306
	    weldd.C0 = CFrame.new()
307
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
308
	    weldd.Parent = a
309
	    return weldd
310
	end
311
312
313
function QuaternionFromCFrame(cf)
314
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
315
	local trace = m00 + m11 + m22
316
	if trace > 0 then 
317
		local s = math.sqrt(1 + trace)
318
		local recip = 0.5 / s
319
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
320
	else
321
		local i = 0
322
		if m11 > m00 then
323
			i = 1
324
		end
325
		if m22 > (i == 0 and m00 or m11) then
326
			i = 2
327
		end
328
		if i == 0 then
329
			local s = math.sqrt(m00 - m11 - m22 + 1)
330
			local recip = 0.5 / s
331
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
332
		elseif i == 1 then
333
			local s = math.sqrt(m11 - m22 - m00 + 1)
334
			local recip = 0.5 / s
335
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
336
		elseif i == 2 then
337
			local s = math.sqrt(m22 - m00 - m11 + 1)
338
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
339
		end
340
	end
341
end
342
 
343
function QuaternionToCFrame(px, py, pz, x, y, z, w)
344
	local xs, ys, zs = x + x, y + y, z + z
345
	local wx, wy, wz = w * xs, w * ys, w * zs
346
	local xx = x * xs
347
	local xy = x * ys
348
	local xz = x * zs
349
	local yy = y * ys
350
	local yz = y * zs
351
	local zz = z * zs
352
	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))
353
end
354
 
355
function QuaternionSlerp(a, b, t)
356
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
357
	local startInterp, finishInterp;
358
	if cosTheta >= 0.0001 then
359
		if (1 - cosTheta) > 0.0001 then
360
			local theta = ACOS(cosTheta)
361
			local invSinTheta = 1 / SIN(theta)
362
			startInterp = SIN((1 - t) * theta) * invSinTheta
363
			finishInterp = SIN(t * theta) * invSinTheta
364
		else
365
			startInterp = 1 - t
366
			finishInterp = t
367
		end
368
	else
369
		if (1 + cosTheta) > 0.0001 then
370
			local theta = ACOS(-cosTheta)
371
			local invSinTheta = 1 / SIN(theta)
372
			startInterp = SIN((t - 1) * theta) * invSinTheta
373
			finishInterp = SIN(t * theta) * invSinTheta
374
		else
375
			startInterp = t - 1
376
			finishInterp = t
377
		end
378
	end
379
	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
380
end
381
382
function Clerp(a, b, t)
383
	local qa = {QuaternionFromCFrame(a)}
384
	local qb = {QuaternionFromCFrame(b)}
385
	local ax, ay, az = a.x, a.y, a.z
386
	local bx, by, bz = b.x, b.y, b.z
387
	local _t = 1 - t
388
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
389
end
390
391
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
392
	local frame = IT("Frame")
393
	frame.BackgroundTransparency = TRANSPARENCY
394
	frame.BorderSizePixel = BORDERSIZEPIXEL
395
	frame.Position = POSITION
396
	frame.Size = SIZE
397
	frame.BackgroundColor3 = COLOR
398
	frame.BorderColor3 = BORDERCOLOR
399
	frame.Name = NAME
400
	frame.Parent = PARENT
401
	return frame
402
end
403
404
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
405
	local label = IT("TextLabel")
406
	label.BackgroundTransparency = 1
407
	label.Size = UD2(1, 0, 1, 0)
408
	label.Position = UD2(0, 0, 0, 0)
409
	label.TextColor3 = TEXTCOLOR
410
	label.TextStrokeTransparency = STROKETRANSPARENCY
411
	label.TextTransparency = TRANSPARENCY
412
	label.FontSize = TEXTFONTSIZE
413
	label.Font = TEXTFONT
414
	label.BorderSizePixel = BORDERSIZEPIXEL
415
	label.TextScaled = false
416
	label.Text = TEXT
417
	label.Name = NAME
418
	label.Parent = PARENT
419
	return label
420
end
421
422
function NoOutlines(PART)
423
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
424
end
425
426
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
427
	local NEWWELD = IT(TYPE)
428
	NEWWELD.Part0 = PART0
429
	NEWWELD.Part1 = PART1
430
	NEWWELD.C0 = C0
431
	NEWWELD.C1 = C1
432
	NEWWELD.Parent = PARENT
433
	return NEWWELD
434
end
435
436
local S = IT("Sound")
437
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
438
	local NEWSOUND = nil
439
	coroutine.resume(coroutine.create(function()
440
		NEWSOUND = S:Clone()
441
		NEWSOUND.Parent = PARENT
442
		NEWSOUND.Volume = VOLUME
443
		NEWSOUND.Pitch = PITCH
444
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
445
		NEWSOUND:play()
446
		if DOESLOOP == true then
447
			NEWSOUND.Looped = true
448
		else
449
			repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
450
			NEWSOUND:remove()
451
		end
452
	end))
453
	return NEWSOUND
454
end
455
456
function CFrameFromTopBack(at, top, back)
457
	local right = top:Cross(back)
458
	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)
459
end
460
461
--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})
462
function WACKYEFFECT(Table)
463
	local TYPE = (Table.EffectType or "Sphere")
464
	local SIZE = (Table.Size or VT(1,1,1))
465
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
466
	local TRANSPARENCY = (Table.Transparency or 0)
467
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
468
	local CFRAME = (Table.CFrame or Torso.CFrame)
469
	local MOVEDIRECTION = (Table.MoveToPos or nil)
470
	local ROTATION1 = (Table.RotationX or 0)
471
	local ROTATION2 = (Table.RotationY or 0)
472
	local ROTATION3 = (Table.RotationZ or 0)
473
	local MATERIAL = (Table.Material or "Neon")
474
	local COLOR = (Table.Color or C3(17, 17, 17))
475
	local TIME = (Table.Time or 45)
476
	local SOUNDID = (Table.SoundID or nil)
477
	local SOUNDPITCH = (Table.SoundPitch or nil)
478
	local SOUNDVOLUME = (Table.SoundVolume or nil)
479
	coroutine.resume(coroutine.create(function()
480
		local PLAYSSOUND = false
481
		local SOUND = nil
482
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
483
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
484
			PLAYSSOUND = true
485
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
486
		end
487
		EFFECT.Color = COLOR
488
		local MSH = nil
489
		if TYPE == "Sphere" then
490
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
491
		elseif TYPE == "Block" then
492
			MSH = IT("BlockMesh",EFFECT)
493
			MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
494
		elseif TYPE == "Wave" then
495
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
496
		elseif TYPE == "Ring" then
497
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
498
		elseif TYPE == "Slash" then
499
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
500
		elseif TYPE == "Round Slash" then
501
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
502
		elseif TYPE == "Swirl" then
503
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
504
		elseif TYPE == "Skull" then
505
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
506
		elseif TYPE == "Crystal" then
507
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
508
		end
509
		if MSH ~= nil then
510
			local MOVESPEED = nil
511
			if MOVEDIRECTION ~= nil then
512
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
513
			end
514
			local GROWTH = SIZE - ENDSIZE
515
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
516
			if TYPE == "Block" then
517
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
518
			else
519
				EFFECT.CFrame = CFRAME
520
			end
521
			for LOOP = 1, TIME+1 do
522
				Swait()
523
				MSH.Scale = MSH.Scale - GROWTH/TIME
524
				if TYPE == "Wave" then
525
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
526
				end
527
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
528
				if TYPE == "Block" then
529
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
530
				else
531
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
532
				end
533
				if MOVEDIRECTION ~= nil then
534
					local ORI = EFFECT.Orientation
535
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
536
					EFFECT.Orientation = ORI
537
				end
538
			end
539
			if PLAYSSOUND == false then
540
				EFFECT:remove()
541
			else
542
				SOUND.Stopped:Connect(function()
543
					EFFECT:remove()
544
				end)
545
			end
546
		else
547
			if PLAYSSOUND == false then
548
				EFFECT:remove()
549
			else
550
				repeat Swait() until SOUND.Playing == false
551
				EFFECT:remove()
552
			end
553
		end
554
	end))
555
end
556
557
function MakeForm(PART,TYPE)
558
	if TYPE == "Cyl" then
559
		local MSH = IT("CylinderMesh",PART)
560
	elseif TYPE == "Ball" then
561
		local MSH = IT("SpecialMesh",PART)
562
		MSH.MeshType = "Sphere"
563
	elseif TYPE == "Wedge" then
564
		local MSH = IT("SpecialMesh",PART)
565
		MSH.MeshType = "Wedge"
566
	end
567
end
568
569
function SpawnTrail(FROM,TO,BIG)
570
	local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "Really red", "Trail", VT(0,0,0))
571
	MakeForm(TRAIL,"Cyl")
572
	local DIST = (FROM - TO).Magnitude
573
	if BIG == true then
574
		TRAIL.Size = VT(0.5,DIST,0.5)
575
	else
576
		TRAIL.Size = VT(0.25,DIST,0.25)
577
	end
578
	TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
579
	coroutine.resume(coroutine.create(function()
580
		for i = 1, 5 do
581
			Swait()
582
			TRAIL.Transparency = TRAIL.Transparency + 0.1
583
		end
584
		TRAIL:remove()
585
	end))
586
end
587
588
Debris = game:GetService("Debris")
589
590
function CastProperRay(StartPos, EndPos, Distance, Ignore)
591
	local DIRECTION = CF(StartPos,EndPos).lookVector
592
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
593
end
594
595
function turnto(position)
596
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
597
end
598
599
--//=================================\\
600
--||	     WEAPON CREATION
601
--\\=================================//
602
603
local Particle = IT("ParticleEmitter",nil)
604
Particle.Enabled = false
605
Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(1,1)})
606
Particle.LightEmission = 0.5
607
Particle.Rate = 150
608
Particle.ZOffset = 0.2
609
Particle.Rotation = NumberRange.new(-180, 180)
610
Particle.RotSpeed = NumberRange.new(-180, 180)
611
Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
612
Particle.Color = ColorSequence.new(C3(17, 17, 17),C3(17, 17, 17))
613
614
--ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
615
function ParticleEmitter(Table)
616
	local PRTCL = Particle:Clone()
617
	local Speed = Table.Speed or 5
618
	local Drag = Table.Drag or 0
619
	local Size1 = Table.Size1 or 1
620
	local Size2 = Table.Size2 or 5
621
	local Lifetime1 = Table.Lifetime1 or 1
622
	local Lifetime2 = Table.Lifetime2 or 1.5
623
	local Parent = Table.Parent or Torso
624
	local Emit = Table.Emit or 100
625
	local Offset = Table.Offset or 360
626
	local Acel = Table.Acel or VT(0,0,0)
627
	local Enabled = Table.Enabled or false
628
	PRTCL.Parent = Parent
629
	PRTCL.Size = NumberSequence.new(Size1,Size2)
630
	PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
631
	PRTCL.Speed = NumberRange.new(Speed)
632
	PRTCL.VelocitySpread = Offset
633
	PRTCL.Drag = Drag
634
	PRTCL.Acceleration = Acel
635
	if Enabled == false then
636
		PRTCL:Emit(Emit)
637
		Debris:AddItem(PRTCL,Lifetime2)
638
	else
639
		PRTCL.Enabled = true
640
	end
641
	return PRTCL
642
end
643
644
local Handle = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.6,0.2),false)
645
local RightArmGrasp = CreateWeldOrSnapOrMotor("Weld", Handle, RightArm, Handle, CF(0,-1, 0) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0.21, 0))
646
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
647
MakeForm(Part,"Wedge")
648
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.3, 0.2) * ANGLES(RAD(0), RAD(180), RAD(0)), CF(0, 0, 0))
649
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.3,0.2),false)
650
MakeForm(Part,"Wedge")
651
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.4, 0) * ANGLES(RAD(0), RAD(0), RAD(180)), CF(0, 0, 0))
652
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.3,0.3),false)
653
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.5, 0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
654
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.5,0.5),false)
655
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
656
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.4,0.4,0.4),false)
657
MakeForm(Part,"Cyl")
658
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
659
for i = 1, 8 do
660
	local Piece = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0,0.35,0.41),false)
661
	CreateWeldOrSnapOrMotor("Weld", Handle, Part, Piece, CF(0, 0, 0) * ANGLES(RAD(0), RAD((360/8)*i), RAD(0)), CF(0, 0, 0))
662
end
663
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.38,0.41,0.38),false)
664
MakeForm(Part,"Cyl")
665
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.5) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
666
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.37,0.5,0.37),false)
667
MakeForm(Part,"Ball")
668
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.3) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
669
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.7,0.4),false)
670
MakeForm(Part,"Wedge")
671
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.7, 0.5) * ANGLES(RAD(90), RAD(180), RAD(180)), CF(0, 0, 0))
672
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.3,0.4,0.2),false)
673
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
674
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.35,0.35,0.35),false)
675
MakeForm(Part,"Cyl")
676
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
677
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.5),false)
678
MakeForm(Part,"Cyl")
679
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
680
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.5,0.1,0.45),false)
681
MakeForm(Part,"Cyl")
682
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 1.1) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
683
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.2,0.5,0.2),false)
684
MakeForm(Part,"Wedge")
685
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.55, 0.2) * ANGLES(RAD(-135), RAD(0), RAD(0)), CF(0, -0.3, 0))
686
local LASTPART = Handle
687
for i = 1, 10 do
688
	if LASTPART == Handle then
689
		local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.2,0),false)
690
		LASTPART = Part
691
		CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.1, 0.2) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
692
	else
693
		local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.1,0.05,0),false)
694
		CreateWeldOrSnapOrMotor("Weld", Handle, LASTPART, Part, CF(0, 0.025, 0) * ANGLES(RAD(8), RAD(0), RAD(0)), CF(0, -0.025, 0))
695
		LASTPART = Part
696
	end
697
end
698
699
local Barrel = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.15,2,0.15),false)
700
MakeForm(Barrel,"Cyl")
701
CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Barrel, CF(0, -0.6, 1.8) * ANGLES(RAD(90), RAD(0), RAD(0)), CF(0, 0, 0))
702
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0.25,1,0.25),false)
703
MakeForm(Part,"Cyl")
704
CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, -0.6, 0), CF(0, 0, 0))
705
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0.1,0.2),false)
706
MakeForm(Part,"Wedge")
707
CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Part, CF(0, 0.945, 0.1) * ANGLES(RAD(180), RAD(0), RAD(0)), CF(0, 0, 0))
708
local Hole = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Eye", VT(0.125,0,0.125),false)
709
MakeForm(Hole,"Cyl")
710
CreateWeldOrSnapOrMotor("Weld", Handle, Barrel, Hole, CF(0, 0.98, 0), CF(0, 0, 0))
711
local Part = CreatePart(3, Weapon, "Metal", 0, 0, "Mid gray", "Part", VT(0,0,0),false)
712
local GEARWELD = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
713
CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.8,0.8,1.5), VT(0,0,0.2))
714
local Part = CreatePart(3, Weapon, "Metal", 0, 0.5, "Mid gray", "Eye", VT(0,0,0),false)
715
local GEARWELD2 = CreateWeldOrSnapOrMotor("Weld", Handle, Handle, Part, CF(0, -0.6, 0.7), CF(0, 0, 0))
716
CreateMesh("SpecialMesh", Part, "FileMesh", 156292343, "", VT(0.9,0.9,0.3), VT(0,0,0.2))
717
coroutine.resume(coroutine.create(function()
718
	while wait() do
719
		GEARWELD.C0 = GEARWELD.C0 * ANGLES(RAD(0), RAD(0), RAD(5))
720
		GEARWELD2.C0 = GEARWELD2.C0 * ANGLES(RAD(0), RAD(0), RAD(-5))
721
	end
722
end))
723
724
ParticleEmitter({Speed = 0.2, Drag = 0, Size1 = 0.1, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.5, Parent = Hole, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
725
--ParticleEmitter({Speed = 0.5, Drag = 0, Size1 = 0.2, Size2 = 0, Lifetime1 = 0.3, Lifetime2 = 0.7, Parent = Dangle, Emit = 100, Offset = 360, Enabled = true, Acel = VT(0,5,0)})
726
727
for _, c in pairs(Weapon:GetDescendants()) do
728
	if c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then
729
		c.Material = "Glass"
730
		c.Color = C3(17, 17, 17)
731
	elseif c.ClassName == "Part" and c.Name == "Eye" then
732
		c.Color = C3(17, 17, 17)
733
		c.Material = "Neon"
734
	end
735
end
736
737
Weapon.Parent = Character
738
for _, c in pairs(Weapon:GetChildren()) do
739
	if c.ClassName == "Part" then
740
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
741
	end
742
end
743
744
local SKILLTEXTCOLOR = C3(1,0,0)
745
local SKILLFONT = "Antique"
746
local SKILLTEXTSIZE = 7
747
748
Humanoid.Died:connect(function()
749
	ATTACK = true
750
end)
751
752
local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.1, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
753
--[[local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.63, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
754
local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.215, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
755
local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.525, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
756
local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
757
]]
758
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Banisher Bullet", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 1")
759
--[[local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Ability 2", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 2")
760
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 3")
761
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 4")
762
local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Mercy", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.7, "Text 5")
763
]]
764
function printbye(Name)
765
	local MESSAGES = {"You cannot struggle, ","Your existance is an insult, ","Fade, ","Your existance is not desired, ","You are not permitted here, ","You are not to decide your fate, ","Be gone, ","You are already dead, ","Your live is an anomaly, ","Don't dare to return, ","Why are you resisting, ","You cannot exist here, ","Why are you struggling, ","Your fate was already decided, ","Goodbye, ","You cannot ignore my command, ","You cannot resist my command, ","You already died, "}
766
	warn(MESSAGES[MRANDOM(1,#MESSAGES)]..Name..".")	
767
end
768
769
workspace.ChildAdded:connect(function(instance)
770
    for BANISH = 1, #TOBANISH do
771
		if TOBANISH[BANISH] ~= nil then
772
			if instance.Name == TOBANISH[BANISH] then
773
				coroutine.resume(coroutine.create(function()
774
					printbye(instance.Name)
775
					instance:ClearAllChildren()
776
					Debris:AddItem(instance,0.0005)
777
				end))
778
			end
779
		end
780
	end
781
end)
782
783
--//=================================\\
784
--||			DAMAGING
785
--\\=================================//
786
787
function Banish(Foe)
788
	if Foe then
789
		coroutine.resume(coroutine.create(function()
790
			--if game.Players:FindFirstChild(Foe.Name) then
791
				table.insert(TOBANISH,Foe.Name)
792
				printbye(Foe.Name)
793
			--end
794
			Foe.Archivable = true
795
			local CLONE = Foe:Clone()
796
			Foe:Destroy()
797
			CLONE.Parent = Effects
798
			CLONE:BreakJoints()
799
			local MATERIALS = {"Glass","Neon"}
800
			for _, c in pairs(CLONE:GetDescendants()) do
801
				if c:IsA("BasePart") then
802
					if c.Name == "Torso" or c.Name == "UpperTorso" or c == CLONE.PrimaryPart then
803
 						CreateSound(340722848, c, 10, 1, false)
804
					end
805
					c.Anchored = true
806
					c.Transparency = c.Transparency + 0.2
807
					c.Material = MATERIALS[MRANDOM(1,2)]
808
					c.Color = C3(1,0,0)
809
					if c.ClassName == "MeshPart" then
810
						c.TextureID = ""
811
					end
812
					if c:FindFirstChildOfClass("SpecialMesh") then
813
						c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
814
					end
815
					if c:FindFirstChildOfClass("Decal") then
816
						c:FindFirstChildOfClass("Decal"):remove()
817
					end
818
					c.Name = "Banished"
819
					c.CanCollide = false
820
				else
821
					c:remove()
822
				end
823
			end
824
			local A = false
825
			for i = 1, 35 do
826
				if A == false then
827
					A = true
828
				elseif A == true then
829
					A = false
830
				end
831
				for _, c in pairs(CLONE:GetDescendants()) do
832
					if c:IsA("BasePart") then
833
						c.Anchored = true
834
						c.Material = MATERIALS[MRANDOM(1,2)]
835
						c.Transparency = c.Transparency + 0.8/35
836
						if A == false then
837
							c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)
838
						elseif A == true then
839
							c.CFrame = c.CFrame*CF(MRANDOM(-45,45)/45,MRANDOM(-45,45)/45,MRANDOM(-45,45)/45)						
840
						end
841
					end
842
				end
843
				Swait()
844
			end
845
			CLONE:remove()
846
		end))
847
	end
848
end
849
850
function ApplyAoE(POSITION,RANGE,ISBANISH)
851
	local CHILDREN = workspace:GetDescendants()
852
	for index, CHILD in pairs(CHILDREN) do
853
		if CHILD.ClassName == "Model" and CHILD ~= Character then
854
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
855
			if HUM then
856
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
857
				if TORSO then
858
					if (TORSO.Position - POSITION).Magnitude <= RANGE then
859
						if ISBANISH == true then
860
							Banish(CHILD)
861
						else
862
							if ISBANISH == "Gravity" then
863
								HUM.PlatformStand = true
864
								if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
865
									local grav = Instance.new("BodyPosition",TORSO)
866
									grav.D = 15
867
									grav.P = 20000
868
									grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
869
									grav.position = TORSO.Position
870
									grav.Name = "V3BanishForce"..Player.Name
871
								else
872
									TORSO:FindFirstChild("V3BanishForce"..Player.Name).position = TORSO.Position+VT(0,0.3,0)
873
									TORSO.RotVelocity = VT(MRANDOM(-25,25),MRANDOM(-25,25),MRANDOM(-25,25))
874
								end
875
							else
876
								HUM.PlatformStand = false
877
							end
878
						end
879
					elseif ISBANISH == "Gravity" then
880
						if TORSO:FindFirstChild("V3BanishForce"..Player.Name) then
881
							TORSO:FindFirstChild("V3BanishForce"..Player.Name):remove()
882
							HUM.PlatformStand = false
883
						end
884
					end
885
				end
886
			end
887
		end
888
	end
889
end
890
891
--//=================================\\
892
--||	ATTACK FUNCTIONS AND STUFF
893
--\\=================================//
894
895
function Shot()
896
	ATTACK = true
897
	Rooted = false
898
	for i=0, 0.4, 0.1 / Animation_Speed do
899
		Swait()
900
		turnto(Mouse.Hit.p)
901
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
902
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
903
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
904
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
905
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
906
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
907
	end
908
	repeat
909
		for i=0, 0.2, 0.1 / Animation_Speed do
910
			Swait()
911
			turnto(Mouse.Hit.p)
912
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
913
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.5 / Animation_Speed)
914
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
915
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
916
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
917
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
918
		end
919
		local HIT,POS = CastProperRay(Hole.Position, Mouse.Hit.p, 1000, Character)
920
		SpawnTrail(Hole.Position,POS)
921
		if HIT ~= nil then
922
			if HIT.Parent ~= workspace and HIT.Parent.ClassName ~= "Folder" then
923
				Banish(HIT.Parent)
924
			end
925
		end
926
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(1,1.5,1), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = Hole.CFrame*CF(0,0.5,0).p, RotationX = 0, RotationY = -15, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
927
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = Hole.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = 904440937, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
928
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = -5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
929
		WACKYEFFECT({Time = 25, EffectType = "Wave", Size = VT(0.3,0,0.3), Size2 = VT(2,0.5,2), Transparency = 0, Transparency2 = 1, CFrame = CF(POS,Hole.Position) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = C3(1,0,0), SoundID = nil, SoundPitch = MRANDOM(8,11)/10, SoundVolume = 8})
930
		for i=0, 0.3, 0.1 / Animation_Speed do
931
			Swait()
932
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(90)), 0.5 / Animation_Speed)
933
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.25 / Animation_Speed)
934
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(15), RAD(90)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
935
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.6, 0) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
936
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
937
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
938
		end
939
	until KEYHOLD == false
940
	ATTACK = false
941
	Rooted = false
942
end
943
944
function AttackTemplate()
945
	ATTACK = true
946
	Rooted = false
947
	for i=0, 1, 0.1 / Animation_Speed do
948
		Swait()
949
		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)
950
		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)
951
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
952
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
953
		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)
954
		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)
955
	end
956
	ATTACK = false
957
	Rooted = false
958
end
959
960
--//=================================\\
961
--||	  ASSIGN THINGS TO KEYS
962
--\\=================================//
963
964
function MouseDown(Mouse)
965
	if ATTACK == false then
966
	end
967
end
968
969
function MouseUp(Mouse)
970
HOLD = false
971
end
972
973
function KeyDown(Key)
974
	KEYHOLD = true
975
	if Key == "e" and ATTACK == false then
976
		Shot()
977
	end
978
979
	if Key == "b" and ATTACK == false then
980
	end
981
982
	if Key == "c" and ATTACK == false then
983
	end
984
985
	if Key == "v" and ATTACK == false then
986
	end
987
988
	if Key == "x" and ATTACK == false then
989
	end
990
end
991
992
function KeyUp(Key)
993
	KEYHOLD = false
994
end
995
996
	Mouse.Button1Down:connect(function(NEWKEY)
997
		MouseDown(NEWKEY)
998
	end)
999
	Mouse.Button1Up:connect(function(NEWKEY)
1000
		MouseUp(NEWKEY)
1001
	end)
1002
	Mouse.KeyDown:connect(function(NEWKEY)
1003
		KeyDown(NEWKEY)
1004
	end)
1005
	Mouse.KeyUp:connect(function(NEWKEY)
1006
		KeyUp(NEWKEY)
1007
	end)
1008
1009
--//=================================\\
1010
--\\=================================//
1011
1012
1013
function unanchor()
1014
	if UNANCHOR == true then
1015
		g = Character:GetChildren()
1016
		for i = 1, #g do
1017
			if g[i].ClassName == "Part" then
1018
				g[i].Anchored = false
1019
			end
1020
		end
1021
	end
1022
end
1023
1024
1025
--//=================================\\
1026
--||	WRAP THE WHOLE SCRIPT UP
1027
--\\=================================//
1028
1029
Humanoid.Changed:connect(function(Jump)
1030
	if Jump == "Jump" and (Disable_Jump == true) then
1031
		Humanoid.Jump = false
1032
	end
1033
end)
1034
1035
local CONNECT = nil
1036
1037
while true do
1038
	Swait()
1039
	ANIMATE.Parent = nil
1040
	if Character:FindFirstChildOfClass("Humanoid") == nil then
1041
		Humanoid = IT("Humanoid",Character)
1042
	end
1043
	for _,v in next, Humanoid:GetPlayingAnimationTracks() do
1044
	    v:Stop();
1045
	end
1046
	SINE = SINE + CHANGE
1047
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
1048
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
1049
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
1050
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
1051
	if ANIM == "Walk" and TORSOVELOCITY > 1 then
1052
		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)
1053
		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)
1054
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1055
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1056
	elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
1057
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1058
		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)
1059
		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)
1060
		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)
1061
	end
1062
	if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
1063
		ANIM = "Jump"
1064
		if ATTACK == false then
1065
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1066
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1067
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1068
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
1069
			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)
1070
			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)
1071
	    end
1072
	elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
1073
		ANIM = "Fall"
1074
		if ATTACK == false then
1075
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1076
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1077
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1078
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
1079
			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)
1080
			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)
1081
		end
1082
	elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
1083
		ANIM = "Idle"
1084
		if ATTACK == false then
1085
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
1086
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.15 / Animation_Speed)
1087
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.5) * ANGLES(RAD(75), RAD(45), RAD(-25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1088
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1089
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1090
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1091
		end
1092
	elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
1093
		ANIM = "Walk"
1094
		if ATTACK == false then
1095
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1096
			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)
1097
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.1, -0.4) * ANGLES(RAD(150), RAD(0), RAD(0))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1098
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
1099
			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)
1100
			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)
1101
		end
1102
	end
1103
	unanchor()
1104
	Humanoid.MaxHealth = "inf"
1105
	Humanoid.Health = "inf"
1106
	if Rooted == false then
1107
		Disable_Jump = false
1108
		Humanoid.WalkSpeed = Speed
1109
	elseif Rooted == true then
1110
		Disable_Jump = true
1111
		Humanoid.WalkSpeed = 0
1112
	end
1113
	sick.Parent = Torso
1114
	sick:resume()
1115
	sick.Volume = 8.2
1116
	sick.Pitch = 1
1117
	sick.SoundId = "rbxassetid://1383202399"
1118
	sick.Name = "Dead"
1119
end
1120
1121
--//=================================\\
1122
--\\=================================//
1123
1124
1125
1126
1127
1128
--//====================================================\\--
1129
--||			  		 END OF SCRIPT
1130
--\\====================================================//--