Advertisement
iiJosephCats205

Mad Man

Dec 15th, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.90 KB | None | 0 0
  1. --------------------------------------------------------------------------------
  2. --A Really Mad Guy with a Knife, a Tec-9 and a Sawed-Off! THOSE KIDS WILL PAY!--
  3. --------------------------------------------------------------------------------
  4. --By CKbackup (Sugarie Saffron) --
  5. --YT: https://www.youtube.com/channel/UC8n9FFz7e6Zo13ob_5F9MJw--
  6. --Discord: Sugarie Saffron#4705 --
  7. ----------------------------------------------------------------
  8. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  9. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  10. do
  11. print("FE Compatibility code by Mokiros")
  12. script.Parent = Player.Character
  13.  
  14. --RemoteEvent for communicating
  15. local Event = Instance.new("RemoteEvent")
  16. Event.Name = "UserInput_Event"
  17.  
  18. --Fake event to make stuff like Mouse.KeyDown work
  19. local function fakeEvent()
  20. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  21. t.connect = t.Connect
  22. return t
  23. end
  24.  
  25. --Creating fake input objects with fake variables
  26. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  27. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  28. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  29. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  30. end}
  31. --Merged 2 functions into one by checking amount of arguments
  32. CAS.UnbindAction = CAS.BindAction
  33.  
  34. --This function will trigger the events that have been :Connect()'ed
  35. local function te(self,ev,...)
  36. local t = m[ev]
  37. if t and t._fakeEvent and t.Function then
  38. t.Function(...)
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=Player then return end
  46. if io.isMouse then
  47. m.Target = io.Target
  48. m.Hit = io.Hit
  49. else
  50. local b = io.UserInputState == Enum.UserInputState.Begin
  51. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  52. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local Mouse = Player:GetMouse()
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  89. end
  90.  
  91.  
  92. wait(1/60)
  93. Effects = { }
  94. local Player = owner
  95. local chara = Player.Character
  96. local Humanoid = chara:FindFirstChildOfClass("Humanoid")
  97. local LeftArm = chara["Left Arm"]
  98. local RightArm = chara["Right Arm"]
  99. local LeftLeg = chara["Left Leg"]
  100. local RightLeg = chara["Right Leg"]
  101. local Head = chara.Head
  102. local Torso = chara.Torso
  103. local Camera = workspace.CurrentCamera
  104. local RootPart = chara.HumanoidRootPart
  105. local RootJoint = RootPart.RootJoint
  106. local attack = false
  107. local Anim = 'Idle'
  108. local attacktype = 1
  109. local delays = false
  110. local play = true
  111. local targetted = nil
  112. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  113. local velocity = RootPart.Velocity.y
  114. local sine = 0
  115. local change = 1
  116. local doe = 0
  117. local Create = LoadLibrary("RbxUtility").Create
  118. local debby = game:GetService("Debris")
  119. Humanoid.WalkSpeed = 8
  120.  
  121. Humanoid.Animator.Parent = nil
  122. chara.Animate.Parent = nil
  123.  
  124. local newMotor = function(part0, part1, c0, c1)
  125. local w = Create('Motor'){
  126. Parent = part0,
  127. Part0 = part0,
  128. Part1 = part1,
  129. C0 = c0,
  130. C1 = c1,
  131. }
  132. return w
  133. end
  134.  
  135. function clerp(a, b, t)
  136. return a:lerp(b, t)
  137. end
  138.  
  139. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  140. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  141.  
  142. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  143. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  144. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  145. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  146. RootJoint.C1 = CFrame.new(0, 0, 0)
  147. RootJoint.C0 = CFrame.new(0, 0, 0)
  148. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  149. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  150.  
  151. local rarmc1 = RW.C1
  152. local larmc1 = LW.C1
  153. local rlegc1 = RH.C1
  154. local llegc1 = LH.C1
  155.  
  156. local resetc1 = false
  157.  
  158. function PlayAnimationFromTable(table, speed, bool)
  159. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  160. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  161. RW.C0 = clerp(RW.C0, table[3], speed)
  162. LW.C0 = clerp(LW.C0, table[4], speed)
  163. RH.C0 = clerp(RH.C0, table[5], speed)
  164. LH.C0 = clerp(LH.C0, table[6], speed)
  165. if bool == true then
  166. if resetc1 == false then
  167. resetc1 = true
  168. RootJoint.C1 = RootJoint.C1
  169. Torso.Neck.C1 = Torso.Neck.C1
  170. RW.C1 = rarmc1
  171. LW.C1 = larmc1
  172. RH.C1 = rlegc1
  173. LH.C1 = llegc1
  174. end
  175. end
  176. end
  177.  
  178. ArtificialHB = Instance.new("BindableEvent", script)
  179. ArtificialHB.Name = "Heartbeat"
  180. script:WaitForChild("Heartbeat")
  181. frame = 0.03333333333333
  182. tf = 0
  183. allowframeloss = false
  184. tossremainder = false
  185. lastframe = tick()
  186. script.Heartbeat:Fire()
  187. game:GetService("RunService").Heartbeat:connect(function(s, p)
  188. tf = tf + s
  189. if tf >= frame then
  190. if allowframeloss then
  191. script.Heartbeat:Fire()
  192. lastframe = tick()
  193. else
  194. for i = 1, math.floor(tf / frame) do
  195. script.Heartbeat:Fire()
  196. end
  197. lastframe = tick()
  198. end
  199. if tossremainder then
  200. tf = 0
  201. else
  202. tf = tf - frame * math.floor(tf / frame)
  203. end
  204. end
  205. end)
  206. function swait(num)
  207. if num == 0 or num == nil then
  208. ArtificialHB.Event:wait()
  209. else
  210. for i = 0, num do
  211. ArtificialHB.Event:wait()
  212. end
  213. end
  214. end
  215.  
  216. function RemoveOutlines(part)
  217. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  218. end
  219.  
  220. function so(id,par,pit,vol)
  221. local sou = Instance.new("Sound", par or workspace)
  222. if par == chara then
  223. sou.Parent = chara.Torso
  224. end
  225. sou.Volume = vol
  226. sou.Pitch = pit or 1
  227. sou.SoundId = "rbxassetid://" .. id
  228. sou.PlayOnRemove = true
  229. sou:Destroy()
  230. end
  231.  
  232. --This is just for builds--
  233. New = function(Object, Parent, Name, Data)
  234. local Object = Instance.new(Object)
  235. for Index, Value in pairs(Data or {}) do
  236. Object[Index] = Value
  237. end
  238. Object.Parent = Parent
  239. Object.Name = Name
  240. return Object
  241. end
  242. Naifu = New("Part",chara,"Naifu",{BrickColor = BrickColor.new("Dark stone grey"),FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000018, 0.200000003, 2.09999967),CFrame = CFrame.new(-46.1688423, 1.71234488, -46.3381615, -0.556669891, -0.663414657, 0.499999702, -0.766044796, 0.642787278, 7.3450633e-07, -0.321393907, -0.383021802, -0.866025567),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
  243. Mesh = New("SpecialMesh",Naifu,"Mesh",{Scale = Vector3.new(0.5, 0.699999988, 0.5),VertexColor = Vector3.new(0.5, 0.5, 0.5),MeshId = "rbxassetid://54430772",TextureId = "rbxassetid://54430066",MeshType = Enum.MeshType.FileMesh,})
  244. Weld = New("ManualWeld",Naifu,"Weld",{Part0 = Naifu,Part1 = LeftArm,C0 = CFrame.new(0, 0, 0, -0.556669891, -0.766044796, -0.321393907, -0.663414657, 0.642787278, -0.383021802, 0.499999702, 7.3450633e-07, -0.866025567),C1 = CFrame.new(-0.0408859253, -1.28767514, 0.650009155, -0.866025388, 0, -0.500000238, 0, 1, 0, 0.500000238, 0, -0.866025388),})
  245. TEC9 = New("Part",chara,"TEC9",{BrickColor = BrickColor.new("Dark stone grey"),Transparency = 1,Transparency = 1,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000018, 1.20000005, 1.79999959),CFrame = CFrame.new(-56.3000031, 1.29999971, -46.6999931, -1, -1.00172471e-07, -1.61844298e-08, 5.16190539e-08, -8.19882651e-09, 1, -1.29974794e-07, 1, -4.67569983e-08),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
  246. Mesh = New("SpecialMesh",TEC9,"Mesh",{Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012),MeshId = "rbxassetid://742046473",TextureId = "rbxassetid://742046691",MeshType = Enum.MeshType.FileMesh,})
  247. Weld = New("ManualWeld",TEC9,"Weld",{Part0 = TEC9,Part1 = RightArm,C0 = CFrame.new(0, 0, 0, -1, 5.16190539e-08, -1.29974794e-07, -1.00172471e-07, -8.19882651e-09, 1, -1.61844298e-08, 1, -4.67569983e-08),C1 = CFrame.new(-0.0999984741, -1.70001817, -7.62939453e-06, -1, 0, 0, 0, 1, 0, 0, 0, -1),})
  248. DBarrel = New("Part",chara,"DBarrel",{BrickColor = BrickColor.new("Dark stone grey"),Transparency = 1,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000018, 0.799999952, 2.09999967),CFrame = CFrame.new(-42.2655792, 3.62635231, -28.7166176, 0.99998486, 0.00129485771, -0.00535738515, -0.00132099993, 0.999987245, -0.0048789978, 0.00535099953, 0.00488600042, 0.999973774),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
  249. Mesh = New("SpecialMesh",DBarrel,"Mesh",{Scale = Vector3.new(0.00700000022, 0.00700000022, 0.00700000022),MeshId = "rbxassetid://438826329",TextureId = "rbxassetid://438826340",MeshType = Enum.MeshType.FileMesh,})
  250. Weld = New("ManualWeld",DBarrel,"Weld",{Part0 = DBarrel,Part1 = RightArm,C0 = CFrame.new(0, 0, 0, 0.99998486, -0.00132099993, 0.00535099953, 0.00129485771, 0.999987245, 0.00488600042, -0.00535738515, -0.0048789978, 0.999973774),C1 = CFrame.new(0.00952529907, -1.46699142, -0.100050688, -0.868691146, -0.00176300027, 0.495351046, -0.495353371, 0.00488599995, -0.868677914, -0.000888805604, -0.999986589, -0.00511773303),})
  251.  
  252. local att1 = Instance.new("Attachment",Naifu)
  253. att1.Position = Vector3.new(0,.2,-.2)
  254. local att2 = Instance.new("Attachment",Naifu)
  255. att2.Position = Vector3.new(0,.1,1.5)
  256. local tr1 = Instance.new("Trail",Naifu)
  257. tr1.Color = ColorSequence.new(Color3.new(.5,.5,.5),Color3.new(1,1,1))
  258. tr1.Transparency = NumberSequence.new(0,1)
  259. tr1.Lifetime = .5
  260. tr1.Enabled = false
  261. tr1.Attachment0 = att1
  262. tr1.Attachment1 = att2
  263.  
  264. if chara:FindFirstChild("FakeHeadM") then
  265. local CorruptFace = New("Decal",chara.FakeHeadM.FakeHead,"Corrupt",{Texture = "rbxassetid://1000657824",})
  266. chara.FakeHeadM.FakeHead.Normal:Destroy()
  267. chara.FakeHeadM.FakeHead.Lood:Destroy()
  268. chara.FakeHeadM.FakeHead.Rooped:Destroy()
  269. chara.FaysG:Destroy()
  270. chara.FakeHeadM.Ahoge:Destroy()
  271. for i,v in pairs(chara:GetDescendants()) do
  272. if v.Name == "SpecPart" or v.Name == "Ears1Part" then
  273. v:Destroy()
  274. elseif v.Name == "Ears2Part" then
  275. v.Transparency = 0
  276. end
  277. end
  278. end
  279. for i, v in pairs(chara:children()) do
  280. if v:IsA("Shirt") or v:IsA("Pants") then
  281. v:Destroy()
  282. elseif v.Name == "Chest" then
  283. for a, b in pairs(v:children()) do
  284. if b.Name ~= "Tail" then
  285. b.Transparency = 1
  286. end
  287. end
  288. end
  289. end
  290. local sh = Instance.new("Shirt",chara)
  291. local pn = Instance.new("Pants",chara)
  292. sh.ShirtTemplate = "rbxassetid://567462542"
  293. pn.PantsTemplate = "rbxassetid://1521666087"
  294. ---------------------------
  295.  
  296. function rayCast(Position, Direction, Range, Ignore)
  297. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  298. end
  299.  
  300. function FindNearestTorso(Position, Distance, SinglePlayer)
  301. if SinglePlayer then
  302. return (SinglePlayer.Head.CFrame.p - Position).magnitude < Distance
  303. end
  304. local List = {}
  305. for i, v in pairs(workspace:GetDescendants()) do
  306. if v:IsA("Model") then
  307. if v:findFirstChild("Head") then
  308. if v ~= chara then
  309. if (v.Head.Position - Position).magnitude <= Distance then
  310. table.insert(List, v)
  311. end
  312. end
  313. end
  314. end
  315. end
  316. return List
  317. end
  318.  
  319. EffectModel = Create("Model"){
  320. Parent = chara,
  321. Name = "Effects",
  322. }
  323.  
  324. --Effect Functions--
  325. Effects = {
  326.  
  327. Block = function(cf,partsize,meshstart,meshadd,matr,colour,spin,inverse,factor)
  328. local p = Instance.new("Part",EffectModel)
  329. p.BrickColor = BrickColor.new(colour)
  330. p.Size = partsize
  331. p.Anchored = true
  332. p.CanCollide = false
  333. p.Material = matr
  334. p.CFrame = cf
  335. if inverse == true then
  336. p.Transparency = 1
  337. else
  338. p.Transparency = 0
  339. end
  340. local m = Instance.new("BlockMesh",p)
  341. m.Scale = meshstart
  342. coroutine.wrap(function()
  343. for i=0,1,factor do
  344. swait()
  345. if inverse == true then
  346. p.Transparency = 1-i
  347. else
  348. p.Transparency = i
  349. end
  350. m.Scale = m.Scale + meshadd
  351. if spin == true then
  352. p.CFrame = p.CFrame * CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  353. end
  354. end
  355. p:Destroy()
  356. end)()
  357. return p
  358. end,
  359.  
  360. Sphere = function(cf,partsize,meshstart,meshadd,matr,colour,inverse,factor)
  361. local p = Instance.new("Part",EffectModel)
  362. p.BrickColor = BrickColor.new(colour)
  363. p.Size = partsize
  364. p.Anchored = true
  365. p.CanCollide = false
  366. p.Material = matr
  367. p.CFrame = cf
  368. if inverse == true then
  369. p.Transparency = 1
  370. else
  371. p.Transparency = 0
  372. end
  373. local m = Instance.new("SpecialMesh",p)
  374. m.MeshType = "Sphere"
  375. m.Scale = meshstart
  376. coroutine.wrap(function()
  377. for i=0,1,factor do
  378. swait()
  379. if inverse == true then
  380. p.Transparency = 1-i
  381. else
  382. p.Transparency = i
  383. end
  384. m.Scale = m.Scale + meshadd
  385. end
  386. p:Destroy()
  387. end)()
  388. return p
  389. end,
  390.  
  391. Cylinder = function(cf,partsize,meshstart,meshadd,matr,colour,inverse,factor)
  392. local p = Instance.new("Part",EffectModel)
  393. p.BrickColor = BrickColor.new(colour)
  394. p.Size = partsize
  395. p.Anchored = true
  396. p.CanCollide = false
  397. p.Material = matr
  398. p.CFrame = cf
  399. if inverse == true then
  400. p.Transparency = 1
  401. else
  402. p.Transparency = 0
  403. end
  404. local m = Instance.new("CylinderMesh",p)
  405. m.Scale = meshstart
  406. coroutine.wrap(function()
  407. for i=0,1,factor do
  408. swait()
  409. if inverse == true then
  410. p.Transparency = 1-i
  411. else
  412. p.Transparency = i
  413. end
  414. m.Scale = m.Scale + meshadd
  415. end
  416. p:Destroy()
  417. end)()
  418. return p
  419. end,
  420.  
  421. Wave = function(cf,meshstart,meshadd,colour,spin,inverse,factor)
  422. local p = Instance.new("Part",EffectModel)
  423. p.BrickColor = BrickColor.new(colour)
  424. p.Size = Vector3.new()
  425. p.Anchored = true
  426. p.CanCollide = false
  427. p.CFrame = cf
  428. if inverse == true then
  429. p.Transparency = 1
  430. else
  431. p.Transparency = 0
  432. end
  433. local m = Instance.new("SpecialMesh",p)
  434. m.MeshId = "rbxassetid://20329976"
  435. m.Scale = meshstart
  436. coroutine.wrap(function()
  437. for i=0,1,factor do
  438. swait()
  439. if inverse == true then
  440. p.Transparency = 1-i
  441. else
  442. p.Transparency = i
  443. end
  444. m.Scale = m.Scale + meshadd
  445. p.CFrame = p.CFrame * CFrame.Angles(0,math.rad(spin),0)
  446. end
  447. p:Destroy()
  448. end)()
  449. return p
  450. end,
  451.  
  452. Ring = function(cf,meshstart,meshadd,colour,inverse,factor)
  453. local p = Instance.new("Part",EffectModel)
  454. p.BrickColor = BrickColor.new(colour)
  455. p.Size = Vector3.new()
  456. p.Anchored = true
  457. p.CanCollide = false
  458. p.CFrame = cf
  459. if inverse == true then
  460. p.Transparency = 1
  461. else
  462. p.Transparency = 0
  463. end
  464. local m = Instance.new("SpecialMesh",p)
  465. m.MeshId = "rbxassetid://3270017"
  466. m.Scale = meshstart
  467. coroutine.wrap(function()
  468. for i=0,1,factor do
  469. swait()
  470. if inverse == true then
  471. p.Transparency = 1-i
  472. else
  473. p.Transparency = i
  474. end
  475. m.Scale = m.Scale + meshadd
  476. end
  477. p:Destroy()
  478. end)()
  479. return p
  480. end,
  481.  
  482. Meshed = function(cf,meshstart,meshadd,colour,meshid,textid,spin,inverse,factor)
  483. local p = Instance.new("Part",EffectModel)
  484. p.BrickColor = BrickColor.new(colour)
  485. p.Size = Vector3.new()
  486. p.Anchored = true
  487. p.CanCollide = false
  488. p.CFrame = cf
  489. if inverse == true then
  490. p.Transparency = 1
  491. else
  492. p.Transparency = 0
  493. end
  494. local m = Instance.new("SpecialMesh",p)
  495. m.MeshId = meshid
  496. m.TextureId = textid
  497. m.Scale = meshstart
  498. coroutine.wrap(function()
  499. for i=0,1,factor do
  500. swait()
  501. if inverse == true then
  502. p.Transparency = 1-i
  503. else
  504. p.Transparency = i
  505. end
  506. m.Scale = m.Scale + meshadd
  507. p.CFrame = p.CFrame * CFrame.Angles(0,math.rad(spin),0)
  508. end
  509. p:Destroy()
  510. end)()
  511. return p
  512. end,
  513.  
  514. Explode = function(cf,partsize,meshstart,meshadd,matr,colour,move,inverse,factor)
  515. local p = Instance.new("Part",EffectModel)
  516. p.BrickColor = BrickColor.new(colour)
  517. p.Size = partsize
  518. p.Anchored = true
  519. p.CanCollide = false
  520. p.Material = matr
  521. p.CFrame = cf * CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
  522. if inverse == true then
  523. p.Transparency = 1
  524. else
  525. p.Transparency = 0
  526. end
  527. local m = Instance.new("SpecialMesh",p)
  528. m.MeshType = "Sphere"
  529. m.Scale = meshstart
  530. coroutine.wrap(function()
  531. for i=0,1,factor do
  532. swait()
  533. if inverse == true then
  534. p.Transparency = 1-i
  535. else
  536. p.Transparency = i
  537. end
  538. m.Scale = m.Scale + meshadd
  539. p.CFrame = p.CFrame * CFrame.new(0,move,0)
  540. end
  541. p:Destroy()
  542. end)()
  543. return p
  544. end,
  545.  
  546. }
  547.  
  548. function chatfunc(text)
  549. coroutine.wrap(function()
  550. if chara:FindFirstChild("TalkingBillBoard")~= nil then
  551. chara:FindFirstChild("TalkingBillBoard"):destroy()
  552. end
  553. local naeeym2 = Instance.new("BillboardGui",chara)
  554. naeeym2.Size = UDim2.new(0,100,0,40)
  555. naeeym2.StudsOffset = Vector3.new(0,3,0)
  556. naeeym2.Adornee = chara.Head
  557. naeeym2.Name = "BLABLABLA"
  558. local tecks2 = Instance.new("TextLabel",naeeym2)
  559. tecks2.BackgroundTransparency = 1
  560. tecks2.BorderSizePixel = 0
  561. tecks2.Text = ""
  562. tecks2.Font = "Antique"
  563. tecks2.FontSize = "Size24"
  564. tecks2.TextStrokeTransparency = 0
  565. tecks2.TextColor3 = Color3.new(0,0,0)
  566. tecks2.TextStrokeColor3 = Color3.new(1,0,0)
  567. tecks2.Size = UDim2.new(1,0,0.5,0)coroutine.wrap(function()
  568. while tecks2 ~= nil do
  569. swait()
  570. tecks2.Position = UDim2.new(0,math.random(-3,3),0,math.random(-3,3))
  571. end
  572. end)()
  573. for i = 1,string.len(text),1 do
  574. tecks2.Text = string.sub(text,1,i)
  575. swait()
  576. end
  577. swait(30)
  578. for i = 1, 5 do
  579. swait()
  580. tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0)
  581. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2
  582. tecks2.TextTransparency = tecks2.TextTransparency + .2
  583. end
  584. naeeym2:Destroy()
  585. end)()
  586. end
  587.  
  588. function GetDudesTorso(c)
  589. local torsy = (c:findFirstChild("Torso") or c:findFirstChild("UpperTorso"))
  590. if torsy ~= nil then
  591. return torsy
  592. end
  593. end
  594.  
  595. function BodyVel(part,faws)
  596. local bodyvel = Instance.new("BodyVelocity",part)
  597. local pep = 10000000
  598. bodyvel.P = pep
  599. bodyvel.MaxForce = Vector3.new(pep,pep,pep)
  600. bodyvel.Velocity = faws
  601. debby:AddItem(bodyvel,.2)
  602. end
  603.  
  604. function Dmg(dude,dmg,env,faws,trip,efftyp,toim)
  605. if dude and dude ~= chara and dude.Name ~= "CKbackup" and dude.Name ~= "Nebula_Zorua" and dude.Name ~= "Salvo_Starly" then
  606. if dude:FindFirstChild("HITO") then return end
  607. local debounce = Instance.new("BoolValue",dude)
  608. debounce.Name = "HITO"
  609. debby:AddItem(debounce,toim)
  610. local hum = dude:FindFirstChildOfClass("Humanoid")
  611. local dam = dmg+math.random(-env,env)
  612. local teksu = "-"..dam
  613. if hum then
  614. local finhel = hum.Health - dam
  615. if finhel <= 0 and dude:FindFirstChild("DEATHED")==nil then
  616. Instance.new("BoolValue",dude).Name = "DEATHED"
  617. local soaa = Instance.new("Sound",dude.Head)
  618. local cho = math.random(1,5)
  619. if cho == 1 then
  620. soaa.SoundId = "rbxassetid://111896685"
  621. elseif cho == 2 then
  622. soaa.SoundId = "rbxassetid://535528169"
  623. elseif cho == 3 then
  624. soaa.SoundId = "rbxassetid://1080363252"
  625. elseif cho == 4 then
  626. soaa.SoundId = "rbxassetid://147758746"
  627. elseif cho == 5 then
  628. soaa.SoundId = "rbxassetid://626777433"
  629. soaa.Volume = .2
  630. soaa.TimePosition = 1
  631. end
  632. game:service'Debris':AddItem(soaa,6)
  633. soaa:Play()
  634. end
  635. hum.Health = hum.Health - dam
  636. end
  637. coroutine.wrap(function()
  638. local naeeym2 = Instance.new("BillboardGui",dude)
  639. naeeym2.Size = UDim2.new(0,100,0,40)
  640. naeeym2.StudsOffset = Vector3.new(0,3,0)
  641. naeeym2.Adornee = dude:FindFirstChild("Head")
  642. naeeym2.Name = "TalkingBillBoard"
  643. local tecks2 = Instance.new("TextLabel",naeeym2)
  644. tecks2.BackgroundTransparency = 1
  645. tecks2.BorderSizePixel = 0
  646. tecks2.Text = teksu
  647. tecks2.Font = "Antique"
  648. tecks2.TextSize = 24
  649. tecks2.TextStrokeTransparency = 0
  650. tecks2.TextColor3 = Color3.new(0,0,0)
  651. tecks2.TextStrokeColor3 = Color3.new(1,0,0)
  652. tecks2.Size = UDim2.new(1,0,0.5,0)
  653. swait(10)
  654. for i = 0,1,.05 do
  655. swait()
  656. tecks2.Position = tecks2.Position - UDim2.new(0,0,.005,0)
  657. tecks2.TextStrokeTransparency = i
  658. tecks2.TextTransparency = i
  659. end
  660. naeeym2:Destroy()
  661. end)()
  662. local torsy = GetDudesTorso(dude)
  663. if torsy then
  664. for i=1,dam/5 do
  665. local blp = Instance.new("Part",EffectModel)
  666. blp.Size = Vector3.new(.3,.3,.3)
  667. blp.BrickColor = BrickColor.new("Crimson")
  668. blp.CFrame = torsy.CFrame
  669. blp.Velocity = torsy.CFrame.lookVector*5
  670. coroutine.wrap(function()
  671. swait(10)
  672. blp.Orientation = Vector3.new(0,blp.Orientation.y,0)
  673. for i=0,1,.1 do
  674. swait()
  675. blp.Transparency = i
  676. blp.Size = blp.Size + Vector3.new(.02,-.02,.02)
  677. end
  678. blp:Destroy()
  679. end)()
  680. end
  681. if efftyp == "Blunt" then
  682. puncheff(torsy)
  683. elseif efftyp == "Sharp" then
  684. slasheff(torsy)
  685. end
  686. if faws ~= 0 then
  687. BodyVel(torsy,faws)
  688. end
  689. if trip == true then
  690. torsy.CFrame = torsy.CFrame * CFrame.Angles(math.rad(-90),0,0)
  691. torsy.RotVelocity = Vector3.new(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  692. end
  693. end
  694. end
  695. end
  696.  
  697. function MagnitudeDmg(par,magni,dmg,env,faws,trip,efftyp,toim)
  698. for _, c in pairs(workspace:GetDescendants()) do
  699. local hum = c:FindFirstChildOfClass("Humanoid")
  700. if hum ~= nil and c:FindFirstChild("IsTeamMateOfCK")==nil and c.Name ~= "CKbackup" and c.Name ~= "Nebula_Zorua" and c.Name ~= "Salvo_Starly" then
  701. local head = GetDudesTorso(c)
  702. if head ~= nil then
  703. local targ = head.Position - par.Position
  704. local mag = targ.magnitude
  705. if magni >= mag and c ~= chara then
  706. Dmg(c,dmg,env,faws,trip,efftyp,toim)
  707. end
  708. end
  709. end
  710. end
  711. end
  712.  
  713. function puncheff(par)
  714. if par.Parent:FindFirstChild("DebounceHit")==nil then
  715. so(386946017,par,math.random(80,120)/100,1)
  716. Effects.Sphere(par.CFrame,Vector3.new(1,1,1),Vector3.new(1,1,1),Vector3.new(2,2,2),"Neon","White",false,.1)
  717. end
  718. end
  719.  
  720. function slasheff(par)
  721. if par.Parent:FindFirstChild("DebounceHit")==nil then
  722. local cho = math.random(1,3)
  723. if cho == 1 then
  724. so(444667824,par,1,1)
  725. elseif cho == 2 then
  726. so(444667844,par,1,1)
  727. elseif cho == 3 then
  728. so(444667859,par,1,1)
  729. end
  730. --function(cf,partsize,meshstart,meshadd,matr,colour,factor)
  731. Effects.Sphere(par.CFrame*CFrame.Angles(math.random(0,360),math.random(0,360),math.random(0,360)),Vector3.new(.5,.5,.5),Vector3.new(1,0,1),Vector3.new(0,5,0),"Neon","Really red",false,.1)
  732. end
  733. end
  734.  
  735. local mus = Instance.new("Sound",Head)
  736. mus.Name = "mus"
  737. mus.SoundId = "rbxassetid://581195737"
  738. mus.Looped = true
  739. mus.Volume = 1
  740. mus:Play()
  741.  
  742.  
  743. function smek()
  744. attack = true
  745. Humanoid.WalkSpeed = 16
  746. for i=0,1,.1 do
  747. swait()
  748. PlayAnimationFromTable({
  749. CFrame.new(0.0506498702, -5.11459177e-07, -0.0829713419, 0.76604414, 0, 0.642788053, -2.68192082e-07, 1.00000834, 3.19618522e-07, -0.642793417, -4.17232513e-07, 0.766050518),
  750. CFrame.new(0.0446723551, 1.46553934, 0.0211830139, 0.735023618, 0.242944986, -0.633023083, -0.171009988, 0.969846427, 0.173647657, 0.656122029, -0.0193818808, 0.754406095),
  751. CFrame.new(1.40946591, -0.0135071278, 0, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  752. CFrame.new(-1.55299187, 0.416839302, -0.457236975, 0.68952775, 0.492403448, -0.53112185, -0.633021951, 0.766044736, -0.11161866, 0.35190171, 0.413175911, 0.839911342),
  753. CFrame.new(0.499983132, -2.00001597, -9.13441181e-06, 0.76604414, 0, -0.642788053, 0, 1, 0, 0.642788053, 0, 0.76604414),
  754. CFrame.new(-0.500005186, -2.00001597, -1.22189522e-06, 0.98480773, 0, 0.173648447, 0, 1, 0, -0.173648447, 0, 0.98480773),
  755. }, .3, false)
  756. end
  757. Humanoid.WalkSpeed = 2
  758. tr1.Enabled = true
  759. so(536642316,Naifu,1,1)
  760. for i=0,1.4,.2 do
  761. swait()
  762. PlayAnimationFromTable({
  763. CFrame.new(0.0327370502, 1.24810251e-09, 0.00299140904, 0.64278698, 0, -0.766044974, 3.19616191e-07, 1, 2.68189382e-07, 0.766044974, -4.17229018e-07, 0.64278698),
  764. CFrame.new(-0.0331632644, 1.46557713, -0.11364907, 0.656121135, -0.0193833038, 0.754413188, -0.171011418, 0.969854534, 0.173649102, -0.735024333, -0.24294585, 0.633027315),
  765. CFrame.new(1.24921072, -0.104290992, 0.29409039, 0.93969059, 0.26200676, 0.21985054, -0.342026025, 0.719844162, 0.604022086, -2.68220901e-07, -0.642788291, 0.766043901),
  766. CFrame.new(-0.663761616, 0.985711455, -0.487553686, 0.383021712, -0.64278698, -0.663414836, -0.866025984, 0, -0.499998987, 0.321392834, 0.766044974, -0.556670249),
  767. CFrame.new(0.500005841, -2.00003386, -4.52250242e-06, 0.984807551, 0, -0.173649341, 0, 1, 0, 0.173649341, 0, 0.984807551),
  768. CFrame.new(-0.499993563, -2.00003386, -1.44541264e-06, 0.64278698, 0, 0.766044974, 0, 1, 0, -0.766044974, 0, 0.64278698),
  769. }, .5, false)
  770. MagnitudeDmg(Naifu,3,40,3,RootPart.CFrame.lookVector*5,false,"Sharp",.5)
  771. end
  772. swait(5)
  773. Humanoid.WalkSpeed = 8
  774. tr1.Enabled = false
  775. attack = false
  776. end
  777.  
  778. zhold = true
  779. function shoot()
  780. attack = true
  781. so(169799883,TEC9,1,1)
  782. for i=0,1,.1 do
  783. swait()
  784. PlayAnimationFromTable({
  785. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  786. CFrame.new(0.0838357508, 1.42719412, -0.166348219, 0.857789159, 0.297403604, -0.419224113, -0.141315028, 0.920631945, 0.363959879, 0.49419412, -0.252958179, 0.83173573),
  787. CFrame.new(1.22406256, -0.130654663, 0.277106255, 0.941511214, 0.33170712, 0.0593906641, -0.33170709, 0.881204426, 0.336822212, 0.0593910143, -0.336822152, 0.939693391),
  788. CFrame.new(-1.43159902, 0, 0.187939197, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
  789. CFrame.new(0.499998897, -1.99999988, -1.49011612e-06, 0.939692736, 0, -0.342019886, 0, 1, 0, 0.342019916, 0, 0.939692736),
  790. CFrame.new(-0.500001848, -1.99999988, 1.62422657e-06, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
  791. }, .3, false)
  792. end
  793. Humanoid.WalkSpeed = 2
  794. local ref = Instance.new("Part",chara)
  795. ref.Size = Vector3.new(0,0,0)
  796. ref.Anchored = true
  797. ref.CanCollide = false
  798. ref.Transparency = 1
  799. TEC9.Transparency = 0
  800. for i=0,1,.1 do
  801. swait()
  802. PlayAnimationFromTable({
  803. CFrame.new(-0.0438226089, 0, -0.0217384323, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
  804. CFrame.new(0.0674266815, 1.48262143, -0.0571227223, 0.939692736, 0.0593910702, -0.33682391, 0, 0.984807849, 0.173647985, 0.342019886, -0.163175747, 0.925416768),
  805. CFrame.new(1.62663007, 0.722141325, -0.273156077, 0.883022428, -0.342019916, 0.321393609, 0.342019916, 0, -0.939692736, 0.321393609, 0.939692736, 0.116977602),
  806. CFrame.new(-1.34998989, 0, 0.259806901, 0.866024911, 0, 0.500000954, 0, 1, 0, -0.500000954, 0, 0.866024852),
  807. CFrame.new(0.499997795, -1.99999917, -1.51991844e-06, 0.866025686, 0, -0.499999642, 0, 1, 0, 0.499999642, 0, 0.866025686),
  808. CFrame.new(-0.500000119, -1.99999917, 1.50501728e-06, 0.939692438, 0, 0.342020929, 0, 1, 0, -0.342020959, 0, 0.939692438),
  809. }, .3, false)
  810. end
  811. swait(5)
  812. local shots = 20
  813. repeat
  814. so(745308042,TEC9,1,1)
  815. ref.CFrame = Mouse.Hit
  816. MagnitudeDmg(ref,2,12,2,RootPart.CFrame.lookVector*3,false,"Shot",.1)
  817. local hitpt = Instance.new("Part",EffectModel)
  818. hitpt.Size = Vector3.new(0,0,.3)
  819. hitpt.CFrame = TEC9.CFrame * CFrame.new(0,.465,.1)-- * CFrame.Angles(math.rad(90),0,0)
  820. hitpt.Velocity = RootPart.CFrame.rightVector*10+Vector3.new(0,5,0)
  821. local hitm = Instance.new("SpecialMesh",hitpt)
  822. hitm.MeshId = "rbxassetid://94295100"
  823. hitm.TextureId = "rbxassetid://94287792"
  824. hitm.Scale = Vector3.new(3,3,3.5)
  825. coroutine.wrap(function()
  826. swait(30)
  827. for i = 0,1,.1 do
  828. swait()
  829. hitpt.Transparency = i
  830. end
  831. hitpt:Destroy()
  832. end)()
  833. Effects.Block(TEC9.CFrame*CFrame.new(-.05,.465,-.9),Vector3.new(1,1,1),Vector3.new(),Vector3.new(.1,.1,.1),"Neon","Bright yellow",true,false,.1)
  834. shots = shots - 1
  835. for i=0,1 do
  836. swait()
  837. PlayAnimationFromTable({
  838. CFrame.new(-0.0438226089, 0, -0.0217384323, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
  839. CFrame.new(0.0674266815, 1.48262143, -0.0571227223, 0.939692736, 0.0593910702, -0.33682391, 0, 0.984807849, 0.173647985, 0.342019886, -0.163175747, 0.925416768),
  840. CFrame.new(1.62663007, 0.722141325, -0.273156077, 0.883022428, -0.342019916, 0.321393609, 0.342019916, 0, -0.939692736, 0.321393609, 0.939692736, 0.116977602)*CFrame.Angles(math.rad(math.random(-5,5)),math.rad(math.random(-5,5)),math.rad(math.random(-5,5))),
  841. CFrame.new(-1.34998989, 0, 0.259806901, 0.866024911, 0, 0.500000954, 0, 1, 0, -0.500000954, 0, 0.866024852),
  842. CFrame.new(0.499997795, -1.99999917, -1.51991844e-06, 0.866025686, 0, -0.499999642, 0, 1, 0, 0.499999642, 0, 0.866025686),
  843. CFrame.new(-0.500000119, -1.99999917, 1.50501728e-06, 0.939692438, 0, 0.342020929, 0, 1, 0, -0.342020959, 0, 0.939692438),
  844. }, .3, false)
  845. end
  846. until zhold == false or shots == 0
  847. swait(5)
  848. ref:Destroy()
  849. for i=0,1,.25 do
  850. swait()
  851. PlayAnimationFromTable({
  852. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  853. CFrame.new(0, 1.44842434, -0.192443371, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  854. CFrame.new(1.39502811, 0.908103704, 0.515749812, -0.213331953, -0.84539932, -0.489683062, 0.875778735, 0.056671422, -0.479374528, 0.433013916, -0.531119943, 0.728292942),
  855. CFrame.new(-1.5091548, 0.323206276, -0.384231716, 0.750000238, 0.433013409, -0.499999136, -0.500000179, 0.866025388, 6.10661004e-07, 0.433012158, 0.249999225, 0.866025925),
  856. CFrame.new(0.50000149, -1.99999857, -2.11596489e-06, 0.984807849, 0, -0.173647985, 0, 1, 0, 0.173647985, 0, 0.984807849),
  857. CFrame.new(-0.500000834, -1.99999857, 1.63912773e-06, 0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, 0.984807849),
  858. }, .4, false)
  859. end
  860. so(1159825801,TEC9,1,1)
  861. swait(15)
  862. so(211134014,TEC9,1,1)
  863. for i=0,1,.1 do
  864. swait()
  865. PlayAnimationFromTable({
  866. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  867. CFrame.new(0.0838357508, 1.42719412, -0.166348219, 0.857789159, 0.297403604, -0.419224113, -0.141315028, 0.920631945, 0.363959879, 0.49419412, -0.252958179, 0.83173573),
  868. CFrame.new(1.22406256, -0.130654663, 0.277106255, 0.941511214, 0.33170712, 0.0593906641, -0.33170709, 0.881204426, 0.336822212, 0.0593910143, -0.336822152, 0.939693391),
  869. CFrame.new(-1.43159902, 0, 0.187939197, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
  870. CFrame.new(0.499998897, -1.99999988, -1.49011612e-06, 0.939692736, 0, -0.342019886, 0, 1, 0, 0.342019916, 0, 0.939692736),
  871. CFrame.new(-0.500001848, -1.99999988, 1.62422657e-06, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
  872. }, .3, false)
  873. end
  874. TEC9.Transparency = 1
  875. Humanoid.WalkSpeed = 8
  876. attack = false
  877. end
  878.  
  879. function dbshoot()
  880. attack = true
  881. so(169799883,DBarrel,1,1)
  882. for i=0,1,.1 do
  883. swait()
  884. PlayAnimationFromTable({
  885. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  886. CFrame.new(0.0838357508, 1.42719412, -0.166348219, 0.857789159, 0.297403604, -0.419224113, -0.141315028, 0.920631945, 0.363959879, 0.49419412, -0.252958179, 0.83173573),
  887. CFrame.new(1.22406256, -0.130654663, 0.277106255, 0.941511214, 0.33170712, 0.0593906641, -0.33170709, 0.881204426, 0.336822212, 0.0593910143, -0.336822152, 0.939693391),
  888. CFrame.new(-1.43159902, 0, 0.187939197, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
  889. CFrame.new(0.499998897, -1.99999988, -1.49011612e-06, 0.939692736, 0, -0.342019886, 0, 1, 0, 0.342019916, 0, 0.939692736),
  890. CFrame.new(-0.500001848, -1.99999988, 1.62422657e-06, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
  891. }, .3, false)
  892. end
  893. Humanoid.WalkSpeed = 2
  894. DBarrel.Transparency = 0
  895. for i=0,1,.1 do
  896. swait()
  897. PlayAnimationFromTable({
  898. CFrame.new(0, 0.0149096567, 0.133909225, 1, 0, 0, 0, 0.984807849, -0.173647985, 0, 0.173647985, 0.984807849),
  899. CFrame.new(0, 1.43158329, -0.187937319, 1, 0, 0, 0, 0.939692855, 0.342019796, 0, -0.342019796, 0.939692855),
  900. CFrame.new(1.0840646, 0.399937928, -0.718070745, 0.868691146, 0.495353371, 0.000888805604, -0.0877529308, 0.15565595, -0.983905911, -0.487519473, 0.854632378, 0.17868565),
  901. CFrame.new(-1.35562694, -0.0255649146, 0.396688521, 0.939692378, -0.116977789, 0.321394831, -2.60770321e-07, 0.939692855, 0.342019856, -0.342021167, -0.321393549, 0.883021951),
  902. CFrame.new(0.499995321, -2.00755072, 0.218008161, 0.939692736, 0, -0.342019886, 0.0593910702, 0.984807849, 0.163175747, 0.33682391, -0.173647985, 0.925416768),
  903. CFrame.new(-0.499996126, -2.00755, 0.218011439, 0.939692736, 0, 0.342019886, -0.0593910702, 0.984807849, 0.163175747, -0.33682391, -0.173647985, 0.925416768),
  904. }, .3, false)
  905. end
  906. swait(5)
  907. so(132455829,DBarrel,1,1)
  908. local ref = Instance.new("Part",chara)
  909. ref.Size = Vector3.new(0,0,0)
  910. ref.Anchored = true
  911. ref.CanCollide = false
  912. ref.Transparency = 1
  913. ref.CFrame = RootPart.CFrame*CFrame.new(0,0,-6)
  914. MagnitudeDmg(ref,4,100,0,RootPart.CFrame.lookVector*12,true,"Shot",.1)
  915. Effects.Block(DBarrel.CFrame*CFrame.new(.1,.3,1.1),Vector3.new(1,1,1),Vector3.new(),Vector3.new(.1,.1,.1),"Neon","Bright yellow",true,false,.05)
  916. Effects.Block(DBarrel.CFrame*CFrame.new(-.1,.3,1.1),Vector3.new(1,1,1),Vector3.new(),Vector3.new(.1,.1,.1),"Neon","Bright yellow",true,false,.05)
  917. ref:Destroy()
  918. for i=0,1,.1 do
  919. swait()
  920. PlayAnimationFromTable({
  921. CFrame.new(0, 0.0149102025, 0.133909985, 1, 0, 0, 0, 0.984812796, -0.173648849, 0, 0.173648849, 0.984812796),
  922. CFrame.new(0, 1.43158948, 0.0120660895, 1, 0, 0, 0, 1.00000262, -1.1920929e-07, 0, 1.1920929e-07, 1.00000262),
  923. CFrame.new(1.20370889, 0.765974879, -0.570772648, 0.868689418, 0.319091678, -0.378892303, -0.0877506882, -0.653664529, -0.751683295, -0.48752436, 0.686227262, -0.539830863),
  924. CFrame.new(-1.49794042, 0.21531868, 0.355185598, 0.923031092, 0.211469814, 0.321394384, -0.321394086, 0.883024752, 0.342021078, -0.211472049, -0.418990374, 0.883024335),
  925. CFrame.new(0.499998927, -2.00757003, 0.218012124, 0.939692736, 0, -0.342019886, 0.0593913682, 0.984812796, 0.163176581, 0.336825609, -0.173648849, 0.925421476),
  926. CFrame.new(-0.500004649, -2.00756979, 0.218013197, 0.939692736, 0, 0.342019886, -0.0593913682, 0.984812796, 0.163176581, -0.336825609, -0.173648849, 0.925421476),
  927. }, .3, false)
  928. end
  929. swait(10)
  930. for i=0,1,.25 do
  931. swait()
  932. PlayAnimationFromTable({
  933. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  934. CFrame.new(0, 1.44842434, -0.192443371, 1, 0, 0, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736),
  935. CFrame.new(1.39502811, 0.908103704, 0.515749812, -0.213331953, -0.84539932, -0.489683062, 0.875778735, 0.056671422, -0.479374528, 0.433013916, -0.531119943, 0.728292942),
  936. CFrame.new(-1.5091548, 0.323206276, -0.384231716, 0.750000238, 0.433013409, -0.499999136, -0.500000179, 0.866025388, 6.10661004e-07, 0.433012158, 0.249999225, 0.866025925),
  937. CFrame.new(0.50000149, -1.99999857, -2.11596489e-06, 0.984807849, 0, -0.173647985, 0, 1, 0, 0.173647985, 0, 0.984807849),
  938. CFrame.new(-0.500000834, -1.99999857, 1.63912773e-06, 0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, 0.984807849),
  939. }, .4, false)
  940. end
  941. for i=1,2 do
  942. so(1159825801,DBarrel,1,1)
  943. local hitpt = Instance.new("Part",EffectModel)
  944. hitpt.Size = Vector3.new(0,0,.3)
  945. hitpt.CFrame = TEC9.CFrame * CFrame.Angles(math.rad(90),0,0)
  946. hitpt.Velocity = RootPart.CFrame.rightVector*10+Vector3.new(0,5,0)
  947. local hitm = Instance.new("SpecialMesh",hitpt)
  948. hitm.MeshId = "rbxassetid://94248124"
  949. hitm.TextureId = "rbxassetid://94219470"
  950. hitm.Scale = Vector3.new(1.2,1.2,1.2)
  951. coroutine.wrap(function()
  952. swait(30)
  953. for i = 0,1,.1 do
  954. swait()
  955. hitpt.Transparency = i
  956. end
  957. hitpt:Destroy()
  958. end)()
  959. swait()
  960. end
  961. swait(15)
  962. so(211134014,DBarrel,1,1)
  963. for i=0,1,.1 do
  964. swait()
  965. PlayAnimationFromTable({
  966. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  967. CFrame.new(0.0838357508, 1.42719412, -0.166348219, 0.857789159, 0.297403604, -0.419224113, -0.141315028, 0.920631945, 0.363959879, 0.49419412, -0.252958179, 0.83173573),
  968. CFrame.new(1.22406256, -0.130654663, 0.277106255, 0.941511214, 0.33170712, 0.0593906641, -0.33170709, 0.881204426, 0.336822212, 0.0593910143, -0.336822152, 0.939693391),
  969. CFrame.new(-1.43159902, 0, 0.187939197, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
  970. CFrame.new(0.499998897, -1.99999988, -1.49011612e-06, 0.939692736, 0, -0.342019886, 0, 1, 0, 0.342019916, 0, 0.939692736),
  971. CFrame.new(-0.500001848, -1.99999988, 1.62422657e-06, 0.939692736, 0, 0.342019886, 0, 1, 0, -0.342019916, 0, 0.939692736),
  972. }, .3, false)
  973. end
  974. DBarrel.Transparency = 1
  975. Humanoid.WalkSpeed = 8
  976. attack = false
  977. end
  978.  
  979. Mouse.Button1Down:connect(function()
  980. if attack == false then
  981. smek()
  982. end
  983. end)
  984.  
  985. local sprintt = 0
  986. Mouse.KeyDown:connect(function(k)
  987. k = k:lower()
  988. if k=='m' then
  989. if mus.IsPlaying == true then
  990. mus:Stop()
  991. elseif mus.IsPaused == true then
  992. mus:Play()
  993. end
  994. end
  995. if attack == false then
  996. if k == 'z' then
  997. zhold = true
  998. shoot()
  999. elseif k == 'x' then
  1000. dbshoot()
  1001. end
  1002. end
  1003. end)
  1004.  
  1005. Mouse.KeyUp:connect(function(k)
  1006. k = k:lower()
  1007. if k == 'z' then
  1008. zhold = false
  1009. end
  1010. end)
  1011.  
  1012. coroutine.wrap(function()
  1013. while 1 do
  1014. swait()
  1015. if doe <= 360 then
  1016. doe = doe + 2
  1017. else
  1018. doe = 0
  1019. end
  1020. end
  1021. end)()
  1022. while true do
  1023. swait()
  1024. while true do
  1025. swait()
  1026. if Head:FindFirstChild("mus")==nil then
  1027. mus = Instance.new("Sound",Head)
  1028. mus.Name = "mus"
  1029. mus.SoundId = "rbxassetid://581195737"
  1030. mus.Looped = true
  1031. mus.Volume = 1
  1032. mus:Play()
  1033. end
  1034. if sprintt >= 1 then
  1035. sprintt = sprintt - 1
  1036. end
  1037. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1038. velocity = RootPart.Velocity.y
  1039. sine = sine + change
  1040. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, chara)
  1041. if RootPart.Velocity.y > 1 and hit == nil then
  1042. Anim = "Jump"
  1043. if attack == false then
  1044. PlayAnimationFromTable({
  1045. CFrame.new(0, 0.0382082276, -0.0403150208, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849),
  1046. CFrame.new(0, 1.46579528, 0.0939689279, 1, 0, 0, 0, 0.939692855, -0.342019796, 0, 0.342019796, 0.939692855),
  1047. CFrame.new(1.20945489, -0.213504896, 3.55388607e-07, 0.939692736, 0.342019916, 1.53461215e-07, -0.342019945, 0.939692736, 1.93715096e-07, -8.56816769e-08, -2.23517418e-07, 1.00000012),
  1048. CFrame.new(-1.20945573, -0.213503733, 5.0439985e-07, 0.939692736, -0.342019916, -1.53461215e-07, 0.342019945, 0.939692736, 1.93715096e-07, 8.56816769e-08, -2.23517418e-07, 1.00000012),
  1049. CFrame.new(0.5, -1.99739456, -0.0180913229, 1, 0, 0, 0, 1.00000012, 0, 0, 0, 1.00000012),
  1050. CFrame.new(-0.5, -1.30000103, -0.39999947, 1, 0, 0, 0, 0.939692676, 0.342020601, 0, -0.342020601, 0.939692676),
  1051. }, .3, false)
  1052. end
  1053. elseif RootPart.Velocity.y < -1 and hit == nil then
  1054. Anim = "Fall"
  1055. if attack == false then
  1056. PlayAnimationFromTable({
  1057. CFrame.new(0, -0.0646628663, 0.0399149321, 1, 0, 0, 0, 0.984807849, -0.173647985, 0, 0.173647985, 0.984807849),
  1058. CFrame.new(0, 1.4913609, -0.128171027, 1, 0, 0, 0, 0.939692855, 0.342019796, 0, -0.342019796, 0.939692855),
  1059. CFrame.new(1.55285025, 0.466259956, -9.26282269e-08, 0.766043842, -0.642788351, -6.46188241e-08, 0.642788291, 0.766043961, -7.4505806e-08, 1.04308128e-07, 1.49011612e-08, 1.00000012),
  1060. CFrame.new(-1.5605253, 0.475036323, -2.10609159e-07, 0.766043842, 0.642788351, 6.46188241e-08, -0.642788291, 0.766043961, -7.4505806e-08, -1.04308128e-07, 1.49011612e-08, 1.00000012),
  1061. CFrame.new(0.500000954, -1.9973948, -0.0180922765, 1, 0, 0, 0, 1.00000012, 0, 0, 0, 1.00000012),
  1062. CFrame.new(-0.499999046, -1.30000043, -0.400000483, 1, 0, 0, 0, 0.939692855, 0.342019796, 0, -0.342019796, 0.939692855),
  1063. }, .3, false)
  1064. end
  1065. elseif Torsovelocity < 1 and hit ~= nil then
  1066. Anim = "Idle"
  1067. if attack == false then
  1068. change = 1
  1069. PlayAnimationFromTable({
  1070. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0,.05 * math.cos((sine)/10), 0),
  1071. CFrame.new(0, 1.48262823, -0.0984786302, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849),
  1072. CFrame.new(1.20945334, -0.213505104, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, 1),
  1073. CFrame.new(-1.37076354, 0, -0.304326713, 0.866025388, 0, -0.500000238, 0, 1, 0, 0.500000238, 0, 0.866025388),
  1074. CFrame.new(0.499997705, -2, -2.77906656e-06, 0.984807849, 0, -0.173647985, 0, 1, 0, 0.173647985, 0, 0.984807849) * CFrame.new(0,-.05 * math.cos((sine)/10), 0),
  1075. CFrame.new(-0.50000149, -2, -2.11596489e-06, 0.984807849, 0, 0.173647985, 0, 1, 0, -0.173647985, 0, 0.984807849) * CFrame.new(0,-.05 * math.cos((sine)/10), 0),
  1076. }, .3, false)
  1077. end
  1078. elseif Torsovelocity > 2 and hit ~= nil then
  1079. Anim = "Walk"
  1080. if attack == false then
  1081. Humanoid.WalkSpeed = 8
  1082. PlayAnimationFromTable({
  1083. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0- .08 * math.cos((sine) / 5), 0) * CFrame.Angles(0, 0, 0),
  1084. CFrame.new(0, 1.48263013, -0.0984808952, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849),
  1085. CFrame.new(1.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, -.5 * math.cos((sine) / 10)) * CFrame.Angles(math.rad(0 + 30 * math.cos((sine) / 10)), 0, 0),
  1086. CFrame.new(-1.37076354, 0, -0.304326713, 0.866025388, 0, -0.500000238, 0, 1, 0, 0.500000238, 0, 0.866025388),
  1087. CFrame.new(0.540300786, -1.99793816, -9.82598067e-07, 0.998698533, -0.0510031395, 6.36324955e-07, 0.0510031395, 0.998698533, -1.00461093e-05, -8.35937328e-08, 1.08393433e-05, 1.00000024) * CFrame.new(0, 0, 0+ .5 * math.cos((sine) / 10)) * CFrame.Angles(math.rad(0 - 30 * math.cos((sine) / 10)), 0, 0),
  1088. CFrame.new(-0.539563596, -1.99794078, 1.12228372e-06, 0.998635888, 0.0523072146, -1.77852357e-07, -0.0523072146, 0.998635888, -1.00715051e-05, -3.89727461e-07, 1.08406466e-05, 1.00000024) * CFrame.new(0, 0, 0- .5 * math.cos((sine) / 10)) * CFrame.Angles(math.rad(0 + 30 * math.cos((sine) / 10)), 0, 0),
  1089. }, .3, false)
  1090. end
  1091. end
  1092. end
  1093. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement