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