Advertisement
samuelrichter66

huge gray spooper gun

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