View difference between Paste ID: 5GFueTFy and 8b0yG47u
SHOW: | | - or go back to the newest paste.
1
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,game,owner = owner,game
4
local RealPlayer = Player
5
do
6
	print("FE Compatibility code V2 by Mokiros")
7
	local RealPlayer = RealPlayer
8
	script.Parent = RealPlayer.Character
9
10
	--Fake event to make stuff like Mouse.KeyDown work
11
	local Disconnect_Function = function(this)
12
		this[1].Functions[this[2]] = nil
13
	end
14
	local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
15
	local FakeEvent_Metatable = {__index={
16
		Connect = function(this,f)
17
			local i = tostring(math.random(0,10000))
18
			while this.Functions[i] do
19
				i = tostring(math.random(0,10000))
20
			end
21
			this.Functions[i] = f
22
			return setmetatable({this,i},Disconnect_Metatable)
23
		end
24
	}}
25
	FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
26
	local function fakeEvent()
27
		return setmetatable({Functions={}},FakeEvent_Metatable)
28
	end
29
30
	--Creating fake input objects with fake variables
31
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
32
    FakeMouse.keyUp = FakeMouse.KeyUp
33
    FakeMouse.keyDown = FakeMouse.KeyDown
34
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
35
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
36
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
37
	end}
38
	--Merged 2 functions into one by checking amount of arguments
39
	CAS.UnbindAction = CAS.BindAction
40
41
	--This function will trigger the events that have been :Connect()'ed
42
	local function TriggerEvent(self,ev,...)
43
		for _,f in pairs(self[ev].Functions) do
44
			f(...)
45
		end
46
	end
47
	FakeMouse.TriggerEvent = TriggerEvent
48
	UIS.TriggerEvent = TriggerEvent
49
50
	--Client communication
51
	local Event = Instance.new("RemoteEvent")
52
	Event.Name = "UserInput_Event"
53
	Event.OnServerEvent:Connect(function(plr,io)
54
	    if plr~=RealPlayer then return end
55
		FakeMouse.Target = io.Target
56
		FakeMouse.Hit = io.Hit
57
		if not io.isMouse then
58
			local b = io.UserInputState == Enum.UserInputState.Begin
59
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
60
				return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
61
			end
62
			if io.UserInputType == Enum.UserInputType.MouseButton2 then
63
				return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
64
			end
65
			for _,t in pairs(CAS.Actions) do
66
				for _,k in pairs(t.Keys) do
67
					if k==io.KeyCode then
68
						t.Function(t.Name,io.UserInputState,io)
69
					end
70
				end
71
			end
72
			FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
73
			UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
74
	    end
75
	end)
76
	Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
77
	local Mouse = owner:GetMouse()
78
	local UIS = game:GetService("UserInputService")
79
	local input = function(io,RobloxHandled)
80
		if RobloxHandled then return end
81
		--Since InputObject is a client-side instance, we create and pass table instead
82
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
83
	end
84
	UIS.InputBegan:Connect(input)
85
	UIS.InputEnded:Connect(input)
86
	local h,t
87
	--Give the server mouse data every second frame, but only if the values changed
88
	--If player is not moving their mouse, client won't fire events
89
	local HB = game:GetService("RunService").Heartbeat
90
	while true do
91
		if h~=Mouse.Hit or t~=Mouse.Target then
92
			h,t=Mouse.Hit,Mouse.Target
93
			Event:FireServer({isMouse=true,Target=t,Hit=h})
94
		end
95
		--Wait 2 frames
96
		for i=1,2 do
97
			HB:Wait()
98
		end
99
	end]==],script)
100
101
	----Sandboxed game object that allows the usage of client-side methods and services
102
	--Real game object
103
	local RealGame = game
104
105
	--Metatable for fake service
106
	local FakeService_Metatable = {
107
		__index = function(self,k)
108
			local s = rawget(self,"_RealService")
109
			if s then
110
				return typeof(s[k])=="function"
111
				and function(_,...)return s[k](s,...)end or s[k]
112
			end
113
		end,
114
		__newindex = function(self,k,v)
115
			local s = rawget(self,"_RealService")
116
			if s then s[k]=v end
117
		end
118
	}
119
	local function FakeService(t,RealService)
120
		t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
121
		return setmetatable(t,FakeService_Metatable)
122
	end
123
124
	--Fake game object
125
	local FakeGame = {
126
		GetService = function(self,s)
127
			return rawget(self,s) or RealGame:GetService(s)
128
		end,
129
		Players = FakeService({
130
			LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
131
		},"Players"),
132
		UserInputService = FakeService(UIS,"UserInputService"),
133
		ContextActionService = FakeService(CAS,"ContextActionService"),
134
		RunService = FakeService({
135
			_btrs = {},
136
			RenderStepped = RealGame:GetService("RunService").Heartbeat,
137
			BindToRenderStep = function(self,name,_,fun)
138
				self._btrs[name] = self.Heartbeat:Connect(fun)
139
			end,
140
			UnbindFromRenderStep = function(self,name)
141
				self._btrs[name]:Disconnect()
142
			end,
143
		},"RunService")
144
	}
145
	rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
146
	FakeGame.service = FakeGame.GetService
147
	FakeService(FakeGame,game)
148
	--Changing owner to fake player object to support owner:GetMouse()
149
	game,owner = FakeGame,FakeGame.Players.LocalPlayer
150
end
151
152
153
154
-- Fix By BonniekunG1s
155
  wait(0.016666666666666666)
156
  Effects = {}
157
  
158
local acos = math.acos
159
local sqrt = math.sqrt
160
local Vec3 = Vector3.new
161
local fromAxisAngle = CFrame.fromAxisAngle
162
163
local function toAxisAngle(CFr)
164
        local X,Y,Z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = CFr:components()
165
        local Angle = math.acos((R00+R11+R22-1)/2)
166
        local A = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
167
        A = A == 0 and 0.00001 or A
168
        local B = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
169
        B = B == 0 and 0.00001 or B
170
        local C = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
171
        C = C == 0 and 0.00001 or C
172
        local x = (R21-R12)/sqrt(A)
173
        local y = (R02-R20)/sqrt(B)
174
        local z = (R10-R01)/sqrt(C)
175
        return Vec3(x,y,z),Angle
176
end
177
178
function ApplyTrig(Num,Func)
179
        local Min,Max = Func(0),Func(1)
180
        local i = Func(Num)
181
        return (i-Min)/(Max-Min)
182
        --[[if Func == "sin" then
183
                return (math.sin((1-Num)*math.pi)+1)/2
184
        elseif Func == "cos" then
185
                return (math.cos((1-Num)*math.pi)+1)/2
186
        end]]
187
end
188
189
function LerpCFrame(CFrame1,CFrame2,Num)
190
        local Vec,Ang = toAxisAngle(CFrame1:inverse()*CFrame2)
191
        return CFrame1*fromAxisAngle(Vec,Ang*Num) + (CFrame2.p-CFrame1.p)*Num
192
end
193
194
function Crater(Torso,Radius)
195
        Spawn(function()
196
        local Ray = Ray.new(Torso.Position,Vector3.new(0,-1,0)*10)
197
        local Ignore = {}
198
        for i,v in pairs(game:GetService("Players"):GetPlayers()) do
199
                if v.Character ~= nil then
200
                        Ignore[#Ignore+1] = v.Character
201
                end
202
        end
203
        local Hit,Pos,SurfaceNorm = Workspace:FindPartOnRayWithIgnoreList(Ray,Ignore)
204
        if Hit == nil then return end
205
        local Parts = {}
206
        for i = 1,360,10 do
207
                local P = Instance.new("Part",Torso.Parent)
208
                P.Anchored = true
209
                P.FormFactor = "Custom"
210
                P.BrickColor = BrickColor.new("Really black")
211
                P.Material = "Neon"
212
                P.TopSurface = "Smooth"
213
                P.BottomSurface = "Smooth"
214
               	P.CanCollide = false
215
                P.Size = Vector3.new(5,10,10)*(math.random(80,100)/100)
216
                P.CFrame = ((CFrame.new(Pos,Pos+SurfaceNorm)*CFrame.Angles(math.rad(90),0,0))-Vector3.new(0,7,0))*CFrame.Angles(math.rad(math.random(-50,50)),math.rad(math.random(-50,50)),math.rad(math.random(-50,50)))
217
                Parts[#Parts+1] = {P,P.CFrame,((CFrame.new(Pos,Pos+SurfaceNorm)*CFrame.Angles(math.rad(90),0,0))-Vector3.new(0,1,0))*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,-Radius)*CFrame.Angles(math.rad(math.random(-50,-20)),math.rad(math.random(-15,15)),math.rad(math.random(-15,15))),P.Size}
218
                if math.random(0,5) == 0 then -- rubble
219
                        local P = Instance.new("Part",Torso.Parent)
220
                        P.Anchored = true
221
                        P.FormFactor = "Custom"
222
                        P.BrickColor = BrickColor.new("Really black")
223
                        P.Material = "Neon"
224
                        P.TopSurface = "Smooth"
225
                        P.BottomSurface = "Smooth"
226
                        P.CanCollide = false
227
                        P.Size = Vector3.new(2,2,2)*(math.random(80,100)/100)
228
                        P.CFrame = ((CFrame.new(Pos,Pos+SurfaceNorm)*CFrame.Angles(math.rad(90),0,0))-Vector3.new(0,2.5,0))*CFrame.Angles(math.rad(math.random(-50,50)),math.rad(math.random(-50,50)),math.rad(math.random(-50,50)))
229
                        Parts[#Parts+1] = {P,P.CFrame,(CFrame.new(Pos,Pos+SurfaceNorm)*CFrame.Angles(math.rad(90),0,0))*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,-Radius-8)*CFrame.Angles(math.rad(math.random(-90,90)),math.rad(math.random(-90,90)),math.rad(math.random(-90,90))),P.Size}
230
                end
231
        end
232
        for i = 0,1,0.05 do
233
                for i2,v in pairs(Parts) do
234
                        v[1].CFrame = LerpCFrame(v[2],v[3],ApplyTrig(i,math.cos))
235
                end
236
                wait(0.02)
237
        end
238
        for i,v in pairs(Parts) do
239
                if v[1].Size.X > 2.1 then
240
                        v[1].CFrame = v[1].CFrame+Vector3.new(0,2,0)
241
                end
242
                v[1].Anchored = false
243
        end
244
        for i = 0,1,0.05 do
245
                for i2,v in pairs(Parts) do
246
                        v[1].Transparency = i
247
                        if i == 1 then
248
                                v[1]:Destroy()
249
                        elseif i >= 0.25 then
250
                                v[1].CanCollide = false
251
                        end
252
                end
253
                wait(0.02)
254
        end
255
        Parts = nil
256
        end)
257
end
258
  local Player = game.Players.localPlayer
259
script.Parent = Player.PlayerGui
260
  local Character = Player.Character
261
  local Humanoid = Character.Humanoid
262
  local Mouse = Player:GetMouse()
263
  local LeftArm = Character["Left Arm"]
264
  local RightArm = Character["Right Arm"]
265
  local LeftLeg = Character["Left Leg"]
266
  local RightLeg = Character["Right Leg"]
267
  local Head = Character.Head
268
  local Torso = Character.Torso
269
  local Camera = game.Workspace.CurrentCamera
270
  local RootPart = Character.HumanoidRootPart
271
  local RootJoint = RootPart.RootJoint
272
  local attack = false
273
  local Anim = "Idle"
274
  local attacktype = 1
275
  local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
276
  local velocity = RootPart.Velocity.y
277
  local sine = 0
278
  local change = 1
279
  local Create = LoadLibrary("RbxUtility").Create
280
  Head.face:Destroy()
281
  Head.Transparency = 1
282
  local FakeHead = Head:Clone()
283
  FakeHead.Transparency = 0
284
  FakeHead.Size = Vector3.new(0.8,0.8,0.8)
285
local txt = Instance.new("BillboardGui", Character)
286
txt.Adornee = Character.Head
287
txt.Name = "Status"
288
txt.Size = UDim2.new(2, 0, 1.2, 0)
289
txt.StudsOffset = Vector3.new(-9, 8, 0)
290
local text = Instance.new("TextLabel", txt)
291
text.Size = UDim2.new(10, 0, 7, 0)
292
text.FontSize = "Size24"
293
text.TextScaled = true
294
text.TextTransparency = 0
295
text.BackgroundTransparency = 1 
296
text.TextTransparency = 0
297
text.TextStrokeTransparency = 0
298
text.Font = "Cartoon"
299
text.TextStrokeColor3 = BrickColor.new("White").Color
300
301
CV = "Maroon"
302
303
spawn(function()
304
	while wait() do
305
		for i,v in pairs(Character:GetChildren()) do
306
			if v:IsA'Part' then
307
				v.BrickColor = BrickColor.new("Really black")
308
			end
309
		end
310
	end
311
end)
312
313
local s = Instance.new("Sound",Character)
314
s.SoundId = "rbxassetid://145570864"
315
s.Looped = true
316
s.Volume = 0.5
317
s:Play()
318
319
eye2 = Instance.new("Part", Character)
320
eye2m = Instance.new("SpecialMesh", eye2)
321
ogsize = eye2m.Scale
322
323
v=Instance.new("Part")
324
v.Name = "ColorBrick"
325
v.Parent=Character
326
v.FormFactor="Symmetric"
327
v.Anchored=true
328
v.CanCollide=false
329
v.BottomSurface="Smooth"
330
v.TopSurface="Smooth"
331
v.Size=Vector3.new(10,5,3)
332
v.Transparency=1
333
v.CFrame=Character.Torso.CFrame
334
v.BrickColor=BrickColor.new(CV)
335
v.Transparency=1
336
text.TextColor3 = BrickColor.White().Color
337
v.Shape="Block"
338
text.Text = "Nomm"
339
  Humanoid.MaxHealth = 999e999
340
  local m = Create("Model")({
341
    Parent = Character,
342
    Name = "WeaponModel"
343
  })
344
  Humanoid.Animator.Parent = nil
345
  Character.Animate.Parent = nil
346
  local function newMotor(part0, part1, c0, c1)
347
    local w = Create("Motor")({
348
      Parent = part0,
349
      Part0 = part0,
350
      Part1 = part1,
351
      C0 = c0,
352
      C1 = c1
353
    })
354
    return w
355
  end
356
  function clerp(a, b, t)
357
    return a:lerp(b, t)
358
  end
359
  RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
360
  NeckCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
361
  local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
362
  local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
363
  local RH = newMotor(Torso, RightLeg, CFrame.new(0.5, -2, 0), CFrame.new(0, 0, 0))
364
  local LH = newMotor(Torso, LeftLeg, CFrame.new(-0.5, -2, 0), CFrame.new(0, 0, 0))
365
  RootJoint.C1 = CFrame.new(0, 0, 0)
366
  RootJoint.C0 = CFrame.new(0, 0, 0)
367
  Torso.Neck.C1 = CFrame.new(0, 0, 0)
368
  Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
369
  local rarmc1 = RW.C1
370
  local larmc1 = LW.C1
371
  local rlegc1 = RH.C1
372
  local llegc1 = LH.C1
373
  local resetc1 = false
374
  function PlayAnimationFromTable(table, speed, bool)
375
    RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
376
    Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
377
    RW.C0 = clerp(RW.C0, table[3], speed)
378
    LW.C0 = clerp(LW.C0, table[4], speed)
379
    RH.C0 = clerp(RH.C0, table[5], speed)
380
    LH.C0 = clerp(LH.C0, table[6], speed)
381
    if bool == true and resetc1 == false then
382
      resetc1 = true
383
      RootJoint.C1 = RootJoint.C1
384
      Torso.Neck.C1 = Torso.Neck.C1
385
      RW.C1 = rarmc1
386
      LW.C1 = larmc1
387
      RH.C1 = rlegc1
388
      LH.C1 = llegc1
389
    end
390
  end
391
  ArtificialHB = Create("BindableEvent", script)({Parent = script, Name = "Heartbeat"})
392
  script:WaitForChild("Heartbeat")
393
  frame = 0.03333333333333333
394
  tf = 0
395
  allowframeloss = false
396
  tossremainder = false
397
  lastframe = tick()
398
  script.Heartbeat:Fire()
399
  game:GetService("RunService").Heartbeat:connect(function(s, p)
400
    tf = tf + s
401
    if tf >= frame then
402
      if allowframeloss then
403
        script.Heartbeat:Fire()
404
        lastframe = tick()
405
      else
406
        for i = 1, math.floor(tf / frame) do
407
          script.Heartbeat:Fire()
408
        end
409
        lastframe = tick()
410
      end
411
      if tossremainder then
412
        tf = 0
413
      else
414
        tf = tf - frame * math.floor(tf / frame)
415
      end
416
    end
417
  end)
418
  function swait(num)
419
    if num == 0 or num == nil then
420
      ArtificialHB.Event:wait()
421
    else
422
      for i = 0, num do
423
        ArtificialHB.Event:wait()
424
      end
425
    end
426
  end
427
  function RemoveOutlines(part)
428
    part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
429
  end
430
  CFuncs = {
431
    Part = {
432
      Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
433
        local Part = Create("Part")({
434
          Parent = Parent,
435
          Reflectance = Reflectance,
436
          Transparency = Transparency,
437
          CanCollide = false,
438
          Locked = true,
439
          BrickColor = BrickColor.new(tostring(BColor)),
440
          Name = Name,
441
          Size = Size,
442
          Material = Material
443
        })
444
        RemoveOutlines(Part)
445
        return Part
446
      end
447
    },
448
    Mesh = {
449
      Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
450
        local Msh = Create(Mesh)({
451
          Parent = Part,
452
          Offset = OffSet,
453
          Scale = Scale
454
        })
455
        if Mesh == "SpecialMesh" then
456
          Msh.MeshType = MeshType
457
          Msh.MeshId = MeshId
458
        end
459
        return Msh
460
      end
461
    },
462
    Weld = {
463
      Create = function(Parent, Part0, Part1, C0, C1)
464
        local Weld = Create("Weld")({
465
          Parent = Parent,
466
          Part0 = Part0,
467
          Part1 = Part1,
468
          C0 = C0,
469
          C1 = C1
470
        })
471
        return Weld
472
      end
473
    },
474
    Sound = {
475
      Create = function(id, par, vol, pit)
476
        coroutine.resume(coroutine.create(function()
477
          local Sound = Create("Sound")({
478
            Volume = vol,
479
            Pitch = pit or 1,
480
            SoundId = "rbxassetid://" .. id,
481
            Parent = par or workspace
482
          })
483
          Sound:play()
484
          game:GetService("Debris"):AddItem(Sound, 10)
485
        end))
486
      end
487
    },
488
    Decal = {
489
      Create = function(Color, Texture, Transparency, Name, Parent)
490
        local Decal = Create("Decal")({
491
          Color3 = Color,
492
          Texture = "rbxassetid://" .. Texture,
493
          Transparency = Transparency,
494
          Name = Name,
495
          Parent = Parent
496
        })
497
        return Decal
498
      end
499
    },
500
    BillboardGui = {
501
      Create = function(Parent, Image, Position, Size)
502
        local BillPar = CFuncs.Part.Create(Parent, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "BillboardGuiPart", Vector3.new(1, 1, 1))
503
        BillPar.CFrame = CFrame.new(Position)
504
        local Bill = Create("BillboardGui")({
505
          Parent = BillPar,
506
          Adornee = BillPar,
507
          Size = UDim2.new(1, 0, 1, 0),
508
          SizeOffset = Vector2.new(Size, Size)
509
        })
510
        local d = Create("ImageLabel", Bill)({
511
          Parent = Bill,
512
          BackgroundTransparency = 1,
513
          Size = UDim2.new(1, 0, 1, 0),
514
          Image = "rbxassetid://" .. Image
515
        })
516
        return BillPar
517
      end
518
    },
519
    ParticleEmitter = {
520
      Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
521
        local Particle = Create("ParticleEmitter")({
522
          Parent = Parent,
523
          Color = ColorSequence.new(Color1, Color2),
524
          LightEmission = LightEmission,
525
          Size = Size,
526
          Texture = Texture,
527
          Transparency = Transparency,
528
          ZOffset = ZOffset,
529
          Acceleration = Accel,
530
          Drag = Drag,
531
          LockedToPart = LockedToPart,
532
          VelocityInheritance = VelocityInheritance,
533
          EmissionDirection = EmissionDirection,
534
          Enabled = Enabled,
535
          Lifetime = LifeTime,
536
          Rate = Rate,
537
          Rotation = Rotation,
538
          RotSpeed = RotSpeed,
539
          Speed = Speed,
540
          VelocitySpread = VelocitySpread
541
        })
542
        return Particle
543
      end
544
    },
545
    CreateTemplate = {}
546
  }
547
  function rayCast(Position, Direction, Range, Ignore)
548
    return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
549
  end
550
  function findNearestTorso(pos)
551
    local list = game.Workspace:children()
552
    local torso
553
    local dist = 1000
554
    local temp, human, temp2
555
    for x = 1, #list do
556
      temp2 = list[x]
557
      if temp2.className == "Model" and temp2.Name ~= Character.Name then
558
        temp = temp2:findFirstChild("Torso")
559
        human = temp2:findFirstChild("Humanoid")
560
        if temp ~= nil and human ~= nil and human.Health > 0 and dist > (temp.Position - pos).magnitude then
561
          torso = temp
562
          dist = (temp.Position - pos).magnitude
563
        end
564
      end
565
    end
566
    return torso, dist
567
  end
568
  function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
569
    if hit.Parent == nil then
570
      return
571
    end
572
    local h = hit.Parent:FindFirstChild("Humanoid")
573
    for _, v in pairs(hit.Parent:children()) do
574
      if v:IsA("Humanoid") then
575
        h = v
576
      end
577
    end
578
    if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
579
      if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
580
        return
581
      end
582
      local c = Create("ObjectValue")({
583
        Name = "creator",
584
        Value = game:service("Players").LocalPlayer,
585
        Parent = h
586
      })
587
      game:GetService("Debris"):AddItem(c, 0.5)
588
      if HitSound ~= nil and HitPitch ~= nil then
589
        CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
590
      end
591
      local blocked = false
592
      local block = hit.Parent:findFirstChild("Block")
593
      if block ~= nil and block.className == "IntValue" and block.Value > 0 then
594
        blocked = true
595
        block.Value = block.Value - 1
596
        print(block.Value)
597
      end
598
      if blocked == false then
599
        h.Health = 0
600
      else
601
        h.Health = h.Health - Damage / 2
602
      end
603
      if Type == "Knockdown" then
604
        local hum = hit.Parent.Humanoid
605
        hum.PlatformStand = true
606
        coroutine.resume(coroutine.create(function(HHumanoid)
607
          swait(1)
608
          HHumanoid.PlatformStand = false
609
        end), hum)
610
        local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
611
        local bodvol = Create("BodyVelocity")({
612
          velocity = angle * knockback,
613
          P = 5000,
614
          maxForce = Vector3.new(8000, 8000, 8000),
615
          Parent = hit
616
        })
617
        local rl = Create("BodyAngularVelocity")({
618
          P = 3000,
619
          maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
620
          angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
621
          Parent = hit
622
        })
623
        game:GetService("Debris"):AddItem(bodvol, 0.5)
624
        game:GetService("Debris"):AddItem(rl, 0.5)
625
      elseif Type == "Normal" then
626
        local vp = Create("BodyVelocity")({
627
          P = 500,
628
          maxForce = Vector3.new(math.huge, 0, math.huge),
629
          velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
630
        })
631
        game:GetService("Debris"):AddItem(vp, 0.5)
632
      elseif Type == "Up" then
633
        local bodyVelocity = Create("BodyVelocity")({
634
          velocity = Vector3.new(0, 20, 0),
635
          P = 5000,
636
          maxForce = Vector3.new(8000, 8000, 8000),
637
          Parent = hit
638
        })
639
        game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
640
      elseif Type == "DarkUp" then
641
        coroutine.resume(coroutine.create(function()
642
          for i = 0, 1, 0.1 do
643
            swait()
644
            Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, 0.08, 1)
645
          end
646
        end))
647
        local bodyVelocity = Create("BodyVelocity")({
648
          velocity = Vector3.new(0, 20, 0),
649
          P = 5000,
650
          maxForce = Vector3.new(8000, 8000, 8000),
651
          Parent = hit
652
        })
653
        game:GetService("Debris"):AddItem(bodyVelocity, 1)
654
      elseif Type == "Snare" then
655
        local bp = Create("BodyPosition")({
656
          P = 2000,
657
          D = 100,
658
          maxForce = Vector3.new(math.huge, math.huge, math.huge),
659
          position = hit.Parent.Torso.Position,
660
          Parent = hit.Parent.Torso
661
        })
662
        game:GetService("Debris"):AddItem(bp, 1)
663
      elseif Type == "Freeze" then
664
        local BodPos = Create("BodyPosition")({
665
          P = 50000,
666
          D = 1000,
667
          maxForce = Vector3.new(math.huge, math.huge, math.huge),
668
          position = hit.Parent.Torso.Position,
669
          Parent = hit.Parent.Torso
670
        })
671
        local BodGy = Create("BodyGyro")({
672
          maxTorque = Vector3.new(400000, 400000, 400000) * math.huge,
673
          P = 20000,
674
          Parent = hit.Parent.Torso,
675
          cframe = hit.Parent.Torso.CFrame
676
        })
677
        hit.Parent.Torso.Anchored = true
678
        coroutine.resume(coroutine.create(function(Part)
679
          swait(1.5)
680
          Part.Anchored = false
681
        end), hit.Parent.Torso)
682
        game:GetService("Debris"):AddItem(BodPos, 3)
683
        game:GetService("Debris"):AddItem(BodGy, 3)
684
      end
685
      local debounce = Create("BoolValue")({
686
        Name = "DebounceHit",
687
        Parent = hit.Parent,
688
        Value = true
689
      })
690
      game:GetService("Debris"):AddItem(debounce, Delay)
691
      c = Create("ObjectValue")({
692
        Name = "creator",
693
        Value = Player,
694
        Parent = h
695
      })
696
      game:GetService("Debris"):AddItem(c, 0.5)
697
    end
698
  end
699
  function ShowDamage(Pos, Text, Time, Color)
700
    local Rate = 0.03333333333333333
701
    local Pos = Pos or Vector3.new(0, 0, 0)
702
    local Text = Text or ""
703
    local Time = Time or 2
704
    local Color = Color or Color3.new(1, 0, 1)
705
    local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
706
    EffectPart.Anchored = true
707
    local BillboardGui = Create("BillboardGui")({
708
      Size = UDim2.new(3, 0, 3, 0),
709
      Adornee = EffectPart,
710
      Parent = EffectPart
711
    })
712
    local TextLabel = Create("TextLabel")({
713
      BackgroundTransparency = 1,
714
      Size = UDim2.new(1, 0, 1, 0),
715
      Text = Text,
716
      Font = "SciFi",
717
      TextColor3 = Color,
718
      TextScaled = true,
719
      BorderColor3 = Color3.new(0,0,0),
720
      Parent = BillboardGui
721
    })
722
    game.Debris:AddItem(EffectPart, Time)
723
    EffectPart.Parent = game:GetService("Workspace")
724
    delay(0, function()
725
      local Frames = Time / Rate
726
      for Frame = 1, Frames do
727
        wait(Rate)
728
        local Percent = Frame / Frames
729
        EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
730
        TextLabel.TextTransparency = Percent
731
      end
732
      if EffectPart and EffectPart.Parent then
733
        EffectPart:Destroy()
734
      end
735
    end)
736
  end
737
  function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
738
    for _, c in pairs(workspace:children()) do
739
      local hum = c:findFirstChild("Humanoid")
740
      if hum ~= nil then
741
        local head = c:findFirstChild("Torso")
742
        if head ~= nil then
743
          local targ = head.Position - Part.Position
744
          local mag = targ.magnitude
745
          if Magnitude >= mag and c.Name ~= Player.Name then
746
            Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, 0, HitSound, HitPitch)
747
          end
748
        end
749
      end
750
    end
751
  end
752
  --//New Damage\\--
753
function Damage2(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
754
    if hit.Parent == nil then
755
      return
756
    end
757
    local h = hit.Parent:FindFirstChild("Humanoid")
758
    for _, v in pairs(hit.Parent:children()) do
759
      if v:IsA("Humanoid") then
760
        h = v
761
      end
762
    end
763
    if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
764
      if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
765
        return
766
      end
767
      local c = Create("ObjectValue")({
768
        Name = "creator",
769
        Value = game:service("Players").LocalPlayer,
770
        Parent = h
771
      })
772
      game:GetService("Debris"):AddItem(c, 0.5)
773
      if HitSound ~= nil and HitPitch ~= nil then
774
        CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
775
      end
776
      local Damage = math.random(minim, maxim)
777
      local blocked = false
778
      local block = hit.Parent:findFirstChild("Block")
779
      if block ~= nil and block.className == "IntValue" and block.Value > 0 then
780
        blocked = true
781
        block.Value = block.Value - 1
782
        print(block.Value)
783
      end
784
      if blocked == false then
785
        h.Health = h.Health - Damage
786
        ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, BrickColor.new("Really black").Color)
787
      else
788
        h.Health = h.Health - Damage / 2
789
        ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, BrickColor.new("Really black").Color)
790
      end
791
      if Type == "Knockdown" then
792
        local hum = hit.Parent.Humanoid
793
        hum.PlatformStand = true
794
        coroutine.resume(coroutine.create(function(HHumanoid)
795
          swait(1)
796
          HHumanoid.PlatformStand = false
797
        end), hum)
798
        local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
799
        local bodvol = Create("BodyVelocity")({
800
          velocity = angle * knockback,
801
          P = 5000,
802
          maxForce = Vector3.new(8000, 8000, 8000),
803
          Parent = hit
804
        })
805
        local rl = Create("BodyAngularVelocity")({
806
          P = 3000,
807
          maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
808
          angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
809
          Parent = hit
810
        })
811
        game:GetService("Debris"):AddItem(bodvol, 0.5)
812
        game:GetService("Debris"):AddItem(rl, 0.5)
813
      elseif Type == "Normal" then
814
        local vp = Create("BodyVelocity")({
815
          P = 500,
816
          maxForce = Vector3.new(math.huge, 0, math.huge),
817
          velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
818
        })
819
        if knockback > 0 then
820
          vp.Parent = hit.Parent.Torso
821
        end
822
        game:GetService("Debris"):AddItem(vp, 0.5)
823
      elseif Type == "Up" then
824
        local bodyVelocity = Create("BodyVelocity")({
825
          velocity = Vector3.new(0, 20, 0),
826
          P = 5000,
827
          maxForce = Vector3.new(8000, 8000, 8000),
828
          Parent = hit
829
        })
830
        game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
831
      elseif Type == "DarkUp" then
832
        coroutine.resume(coroutine.create(function()
833
          for i = 0, 1, 0.1 do
834
            swait()
835
            Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, 0.08, 1)
836
          end
837
        end))
838
        local bodyVelocity = Create("BodyVelocity")({
839
          velocity = Vector3.new(0, 20, 0),
840
          P = 5000,
841
          maxForce = Vector3.new(8000, 8000, 8000),
842
          Parent = hit
843
        })
844
        game:GetService("Debris"):AddItem(bodyVelocity, 1)
845
      elseif Type == "Snare" then
846
        local bp = Create("BodyPosition")({
847
          P = 2000,
848
          D = 100,
849
          maxForce = Vector3.new(math.huge, math.huge, math.huge),
850
          position = hit.Parent.Torso.Position,
851
          Parent = hit.Parent.Torso
852
        })
853
        game:GetService("Debris"):AddItem(bp, 1)
854
      elseif Type == "Freeze" then
855
        local BodPos = Create("BodyPosition")({
856
          P = 50000,
857
          D = 1000,
858
          maxForce = Vector3.new(math.huge, math.huge, math.huge),
859
          position = hit.Parent.Torso.Position,
860
          Parent = hit.Parent.Torso
861
        })
862
        local BodGy = Create("BodyGyro")({
863
          maxTorque = Vector3.new(400000, 400000, 400000) * math.huge,
864
          P = 20000,
865
          Parent = hit.Parent.Torso,
866
          cframe = hit.Parent.Torso.CFrame
867
        })
868
        hit.Parent.Torso.Anchored = true
869
        coroutine.resume(coroutine.create(function(Part)
870
          swait(1.5)
871
          Part.Anchored = false
872
        end), hit.Parent.Torso)
873
        game:GetService("Debris"):AddItem(BodPos, 3)
874
        game:GetService("Debris"):AddItem(BodGy, 3)
875
      end
876
      local debounce = Create("BoolValue")({
877
        Name = "DebounceHit",
878
        Parent = hit.Parent,
879
        Value = true
880
      })
881
      game:GetService("Debris"):AddItem(debounce, Delay)
882
      c = Create("ObjectValue")({
883
        Name = "creator",
884
        Value = Player,
885
        Parent = h
886
      })
887
      game:GetService("Debris"):AddItem(c, 0.5)
888
    end
889
  end
890
  function ShowDamage2(Pos, Text, Time, Color)
891
    local Rate = 0.03333333333333333
892
    local Pos = Pos or Vector3.new(0, 0, 0)
893
    local Text = Text or ""
894
    local Time = Time or 2
895
    local Color = Color or Color3.new(1, 0, 1)
896
    local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
897
    EffectPart.Anchored = true
898
    local BillboardGui = Create("BillboardGui")({
899
      Size = UDim2.new(3, 0, 3, 0),
900
      Adornee = EffectPart,
901
      Parent = EffectPart
902
    })
903
    local TextLabel = Create("TextLabel")({
904
      BackgroundTransparency = 1,
905
      Size = UDim2.new(1, 0, 1, 0),
906
      Text = Text,
907
      Font = "SciFi",
908
      TextColor3 = Color,
909
      TextScaled = true,
910
      Parent = BillboardGui
911
    })
912
    game.Debris:AddItem(EffectPart, Time)
913
    EffectPart.Parent = game:GetService("Workspace")
914
    delay(0, function()
915
      local Frames = Time / Rate
916
      for Frame = 1, Frames do
917
        wait(Rate)
918
        local Percent = Frame / Frames
919
        EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
920
        TextLabel.TextTransparency = Percent
921
      end
922
      if EffectPart and EffectPart.Parent then
923
        EffectPart:Destroy()
924
      end
925
    end)
926
  end
927
  function MagnitudeDamage2(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
928
    for _, c in pairs(workspace:children()) do
929
      local hum = c:findFirstChild("Humanoid")
930
      if hum ~= nil then
931
        local head = c:findFirstChild("Torso")
932
        if head ~= nil then
933
          local targ = head.Position - Part.Position
934
          local mag = targ.magnitude
935
          if Magnitude >= mag and c.Name ~= Player.Name then
936
            Damage2(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, 0, HitSound, HitPitch)
937
          end
938
        end
939
      end
940
    end
941
  end
942
  ----------------------
943
  Handle = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Really black", "Handle", Vector3.new(0.400000036, 0.400000006, 1.20000005))
944
  HandleWeld = CFuncs.Weld.Create(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.0921096802, -1.06268024, -0.143123627, 1, 0, 0, 0, -1, 0, 0, 0, -1))
945
  Barrel = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Barrel", Vector3.new(0.250000003, 0.250000003, 0.250000024))
946
  Mesh = Instance.new("SpecialMesh",Barrel)
947
  Mesh.MeshId = "rbxassetid://442405779"
948
  Mesh.TextureId = "rbxassetid://442405780"
949
  Mesh.Scale = Vector3.new(0.06,0.06,0.06)
950
  BarrelWeld = CFuncs.Weld.Create(m, Handle, Barrel, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00579071045, -1.59999704, 0.500003815, 1, 0, 0, 0, 1, 0, 0, 0, 1))
951
  JetpackHandle = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Really black", "JetpackHandle", Vector3.new(0.200000003, 0.200000003, 0.200000003))
952
  JetpackHandleWeld = CFuncs.Weld.Create(m, Character.Torso, JetpackHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(7.62939453E-6, -0.400000662, -2.30000019, 0.999999821, -3.64178788E-7, -8.94072372E-8, 3.63716538E-7, 1, 7.422572E-10, 2.98025853E-8, -1.13686838E-13, 0.999999881))
953
  EffectPartR1 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartR1", Vector3.new(0.5, 0.5, 0.300000012))
954
  EffectPartR1Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartR1, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.09364891, -0.187623501, -0.0701560974, 0.906307757, 3.29325474E-7, -0.422617853, -0.144542456, 0.939694047, -0.309971899, 0.397131324, 0.34201628, 0.851652086))
955
  EffectPartL1 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartL1", Vector3.new(0.5, 0.5, 0.300000012))
956
  EffectPartL1Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartL1, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(1.02251816, -0.220495224, 0.120153427, 0.965927601, 1.32644391E-6, 0.258812487, 0.0885165557, 0.939698577, -0.330363601, -0.243205622, 0.342014492, 0.907681763))
957
  EffectPartR2 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartR2", Vector3.new(0.5, 0.5, 0.300000012))
958
  EffectPartR2Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartR2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.093647, 0.123265266, 0.0195560455, 0.906307757, 3.29325474E-7, -0.422617853, -0.109380148, 0.965926826, -0.234566003, 0.408217847, 0.25881511, 0.875427186))
959
  EffectPartL2 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartL2", Vector3.new(0.5, 0.5, 0.300000012))
960
  EffectPartL2Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartL2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(1.02252197, 0.0983912945, 0.212385654, 0.96592772, 1.15327362E-6, 0.258813411, 0.0669838786, 0.965926588, -0.249997437, -0.249995068, 0.258815855, 0.933015227))
961
  EffectPartL3 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartL3", Vector3.new(0.400000006, 0.5, 0.300000012))
962
  EffectPartL3Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartL3, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.86114502, 1.02306592, -0.343766928, 0.981060922, -0.0278283078, 0.19168894, -0.0858270004, 0.824720919, 0.558989346, -0.173645675, -0.56485492, 0.806713104))
963
  EffectPartR3 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartR3", Vector3.new(0.400000006, 0.5, 0.300000012))
964
  EffectPartR3Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartR3, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.83058548, 1.0264864, -0.312187195, 0.981061339, 0.0278254021, -0.191695988, 0.0858334452, 0.824721098, 0.558989942, 0.173649624, -0.564855158, 0.806710064))
965
  CFuncs.Mesh.Create("SpecialMesh", JetpackHandle, Enum.MeshType.FileMesh, "rbxassetid://0", Vector3.new(0, 0, 0), Vector3.new(1.29999995, 1.29999995, 1.29999995))
966
  EffectModel = Create("Model")({Parent = Character, Name = "Effects"})
967
  Effects = {
968
    Block = {
969
      Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
970
        local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
971
        prt.Anchored = true
972
        prt.CFrame = cframe
973
        local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
974
        game:GetService("Debris"):AddItem(prt, 10)
975
        if Type == 1 or Type == nil then
976
          table.insert(Effects, {
977
            prt,
978
            "Block1",
979
            delay,
980
            x3,
981
            y3,
982
            z3,
983
            msh
984
          })
985
        elseif Type == 2 then
986
          table.insert(Effects, {
987
            prt,
988
            "Block2",
989
            delay,
990
            x3,
991
            y3,
992
            z3,
993
            msh
994
          })
995
        end
996
      end
997
    },
998
    Cylinder = {
999
      Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1000
        local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
1001
        prt.Anchored = true
1002
        prt.CFrame = cframe
1003
        local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1004
        game:GetService("Debris"):AddItem(prt, 2)
1005
        Effects[#Effects + 1] = {
1006
          prt,
1007
          "Cylinder",
1008
          delay,
1009
          x3,
1010
          y3,
1011
          z3,
1012
          msh
1013
        }
1014
      end
1015
    },
1016
    Head = {
1017
      Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1018
        local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
1019
        prt.Anchored = true
1020
        prt.CFrame = cframe
1021
        local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1022
        game:GetService("Debris"):AddItem(prt, 10)
1023
        table.insert(Effects, {
1024
          prt,
1025
          "Cylinder",
1026
          delay,
1027
          x3,
1028
          y3,
1029
          z3,
1030
          msh
1031
        })
1032
      end
1033
    },
1034
    Sphere = {
1035
      Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1036
        local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
1037
        prt.Anchored = true
1038
        prt.CFrame = cframe
1039
        local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1040
        game:GetService("Debris"):AddItem(prt, 10)
1041
        table.insert(Effects, {
1042
          prt,
1043
          "Cylinder",
1044
          delay,
1045
          x3,
1046
          y3,
1047
          z3,
1048
          msh
1049
        })
1050
      end
1051
    },
1052
    Elect = {
1053
      Create = function(cff, x, y, z)
1054
        local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
1055
        prt.Anchored = true
1056
        prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
1057
        prt.CFrame = CFrame.new(prt.Position)
1058
        game:GetService("Debris"):AddItem(prt, 2)
1059
        local xval = math.random() / 2
1060
        local yval = math.random() / 2
1061
        local zval = math.random() / 2
1062
        local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
1063
        table.insert(Effects, {
1064
          prt,
1065
          "Elec",
1066
          0.1,
1067
          x,
1068
          y,
1069
          z,
1070
          xval,
1071
          yval,
1072
          zval
1073
        })
1074
      end
1075
    },
1076
    Ring = {
1077
      Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1078
        local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
1079
        prt.Anchored = true
1080
        prt.CFrame = cframe
1081
        local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1082
        game:GetService("Debris"):AddItem(prt, 10)
1083
        table.insert(Effects, {
1084
          prt,
1085
          "Cylinder",
1086
          delay,
1087
          x3,
1088
          y3,
1089
          z3,
1090
          msh
1091
        })
1092
      end
1093
    },
1094
    Wave = {
1095
      Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
1096
        local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
1097
        prt.Anchored = true
1098
        prt.CFrame = cframe
1099
        local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1100
        game:GetService("Debris"):AddItem(prt, 10)
1101
        table.insert(Effects, {
1102
          prt,
1103
          "Cylinder",
1104
          delay,
1105
          x3,
1106
          y3,
1107
          z3,
1108
          msh
1109
        })
1110
      end
1111
    },
1112
    Break = {
1113
      Create = function(brickcolor, cframe, x1, y1, z1)
1114
        local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
1115
        prt.Anchored = true
1116
        prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1117
        local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1118
        local num = math.random(10, 50) / 1000
1119
        game:GetService("Debris"):AddItem(prt, 10)
1120
        table.insert(Effects, {
1121
          prt,
1122
          "Shatter",
1123
          num,
1124
          prt.CFrame,
1125
          math.random() - math.random(),
1126
          0,
1127
          math.random(50, 100) / 100
1128
        })
1129
      end
1130
    },
1131
    Fire = {
1132
      Create = function(brickcolor, cframe, x1, y1, z1, delay)
1133
        local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
1134
        prt.Anchored = true
1135
        prt.CFrame = cframe
1136
        msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1137
        game:GetService("Debris"):AddItem(prt, 10)
1138
        table.insert(Effects, {
1139
          prt,
1140
          "Fire",
1141
          delay,
1142
          1,
1143
          1,
1144
          1,
1145
          msh
1146
        })
1147
      end
1148
    },
1149
    FireWave = {
1150
      Create = function(brickcolor, cframe, x1, y1, z1)
1151
        local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new())
1152
        prt.Anchored = true
1153
        prt.CFrame = cframe
1154
        msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
1155
        local d = Create("Decal")({
1156
          Parent = prt,
1157
          Texture = "rbxassetid://26356434",
1158
          Face = "Top"
1159
        })
1160
        local d = Create("Decal")({
1161
          Parent = prt,
1162
          Texture = "rbxassetid://26356434",
1163
          Face = "Bottom"
1164
        })
1165
        game:GetService("Debris"):AddItem(prt, 10)
1166
        table.insert(Effects, {
1167
          prt,
1168
          "FireWave",
1169
          1,
1170
          30,
1171
          math.random(400, 600) / 100,
1172
          msh
1173
        })
1174
      end
1175
    },
1176
    Lightning = {
1177
      Create = function(p0, p1, tym, ofs, col, th, tra, last)
1178
        local magz = (p0 - p1).magnitude
1179
        local curpos = p0
1180
        local trz = {
1181
          -ofs,
1182
          ofs
1183
        }
1184
        for i = 1, tym do
1185
          local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym))
1186
          local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
1187
          local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
1188
          li.Material = "Neon"
1189
          if tym == i then
1190
            local magz2 = (curpos - p1).magnitude
1191
            li.Size = Vector3.new(th, th, magz2)
1192
            li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
1193
            table.insert(Effects, {
1194
              li,
1195
              "Disappear",
1196
              last
1197
            })
1198
          else
1199
            li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
1200
            curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
1201
            game.Debris:AddItem(li, 10)
1202
            table.insert(Effects, {
1203
              li,
1204
              "Disappear",
1205
              last
1206
            })
1207
          end
1208
        end
1209
      end
1210
    },
1211
    EffectTemplate = {}
1212
  }
1213
  function Shootcombo()
1214
    local MouseLook = CFrame.new((Barrel.Position + Mouse.Hit.p) / 2, Mouse.Hit.p)
1215
    CFuncs.Sound.Create("173979241", Handle, 1, 1)
1216
    Effects.Sphere.Create(BrickColor.new("Really black"), Barrel.CFrame, 0.5, 0.5, 0.5, 1,1,1, 0.09)
1217
    Effects.Sphere.Create(BrickColor.new("Really black"), Barrel.CFrame, 1, 1, 1, 1,1,1, 0.09)
1218
    Effects.Block.Create(BrickColor.new("Really black"), Barrel.CFrame, 1, 1, 1, 1,1,1, 0.09, 1)
1219
    table.insert(Effects, {
1220
      MouseLook.lookVector,
1221
      "Shoot",
1222
      30,
1223
      Barrel.Position,
1224
      6,
1225
      8,
1226
      0,
1227
      1
1228
    })
1229
  end
1230
  function Bolt()
1231
    CFuncs.Sound.Create("173979241", Handle, 1, 1)
1232
  end
1233
  function SpinShot()
1234
    attack = true
1235
    for i = 0, 1, 0.12 do
1236
      swait()
1237
      PlayAnimationFromTable({
1238
        CFrame.new(-0.33084622, -0.304918617, -0.52869457, 0.342018992, 2.44630968E-7, -0.939693093, 0.163176, 0.98480773, 0.0593912415, 0.925417006, -0.173648283, 0.336822927) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1239
        CFrame.new(0.0322597921, 1.48268783, -0.0930604339, 0.322602183, 0.14004983, 0.936116517, -0.172989488, 0.981059611, -0.0871584788, -0.930592477, -0.133820817, 0.340719253) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1240
        CFrame.new(0.506988645, 0.377255857, -0.803069711, 0.259420365, 0.955582082, -0.139867067, 0.0992426202, -0.170435682, -0.980358601, -0.960651875, 0.240444362, -0.139049053) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1241
        CFrame.new(-1.72998452, 0.495006025, -0.392647803, 0.542880952, 0.410539567, 0.732626021, 0.737672389, 0.183852568, -0.649647713, -0.4013969, 0.893121183, -0.203034982) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1242
        CFrame.new(0.502950907, -1.9151485, 0.231621087, 0.864151537, 0.0236141682, -0.502677977, 0.0515102148, 0.989501238, 0.135033786, 0.50058949, -0.142582476, 0.853862286) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1243
        CFrame.new(-0.865711927, -1.63087702, -0.282848835, 0.925415218, 0.173649043, 0.336827427, -0.163176641, 0.98480773, -0.0593916178, -0.342023462, -4.54019755E-7, 0.939691782) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1244
      }, 0.35, false)
1245
    end
1246
    Shootcombo()
1247
    for i = 0, 1, 0.3 do
1248
      swait()
1249
      RootPart.Velocity = RootPart.CFrame.lookVector * -10
1250
      PlayAnimationFromTable({
1251
        CFrame.new(-0.330845773, -0.378038257, 0.581278205, 0.342019081, 5.60612747E-8, -0.939693093, -0.0819000229, 0.996194661, -0.0298090074, 0.936117232, 0.0871561244, 0.340717614) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1252
        CFrame.new(0.0322549939, 1.48268545, -0.0930609033, 0.239786834, -0.113366202, 0.964181364, -0.164735377, 0.974004149, 0.155488253, -0.95675236, -0.196119189, 0.214875787) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1253
        CFrame.new(0.806416035, 0.470317304, -0.694097638, 0.244436547, 0.969400585, 0.0226592347, 0.0830115676, 0.00236219168, -0.996545851, -0.9661057, 0.245473176, -0.079894051) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1254
        CFrame.new(-1.57694697, 0.512434185, -0.230538517, 0.760710716, 0.410538197, 0.502765059, 0.470990688, 0.1838523, -0.862764716, -0.44662869, 0.893119931, -0.0535021573) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1255
        CFrame.new(0.865904212, -1.71960115, 0.0648829341, 0.881422341, -0.173719466, -0.439225137, 0.290622324, 0.932511985, 0.214389697, 0.372338951, -0.316616565, 0.872420609) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1256
        CFrame.new(-0.679471731, -1.82845092, -0.362076759, 0.770665169, -0.0483331755, 0.635404408, -0.0295864344, 0.993330181, 0.111444041, -0.63655293, -0.104685426, 0.764095306) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1257
      }, 0.5, false)
1258
    end
1259
    for i = 0, 1, 0.12 do
1260
      swait()
1261
      PlayAnimationFromTable({
1262
        CFrame.new(-0.33084622, -0.304918617, -0.52869457, 0.342018992, 2.44630968E-7, -0.939693093, 0.163176, 0.98480773, 0.0593912415, 0.925417006, -0.173648283, 0.336822927) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1263
        CFrame.new(0.0322597921, 1.48268783, -0.0930604339, 0.322602183, 0.14004983, 0.936116517, -0.172989488, 0.981059611, -0.0871584788, -0.930592477, -0.133820817, 0.340719253) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1264
        CFrame.new(0.506988645, 0.377255857, -0.803069711, 0.259420365, 0.955582082, -0.139867067, 0.0992426202, -0.170435682, -0.980358601, -0.960651875, 0.240444362, -0.139049053) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1265
        CFrame.new(-1.72998452, 0.495006025, -0.392647803, 0.542880952, 0.410539567, 0.732626021, 0.737672389, 0.183852568, -0.649647713, -0.4013969, 0.893121183, -0.203034982) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1266
        CFrame.new(0.502950907, -1.9151485, 0.231621087, 0.864151537, 0.0236141682, -0.502677977, 0.0515102148, 0.989501238, 0.135033786, 0.50058949, -0.142582476, 0.853862286) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1267
        CFrame.new(-0.865711927, -1.63087702, -0.282848835, 0.925415218, 0.173649043, 0.336827427, -0.163176641, 0.98480773, -0.0593916178, -0.342023462, -4.54019755E-7, 0.939691782) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1268
      }, 0.4, false)
1269
    end
1270
    Bolt()
1271
    attack = false
1272
  end
1273
  function LungeShot(Mode)
1274
    attack = true
1275
    Humanoid.Jump = true
1276
    CFuncs.Sound.Create("158149887", Torso, 1, 0.9)
1277
    if Mode == "Forward" then
1278
      RootPart.Velocity = RootPart.CFrame.lookVector * 80
1279
      for i = 0, 1, 0.1 do
1280
        swait()
1281
        PlayAnimationFromTable({
1282
          CFrame.new(-3.81469727E-6, 0.0628450513, 0.146824121, 1, 0, 0, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-20), 0, 0),
1283
          CFrame.new(0, 1.49998665, -2.20537186E-6, 1, 0, 0, 0, 0.984807312, 0.173648536, 0, -0.173648536, 0.984807312) * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(20), 0, 0),
1284
          CFrame.new(0.523067951, 0.10826005, -0.698177814, 0.296512067, 0.787702143, 0.540005624, 0.206982568, 0.498990804, -0.84152633, -0.932329774, 0.361294419, -0.0150838122) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1285
          CFrame.new(-1.42747557, -0.117001235, -0.482704312, 0.268235743, 0.0413863063, 0.962466657, 0.56728673, 0.800693691, -0.192532867, -0.778610408, 0.597635567, 0.191299409) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1286
          CFrame.new(0.499998361, -1.51702964, -0.129410475, 0.984807849, 0, -0.173648044, 0.0449435376, 0.965925634, 0.25488764, 0.167731121, -0.258819699, 0.951251149) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1287
          CFrame.new(-0.500004053, -1.35084605, -0.555529714, 0.981060445, 0.0871543288, 0.172987863, -0.140045926, 0.936115682, 0.322606146, -0.133820146, -0.340722382, 0.930591524) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1288
        }, 0.3, false)
1289
      end
1290
    elseif Mode == "Backward" then
1291
      RootPart.Velocity = RootPart.CFrame.lookVector * -80
1292
      for i = 0, 1, 0.1 do
1293
        swait()
1294
        PlayAnimationFromTable({
1295
          CFrame.new(-3.81469727E-6, 0.0628450513, 0.146824121, 1, 0, 0, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(10), 0, 0),
1296
          CFrame.new(0, 1.49998665, -2.20537186E-6, 1, 0, 0, 0, 0.984807312, 0.173648536, 0, -0.173648536, 0.984807312) * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-10), 0, 0),
1297
          CFrame.new(0.523067951, 0.10826005, -0.698177814, 0.296512067, 0.787702143, 0.540005624, 0.206982568, 0.498990804, -0.84152633, -0.932329774, 0.361294419, -0.0150838122) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1298
          CFrame.new(-1.42747557, -0.117001235, -0.482704312, 0.268235743, 0.0413863063, 0.962466657, 0.56728673, 0.800693691, -0.192532867, -0.778610408, 0.597635567, 0.191299409) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1299
          CFrame.new(0.499998361, -1.51702964, -0.129410475, 0.984807849, 0, -0.173648044, 0.0449435376, 0.965925634, 0.25488764, 0.167731121, -0.258819699, 0.951251149) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1300
          CFrame.new(-0.500004053, -1.35084605, -0.555529714, 0.981060445, 0.0871543288, 0.172987863, -0.140045926, 0.936115682, 0.322606146, -0.133820146, -0.340722382, 0.930591524) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1301
        }, 0.3, false)
1302
      end
1303
    end
1304
    local hitfloor
1305
    while hitfloor == nil do
1306
      swait()
1307
      hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 6, Character)
1308
    end
1309
    for i = 0, 1, 0.2 do
1310
      swait()
1311
      PlayAnimationFromTable({
1312
        CFrame.new(-0.330837339, -0.699999928, -0.231655031, 0.342019022, 0, -0.939693093, 0, 1, 0, 0.939693093, 0, 0.342018992) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1313
        CFrame.new(0.120368131, 1.44721556, -0.255113155, 0.418385565, -0.00512788072, 0.908255041, -0.141075298, 0.987487316, 0.0705598369, -0.897252142, -0.157652482, 0.412421852) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1314
        CFrame.new(0.285862863, 0.389394581, -0.81719619, 0.340717524, 0.939693093, 0.0298089981, 0.087155968, 0, -0.996194661, -0.936117232, 0.342018992, -0.081899859) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1315
        CFrame.new(-1.69020307, 0.41307798, -0.514919221, 0.800103247, 0.517377436, 0.303571403, 0.255382031, 0.16412276, -0.95280838, -0.542784572, 0.839871705, -8.13782215E-4) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1316
        CFrame.new(0.897276342, -1.54715633, 0.463865459, 0.951250672, -0.229007483, -0.206587687, 0.304395527, 0.589249432, 0.748417377, -0.0496615469, -0.774816513, 0.630232751) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1317
        CFrame.new(-0.632248044, -1.39177239, -0.405484438, 0.817636669, -0.123517469, 0.562330127, 0.0563425981, 0.989193141, 0.13535662, -0.572972655, -0.0789892152, 0.815760136) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1318
      }, 0.4, false)
1319
    end
1320
    Shootcombo()
1321
    for i = 0, 1, 0.3 do
1322
      swait()
1323
      RootPart.Velocity = RootPart.CFrame.lookVector * -40
1324
      PlayAnimationFromTable({
1325
        CFrame.new(-0.330840945, -1.00127292, -0.261750877, 0.342018962, -1.4270141E-7, -0.939693034, -0.243209973, 0.965925992, -0.0885209814, 0.907673895, 0.258818597, 0.330364913) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1326
        CFrame.new(0.120366111, 1.44719875, -0.255110145, 0.418383747, -0.0842670798, 0.904353142, -0.141075209, 0.977573991, 0.156355858, -0.897247374, -0.192998484, 0.397113085) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1327
        CFrame.new(0.632638395, 0.661208212, -0.690981925, 0.326495707, 0.925417125, 0.192363232, 0.0858313814, 0.173647493, -0.981060386, -0.941293538, 0.336822778, -0.0227346662) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1328
        CFrame.new(-1.51982272, 0.476396978, -0.384689331, 0.81248939, 0.445674956, 0.37581408, 0.350734472, 0.141240373, -0.925762773, -0.46566987, 0.88398242, -0.0415571854) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1329
        CFrame.new(0.783671975, -1.17622542, 0.561357141, 0.831630051, -0.23809275, -0.501700282, 0.550981283, 0.240921408, 0.798984766, -0.0693621933, -0.940887034, 0.331542104) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1330
        CFrame.new(-0.632252574, -1.39177251, -0.40547961, 0.73177588, -0.317396253, 0.603132486, 0.21459803, 0.947232425, 0.238111958, -0.646885633, -0.0448122993, 0.761271358) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1331
      }, 0.6, false)
1332
    end
1333
    Bolt()
1334
    attack = false
1335
  end
1336
  function AutoShot()
1337
    attack = true
1338
    Humanoid.WalkSpeed = 45
1339
    Bolt()
1340
    for i = 0, 1, 0.3 do
1341
      swait()
1342
      PlayAnimationFromTable({
1343
        CFrame.new(-0.330837339, -0.699999928, -0.231655031, 0.342019022, 0, -0.939693093, 0, 1, 0, 0.939693093, 0, 0.342018992) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1344
        CFrame.new(0.120368131, 1.44721556, -0.255113155, 0.418385565, -0.00512788072, 0.908255041, -0.141075298, 0.987487316, 0.0705598369, -0.897252142, -0.157652482, 0.412421852) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1345
        CFrame.new(0.285862863, 0.389394581, -0.81719619, 0.340717524, 0.939693093, 0.0298089981, 0.087155968, 0, -0.996194661, -0.936117232, 0.342018992, -0.081899859) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1346
        CFrame.new(-1.69020307, 0.41307798, -0.514919221, 0.800103247, 0.517377436, 0.303571403, 0.255382031, 0.16412276, -0.95280838, -0.542784572, 0.839871705, -8.13782215E-4) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1347
        CFrame.new(0.897276342, -1.54715633, 0.463865459, 0.951250672, -0.229007483, -0.206587687, 0.304395527, 0.589249432, 0.748417377, -0.0496615469, -0.774816513, 0.630232751) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1348
        CFrame.new(-0.632248044, -1.39177239, -0.405484438, 0.817636669, -0.123517469, 0.562330127, 0.0563425981, 0.989193141, 0.13535662, -0.572972655, -0.0789892152, 0.815760136) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1349
      }, 0.4, false)
1350
    end
1351
    Humanoid.WalkSpeed = 45
1352
    for i = 1, 10 do
1353
      for i = 0, 1, 0.8 do
1354
        swait()
1355
        PlayAnimationFromTable({
1356
          CFrame.new(-0.330837339, -0.699999928, -0.231655031, 0.342019022, 0, -0.939693093, 0, 1, 0, 0.939693093, 0, 0.342018992) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1357
          CFrame.new(0.120368131, 1.44721556, -0.255113155, 0.418385565, -0.00512788072, 0.908255041, -0.141075298, 0.987487316, 0.0705598369, -0.897252142, -0.157652482, 0.412421852) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1358
          CFrame.new(0.285862863, 0.389394581, -0.81719619, 0.340717524, 0.939693093, 0.0298089981, 0.087155968, 0, -0.996194661, -0.936117232, 0.342018992, -0.081899859) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1359
          CFrame.new(-1.69020307, 0.41307798, -0.514919221, 0.800103247, 0.517377436, 0.303571403, 0.255382031, 0.16412276, -0.95280838, -0.542784572, 0.839871705, -8.13782215E-4) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1360
          CFrame.new(0.897276342, -1.54715633, 0.463865459, 0.951250672, -0.229007483, -0.206587687, 0.304395527, 0.589249432, 0.748417377, -0.0496615469, -0.774816513, 0.630232751) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1361
          CFrame.new(-0.632248044, -1.39177239, -0.405484438, 0.817636669, -0.123517469, 0.562330127, 0.0563425981, 0.989193141, 0.13535662, -0.572972655, -0.0789892152, 0.815760136) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1362
        }, 0.7, false)
1363
      end
1364
      Shootcombo()
1365
      for i = 0, 1, 0.9 do
1366
        swait()
1367
        PlayAnimationFromTable({
1368
          CFrame.new(-0.330840945, -1.00127292, -0.261750877, 0.342018962, -1.4270141E-7, -0.939693034, -0.243209973, 0.965925992, -0.0885209814, 0.907673895, 0.258818597, 0.330364913) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1369
          CFrame.new(0.120366111, 1.44719875, -0.255110145, 0.418383747, -0.0842670798, 0.904353142, -0.141075209, 0.977573991, 0.156355858, -0.897247374, -0.192998484, 0.397113085) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1370
          CFrame.new(0.632638395, 0.661208212, -0.690981925, 0.326495707, 0.925417125, 0.192363232, 0.0858313814, 0.173647493, -0.981060386, -0.941293538, 0.336822778, -0.0227346662) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1371
          CFrame.new(-1.51982272, 0.476396978, -0.384689331, 0.81248939, 0.445674956, 0.37581408, 0.350734472, 0.141240373, -0.925762773, -0.46566987, 0.88398242, -0.0415571854) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1372
          CFrame.new(0.783671975, -1.17622542, 0.561357141, 0.831630051, -0.23809275, -0.501700282, 0.550981283, 0.240921408, 0.798984766, -0.0693621933, -0.940887034, 0.331542104) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1373
          CFrame.new(-0.632252574, -1.39177251, -0.40547961, 0.73177588, -0.317396253, 0.603132486, 0.21459803, 0.947232425, 0.238111958, -0.646885633, -0.0448122993, 0.761271358) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1374
        }, 0.8, false)
1375
      end
1376
    end
1377
    Humanoid.WalkSpeed = 45
1378
    attack = false
1379
  end
1380
  function MortarShot()
1381
    attack = true
1382
    Humanoid.WalkSpeed = 45
1383
    Bolt()
1384
    for i = 0, 1, 0.3 do
1385
      swait()
1386
      PlayAnimationFromTable({
1387
        CFrame.new(-0.062730819, -1.35083091, -0.0234885216, 0.819151819, 0.368687779, -0.439385623, -0.573576868, 0.52654016, -0.627507091, 0, 0.766044974, 0.642787039) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1388
        CFrame.new(-0.0485280529, 1.45187008, 0.123812944, 0.90630585, -0.0368346125, 0.421014428, 0.178608507, 0.936241627, -0.302573681, -0.383025914, 0.349420995, 0.855100214) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1389
        CFrame.new(1.37136579, -0.011062175, -0.241436988, 0.866025329, 0.500000238, 0, 0.321393698, -0.556669831, -0.766044974, -0.383022636, 0.663414299, -0.642787039) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1390
        CFrame.new(-0.554796219, 0.778117955, -1.30101132, 0.814972818, -0.183016568, 0.549840331, 0.413680822, -0.480712891, -0.773164511, 0.40581724, 0.857566416, -0.316057503) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1391
        CFrame.new(0.745755255, -0.594750226, 0.689795136, 0.707485676, 0.0499878898, -0.704957783, 0.604335666, -0.559927046, 0.566798568, -0.366391778, -0.827032924, -0.426349699) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1392
        CFrame.new(-0.45294404, -1.60859108, 0.283076108, 0.724484801, -0.4477458, 0.524066269, -0.110680997, 0.674867868, 0.729592919, -0.680348873, -0.586582422, 0.439373374) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1393
      }, 0.4, false)
1394
    end
1395
    CFuncs.Sound.Create("173979241", Barrel, 1, 1)
1396
    Effects.Sphere.Create(BrickColor.new("Really black"), Barrel.CFrame, 6, 6, 6, 3, 3, 3, 0.1, m)
1397
    for i = 1, 20 do
1398
      local hit, pos = rayCast(Barrel.Position, Barrel.CFrame * CFrame.fromEulerAnglesXYZ(0, 5, 0).lookVector, 220, Character)
1399
      local mag = (Barrel.Position - pos).magnitude
1400
      Effects.Cylinder.Create(BrickColor.new("Really black"), Barrel.CFrame, 6, 99999, 6, -0.5, 1, -0.5, 0.1)
1401
      local cf2 = Mouse.Hit.p + Vector3.new(math.random(-30,30), 100, math.random(-30,30))
1402
      local hit2, pos2 = rayCast(cf2, CFrame.new(cf2, cf2 - Vector3.new(0, 1, 0)).lookVector, 999, Character)
1403
      if hit2 ~= nil then
1404
        local d1 = CFuncs.Part.Create(workspace, "Neon", 0, 0.5, BrickColor.new("Really black"), "Effect", Vector3.new())
1405
        d1.Anchored = true
1406
        d1.CFrame = CFrame.new(pos2)
1407
        game:GetService("Debris"):AddItem(d1, 5)
1408
        local msh = CFuncs.Mesh.Create("CylinderMesh", d1, "nil", "nil", Vector3.new(0, 0, 0), Vector3.new(30, 5, 30))
1409
        local d2 = d1:Clone()
1410
        d2.Parent = d1
1411
        d2.CFrame = CFrame.new(d1.Position)
1412
        d2.BrickColor = BrickColor.new("White")
1413
        d2.Mesh.Scale = Vector3.new(0, 5, 0)
1414
        table.insert(Effects, {
1415
          d1,
1416
          "QuadShot",
1417
          d2,
1418
          d2.Mesh,
1419
          0
1420
        })
1421
      end
1422
    end
1423
    for i = 0, 1, 0.2 do
1424
      swait()
1425
      PlayAnimationFromTable({
1426
        CFrame.new(-0.00381875038, -1.20960522, -0.0234894156, 0.906307876, 0.271653324, -0.323744416, -0.422617942, 0.582562923, -0.694272697, 0, 0.766045094, 0.64278698) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1427
        CFrame.new(-0.0485313386, 1.45186937, 0.12381205, 0.906306446, -0.036834389, 0.421012908, 0.178607732, 0.936241806, -0.302573651, -0.383024782, 0.349420667, 0.855100751) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1428
        CFrame.new(1.2566489, 0.0942437202, -0.366937846, 0.866025388, 0.499999881, 0, 0.32139343, -0.556669831, -0.766045094, -0.383022457, 0.663414538, -0.64278698) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1429
        CFrame.new(-0.669512153, 0.883427501, -1.42651618, 0.814972997, -0.183017969, 0.54984045, 0.413680524, -0.480712831, -0.773165226, 0.405818164, 0.85756737, -0.316057026) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1430
        CFrame.new(0.663835824, -0.644426942, 0.718474984, 0.819152117, -0.0996050313, -0.564861536, 0.496729434, -0.369217664, 0.785454273, -0.28679204, -0.923989952, -0.252968639) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1431
        CFrame.new(-0.597848773, -1.58645034, 0.419145882, 0.845831037, -0.0996147096, 0.524067461, -0.385522783, 0.564860702, 0.729592204, -0.368703246, -0.819151759, 0.439372897) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1432
      }, 0.4, false)
1433
    end
1434
    Humanoid.WalkSpeed = 45
1435
    attack = false
1436
  end
1437
  function DisappearJetOnly()
1438
    for _, i in pairs(m:children()) do
1439
      if i == JetpackHandle then
1440
        coroutine.resume(coroutine.create(function(Part)
1441
          for i = 0, 1, 0.3 do
1442
            swait()
1443
            Part.Transparency = i
1444
          end
1445
          Part.Transparency = 1
1446
        end), i)
1447
      end
1448
    end
1449
  end
1450
  function ReappearJetOnly()
1451
    for _, i in pairs(m:children()) do
1452
      if i == JetpackHandle then
1453
        coroutine.resume(coroutine.create(function(Part)
1454
          for i = 0, 1, 0.3 do
1455
            swait()
1456
            Part.Transparency = i
1457
          end
1458
          Part.Transparency = 0
1459
        end), i)
1460
      end
1461
    end
1462
  end
1463
  local floornum = 0
1464
  function JetDash()
1465
    attack = true
1466
    ReappearJetOnly()
1467
    Humanoid.WalkSpeed = 45
1468
    for i = 0, 1, 0.05 do
1469
      swait()
1470
      	Effects.Wave.Create(BrickColor.new("Really black"), Torso.CFrame * CFrame.Angles(2.4, 0, 0), 1, 1, 1, 2,2,2,0.4)
1471
      	Effects.Break.Create(BrickColor.new("Really black"), Torso.CFrame, 0.2, 0.2, 0.2)
1472
      	Effects.Break.Create(BrickColor.new("Really black"), Torso.CFrame, 0.2, 0.2, 0.2)
1473
      	Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 15,15,15, 0.3, 1)
1474
      	Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 15,15,15,0.3, 1)
1475
      	Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 10,10,10, 0.2, 1)
1476
      	Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 10,10,10, 0.2, 1)
1477
      RootPart.Velocity = RootPart.CFrame.lookVector * 400
1478
      PlayAnimationFromTable({
1479
        CFrame.new(0, -0.436519086, -1.54268694, 1, 0, 0, 0, 0.573575079, 0.81915313, 0, -0.81915313, 0.573575079) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1480
        CFrame.new(0, 1.383762, 0.294095755, 1, 0, 0, 0, 0.766045392, -0.642790735, 0, 0.642790735, 0.766045392) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1481
        CFrame.new(0.639911652, 0.428372383, -0.839826643, 0.262888074, 0.933915675, 0.242263183, 0.536961675, 0.0669959337, -0.840942383, -0.80159986, 0.351159722, -0.483864516) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1482
        CFrame.new(-1.42905915, 0.103630304, -0.677020133, 0.509720683, 0.0942112952, 0.855166197, 0.742046118, 0.45486632, -0.492406994, -0.435376555, 0.885562658, 0.161945611) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1483
        CFrame.new(0.598487258, -1.49273849, 0.0829842687, 0.984807909, 7.31955607E-10, -0.173648015, 0.122787923, 0.707105517, 0.696365893, 0.122787446, -0.707108378, 0.696363151) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1484
        CFrame.new(-0.599626899, -1.7493062, -0.188390553, 0.996194661, 0, 0.087156795, -0.0298094582, 0.939692497, 0.340719461, -0.0819005892, -0.342020988, 0.936116517) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1485
      }, 0.6, false)
1486
    end
1487
    for i = 0, 1, 0.05 do
1488
      swait()
1489
      Effects.Fire.Create(BrickColor.new("Really black"), EffectPartL3.CFrame, 3, 3, 3, 0.3)
1490
      Effects.Fire.Create(BrickColor.new("Really black"), EffectPartR3.CFrame, 3, 3, 3, 0.3)
1491
      RootPart.Velocity = RootPart.CFrame.lookVector * 60
1492
      PlayAnimationFromTable({
1493
        CFrame.new(-0.313091278, -0.629250288, 0.409977496, 0.422617137, -0.383021861, -0.821394563, 0, 0.906308115, -0.422617614, 0.906308293, 0.178605452, 0.383021355) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1494
        CFrame.new(-2.89082527E-6, 1.56999886, -0.169927716, 0.499998629, -0.0754772127, 0.862731218, -0.224145666, 0.950971425, 0.213101521, -0.836516559, -0.29992786, 0.458566666) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1495
        CFrame.new(0.639911413, 0.428367913, -0.839831948, 0.262887627, 0.933916271, 0.242261022, 0.536960125, 0.0669948608, -0.840943277, -0.801600933, 0.351158082, -0.483863741) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1496
        CFrame.new(-1.42906761, 0.103628337, -0.677013278, 0.509718478, 0.0942142606, 0.85516715, 0.742045939, 0.454867214, -0.4924061, -0.435379177, 0.885561645, 0.161942929) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1497
        CFrame.new(0.255052269, -1.74161863, 0.0939150751, 0.973724782, 0.171020329, -0.150378793, -0.13000688, 0.959606647, 0.249509975, 0.186975896, -0.223403811, 0.956624985) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1498
        CFrame.new(-0.966920853, -1.65688598, 0.10182327, 0.929320216, 0.24122712, 0.279595017, -0.312094092, 0.917783141, 0.245502412, -0.197385877, -0.315410316, 0.928199947) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1499
      }, 0.36, false)
1500
      CFuncs.Sound.Create("596046130", JetpackHandle, 1, 1)
1501
    end
1502
    DisappearJetOnly()
1503
    Humanoid.WalkSpeed = 45
1504
    attack = false
1505
  end
1506
  function findRandomTorso(pos)
1507
    local list = game.Workspace:children()
1508
    local torso
1509
    local dist = 10000
1510
    local temp, human, temp2
1511
    local list2 = {}
1512
    for x = 1, #list do
1513
      temp2 = list[x]
1514
      if temp2.className == "Model" and temp2.Name ~= Character.Name and temp2.Name ~= "Crystal" then
1515
        temp = temp2:findFirstChild("Torso")
1516
        human = temp2:findFirstChild("Humanoid")
1517
        if temp ~= nil and human ~= nil and human.Health > 0 and dist > pos.magnitude then
1518
          local dohit = true
1519
          if dohit == true then
1520
            torso = temp
1521
            table.insert(list2, temp)
1522
          end
1523
        end
1524
      end
1525
    end
1526
    if #list2 > 0 then
1527
      rand = math.random(1, #list2)
1528
      return list2[rand], dist
1529
    else
1530
      return nil, dist
1531
    end
1532
  end
1533
  Mouse.Button1Down:connect(function()
1534
    if attack ~= false or attacktype == 1 then
1535
    end
1536
  end)
1537
  Mouse.KeyDown:connect(function(k)
1538
    k = k:lower()
1539
    if attack == false and k == "z" then
1540
      SpinShot()
1541
    elseif attack == false and k == "x" then
1542
      AutoShot()
1543
    elseif attack == false and k == "c" then
1544
      MortarShot()
1545
    elseif attack == false and k == "v" then
1546
      Crater(Torso,30)
1547
      JetDash()
1548
    end
1549
  end)
1550
  while true do
1551
    swait()
1552
    local aim = CFrame.new(RootPart.Position, Mouse.Hit.p)
1553
    local direction = aim.lookVector
1554
    local headingA = math.atan2(direction.x, direction.z)
1555
    headingA = math.deg(headingA)
1556
    Humanoid.AutoRotate = false
1557
    RootPart.CFrame = CFrame.new(RootPart.Position) * CFrame.Angles(math.rad(0), math.rad(headingA - 180), math.rad(0))
1558
    Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
1559
    velocity = RootPart.Velocity.y
1560
    sine = sine + change
1561
    local hit, pos = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
1562
    if RootPart.Velocity.y > 1 and hit == nil then
1563
      Anim = "Jump"
1564
      if attack == false then
1565
        PlayAnimationFromTable({
1566
          CFrame.new(0.127259433, -0.0596159771, 0.189378753, 0.965925872, 0.0225571971, 0.257834047, 0.0225579981, 0.985066533, -0.17069003, -0.257833958, 0.170690134, 0.950992465) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1567
          CFrame.new(0.0244209729, 1.56254399, -0.173544556, 0.96592474, 0.0225591958, -0.257838368, 0.0449432544, 0.966441274, 0.252925694, 0.254891455, -0.255895257, 0.932495654) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1568
          CFrame.new(0.658500612, 0.398768902, -0.862450778, 0.343670964, 0.900792718, 0.265448391, 0.2137326, 0.20021911, -0.956154108, -0.914444566, 0.385337412, -0.123719275) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1569
          CFrame.new(-1.43523574, 0.121549249, -0.687813759, 0.410701752, 0.118069187, 0.904092729, 0.739943445, 0.536207557, -0.406159192, -0.532736301, 0.835787892, 0.132856861) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1570
          CFrame.new(0.641040266, -1.90806067, 0.227101922, 0.962249994, -0.0841864049, -0.258819878, 0.170085624, 0.928400099, 0.330369651, 0.212475777, -0.361919671, 0.907671988) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1571
          CFrame.new(-0.500004053, -1.35084605, -0.555529714, 0.981060445, 0.0871543288, 0.172987863, -0.140045926, 0.936115682, 0.322606146, -0.133820146, -0.340722382, 0.930591524) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1572
        }, 0.3, false)
1573
      end
1574
    elseif RootPart.Velocity.y < -1 and hit == nil then
1575
      Anim = "Fall"
1576
      if attack == false then
1577
        PlayAnimationFromTable({
1578
          CFrame.new(0.163334131, -0.0871596038, -0.16742219, 0.867043138, 0.0880189762, 0.490396827, 0.0449440032, 0.966441453, -0.252924889, -0.496202052, 0.24133715, 0.833990455) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1579
          CFrame.new(0.0244172066, 1.5625447, -0.17354542, 0.866278768, 0.108875886, -0.487552434, 0.108873315, 0.911355376, 0.396961033, 0.487552851, -0.396960288, 0.777634263) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1580
          CFrame.new(0.689669132, 0.354625255, -0.940430343, 0.229587287, 0.87174952, 0.432831228, 0.436280668, 0.305352151, -0.846415639, -0.870028138, 0.383162051, -0.310222536) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1581
          CFrame.new(-1.47630322, 0.0475490689, -0.634548545, 0.410701722, 0.118068904, 0.904093027, 0.739943504, 0.536207497, -0.406158984, -0.532736182, 0.835787833, 0.132856965) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1582
          CFrame.new(0.720636785, -1.87088692, -0.163134515, 0.96225059, -0.185678095, -0.198991448, 0.170083165, 0.98103714, -0.0929410458, 0.212475047, 0.0555875003, 0.975584149) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1583
          CFrame.new(-0.500012517, -1.35084641, -0.555533409, 0.981287122, -0.0532096401, 0.185053408, 0.0246368051, 0.987856567, 0.153402999, -0.190968931, -0.14597322, 0.970681846) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1584
        }, 0.3, false)
1585
      end
1586
    elseif Torsovelocity < 1 and hit ~= nil then
1587
      Anim = "Idle"
1588
      if attack == false then
1589
        change = 1
1590
        PlayAnimationFromTable({
1591
          CFrame.new(-0.2541008, -0.180074736, -0.241802737, 0.76604414, -1.48394264E-7, -0.642788053, 0.0560230091, 0.996194661, 0.0667653158, 0.640342057, -0.0871560946, 0.763129115) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1592
          CFrame.new(1.35600567E-6, 1.49999166, -5.73694706E-7, 0.766043305, -0.0560226552, 0.64034313, -9.31413126E-7, 0.996194601, 0.0871566758, -0.642789006, -0.0667664111, 0.76312834) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1593
          CFrame.new(0.965944111, 0.410506815, -0.758076906, 0.409578711, 0.866023779, 0.286785841, 0.370432287, 0.129400983, -0.919802964, -0.833687246, 0.482963026, -0.267803341) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1594
          CFrame.new(-1.37906599, 0.100769401, -0.915000141, 0.633367777, 0.168905735, 0.755190313, 0.68845278, 0.322659701, -0.649560332, -0.353385001, 0.931322694, 0.0880800188) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1595
          CFrame.new(0.59794265, -2.0041101, -0.0749895424, 0.981711328, -0.0754808784, -0.174771756, 0.0819018856, 0.996202469, 0.0298143364, 0.171854109, -0.04358197, 0.984157085) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
1596
          CFrame.new(-0.786915421, -1.82557595, -0.30038017, 0.813531935, 0.108696118, 0.57126832, -0.062976934, 0.993065894, -0.0992677882, -0.578093946, 0.0447808057, 0.814740956) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
1597
        }, 0.3, false)
1598
      end
1599
    elseif Torsovelocity > 2 and hit ~= nil then
1600
      Anim = "Walk"
1601
      if attack == false then
1602
        change = 3
1603
        PlayAnimationFromTable({
1604
          CFrame.new(0, -0.234493911, -0.148225456, 1, 0, 0, 0, 0.972469866, 0.233028963, 0, -0.233028963, 0.972469866) * CFrame.new(0, 0, 0) * CFrame.Angles(-0.2, math.rad(-10 * math.cos(sine / 10)), 0),
1605
          CFrame.new(0, 1.49999082, 3.57627869E-6, 1, 0, 0, 0, 0.991436481, -0.130595058, 0, 0.130595058, 0.991436481) * CFrame.new(0, 0, 0) * CFrame.Angles(0.15, math.rad(10 * math.cos(sine / 10)), math.rad(-3 * math.cos(sine / 10))),
1606
          CFrame.new(0.678833663, 0.365906566, -0.753261089, 0.337660074, 0.901719749, 0.269976407, 0.271790266, 0.181202337, -0.945143342, -0.901174843, 0.39251405, -0.183893844) * CFrame.new(math.rad(5 * math.cos(sine / 10)), math.rad(-5 * math.cos(sine / 5)), 0) * CFrame.Angles(0, 0, 0),
1607
          CFrame.new(-1.42503321, 0.101834446, -0.631737471, 0.459770948, 0.0983300805, 0.882576883, 0.674444914, 0.607868612, -0.419070512, -0.577697933, 0.787925959, 0.213162094) * CFrame.new(math.rad(5 * math.cos(sine / 10)), math.rad(5 * math.cos(sine / 5)), 0) * CFrame.Angles(0, 0, 0),
1608
          CFrame.new(0.5, -1.85 - 0.5 * math.cos(sine / 8) / 2, 0 + 1.8 * math.sin(sine / 8) / 2) * CFrame.Angles(math.rad(-50 * math.sin(sine / 8)), math.rad(0), math.rad(0)),
1609
          CFrame.new(-0.5, -1.85 + 0.5 * math.cos(sine / 8) / 2, 0 - 1.8 * math.sin(sine / 8) / 2) * CFrame.Angles(math.rad(50 * math.sin(sine / 8)), math.rad(0), math.rad(0))
1610
        }, 0.3, false)
1611
      end
1612
    end
1613
    if 0 < #Effects then
1614
      for e = 1, #Effects do
1615
        if Effects[e] ~= nil then
1616
          local Thing = Effects[e]
1617
          if Thing ~= nil then
1618
            local Part = Thing[1]
1619
            local Mode = Thing[2]
1620
            local Delay = Thing[3]
1621
            local IncX = Thing[4]
1622
            local IncY = Thing[5]
1623
            local IncZ = Thing[6]
1624
            if Thing[2] == "Shoot" then
1625
              local Look = Thing[1]
1626
              local move = 30
1627
              if Thing[8] == 3 then
1628
                move = 10
1629
              end
1630
              local hit, pos = rayCast(Thing[4], Look, move, Character)
1631
              local mag = (Thing[4] - pos).magnitude
1632
              Effects.Cylinder.Create(BrickColor.new("Really black"), CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 1, mag * 5, 1, 0.5, 0, 0.5, 0.2)
1633
              Thing[4] = Thing[4] + Look * move
1634
              Thing[3] = Thing[3] - 1
1635
              if hit ~= nil then
1636
                Thing[3] = 0
1637
                local target, distance = findNearestTorso(pos)
1638
                if hit.Parent:findFirstChild("Humanoid") == nil and target ~= nil and Thing[5] > 0 then
1639
                  Thing[3] = 50
1640
                  Thing[5] = Thing[5] - 1
1641
                  Thing[6] = Thing[6] - 1
1642
                  spread = Vector3.new((math.random(-1, 0) + math.random()) * 2, (math.random(-1, 0) + math.random()) * 2, (math.random(-1, 0) + math.random()) * 0) * (pos + target.Position).magnitude / 100
1643
                  local MouseLook = CFrame.new((pos + target.Position) / 0, target.Position)
1644
                  Thing[1] = MouseLook.lookVector
1645
                end
1646
                if Thing[8] == 1 or Thing[8] == 3 then
1647
                  MagnitudeDamage2(hit, 5, 30, 80, math.random(5, 10), "Normal", "", 1)
1648
                end
1649
                ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
1650
                ref.Anchored = true
1651
                ref.CFrame = CFrame.new(pos)
1652
                Effects.Sphere.Create(BrickColor.new("Really black"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
1653
                game:GetService("Debris"):AddItem(ref, 1)
1654
              end
1655
              if Thing[3] <= 0 then
1656
                table.remove(Effects, e)
1657
              end
1658
            end
1659
            if Thing[2] == "FireWave" then
1660
              if Thing[3] <= Thing[4] then
1661
                Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0)
1662
                Thing[3] = Thing[3] + 1
1663
                Thing[6].Scale = Thing[6].Scale + Vector3.new(Thing[5], 0, Thing[5])
1664
              else
1665
                Part.Parent = nil
1666
                table.remove(Effects, e)
1667
              end
1668
            end
1669
            if Thing[2] ~= "Shoot" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" then
1670
              if Thing[1].Transparency <= 1 then
1671
                if Thing[2] == "Block1" then
1672
                  Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1673
                  Mesh = Thing[7]
1674
                  Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1675
                  Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1676
                elseif Thing[2] == "Block2" then
1677
                  Thing[1].CFrame = Thing[1].CFrame
1678
                  Mesh = Thing[7]
1679
                  Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1680
                  Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1681
                elseif Thing[2] == "Fire" then
1682
                  Thing[1].CFrame = CFrame.new(Thing[1].Position) + Vector3.new(0, 0.2, 0)
1683
                  Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1684
                  Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1685
                elseif Thing[2] == "Cylinder" then
1686
                  Mesh = Thing[7]
1687
                  Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1688
                  Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1689
                elseif Thing[2] == "Blood" then
1690
                  Mesh = Thing[7]
1691
                  Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
1692
                  Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
1693
                  Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1694
                elseif Thing[2] == "Elec" then
1695
                  Mesh = Thing[10]
1696
                  Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
1697
                  Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1698
                elseif Thing[2] == "QuadShot" then
1699
                  if Thing[5] < 30 then
1700
                    Thing[5] = Thing[5] + 2
1701
                    Thing[4].Scale = Vector3.new(Thing[5], 5, Thing[5])
1702
                  else
1703
                    refda = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Black"), "Reference", Vector3.new())
1704
                    refda.Anchored = true
1705
                    refda.CFrame = CFrame.new(Thing[1].Position)
1706
                    game:GetService("Debris"):AddItem(refda, 1)
1707
                    CFuncs.Sound.Create("633129760", refda, 1, 1)
1708
                    MagnitudeDamage(refda, 20, 10, 40, math.random(99, 99), "Normal", "315748999", 1)
1709
                    Effects.Cylinder.Create(BrickColor.new("Really black"), CFrame.new(refda.Position), 3, 9999, 3, 1, 1, 1, 0.1)
1710
                    for i = 1, 5 do
1711
                      Effects.Sphere.Create(BrickColor.new("Really black"), CFrame.new(refda.Position), 10, 10, 10, 4 * i, 4 * i, 4 * i, 0.08)
1712
                    end
1713
                    Thing[1].Parent = nil
1714
                    table.remove(Effects, e)
1715
                  end
1716
                elseif Thing[2] == "Disappear" then
1717
                  Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1718
                elseif Thing[2] == "Shatter" then
1719
                  Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1720
                  Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
1721
                  Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
1722
                  Thing[6] = Thing[6] + Thing[5]
1723
                end
1724
              else
1725
                Part.Parent = nil
1726
                table.remove(Effects, e)
1727
              end
1728
            end
1729
          end
1730
        end
1731
      end
1732
    end
1733
  end