valentino2016

MadGuy

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