kaualima12

coming test work

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