Advertisement
Guest User

my barain hurty

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