Advertisement
Offsetchain

King Absalom Hammer

May 11th, 2018
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.53 KB | None | 0 0
  1. Player=game:GetService("Players").LocalPlayer -------- hello fucking fag who stole my script
  2. Character=Player.Character
  3. Backpack=Player.Backpack
  4. Torso=Character.Torso
  5. Head=Character.Head
  6. Humanoid=Character.Humanoid
  7. m=Instance.new('Model',Character)
  8. LeftArm=Character["Left Arm"]
  9. LeftLeg=Character["Left Leg"]
  10. RightArm=Character["Right Arm"]
  11. RightLeg=Character["Right Leg"]
  12. LS=Torso["Left Shoulder"]
  13. LH=Torso["Left Hip"]
  14. RS=Torso["Right Shoulder"]
  15. RH=Torso["Right Hip"]
  16. local p = game.Players.LocalPlayer
  17. local char = p.Character
  18. local hum = char.Humanoid
  19. local root = char.HumanoidRootPart
  20. hum.WalkSpeed = 9
  21. Face = Head.face
  22. Neck=Torso.Neck
  23. it=Instance.new
  24. attacktype=1
  25. vt=Vector3.new
  26. cf=CFrame.new
  27. euler=CFrame.fromEulerAnglesXYZ
  28. angles=CFrame.Angles
  29. cloaked=false
  30. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  31. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  32. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  33. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  34. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  35. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  36. RootPart=Character.HumanoidRootPart
  37. RootJoint=RootPart.RootJoint
  38. RootCF=euler(-1.57,0,3.14)
  39. attack = false
  40. attackdebounce = false
  41. deb=false
  42. equipped=true
  43. hand=false
  44. CanJoke = true;
  45. MMouse=nil
  46. combo=0
  47. mana=0
  48. trispeed=.2
  49. attackmode='none'
  50. local idle=0
  51. local Anim="Idle"
  52. local Effects={}
  53. local gun=false
  54. local shoot=false
  55. player=nil
  56. mana=0
  57.  
  58. print("From the depths of hell")
  59. wait(2)
  60. print("Rise")
  61. wait(1)
  62. print("Rise, Almighty Phammer")
  63.  
  64. function onKeyPress2(inputObject, gameProcessedEvent)
  65. if inputObject.KeyCode == Enum.KeyCode.T then
  66. Sound2 = Instance.new("Sound", workspace)
  67. Sound2.SoundId = "rbxassetid://135017755"
  68. Sound2.Looped = false
  69. Sound2.Volume = 1
  70. Sound2:Play()
  71. wait(10)
  72. end
  73. end
  74.  
  75. game:GetService("UserInputService").InputBegan:connect(onKeyPress2)
  76.  
  77. lite = Instance.new("PointLight")
  78. lite.Parent = Torso
  79. lite.Brightness = 10
  80. lite.Range = 15
  81. lite.Color = Color3.new(1,0,0)
  82.  
  83. z = Instance.new("Sound", Neck)
  84. z.SoundId = "rbxassetid://279530667"--282572614 -- 157060424 -- 303570180
  85. z.Looped = true
  86. z.Pitch = 1
  87. z.Volume = 0.3
  88. wait(.1)
  89. z:Play()
  90.  
  91. mouse=Player:GetMouse()
  92. --save shoulders
  93. RSH, LSH=nil, nil
  94. --welds
  95. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  96. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  97. LH=Torso["Left Hip"]
  98. RH=Torso["Right Hip"]
  99. TorsoColor=Torso.BrickColor
  100. function NoOutline(Part)
  101. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  102. end
  103. player=Player
  104. ch=Character
  105. RSH=ch.Torso["Right Shoulder"]
  106. LSH=ch.Torso["Left Shoulder"]
  107. --
  108. RSH.Parent=nil
  109. LSH.Parent=nil
  110. --
  111. RW.Name="Right Shoulder"
  112. RW.Part0=ch.Torso
  113. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  114. RW.C1=cf(0, 0.5, 0)
  115. RW.Part1=ch["Right Arm"]
  116. RW.Parent=ch.Torso
  117. --
  118. LW.Name="Left Shoulder"
  119. LW.Part0=ch.Torso
  120. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  121. LW.C1=cf(0, 0.5, 0)
  122. LW.Part1=ch["Left Arm"]
  123. LW.Parent=ch.Torso
  124.  
  125. Player=game:GetService('Players').LocalPlayer
  126. Character=Player.Character
  127. Mouse=Player:GetMouse()
  128. m=Instance.new('Model',Character)
  129.  
  130.  
  131. local function weldBetween(a, b)
  132. local weldd = Instance.new("ManualWeld")
  133. weldd.Part0 = a
  134. weldd.Part1 = b
  135. weldd.C0 = CFrame.new()
  136. weldd.C1 = b.CFrame:inverse() * a.CFrame
  137. weldd.Parent = a
  138. return weldd
  139. end
  140.  
  141. it=Instance.new
  142.  
  143. function nooutline(part)
  144. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  145. end
  146.  
  147. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  148. local fp=it("Part")
  149. fp.formFactor=formfactor
  150. fp.Parent=parent
  151. fp.Reflectance=reflectance
  152. fp.Transparency=transparency
  153. fp.CanCollide=false
  154. fp.Locked=true
  155. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  156. fp.Name=name
  157. fp.Size=size
  158. fp.Position=Character.Torso.Position
  159. nooutline(fp)
  160. fp.Material=material
  161. fp:BreakJoints()
  162. return fp
  163. end
  164.  
  165. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  166. local mesh=it(Mesh)
  167. mesh.Parent=part
  168. if Mesh=="SpecialMesh" then
  169. mesh.MeshType=meshtype
  170. mesh.MeshId=meshid
  171. end
  172. mesh.Offset=offset
  173. mesh.Scale=scale
  174. return mesh
  175. end
  176.  
  177. function weld(parent,part0,part1,c0,c1)
  178. local weld=it("Weld")
  179. weld.Parent=parent
  180. weld.Part0=part0
  181. weld.Part1=part1
  182. weld.C0=c0
  183. weld.C1=c1
  184. return weld
  185. end
  186.  
  187. handle=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really black","Handle",Vector3.new(0.504, 4.706, 0.604))
  188. handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2),CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 100))
  189.  
  190. Hitbox=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,1,"Really black","Hitbox",Vector3.new(2.057, 2.217, 2.301))
  191. Hitboxweld=weld(m,handle,Hitbox,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  192.  
  193. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really black","Part",Vector3.new(1.857, 2.017, 2.101))
  194. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -3.2, 0, -1, 0, 0, 0, 1, 0, -15, 0, -1))
  195.  
  196. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Really red","Part",Vector3.new(0.6, 2.017, 2.101))
  197. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.54, -3.2, 0, -1, 0, 0, 0, 1, 0, -15, 0, -1))
  198.  
  199. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Really red","Part",Vector3.new(0.6, 2.017, 2.101))
  200. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.54, -3.2, 0, -1, 0, 0, 0, 1, 0, -15, 0, -1))
  201.  
  202. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really black","Part",Vector3.new(0.5, 2.817, 2.801))
  203. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.04, -3.2, 0, -1, 0, 0, 0, 1, 0, -15, 0, -1))
  204.  
  205. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really black","Part",Vector3.new(0.5, 2.817, 2.801))
  206. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.08, -3.2, 0, -1, 0, 0, 0, 1, 0, -15, 0, -1)) ------------New Part 1 (Hammer extention)
  207.  
  208. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really black","Part",Vector3.new(0.5, 2.817, 2.801))
  209. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-2.08, -3.2, 0, -1, 0, 0, 0, 1, 0, -15, 0, -1)) ------------New Part 2 (Hammer extention)
  210.  
  211. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really black","Part",Vector3.new(0.514, 0.814, 0.524))
  212. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -4.2, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1)) ---------------- New Part 3 (Top)
  213.  
  214. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Really red","Part",Vector3.new(0.814, 0.314, 0.824))
  215. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -1.47, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1)) ---------------- New Part 4 (Middle extention)
  216.  
  217. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Really red","Part",Vector3.new(0.814, 0.314, 0.824))
  218. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -2.1, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1)) ---------------- New Part 5 (Middle extention)
  219.  
  220. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Really red","Part",Vector3.new(0.6, 2.017, 2.101))
  221. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.54, -3.2, 0, -1, 0, 0, 0, 1, 0, -15, 0, -1)) -------------- New Part 6 (
  222.  
  223. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really black","Part",Vector3.new(0.5, 2.817, 2.801))
  224. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.14, -3.2, 0, -1, 0, 0, 0, 1, 0, -15, 0, -1))
  225.  
  226. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Really red","Part",Vector3.new(0.514, 0.214, 0.524))
  227. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 2.46, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1))
  228.  
  229. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really black","Part",Vector3.new(0.514, 0.214, 0.534))
  230. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 2.67, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1))
  231.  
  232. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Really red","Part",Vector3.new(0.514, 0.214, 0.524))
  233. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 2.89, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1))
  234.  
  235. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really black","Part",Vector3.new(0.514, 0.214, 0.524))
  236. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 3.09, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1))
  237.  
  238. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really black","Part",Vector3.new(1.104, 1.906, 1.2))
  239. Partweld=weld(m,Character["Left Arm"],Part,CFrame.new(0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2),CFrame.new(0, 0.4, 0, 1, 0, 0, 0, 1, 0, 0, 0, 100)) ------------------- New Part 7 (Arm cannon base)
  240.  
  241. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Slate,0,0,"Really red","Part",Vector3.new(0.514, 0.214, 0.524))
  242. Partweld=weld(m,Character["Left Arm"],Part,CFrame.new(0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2),CFrame.new(0, 0, 1.3, 1, 0, 0, 0, 1, 0, 0, 90, 100))
  243. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset?id=156292343",Vector3.new(0, 0, 0),Vector3.new(1.28, 1.28, 5)) ------------------- New Part 8 (Blaster Mesh)
  244.  
  245. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Really red","Part",Vector3.new(1.204, 0.406, 1.25))
  246. Partweld=weld(m,Character["Left Arm"],Part,CFrame.new(0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2),CFrame.new(0, 0.95, 0, 1, 0, 0, 0, 1, 0, 0, 0, 100)) ---------------- New Part 9 (Arm cannon Amplifier 1/3)
  247.  
  248. Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Really red","Part",Vector3.new(1.204, 0.406, 1.25))
  249. Partweld=weld(m,Character["Left Arm"],Part,CFrame.new(0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2),CFrame.new(0, -0.15, 0, 1, 0, 0, 0, 1, 0, 0, 0, 100)) ---------------- New Part 9 (Arm cannon Amplifier 2/3)
  250.  
  251.  
  252. ---------------------------------------------------------------------------------------------------------------------------------------
  253.  
  254.  
  255.  
  256.  
  257.  
  258. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  259. if hit.Parent==nil then
  260. return
  261. end
  262. h=hit.Parent:FindFirstChild("Humanoid")
  263. for _,v in pairs(hit.Parent:children()) do
  264. if v:IsA("Humanoid") then
  265. h=v
  266. end
  267. end
  268. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  269. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  270. end
  271. if hit.Parent.className=="Hat" then
  272. hit=hit.Parent.Parent:findFirstChild("Head")
  273. end
  274. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  275. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  276. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  277. return
  278. end]]
  279. -- hs(hit,1.2)
  280. c=Instance.new("ObjectValue")
  281. c.Name="creator"
  282. c.Value=game:service("Players").LocalPlayer
  283. c.Parent=h
  284. game:GetService("Debris"):AddItem(c,.5)
  285. Damage=math.random(minim,maxim)
  286. -- h:TakeDamage(Damage)
  287. blocked=false
  288. block=hit.Parent:findFirstChild("Block")
  289. if block~=nil then
  290. print(block.className)
  291. if block.className=="NumberValue" then
  292. if block.Value>0 then
  293. blocked=true
  294. if decreaseblock==nil then
  295. block.Value=block.Value-1
  296. end
  297. end
  298. end
  299. if block.className=="IntValue" then
  300. if block.Value>0 then
  301. blocked=true
  302. if decreaseblock~=nil then
  303. block.Value=block.Value-1
  304. end
  305. end
  306. end
  307. end
  308. if blocked==false then
  309. -- h:TakeDamage(Damage)
  310. h.Health=h.Health-Damage
  311. showDamage(hit.Parent,Damage,.5,BrickColor.new("Really red"))
  312. else
  313. h.Health=h.Health-(Damage/2)
  314. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Really red"))
  315. end
  316. if Type=="Knockdown" then
  317. hum=hit.Parent.Humanoid
  318. hum.PlatformStand=true
  319. coroutine.resume(coroutine.create(function(HHumanoid)
  320. swait(1)
  321. HHumanoid.PlatformStand=false
  322. end),hum)
  323. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  324. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  325. local bodvol=Instance.new("BodyVelocity")
  326. bodvol.velocity=angle*knockback
  327. bodvol.P=5000
  328. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  329. bodvol.Parent=hit
  330. rl=Instance.new("BodyAngularVelocity")
  331. rl.P=3000
  332. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  333. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  334. rl.Parent=hit
  335. game:GetService("Debris"):AddItem(bodvol,.5)
  336. game:GetService("Debris"):AddItem(rl,.5)
  337. elseif Type=="Normal" then
  338. vp=Instance.new("BodyVelocity")
  339. vp.P=500
  340. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  341. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  342. if KnockbackType==1 then
  343. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  344. elseif KnockbackType==2 then
  345. vp.velocity=Property.CFrame.lookVector*knockback
  346. end
  347. if knockback>0 then
  348. vp.Parent=hit.Parent.Torso
  349. end
  350. game:GetService("Debris"):AddItem(vp,.5)
  351. elseif Type=="Up" then
  352. local bodyVelocity=Instance.new("BodyVelocity")
  353. bodyVelocity.velocity=vt(0,60,0)
  354. bodyVelocity.P=5000
  355. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  356. bodyVelocity.Parent=hit
  357. game:GetService("Debris"):AddItem(bodyVelocity,1)
  358. rl=Instance.new("BodyAngularVelocity")
  359. rl.P=3000
  360. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  361. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  362. rl.Parent=hit
  363. game:GetService("Debris"):AddItem(rl,.5)
  364. elseif Type=="Snare" then
  365. bp=Instance.new("BodyPosition")
  366. bp.P=2000
  367. bp.D=100
  368. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  369. bp.position=hit.Parent.Torso.Position
  370. bp.Parent=hit.Parent.Torso
  371. game:GetService("Debris"):AddItem(bp,1)
  372. elseif Type=="Target" then
  373. if Targetting==false then
  374. ZTarget=hit.Parent.Torso
  375. coroutine.resume(coroutine.create(function(Part)
  376. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  377. swait(5)
  378. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  379. end),ZTarget)
  380. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  381. targetgui=Instance.new("BillboardGui")
  382. targetgui.Parent=ZTarget
  383. targetgui.Size=UDim2.new(10,100,10,100)
  384. targ=Instance.new("ImageLabel")
  385. targ.Parent=targetgui
  386. targ.BackgroundTransparency=1
  387. targ.Image="rbxassetid://4834067"
  388. targ.Size=UDim2.new(1,0,1,0)
  389. cam.CameraType="Scriptable"
  390. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  391. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  392. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  393. Targetting=true
  394. RocketTarget=ZTarget
  395. for i=1,Property do
  396. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  397. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  398. swait()
  399. end
  400. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  401. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  402. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  403. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  404. end
  405. Targetting=false
  406. RocketTarget=nil
  407. targetgui.Parent=nil
  408. cam.CameraType="Custom"
  409. end
  410. end
  411. debounce=Instance.new("BoolValue")
  412. debounce.Name="DebounceHit"
  413. debounce.Parent=hit.Parent
  414. debounce.Value=true
  415. game:GetService("Debris"):AddItem(debounce,Delay)
  416. c=Instance.new("ObjectValue")
  417. c.Name="creator"
  418. c.Value=Player
  419. c.Parent=h
  420. game:GetService("Debris"):AddItem(c,.5)
  421. CRIT=false
  422. hitDeb=true
  423. AttackPos=6
  424. end
  425. end
  426.  
  427. showDamage=function(Char,Dealt,du,Color)
  428. m=Instance.new("Model")
  429. m.Name=tostring(Dealt)
  430. h=Instance.new("Humanoid")
  431. h.Health=0
  432. h.MaxHealth=0
  433. h.Parent=m
  434. c=Instance.new("Part")
  435. c.Transparency=0
  436. c.BrickColor=Color
  437. c.Name="Head"
  438. c.TopSurface=0
  439. c.BottomSurface=0
  440. c.formFactor="Plate"
  441. c.Size=Vector3.new(1,.4,1)
  442. ms=Instance.new("CylinderMesh")
  443. ms.Scale=Vector3.new(.8,.8,.8)
  444. if CRIT==true then
  445. ms.Scale=Vector3.new(1,1.25,1)
  446. end
  447. ms.Parent=c
  448. c.Reflectance=0
  449. Instance.new("BodyGyro").Parent=c
  450. c.Parent=m
  451. if Char:findFirstChild("Head")~=nil then
  452. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  453. elseif Char.Parent:findFirstChild("Head")~=nil then
  454. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  455. end
  456. f=Instance.new("BodyPosition")
  457. f.P=2000
  458. f.D=100
  459. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  460. f.position=c.Position+Vector3.new(0,3,0)
  461. f.Parent=c
  462. game:GetService("Debris"):AddItem(m,.5+du)
  463. c.CanCollide=false
  464. m.Parent=workspace
  465. c.CanCollide=false
  466. end
  467.  
  468.  
  469. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  470. local fp=it("Part")
  471. fp.formFactor=formfactor
  472. fp.Parent=parent
  473. fp.Reflectance=reflectance
  474. fp.Transparency=transparency
  475. fp.CanCollide=false
  476. fp.Locked=true
  477. fp.BrickColor=brickcolor
  478. fp.Name=name
  479. fp.Size=size
  480. fp.Position=Torso.Position
  481. NoOutline(fp)
  482. fp.Material="SmoothPlastic"
  483. fp:BreakJoints()
  484. return fp
  485. end
  486.  
  487. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  488. local mesh=it(Mesh)
  489. mesh.Parent=part
  490. if Mesh=="SpecialMesh" then
  491. mesh.MeshType=meshtype
  492. if meshid~="nil" then
  493. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  494. end
  495. end
  496. mesh.Offset=offset
  497. mesh.Scale=scale
  498. return mesh
  499. end
  500.  
  501. function weld(parent,part0,part1,c0)
  502. local weld=it("Weld")
  503. weld.Parent=parent
  504. weld.Part0=part0
  505. weld.Part1=part1
  506. weld.C0=c0
  507. return weld
  508. end
  509.  
  510. local Color1=Torso.BrickColor
  511.  
  512. local bodvel=Instance.new("BodyVelocity")
  513. local bg=Instance.new("BodyGyro")
  514.  
  515. function swait(num)
  516. if num==0 or num==nil then
  517. game:service'RunService'.Stepped:wait(0)
  518. else
  519. for i=0,num do
  520. game:service'RunService'.Stepped:wait(0)
  521. end
  522. end
  523. end
  524.  
  525.  
  526. so = function(id,par,vol,pit)
  527. coroutine.resume(coroutine.create(function()
  528. local sou = Instance.new("Sound",par or workspace)
  529. sou.Volume=vol
  530. sou.Pitch=pit or 1
  531. sou.SoundId=id
  532. swait()
  533. sou:play()
  534. game:GetService("Debris"):AddItem(sou,6)
  535. end))
  536. end
  537.  
  538. function clerp(a,b,t)
  539. local qa = {QuaternionFromCFrame(a)}
  540. local qb = {QuaternionFromCFrame(b)}
  541. local ax, ay, az = a.x, a.y, a.z
  542. local bx, by, bz = b.x, b.y, b.z
  543. local _t = 1-t
  544. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  545. end
  546.  
  547. function QuaternionFromCFrame(cf)
  548. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  549. local trace = m00 + m11 + m22
  550. if trace > 0 then
  551. local s = math.sqrt(1 + trace)
  552. local recip = 0.5/s
  553. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  554. else
  555. local i = 0
  556. if m11 > m00 then
  557. i = 1
  558. end
  559. if m22 > (i == 0 and m00 or m11) then
  560. i = 2
  561. end
  562. if i == 0 then
  563. local s = math.sqrt(m00-m11-m22+1)
  564. local recip = 0.5/s
  565. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  566. elseif i == 1 then
  567. local s = math.sqrt(m11-m22-m00+1)
  568. local recip = 0.5/s
  569. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  570. elseif i == 2 then
  571. local s = math.sqrt(m22-m00-m11+1)
  572. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  573. end
  574. end
  575. end
  576.  
  577. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  578. local xs, ys, zs = x + x, y + y, z + z
  579. local wx, wy, wz = w*xs, w*ys, w*zs
  580. local xx = x*xs
  581. local xy = x*ys
  582. local xz = x*zs
  583. local yy = y*ys
  584. local yz = y*zs
  585. local zz = z*zs
  586. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  587. end
  588.  
  589. function QuaternionSlerp(a, b, t)
  590. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  591. local startInterp, finishInterp;
  592. if cosTheta >= 0.0001 then
  593. if (1 - cosTheta) > 0.0001 then
  594. local theta = math.acos(cosTheta)
  595. local invSinTheta = 1/math.sin(theta)
  596. startInterp = math.sin((1-t)*theta)*invSinTheta
  597. finishInterp = math.sin(t*theta)*invSinTheta
  598. else
  599. startInterp = 1-t
  600. finishInterp = t
  601. end
  602. else
  603. if (1+cosTheta) > 0.0001 then
  604. local theta = math.acos(-cosTheta)
  605. local invSinTheta = 1/math.sin(theta)
  606. startInterp = math.sin((t-1)*theta)*invSinTheta
  607. finishInterp = math.sin(t*theta)*invSinTheta
  608. else
  609. startInterp = t-1
  610. finishInterp = t
  611. end
  612. end
  613. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  614. end
  615.  
  616. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  617. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  618. end
  619.  
  620. function onKeyPress(inputObject, gameProcessedEvent) -------------------------- KEYBIND FINALLY WORKED YAY :D
  621. if inputObject.KeyCode == Enum.KeyCode.R then
  622. attack = true
  623. attackdebounce = true
  624. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
  625. print("Dodge this! Omega blaster! i ate your moms pussy for dinner, cec2 is boss")
  626. z = Instance.new("Sound", Torso)
  627. z.SoundId = "rbxassetid://264358562"--282572614 -- 157060424 -- 303570180
  628. z.Looped = false
  629. z.Pitch = 1
  630. z.Volume = 2
  631. wait(.1)
  632. z:Play()
  633.  
  634. sp = Instance.new("Part",LeftArm)
  635. sp.Anchored = true
  636. sp.CanCollide = false
  637. sp.Locked = true
  638. sp.Transparency = 0.1
  639. sp.Material = "Neon"
  640. sp.Size = Vector3.new(1,1,1)
  641. sp.TopSurface = "SmoothNoOutlines"
  642. sp.BottomSurface = "SmoothNoOutlines"
  643. sp.BrickColor = BrickColor.new("Crimson")
  644.  
  645. sp2 = Instance.new("Part",LeftArm)
  646. sp2.Anchored = true
  647. sp2.CanCollide = false
  648. sp2.Locked = true
  649. sp2.Transparency = 0.1
  650. sp2.Material = "Neon"
  651. sp2.Size = Vector3.new(1,1,1)
  652. sp2.TopSurface = "SmoothNoOutlines"
  653. sp2.BottomSurface = "SmoothNoOutlines"
  654. sp2.BrickColor = BrickColor.new("Crimson")
  655.  
  656. sp3 = Instance.new("Part",LeftArm)
  657. sp3.Anchored = true
  658. sp3.CanCollide = false
  659. sp3.Locked = true
  660. sp3.Transparency = 0.1
  661. sp3.Material = "Neon"
  662. sp3.Size = Vector3.new(1,1,1)
  663. sp3.TopSurface = "SmoothNoOutlines"
  664. sp3.BottomSurface = "SmoothNoOutlines"
  665. sp3.BrickColor = BrickColor.new("Crimson")
  666.  
  667. sp4 = Instance.new("Part",LeftArm)
  668. sp4.Anchored = true
  669. sp4.CanCollide = false
  670. sp4.Locked = true
  671. sp4.Transparency = 0.1
  672. sp4.Material = "Neon"
  673. sp4.Size = Vector3.new(1,1,1)
  674. sp4.TopSurface = "SmoothNoOutlines"
  675. sp4.BottomSurface = "SmoothNoOutlines"
  676. sp4.BrickColor = BrickColor.new("Crimson")
  677.  
  678. local bem = Instance.new("Part", LeftArm)
  679. bem.Anchored = true
  680. bem.BrickColor = BrickColor.new("Crimson")
  681. bem.CanCollide = false
  682. bem.FormFactor = 3
  683. bem.Name = "Beam"
  684. bem.Size = Vector3.new(1, 1, 1)
  685. bem.Transparency = 0.35
  686. bem.TopSurface = 0
  687. bem.BottomSurface = 0
  688.  
  689. local bemm = Instance.new("SpecialMesh", bem)
  690. bemm.MeshType = 4
  691. bemm.Scale = Vector3.new(1, 4, 4)
  692.  
  693. local bem2 = Instance.new("Part", LeftArm)
  694. bem2.Anchored = true
  695. bem2.BrickColor = BrickColor.new("Crimson")
  696. bem2.CanCollide = false
  697. bem2.FormFactor = 3
  698. bem2.Name = "Beam2"
  699. bem2.Size = Vector3.new(1, 1, 1)
  700. bem2.Transparency = 0.50
  701. bem2.TopSurface = 0
  702. bem2.BottomSurface = 0
  703.  
  704. local bemm2 = Instance.new("SpecialMesh", bem2)
  705. bemm2.MeshType = 4
  706. bemm2.Scale = Vector3.new(1, 4, 4)
  707.  
  708. local bem3 = Instance.new("Part", LeftArm)
  709. bem3.Anchored = true
  710. bem3.BrickColor = BrickColor.new("Crimson")
  711. bem3.CanCollide = false
  712. bem3.FormFactor = 3
  713. bem3.Name = "Beam2"
  714. bem3.Size = Vector3.new(1, 1, 1)
  715. bem3.Transparency = 0.50
  716. bem3.TopSurface = 0
  717. bem3.BottomSurface = 0
  718.  
  719. local bemm3 = Instance.new("SpecialMesh", bem3)
  720. bemm3.MeshType = 4
  721. bemm3.Scale = Vector3.new(1, 4, 4)
  722.  
  723. local bem4 = Instance.new("Part", LeftArm)
  724. bem4.Anchored = true
  725. bem4.BrickColor = BrickColor.new("Crimson")
  726. bem4.CanCollide = false
  727. bem4.FormFactor = 3
  728. bem4.Name = "Beam2"
  729. bem4.Size = Vector3.new(1, 1, 1)
  730. bem4.Transparency = 0.50
  731. bem4.TopSurface = 0
  732. bem4.BottomSurface = 0
  733.  
  734. local beam4 = Instance.new("Part", LeftArm)
  735. beam4.Anchored = true
  736. beam4.BrickColor = BrickColor.new("Crimson")
  737. beam4.CanCollide = false
  738. beam4.FormFactor = 3
  739. beam4.Name = "Beam2"
  740. beam4.Size = Vector3.new(1, 1, 1)
  741. beam4.Transparency = 0.50
  742. beam4.TopSurface = 0
  743. beam4.BottomSurface = 0
  744.  
  745. local beamm4 = Instance.new("SpecialMesh", beam4)
  746. beamm4.MeshType = "Cylinder"
  747. beamm4.Scale = Vector3.new(1, 4, 4)
  748.  
  749. spm = Instance.new("SpecialMesh",sp)
  750. spm.MeshType = "Sphere"
  751. spm.Scale = Vector3.new(21,21,21)
  752.  
  753. spm2 = Instance.new("SpecialMesh",sp2)
  754. spm2.MeshType = "Sphere"
  755. spm2.Scale = Vector3.new(21,21,21)
  756.  
  757. spm3 = Instance.new("SpecialMesh",sp3)
  758. spm3.MeshType = "Sphere"
  759. spm3.Scale = Vector3.new(21,21,21)
  760.  
  761. spm4 = Instance.new("SpecialMesh",sp4)
  762. spm4.MeshType = "Sphere"
  763. spm4.Scale = Vector3.new(22,22,22)
  764.  
  765. function onTouchedBeam(part)
  766. local h = part.Parent:findFirstChild("Humanoid")
  767. if h~=nil and game.Players:GetPlayerFromCharacter(h.Parent)~=game.Players.LocalPlayer then
  768. h.Health = h.Health -200
  769. wait(2)
  770. end
  771. end
  772. bem.Touched:connect(onTouchedBeam)
  773.  
  774.  
  775.  
  776. for i=0,2.0,0.1 do
  777. swait()
  778. bem.CFrame = LeftArm.CFrame * CFrame.new(0, -100.2 -(i/2), 0) * CFrame.Angles(0, 0, math.rad(90))
  779. bem2.CFrame = LeftArm.CFrame * CFrame.new(0, -100.2 -(i/2), 0) * CFrame.Angles(0, 0, math.rad(90))
  780. bem3.CFrame = LeftArm.CFrame * CFrame.new(0, -100.2 -(i/2), 0) * CFrame.Angles(0, 0, math.rad(90))
  781. beam4.CFrame = LeftArm.CFrame * CFrame.new(0, -100.2 -(i/2), 0) * CFrame.Angles(0, 0, math.rad(90))
  782. spm.Scale = spm.Scale - Vector3.new(1,1,1)
  783. sp.CFrame = root.CFrame*CFrame.new(-1.5,0.5,-2)
  784. sp2.CFrame = root.CFrame*CFrame.new(-1.5,0.5,-2)
  785. sp3.CFrame = root.CFrame*CFrame.new(-1.5,0.5,-2)
  786. sp4.CFrame = root.CFrame*CFrame.new(-1.5,0.5,-2)
  787. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(90),math.rad(0),math.rad(0)),.3)
  788. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(25),math.rad(0),math.rad(0)),.0)
  789. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  790. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  791. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-80),math.rad(20),math.rad(0)),.0)
  792. end
  793. wait(0.2)
  794. for i=0,2.0,0.1 do
  795. swait()
  796. spm2.Scale = spm2.Scale - Vector3.new(1,1,1)
  797. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(25),math.rad(0),math.rad(0)),.0)
  798. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  799. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  800. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-80),math.rad(20),math.rad(0)),.0)
  801. end
  802. wait(0.2)
  803. for i=0,2.0,0.1 do
  804. swait()
  805. spm3.Scale = spm3.Scale - Vector3.new(1,1,1)
  806. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(25),math.rad(0),math.rad(0)),.0)
  807. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  808. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  809. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-80),math.rad(20),math.rad(0)),.0)
  810. end
  811. wait(0.2)
  812. for i=0,2.0,0.1 do
  813. swait()
  814. spm4.Scale = spm4.Scale - Vector3.new(1,1,1)
  815. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(25),math.rad(0),math.rad(0)),.0)
  816. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  817. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  818. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-80),math.rad(20),math.rad(0)),.0)
  819. end
  820. wait(3)
  821. for i=6,6.0,6.1 do
  822. swait()
  823. bem.Size = Vector3.new(1000, 3, 3)
  824. bem.CFrame = LeftArm.CFrame * CFrame.new(0, -498.2 -(i/2), 0) * CFrame.Angles(0, 0, math.rad(90))
  825. bem2.Size = Vector3.new(1000, 2, 2)
  826. bem2.CFrame = LeftArm.CFrame * CFrame.new(0, -498.2 -(i/2), 0) * CFrame.Angles(0, 0, math.rad(90))
  827. bem3.CFrame = LeftArm.CFrame * CFrame.new(0, -498.2 -(i/2), 0) * CFrame.Angles(0, 0, math.rad(90))
  828. bem3.Size = Vector3.new(1000, 1, 1)
  829. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(25),math.rad(0),math.rad(0)),.0)
  830. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  831. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  832. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-80),math.rad(20),math.rad(0)),.0)
  833. end
  834. wait(3)
  835. for i=0,2.0,2.1 do
  836. swait(5)
  837. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(25),math.rad(0),math.rad(0)),.0)
  838. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  839. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  840. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-80),math.rad(20),math.rad(0)),.0)
  841. end
  842.  
  843.  
  844. wait(2)
  845. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 12
  846. attack = false
  847. sp:Destroy()
  848. sp2:Destroy()
  849. sp3:Destroy()
  850. spm:Destroy()
  851. spm2:Destroy()
  852. spm3:Destroy()
  853. spm4:Destroy()
  854. sp4:Destroy()
  855. bem:Destroy()
  856. bem2:Destroy()
  857. bemm:Destroy()
  858. bemm2:Destroy()
  859. bemm3:Destroy()
  860. bem3:Destroy()
  861. end
  862. end
  863.  
  864. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
  865.  
  866. mouse.Button1Down:connect(function()
  867. if attack==false then
  868. if attacktype==1 then
  869. attack=true
  870. attacktype=2
  871. attackone()
  872. elseif attacktype==2 then
  873. attack=true
  874. attacktype=3
  875. attacktwo()
  876. elseif attacktype==3 then
  877. attack=true
  878. attacktype=1
  879. attackthree()
  880.  
  881. end
  882. end
  883. end)
  884.  
  885. function attackone()
  886. con1=Hitbox.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(10,20),"Normal",RootPart,.2,1) end)
  887. attack = true
  888. for i=0,2.0,0.1 do
  889. swait()
  890. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(120),math.rad(0),math.rad(10)),.3)
  891. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(25),math.rad(0),math.rad(0)),.0)
  892. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  893. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(15)),.3)
  894. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  895. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-80),math.rad(20),math.rad(0)),.0)
  896. end
  897. so("http://roblox.com/asset/?id=189505639",Hitbox,1,1)
  898. for i=0,2.0,0.1 do
  899. swait()
  900. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-60),math.rad(0),math.rad(20)),.3)
  901. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(35),math.rad(0),math.rad(0)),.0)
  902. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  903. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(15)),.3)
  904. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  905. handleweld.C0=clerp(handleweld.C0,cf(0,0,.4)*angles(math.rad(80),math.rad(-20),math.rad(0)),.0)
  906.  
  907. end
  908. attack = false
  909. con1:disconnect()
  910. end
  911.  
  912. function attacktwo()
  913. con1=Hitbox.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(10,20),"Normal",RootPart,.2,1) end)
  914. attack = true
  915. for i=0,2.0,0.1 do
  916. swait()
  917. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(120),math.rad(0),math.rad(10)),.3)
  918. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(25),math.rad(0),math.rad(0)),.0)
  919. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  920. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(15)),.3)
  921. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  922. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-80),math.rad(20),math.rad(0)),.0)
  923. end
  924. so("http://roblox.com/asset/?id=189505639",Hitbox,1,1)
  925. for i=0,2.0,0.1 do
  926. swait()
  927. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-60),math.rad(0),math.rad(20)),.3)
  928. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(35),math.rad(0),math.rad(0)),.0)
  929. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  930. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(15)),.3)
  931. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  932. handleweld.C0=clerp(handleweld.C0,cf(0,0,.4)*angles(math.rad(80),math.rad(-20),math.rad(0)),.0)
  933. end
  934. attack = false
  935. con1:disconnect()
  936. end
  937.  
  938. function attackthree()
  939. con1=Hitbox.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(10,20),"Normal",RootPart,.2,1) end)
  940. attack=true
  941. for i=0,2.0,0.1 do
  942. swait()
  943. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(120),math.rad(0),math.rad(10)),.3)
  944. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(25),math.rad(0),math.rad(0)),.0)
  945. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  946. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(15)),.3)
  947. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  948. handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-80),math.rad(20),math.rad(0)),.0)
  949. end
  950. so("http://roblox.com/asset/?id=189505639",Hitbox,1,1)
  951. for i=0,2.0,0.1 do
  952. swait()
  953. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-60),math.rad(0),math.rad(20)),.3)
  954. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(35),math.rad(0),math.rad(0)),.0)
  955. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(1),math.rad(0),math.rad(0)),.3)
  956. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(15)),.3)
  957. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  958. handleweld.C0=clerp(handleweld.C0,cf(0,0,.4)*angles(math.rad(80),math.rad(-20),math.rad(0)),.0)
  959. end
  960. attack = false
  961. con1:disconnect()
  962. end
  963.  
  964.  
  965.  
  966. local sine = 0
  967. local change = 1
  968. local val = 0
  969.  
  970. local mananum=0
  971. while true do
  972. swait()
  973. sine = sine + change
  974. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  975. local velderp=RootPart.Velocity.y
  976. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  977. if equipped==true or equipped==false then
  978. if attack==false then
  979. idle=idle+1
  980. else
  981. idle=0
  982. end
  983. if idle>=500 then
  984. if attack==false then
  985. --Sheath()
  986. end
  987. end
  988. if RootPart.Velocity.y > 1 and hitfloor==nil then
  989. Anim="Jump"
  990. if attack==false then
  991. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  992. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  993. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-60),math.rad(0),math.rad(50)),.3)
  994. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(50),math.rad(0),math.rad(-40)),.3)
  995. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(15)),.3)
  996. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  997. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  998. end
  999. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1000. Anim="Fall"
  1001. if attack==false then
  1002. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  1003. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1004. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(40)),.3)
  1005. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(40),math.rad(0),math.rad(-30)),.3)
  1006. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(15)),.3)
  1007. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1008. handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(20),math.rad(0),math.rad(0)),.0)
  1009. end
  1010. elseif torvel<1 and hitfloor~= nil then
  1011. local idleanim=0
  1012. Anim="Idle"
  1013. if attack==false then
  1014. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.0)
  1015. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(13.5),math.rad(0),math.rad(0)),.3)
  1016. RW.C0=clerp(RW.C0,cf(1.5, 0.4, 0)*angles(math.rad(35),math.rad(0),math.rad(0)),.3)
  1017. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(0),math.rad(0),math.rad(-8)),.3)
  1018. RH.C0=clerp(RH.C0,cf(1,-1,-.25)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(9)),.3)
  1019. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1020. handleweld.C0=clerp(handleweld.C0,cf(0,0,-0.5)*angles(math.rad(-14),math.rad(0),math.rad(0)),.3)
  1021. end
  1022. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1023. Anim="Walk"
  1024. if attack==false then
  1025. change=1
  1026. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1027. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(9.5),math.rad(0),math.rad(0)),.3)
  1028. RW.C0=clerp(RW.C0,cf(1.5, 0.4, 0)*angles(math.rad(35),math.rad(-20),math.rad(0)),.3)
  1029. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(math.rad(-10),math.rad(-60),math.rad(30)),.3)
  1030. handleweld.C0=clerp(handleweld.C0,cf(0,0,.3)*angles(math.rad(70),math.rad(-20),math.rad(0)),.0)
  1031. RH.C0=clerp(RH.C0,cf(1,-0.8,-.25)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1032. LH.C0=clerp(LH.C0,cf(-1,-0.8,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1033. end
  1034. elseif torvel>=22 and hitfloor~=nil then
  1035. Anim="Run"
  1036. if attack==false then
  1037. end
  1038. end
  1039. end
  1040. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement