kaualima12

Untitled

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