Advertisement
Infintyboy

gaben

May 19th, 2018
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 87.95 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. local rp = RealPlayer
  6. script.Parent = rp.Character
  7.  
  8. --RemoteEvent for communicating
  9. local Event = Instance.new("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event to make stuff like Mouse.KeyDown work
  13. local function fakeEvent()
  14. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --Creating fake input objects with fake variables
  20. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  21. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24. end}
  25. --Merged 2 functions into one by checking amount of arguments
  26. CAS.UnbindAction = CAS.BindAction
  27.  
  28. --This function will trigger the events that have been :Connect()'ed
  29. local function te(self,ev,...)
  30. local t = m[ev]
  31. if t and t._fakeEvent then
  32. for _,f in pairs(t.Functions) do
  33. f(...)
  34. end
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=rp then return end
  42. m.Target = io.Target
  43. m.Hit = io.Hit
  44. if not io.isMouse then
  45. local b = io.UserInputState == Enum.UserInputState.Begin
  46. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  47. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  48. end
  49. for _,t in pairs(CAS.Actions) do
  50. for _,k in pairs(t.Keys) do
  51. if k==io.KeyCode then
  52. t.Function(t.Name,io.UserInputState,io)
  53. end
  54. end
  55. end
  56. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  57. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  58. end
  59. end)
  60. Event.Parent = NLS([==[
  61. local Player = game:GetService("Players").LocalPlayer
  62. local Event = script:WaitForChild("UserInput_Event")
  63.  
  64. local Mouse = Player:GetMouse()
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local h,t
  75. --Give the server mouse data 30 times every second, but only if the values changed
  76. --If player is not moving their mouse, client won't fire events
  77. while wait(1/30) do
  78. if h~=Mouse.Hit or t~=Mouse.Target then
  79. h,t=Mouse.Hit,Mouse.Target
  80. Event:FireServer({isMouse=true,Target=t,Hit=h})
  81. end
  82. end]==],Player.Character)
  83.  
  84. ----Sandboxed game object that allows the usage of client-side methods and services
  85. --Real game object
  86. local _rg = game
  87.  
  88. --Metatable for fake service
  89. local fsmt = {
  90. __index = function(self,k)
  91. local s = rawget(self,"_RealService")
  92. if s then return s[k] end
  93. end,
  94. __newindex = function(self,k,v)
  95. local s = rawget(self,"_RealService")
  96. if s then s[k]=v end
  97. end,
  98. __call = function(self,...)
  99. local s = rawget(self,"_RealService")
  100. if s then return s(...) end
  101. end
  102. }
  103. local function FakeService(t,RealService)
  104. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  105. return setmetatable(t,fsmt)
  106. end
  107.  
  108. --Fake game object
  109. local g = {
  110. GetService = function(self,s)
  111. return self[s]
  112. end,
  113. Players = FakeService({
  114. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  115. },"Players"),
  116. UserInputService = FakeService(UIS,"UserInputService"),
  117. ContextActionService = FakeService(CAS,"ContextActionService"),
  118. }
  119. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  120. g.service = g.GetService
  121.  
  122. g.RunService = FakeService({
  123. RenderStepped = _rg:GetService("RunService").Heartbeat,
  124. BindToRenderStep = function(self,name,_,fun)
  125.  
  126. end,
  127. UnbindFromRenderStep = function(self,name)
  128. self._btrs[name]:Disconnect()
  129. end,
  130. },"RunService")
  131.  
  132. setmetatable(g,{
  133. __index=function(self,s)
  134. return _rg:GetService(s) or typeof(_rg[s])=="function"
  135. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  136. end,
  137. __newindex = fsmt.__newindex,
  138. __call = fsmt.__call
  139. })
  140. --Changing owner to fake player object to support owner:GetMouse()
  141. game,owner = g,g.Players.LocalPlayer
  142. end
  143.  
  144. Player = game:GetService("Players").LocalPlayer
  145. PlayerGui = Player.PlayerGui
  146. Cam = workspace.CurrentCamera
  147. Backpack = Player.Backpack
  148. Character = Player.Character
  149. Humanoid = Character.Humanoid
  150. Mouse = Player:GetMouse()
  151. RootPart = Character["HumanoidRootPart"]
  152. Torso = Character["Torso"]
  153. Head = Character["Head"]
  154. RightArm = Character["Right Arm"]
  155. LeftArm = Character["Left Arm"]
  156. RightLeg = Character["Right Leg"]
  157. LeftLeg = Character["Left Leg"]
  158. RootJoint = RootPart["RootJoint"]
  159. Neck = Torso["Neck"]
  160. RightShoulder = Torso["Right Shoulder"]
  161. LeftShoulder = Torso["Left Shoulder"]
  162. RightHip = Torso["Right Hip"]
  163. LeftHip = Torso["Left Hip"]
  164. Character = Player.Character
  165. PlayerGui = Player.PlayerGui
  166. Backpack = Player.Backpack
  167. local LocalPlayer = game.Players.localPlayer
  168. local Player = game.Players.LocalPlayer
  169. local Mouse = Player:GetMouse()
  170. local Character = Player.Character
  171. local Humanoid = Character.Humanoid
  172. Torso = Character.Torso
  173. Head = Character.Head
  174. Humanoid = Character.Humanoid
  175. RootPart = Character.HumanoidRootPart
  176. RootJoint = RootPart.RootJoint
  177. LeftArm = Character["Left Arm"]
  178. LeftLeg = Character["Left Leg"]
  179. RightArm = Character["Right Arm"]
  180. RightLeg = Character["Right Leg"]
  181. LS = Torso["Left Shoulder"]
  182. LH = Torso["Left Hip"]
  183. RS = Torso["Right Shoulder"]
  184. RH = Torso["Right Hip"]
  185. IT = Instance.new
  186. CF = CFrame.new
  187. VT = Vector3.new
  188. RAD = math.rad
  189. C3 = Color3.new
  190. UD2 = UDim2.new
  191. BRICKC = BrickColor.new
  192. ANGLES = CFrame.Angles
  193. EULER = CFrame.fromEulerAnglesXYZ
  194. COS = math.cos
  195. ACOS = math.acos
  196. SIN = math.sin
  197. ASIN = math.asin
  198. ABS = math.abs
  199. MRANDOM = math.random
  200. FLOOR = math.floor
  201. --Health--
  202. Humanoid.MaxHealth = math.huge
  203. wait()
  204. Humanoid.Health = Humanoid.MaxHealth
  205. Humanoid.DisplayDistanceType="None"
  206. ForceField = Instance.new("ForceField", game.Players.LocalPlayer.Character)
  207. ForceField.Visible = false
  208. --Body Colours--
  209. local BC = Character["Body Colors"]
  210. BC.HeadColor = BrickColor.new("White")
  211. BC.LeftArmColor = BrickColor.new("White")
  212. BC.LeftLegColor = BrickColor.new("White")
  213. BC.RightArmColor = BrickColor.new("White")
  214. BC.RightLegColor = BrickColor.new("White")
  215. BC.TorsoColor = BrickColor.new("White")
  216. --Sound--
  217. sound = Instance.new("Sound", Character)
  218. sound.SoundId = "rbxassetid://142281681"
  219. sound.Volume = 100000000
  220. sound.EmitterSize = 25
  221. sound:Play()
  222. sound.Looped = true
  223. --NameTag--
  224. CV="Maroon"
  225. Player = game.Players.LocalPlayer
  226. char = Player.Character
  227. local txt = Instance.new("BillboardGui", Character)
  228. txt.Adornee = Character .Head
  229. txt.Name = "_status"
  230. txt.Size = UDim2.new(2, 0, 1.2, 0)
  231. txt.StudsOffset = Vector3.new(-9, 8, 0)
  232. local text = Instance.new("TextLabel", txt)
  233. text.Size = UDim2.new(10, 0, 7, 0)
  234. text.FontSize = "Size24"
  235. text.TextScaled = true
  236. text.TextTransparency = 0
  237. text.BackgroundTransparency = 1
  238. text.TextTransparency = 0
  239. text.TextStrokeTransparency = 0
  240. text.Font = "Bodoni"
  241. text.TextStrokeColor3 = Color3.new(255,255,255)
  242.  
  243. v=Instance.new("Part")
  244. v.Name = "ColorBrick"
  245. v.Parent=Player.Character
  246. v.FormFactor="Symmetric"
  247. v.Anchored=true
  248. v.CanCollide=false
  249. v.BottomSurface="Smooth"
  250. v.TopSurface="Smooth"
  251. v.Size=Vector3.new(10,5,3)
  252. v.Transparency=1
  253. v.CFrame=Character.Torso.CFrame
  254. v.BrickColor=BrickColor.new(CV)
  255. v.Transparency=1
  256. text.TextColor3 = Color3.new(255,0,0)
  257. v.Shape="Block"
  258. text.Text = "Gaben"
  259. --Remover--
  260. for i,v in pairs(Character:children()) do
  261. if v:IsA("Hat") then
  262. v:Destroy()
  263. end
  264. end
  265. for i,v in pairs(Character:children()) do
  266. if v:IsA("Accessory") then
  267. v:Destroy()
  268. end
  269. end
  270. for i,v in pairs(Character:children()) do
  271. if v:IsA("Hair") then
  272. v:Destroy()
  273. end
  274. end
  275.  
  276. --Clothes--
  277. shirt = Instance.new("Shirt", Character)
  278. shirt.Name = "Shirt"
  279. pants = Instance.new("Pants", Character)
  280. pants.Name = "Pants"
  281. Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=123108825"
  282. Character.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=280539985"
  283. --Gaben--
  284. wait(0.016666666666666666)
  285. Effects = {}
  286.  
  287. local acos = math.acos
  288. local sqrt = math.sqrt
  289. local Vec3 = Vector3.new
  290. local fromAxisAngle = CFrame.fromAxisAngle
  291.  
  292. local function toAxisAngle(CFr)
  293. local X,Y,Z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = CFr:components()
  294. local Angle = math.acos((R00+R11+R22-1)/2)
  295. local A = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  296. A = A == 0 and 0.00001 or A
  297. local B = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  298. B = B == 0 and 0.00001 or B
  299. local C = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  300. C = C == 0 and 0.00001 or C
  301. local x = (R21-R12)/sqrt(A)
  302. local y = (R02-R20)/sqrt(B)
  303. local z = (R10-R01)/sqrt(C)
  304. return Vec3(x,y,z),Angle
  305. end
  306.  
  307. function ApplyTrig(Num,Func)
  308. local Min,Max = Func(0),Func(1)
  309. local i = Func(Num)
  310. return (i-Min)/(Max-Min)
  311. --[[if Func == "sin" then
  312. return (math.sin((1-Num)*math.pi)+1)/2
  313. elseif Func == "cos" then
  314. return (math.cos((1-Num)*math.pi)+1)/2
  315. end]]
  316. end
  317.  
  318. function LerpCFrame(CFrame1,CFrame2,Num)
  319. local Vec,Ang = toAxisAngle(CFrame1:inverse()*CFrame2)
  320. return CFrame1*fromAxisAngle(Vec,Ang*Num) + (CFrame2.p-CFrame1.p)*Num
  321. end
  322.  
  323. function Crater(Torso,Radius)
  324. Spawn(function()
  325. local Ray = Ray.new(Torso.Position,Vector3.new(0,-1,0)*10)
  326. local Ignore = {}
  327. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  328. if v.Character ~= nil then
  329. Ignore[#Ignore+1] = v.Character
  330. end
  331. end
  332. local Hit,Pos,SurfaceNorm = Workspace:FindPartOnRayWithIgnoreList(Ray,Ignore)
  333. if Hit == nil then return end
  334. local Parts = {}
  335. for i = 1,360,10 do
  336. local P = Instance.new("Part",Torso.Parent)
  337. P.Anchored = true
  338. P.FormFactor = "Custom"
  339. P.BrickColor = BrickColor.new("Really black")
  340. P.Material = "Neon"
  341. P.TopSurface = "Smooth"
  342. P.BottomSurface = "Smooth"
  343. P.CanCollide = false
  344. P.Size = Vector3.new(5,10,10)*(math.random(80,100)/100)
  345. 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)))
  346. 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}
  347. if math.random(0,5) == 0 then -- rubble
  348. local P = Instance.new("Part",Torso.Parent)
  349. P.Anchored = true
  350. P.FormFactor = "Custom"
  351. P.BrickColor = BrickColor.new("Really black")
  352. P.Material = "Neon"
  353. P.TopSurface = "Smooth"
  354. P.BottomSurface = "Smooth"
  355. P.CanCollide = false
  356. P.Size = Vector3.new(2,2,2)*(math.random(80,100)/100)
  357. 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)))
  358. 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}
  359. end
  360. end
  361. for i = 0,1,0.05 do
  362. for i2,v in pairs(Parts) do
  363. v[1].CFrame = LerpCFrame(v[2],v[3],ApplyTrig(i,math.cos))
  364. end
  365. wait(0.02)
  366. end
  367. for i,v in pairs(Parts) do
  368. if v[1].Size.X > 2.1 then
  369. v[1].CFrame = v[1].CFrame+Vector3.new(0,2,0)
  370. end
  371. v[1].Anchored = false
  372. end
  373. for i = 0,1,0.05 do
  374. for i2,v in pairs(Parts) do
  375. v[1].Transparency = i
  376. if i == 1 then
  377. v[1]:Destroy()
  378. elseif i >= 0.25 then
  379. v[1].CanCollide = false
  380. end
  381. end
  382. wait(0.02)
  383. end
  384. Parts = nil
  385. end)
  386. end
  387. local Player = game.Players.localPlayer
  388. script.Parent = Player.PlayerGui
  389. local Character = Player.Character
  390. local Humanoid = Character.Humanoid
  391. local Mouse = Player:GetMouse()
  392. local LeftArm = Character["Left Arm"]
  393. local RightArm = Character["Right Arm"]
  394. local LeftLeg = Character["Left Leg"]
  395. local RightLeg = Character["Right Leg"]
  396. local Head = Character.Head
  397. local Torso = Character.Torso
  398. local Camera = game.Workspace.CurrentCamera
  399. local RootPart = Character.HumanoidRootPart
  400. local RootJoint = RootPart.RootJoint
  401. local attack = false
  402. local Anim = "Idle"
  403. local attacktype = 1
  404. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  405. local velocity = RootPart.Velocity.y
  406. local sine = 0
  407. local change = 1
  408. local Create = LoadLibrary("RbxUtility").Create
  409. Head.face:Destroy()
  410. Head.Transparency = 1
  411. local FakeHead = Head:Clone()
  412. FakeHead.Transparency = 0
  413. FakeHead.Size = Vector3.new(0.8,0.8,0.8)
  414. spawn(function()
  415. while wait() do
  416. for i,v in pairs(Character:GetChildren()) do
  417. if v:IsA'Part' then
  418. v.BrickColor = BrickColor.new("Really black")
  419. end
  420. end
  421. end
  422. end)
  423.  
  424. eye2 = Instance.new("Part", Character)
  425. eye2m = Instance.new("SpecialMesh", eye2)
  426. ogsize = eye2m.Scale
  427. local m = Create("Model")({
  428. Parent = Character,
  429. Name = "WeaponModel"
  430. })
  431. Humanoid.Animator.Parent = nil
  432. Character.Animate.Parent = nil
  433. local function newMotor(part0, part1, c0, c1)
  434. local w = Create("Motor")({
  435. Parent = part0,
  436. Part0 = part0,
  437. Part1 = part1,
  438. C0 = c0,
  439. C1 = c1
  440. })
  441. return w
  442. end
  443. function clerp(a, b, t)
  444. return a:lerp(b, t)
  445. end
  446. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  447. NeckCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  448. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  449. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  450. local RH = newMotor(Torso, RightLeg, CFrame.new(0.5, -2, 0), CFrame.new(0, 0, 0))
  451. local LH = newMotor(Torso, LeftLeg, CFrame.new(-0.5, -2, 0), CFrame.new(0, 0, 0))
  452. RootJoint.C1 = CFrame.new(0, 0, 0)
  453. RootJoint.C0 = CFrame.new(0, 0, 0)
  454. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  455. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  456. local rarmc1 = RW.C1
  457. local larmc1 = LW.C1
  458. local rlegc1 = RH.C1
  459. local llegc1 = LH.C1
  460. local resetc1 = false
  461. function PlayAnimationFromTable(table, speed, bool)
  462. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  463. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  464. RW.C0 = clerp(RW.C0, table[3], speed)
  465. LW.C0 = clerp(LW.C0, table[4], speed)
  466. RH.C0 = clerp(RH.C0, table[5], speed)
  467. LH.C0 = clerp(LH.C0, table[6], speed)
  468. if bool == true and resetc1 == false then
  469. resetc1 = true
  470. RootJoint.C1 = RootJoint.C1
  471. Torso.Neck.C1 = Torso.Neck.C1
  472. RW.C1 = rarmc1
  473. LW.C1 = larmc1
  474. RH.C1 = rlegc1
  475. LH.C1 = llegc1
  476. end
  477. end
  478. ArtificialHB = Create("BindableEvent", script)({Parent = script, Name = "Heartbeat"})
  479. script:WaitForChild("Heartbeat")
  480. frame = 0.03333333333333333
  481. tf = 0
  482. allowframeloss = false
  483. tossremainder = false
  484. lastframe = tick()
  485. script.Heartbeat:Fire()
  486. game:GetService("RunService").Heartbeat:connect(function(s, p)
  487. tf = tf + s
  488. if tf >= frame then
  489. if allowframeloss then
  490. script.Heartbeat:Fire()
  491. lastframe = tick()
  492. else
  493. for i = 1, math.floor(tf / frame) do
  494. script.Heartbeat:Fire()
  495. end
  496. lastframe = tick()
  497. end
  498. if tossremainder then
  499. tf = 0
  500. else
  501. tf = tf - frame * math.floor(tf / frame)
  502. end
  503. end
  504. end)
  505. function swait(num)
  506. if num == 0 or num == nil then
  507. ArtificialHB.Event:wait()
  508. else
  509. for i = 0, num do
  510. ArtificialHB.Event:wait()
  511. end
  512. end
  513. end
  514. function RemoveOutlines(part)
  515. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  516. end
  517. CFuncs = {
  518. Part = {
  519. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  520. local Part = Create("Part")({
  521. Parent = Parent,
  522. Reflectance = Reflectance,
  523. Transparency = Transparency,
  524. CanCollide = false,
  525. Locked = true,
  526. BrickColor = BrickColor.new(tostring(BColor)),
  527. Name = Name,
  528. Size = Size,
  529. Material = Material
  530. })
  531. RemoveOutlines(Part)
  532. return Part
  533. end
  534. },
  535. Mesh = {
  536. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  537. local Msh = Create(Mesh)({
  538. Parent = Part,
  539. Offset = OffSet,
  540. Scale = Scale
  541. })
  542. if Mesh == "SpecialMesh" then
  543. Msh.MeshType = MeshType
  544. Msh.MeshId = MeshId
  545. end
  546. return Msh
  547. end
  548. },
  549. Weld = {
  550. Create = function(Parent, Part0, Part1, C0, C1)
  551. local Weld = Create("Weld")({
  552. Parent = Parent,
  553. Part0 = Part0,
  554. Part1 = Part1,
  555. C0 = C0,
  556. C1 = C1
  557. })
  558. return Weld
  559. end
  560. },
  561. Sound = {
  562. Create = function(id, par, vol, pit)
  563. coroutine.resume(coroutine.create(function()
  564. local Sound = Create("Sound")({
  565. Volume = vol,
  566. Pitch = pit or 1,
  567. SoundId = "rbxassetid://" .. id,
  568. Parent = par or workspace
  569. })
  570. Sound:play()
  571. game:GetService("Debris"):AddItem(Sound, 10)
  572. end))
  573. end
  574. },
  575. Decal = {
  576. Create = function(Color, Texture, Transparency, Name, Parent)
  577. local Decal = Create("Decal")({
  578. Color3 = Color,
  579. Texture = "rbxassetid://" .. Texture,
  580. Transparency = Transparency,
  581. Name = Name,
  582. Parent = Parent
  583. })
  584. return Decal
  585. end
  586. },
  587. BillboardGui = {
  588. Create = function(Parent, Image, Position, Size)
  589. local BillPar = CFuncs.Part.Create(Parent, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "BillboardGuiPart", Vector3.new(1, 1, 1))
  590. BillPar.CFrame = CFrame.new(Position)
  591. local Bill = Create("BillboardGui")({
  592. Parent = BillPar,
  593. Adornee = BillPar,
  594. Size = UDim2.new(1, 0, 1, 0),
  595. SizeOffset = Vector2.new(Size, Size)
  596. })
  597. local d = Create("ImageLabel", Bill)({
  598. Parent = Bill,
  599. BackgroundTransparency = 1,
  600. Size = UDim2.new(1, 0, 1, 0),
  601. Image = "rbxassetid://" .. Image
  602. })
  603. return BillPar
  604. end
  605. },
  606. ParticleEmitter = {
  607. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  608. local Particle = Create("ParticleEmitter")({
  609. Parent = Parent,
  610. Color = ColorSequence.new(Color1, Color2),
  611. LightEmission = LightEmission,
  612. Size = Size,
  613. Texture = Texture,
  614. Transparency = Transparency,
  615. ZOffset = ZOffset,
  616. Acceleration = Accel,
  617. Drag = Drag,
  618. LockedToPart = LockedToPart,
  619. VelocityInheritance = VelocityInheritance,
  620. EmissionDirection = EmissionDirection,
  621. Enabled = Enabled,
  622. Lifetime = LifeTime,
  623. Rate = Rate,
  624. Rotation = Rotation,
  625. RotSpeed = RotSpeed,
  626. Speed = Speed,
  627. VelocitySpread = VelocitySpread
  628. })
  629. return Particle
  630. end
  631. },
  632. CreateTemplate = {}
  633. }
  634. function rayCast(Position, Direction, Range, Ignore)
  635. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  636. end
  637. function findNearestTorso(pos)
  638. local list = game.Workspace:children()
  639. local torso
  640. local dist = 1000
  641. local temp, human, temp2
  642. for x = 1, #list do
  643. temp2 = list[x]
  644. if temp2.className == "Model" and temp2.Name ~= Character.Name then
  645. temp = temp2:findFirstChild("Torso")
  646. human = temp2:findFirstChild("Humanoid")
  647. if temp ~= nil and human ~= nil and human.Health > 0 and dist > (temp.Position - pos).magnitude then
  648. torso = temp
  649. dist = (temp.Position - pos).magnitude
  650. end
  651. end
  652. end
  653. return torso, dist
  654. end
  655. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  656. if hit.Parent == nil then
  657. return
  658. end
  659. local h = hit.Parent:FindFirstChild("Humanoid")
  660. for _, v in pairs(hit.Parent:children()) do
  661. if v:IsA("Humanoid") then
  662. h = v
  663. end
  664. end
  665. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  666. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  667. return
  668. end
  669. local c = Create("ObjectValue")({
  670. Name = "creator",
  671. Value = game:service("Players").LocalPlayer,
  672. Parent = h
  673. })
  674. game:GetService("Debris"):AddItem(c, 0.5)
  675. if HitSound ~= nil and HitPitch ~= nil then
  676. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  677. end
  678. local blocked = false
  679. local block = hit.Parent:findFirstChild("Block")
  680. if block ~= nil and block.className == "IntValue" and block.Value > 0 then
  681. blocked = true
  682. block.Value = block.Value - 1
  683. print(block.Value)
  684. end
  685. if blocked == false then
  686. h.Health = 0
  687. else
  688. h.Health = h.Health - Damage / 2
  689. end
  690. if Type == "Knockdown" then
  691. local hum = hit.Parent.Humanoid
  692. hum.PlatformStand = true
  693. coroutine.resume(coroutine.create(function(HHumanoid)
  694. swait(1)
  695. HHumanoid.PlatformStand = false
  696. end), hum)
  697. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  698. local bodvol = Create("BodyVelocity")({
  699. velocity = angle * knockback,
  700. P = 5000,
  701. maxForce = Vector3.new(8000, 8000, 8000),
  702. Parent = hit
  703. })
  704. local rl = Create("BodyAngularVelocity")({
  705. P = 3000,
  706. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  707. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  708. Parent = hit
  709. })
  710. game:GetService("Debris"):AddItem(bodvol, 0.5)
  711. game:GetService("Debris"):AddItem(rl, 0.5)
  712. elseif Type == "Normal" then
  713. local vp = Create("BodyVelocity")({
  714. P = 500,
  715. maxForce = Vector3.new(math.huge, 0, math.huge),
  716. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  717. })
  718. game:GetService("Debris"):AddItem(vp, 0.5)
  719. elseif Type == "Up" then
  720. local bodyVelocity = Create("BodyVelocity")({
  721. velocity = Vector3.new(0, 20, 0),
  722. P = 5000,
  723. maxForce = Vector3.new(8000, 8000, 8000),
  724. Parent = hit
  725. })
  726. game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
  727. elseif Type == "DarkUp" then
  728. coroutine.resume(coroutine.create(function()
  729. for i = 0, 1, 0.1 do
  730. swait()
  731. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, 0.08, 1)
  732. end
  733. end))
  734. local bodyVelocity = Create("BodyVelocity")({
  735. velocity = Vector3.new(0, 20, 0),
  736. P = 5000,
  737. maxForce = Vector3.new(8000, 8000, 8000),
  738. Parent = hit
  739. })
  740. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  741. elseif Type == "Snare" then
  742. local bp = Create("BodyPosition")({
  743. P = 2000,
  744. D = 100,
  745. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  746. position = hit.Parent.Torso.Position,
  747. Parent = hit.Parent.Torso
  748. })
  749. game:GetService("Debris"):AddItem(bp, 1)
  750. elseif Type == "Freeze" then
  751. local BodPos = Create("BodyPosition")({
  752. P = 50000,
  753. D = 1000,
  754. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  755. position = hit.Parent.Torso.Position,
  756. Parent = hit.Parent.Torso
  757. })
  758. local BodGy = Create("BodyGyro")({
  759. maxTorque = Vector3.new(400000, 400000, 400000) * math.huge,
  760. P = 20000,
  761. Parent = hit.Parent.Torso,
  762. cframe = hit.Parent.Torso.CFrame
  763. })
  764. hit.Parent.Torso.Anchored = true
  765. coroutine.resume(coroutine.create(function(Part)
  766. swait(1.5)
  767. Part.Anchored = false
  768. end), hit.Parent.Torso)
  769. game:GetService("Debris"):AddItem(BodPos, 3)
  770. game:GetService("Debris"):AddItem(BodGy, 3)
  771. end
  772. local debounce = Create("BoolValue")({
  773. Name = "DebounceHit",
  774. Parent = hit.Parent,
  775. Value = true
  776. })
  777. game:GetService("Debris"):AddItem(debounce, Delay)
  778. c = Create("ObjectValue")({
  779. Name = "creator",
  780. Value = Player,
  781. Parent = h
  782. })
  783. game:GetService("Debris"):AddItem(c, 0.5)
  784. end
  785. end
  786. function ShowDamage(Pos, Text, Time, Color)
  787. local Rate = 0.03333333333333333
  788. local Pos = Pos or Vector3.new(0, 0, 0)
  789. local Text = Text or ""
  790. local Time = Time or 2
  791. local Color = Color or Color3.new(1, 0, 1)
  792. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  793. EffectPart.Anchored = true
  794. local BillboardGui = Create("BillboardGui")({
  795. Size = UDim2.new(3, 0, 3, 0),
  796. Adornee = EffectPart,
  797. Parent = EffectPart
  798. })
  799. local TextLabel = Create("TextLabel")({
  800. BackgroundTransparency = 1,
  801. Size = UDim2.new(1, 0, 1, 0),
  802. Text = Text,
  803. Font = "SciFi",
  804. TextColor3 = Color,
  805. TextScaled = true,
  806. BorderColor3 = Color3.new(0,0,0),
  807. Parent = BillboardGui
  808. })
  809. game.Debris:AddItem(EffectPart, Time)
  810. EffectPart.Parent = game:GetService("Workspace")
  811. delay(0, function()
  812. local Frames = Time / Rate
  813. for Frame = 1, Frames do
  814. wait(Rate)
  815. local Percent = Frame / Frames
  816. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  817. TextLabel.TextTransparency = Percent
  818. end
  819. if EffectPart and EffectPart.Parent then
  820. EffectPart:Destroy()
  821. end
  822. end)
  823. end
  824. function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  825. for _, c in pairs(workspace:children()) do
  826. local hum = c:findFirstChild("Humanoid")
  827. if hum ~= nil then
  828. local head = c:findFirstChild("Torso")
  829. if head ~= nil then
  830. local targ = head.Position - Part.Position
  831. local mag = targ.magnitude
  832. if Magnitude >= mag and c.Name ~= Player.Name then
  833. Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, 0, HitSound, HitPitch)
  834. end
  835. end
  836. end
  837. end
  838. end
  839. --//New Damage\\--
  840. function Damage2(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  841. if hit.Parent == nil then
  842. return
  843. end
  844. local h = hit.Parent:FindFirstChild("Humanoid")
  845. for _, v in pairs(hit.Parent:children()) do
  846. if v:IsA("Humanoid") then
  847. h = v
  848. end
  849. end
  850. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  851. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  852. return
  853. end
  854. local c = Create("ObjectValue")({
  855. Name = "creator",
  856. Value = game:service("Players").LocalPlayer,
  857. Parent = h
  858. })
  859. game:GetService("Debris"):AddItem(c, 0.5)
  860. if HitSound ~= nil and HitPitch ~= nil then
  861. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  862. end
  863. local Damage = math.random(minim, maxim)
  864. local blocked = false
  865. local block = hit.Parent:findFirstChild("Block")
  866. if block ~= nil and block.className == "IntValue" and block.Value > 0 then
  867. blocked = true
  868. block.Value = block.Value - 1
  869. print(block.Value)
  870. end
  871. if blocked == false then
  872. h.Health = h.Health - Damage
  873. 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)
  874. else
  875. h.Health = h.Health - Damage / 2
  876. 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)
  877. end
  878. if Type == "Knockdown" then
  879. local hum = hit.Parent.Humanoid
  880. hum.PlatformStand = true
  881. coroutine.resume(coroutine.create(function(HHumanoid)
  882. swait(1)
  883. HHumanoid.PlatformStand = false
  884. end), hum)
  885. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  886. local bodvol = Create("BodyVelocity")({
  887. velocity = angle * knockback,
  888. P = 5000,
  889. maxForce = Vector3.new(8000, 8000, 8000),
  890. Parent = hit
  891. })
  892. local rl = Create("BodyAngularVelocity")({
  893. P = 3000,
  894. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  895. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  896. Parent = hit
  897. })
  898. game:GetService("Debris"):AddItem(bodvol, 0.5)
  899. game:GetService("Debris"):AddItem(rl, 0.5)
  900. elseif Type == "Normal" then
  901. local vp = Create("BodyVelocity")({
  902. P = 500,
  903. maxForce = Vector3.new(math.huge, 0, math.huge),
  904. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  905. })
  906. if knockback > 0 then
  907. vp.Parent = hit.Parent.Torso
  908. end
  909. game:GetService("Debris"):AddItem(vp, 0.5)
  910. elseif Type == "Up" then
  911. local bodyVelocity = Create("BodyVelocity")({
  912. velocity = Vector3.new(0, 20, 0),
  913. P = 5000,
  914. maxForce = Vector3.new(8000, 8000, 8000),
  915. Parent = hit
  916. })
  917. game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
  918. elseif Type == "DarkUp" then
  919. coroutine.resume(coroutine.create(function()
  920. for i = 0, 1, 0.1 do
  921. swait()
  922. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, 0.08, 1)
  923. end
  924. end))
  925. local bodyVelocity = Create("BodyVelocity")({
  926. velocity = Vector3.new(0, 20, 0),
  927. P = 5000,
  928. maxForce = Vector3.new(8000, 8000, 8000),
  929. Parent = hit
  930. })
  931. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  932. elseif Type == "Snare" then
  933. local bp = Create("BodyPosition")({
  934. P = 2000,
  935. D = 100,
  936. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  937. position = hit.Parent.Torso.Position,
  938. Parent = hit.Parent.Torso
  939. })
  940. game:GetService("Debris"):AddItem(bp, 1)
  941. elseif Type == "Freeze" then
  942. local BodPos = Create("BodyPosition")({
  943. P = 50000,
  944. D = 1000,
  945. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  946. position = hit.Parent.Torso.Position,
  947. Parent = hit.Parent.Torso
  948. })
  949. local BodGy = Create("BodyGyro")({
  950. maxTorque = Vector3.new(400000, 400000, 400000) * math.huge,
  951. P = 20000,
  952. Parent = hit.Parent.Torso,
  953. cframe = hit.Parent.Torso.CFrame
  954. })
  955. hit.Parent.Torso.Anchored = true
  956. coroutine.resume(coroutine.create(function(Part)
  957. swait(1.5)
  958. Part.Anchored = false
  959. end), hit.Parent.Torso)
  960. game:GetService("Debris"):AddItem(BodPos, 3)
  961. game:GetService("Debris"):AddItem(BodGy, 3)
  962. end
  963. local debounce = Create("BoolValue")({
  964. Name = "DebounceHit",
  965. Parent = hit.Parent,
  966. Value = true
  967. })
  968. game:GetService("Debris"):AddItem(debounce, Delay)
  969. c = Create("ObjectValue")({
  970. Name = "creator",
  971. Value = Player,
  972. Parent = h
  973. })
  974. game:GetService("Debris"):AddItem(c, 0.5)
  975. end
  976. end
  977. function ShowDamage2(Pos, Text, Time, Color)
  978. local Rate = 0.03333333333333333
  979. local Pos = Pos or Vector3.new(0, 0, 0)
  980. local Text = Text or ""
  981. local Time = Time or 2
  982. local Color = Color or Color3.new(1, 0, 1)
  983. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  984. EffectPart.Anchored = true
  985. local BillboardGui = Create("BillboardGui")({
  986. Size = UDim2.new(3, 0, 3, 0),
  987. Adornee = EffectPart,
  988. Parent = EffectPart
  989. })
  990. local TextLabel = Create("TextLabel")({
  991. BackgroundTransparency = 1,
  992. Size = UDim2.new(1, 0, 1, 0),
  993. Text = Text,
  994. Font = "SciFi",
  995. TextColor3 = Color,
  996. TextScaled = true,
  997. Parent = BillboardGui
  998. })
  999. game.Debris:AddItem(EffectPart, Time)
  1000. EffectPart.Parent = game:GetService("Workspace")
  1001. delay(0, function()
  1002. local Frames = Time / Rate
  1003. for Frame = 1, Frames do
  1004. wait(Rate)
  1005. local Percent = Frame / Frames
  1006. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  1007. TextLabel.TextTransparency = Percent
  1008. end
  1009. if EffectPart and EffectPart.Parent then
  1010. EffectPart:Destroy()
  1011. end
  1012. end)
  1013. end
  1014. function MagnitudeDamage2(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  1015. for _, c in pairs(workspace:children()) do
  1016. local hum = c:findFirstChild("Humanoid")
  1017. if hum ~= nil then
  1018. local head = c:findFirstChild("Torso")
  1019. if head ~= nil then
  1020. local targ = head.Position - Part.Position
  1021. local mag = targ.magnitude
  1022. if Magnitude >= mag and c.Name ~= Player.Name then
  1023. Damage2(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, 0, HitSound, HitPitch)
  1024. end
  1025. end
  1026. end
  1027. end
  1028. end
  1029. ----------------------
  1030. Handle = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Really black", "Handle", Vector3.new(0.400000036, 0.400000006, 1.20000005))
  1031. 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))
  1032. Barrel = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Barrel", Vector3.new(0.250000003, 0.250000003, 0.250000024))
  1033. Mesh = Instance.new("SpecialMesh",Barrel)
  1034. Mesh.MeshId = "rbxassetid://442405779"
  1035. Mesh.TextureId = "rbxassetid://442405780"
  1036. Mesh.Scale = Vector3.new(0.06,0.06,0.06)
  1037. 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))
  1038. JetpackHandle = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Really black", "JetpackHandle", Vector3.new(0.200000003, 0.200000003, 0.200000003))
  1039. 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))
  1040. EffectPartR1 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartR1", Vector3.new(0.5, 0.5, 0.300000012))
  1041. 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))
  1042. EffectPartL1 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartL1", Vector3.new(0.5, 0.5, 0.300000012))
  1043. 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))
  1044. EffectPartR2 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartR2", Vector3.new(0.5, 0.5, 0.300000012))
  1045. 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))
  1046. EffectPartL2 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartL2", Vector3.new(0.5, 0.5, 0.300000012))
  1047. 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))
  1048. EffectPartL3 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartL3", Vector3.new(0.400000006, 0.5, 0.300000012))
  1049. 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))
  1050. EffectPartR3 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartR3", Vector3.new(0.400000006, 0.5, 0.300000012))
  1051. 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))
  1052. CFuncs.Mesh.Create("SpecialMesh", JetpackHandle, Enum.MeshType.FileMesh, "rbxassetid://0", Vector3.new(0, 0, 0), Vector3.new(1.29999995, 1.29999995, 1.29999995))
  1053. EffectModel = Create("Model")({Parent = Character, Name = "Effects"})
  1054. Effects = {
  1055. Block = {
  1056. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  1057. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1058. prt.Anchored = true
  1059. prt.CFrame = cframe
  1060. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1061. game:GetService("Debris"):AddItem(prt, 10)
  1062. if Type == 1 or Type == nil then
  1063. table.insert(Effects, {
  1064. prt,
  1065. "Block1",
  1066. delay,
  1067. x3,
  1068. y3,
  1069. z3,
  1070. msh
  1071. })
  1072. elseif Type == 2 then
  1073. table.insert(Effects, {
  1074. prt,
  1075. "Block2",
  1076. delay,
  1077. x3,
  1078. y3,
  1079. z3,
  1080. msh
  1081. })
  1082. end
  1083. end
  1084. },
  1085. Cylinder = {
  1086. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1087. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
  1088. prt.Anchored = true
  1089. prt.CFrame = cframe
  1090. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1091. game:GetService("Debris"):AddItem(prt, 2)
  1092. Effects[#Effects + 1] = {
  1093. prt,
  1094. "Cylinder",
  1095. delay,
  1096. x3,
  1097. y3,
  1098. z3,
  1099. msh
  1100. }
  1101. end
  1102. },
  1103. Head = {
  1104. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1105. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1106. prt.Anchored = true
  1107. prt.CFrame = cframe
  1108. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1109. game:GetService("Debris"):AddItem(prt, 10)
  1110. table.insert(Effects, {
  1111. prt,
  1112. "Cylinder",
  1113. delay,
  1114. x3,
  1115. y3,
  1116. z3,
  1117. msh
  1118. })
  1119. end
  1120. },
  1121. Sphere = {
  1122. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1123. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1124. prt.Anchored = true
  1125. prt.CFrame = cframe
  1126. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1127. game:GetService("Debris"):AddItem(prt, 10)
  1128. table.insert(Effects, {
  1129. prt,
  1130. "Cylinder",
  1131. delay,
  1132. x3,
  1133. y3,
  1134. z3,
  1135. msh
  1136. })
  1137. end
  1138. },
  1139. Elect = {
  1140. Create = function(cff, x, y, z)
  1141. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
  1142. prt.Anchored = true
  1143. prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  1144. prt.CFrame = CFrame.new(prt.Position)
  1145. game:GetService("Debris"):AddItem(prt, 2)
  1146. local xval = math.random() / 2
  1147. local yval = math.random() / 2
  1148. local zval = math.random() / 2
  1149. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
  1150. table.insert(Effects, {
  1151. prt,
  1152. "Elec",
  1153. 0.1,
  1154. x,
  1155. y,
  1156. z,
  1157. xval,
  1158. yval,
  1159. zval
  1160. })
  1161. end
  1162. },
  1163. Ring = {
  1164. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1165. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1166. prt.Anchored = true
  1167. prt.CFrame = cframe
  1168. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1169. game:GetService("Debris"):AddItem(prt, 10)
  1170. table.insert(Effects, {
  1171. prt,
  1172. "Cylinder",
  1173. delay,
  1174. x3,
  1175. y3,
  1176. z3,
  1177. msh
  1178. })
  1179. end
  1180. },
  1181. Wave = {
  1182. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1183. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1184. prt.Anchored = true
  1185. prt.CFrame = cframe
  1186. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1187. game:GetService("Debris"):AddItem(prt, 10)
  1188. table.insert(Effects, {
  1189. prt,
  1190. "Cylinder",
  1191. delay,
  1192. x3,
  1193. y3,
  1194. z3,
  1195. msh
  1196. })
  1197. end
  1198. },
  1199. Break = {
  1200. Create = function(brickcolor, cframe, x1, y1, z1)
  1201. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1202. prt.Anchored = true
  1203. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1204. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1205. local num = math.random(10, 50) / 1000
  1206. game:GetService("Debris"):AddItem(prt, 10)
  1207. table.insert(Effects, {
  1208. prt,
  1209. "Shatter",
  1210. num,
  1211. prt.CFrame,
  1212. math.random() - math.random(),
  1213. 0,
  1214. math.random(50, 100) / 100
  1215. })
  1216. end
  1217. },
  1218. Fire = {
  1219. Create = function(brickcolor, cframe, x1, y1, z1, delay)
  1220. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1221. prt.Anchored = true
  1222. prt.CFrame = cframe
  1223. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1224. game:GetService("Debris"):AddItem(prt, 10)
  1225. table.insert(Effects, {
  1226. prt,
  1227. "Fire",
  1228. delay,
  1229. 1,
  1230. 1,
  1231. 1,
  1232. msh
  1233. })
  1234. end
  1235. },
  1236. FireWave = {
  1237. Create = function(brickcolor, cframe, x1, y1, z1)
  1238. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new())
  1239. prt.Anchored = true
  1240. prt.CFrame = cframe
  1241. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1242. local d = Create("Decal")({
  1243. Parent = prt,
  1244. Texture = "rbxassetid://26356434",
  1245. Face = "Top"
  1246. })
  1247. local d = Create("Decal")({
  1248. Parent = prt,
  1249. Texture = "rbxassetid://26356434",
  1250. Face = "Bottom"
  1251. })
  1252. game:GetService("Debris"):AddItem(prt, 10)
  1253. table.insert(Effects, {
  1254. prt,
  1255. "FireWave",
  1256. 1,
  1257. 30,
  1258. math.random(400, 600) / 100,
  1259. msh
  1260. })
  1261. end
  1262. },
  1263. Lightning = {
  1264. Create = function(p0, p1, tym, ofs, col, th, tra, last)
  1265. local magz = (p0 - p1).magnitude
  1266. local curpos = p0
  1267. local trz = {
  1268. -ofs,
  1269. ofs
  1270. }
  1271. for i = 1, tym do
  1272. local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym))
  1273. local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
  1274. local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
  1275. li.Material = "Neon"
  1276. if tym == i then
  1277. local magz2 = (curpos - p1).magnitude
  1278. li.Size = Vector3.new(th, th, magz2)
  1279. li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
  1280. table.insert(Effects, {
  1281. li,
  1282. "Disappear",
  1283. last
  1284. })
  1285. else
  1286. li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
  1287. curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
  1288. game.Debris:AddItem(li, 10)
  1289. table.insert(Effects, {
  1290. li,
  1291. "Disappear",
  1292. last
  1293. })
  1294. end
  1295. end
  1296. end
  1297. },
  1298. EffectTemplate = {}
  1299. }
  1300. function Shootcombo()
  1301. local MouseLook = CFrame.new((Barrel.Position + Mouse.Hit.p) / 2, Mouse.Hit.p)
  1302. CFuncs.Sound.Create("173979241", Handle, 1, 1)
  1303. Effects.Sphere.Create(BrickColor.new("Really black"), Barrel.CFrame, 0.5, 0.5, 0.5, 1,1,1, 0.09)
  1304. Effects.Sphere.Create(BrickColor.new("Really black"), Barrel.CFrame, 1, 1, 1, 1,1,1, 0.09)
  1305. Effects.Block.Create(BrickColor.new("Really black"), Barrel.CFrame, 1, 1, 1, 1,1,1, 0.09, 1)
  1306. table.insert(Effects, {
  1307. MouseLook.lookVector,
  1308. "Shoot",
  1309. 30,
  1310. Barrel.Position,
  1311. 6,
  1312. 8,
  1313. 0,
  1314. 1
  1315. })
  1316. end
  1317. function Bolt()
  1318. CFuncs.Sound.Create("173979241", Handle, 1, 1)
  1319. end
  1320. function SpinShot()
  1321. attack = true
  1322. for i = 0, 1, 0.12 do
  1323. swait()
  1324. PlayAnimationFromTable({
  1325. 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),
  1326. 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),
  1327. 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),
  1328. 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),
  1329. 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),
  1330. 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)
  1331. }, 0.35, false)
  1332. end
  1333. Shootcombo()
  1334. for i = 0, 1, 0.3 do
  1335. swait()
  1336. RootPart.Velocity = RootPart.CFrame.lookVector * -10
  1337. PlayAnimationFromTable({
  1338. 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),
  1339. 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),
  1340. 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),
  1341. 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),
  1342. 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),
  1343. 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)
  1344. }, 0.5, false)
  1345. end
  1346. for i = 0, 1, 0.12 do
  1347. swait()
  1348. PlayAnimationFromTable({
  1349. 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),
  1350. 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),
  1351. 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),
  1352. 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),
  1353. 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),
  1354. 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)
  1355. }, 0.4, false)
  1356. end
  1357. Bolt()
  1358. attack = false
  1359. end
  1360. function LungeShot(Mode)
  1361. attack = true
  1362. Humanoid.Jump = true
  1363. CFuncs.Sound.Create("158149887", Torso, 1, 0.9)
  1364. if Mode == "Forward" then
  1365. RootPart.Velocity = RootPart.CFrame.lookVector * 80
  1366. for i = 0, 1, 0.1 do
  1367. swait()
  1368. PlayAnimationFromTable({
  1369. 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),
  1370. 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),
  1371. 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),
  1372. 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),
  1373. 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),
  1374. 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)
  1375. }, 0.3, false)
  1376. end
  1377. elseif Mode == "Backward" then
  1378. RootPart.Velocity = RootPart.CFrame.lookVector * -80
  1379. for i = 0, 1, 0.1 do
  1380. swait()
  1381. PlayAnimationFromTable({
  1382. 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),
  1383. 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),
  1384. 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),
  1385. 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),
  1386. 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),
  1387. 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)
  1388. }, 0.3, false)
  1389. end
  1390. end
  1391. local hitfloor
  1392. while hitfloor == nil do
  1393. swait()
  1394. hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 6, Character)
  1395. end
  1396. for i = 0, 1, 0.2 do
  1397. swait()
  1398. PlayAnimationFromTable({
  1399. 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),
  1400. 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),
  1401. 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),
  1402. 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),
  1403. 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),
  1404. 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)
  1405. }, 0.4, false)
  1406. end
  1407. Shootcombo()
  1408. for i = 0, 1, 0.3 do
  1409. swait()
  1410. RootPart.Velocity = RootPart.CFrame.lookVector * -40
  1411. PlayAnimationFromTable({
  1412. 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),
  1413. 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),
  1414. 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),
  1415. 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),
  1416. 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),
  1417. 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)
  1418. }, 0.6, false)
  1419. end
  1420. Bolt()
  1421. attack = false
  1422. end
  1423. function AutoShot()
  1424. attack = true
  1425. Humanoid.WalkSpeed = 45
  1426. Bolt()
  1427. for i = 0, 1, 0.3 do
  1428. swait()
  1429. PlayAnimationFromTable({
  1430. 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),
  1431. 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),
  1432. 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),
  1433. 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),
  1434. 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),
  1435. 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)
  1436. }, 0.4, false)
  1437. end
  1438. Humanoid.WalkSpeed = 45
  1439. for i = 1, 10 do
  1440. for i = 0, 1, 0.8 do
  1441. swait()
  1442. PlayAnimationFromTable({
  1443. 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),
  1444. 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),
  1445. 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),
  1446. 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),
  1447. 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),
  1448. 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)
  1449. }, 0.7, false)
  1450. end
  1451. Shootcombo()
  1452. for i = 0, 1, 0.9 do
  1453. swait()
  1454. PlayAnimationFromTable({
  1455. 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),
  1456. 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),
  1457. 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),
  1458. 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),
  1459. 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),
  1460. 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)
  1461. }, 0.8, false)
  1462. end
  1463. end
  1464. Humanoid.WalkSpeed = 45
  1465. attack = false
  1466. end
  1467. function MortarShot()
  1468. attack = true
  1469. Humanoid.WalkSpeed = 45
  1470. Bolt()
  1471. for i = 0, 1, 0.3 do
  1472. swait()
  1473. PlayAnimationFromTable({
  1474. 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),
  1475. 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),
  1476. 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),
  1477. 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),
  1478. 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),
  1479. 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)
  1480. }, 0.4, false)
  1481. end
  1482. CFuncs.Sound.Create("173979241", Barrel, 1, 1)
  1483. Effects.Sphere.Create(BrickColor.new("Really black"), Barrel.CFrame, 6, 6, 6, 3, 3, 3, 0.1, m)
  1484. for i = 1, 20 do
  1485. local hit, pos = rayCast(Barrel.Position, Barrel.CFrame * CFrame.fromEulerAnglesXYZ(0, 5, 0).lookVector, 220, Character)
  1486. local mag = (Barrel.Position - pos).magnitude
  1487. Effects.Cylinder.Create(BrickColor.new("Really black"), Barrel.CFrame, 6, 99999, 6, -0.5, 1, -0.5, 0.1)
  1488. local cf2 = Mouse.Hit.p + Vector3.new(math.random(-30,30), 100, math.random(-30,30))
  1489. local hit2, pos2 = rayCast(cf2, CFrame.new(cf2, cf2 - Vector3.new(0, 1, 0)).lookVector, 999, Character)
  1490. if hit2 ~= nil then
  1491. local d1 = CFuncs.Part.Create(workspace, "Neon", 0, 0.5, BrickColor.new("Really black"), "Effect", Vector3.new())
  1492. d1.Anchored = true
  1493. d1.CFrame = CFrame.new(pos2)
  1494. game:GetService("Debris"):AddItem(d1, 5)
  1495. local msh = CFuncs.Mesh.Create("CylinderMesh", d1, "nil", "nil", Vector3.new(0, 0, 0), Vector3.new(30, 5, 30))
  1496. local d2 = d1:Clone()
  1497. d2.Parent = d1
  1498. d2.CFrame = CFrame.new(d1.Position)
  1499. d2.BrickColor = BrickColor.new("White")
  1500. d2.Mesh.Scale = Vector3.new(0, 5, 0)
  1501. table.insert(Effects, {
  1502. d1,
  1503. "QuadShot",
  1504. d2,
  1505. d2.Mesh,
  1506. 0
  1507. })
  1508. end
  1509. end
  1510. for i = 0, 1, 0.2 do
  1511. swait()
  1512. PlayAnimationFromTable({
  1513. 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),
  1514. 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),
  1515. 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),
  1516. 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),
  1517. 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),
  1518. 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)
  1519. }, 0.4, false)
  1520. end
  1521. Humanoid.WalkSpeed = 45
  1522. attack = false
  1523. end
  1524. function DisappearJetOnly()
  1525. for _, i in pairs(m:children()) do
  1526. if i == JetpackHandle then
  1527. coroutine.resume(coroutine.create(function(Part)
  1528. for i = 0, 1, 0.3 do
  1529. swait()
  1530. Part.Transparency = i
  1531. end
  1532. Part.Transparency = 1
  1533. end), i)
  1534. end
  1535. end
  1536. end
  1537. function ReappearJetOnly()
  1538. for _, i in pairs(m:children()) do
  1539. if i == JetpackHandle then
  1540. coroutine.resume(coroutine.create(function(Part)
  1541. for i = 0, 1, 0.3 do
  1542. swait()
  1543. Part.Transparency = i
  1544. end
  1545. Part.Transparency = 0
  1546. end), i)
  1547. end
  1548. end
  1549. end
  1550. local floornum = 0
  1551. function JetDash()
  1552. attack = true
  1553. ReappearJetOnly()
  1554. Humanoid.WalkSpeed = 45
  1555. for i = 0, 1, 0.05 do
  1556. swait()
  1557. Effects.Wave.Create(BrickColor.new("Really black"), Torso.CFrame * CFrame.Angles(2.4, 0, 0), 1, 1, 1, 2,2,2,0.4)
  1558. Effects.Break.Create(BrickColor.new("Really black"), Torso.CFrame, 0.2, 0.2, 0.2)
  1559. Effects.Break.Create(BrickColor.new("Really black"), Torso.CFrame, 0.2, 0.2, 0.2)
  1560. Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 15,15,15, 0.3, 1)
  1561. Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 15,15,15,0.3, 1)
  1562. Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 10,10,10, 0.2, 1)
  1563. Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 10,10,10, 0.2, 1)
  1564. RootPart.Velocity = RootPart.CFrame.lookVector * 400
  1565. PlayAnimationFromTable({
  1566. 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),
  1567. 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),
  1568. 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),
  1569. 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),
  1570. 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),
  1571. 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)
  1572. }, 0.6, false)
  1573. end
  1574. for i = 0, 1, 0.05 do
  1575. swait()
  1576. Effects.Fire.Create(BrickColor.new("Really black"), EffectPartL3.CFrame, 3, 3, 3, 0.3)
  1577. Effects.Fire.Create(BrickColor.new("Really black"), EffectPartR3.CFrame, 3, 3, 3, 0.3)
  1578. RootPart.Velocity = RootPart.CFrame.lookVector * 60
  1579. PlayAnimationFromTable({
  1580. 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),
  1581. 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),
  1582. 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),
  1583. 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),
  1584. 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),
  1585. 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)
  1586. }, 0.36, false)
  1587. CFuncs.Sound.Create("596046130", JetpackHandle, 1, 1)
  1588. end
  1589. DisappearJetOnly()
  1590. Humanoid.WalkSpeed = 45
  1591. attack = false
  1592. end
  1593. function findRandomTorso(pos)
  1594. local list = game.Workspace:children()
  1595. local torso
  1596. local dist = 10000
  1597. local temp, human, temp2
  1598. local list2 = {}
  1599. for x = 1, #list do
  1600. temp2 = list[x]
  1601. if temp2.className == "Model" and temp2.Name ~= Character.Name and temp2.Name ~= "Crystal" then
  1602. temp = temp2:findFirstChild("Torso")
  1603. human = temp2:findFirstChild("Humanoid")
  1604. if temp ~= nil and human ~= nil and human.Health > 0 and dist > pos.magnitude then
  1605. local dohit = true
  1606. if dohit == true then
  1607. torso = temp
  1608. table.insert(list2, temp)
  1609. end
  1610. end
  1611. end
  1612. end
  1613. if #list2 > 0 then
  1614. rand = math.random(1, #list2)
  1615. return list2[rand], dist
  1616. else
  1617. return nil, dist
  1618. end
  1619. end
  1620. Mouse.Button1Down:connect(function()
  1621. if attack ~= false or attacktype == 1 then
  1622. end
  1623. end)
  1624. Mouse.KeyDown:connect(function(k)
  1625. k = k:lower()
  1626. if attack == false and k == "z" then
  1627. SpinShot()
  1628. elseif attack == false and k == "x" then
  1629. AutoShot()
  1630. elseif attack == false and k == "c" then
  1631. MortarShot()
  1632. elseif attack == false and k == "v" then
  1633. Crater(Torso,30)
  1634. JetDash()
  1635. end
  1636. end)
  1637. while true do
  1638. swait()
  1639. local aim = CFrame.new(RootPart.Position, Mouse.Hit.p)
  1640. local direction = aim.lookVector
  1641. local headingA = math.atan2(direction.x, direction.z)
  1642. headingA = math.deg(headingA)
  1643. Humanoid.AutoRotate = false
  1644. RootPart.CFrame = CFrame.new(RootPart.Position) * CFrame.Angles(math.rad(0), math.rad(headingA - 180), math.rad(0))
  1645. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1646. velocity = RootPart.Velocity.y
  1647. sine = sine + change
  1648. local hit, pos = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  1649. if RootPart.Velocity.y > 1 and hit == nil then
  1650. Anim = "Jump"
  1651. if attack == false then
  1652. PlayAnimationFromTable({
  1653. 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),
  1654. 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),
  1655. 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),
  1656. 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),
  1657. 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),
  1658. 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)
  1659. }, 0.3, false)
  1660. end
  1661. elseif RootPart.Velocity.y < -1 and hit == nil then
  1662. Anim = "Fall"
  1663. if attack == false then
  1664. PlayAnimationFromTable({
  1665. 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),
  1666. 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),
  1667. 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),
  1668. 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),
  1669. 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),
  1670. 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)
  1671. }, 0.3, false)
  1672. end
  1673. elseif Torsovelocity < 1 and hit ~= nil then
  1674. Anim = "Idle"
  1675. if attack == false then
  1676. change = 1
  1677. PlayAnimationFromTable({
  1678. 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),
  1679. 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),
  1680. 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),
  1681. 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),
  1682. 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),
  1683. 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)
  1684. }, 0.3, false)
  1685. end
  1686. elseif Torsovelocity > 2 and hit ~= nil then
  1687. Anim = "Walk"
  1688. if attack == false then
  1689. change = 3
  1690. PlayAnimationFromTable({
  1691. 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),
  1692. 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))),
  1693. 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),
  1694. 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),
  1695. 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)),
  1696. 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))
  1697. }, 0.3, false)
  1698. end
  1699. end
  1700. if 0 < #Effects then
  1701. for e = 1, #Effects do
  1702. if Effects[e] ~= nil then
  1703. local Thing = Effects[e]
  1704. if Thing ~= nil then
  1705. local Part = Thing[1]
  1706. local Mode = Thing[2]
  1707. local Delay = Thing[3]
  1708. local IncX = Thing[4]
  1709. local IncY = Thing[5]
  1710. local IncZ = Thing[6]
  1711. if Thing[2] == "Shoot" then
  1712. local Look = Thing[1]
  1713. local move = 30
  1714. if Thing[8] == 3 then
  1715. move = 10
  1716. end
  1717. local hit, pos = rayCast(Thing[4], Look, move, Character)
  1718. local mag = (Thing[4] - pos).magnitude
  1719. 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)
  1720. Thing[4] = Thing[4] + Look * move
  1721. Thing[3] = Thing[3] - 1
  1722. if hit ~= nil then
  1723. Thing[3] = 0
  1724. local target, distance = findNearestTorso(pos)
  1725. if hit.Parent:findFirstChild("Humanoid") == nil and target ~= nil and Thing[5] > 0 then
  1726. Thing[3] = 50
  1727. Thing[5] = Thing[5] - 1
  1728. Thing[6] = Thing[6] - 1
  1729. 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
  1730. local MouseLook = CFrame.new((pos + target.Position) / 0, target.Position)
  1731. Thing[1] = MouseLook.lookVector
  1732. end
  1733. if Thing[8] == 1 or Thing[8] == 3 then
  1734. MagnitudeDamage2(hit, 5, 30, 80, math.random(5, 10), "Normal", "", 1)
  1735. end
  1736. ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1737. ref.Anchored = true
  1738. ref.CFrame = CFrame.new(pos)
  1739. Effects.Sphere.Create(BrickColor.new("Really black"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
  1740. game:GetService("Debris"):AddItem(ref, 1)
  1741. end
  1742. if Thing[3] <= 0 then
  1743. table.remove(Effects, e)
  1744. end
  1745. end
  1746. if Thing[2] == "FireWave" then
  1747. if Thing[3] <= Thing[4] then
  1748. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0)
  1749. Thing[3] = Thing[3] + 1
  1750. Thing[6].Scale = Thing[6].Scale + Vector3.new(Thing[5], 0, Thing[5])
  1751. else
  1752. Part.Parent = nil
  1753. table.remove(Effects, e)
  1754. end
  1755. end
  1756. if Thing[2] ~= "Shoot" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" then
  1757. if Thing[1].Transparency <= 1 then
  1758. if Thing[2] == "Block1" then
  1759. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1760. Mesh = Thing[7]
  1761. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1762. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1763. elseif Thing[2] == "Block2" then
  1764. Thing[1].CFrame = Thing[1].CFrame
  1765. Mesh = Thing[7]
  1766. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1767. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1768. elseif Thing[2] == "Fire" then
  1769. Thing[1].CFrame = CFrame.new(Thing[1].Position) + Vector3.new(0, 0.2, 0)
  1770. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1771. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1772. elseif Thing[2] == "Cylinder" then
  1773. Mesh = Thing[7]
  1774. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1775. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1776. elseif Thing[2] == "Blood" then
  1777. Mesh = Thing[7]
  1778. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
  1779. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1780. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1781. elseif Thing[2] == "Elec" then
  1782. Mesh = Thing[10]
  1783. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1784. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1785. elseif Thing[2] == "QuadShot" then
  1786. if Thing[5] < 30 then
  1787. Thing[5] = Thing[5] + 2
  1788. Thing[4].Scale = Vector3.new(Thing[5], 5, Thing[5])
  1789. else
  1790. refda = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Black"), "Reference", Vector3.new())
  1791. refda.Anchored = true
  1792. refda.CFrame = CFrame.new(Thing[1].Position)
  1793. game:GetService("Debris"):AddItem(refda, 1)
  1794. CFuncs.Sound.Create("633129760", refda, 1, 1)
  1795. MagnitudeDamage(refda, 20, 10, 40, math.random(99, 99), "Normal", "315748999", 1)
  1796. Effects.Cylinder.Create(BrickColor.new("Really black"), CFrame.new(refda.Position), 3, 9999, 3, 1, 1, 1, 0.1)
  1797. for i = 1, 5 do
  1798. Effects.Sphere.Create(BrickColor.new("Really black"), CFrame.new(refda.Position), 10, 10, 10, 4 * i, 4 * i, 4 * i, 0.08)
  1799. end
  1800. Thing[1].Parent = nil
  1801. table.remove(Effects, e)
  1802. end
  1803. elseif Thing[2] == "Disappear" then
  1804. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1805. elseif Thing[2] == "Shatter" then
  1806. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1807. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1808. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1809. Thing[6] = Thing[6] + Thing[5]
  1810. end
  1811. else
  1812. Part.Parent = nil
  1813. table.remove(Effects, e)
  1814. end
  1815. end
  1816. end
  1817. end
  1818. end
  1819. end
  1820. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement