Advertisement
mememasterYT

Big grey sniper script

Aug 25th, 2018
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  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. do
  5. print("FE Compatibility code by Mokiros")
  6. script.Parent = Player.Character
  7.  
  8. --RemoteEvent for communicating
  9. local Event = Instance.new("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event to make stuff like Mouse.KeyDown work
  13. local function fakeEvent()
  14. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --Creating fake input objects with fake variables
  20. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  21. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24. end}
  25. --Merged 2 functions into one by checking amount of arguments
  26. CAS.UnbindAction = CAS.BindAction
  27.  
  28. --This function will trigger the events that have been :Connect()'ed
  29. local function te(self,ev,...)
  30. local t = m[ev]
  31. if t and t._fakeEvent and t.Function then
  32. t.Function(...)
  33. end
  34. end
  35. m.TrigEvent = te
  36. UIS.TrigEvent = te
  37.  
  38. Event.OnServerEvent:Connect(function(plr,io)
  39. if plr~=Player then return end
  40. if io.isMouse then
  41. m.Target = io.Target
  42. m.Hit = io.Hit
  43. else
  44. local b = io.UserInputState == Enum.UserInputState.Begin
  45. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  46. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  47. end
  48. for _,t in pairs(CAS.Actions) do
  49. for _,k in pairs(t.Keys) do
  50. if k==io.KeyCode then
  51. t.Function(t.Name,io.UserInputState,io)
  52. end
  53. end
  54. end
  55. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  56. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  57. end
  58. end)
  59. Event.Parent = NLS([==[
  60. local Player = game:GetService("Players").LocalPlayer
  61. local Event = script:WaitForChild("UserInput_Event")
  62.  
  63. local UIS = game:GetService("UserInputService")
  64. local input = function(io,a)
  65. if a then return end
  66. --Since InputObject is a client-side instance, we create and pass table instead
  67. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  68. end
  69. UIS.InputBegan:Connect(input)
  70. UIS.InputEnded:Connect(input)
  71.  
  72. local Mouse = Player:GetMouse()
  73. local h,t
  74. --Give the server mouse data 30 times every second, but only if the values changed
  75. --If player is not moving their mouse, client won't fire events
  76. while wait(1/30) do
  77. if h~=Mouse.Hit or t~=Mouse.Target then
  78. h,t=Mouse.Hit,Mouse.Target
  79. Event:FireServer({isMouse=true,Target=t,Hit=h})
  80. end
  81. end]==],Player.Character)
  82. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  83. end
  84.  
  85. Player=owner
  86. Character=Player.Character
  87. PlayerGui=Player.PlayerGui
  88. Backpack=Player.Backpack
  89. Torso=Character.Torso
  90. Head=Character.Head
  91. Humanoid=Character.Humanoid
  92. m=Instance.new('Model',Character)
  93. LeftArm=Character["Left Arm"]
  94. LeftLeg=Character["Left Leg"]
  95. RightArm=Character["Right Arm"]
  96. RightLeg=Character["Right Leg"]
  97. LS=Torso["Left Shoulder"]
  98. LH=Torso["Left Hip"]
  99. RS=Torso["Right Shoulder"]
  100. RH=Torso["Right Hip"]
  101. Face = Head.face
  102. Neck=Torso.Neck
  103. it=Instance.new
  104. attacktype=1
  105. vt=Vector3.new
  106. cf=CFrame.new
  107. euler=CFrame.fromEulerAnglesXYZ
  108. angles=CFrame.Angles
  109. cloaked=false
  110. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  111. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  112. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  113. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  114. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  115. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  116. RootPart=Character.HumanoidRootPart
  117. RootJoint=RootPart.RootJoint
  118. RootCF=euler(-1.57,0,3.14)
  119. attack = false
  120. attackdebounce = false
  121. deb=false
  122. equipped=true
  123. hand=false
  124. MMouse=nil
  125. combo=0
  126. mana=0
  127. trispeed=.2
  128. attackmode='none'
  129. local idle=0
  130. local Anim="Idle"
  131. local Effects={}
  132. local gun=false
  133. local shoot=false
  134. player=nil
  135. mana=0
  136.  
  137. mouse=Player:GetMouse()
  138. --save shoulders
  139. RSH, LSH=nil, nil
  140. --welds
  141. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  142. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  143. LH=Torso["Left Hip"]
  144. RH=Torso["Right Hip"]
  145. TorsoColor=Torso.BrickColor
  146. function NoOutline(Part)
  147. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  148. end
  149. player=Player
  150. ch=Character
  151. RSH=ch.Torso["Right Shoulder"]
  152. LSH=ch.Torso["Left Shoulder"]
  153. --
  154. RSH.Parent=nil
  155. LSH.Parent=nil
  156. --
  157. RW.Name="Right Shoulder"
  158. RW.Part0=ch.Torso
  159. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  160. RW.C1=cf(0, 0.5, 0)
  161. RW.Part1=ch["Right Arm"]
  162. RW.Parent=ch.Torso
  163. --
  164. LW.Name="Left Shoulder"
  165. LW.Part0=ch.Torso
  166. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  167. LW.C1=cf(0, 0.5, 0)
  168. LW.Part1=ch["Left Arm"]
  169. LW.Parent=ch.Torso
  170.  
  171. Player=game:GetService('Players').LocalPlayer
  172. Character=Player.Character
  173. Mouse=Player:GetMouse()
  174. m=Instance.new('Model',Character)
  175.  
  176.  
  177. local function weldBetween(a, b)
  178. local weldd = Instance.new("ManualWeld")
  179. weldd.Part0 = a
  180. weldd.Part1 = b
  181. weldd.C0 = CFrame.new()
  182. weldd.C1 = b.CFrame:inverse() * a.CFrame
  183. weldd.Parent = a
  184. return weldd
  185. end
  186.  
  187. function swait(num)
  188. if num==0 or num==nil then
  189. game:service'RunService'.Stepped:wait(0)
  190. else
  191. for i=0,num do
  192. game:service'RunService'.Stepped:wait(0)
  193. end
  194. end
  195. end
  196.  
  197. function nooutline(part)
  198. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  199. end
  200.  
  201. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  202. local fp=it("Part")
  203. fp.formFactor=formfactor
  204. fp.Parent=parent
  205. fp.Reflectance=reflectance
  206. fp.Transparency=transparency
  207. fp.CanCollide=false
  208. fp.Locked=true
  209. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  210. fp.Name=name
  211. fp.Size=size
  212. fp.Position=Character.Torso.Position
  213. nooutline(fp)
  214. fp.Material=material
  215. fp:BreakJoints()
  216. return fp
  217. end
  218.  
  219. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  220. local mesh=it(Mesh)
  221. mesh.Parent=part
  222. if Mesh=="SpecialMesh" then
  223. mesh.MeshType=meshtype
  224. mesh.MeshId=meshid
  225. end
  226. mesh.Offset=offset
  227. mesh.Scale=scale
  228. return mesh
  229. end
  230.  
  231. function weld(parent,part0,part1,c0,c1)
  232. local weld=it("Weld")
  233. weld.Parent=parent
  234. weld.Part0=part0
  235. weld.Part1=part1
  236. weld.C0=c0
  237. weld.C1=c1
  238. return weld
  239. end
  240.  
  241.  
  242. local function CFrameFromTopBack(at, top, back)
  243. local right = top:Cross(back)
  244. return CFrame.new(at.x, at.y, at.z,
  245. right.x, top.x, back.x,
  246. right.y, top.y, back.y,
  247. right.z, top.z, back.z)
  248. end
  249.  
  250. function Triangle(a, b, c)
  251. local edg1 = (c-a):Dot((b-a).unit)
  252. local edg2 = (a-b):Dot((c-b).unit)
  253. local edg3 = (b-c):Dot((a-c).unit)
  254. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  255. a, b, c = a, b, c
  256. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  257. a, b, c = b, c, a
  258. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  259. a, b, c = c, a, b
  260. else
  261. assert(false, "unreachable")
  262. end
  263.  
  264. local len1 = (c-a):Dot((b-a).unit)
  265. local len2 = (b-a).magnitude - len1
  266. local width = (a + (b-a).unit*len1 - c).magnitude
  267.  
  268. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  269.  
  270. local list = {}
  271.  
  272. local Color = BrickColor.new("Dark grey")
  273.  
  274. if len1 > 0.01 then
  275. local w1 = Instance.new('WedgePart', m)
  276. game:GetService("Debris"):AddItem(w1,5)
  277. w1.Material = "SmoothPlastic"
  278. w1.FormFactor = 'Custom'
  279. w1.BrickColor = BrickColor.new(Color)
  280. w1.Transparency = 0
  281. w1.Reflectance = 0
  282. w1.Material = "SmoothPlastic"
  283. w1.CanCollide = false
  284. NoOutline(w1)
  285. local sz = Vector3.new(0.2, width, len1)
  286. w1.Size = sz
  287. local sp = Instance.new("SpecialMesh",w1)
  288. sp.MeshType = "Wedge"
  289. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  290. w1:BreakJoints()
  291. w1.Anchored = true
  292. w1.Parent = workspace
  293. w1.Transparency = 0.7
  294. table.insert(Effects,{w1,"Disappear",.01})
  295. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  296. table.insert(list,w1)
  297. end
  298.  
  299. if len2 > 0.01 then
  300. local w2 = Instance.new('WedgePart', m)
  301. game:GetService("Debris"):AddItem(w2,5)
  302. w2.Material = "SmoothPlastic"
  303. w2.FormFactor = 'Custom'
  304. w2.BrickColor = BrickColor.new(Color)
  305. w2.Transparency = 0
  306. w2.Reflectance = 0
  307. w2.Material = "SmoothPlastic"
  308. w2.CanCollide = false
  309. NoOutline(w2)
  310. local sz = Vector3.new(0.2, width, len2)
  311. w2.Size = sz
  312. local sp = Instance.new("SpecialMesh",w2)
  313. sp.MeshType = "Wedge"
  314. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  315. w2:BreakJoints()
  316. w2.Anchored = true
  317. w2.Parent = workspace
  318. w2.Transparency = 0.7
  319. table.insert(Effects,{w2,"Disappear",.01})
  320. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  321. table.insert(list,w2)
  322. end
  323. return unpack(list)
  324. end
  325.  
  326.  
  327. so = function(id,par,vol,pit)
  328. coroutine.resume(coroutine.create(function()
  329. local sou = Instance.new("Sound",par or workspace)
  330. sou.Volume=vol
  331. sou.Pitch=pit or 1
  332. sou.SoundId=id
  333. swait()
  334. sou:play()
  335. game:GetService("Debris"):AddItem(sou,6)
  336. end))
  337. end
  338.  
  339. function clerp(a,b,t)
  340. local qa = {QuaternionFromCFrame(a)}
  341. local qb = {QuaternionFromCFrame(b)}
  342. local ax, ay, az = a.x, a.y, a.z
  343. local bx, by, bz = b.x, b.y, b.z
  344. local _t = 1-t
  345. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  346. end
  347.  
  348. function QuaternionFromCFrame(cf)
  349. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  350. local trace = m00 + m11 + m22
  351. if trace > 0 then
  352. local s = math.sqrt(1 + trace)
  353. local recip = 0.5/s
  354. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  355. else
  356. local i = 0
  357. if m11 > m00 then
  358. i = 1
  359. end
  360. if m22 > (i == 0 and m00 or m11) then
  361. i = 2
  362. end
  363. if i == 0 then
  364. local s = math.sqrt(m00-m11-m22+1)
  365. local recip = 0.5/s
  366. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  367. elseif i == 1 then
  368. local s = math.sqrt(m11-m22-m00+1)
  369. local recip = 0.5/s
  370. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  371. elseif i == 2 then
  372. local s = math.sqrt(m22-m00-m11+1)
  373. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  374. end
  375. end
  376. end
  377.  
  378. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  379. local xs, ys, zs = x + x, y + y, z + z
  380. local wx, wy, wz = w*xs, w*ys, w*zs
  381. local xx = x*xs
  382. local xy = x*ys
  383. local xz = x*zs
  384. local yy = y*ys
  385. local yz = y*zs
  386. local zz = z*zs
  387. 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))
  388. end
  389.  
  390. function QuaternionSlerp(a, b, t)
  391. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  392. local startInterp, finishInterp;
  393. if cosTheta >= 0.0001 then
  394. if (1 - cosTheta) > 0.0001 then
  395. local theta = math.acos(cosTheta)
  396. local invSinTheta = 1/math.sin(theta)
  397. startInterp = math.sin((1-t)*theta)*invSinTheta
  398. finishInterp = math.sin(t*theta)*invSinTheta
  399. else
  400. startInterp = 1-t
  401. finishInterp = t
  402. end
  403. else
  404. if (1+cosTheta) > 0.0001 then
  405. local theta = math.acos(-cosTheta)
  406. local invSinTheta = 1/math.sin(theta)
  407. startInterp = math.sin((t-1)*theta)*invSinTheta
  408. finishInterp = math.sin(t*theta)*invSinTheta
  409. else
  410. startInterp = t-1
  411. finishInterp = t
  412. end
  413. end
  414. 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
  415. end
  416.  
  417. --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
  418.  
  419.  
  420. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  421. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  422. end
  423.  
  424. Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  425. if hit.Parent==nil then
  426. return
  427. end
  428. h=hit.Parent:FindFirstChild("Humanoid")
  429. for _,v in pairs(hit.Parent:children()) do
  430. if v:IsA("Humanoid") then
  431. h=v
  432. end
  433. end
  434. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  435. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  436. end
  437. if hit.Parent.className=="Hat" then
  438. hit=hit.Parent.Parent:findFirstChild("Head")
  439. end
  440. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  441. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  442. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  443. return
  444. end]]
  445. -- hs(hit,1.2)
  446. c=Instance.new("ObjectValue")
  447. c.Name="creator"
  448. c.Value=game:service("Players").LocalPlayer
  449. c.Parent=h
  450. game:GetService("Debris"):AddItem(c,.5)
  451. Damage=math.random(minim,maxim)
  452. -- h:TakeDamage(Damage)
  453. blocked=false
  454. block=hit.Parent:findFirstChild("Block")
  455. if block~=nil then
  456. print(block.className)
  457. if block.className=="NumberValue" then
  458. if block.Value>0 then
  459. blocked=true
  460. if decreaseblock==nil then
  461. block.Value=block.Value-1
  462. end
  463. end
  464. end
  465. if block.className=="IntValue" then
  466. if block.Value>0 then
  467. blocked=true
  468. if decreaseblock~=nil then
  469. block.Value=block.Value-1
  470. end
  471. end
  472. end
  473. end
  474. if blocked==false then
  475. -- h:TakeDamage(Damage)
  476. h.Health=h.Health-Damage
  477. showDamage(hit.Parent,Damage,.5,BrickColor.new("New Yeller"))
  478. else
  479. h.Health=h.Health-(Damage/2)
  480. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue"))
  481. end
  482. if Type=="Knockdown" then
  483. hum=hit.Parent.Humanoid
  484. hum.PlatformStand=true
  485. coroutine.resume(coroutine.create(function(HHumanoid)
  486. swait(1)
  487. HHumanoid.PlatformStand=false
  488. end),hum)
  489. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  490. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  491. local bodvol=Instance.new("BodyVelocity")
  492. bodvol.velocity=angle*knockback
  493. bodvol.P=5000
  494. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  495. bodvol.Parent=hit
  496. rl=Instance.new("BodyAngularVelocity")
  497. rl.P=3000
  498. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  499. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  500. rl.Parent=hit
  501. game:GetService("Debris"):AddItem(bodvol,.5)
  502. game:GetService("Debris"):AddItem(rl,.5)
  503. elseif Type=="Normal" then
  504. vp=Instance.new("BodyVelocity")
  505. vp.P=500
  506. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  507. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  508. if KnockbackType==1 then
  509. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  510. elseif KnockbackType==2 then
  511. vp.velocity=Property.CFrame.lookVector*knockback
  512. end
  513. if knockback>0 then
  514. vp.Parent=hit.Parent.Torso
  515. end
  516. game:GetService("Debris"):AddItem(vp,.5)
  517. elseif Type=="Up" then
  518. local bodyVelocity=Instance.new("BodyVelocity")
  519. bodyVelocity.velocity=vt(0,60,0)
  520. bodyVelocity.P=5000
  521. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  522. bodyVelocity.Parent=hit
  523. game:GetService("Debris"):AddItem(bodyVelocity,1)
  524. rl=Instance.new("BodyAngularVelocity")
  525. rl.P=3000
  526. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  527. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  528. rl.Parent=hit
  529. game:GetService("Debris"):AddItem(rl,.5)
  530. elseif Type=="Snare" then
  531. bp=Instance.new("BodyPosition")
  532. bp.P=2000
  533. bp.D=100
  534. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  535. bp.position=hit.Parent.Torso.Position
  536. bp.Parent=hit.Parent.Torso
  537. game:GetService("Debris"):AddItem(bp,1)
  538. elseif Type=="Target" then
  539. if Targetting==false then
  540. ZTarget=hit.Parent.Torso
  541. coroutine.resume(coroutine.create(function(Part)
  542. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  543. swait(5)
  544. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  545. end),ZTarget)
  546. TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  547. targetgui=Instance.new("BillboardGui")
  548. targetgui.Parent=ZTarget
  549. targetgui.Size=UDim2.new(10,100,10,100)
  550. targ=Instance.new("ImageLabel")
  551. targ.Parent=targetgui
  552. targ.BackgroundTransparency=1
  553. targ.Image="rbxassetid://4834067"
  554. targ.Size=UDim2.new(1,0,1,0)
  555. cam.CameraType="Scriptable"
  556. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  557. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  558. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  559. Targetting=true
  560. RocketTarget=ZTarget
  561. for i=1,Property do
  562. --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do
  563. if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  564. swait()
  565. end
  566. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  567. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  568. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  569. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  570. end
  571. Targetting=false
  572. RocketTarget=nil
  573. targetgui.Parent=nil
  574. cam.CameraType="Custom"
  575. end
  576. end
  577. debounce=Instance.new("BoolValue")
  578. debounce.Name="DebounceHit"
  579. debounce.Parent=hit.Parent
  580. debounce.Value=true
  581. game:GetService("Debris"):AddItem(debounce,Delay)
  582. c=Instance.new("ObjectValue")
  583. c.Name="creator"
  584. c.Value=Player
  585. c.Parent=h
  586. game:GetService("Debris"):AddItem(c,.5)
  587. CRIT=false
  588. hitDeb=true
  589. AttackPos=6
  590. end
  591. end
  592.  
  593. showDamage=function(Char,Dealt,du,Color)
  594. m=Instance.new("Model")
  595. m.Name=tostring(Dealt)
  596. h=Instance.new("Humanoid")
  597. h.Health=0
  598. h.MaxHealth=0
  599. h.Parent=m
  600. c=Instance.new("Part")
  601. c.Transparency=0
  602. c.BrickColor=Color
  603. c.Name="Head"
  604. c.TopSurface=0
  605. c.BottomSurface=0
  606. c.formFactor="Plate"
  607. c.Size=Vector3.new(1,.4,1)
  608. ms=Instance.new("CylinderMesh")
  609. ms.Scale=Vector3.new(.8,.8,.8)
  610. if CRIT==true then
  611. ms.Scale=Vector3.new(1,1.25,1)
  612. end
  613. ms.Parent=c
  614. c.Reflectance=0
  615. Instance.new("BodyGyro").Parent=c
  616. c.Parent=m
  617. if Char:findFirstChild("Head")~=nil then
  618. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  619. elseif Char.Parent:findFirstChild("Head")~=nil then
  620. c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0))
  621. end
  622. f=Instance.new("BodyPosition")
  623. f.P=2000
  624. f.D=100
  625. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  626. f.position=c.Position+Vector3.new(0,3,0)
  627. f.Parent=c
  628. game:GetService("Debris"):AddItem(m,.5+du)
  629. c.CanCollide=false
  630. m.Parent=workspace
  631. c.CanCollide=false
  632. end
  633.  
  634. handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Handle",Vector3.new(0.356057793, 0.801126003, 0.267042011))
  635. handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.516218185, -0.761173248, -0.203582764, -0.000413556583, 0.865570247, -0.500785589, -0.000715887581, -0.50078547, -0.865570009, -0.999999523, 4.89967135e-007, 0.000826762407))
  636. Barrel=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Barrel",Vector3.new(0.356055647, 0.534083903, 0.200000003))
  637. Barrelweld=weld(m,handle,Barrel,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.993667603, -5.6562829, -0.00450134277, -0.499999255, -0.86602366, 0.000830708072, -0.866023958, 0.499998957, -1.77337063e-006, -0.000413693022, -0.000720331562, -0.999999404))
  638. mesh("CylinderMesh",Barrel,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1.15718198))
  639. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really red","Part",Vector3.new(0.930197001, 0.200000003, 0.453971326))
  640. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00457763672, -0.765160799, 1.5292244, 8.4777188e-005, 0.000156341121, 0.999999702, -0.866025567, 0.499996573, -4.72138709e-006, -0.499996901, -0.866025567, 0.000177754438))
  641. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.100000001, 0.0890140012, 0.100000001))
  642. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.267042011, 0.200000003))
  643. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.71396184, -0.902069092, 0.271377563, 0.8660236, -0.499999017, 1.84802866e-006, 0.499999374, 0.866023779, -4.71902313e-005, 2.19600042e-005, 4.17576521e-005, 0.999999106))
  644. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.445069969, 1, 0.890139937))
  645. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.356057793, 2.84844708, 0.200000003))
  646. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0047454834, -2.18133688, 0.323482513, 3.66997556e-005, 6.66387496e-005, 0.999999702, -0.866023839, 0.499998808, -1.47526384e-006, -0.499999315, -0.866023958, 7.61135016e-005))
  647. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.890139937))
  648. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0.60000002384186,"Mid gray","Part",Vector3.new(0.445069641, 0.200000003, 0.534083962))
  649. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.52576447, -1.15971661, -0.00486755371, -0.499999493, -0.866024137, 2.11432925e-005, -0.866023958, 0.499998957, -1.77337063e-006, -8.95379344e-006, -1.92798325e-005, -0.999999523))
  650. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.890139997, 1))
  651. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  652. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.403086185, -0.00352478027, 1.25802231, -0.866025269, 0.499996424, -4.6921532e-006, -9.06756031e-005, -0.000166724145, -0.999999344, -0.499996811, -0.866025388, 0.000189673912))
  653. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.890141726, 0.890139937, 0.445069969))
  654. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(1.78027892, 0.356056005, 0.356055975))
  655. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.28802133, -0.764591217, 0.00480651855, 0.866019368, -0.500006795, 1.81821065e-006, 0.500007212, 0.866019428, -3.18681123e-005, 1.42879144e-005, 2.85067945e-005, 0.999999642))
  656. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.04732227, 0.356055945, 0.200000003))
  657. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.892075658, -0.00434875488, 1.16921997, -0.866025567, 0.499996573, -4.72138709e-006, -7.90221384e-005, -0.000146495877, -0.999999702, -0.499996871, -0.866025686, 0.000166340207))
  658. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.445069969))
  659. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.26704222, 0.445069999, 0.534084022))
  660. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.22940516, -0.813667297, 0.00457763672, 0.866022527, -0.499998182, -2.70454257e-005, 0.499996722, 0.866019726, -0.000830525416, 0.000437630806, 0.000706389663, 0.999996006))
  661. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0.69999998807907,"Mid gray","Part",Vector3.new(0.445069641, 0.200000003, 0.534083962))
  662. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.52544785, -0.358213902, -0.00482177734, -0.499999493, -0.866024137, 2.40192167e-005, -0.866023958, 0.499998957, -1.77337063e-006, -1.03506318e-005, -2.18485948e-005, -0.999999523))
  663. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.890139997, 1))
  664. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.445069999, 0.39611277))
  665. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.33963394, -0.813163757, 0.0027923584, 0.866024017, -0.499998927, -4.7385638e-005, 0.499999076, 0.866023779, -0.000830544159, 0.000456154085, 0.000695649476, 0.999999225))
  666. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.445071131, 1, 1))
  667. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.445069999, 0.39611277))
  668. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.05157065, -0.813426971, 0.00283813477, 0.866022587, -0.499998361, -5.13193481e-005, 0.499996722, 0.866019726, -0.000830421108, 0.000458621944, 0.000694207207, 0.999996126))
  669. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.445071131, 1, 1))
  670. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.356057793, 0.200000003, 0.267042011))
  671. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.14440918e-005, 0.489593506, 0, 0.99999845, 1.49011612e-007, -5.02332114e-008, 1.49011612e-007, 0.999998093, 2.11293809e-008, -5.02332114e-008, 2.11293809e-008, 0.999999702))
  672. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.890139997, 1))
  673. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.200000003, 0.890139997, 0.267042011))
  674. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.267049789, -0.0444793701, 0, 0.99999845, 1.49011612e-007, -5.02332114e-008, 1.49011612e-007, 0.999998093, 2.11293809e-008, -5.02332114e-008, 2.11293809e-008, 0.999999702))
  675. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.890139997, 1, 1))
  676. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.267042011))
  677. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.267055511, 0.489589691, 0, 0.99999845, 1.49011612e-007, -5.02332114e-008, 1.49011612e-007, 0.999998093, 2.11293809e-008, -5.02332114e-008, 2.11293809e-008, 0.999999702))
  678. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.890139997, 0.890139997, 1))
  679. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.801127911, 0.200000003, 0.267042011))
  680. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.87227118, 0.47756958, 0.00357055664, 0.866023958, -0.499998957, 1.77337063e-006, 0.499999315, 0.866024077, 2.50057201e-005, -1.41441415e-005, -2.06979457e-005, 0.999999762))
  681. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.890139997, 1))
  682. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(2.13633513, 0.200000003, 0.356055975))
  683. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.1099844, -0.141490936, 0.00482177734, 0.866019368, -0.500006795, 1.81821065e-006, 0.500007212, 0.866019428, -3.18681123e-005, 1.42879144e-005, 2.85067945e-005, 0.999999642))
  684. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.890139997, 1))
  685. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.445069999, 0.623098075, 0.445069999))
  686. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.190181732, -0.535319328, 4.57763672e-005, 0.499999255, 0.86602366, -0.000830708072, -0.866023958, 0.499998957, -1.77337063e-006, 0.000413693022, 0.000720331562, 0.999999404))
  687. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.475334674, 0.4699938, 1.67168295))
  688. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.293745786, 0.71211195, 0.369408011))
  689. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.06669998, -0.402664542, 0.0329284668, -0.499999374, -0.866023779, 1.51824788e-005, -0.866023958, 0.499998957, -1.77337063e-006, -5.93662844e-006, -1.40970806e-005, -0.999999642))
  690. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  691. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.26704067, 0.445069999, 0.356055915))
  692. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.264636993, -0.812721252, 0.0051574707, 0.866023958, -0.499998957, 1.77337063e-006, 0.499999315, 0.866024017, -5.00066672e-005, 2.3368164e-005, 4.43152385e-005, 0.999999702))
  693. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.356055647, 0.56968981, 0.200000003))
  694. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.821731567, 7.62939453e-005, -1.15725255, -0.500571489, -0.865693092, 0.000803722185, 0.000400191813, 0.000697065494, 0.999999285, -0.86569351, 0.500571311, -2.36438291e-006))
  695. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.890139997))
  696. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Mid gray","Part",Vector3.new(0.356055647, 0.56968981, 0.200000003))
  697. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.82062149, 7.62939453e-005, -2.58165002, -0.500571489, -0.865693092, 0.000803722185, 0.000400191813, 0.000697065494, 0.999999285, -0.86569351, 0.500571311, -2.36438291e-006))
  698. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.890139997))
  699. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.445069999, 0.39611277))
  700. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.40779829, -0.813220978, 0.00286865234, 0.866024137, -0.499999076, -5.31224941e-005, 0.499999106, 0.866023898, -0.000830529374, 0.000461086805, 0.000692783156, 0.999999285))
  701. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.445071131, 1, 1))
  702. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(2.937464, 0.356056005, 0.356055945))
  703. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.708334684, -0.41254425, 0.00485229492, 0.866023958, -0.499998957, 1.77337063e-006, 0.499999404, 0.866023839, -2.39146757e-005, 1.03168713e-005, 2.17378838e-005, 0.999999702))
  704. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.712112248, 0.267042011, 0.200000003))
  705. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.402770758, -0.902065277, 0.137817383, 0.8660236, -0.499999017, 1.84802866e-006, 0.499999315, 0.866023958, -5.58628235e-005, 2.6284717e-005, 4.92944382e-005, 0.999999166))
  706. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.445069969))
  707. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.26704222, 0.445069999, 0.534084022))
  708. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.87373841, -0.813194275, 0.00457763672, 0.866024017, -0.499998868, -3.39000762e-005, 0.499999076, 0.866023839, -0.00083060388, 0.000444560981, 0.000702324207, 0.999999285))
  709. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.200000003, 0.445069999, 0.356055915))
  710. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0422852039, -0.813350677, 0.00514221191, 0.866023958, -0.499998957, 1.77337063e-006, 0.499999374, 0.866023779, -5.29420795e-005, 2.48118013e-005, 4.68230573e-005, 0.999999702))
  711. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.890139937, 1, 1))
  712. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.356055647, 0.356056958, 0.356055915))
  713. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.03561783, -4.05199051, -0.00440979004, -0.499999374, -0.866023779, 5.3821248e-005, -0.866023958, 0.499998957, -1.77337063e-006, -2.52545578e-005, -4.75892448e-005, -0.999999702))
  714. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  715. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.445069999, 0.623098075, 0.445069999))
  716. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.5254631, -4.57763672e-005, -1.33689678, 0.499999136, 0.866023719, -0.000830871984, -0.000413789938, -0.000720565615, -0.999999225, -0.866023839, 0.499998927, -1.78828543e-006))
  717. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.551886737, 0.587492347, 2.43898368))
  718. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.445069999, 0.623098075, 0.534084022))
  719. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.52507019, -4.57763672e-005, -0.758278728, 0.499999136, 0.866023719, -0.000830871984, -0.000413789938, -0.000720565615, -0.999999225, -0.866023839, 0.499998927, -1.78828543e-006))
  720. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.498478353, 0.498478293, 7.21013451))
  721. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.267041624, 0.200000003, 0.356055915))
  722. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.991195679, -4.27400589, -0.0052947998, -0.499999285, -0.866023958, 3.51352501e-005, -0.866018832, 0.499996156, -1.77348545e-006, -1.60587661e-005, -3.15416837e-005, -0.999993682))
  723. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.890139997, 1))
  724. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.712112248, 0.200000003, 0.356055915))
  725. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.402687311, -0.679267883, 0.00505065918, 0.8660236, -0.499999017, 1.84802866e-006, 0.499999315, 0.866023958, -5.58628235e-005, 2.6284717e-005, 4.92944382e-005, 0.999999166))
  726. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.890140235, 1))
  727. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.356055647, 0.200000003, 0.356055915))
  728. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.03623199, 0.0421948433, -0.00440979004, -0.499999255, -0.866023898, 5.00364113e-005, -0.866023958, 0.499998957, -1.77337063e-006, -2.34013132e-005, -4.41999873e-005, -0.999999642))
  729. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.890139997, 1))
  730. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.99999994, 1))
  731. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.200000003, 0.200000003))
  732. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.11522019, -0.00350952148, 1.25802612, -0.866025269, 0.499996424, -4.6921341e-006, -9.35725402e-005, -0.00017174182, -0.999999344, -0.499996811, -0.866025388, 0.000195467321))
  733. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.890141726, 0.890139937, 0.445069969))
  734. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.26704222, 0.445069999, 0.534084022))
  735. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.51749039, -0.813407898, 0.00457763672, 0.866024137, -0.499999076, -4.25724756e-005, 0.499999136, 0.866023719, -0.000830633566, 0.000451922766, 0.000698114221, 0.999999344))
  736. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(2.84844756, 0.623098075, 0.356055915))
  737. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.18314743, -0.724628448, 0.00506591797, 0.866023958, -0.499998957, 1.77337063e-006, 0.499999315, 0.866023958, -5.58628235e-005, 2.62502872e-005, 4.93772677e-005, 0.999999642))
  738. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.712112248, 0.200000003, 0.200000003))
  739. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.403198361, -0.888397217, 0.631103516, 0.8660236, -0.499999017, 1.84802866e-006, 0.43302834, 0.750028789, 0.499940455, -0.249971539, -0.432960272, 0.866058707))
  740. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.890139937, 0.445069969))
  741. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.356055647, 2.84844851, 0.356055915))
  742. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.03583908, -2.18302703, -0.0052947998, -0.499999493, -0.866023898, 7.92279025e-005, -0.866023958, 0.499998957, -1.77337063e-006, -3.79744743e-005, -6.95118215e-005, -0.999999642))
  743. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  744. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.413914353, 1.00140691, 0.200000003))
  745. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.993293762, -4.91016245, -0.00451660156, -0.499999255, -0.86602366, 0.000819979236, -0.866023958, 0.499998957, -1.77337063e-006, -0.000408323831, -0.000711051165, -0.999999464))
  746. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.890139997))
  747. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.267042011, 0.801125944, 0.356055915))
  748. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.74128556, -0.635295868, 0.00506591797, 0.866023958, -0.499998957, 1.77337063e-006, 0.499999285, 0.866024017, -3.13802739e-005, 1.40639022e-005, 2.82098772e-005, 0.999999702))
  749. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.801127911, 0.623098075, 0.267042011))
  750. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.87227416, 0.0769958496, 0.00352478027, 0.866023958, -0.499998957, 1.77337063e-006, 0.499999315, 0.866024077, 2.50057201e-005, -1.41441415e-005, -2.06979457e-005, 0.999999762))
  751. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.356055647, 0.267041951, 0.356055915))
  752. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.03563309, 0.264527798, -0.00439453125, -0.499999464, -0.866024137, 5.87239629e-005, -0.866023958, 0.499998957, -1.77337063e-006, -2.77429353e-005, -5.17922454e-005, -0.999999642))
  753. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  754. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.445069999, 0.623098075, 0.445069999))
  755. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.525383, -4.57763672e-005, -0.179089904, 0.499999136, 0.866023719, -0.000830871984, -0.000413789938, -0.000720565615, -0.999999225, -0.866023839, 0.499998927, -1.78828543e-006))
  756. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.551886797, 0.587492406, 2.43898368))
  757. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.445069999, 0.623098075, 0.445069999))
  758. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.190181732, -0.535319328, 4.57763672e-005, 0.499999255, 0.86602366, -0.000830708072, -0.866023958, 0.499998957, -1.77337063e-006, 0.000413693022, 0.000720331562, 0.999999404))
  759. mesh("SpecialMesh",Part,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.516281128, 0.534083903, 1.67168295))
  760. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.200000003, 0.445069999, 0.39611277))
  761. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.69532752, -0.813652039, 0.00280761719, 0.866024017, -0.499998927, -4.9620794e-005, 0.499999076, 0.866023779, -0.000830544159, 0.000458155992, 0.000694434391, 0.999999464))
  762. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.445071131, 1, 1))
  763. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.26704222, 0.445069999, 0.534084022))
  764. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.16124141, -0.813632965, 0.00457763672, 0.866024017, -0.499998927, -4.7102516e-005, 0.499999076, 0.866023779, -0.000830544159, 0.000455903384, 0.00069573865, 0.999999285))
  765. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.26704222, 0.445069999, 0.534084022))
  766. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(2.58563924, -0.81344223, 0.0046081543, 0.866024017, -0.499998868, -3.2305652e-005, 0.499999076, 0.866023839, -0.00083060388, 0.000443078374, 0.000703191035, 0.999999344))
  767. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.356055647, 0.445069909, 0.200000003))
  768. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.990428925, -4.54400349, -0.00450134277, -0.499999255, -0.86602366, 0.000830708072, -0.866023958, 0.499998957, -1.77337063e-006, -0.000413693022, -0.000720331562, -0.999999404))
  769. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1.20000005, 1, 1.05036521))
  770. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.712112248, 0.267042071, 0.200000003))
  771. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.402770162, -0.902275085, -0.128295898, 0.866023958, -0.499998957, 1.77337063e-006, 0.499999374, 0.866023779, -4.71604289e-005, 2.19338981e-005, 4.17148112e-005, 0.999999881))
  772. mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.445069969))
  773. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.356055647, 0.267043382, 0.356055915))
  774. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.03567123, -3.73954415, -0.00442504883, -0.499999374, -0.866023779, 6.7038578e-005, -0.866018832, 0.499996156, -1.77348545e-006, -3.20452091e-005, -5.923555e-005, -0.999993443))
  775. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  776. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Really black","Part",Vector3.new(0.534083724, 0.890139997, 0.71211195))
  777. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.853614807, 1.73310804, -0.00483703613, -0.500008345, -0.866018832, 3.29770846e-005, -0.866018772, 0.500007927, -1.81967221e-006, -1.48173713e-005, -2.9586372e-005, -0.999999821))
  778. mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  779. Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Dark stone grey","Part",Vector3.new(0.356056005, 0.801126003, 0.356056005))
  780. Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(4.05088663, -0.643760681, 0.00584411621, 0.866018832, -0.499996156, 1.77348545e-006, 0.499999464, 0.866023779, -3.45093431e-005, 1.5754078e-005, 3.11076874e-005, 0.999993443))
  781.  
  782. ready = false
  783.  
  784. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  785. local fp = it("Part")
  786. fp.formFactor = formfactor
  787. fp.Parent = parent
  788. fp.Reflectance = reflectance
  789. fp.Transparency = transparency
  790. fp.CanCollide = false
  791. fp.Locked=true
  792. fp.BrickColor = brickcolor
  793. fp.Name = name
  794. fp.Size = size
  795. fp.Position = Torso.Position
  796. NoOutline(fp)
  797. fp.Material="SmoothPlastic"
  798. fp:BreakJoints()
  799. return fp
  800. end
  801.  
  802. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  803. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  804. prt.Anchored=true
  805. prt.CFrame=cframe
  806. msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1))
  807. game:GetService("Debris"):AddItem(prt,2)
  808. coroutine.resume(coroutine.create(function(Part,Mesh)
  809. for i=0,1,delay do
  810. swait()
  811. Part.CFrame=Part.CFrame
  812. Part.Transparency=i
  813. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  814. end
  815. Part.Parent=nil
  816. end),prt,msh)
  817. end
  818.  
  819. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  820. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  821. prt.Anchored=true
  822. prt.CFrame=cframe
  823. msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  824. game:GetService("Debris"):AddItem(prt,2)
  825. coroutine.resume(coroutine.create(function(Part,Mesh)
  826. for i=0,1,delay do
  827. swait()
  828. Part.CFrame=Part.CFrame
  829. Part.Transparency=i
  830. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  831. end
  832. Part.Parent=nil
  833. end),prt,msh)
  834. end
  835.  
  836. function LaserBarrage(Prt,Parent)
  837. attack=true
  838. --so("BeamLockon",Prt,1,1)
  839. local efprt=part(3,Parent,0,0.5,BrickColor.new("Dark stone grey"),"Effect",vt(0.2,0.2,0.2))
  840. efprt.Anchored=true
  841. local efmsh=mesh("CylinderMesh",efprt,"","",vt(0,0,0),vt(1,1,1))
  842. spread=vt((math.random(0,0)+math.random())*0,(math.random(0,0)+math.random())*0,(math.random(0,0)+math.random())*0)*(Prt.Position-Mouse.Hit.p).magnitude/100
  843. --spread=vt(0,0,0)
  844. coroutine.resume(coroutine.create(function(Part,Mesh,Spreaded)
  845. game:GetService("Debris"):AddItem(Part,6)
  846. local TheHit=Mouse.Hit.p
  847. local MouseLook=cf((Prt.Position+TheHit)/2,TheHit+Spreaded)
  848. local hit,pos = rayCast(Prt.Position,MouseLook.lookVector,1000,Parent)
  849. so("Elec",Prt,0.2,1)
  850. local tefprt=part(3,workspace,0,1,BrickColor.new("Black"),"Effect",vt(0.2,0.2,0.2))
  851. tefprt.CFrame=cf(pos)
  852. MagicCircle(BrickColor.new("Dark stone grey"),cf(pos),0.5,0.5,0.5,0.5,0.5,0.5,0.04)
  853. so("Elec",tefprt,0.3,1)
  854. game:GetService("Debris"):AddItem(tefprt,3)
  855. Part.CFrame=CFrame.new((Prt.Position+pos)/2,pos)*angles(1.57,0,0)
  856. if(hit.Parent:findFirstChild("Humanoid")~= nil)then
  857. if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Name ~= "Base" and hit.Parent.Name ~= Player.Name then
  858. hit.Parent.Humanoid:TakeDamage(50)
  859. end
  860. end
  861. local mag=(Prt.Position-pos).magnitude
  862. MagicCylinder(BrickColor.new("Dark stone grey"),Part.CFrame,1,mag*5,1,0.5,0,0.5,0.05)
  863. Part.Parent=nil
  864. end),efprt,efmsh,spread)
  865. end
  866.  
  867. function shoot()
  868. if ready==true then
  869. attack=true
  870. ready = false
  871. LaserBarrage(Barrel,m)
  872. so("http://roblox.com/asset/?id=130767489",Barrel,1,1)
  873. so("http://roblox.com/asset/?id=151112832",Barrel,1,1)
  874. for i=0,1,0.1 do
  875. swait()
  876. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  877. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-20),math.rad(-10),math.rad(0)),.3)
  878. RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, 0.3) * angles(math.rad(100), math.rad(0), math.rad(0)), 0.3)
  879. LW.C0 = clerp(LW.C0, CFrame.new(-.3, 0.4, -0.8) * angles(math.rad(120), math.rad(0), math.rad(30)), 0.3)
  880. RH.C0=clerp(RH.C0,cf(1,0,-0.5)*angles(math.rad(0),math.rad(90),math.rad(-10)),.3)
  881. LH.C0=clerp(LH.C0,cf(-1,-1,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(70)),.3)
  882. handleweld.C0=clerp(handleweld.C0,cf(0,0,.5)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  883. end
  884. for i=0,1,0.1 do
  885. swait()
  886. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  887. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(-10),math.rad(0)),.3)
  888. RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, 0.3) * angles(math.rad(80), math.rad(0), math.rad(0)), 0.3)
  889. LW.C0 = clerp(LW.C0, CFrame.new(-.3, 0.4, -0.8) * angles(math.rad(90), math.rad(0), math.rad(30)), 0.3)
  890. RH.C0=clerp(RH.C0,cf(1,0,-0.5)*angles(math.rad(0),math.rad(90),math.rad(-10)),.3)
  891. LH.C0=clerp(LH.C0,cf(-1,-1,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(70)),.3)
  892. handleweld.C0=clerp(handleweld.C0,cf(0,0,.5)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  893. end
  894. attack=false
  895. end
  896. end
  897.  
  898. mouse.Button1Down:connect(function()
  899. pcall(function()
  900. shoot()
  901. end)
  902. end)
  903.  
  904. mouse.KeyDown:connect(function(k)
  905. k=k:lower()
  906. if k=='f' then
  907. if ready==false then
  908. ready=true
  909. attack=true
  910. elseif ready==true then
  911. ready=false
  912. attack=false
  913. end
  914. end
  915. end)
  916.  
  917.  
  918.  
  919. local sine = 0
  920. local change = 1
  921. local val = 0
  922.  
  923. while true do
  924. swait()
  925. sine = sine + change
  926. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  927. local velderp=RootPart.Velocity.y
  928. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  929. if equipped==true or equipped==false then
  930. if attack==false then
  931. idle=idle+1
  932. else
  933. idle=0
  934. end
  935. if idle>=500 then
  936. if attack==false then
  937. --Sheath()
  938. end
  939. end
  940. if RootPart.Velocity.y > 1 and hitfloor==nil then
  941. Anim="Jump"
  942. if attack==false then
  943. Humanoid.WalkSpeed = 16
  944. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  945. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  946. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  947. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  948. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  949. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  950. end
  951. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  952. Anim="Fall"
  953. if attack==false then
  954. Humanoid.WalkSpeed = 16
  955. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  956. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  957. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  958. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  959. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  960. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  961. end
  962. elseif torvel<1 and hitfloor~=nil then
  963. Anim="Idle"
  964. if attack==false then
  965. Humanoid.WalkSpeed = 16
  966. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(20)),.3)
  967. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-20)),.3)
  968. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.3) * angles(math.rad(70), math.rad(0), math.rad(0)), 0.3)
  969. LW.C0 = clerp(LW.C0, CFrame.new(-.3, 0.4, -0.8) * angles(math.rad(80), math.rad(0), math.rad(60)), 0.3)
  970. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(70),math.rad(-5)),.3)
  971. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  972. handleweld.C0=clerp(handleweld.C0,cf(0,0,.5)*angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  973. end
  974. elseif torvel>2 and hitfloor~=nil then
  975. Anim="Walk"
  976. if attack==false then
  977. change=3
  978. Humanoid.WalkSpeed = 16
  979. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  980. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(0),math.rad(0)),.3)
  981. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.3) * angles(math.rad(70), math.rad(0), math.rad(0)), 0.3)
  982. LW.C0 = clerp(LW.C0, CFrame.new(-.3, 0.4, -0.8) * angles(math.rad(80), math.rad(0), math.rad(60)), 0.3)
  983. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3)
  984. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3)
  985. handleweld.C0=clerp(handleweld.C0,cf(0,0,.5)*angles(math.rad(5),math.rad(0),math.rad(0)),.3)
  986. end
  987. end
  988. end
  989. if ready==true then
  990. Humanoid.WalkSpeed = 5
  991. RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  992. Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(-10),math.rad(0)),.3)
  993. RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, 0.3) * angles(math.rad(80), math.rad(0), math.rad(0)), 0.3)
  994. LW.C0 = clerp(LW.C0, CFrame.new(-.3, 0.4, -0.8) * angles(math.rad(90), math.rad(0), math.rad(30)), 0.3)
  995. RH.C0=clerp(RH.C0,cf(1,0,-0.5)*angles(math.rad(0),math.rad(90),math.rad(-10)),.3)
  996. LH.C0=clerp(LH.C0,cf(-1,-1,-0.5)*angles(math.rad(0),math.rad(-90),math.rad(70)),.3)
  997. handleweld.C0=clerp(handleweld.C0,cf(0,0,.5)*angles(math.rad(10),math.rad(0),math.rad(0)),.3)
  998. end
  999. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement