Advertisement
ZaGodlyNoob

Prototype #1 (A SCRIPT, FE)

Nov 11th, 2018
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("PROTOTYPE #1, ACTIVATE!")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer
  6. end
  7. Player=game:GetService("Players").LocalPlayer
  8. Character=Player.Character
  9. PlayerGui=Player.PlayerGui
  10. Backpack=Player.Backpack
  11. Torso=Character.Torso
  12. Head=Character.Head
  13. Humanoid=Character.Humanoid
  14. m=Instance.new('Model',Character)
  15. LeftArm=Character["Left Arm"]
  16. LeftLeg=Character["Left Leg"]
  17. RightArm=Character["Right Arm"]
  18. RightLeg=Character["Right Leg"]
  19. LS=Torso["Left Shoulder"]
  20. LH=Torso["Left Hip"]
  21. RS=Torso["Right Shoulder"]
  22. RH=Torso["Right Hip"]
  23. Face = Head.face
  24. Neck=Torso.Neck
  25. it=Instance.new
  26. attacktype=1
  27. vt=Vector3.new
  28. cf=CFrame.new
  29. euler=CFrame.fromEulerAnglesXYZ
  30. angles=CFrame.Angles
  31. cloaked=false
  32. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  33. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  34. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  35. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  36. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  37. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  38. RootPart=Character.HumanoidRootPart
  39. RootJoint=RootPart.RootJoint
  40. RootCF=euler(-1.57,0,3.14)
  41. attack = false
  42. attackdebounce = false
  43. deb=false
  44. equipped=true
  45. hand=false
  46. MMouse=nil
  47. combo=0
  48. mana=0
  49. trispeed=1
  50. pathtrans=.7
  51. attackmode='none'
  52. local idle=0
  53. local Anim="Idle"
  54. local Effects={}
  55. local gun=false
  56. local shoot=false
  57. player=nil
  58. cloak=false
  59. lightcolor='Bright blue'
  60.  
  61. mouse=Player:GetMouse()
  62. --save shoulders
  63. RSH, LSH=nil, nil
  64. --welds
  65. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  66. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  67. LH=Torso["Left Hip"]
  68. RH=Torso["Right Hip"]
  69. TorsoColor=Torso.BrickColor
  70. function NoOutline(Part)
  71. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  72. end
  73. player=Player
  74. ch=Character
  75. RSH=ch.Torso["Right Shoulder"]
  76. LSH=ch.Torso["Left Shoulder"]
  77. --
  78. RSH.Parent=nil
  79. LSH.Parent=nil
  80. --
  81. RW.Name="Right Shoulder"
  82. RW.Part0=ch.Torso
  83. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  84. RW.C1=cf(0, 0.5, 0)
  85. RW.Part1=ch["Right Arm"]
  86. RW.Parent=ch.Torso
  87. --
  88. LW.Name="Left Shoulder"
  89. LW.Part0=ch.Torso
  90. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  91. LW.C1=cf(0, 0.5, 0)
  92. LW.Part1=ch["Left Arm"]
  93. LW.Parent=ch.Torso
  94.  
  95. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  96. local fp=it("Part")
  97. fp.formFactor=formfactor
  98. fp.Parent=parent
  99. fp.Reflectance=reflectance
  100. fp.Transparency=transparency
  101. fp.CanCollide=false
  102. fp.Locked=true
  103. fp.BrickColor=brickcolor
  104. fp.Name=name
  105. fp.Size=size
  106. fp.Position=Torso.Position
  107. NoOutline(fp)
  108. fp.Material="SmoothPlastic"
  109. fp:BreakJoints()
  110. return fp
  111. end
  112.  
  113. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  114. local mesh=it(Mesh)
  115. mesh.Parent=part
  116. if Mesh=="SpecialMesh" then
  117. mesh.MeshType=meshtype
  118. if meshid~="nil" then
  119. mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
  120. end
  121. end
  122. mesh.Offset=offset
  123. mesh.Scale=scale
  124. return mesh
  125. end
  126.  
  127. function weld(parent,part0,part1,c0)
  128. local weld=it("Weld")
  129. weld.Parent=parent
  130. weld.Part0=part0
  131. weld.Part1=part1
  132. weld.C0=c0
  133. return weld
  134. end
  135.  
  136. local Color1=Torso.BrickColor
  137.  
  138. local bodvel=Instance.new("BodyVelocity")
  139. local bg=Instance.new("BodyGyro")
  140.  
  141. function swait(num)
  142. if num==0 or num==nil then
  143. game:service'RunService'.Stepped:wait(0)
  144. else
  145. for i=0,num do
  146. game:service'RunService'.Stepped:wait(0)
  147. end
  148. end
  149. end
  150.  
  151.  
  152. so = function(id,par,vol,pit)
  153. coroutine.resume(coroutine.create(function()
  154. local sou = Instance.new("Sound",par or workspace)
  155. sou.Volume=vol
  156. sou.Pitch=pit or 1
  157. sou.SoundId=id
  158. swait()
  159. sou:play()
  160. game:GetService("Debris"):AddItem(sou,6)
  161. end))
  162. end
  163.  
  164. function clerp(a,b,t)
  165. local qa = {QuaternionFromCFrame(a)}
  166. local qb = {QuaternionFromCFrame(b)}
  167. local ax, ay, az = a.x, a.y, a.z
  168. local bx, by, bz = b.x, b.y, b.z
  169. local _t = 1-t
  170. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  171. end
  172.  
  173. function QuaternionFromCFrame(cf)
  174. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  175. local trace = m00 + m11 + m22
  176. if trace > 0 then
  177. local s = math.sqrt(1 + trace)
  178. local recip = 0.5/s
  179. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  180. else
  181. local i = 0
  182. if m11 > m00 then
  183. i = 1
  184. end
  185. if m22 > (i == 0 and m00 or m11) then
  186. i = 2
  187. end
  188. if i == 0 then
  189. local s = math.sqrt(m00-m11-m22+1)
  190. local recip = 0.5/s
  191. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  192. elseif i == 1 then
  193. local s = math.sqrt(m11-m22-m00+1)
  194. local recip = 0.5/s
  195. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  196. elseif i == 2 then
  197. local s = math.sqrt(m22-m00-m11+1)
  198. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  199. end
  200. end
  201. end
  202.  
  203. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  204. local xs, ys, zs = x + x, y + y, z + z
  205. local wx, wy, wz = w*xs, w*ys, w*zs
  206. local xx = x*xs
  207. local xy = x*ys
  208. local xz = x*zs
  209. local yy = y*ys
  210. local yz = y*zs
  211. local zz = z*zs
  212. 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))
  213. end
  214.  
  215. function QuaternionSlerp(a, b, t)
  216. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  217. local startInterp, finishInterp;
  218. if cosTheta >= 0.0001 then
  219. if (1 - cosTheta) > 0.0001 then
  220. local theta = math.acos(cosTheta)
  221. local invSinTheta = 1/math.sin(theta)
  222. startInterp = math.sin((1-t)*theta)*invSinTheta
  223. finishInterp = math.sin(t*theta)*invSinTheta
  224. else
  225. startInterp = 1-t
  226. finishInterp = t
  227. end
  228. else
  229. if (1+cosTheta) > 0.0001 then
  230. local theta = math.acos(-cosTheta)
  231. local invSinTheta = 1/math.sin(theta)
  232. startInterp = math.sin((t-1)*theta)*invSinTheta
  233. finishInterp = math.sin(t*theta)*invSinTheta
  234. else
  235. startInterp = t-1
  236. finishInterp = t
  237. end
  238. end
  239. 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
  240. end
  241.  
  242. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  243. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  244. end
  245.  
  246. function SkullEffect(brickcolor,cframe,x1,y1,z1,delay)
  247. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  248. prt.Anchored=true
  249. prt.CFrame=cframe
  250. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1))
  251. --http://www.roblox.com/asset/?id=4770560
  252. game:GetService("Debris"):AddItem(prt,2)
  253. CF=prt.CFrame
  254. coroutine.resume(coroutine.create(function(Part,Mesh,TehCF)
  255. for i=0,1,0.2 do
  256. wait()
  257. Part.CFrame=CF*cf(0,0,-0.4)
  258. end
  259. for i=0,1,delay do
  260. wait()
  261. --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5)
  262. Mesh.Scale=Mesh.Scale
  263. end
  264. for i=0,1,0.1 do
  265. wait()
  266. Part.Transparency=i
  267. end
  268. Part.Parent=nil
  269. end),prt,msh,CF)
  270. end
  271.  
  272. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  273. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  274. prt.Anchored=true
  275. prt.CFrame=cframe
  276. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  277. game:GetService("Debris"):AddItem(prt,5)
  278. coroutine.resume(coroutine.create(function(Part,Mesh)
  279. for i=0,1,delay do
  280. wait()
  281. Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  282. Part.Transparency=i
  283. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  284. end
  285. Part.Parent=nil
  286. end),prt,msh)
  287. end
  288.  
  289. function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  290. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  291. prt.Anchored=false
  292. prt.CFrame=cframe
  293. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  294. local wld=weld(prt,prt,Parent,cframe)
  295. game:GetService("Debris"):AddItem(prt,5)
  296. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  297. for i=0,1,delay do
  298. wait()
  299. Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe
  300. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  301. Part.Transparency=i
  302. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  303. end
  304. Part.Parent=nil
  305. end),prt,msh,wld)
  306. end
  307.  
  308. function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay)
  309. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  310. prt.Anchored=false
  311. prt.CFrame=cframe
  312. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  313. local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0))
  314. game:GetService("Debris"):AddItem(prt,5)
  315. coroutine.resume(coroutine.create(function(Part,Mesh,Weld)
  316. for i=0,1,delay do
  317. wait()
  318. Weld.C0=euler(i*20,0,0)
  319. --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  320. Part.Transparency=i
  321. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  322. end
  323. Part.Parent=nil
  324. end),prt,msh,wld)
  325. end
  326.  
  327. function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  328. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  329. prt.Anchored=true
  330. prt.CFrame=cframe
  331. local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  332. game:GetService("Debris"):AddItem(prt,2)
  333. coroutine.resume(coroutine.create(function(Part,Mesh)
  334. for i=0,1,delay do
  335. wait()
  336. Part.CFrame=Part.CFrame
  337. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  338. local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  339. prt2.Anchored=true
  340. prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  341. local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  342. game:GetService("Debris"):AddItem(prt2,2)
  343. coroutine.resume(coroutine.create(function(Part,Mesh)
  344. for i=0,1,0.1 do
  345. wait()
  346. Part.CFrame=Part.CFrame*cf(0,0.5,0)
  347. end
  348. Part.Parent=nil
  349. end),prt2,msh2)
  350. end
  351. for i=0,1,delay*2 do
  352. wait()
  353. Part.CFrame=Part.CFrame
  354. Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i)
  355. end
  356. Part.Parent=nil
  357. end),prt,msh)
  358. end
  359.  
  360. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  361. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  362. prt.Anchored=true
  363. prt.CFrame=cframe
  364. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  365. game:GetService("Debris"):AddItem(prt,2)
  366. coroutine.resume(coroutine.create(function(Part,Mesh)
  367. for i=0,1,delay do
  368. wait()
  369. Part.CFrame=Part.CFrame
  370. Part.Transparency=i
  371. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  372. end
  373. Part.Parent=nil
  374. end),prt,msh)
  375. end
  376.  
  377. function MagicRing(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  378. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  379. prt.Anchored=true
  380. prt.CFrame=cframe*euler(x2,y2,z2)
  381. --"http://www.roblox.com/asset/?id=168892465"
  382. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  383. game:GetService("Debris"):AddItem(prt,2)
  384. coroutine.resume(coroutine.create(function(Part,Mesh)
  385. for i=0,1,0.03 do
  386. wait()
  387. Part.CFrame=Part.CFrame
  388. Part.Transparency=i
  389. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  390. end
  391. Part.Parent=nil
  392. end),prt,msh)
  393. end
  394.  
  395. function BreakEffect(brickcolor,cframe,x1,y1,z1)
  396. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  397. prt.Anchored=true
  398. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  399. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  400. game:GetService("Debris"):AddItem(prt,2)
  401. coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb)
  402. CF=Part.CFrame
  403. Numbb=0
  404. randnumb=math.random()/10
  405. rand1=math.random()/10
  406. for i=0,1,rand1 do
  407. wait()
  408. CF=CF*cf(0,math.random()/2,0)
  409. --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0)
  410. Part.CFrame=CF*euler(Numbb,0,0)
  411. Part.Transparency=i
  412. Numbb=Numbb+randnumb
  413. end
  414. Part.Parent=nil
  415. end),prt,CF,Numbb,randnumb)
  416. end
  417.  
  418. function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  419. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  420. prt.Anchored=true
  421. prt.CFrame=cframe
  422. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1))
  423. game:GetService("Debris"):AddItem(prt,5)
  424. coroutine.resume(coroutine.create(function(Part,Mesh)
  425. for i=0,1,delay do
  426. wait()
  427. Part.CFrame=Part.CFrame*euler(0,0.7,0)
  428. Part.Transparency=i
  429. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  430. end
  431. Part.Parent=nil
  432. end),prt,msh)
  433. end
  434.  
  435. function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  436. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  437. prt.Anchored=true
  438. prt.CFrame=cframe
  439. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
  440. game:GetService("Debris"):AddItem(prt,2)
  441. coroutine.resume(coroutine.create(function(Part,Mesh)
  442. for i=0,1,delay do
  443. wait()
  444. Part.CFrame=Part.CFrame*cf(0,y3/2,0)
  445. Part.Transparency=i
  446. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  447. end
  448. Part.Parent=nil
  449. end),prt,msh)
  450. end
  451.  
  452. function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay)
  453. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  454. prt.Anchored=true
  455. prt.CFrame=cframe*cf(x,y,z)
  456. msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1))
  457. game:GetService("Debris"):AddItem(prt,5)
  458. coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee)
  459. local num=math.random()
  460. local num2=math.random(-3,2)+math.random()
  461. local numm=0
  462. for i=0,1,delay*2 do
  463. swait()
  464. Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0)
  465. Part.Transparency=i
  466. numm=numm+0.01
  467. end
  468. Part.Parent=nil
  469. Mesh.Parent=nil
  470. end),prt,msh,x,y,z)
  471. end
  472.  
  473. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  474. if hit.Parent==nil then
  475. return
  476. end
  477. h=hit.Parent:FindFirstChild("Humanoid")
  478. for _,v in pairs(hit.Parent:children()) do
  479. if v:IsA("Humanoid") then
  480. h=v
  481. end
  482. end
  483. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  484. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  485. end
  486. if hit.Parent.className=="Hat" then
  487. hit=hit.Parent.Parent:findFirstChild("Head")
  488. end
  489. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  490. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  491. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  492. return
  493. end]]
  494. -- hs(hit,1.2)
  495. c=Instance.new("ObjectValue")
  496. c.Name="creator"
  497. c.Value=game:service("Players").LocalPlayer
  498. c.Parent=h
  499. game:GetService("Debris"):AddItem(c,.5)
  500. Damage=math.random(minim,maxim)
  501. -- h:TakeDamage(Damage)
  502. blocked=false
  503. block=hit.Parent:findFirstChild("Block")
  504. if block~=nil then
  505. print(block.className)
  506. if block.className=="NumberValue" then
  507. if block.Value>0 then
  508. blocked=true
  509. if decreaseblock==nil then
  510. block.Value=block.Value-1
  511. end
  512. end
  513. end
  514. if block.className=="IntValue" then
  515. if block.Value>0 then
  516. blocked=true
  517. if decreaseblock~=nil then
  518. block.Value=block.Value-1
  519. end
  520. end
  521. end
  522. end
  523. if blocked==false then
  524. -- h:TakeDamage(Damage)
  525. h.Health=h.Health-Damage
  526. showDamage(hit.Parent,Damage,.5,BrickColor.new("Navy blue"))
  527. else
  528. h.Health=h.Health-(Damage/2)
  529. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  530. end
  531. if Type=="Knockdown" then
  532. hum=hit.Parent.Humanoid
  533. hum.PlatformStand=true
  534. coroutine.resume(coroutine.create(function(HHumanoid)
  535. swait(1)
  536. HHumanoid.PlatformStand=false
  537. end),hum)
  538. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  539. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  540. local bodvol=Instance.new("BodyVelocity")
  541. bodvol.velocity=angle*knockback
  542. bodvol.P=5000
  543. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  544. bodvol.Parent=hit
  545. rl=Instance.new("BodyAngularVelocity")
  546. rl.P=3000
  547. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  548. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  549. rl.Parent=hit
  550. game:GetService("Debris"):AddItem(bodvol,.5)
  551. game:GetService("Debris"):AddItem(rl,.5)
  552. elseif Type=="Normal" then
  553. vp=Instance.new("BodyVelocity")
  554. vp.P=500
  555. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  556. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  557. if KnockbackType==1 then
  558. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  559. elseif KnockbackType==2 then
  560. vp.velocity=Property.CFrame.lookVector*knockback
  561. end
  562. if knockback>0 then
  563. vp.Parent=hit.Parent.Torso
  564. end
  565. game:GetService("Debris"):AddItem(vp,.5)
  566. elseif Type=="Up" then
  567. local bodyVelocity=Instance.new("BodyVelocity")
  568. bodyVelocity.velocity=vt(0,60,0)
  569. bodyVelocity.P=5000
  570. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  571. bodyVelocity.Parent=hit
  572. game:GetService("Debris"):AddItem(bodyVelocity,1)
  573. rl=Instance.new("BodyAngularVelocity")
  574. rl.P=3000
  575. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  576. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  577. rl.Parent=hit
  578. game:GetService("Debris"):AddItem(rl,.5)
  579. elseif Type=="Snare" then
  580. bp=Instance.new("BodyPosition")
  581. bp.P=2000
  582. bp.D=100
  583. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  584. bp.position=hit.Parent.Torso.Position
  585. bp.Parent=hit.Parent.Torso
  586. game:GetService("Debris"):AddItem(bp,1)
  587. elseif Type=="Target" then
  588. if Targetting==false then
  589. ZTarget=hit.Parent.Torso
  590. coroutine.resume(coroutine.create(function(Part)
  591. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  592. swait(5)
  593. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  594. end),ZTarget)
  595. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  596. targetgui=Instance.new("BillboardGui")
  597. targetgui.Parent=ZTarget
  598. targetgui.Size=UDim2.new(10,100,10,100)
  599. targ=Instance.new("ImageLabel")
  600. targ.Parent=targetgui
  601. targ.BackgroundTransparency=1
  602. targ.Image="rbxassetid://4834067"
  603. targ.Size=UDim2.new(1,0,1,0)
  604. cam.CameraType="Scriptable"
  605. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  606. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  607. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  608. Targetting=true
  609. RocketTarget=ZTarget
  610. for i=1,Property do
  611. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  612. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  613. swait()
  614. end
  615. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  616. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  617. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  618. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  619. end
  620. Targetting=false
  621. RocketTarget=nil
  622. targetgui.Parent=nil
  623. cam.CameraType="Custom"
  624. end
  625. end
  626. debounce=Instance.new("BoolValue")
  627. debounce.Name="DebounceHit"
  628. debounce.Parent=hit.Parent
  629. debounce.Value=true
  630. game:GetService("Debris"):AddItem(debounce,Delay)
  631. c=Instance.new("ObjectValue")
  632. c.Name="creator"
  633. c.Value=Player
  634. c.Parent=h
  635. game:GetService("Debris"):AddItem(c,.5)
  636. CRIT=false
  637. hitDeb=true
  638. AttackPos=6
  639. end
  640. end
  641.  
  642. showDamage=function(Char,Dealt,du,Color)
  643. m=Instance.new("Model")
  644. m.Name=tostring(Dealt)
  645. h=Instance.new("Humanoid")
  646. h.Health=0
  647. h.MaxHealth=0
  648. h.Parent=m
  649. c=Instance.new("Part")
  650. c.Transparency=0
  651. c.BrickColor=Color
  652. c.Name="Head"
  653. c.TopSurface=0
  654. c.BottomSurface=0
  655. c.formFactor="Plate"
  656. c.Size=Vector3.new(1,.4,1)
  657. ms=Instance.new("CylinderMesh")
  658. ms.Scale=Vector3.new(.8,.8,.8)
  659. if CRIT==true then
  660. ms.Scale=Vector3.new(1,1.25,1)
  661. end
  662. ms.Parent=c
  663. c.Reflectance=0
  664. Instance.new("BodyGyro").Parent=c
  665. c.Parent=m
  666. if Char:findFirstChild("Head")~=nil then
  667. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  668. elseif Char.Parent:findFirstChild("Head")~=nil then
  669. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  670. end
  671. f=Instance.new("BodyPosition")
  672. f.P=2000
  673. f.D=100
  674. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  675. f.position=c.Position+Vector3.new(0,3,0)
  676. f.Parent=c
  677. game:GetService("Debris"):AddItem(m,.5+du)
  678. c.CanCollide=false
  679. m.Parent=workspace
  680. c.CanCollide=false
  681. end
  682.  
  683. Player=game:GetService('Players').LocalPlayer
  684. Character=Player.Character
  685. Mouse=Player:GetMouse()
  686. m=Instance.new('Model',Character)
  687.  
  688.  
  689. local function weldBetween(a, b)
  690. local weldd = Instance.new("ManualWeld")
  691. weldd.Part0 = a
  692. weldd.Part1 = b
  693. weldd.C0 = CFrame.new()
  694. weldd.C1 = b.CFrame:inverse() * a.CFrame
  695. weldd.Parent = a
  696. return weldd
  697. end
  698.  
  699. it=Instance.new
  700.  
  701. function nooutline(part)
  702. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  703. end
  704.  
  705. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  706. local fp=it("Part")
  707. fp.formFactor=formfactor
  708. fp.Parent=parent
  709. fp.Reflectance=reflectance
  710. fp.Transparency=transparency
  711. fp.CanCollide=false
  712. fp.Locked=true
  713. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  714. fp.Name=name
  715. fp.Size=size
  716. fp.Position=Character.Torso.Position
  717. nooutline(fp)
  718. fp.Material=material
  719. fp:BreakJoints()
  720. return fp
  721. end
  722.  
  723. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  724. local mesh=it(Mesh)
  725. mesh.Parent=part
  726. if Mesh=="SpecialMesh" then
  727. mesh.MeshType=meshtype
  728. mesh.MeshId=meshid
  729. end
  730. mesh.Offset=offset
  731. mesh.Scale=scale
  732. return mesh
  733. end
  734.  
  735. function weld(parent,part0,part1,c0,c1)
  736. local weld=it("Weld")
  737. weld.Parent=parent
  738. weld.Part0=part0
  739. weld.Part1=part1
  740. weld.C0=c0
  741. weld.C1=c1
  742. return weld
  743. end
  744.  
  745. Handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Handle",Vector3.new(1.20000005, 1.20000005, 1))
  746. Handleweld=weld(m,Character["Torso"],Handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-6.74455023, 0.843135834, 3.31332064, 0.866820872, 0.000393055088, -0.498619556, 0.129048944, -0.966104209, 0.223582461, -0.481630623, -0.258152217, -0.837489963))
  747. mesh("SpecialMesh",Handle,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  748. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  749. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.89693689, 0.0205960274, 1.83752108, 0.00084605813, 0.865680099, -0.500597, -0.999998748, 2.925843e-005, -0.00163948536, -0.00140464306, 0.500597715, 0.865678906))
  750. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1, 0.400000006, 1))
  751. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0205993652, 3.97038841, -4.62090921, -0.999998689, 2.810359e-005, -0.00163501501, 0.00158691406, 0.25815019, -0.966103554, 0.0003949448, -0.966104805, -0.258149862))
  752. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 2.92400002, 1.18400002))
  753. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  754. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.18639517, -0.292996764, 3.91572571, -0.407002717, 0.123095758, -0.905094743, -0.483149111, -0.869928718, 0.098949343, -0.775187671, 0.477568328, 0.413536996))
  755. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  756. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.62196398, -0.29297936, 1.11572647, -0.835932732, 0.424737811, -0.347583354, -0.483153641, -0.869926155, 0.0989501327, -0.260344028, 0.250651836, 0.932413459))
  757. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  758. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.55920649, -0.210347176, 1.642519, -0.865201712, -0.000320911407, -0.501423895, -2.98991799e-005, -0.999999881, 0.000691637397, -0.501424074, 0.000613339245, 0.865201592))
  759. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  760. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.931638, -0.0751047134, 4.50077248, -0.352038473, 0.176153034, -0.919260144, -0.86644727, -0.432817101, 0.248874903, -0.354031444, 0.884103954, 0.304995537))
  761. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  762. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.34771347, -0.763819337, 1.31078529, 0.484322906, -0.259408951, -0.835546851, 0.129806682, 0.965767562, -0.224595979, 0.865206063, 0.000317394733, 0.501416266))
  763. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  764. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.85524988, -0.0749192238, 1.7092638, -0.499263257, 0.749717236, -0.434350491, -0.866449237, -0.432811975, 0.248876765, -0.00140497088, 0.500597596, 0.865678906))
  765. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  766. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.76954031, -0.210381031, 4.2438035, -0.257231236, -0.00066010654, -0.966349661, -3.04505229e-005, -0.999999762, 0.000691249967, -0.966350019, 0.000207226723, 0.257231265))
  767. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  768. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.87043977, 0.020611763, 4.62094831, 0.00159165263, 0.258152187, -0.966103137, -0.999998748, 2.89455056e-005, -0.00163969398, -0.000395349402, 0.966104329, 0.258151829))
  769. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1, 0.400000006, 1))
  770. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.292981744, 4.28636312, -3.9157095, -0.48314926, -0.869928479, 0.0989517197, -0.407004297, 0.123094313, -0.905094087, 0.775186777, -0.477569282, -0.413537562))
  771. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 2.92400002, 1.18400002))
  772. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  773. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.85442352, -0.763632059, 3.85966015, -0.269319534, -0.183654502, -0.945377231, 0.129806384, 0.96576786, -0.22459501, 0.954262853, -0.183203816, -0.236260682))
  774. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1, 0.400000006, 1))
  775. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0751276016, 4.03159618, -4.50067854, -0.866445661, -0.432817698, 0.248879611, -0.352042913, 0.176151246, -0.919258773, 0.354030937, -0.884103894, -0.304995805))
  776. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 2.92400002, 1.18400002))
  777. Gear=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(4.29999971, 4.30000019, 1))
  778. Gearweld=weld(m,Handle,Gear,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0552597046, -0.0398271084, -0.0363032818, 0.999988854, -3.23429704e-005, 0.00164097548, 3.37436795e-005, 0.999994695, -0.000689953566, -0.00164103508, 0.000689953566, 0.999993086))
  779. mesh("SpecialMesh",Gear,Enum.MeshType.FileMesh,"http://www.roblox.com/asset?id=156292343",Vector3.new(0, 0, 0),Vector3.new(5, 5, 15))
  780. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1, 0.400000006, 1))
  781. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.210398674, 3.86948943, -4.24380398, -3.15159559e-005, -0.999999881, 0.00069090724, -0.257231474, -0.000659480691, -0.966349721, 0.966349959, -0.000208158046, -0.257231474))
  782. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 2.92400002, 1.18400002))
  783. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1, 0.400000006, 1))
  784. Partweld=weld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.763661504, 3.95439076, 3.85964441, -0.129806131, -0.965767682, 0.224596098, -0.269319892, -0.1836555, -0.945376873, 0.954262733, -0.183203891, -0.236260891))
  785. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 2.92400002, 1.18400002))
  786.  
  787. Handle2=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Handle",Vector3.new(1.20000005, 1.20000005, 1))
  788. Handle2weld=weld(m,Character["Torso"],Handle2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(6.65693045, 1.66835713, 2.9684639, 0.866025746, 0.129405379, 0.482963592, -3.67555799e-006, -0.965926409, 0.258817136, 0.499999553, -0.224144042, -0.836516559))
  789. mesh("SpecialMesh",Handle2,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  790. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  791. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.66774845, 0.445008755, 1.50737095, 0.749997497, 0.500002265, -0.433014721, -0.433012635, 0.866024196, 0.250004709, 0.500004232, -2.02655792e-006, 0.866023183))
  792. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  793. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.70916891, 0.288796425, 1.12511444, 0.424947768, 0.836517453, -0.34591651, -0.870010257, 0.482961774, 0.0991482884, 0.250003695, 0.25881803, 0.933012009))
  794. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  795. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.24143982, 0.288818121, 3.98402214, 0.123706907, 0.408494055, -0.904339194, -0.870007515, 0.482966691, 0.0991476029, 0.477266878, 0.774516642, 0.415139139))
  796. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1, 0.400000006, 1))
  797. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.288883209, 4.34139919, -3.98407936, -0.870006502, 0.482969046, 0.099145025, 0.123710275, 0.408492953, -0.904339135, -0.477267861, -0.774515808, -0.415139765))
  798. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 2.92400002, 1.18400002))
  799. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1, 0.400000006, 1))
  800. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.377311707, 3.81443644, -4.17874861, 1.43051147e-006, 1.00000012, 5.58793545e-006, 0.258813858, 5.02169132e-006, -0.965927303, -0.965927362, 2.82377005e-006, -0.258813858))
  801. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 2.92400002, 1.18400002))
  802. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  803. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.11095357, 0.452475548, 3.33581829, 0.214266971, -0.258726388, -0.941886604, 0.124996454, -0.949091196, 0.289140463, -0.968744338, -0.179685742, -0.171018958))
  804. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1, 0.400000006, 1))
  805. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.445028067, 4.04179811, -4.22505188, -0.433007121, 0.86602807, 0.250001073, 0.176776409, 0.353552371, -0.918559194, -0.883886516, -0.353548348, -0.306183964))
  806. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 2.92400002, 1.18400002))
  807. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  808. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.71447492, 0.377288342, 4.1787672, 0.258815825, 7.89761543e-007, -0.965926647, 2.11596489e-006, 1.00000012, 1.35600567e-006, 0.965926886, -2.41398811e-006, 0.258815885))
  809. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1, 0.400000006, 1))
  810. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.452456236, 4.21090841, 3.33576679, -0.124996543, 0.949091196, -0.289140046, 0.214267105, -0.25872606, -0.941886783, -0.968744338, -0.179685771, -0.171019137))
  811. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 2.92400002, 1.18400002))
  812. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  813. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.94182658, 0.445016861, 4.22507095, 0.176774979, 0.353554398, -0.918558657, -0.433007926, 0.866026998, 0.250003278, 0.883886337, 0.353548825, 0.306183696))
  814. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(1, 0.400000006, 1))
  815. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.256506443, 3.92671657, -4.59811449, -1.00000024, 2.62260437e-006, 1.4603138e-006, -7.4505806e-007, 0.258819073, -0.965925872, -2.89268792e-006, -0.965925932, -0.258819073))
  816. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 2.92400002, 1.18400002))
  817. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  818. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.4743073, 0.377253056, 1.63544273, 0.866023183, -4.61935997e-007, -0.500004172, 1.52736902e-006, 1.00000012, 1.65402889e-006, 0.500004232, -2.21282244e-006, 0.866023183))
  819. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  820. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.15870619, 0.452619314, 0.758959055, -0.533491194, -0.310006529, -0.786945462, 0.124997422, -0.949090362, 0.289142251, -0.836518347, 0.0558886975, 0.545081377))
  821. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  822. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.84976673, 0.256440639, 1.85214663, 6.2584877e-007, 0.866025329, -0.500000298, -1.00000024, 1.72108412e-006, 1.7285347e-006, 2.38418579e-006, 0.500000298, 0.866025329))
  823. Gear2=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(4.29999971, 4.30000019, 1))
  824. Gear2weld=weld(m,Handle2,Gear2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.049841404, 0.049908638, 2.78949738e-005, 0.999990344, -5.01424074e-006, -1.49011612e-007, 5.28991222e-006, 0.999994934, 2.98023224e-008, 2.38418579e-007, -1.63912773e-007, 0.999994636))
  825. mesh("SpecialMesh",Gear2,Enum.MeshType.FileMesh,"http://www.roblox.com/asset?id=156292343",Vector3.new(0, 0, 0),Vector3.new(5, 5, 15))
  826. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.20000005, 1, 1))
  827. Partweld=weld(m,Handle2,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.82676554, 0.256523609, 4.598104, -1.1920929e-006, 0.258818835, -0.965925872, -1.00000012, 1.46776438e-006, 1.63912773e-006, 1.83098018e-006, 0.965925872, 0.258818835))
  828.  
  829. handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Handle",Vector3.new(1.20000005, 1.20000005, 1.20000005))
  830. handleweld=weld(m,Character["Torso"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-2.22326851, -3.5562191, -0.038143158, 0, 0, 1, 0, 1, 0, -1, 0, 0))
  831. mesh("SpecialMesh",handle,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1, 3, 1))
  832. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.20000005, 1.20000005, 1.20000005))
  833. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 1.09672546e-005, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  834. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1.102, 0.950000048, 1.16999996))
  835. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.20000005, 1.20000005, 1.20000005))
  836. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 1.09672546e-005, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  837. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/Asset/?id=9756362",Vector3.new(0, 0, 0),Vector3.new(1.102, 3, 0.863999963))
  838. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(3.79999995, 4, 1.39999998))
  839. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0999984741, 0, -0.100000381, 0, -1, 0, 0, 0, 1, -1, -0, 0))
  840. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(4.77400017, 4.96199989, 4.73800039))
  841. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Navy blue","Part",Vector3.new(3.79999995, 4, 1.39999998))
  842. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0999984741, 0, -0.100000381, 0, -1, 0, 0, 0, 1, -1, -0, 0))
  843. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(4.4920001, 4.70400047, 4.73800039))
  844. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.600000024, 2.5999999, 0.599999964))
  845. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.100013733, -3.48671532, -1.09328079, 1, -2.52891718e-012, -6.81310423e-013, 2.53075664e-012, 0.866021812, 0.500005603, -6.74442273e-013, -0.500005603, 0.866021752))
  846. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.600000024, 2.5999999, 0.599999964))
  847. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.100009918, -3.09970522, 1.40989685, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  848. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.600000024, 2.5999999, 0.599999964))
  849. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.100009918, -3.09970522, 1.39007568, -0.999999702, 0, 5.96046448e-008, 0, 1, 0, -5.96046448e-008, 0, -0.999999702))
  850. Wedge=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Wedge",Vector3.new(0.600000024, 2.5999999, 0.599999964))
  851. Wedgeweld=weld(m,handle,Wedge,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.100013733, -3.61302567, 0.360752106, 1, -3.69486299e-012, 1.70532143e-012, 3.81851625e-012, 0.707111537, -0.707102001, 1.40679254e-012, 0.70710206, 0.707111537))
  852.  
  853. mouse.Button1Down:connect(function()
  854. if attack==false and attacktype==1 then
  855. attacktype=2
  856. attackone()
  857. elseif attack==false and attacktype==2 then
  858. attacktype=1
  859. attacktwo()
  860. end
  861. end)
  862.  
  863. mouse.KeyDown:connect(function(k)
  864. k=k:lower()
  865. if k=='q' then
  866. if attack==false then
  867. Push()
  868. end
  869. elseif k=='e' then
  870. if attack==false then
  871. Clap()
  872. end
  873. end
  874. end)
  875.  
  876. function attackone()
  877. attack=true
  878. con1=Gear.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(20,40),"Normal",RootPart,.2,1) end)
  879. for i=0,1,0.1 do
  880. swait()
  881. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.2)
  882. Handleweld.C0=clerp(Handleweld.C0,cf(-5,1,-5)*angles(math.rad(100),math.rad(0),math.rad(0)),.2)
  883. Handle2weld.C0=clerp(Handle2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  884. RW.C0=clerp(RW.C0,cf(1,0.5,-0.5)*euler(.5,1.8,1.5),.3)
  885. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(2),math.rad(25),math.rad(-15)),.3)
  886. end
  887. so("http://www.roblox.com/asset/?id=231917758",Handle,1,.9)
  888. for i=0,1,0.1 do
  889. swait()
  890. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.2)
  891. Handleweld.C0=clerp(Handleweld.C0,cf(-5,1,-5)*angles(math.rad(-85),math.rad(0),math.rad(0)),.2)
  892. Handle2weld.C0=clerp(Handle2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  893. RW.C0=clerp(RW.C0,cf(1.5,0.5,-0.5)*euler(80,1.8,1.5),.3)
  894. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(2),math.rad(25),math.rad(-15)),.3)
  895. end
  896. --dmgstop()
  897. attack=false
  898. con1:disconnect()
  899. end
  900.  
  901. function attacktwo()
  902. attack=true
  903. con1=Gear2.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(20,40),"Normal",RootPart,.2,1) end)
  904. for i=0,1,0.1 do
  905. swait()
  906. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.2)
  907. Handle2weld.C0=clerp(Handle2weld.C0,cf(-5,1,-5)*angles(math.rad(0),math.rad(0),math.rad(20)),.2)
  908. Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  909. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-30,0,-20),.3)
  910. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-2),math.rad(-25),math.rad(15)),.3)
  911. end
  912. so("http://www.roblox.com/asset/?id=231917758",Handle2,1,.8)
  913. for i=0,1,0.1 do
  914. swait()
  915. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.2)
  916. Handle2weld.C0=clerp(Handle2weld.C0,cf(10,1,-5)*angles(math.rad(0),math.rad(-80),math.rad(20)),.2)
  917. Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  918. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-30,0,20),.3)
  919. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-2),math.rad(-25),math.rad(15)),.3)
  920. end
  921. --dmgstop()
  922. attack=false
  923. con1:disconnect()
  924. end
  925.  
  926. function Push()
  927. attack=true
  928. con1=Gear2.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(20,40),"Normal",RootPart,.2,1) end)
  929. con2=Gear.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(20,40),"Normal",RootPart,.2,1) end)
  930. for i=0,1,0.1 do
  931. swait()
  932. Handleweld.C0=clerp(Handleweld.C0,cf(-5,1,-10)*angles(math.rad(20),math.rad(-20),math.rad(0)),.2)
  933. Handle2weld.C0=clerp(Handle2weld.C0,cf(5,1,-10)*angles(math.rad(20),math.rad(20),math.rad(0)),.2)
  934. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(90),math.rad(0),math.rad(-20)),.3)
  935. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(90),math.rad(0),math.rad(20)),.3)
  936. end
  937. so("http://www.roblox.com/asset/?id=231917758",Handle2,1,.8)
  938. so("http://www.roblox.com/asset/?id=231917758",Handle,1,1)
  939. for i=0,1,0.1 do
  940. swait()
  941. Handleweld.C0=clerp(Handleweld.C0,cf(-4,1,-20)*angles(math.rad(20),math.rad(-20),math.rad(0)),.2)
  942. Handle2weld.C0=clerp(Handle2weld.C0,cf(4,1,-20)*angles(math.rad(20),math.rad(20),math.rad(0)),.2)
  943. RW.C0=clerp(RW.C0,cf(1,0.5,-1)*angles(math.rad(90),math.rad(0),math.rad(-20)),.3)
  944. LW.C0=clerp(LW.C0,cf(-1,0.5,-1)*angles(math.rad(90),math.rad(0),math.rad(20)),.3)
  945. end
  946. --dmgstop()
  947. attack=false
  948. con1:disconnect()
  949. con2:disconnect()
  950. end
  951.  
  952. function Clap()
  953. attack=true
  954. con1=Gear2.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(20,40),"Normal",RootPart,.2,1) end)
  955. con2=Gear.Touched:connect(function(hit) Damagefunc(hit,30,50,math.random(20,40),"Normal",RootPart,.2,1) end)
  956. for i=0,1,0.1 do
  957. swait()
  958. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.2)
  959. Handle2weld.C0=clerp(Handle2weld.C0,cf(-5,1,-5)*angles(math.rad(0),math.rad(0),math.rad(20)),.2)
  960. Handleweld.C0=clerp(Handleweld.C0,cf(5,1,-5)*angles(math.rad(0),math.rad(0),math.rad(-20)),.2)
  961. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-30,0,-20),.3)
  962. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-30,0,20),.3)
  963. end
  964. so("http://www.roblox.com/asset/?id=231917758",Handle2,1,.8)
  965. so("http://www.roblox.com/asset/?id=231917758",Handle,1,1)
  966. for i=0,1,0.1 do
  967. swait()
  968. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.2)
  969. Handle2weld.C0=clerp(Handle2weld.C0,cf(10,1,-5)*angles(math.rad(0),math.rad(-20),math.rad(20)),.2)
  970. Handleweld.C0=clerp(Handleweld.C0,cf(-10,1,-5)*angles(math.rad(0),math.rad(20),math.rad(-20)),.2)
  971. LW.C0=clerp(LW.C0,cf(-1,0.5,0)*euler(-30,0,20),.3)
  972. RW.C0=clerp(RW.C0,cf(1,0.5,0)*euler(-30,0,-20),.3)
  973. end
  974. --dmgstop()
  975. attack=false
  976. con1:disconnect()
  977. con2:disconnect()
  978. end
  979.  
  980. local sine = 0
  981. local change = 1
  982. local val = 0
  983.  
  984. while true do
  985. swait()
  986. sine = sine + change
  987. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  988. local velderp=RootPart.Velocity.y
  989. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  990. if equipped==true or equipped==false then
  991. if attack==false then
  992. idle=idle+1
  993. else
  994. idle=0
  995. end
  996. if idle>=500 then
  997. if attack==false then
  998. --Sheath()
  999. end
  1000. end
  1001. if RootPart.Velocity.y > 1 and hitfloor==nil then
  1002. Anim="Jump"
  1003. if attack==false then
  1004. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
  1005. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1006. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1007. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5),.3)
  1008. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1009. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3)
  1010. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1011. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
  1012. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
  1013. Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  1014. Handle2weld.C0=clerp(Handle2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  1015. end
  1016. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  1017. Anim="Fall"
  1018. if attack==false then
  1019. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
  1020. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  1021. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  1022. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2),.3)
  1023. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1024. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3)
  1025. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  1026. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2)
  1027. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2)
  1028. Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  1029. Handle2weld.C0=clerp(Handle2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  1030. end
  1031. elseif torvel<1 and hitfloor~=nil then
  1032. Anim="Idle"
  1033. if attack==false then
  1034. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1035. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.2)
  1036. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-2),math.rad(-25),math.rad(15)),.3)
  1037. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(2),math.rad(25),math.rad(-15)),.3)
  1038. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1039. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  1040. Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  1041. Handle2weld.C0=clerp(Handle2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  1042. end
  1043. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1044. local idleanim=0
  1045. Anim="Walk"
  1046. if attack==false then
  1047. change=3
  1048. --[[RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(35),math.rad(0),math.rad(15*math.cos(sine/10))),.3)
  1049. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-30),math.rad(0),math.rad(0)),.3)
  1050. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-135*math.cos(sine/9)),math.rad(0),math.rad(0)),.3)
  1051. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(135*math.cos(sine/9)),math.rad(0),math.rad(0)),.3)
  1052. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  1053. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  1054. --Handleweld.C0=clerp(--Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)]]--
  1055. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0,0,0),.2)
  1056. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0.1,0,0),.2)
  1057. --RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-0.1,0,0.2),.2)
  1058. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-5),math.rad(-25),math.rad(20)),.3)
  1059. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(5),math.rad(25),math.rad(-20)),.3)
  1060. RH.C0=clerp(RH.C0,RHC0,.3)
  1061. LH.C0=clerp(LH.C0,LHC0,.3)
  1062. Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  1063. Handle2weld.C0=clerp(Handle2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  1064. end
  1065. elseif torvel>=22 and hitfloor~=nil then
  1066. Anim="Run"
  1067. if attack==false then
  1068. RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)*angles(math.rad(45),math.rad(0),math.rad(0)),.3)
  1069. Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-40),math.rad(0),math.rad(0)),.3)
  1070. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-60),math.rad(0),math.rad(0)),.3)
  1071. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-60),math.rad(0),math.rad(0)),.3)
  1072. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  1073. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  1074. Handleweld.C0=clerp(Handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  1075. Handle2weld.C0=clerp(Handle2weld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.2)
  1076. end
  1077. end
  1078. end
  1079. end
  1080. --156434034D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement