View difference between Paste ID: jjCVszLr and t1N7nhxf
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
2
do
3
	script.Parent = owner.Character
4
	local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
5
	local function NewFakeEvent()
6
		local Bind = Instance.new("BindableEvent")
7
		local Fake;Fake = {Connections = {},
8
		fakeEvent=true;
9
		Connect=function(self,Func)
10
			Bind.Event:connect(Func)
11
			self.Connections[Bind] = true
12
			return setmetatable({Connected = true},{
13
			__index = function (self,Index)
14
				if Index:lower() == "disconnect" then
15
					return function() Fake.Connections[Bind] = false;self.Connected = false end
16
				end
17
				return Fake[Index]
18
			end;
19
			__tostring = function() return "Connection" end;
20
		})
21
		end}
22
		Fake.connect = Fake.Connect;return Fake;
23
	end
24
	local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
25
	local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
26
	local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
27
		self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
28
	end};ContextActionService.UnBindAction = ContextActionService.BindAction
29
	local function TriggerEvent(self,Event,...)
30
		local Trigger = Mouse[Event]
31
		if Trigger and Trigger.fakeEvent and Trigger.Connections then
32
			for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
33
		end
34
	end
35
	Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
36
	Event.OnServerEvent:Connect(function(FiredBy,Input)
37
		if FiredBy.Name ~= owner.Name then return end
38
		if Input.MouseEvent then
39
			Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
40
		else
41
			local Begin = Input.UserInputState == Enum.UserInputState.Begin
42
			if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
43
			for _,Action in pairs(ContextActionService.Actions) do
44
				for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
45
			end
46
			Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
47
			UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
48
		end
49
	end)
50
	InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
51
	Event.Parent = NLS([[
52
		local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
53
		local Input = function(Input,gameProcessedEvent)
54
			if gameProcessedEvent then return end
55
			Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
56
		end
57
		UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
58
		local Hit,Target
59
		while wait(1/30) do
60
			if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
61
				Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
62
			end
63
		end
64
	]],owner.Character)
65
end
66
RealGame = game;game = setmetatable({},{
67
	__index = function (self,Index)
68
		local Sandbox = function (Thing)
69
			if Thing:IsA("Player") then
70
				local RealPlayer = Thing
71
				return setmetatable({},{
72
					__index = function (self,Index)
73
						local Type = type(RealPlayer[Index])
74
						if Type == "function" then
75
							if Index:lower() == "getmouse" or Index:lower() == "mouse" then
76
								return function (self)return InternalData["Mouse"] end
77
							end
78
							return function (self,...)return RealPlayer[Index](RealPlayer,...) end
79
						end
80
						return RealPlayer[Index]
81
					end;
82
					__tostring = function(self) return RealPlayer.Name end
83
				})
84
			end
85
		end
86
		if RealGame[Index] then
87
			local Type = type(RealGame[Index])
88
			if Type == "function" then
89
				if Index:lower() == "getservice" or Index:lower() == "service" then
90
					return function (self,Service)
91
						local FakeServices = {
92
							["players"] = function()
93
								return setmetatable({},{
94
									__index = function (self2,Index2)
95
										local RealService = RealGame:GetService(Service)
96
										local Type2 = type(Index2)
97
										if Type2 == "function" then
98
											return function (self,...) return RealService[Index2](RealService,...)end
99
										else
100
											if Index2:lower() == "localplayer" then return Sandbox(owner) end
101
											return RealService[Index2]
102
										end
103
									end;
104
									__tostring = function(self) return RealGame:GetService(Service).Name end
105
								})
106
							end;
107
							["contextactionservice"] = function() return InternalData["ContextActionService"] end;
108
							["userinputservice"] = function() return InternalData["UserInputService"] end;
109
							["runservice"] = function()
110
								return setmetatable({},{
111
									__index = function(self2,Index2)
112
										local RealService = RealGame:GetService(Service)
113
										local Type2 = type(Index2)
114
										if Type2 == "function" then
115
											return function (self,...) return RealService[Index2](RealService,...) end
116
										else
117
											local RunServices = {
118
												["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
119
												["renderstepped"] = function() return RealService["Stepped"] end
120
											}
121
											if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
122
											return RealService[Index2]
123
										end
124
									end
125
								})
126
							end
127
						}
128
						if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
129
						return RealGame:GetService(Service)
130
					end
131
				end
132
				return function (self,...) return RealGame[Index](RealGame,...) end
133
			else
134
				if game:GetService(Index) then return game:GetService(Index) end
135
				return RealGame[Index]
136
			end
137
		end
138
		return nil
139
	end
140
});Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
141
142
wait(0.016666666666667)
143
Anim = nil
144
cf = CFrame.new
145
function c3(cz, cx, cc)
146
  return Color3.new(cz / 255, cx / 255, cc / 255)
147
end
148
angles = CFrame.Angles
149
Player = game.Players.LocalPlayer
150
Character = Player.Character
151
Humanoid = Character.Humanoid
152
mouse = Player:GetMouse()
153
local LeftArm = Character["Left Arm"]
154
RightArm = Character["Right Arm"]
155
LeftLeg = Character["Left Leg"]
156
RightLeg = Character["Right Leg"]
157
Head = Character.Head
158
Torso = Character.Torso
159
RootPart = Character.HumanoidRootPart
160
RootJoint = RootPart.RootJoint
161
Humanoid.Animator:Destroy()
162
Character.Animate:Destroy()
163
NeckCF = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
164
RootCF = angles(-1.57, 0, 3.14)
165
LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
166
LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
167
RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
168
RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
169
RW = Instance.new("Weld")
170
LW = Instance.new("Weld")
171
RH = Torso["Right Hip"]
172
LH = Torso["Left Hip"]
173
Neck = Torso.Neck
174
RSH = Torso["Right Shoulder"]
175
LSH = Torso["Left Shoulder"]
176
RSH.Parent = nil
177
LSH.Parent = nil
178
RW.Name = "Right Shoulder"
179
RW.Part0 = Torso
180
RW.C0 = cf(1.5, 0.5, 0)
181
RW.C1 = cf(0, 0.5, 0)
182
RW.Part1 = RightArm
183
RW.Parent = Torso
184
LW.Name = "Left Shoulder"
185
LW.Part0 = Torso
186
LW.C0 = cf(-1.5, 0.5, 0)
187
LW.C1 = cf(0, 0.5, 0)
188
LW.Part1 = LeftArm
189
LW.Parent = Torso
190
Effects = Instance.new("Model", Character)
191
Effects.Name = "Effects"
192
Humanoid.WalkSpeed = 16
193
partEffects, AttackHas, AttackNeeded, AttackCan = {}, {}, {}, {}
194
AttackHas[1], AttackHas[2], AttackHas[3], AttackHas[4] = 1, 1, 1, 1
195
AttackNeeded[1], AttackNeeded[2], AttackNeeded[3], AttackNeeded[4] = 1, 1, 1, 1
196
AttackCan[1], AttackCan[2], AttackCan[3], AttackCan[4] = true, true, true, true
197
sine = 0
198
attackcounter = 1
199
torvel = nil
200
attacking = false
201
hitfloor, posfloor = nil, nil
202
tool = nil
203
if script.Parent.ClassName == "HopperBin" then
204
  tool = script.Parent
205
  tool.Parent = Player.Backpack
206
else
207
  tool = Instance.new("HopperBin", Player.Backpack)
208
  tool.Name = ""
209
end
210
meshes = {
211
  3270017,
212
  20329976,
213
  448386996,
214
  1095708,
215
  1033714,
216
  9756362
217
}
218
sounds = {
219
  {
220
    320557413,
221
    320557453,
222
    320557487,
223
    320557518,
224
    320557537,
225
    320557563,
226
    233856146,
227
    233856140
228
  },
229
  {
230
    234365549,
231
    234365573,
232
    231917961,
233
    231917950,
234
    231917856,
235
    231917863,
236
    231917871
237
  },
238
  {
239
    262562442,
240
    231917806,
241
    231917784
242
  },
243
  {
244
    262562442,
245
    233856048,
246
    306247739
247
  }
248
}
249
ArtificialHB = Instance.new("BindableEvent", script)
250
ArtificialHB.Name = "Heartbeat"
251
script:WaitForChild("Heartbeat")
252
frame = 0.025
253
tf = 0
254
allowframeloss = true
255
tossremainder = false
256
lastframe = tick()
257
script.Heartbeat:Fire()
258
game:GetService("RunService").Heartbeat:connect(function(s, p)
259
  tf = tf + s
260
  if tf >= frame then
261
    if allowframeloss then
262
      script.Heartbeat:Fire()
263
      lastframe = tick()
264
    else
265
      for i = 1, math.floor(tf / frame) do
266
        script.Heartbeat:Fire()
267
      end
268
      lastframe = tick()
269
    end
270
    if tossremainder then
271
      tf = 0
272
    else
273
      tf = tf - frame * math.floor(tf / frame)
274
    end
275
  end
276
end)
277
function swait(num)
278
  if num == 0 or num == nil then
279
    ArtificialHB.Event:wait()
280
  else
281
    for i = 0, num do
282
      ArtificialHB.Event:wait()
283
    end
284
  end
285
end
286
function thread(f)
287
  coroutine.resume(coroutine.create(f))
288
end
289
function clerp(a, b, t)
290
  local qa = {
291
    QuaternionFromCFrame(a)
292
  }
293
  local qb = {
294
    QuaternionFromCFrame(b)
295
  }
296
  local ax, ay, az = a.x, a.y, a.z
297
  local bx, by, bz = b.x, b.y, b.z
298
  local _t = 1 - t
299
  return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
300
end
301
function QuaternionFromCFrame(cf)
302
  local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
303
  local trace = m00 + m11 + m22
304
  if trace > 0 then
305
    local s = math.sqrt(1 + trace)
306
    local recip = 0.5 / s
307
    return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
308
  else
309
    local i = 0
310
    if m00 < m11 then
311
      i = 1
312
    end
313
    if m22 > (i == 0 and m00 or m11) then
314
      i = 2
315
    end
316
    if i == 0 then
317
      local s = math.sqrt(m00 - m11 - m22 + 1)
318
      local recip = 0.5 / s
319
      return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
320
    elseif i == 1 then
321
      local s = math.sqrt(m11 - m22 - m00 + 1)
322
      local recip = 0.5 / s
323
      return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
324
    elseif i == 2 then
325
      local s = math.sqrt(m22 - m00 - m11 + 1)
326
      local recip = 0.5 / s
327
      return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
328
    end
329
  end
330
end
331
function QuaternionToCFrame(px, py, pz, x, y, z, w)
332
  local xs, ys, zs = x + x, y + y, z + z
333
  local wx, wy, wz = w * xs, w * ys, w * zs
334
  local xx = x * xs
335
  local xy = x * ys
336
  local xz = x * zs
337
  local yy = y * ys
338
  local yz = y * zs
339
  local zz = z * zs
340
  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))
341
end
342
function QuaternionSlerp(a, b, t)
343
  local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
344
  local startInterp, finishInterp
345
  if cosTheta >= 1.0E-4 then
346
    if 1 - cosTheta > 1.0E-4 then
347
      local theta = math.acos(cosTheta)
348
      local invSinTheta = 1 / math.sin(theta)
349
      startInterp = math.sin((1 - t) * theta) * invSinTheta
350
      finishInterp = math.sin(t * theta) * invSinTheta
351
    else
352
      startInterp = 1 - t
353
      finishInterp = t
354
    end
355
  elseif 1 + cosTheta > 1.0E-4 then
356
    local theta = math.acos(-cosTheta)
357
    local invSinTheta = 1 / math.sin(theta)
358
    startInterp = math.sin((t - 1) * theta) * invSinTheta
359
    finishInterp = math.sin(t * theta) * invSinTheta
360
  else
361
    startInterp = t - 1
362
    finishInterp = t
363
  end
364
  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
365
end
366
function rayCast(Pos, Dir, Max, Ignore)
367
  return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
368
end
369
function newPart(par, brick, transp, anch, canc, size, name, mat, cfra)
370
  local p = Instance.new("Part")
371
  p.BrickColor = brick
372
  p.Transparency = transp
373
  p.Material = mat and mat or "SmoothPlastic"
374
  p.Anchored = anch
375
  p.CanCollide = canc
376
  p.Size = size
377
  p.TopSurface, p.BottomSurface, p.LeftSurface, p.RightSurface, p.FrontSurface, p.BackSurface = 10, 10, 10, 10, 10, 10
378
  p.Name = name
379
  p.CFrame = cfra or RootPart.CFrame
380
  p.Parent = par
381
  return p
382
end
383
function mesh(Mesh, part, meshtype, meshid, offset, scale)
384
  local mesh = Instance.new(Mesh)
385
  mesh.Parent = part
386
  if Mesh == "SpecialMesh" then
387
    mesh.MeshType = meshtype
388
    if meshid then
389
      mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid
390
    end
391
  end
392
  if offset then
393
    mesh.Offset = offset
394
  end
395
  mesh.Scale = scale
396
  return mesh
397
end
398
function weld(parent, part0, part1, c0, c1)
399
  local weld = Instance.new("Weld")
400
  weld.Parent = parent
401
  weld.Part0 = part0
402
  weld.Part1 = part1
403
  weld.C0 = c0
404
  if c1 then
405
    weld.C1 = c1
406
  end
407
  return weld
408
end
409
function sound(id, par, vol, dur, pit)
410
  coroutine.resume(coroutine.create(function()
411
    local sou = Instance.new("Sound", par or workspace)
412
    sou.Volume = vol
413
    sou.Pitch = pit or 1
414
    sou.SoundId = "http://www.roblox.com/asset/?id=" .. id
415
    swait()
416
    sou:play()
417
    wait(dur)
418
    sou:Destroy()
419
  end))
420
end
421
function round(num)
422
  local a, b = math.modf(num)
423
  if num % 1 ~= 0 then
424
    return math.floor(num) + math.floor(b * 10 + 0.5) / 10
425
  else
426
    return math.floor(num)
427
  end
428
end
429
function findCloseHumanoid(centre, distance)
430
  local tab = {}
431
  for _, child in pairs(game.Workspace:GetChildren()) do
432
    if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= Humanoid and child:findFirstChild("Torso") then
433
      local vtors = child.Torso
434
      local mag = math.abs((vtors.Position - centre).magnitude)
435
      if distance >= mag then
436
        table.insert(tab, child.Humanoid)
437
      end
438
    end
439
  end
440
  return tab
441
end
442
function basicDamage(vhum, damage, colour)
443
  if not vhum or not vhum.Parent:findFirstChild("Humanoid") or vhum.Health <= 0 then
444
    return
445
  end
446
  vhum.Health = vhum.Health - damage
447
  local damagepart = Instance.new("Part", Effects)
448
  damagepart.Transparency = 1
449
  damagepart.Anchored = true
450
  damagepart.CanCollide = false
451
  damagepart.Size = Vector3.new(1, 1, 1)
452
  damagepart.Name = "DamagePart"
453
  damagepart.CFrame = vhum.Parent.Head.CFrame * CFrame.new(0, 1, 0)
454
  local g = Instance.new("BillboardGui", damagepart)
455
  g.Enabled = true
456
  g.Adornee = damagepart
457
  g.Size = UDim2.new(5, 0, 5, 0)
458
  g.ExtentsOffset = Vector3.new(0, 0, 0)
459
  g.StudsOffset = Vector3.new(0, 0, 0)
460
  local t = Instance.new("TextLabel", g)
461
  t.BackgroundTransparency = 1
462
  t.Font = "ArialBold"
463
  t.TextSize = 24
464
  t.Text = "-" .. round(damage)
465
  if round(damage) % 1 == 0 then
466
    t.Text = "-" .. round(damage) .. ".0"
467
  end
468
  t.Size = UDim2.new(1, 0, 1, 0)
469
  t.TextStrokeTransparency = 0
470
  t.TextTransparency = 0
471
  t.TextScaled = true
472
  t.TextWrapped = true
473
  t.TextXAlignment = "Center"
474
  t.TextYAlignment = "Center"
475
  t.TextColor3 = colour
476
  coroutine.resume(coroutine.create(function()
477
    for i = 1, 50 do
478
      game:GetService("RunService").Heartbeat:wait()
479
      local sinewave = math.sin(i / 500) * 4
480
      damagepart.CFrame = damagepart.CFrame * CFrame.new(Vector3.new(0, 0.3 - sinewave, 0))
481
      t.TextTransparency = t.TextTransparency + 0.02
482
      t.TextStrokeTransparency = t.TextTransparency + 0.02
483
    end
484
    damagepart:Destroy()
485
  end), t)
486
end
487
function createBodyTrail()
488
  local nPart = function(parent, brickcolor, transparency, anchored, cancollide, size, name)
489
    local fp = Instance.new("Part")
490
    fp.Parent = parent
491
    fp.Transparency = transparency
492
    fp.Anchored = anchored
493
    fp.CanCollide = cancollide
494
    fp.Locked = true
495
    fp.BrickColor = BrickColor.new(brickcolor)
496
    fp.Name = name
497
    fp.Size = size
498
    fp.Position = RootPart.Position
499
    fp.TopSurface, fp.BottomSurface, fp.LeftSurface, fp.RightSurface, fp.FrontSurface, fp.BackSurface = 10, 10, 10, 10, 10, 10
500
    fp.Material = "SmoothPlastic"
501
    fp:BreakJoints()
502
    return fp
503
  end
504
  local faketab = {}
505
  local fakel = nPart(Effects, Character["Right Arm"].BrickColor.Color, 0, true, false, Character["Right Arm"].Size, "")
506
  local faker = nPart(Effects, Character["Left Arm"].BrickColor.Color, 0, true, false, Character["Left Arm"].Size, "")
507
  local fakell = nPart(Effects, Character["Left Leg"].BrickColor.Color, 0, true, false, Character["Left Leg"].Size, "")
508
  local fakerl = nPart(Effects, Character["Right Leg"].BrickColor.Color, 0, true, false, Character["Right Leg"].Size, "")
509
  local faketors = nPart(Effects, Character.Torso.BrickColor.Color, 0, true, false, Character.Torso.Size, "")
510
  local fakehead = nPart(Effects, Character.Head.BrickColor.Color, 0, true, false, Character.Head.Size, "")
511
  fakel.BrickColor = BrickColor.new("Fog")
512
  faker.BrickColor = BrickColor.new("Fog")
513
  fakell.BrickColor = BrickColor.new("Fog")
514
  fakerl.BrickColor = BrickColor.new("Fog")
515
  faketors.BrickColor = BrickColor.new("Fog")
516
  fakehead.BrickColor = BrickColor.new("Fog")
517
  if Character.Head:findFirstChild("Mesh") then
518
    Character.Head.Mesh:Clone().Parent = fakehead
519
  end
520
  fakel.Name = "FakeLeft"
521
  faker.Name = "FakeRight"
522
  fakell.Name = "FakeLeftL"
523
  fakerl.Name = "FakeRightL"
524
  faketors.Name = "FakeTorso"
525
  fakehead.Name = "FakeHead"
526
  table.insert(faketab, fakel)
527
  table.insert(faketab, faker)
528
  table.insert(faketab, fakell)
529
  table.insert(faketab, fakerl)
530
  table.insert(faketab, faketors)
531
  table.insert(faketab, fakehead)
532
  for _, v in pairs(faketab) do
533
    v.Archivable = true
534
    v.CanCollide = false
535
    v.Anchored = true
536
    v.Material = "SmoothPlastic"
537
    v.Transparency = 0.2
538
    v.Locked = true
539
    game.Debris:AddItem(v, 3)
540
  end
541
  fakel.CFrame = Character["Left Arm"].CFrame
542
  faker.CFrame = Character["Right Arm"].CFrame
543
  fakell.CFrame = Character["Left Leg"].CFrame
544
  fakerl.CFrame = Character["Right Leg"].CFrame
545
  faketors.CFrame = Character.Torso.CFrame
546
  fakehead.CFrame = Character.Head.CFrame
547
  local hats = {}
548
  for _, v in pairs(hats) do
549
    if v:findFirstChild("Handle") then
550
      do
551
        local vc = v.Handle:Clone()
552
        vc.Parent = Effects
553
        vc.CFrame = v.Handle.CFrame
554
        vc.Anchored = true
555
        vc.CanCollide = false
556
        thread(function()
557
          for i = 1, 15 do
558
            swait()
559
            vc.Transparency = vc.Transparency + 0.06666666666666667
560
          end
561
          vc:Destroy()
562
        end)
563
      end
564
    end
565
  end
566
  return faketors, fakehead, faker, fakel, fakerl, fakell
567
end
568
function magic(type, thing)
569
  local magicBlock = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay, t)
570
    local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
571
    prt.CFrame = cframe
572
    local msh = mesh("BlockMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
573
    game:GetService("Debris"):AddItem(prt, 8)
574
    if t == 1 or t == nil then
575
      table.insert(partEffects, {
576
        prt,
577
        "Block1",
578
        delay,
579
        x3,
580
        y3,
581
        z3,
582
        msh
583
      })
584
    elseif t == 2 then
585
      table.insert(partEffects, {
586
        prt,
587
        "Block2",
588
        delay,
589
        x3,
590
        y3,
591
        z3,
592
        msh
593
      })
594
    end
595
  end
596
  local magicCylinder = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
597
    local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
598
    local msh = mesh("CylinderMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
599
    game:GetService("Debris"):AddItem(prt, 8)
600
    table.insert(partEffects, {
601
      prt,
602
      "Cylinder",
603
      delay,
604
      x3,
605
      y3,
606
      z3,
607
      msh
608
    })
609
  end
610
  local magicSphere = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
611
    local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
612
    local msh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
613
    game:GetService("Debris"):AddItem(prt, 8)
614
    table.insert(partEffects, {
615
      prt,
616
      "Cylinder",
617
      delay,
618
      x3,
619
      y3,
620
      z3,
621
      msh
622
    })
623
  end
624
  local magicRing = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
625
    local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe)
626
    prt.Anchored = true
627
    prt.CFrame = cframe
628
    local msh = mesh("SpecialMesh", prt, "FileMesh", 3270017, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
629
    game:GetService("Debris"):AddItem(prt, 2)
630
    coroutine.resume(coroutine.create(function(Part, Mesh, num)
631
      for i = 0, 1, delay do
632
        swait()
633
        Part.Transparency = i
634
        Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3)
635
      end
636
      Part:Destroy()
637
    end), prt, msh, (math.random(0, 1) + math.random()) / 5)
638
  end
639
  local magicSlash = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay)
640
    local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", cframe)
641
    prt.Anchored = true
642
    prt.CFrame = cframe
643
    local msh = mesh("SpecialMesh", prt, "FileMesh", 20329976, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
644
    game:GetService("Debris"):AddItem(prt, 2)
645
    coroutine.resume(coroutine.create(function(Part, Mesh, num)
646
      for i = 0, 1, delay do
647
        swait()
648
        Part.Transparency = i
649
        Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3)
650
      end
651
      Part:Destroy()
652
    end), prt, msh, (math.random(0, 1) + math.random()) / 5)
653
  end
654
  local par = thing[1]
655
  local brick = thing[2]
656
  local cframe = thing[3]
657
  local x1 = thing[4]
658
  local y1 = thing[5]
659
  local z1 = thing[6]
660
  local x3 = thing[7]
661
  local y3 = thing[8]
662
  local z3 = thing[9]
663
  local delay = thing[10]
664
  local t = thing[11]
665
  if type == "Block" or type == 1 then
666
    magicBlock(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
667
  elseif type == "Cylinder" or type == 2 then
668
    magicCylinder(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
669
  elseif type == "Sphere" or type == 3 then
670
    magicSphere(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
671
  elseif type == "Ring" or type == 4 then
672
    magicRing(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
673
  elseif type == "Slash" or type == 5 then
674
    magicSlash(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11])
675
  end
676
end
677
function newFrame(par, bg, transp, size, pos, name)
678
  local f = Instance.new("Frame", nil)
679
  f.BackgroundColor3 = bg
680
  f.BackgroundTransparency = transp
681
  f.BorderSizePixel = 0
682
  f.Position = pos
683
  f.Size = size
684
  f.Name = name
685
  f.Parent = par
686
  return f
687
end
688
function newLabel(par, size, pos, text, textsize, text3, textstroke3, scaled, name)
689
  local l = Instance.new("TextLabel", nil)
690
  l.BackgroundTransparency = 1
691
  l.Size = size
692
  l.Position = pos
693
  l.Text = text
694
  l.TextSize = textsize
695
  l.TextColor3 = text3
696
  l.TextStrokeColor3 = textstroke3
697
  if scaled then
698
    l.TextScaled = scaled
699
  else
700
    l.TextScaled = true
701
  end
702
  l.TextStrokeTransparency = 0
703
  l.Name = name
704
  l.Parent = par
705
  return l
706
end
707
a1t = "Misdirection"
708
a2t = "Marionette"
709
a3t = "Luna Clock"
710
a4t = "Clock Corpse"
711
backc3 = c3(210, 210, 255)
712
reloc3 = c3(107, 107, 210)
713
g = Instance.new("ScreenGui")
714
f1 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.85, 0), "")
715
f2 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.76, 0), "")
716
f3 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.67, 0), "")
717
f4 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.58, 0), "")
718
newFrame(f1, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
719
newFrame(f2, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
720
newFrame(f3, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
721
newFrame(f4, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload")
722
newLabel(f1, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(Z)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
723
newLabel(f2, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(X)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
724
newLabel(f3, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(C)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
725
newLabel(f4, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(V)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key")
726
newLabel(f1, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a1t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
727
newLabel(f2, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a2t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
728
newLabel(f3, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a3t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
729
newLabel(f4, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a4t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label")
730
g.Parent = Player.PlayerGui
731
Reload = {}
732
Reload[1] = f1.Reload
733
Reload[2] = f2.Reload
734
Reload[3] = f3.Reload
735
Reload[4] = f4.Reload
736
function newKnife()
737
  local weapon = Instance.new("Model", Character)
738
  weapon.Name = "Izayoi"
739
  local p0 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Wedge")
740
  mesh("SpecialMesh", p0, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.400000036, 0.550000012, 1.29999995))
741
  local p1 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Block")
742
  mesh("BlockMesh", p1, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.400000095, 0.749999881, 0.699999988))
743
  local p2 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Block")
744
  mesh("BlockMesh", p2, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.400000095, 0.749999881, 0.699999869))
745
  local p3 = newPart(weapon, BrickColor.new("Lily white"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Blade")
746
  mesh("BlockMesh", p3, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.349999994, 5.45000029, 0.999999881))
747
  local p4 = newPart(weapon, BrickColor.new("Lily white"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Wedge")
748
  mesh("SpecialMesh", p4, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.350000024, 3.9000001, 1.05000007))
749
  local p5 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Wedge")
750
  mesh("SpecialMesh", p5, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.400000066, 0.550000012, 1.29999995))
751
  local p6 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Handle")
752
  mesh("BlockMesh", p6, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.400000036, 3.5999999, 0.699999928))
753
  local p7 = newPart(weapon, BrickColor.new("Black"), 0, false, false, Vector3.new(0.200000003, 0.200000003, 0.200000003), "Block")
754
  mesh("BlockMesh", p7, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.449999988, 0.349999994, 2.29999971))
755
  weld(p0, p0, p1, CFrame.new(-30.2999763, 2.48997641, 28.180027, 1, 0, 0, 0, 1, -4.37113883E-8, 0, 4.37113883E-8, 1), CFrame.new(30.2999763, 16.1993866, -23.0049038, -1, 0, 0, 0, 0.866025388, 0.49999997, 0, 0.49999997, -0.866025388))
756
  weld(p1, p1, p2, CFrame.new(30.2999763, 16.1993866, -23.0049038, -1, 0, 0, 0, 0.866025388, 0.49999997, 0, 0.49999997, -0.866025388), CFrame.new(30.2999763, 11.7913561, 25.5498791, -1, 0, 0, 0, -0.866025269, 0.49999997, 0, 0.49999997, 0.866025269))
757
  weld(p2, p2, p3, CFrame.new(30.2999763, 11.7913561, 25.5498791, -1, 0, 0, 0, -0.866025269, 0.49999997, 0, 0.49999997, 0.866025269), CFrame.new(30.2999763, 26.6550255, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0))
758
  weld(p3, p3, p4, CFrame.new(30.2999763, 26.6550255, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0), CFrame.new(30.2999763, 25.7200241, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0))
759
  weld(p4, p4, p5, CFrame.new(30.2999763, 25.7200241, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0), CFrame.new(30.2999763, -2.59997678, 28.180027, -1, 8.74227766E-8, 0, -8.74227766E-8, -1, -4.37113883E-8, -3.82137093E-15, -4.37113883E-8, 1))
760
  weld(p5, p5, p6, CFrame.new(30.2999763, -2.59997678, 28.180027, -1, 8.74227766E-8, 0, -8.74227766E-8, -1, -4.37113883E-8, -3.82137093E-15, -4.37113883E-8, 1), CFrame.new(30.2999763, 27.6200256, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0))
761
  weld(p6, p6, p7, CFrame.new(30.2999763, 27.6200256, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0), CFrame.new(30.2999763, 27.2300262, 2.5449779, -1, 0, 0, 0, 0, 1, 0, 1, 0))
762
  return weapon, p6, p3
763
end
764
knife1, blade1, handle1 = newKnife()
765
handleweld1 = Instance.new("Weld", RightArm)
766
handleweld1.Part1 = RightArm
767
handleweld1.Part0 = handle1
768
handle1c0 = CFrame.new(0.2, 0.95, 0) * CFrame.Angles(math.rad(85), math.rad(180), 0)
769
handle1c1 = CFrame.new(0, -0.95, 0)
770
handleweld1.C0 = handle1c0
771
handleweld1.C1 = handle1c1
772
knife2, blade2, handle2 = newKnife()
773
handleweld2 = Instance.new("Weld", RightArm)
774
handleweld2.Part1 = RightArm
775
handleweld2.Part0 = handle2
776
handle2c0 = CFrame.new(0, 0.9, 0.15) * CFrame.Angles(math.rad(55), math.rad(180), 0)
777
handle2c1 = CFrame.new(0, -0.9, 0)
778
handleweld2.C0 = handle2c0
779
handleweld2.C1 = handle2c1
780
knife3, blade3, handle3 = newKnife()
781
handleweld3 = Instance.new("Weld", RightArm)
782
handleweld3.Part1 = RightArm
783
handleweld3.Part0 = handle3
784
handle3c0 = CFrame.new(-0.2, 0.9, 0.3) * CFrame.Angles(math.rad(25), math.rad(180), 0)
785
handle3c1 = CFrame.new(0, -0.9, 0)
786
handleweld3.C0 = handle3c0
787
handleweld3.C1 = handle3c1
788
function teleport(k)
789
  local a, b, c, d, e, f = createBodyTrail()
790
  table.insert(partEffects, {
791
    a,
792
    "Disappear",
793
    0.05
794
  })
795
  table.insert(partEffects, {
796
    b,
797
    "Disappear",
798
    0.05
799
  })
800
  table.insert(partEffects, {
801
    c,
802
    "Disappear",
803
    0.05
804
  })
805
  table.insert(partEffects, {
806
    d,
807
    "Disappear",
808
    0.05
809
  })
810
  table.insert(partEffects, {
811
    e,
812
    "Disappear",
813
    0.05
814
  })
815
  table.insert(partEffects, {
816
    f,
817
    "Disappear",
818
    0.05
819
  })
820
  local unit = (RootPart.Velocity * Vector3.new(1, 0, 1)).unit
821
  if k == "e" then
822
  elseif k == "q" then
823
    unit = -unit
824
  end
825
  local velocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
826
  local hit, pos = rayCast(RootPart.Position, unit, 15, Character)
827
  if velocity <= 2 then
828
    unit = RootPart.CFrame.lookVector
829
    if k == "q" then
830
      unit = RootPart.CFrame.lookVector * -1
831
    end
832
  end
833
  if pos then
834
    if hit then
835
      if hit.Parent:findFirstChild("Humanoid") then
836
        RootPart.CFrame = CFrame.new(RootPart.CFrame.p + unit * 20)
837
      else
838
        if hit.Parent:IsA("Model") and hit.Parent.Parent:findFirstChild("Humanoid") then
839
          RootPart.CFrame = CFrame.new(RootPart.CFrame.p + unit * 20)
840
        end
841
        RootPart.CFrame = CFrame.new(pos)
842
      end
843
    else
844
      RootPart.CFrame = CFrame.new(RootPart.CFrame.p + unit * 20)
845
    end
846
  end
847
end
848
function attackone()
849
  attacking = true
850
  cloak("Uncloak")
851
  for i = 0, 1, 0.1 do
852
    swait()
853
    Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(8), 0, math.rad(-70)), 0.3)
854
    RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.1 * math.cos(sine / 25)) * CFrame.Angles(0, 0, math.rad(70)), 0.3)
855
    RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.3 - 0.1 * math.cos(sine / 15), -0.6) * CFrame.Angles(math.rad(80), 0, math.rad(-50)), 0.3)
856
    LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 15), 0.2) * CFrame.Angles(math.rad(15), math.rad(10), math.rad(-10)), 0.3)
857
    RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.3)
858
    LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.3)
859
    RH.C0 = clerp(RH.C0, CFrame.new(1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(0), math.rad(90) - math.rad(10), math.rad(5)), 0.3)
860
    LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(0), -math.rad(90) - math.rad(10), math.rad(5)), 0.3)
861
    handleweld1.C0 = clerp(handleweld1.C0, handle1c0, 0.3)
862
    handleweld2.C0 = clerp(handleweld2.C0, handle2c0, 0.3)
863
    handleweld3.C0 = clerp(handleweld3.C0, handle3c0, 0.3)
864
  end
865
  local dir1 = (RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(45)), 0, math.sin(math.rad(45)))).unit
866
  local dir2 = RootPart.CFrame.lookVector
867
  local dir3 = (RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(-45)), 0, math.sin(math.rad(-45)))).unit
868
  local throwknife1 = newKnife()
869
  throwknife1.Handle.CFrame = CFrame.new(RootPart.CFrame.p, RootPart.CFrame.p + dir1) * CFrame.Angles(math.rad(-90), 0, 0)
870
  local bv1 = Instance.new("BodyVelocity", throwknife1.Handle)
871
  bv1.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
872
  bv1.Velocity = dir1 * 30
873
  local throwknife2 = newKnife()
874
  throwknife2.Handle.CFrame = CFrame.new(RootPart.CFrame.p, RootPart.CFrame.p + dir2) * CFrame.Angles(math.rad(-90), 0, 0)
875
  local bv2 = Instance.new("BodyVelocity", throwknife2.Handle)
876
  bv2.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
877
  bv2.Velocity = dir2 * 30
878
  local throwknife3 = newKnife()
879
  throwknife3.Handle.CFrame = CFrame.new(RootPart.CFrame.p, RootPart.CFrame.p + dir3) * CFrame.Angles(math.rad(-90), 0, 0)
880
  local bv3 = Instance.new("BodyVelocity", throwknife3.Handle)
881
  bv3.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
882
  bv3.Velocity = dir3 * 30
883
  thread(function()
884
    while throwknife1.Parent ~= Effects do
885
      swait()
886
      local hit1, pos1
887
      if throwknife1:findFirstChild("Blade") then
888
        hit1, pos1 = rayCast(throwknife1.Blade.Position, dir1, 1, Character)
889
      end
890
      if hit1 and pos1 then
891
        local w = weld(hit1, throwknife1.Blade, hit1, throwknife1.Blade.CFrame:toObjectSpace(hit1.CFrame))
892
        bv1:Destroy()
893
        if hit1.Parent:findFirstChild("Humanoid") then
894
          basicDamage(hit1.Parent.Humanoid, 5, BrickColor.new("Fog").Color)
895
        end
896
        break
897
      end
898
    end
899
  end)
900
  thread(function()
901
    while throwknife2.Parent ~= Effects do
902
      swait()
903
      local hit1, pos1
904
      if throwknife2:findFirstChild("Blade") then
905
        hit1, pos1 = rayCast(throwknife2.Blade.Position, dir2, 1, Character)
906
      end
907
      if hit1 and pos1 then
908
        local w = weld(hit1, throwknife2.Blade, hit1, throwknife2.Blade.CFrame:toObjectSpace(hit1.CFrame))
909
        bv2:Destroy()
910
        if hit1.Parent:findFirstChild("Humanoid") then
911
          basicDamage(hit1.Parent.Humanoid, 5, BrickColor.new("Fog").Color)
912
        end
913
        break
914
      end
915
    end
916
  end)
917
  thread(function()
918
    while throwknife3.Parent ~= Effects do
919
      swait()
920
      local hit1, pos1
921
      if throwknife3:findFirstChild("Blade") then
922
        hit1, pos1 = rayCast(throwknife3.Blade.Position, dir3, 1, Character)
923
      end
924
      if hit1 and pos1 then
925
        local w = weld(hit1, throwknife3.Blade, hit1, throwknife3.Blade.CFrame:toObjectSpace(hit1.CFrame))
926
        bv3:Destroy()
927
        if hit1.Parent:findFirstChild("Humanoid") then
928
          basicDamage(hit1.Parent.Humanoid, 5, BrickColor.new("Fog").Color)
929
        end
930
        break
931
      end
932
    end
933
  end)
934
  delay(10, function()
935
    if throwknife1 then
936
      throwknife1:Destroy()
937
    end
938
    if throwknife2 then
939
      throwknife2:Destroy()
940
    end
941
    if throwknife3 then
942
      throwknife3:Destroy()
943
    end
944
  end)
945
  cloak("Cloak")
946
  for i = 0, 1, 0.1 do
947
    swait()
948
    Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(8), math.rad(0), math.rad(0)), 0.3)
949
    RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(0.2, math.rad(0), math.rad(0)), 0.3)
950
    RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(90)), 0.3)
951
    LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.3)
952
    RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.3)
953
    LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.3)
954
    RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.3)
955
    LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.3)
956
  end
957
  attacking = false
958
end
959
function attacktwo()
960
  attackone()
961
end
962
function attackthree()
963
  attackone()
964
end
965
function mouse1d()
966
  if tool.Active == false then
967
    return
968
  end
969
  if attacking == false and attackcounter == 1 then
970
    attackcounter = 2
971
    attackone()
972
  elseif attacking == false and attackcounter == 2 then
973
    attackcounter = 3
974
    attacktwo()
975
  elseif attacking == false and attackcounter == 3 then
976
    attackcounter = 1
977
    attackthree()
978
  end
979
end
980
function key(k)
981
  if tool.Active == false then
982
    return
983
  end
984
  k = k:lower()
985
  if attacking == false and k == "z" and AttackHas[1] >= AttackNeeded[1] then
986
  elseif attacking == false and k == "x" and AttackHas[2] >= AttackNeeded[2] then
987
  elseif attacking == false and k == "c" and AttackHas[3] >= AttackNeeded[3] then
988
  elseif attacking == false and k == "v" and AttackHas[4] >= AttackNeeded[4] then
989
  elseif k == "e" then
990
    teleport("e")
991
  elseif k == "q" then
992
    teleport("q")
993
  end
994
end
995
mouse.Button1Down:connect(mouse1d)
996
mouse.KeyDown:connect(key)
997
cloaked = false
998
function cloak(t)
999
  if t == "Cloak" then
1000
    if cloaked == true then
1001
      return
1002
    end
1003
    cloaked = true
1004
    magic("Sphere", {
1005
      Effects,
1006
      BrickColor.new("Fog"),
1007
      handle1.CFrame,
1008
      0.5,
1009
      0.5,
1010
      0.5,
1011
      1,
1012
      2,
1013
      1,
1014
      0.1
1015
    })
1016
    magic("Sphere", {
1017
      Effects,
1018
      BrickColor.new("Fog"),
1019
      handle2.CFrame,
1020
      0.5,
1021
      0.5,
1022
      0.5,
1023
      1,
1024
      2,
1025
      1,
1026
      0.1
1027
    })
1028
    magic("Sphere", {
1029
      Effects,
1030
      BrickColor.new("Fog"),
1031
      handle3.CFrame,
1032
      0.5,
1033
      0.5,
1034
      0.5,
1035
      1,
1036
      2,
1037
      1,
1038
      0.1
1039
    })
1040
    for i, v in pairs(knife1:GetChildren()) do
1041
      v.Transparency = 1
1042
    end
1043
    for i, v in pairs(knife2:GetChildren()) do
1044
      v.Transparency = 1
1045
    end
1046
    for i, v in pairs(knife3:GetChildren()) do
1047
      v.Transparency = 1
1048
    end
1049
    handleweld1.C0 = CFrame.new(0, -0.9, 0)
1050
    handleweld2.C0 = CFrame.new(0, -0.9, 0)
1051
    handleweld3.C0 = CFrame.new(0, -0.9, 0)
1052
  elseif t == "Uncloak" then
1053
    if cloaked == false then
1054
      return
1055
    end
1056
    cloaked = false
1057
    for i, v in pairs(knife1:GetChildren()) do
1058
      v.Transparency = 0
1059
    end
1060
    for i, v in pairs(knife2:GetChildren()) do
1061
      v.Transparency = 0
1062
    end
1063
    for i, v in pairs(knife3:GetChildren()) do
1064
      v.Transparency = 0
1065
    end
1066
  end
1067
end
1068
thread(function()
1069
  while true do
1070
    swait()
1071
    torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
1072
    hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
1073
    sine = sine + 1
1074
    if AttackHas[1] < AttackNeeded[1] and AttackCan[1] == true then
1075
      AttackHas[1] = AttackHas[1] + 0.03
1076
    end
1077
    if AttackHas[2] < AttackNeeded[2] and AttackCan[2] == true then
1078
      AttackHas[2] = AttackHas[2] + 0.03
1079
    end
1080
    if AttackHas[3] < AttackNeeded[3] and AttackCan[3] == true then
1081
      AttackHas[3] = AttackHas[3] + 0.03
1082
    end
1083
    if AttackHas[4] < AttackNeeded[4] and AttackCan[4] == true then
1084
      AttackHas[4] = AttackHas[4] + 0.03
1085
    end
1086
    Reload[1]:TweenSize(UDim2.new(AttackHas[1] / AttackNeeded[1], 0, 1, 0), nil, 1, 0.4)
1087
    Reload[2]:TweenSize(UDim2.new(AttackHas[2] / AttackNeeded[2], 0, 1, 0), nil, 1, 0.4)
1088
    Reload[3]:TweenSize(UDim2.new(AttackHas[3] / AttackNeeded[3], 0, 1, 0), nil, 1, 0.4)
1089
    Reload[4]:TweenSize(UDim2.new(AttackHas[4] / AttackNeeded[4], 0, 1, 0), nil, 1, 0.4)
1090
    if 1 < RootPart.Velocity.y and hitfloor == nil then
1091
      if attacking == false then
1092
        Anim = "Jump"
1093
        Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.1)
1094
        LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2)
1095
        LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
1096
        RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2)
1097
        RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
1098
        RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2)
1099
        RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.2)
1100
        LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.2)
1101
        cloak("Cloak")
1102
      end
1103
    elseif RootPart.Velocity.y < -1 and hitfloor == nil then
1104
      if attacking == false then
1105
        Anim = "Fall"
1106
        Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(23), 0, 0), 0.2)
1107
        RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2)
1108
        RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2)
1109
        RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
1110
        LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2)
1111
        LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2)
1112
        RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(24), math.rad(90), 0), 0.2)
1113
        LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(-12), -math.rad(90), 0), 0.2)
1114
      end
1115
    elseif torvel < 1 and hitfloor ~= nil then
1116
      if attacking == false then
1117
        Anim = "Idle"
1118
        Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(8), 0, math.rad(-25)), 0.1)
1119
        RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.1 * math.cos(sine / 25)) * CFrame.Angles(0, 0, math.rad(25)), 0.1)
1120
        RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.3 - 0.1 * math.cos(sine / 15), -0.6) * CFrame.Angles(math.rad(70), 0, math.rad(-45)), 0.2)
1121
        LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 15), 0.2) * CFrame.Angles(math.rad(15), math.rad(10), math.rad(-10)), 0.2)
1122
        RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
1123
        LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
1124
        RH.C0 = clerp(RH.C0, CFrame.new(1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(0), math.rad(90) - math.rad(10), math.rad(5)), 0.2)
1125
        LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(0), -math.rad(90) - math.rad(10), math.rad(5)), 0.2)
1126
        cloak("Uncloak")
1127
        handleweld1.C0 = clerp(handleweld1.C0, handle1c0, 0.2)
1128
        handleweld2.C0 = clerp(handleweld2.C0, handle2c0, 0.2)
1129
        handleweld3.C0 = clerp(handleweld3.C0, handle3c0, 0.2)
1130
      end
1131
    elseif torvel > 2 and hitfloor ~= nil and attacking == false then
1132
      Anim = "Walk"
1133
      Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(8), 0, math.rad(-25)), 0.1)
1134
      RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.1 * math.cos(sine / 25)) * CFrame.Angles(0.1, 0, math.rad(25)), 0.1)
1135
      RW.C0 = clerp(RW.C0, CFrame.new(1.1, 0.3 - 0.1 * math.cos(sine / 15), -0.6) * CFrame.Angles(math.rad(90), 0, math.rad(-50)), 0.2)
1136
      LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 15), 0.2) * CFrame.Angles(math.rad(15), math.rad(10), math.rad(-10)), 0.2)
1137
      RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
1138
      LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2)
1139
      RH.C0 = clerp(RH.C0, CFrame.new(1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(math.cos(sine * 1.2 / 8), math.rad(90) - math.rad(10), math.rad(5)), 0.2)
1140
      LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.1 * math.cos(sine / 25), 0) * CFrame.Angles(-math.cos(sine * 1.2 / 8), -math.rad(90) - math.rad(10), math.rad(5)), 0.2)
1141
      cloak("Uncloak")
1142
      handleweld1.C0 = clerp(handleweld1.C0, CFrame.new(0.2, 0.95, 0) * CFrame.Angles(math.rad(80), math.rad(180), 0), 0.2)
1143
      handleweld2.C0 = clerp(handleweld2.C0, CFrame.new(0, 0.95, 0.15) * CFrame.Angles(math.rad(50), math.rad(180), 0), 0.2)
1144
      handleweld3.C0 = clerp(handleweld3.C0, CFrame.new(-0.2, 0.9, 0.3) * CFrame.Angles(math.rad(20), math.rad(180), 0), 0.2)
1145
    end
1146
    if 0 < #partEffects then
1147
      for e = 1, #partEffects do
1148
        if partEffects[e] ~= nil then
1149
          local Thing = partEffects[e]
1150
          if Thing ~= nil then
1151
            local Part = Thing[1]
1152
            local Mode = Thing[2]
1153
            local Delay = Thing[3]
1154
            local IncX = Thing[4]
1155
            local IncY = Thing[5]
1156
            local IncZ = Thing[6]
1157
            if 1 >= Thing[1].Transparency then
1158
              if Thing[2] == "Block1" then
1159
                Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1160
                local Mesh = Thing[1].Mesh
1161
                Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1162
                Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1163
              elseif Thing[2] == "Block2" then
1164
                Thing[1].CFrame = Thing[1].CFrame
1165
                local Mesh = Thing[7]
1166
                Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1167
                Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1168
              elseif Thing[2] == "Cylinder" then
1169
                local Mesh = Thing[1].Mesh
1170
                Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1171
                Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1172
              elseif Thing[2] == "Blood" then
1173
                local Mesh = Thing[7]
1174
                Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
1175
                Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1176
                Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1177
              elseif Thing[2] == "Elec" then
1178
                local Mesh = Thing[1].Mesh
1179
                Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
1180
                Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1181
              elseif Thing[2] == "Disappear" then
1182
                Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1183
              elseif Thing[2] == "Shatter" then
1184
                Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1185
                Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
1186
                Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
1187
                Thing[6] = Thing[6] + Thing[5]
1188
              end
1189
            else
1190
              Part:Destroy()
1191
              table.remove(partEffects, e)
1192
            end
1193
          end
1194
        end
1195
      end
1196
    end
1197
  end
1198
end)