Advertisement
Gametoy

OOo fancy

Feb 23rd, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 88.01 KB | None | 0 0
  1. --[[
  2. Tf2 Engineer Class
  3. --------------------
  4. Script by: 123jl123
  5. ---------------------
  6. Sentry by: Madiik
  7. -- ]]
  8.  
  9.  
  10. local plr = game:service'Players'.LocalPlayer
  11. local char = plr.Character
  12. local mouse = plr:GetMouse()
  13. local humanoid = char:findFirstChild("Humanoid")
  14. local torso = char:findFirstChild("Torso")
  15. local head = char.Head
  16. local ra = char:findFirstChild("Right Arm")
  17. local la = char:findFirstChild("Left Arm")
  18. local rl = char:findFirstChild("Right Leg")
  19. local ll = char:findFirstChild("Left Leg")
  20. local rs = torso:findFirstChild("Right Shoulder")
  21. local ls = torso:findFirstChild("Left Shoulder")
  22. local rh = torso:findFirstChild("Right Hip")
  23. local lh = torso:findFirstChild("Left Hip")
  24. local neck = torso:findFirstChild("Neck")
  25. local rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  26. local rootpart = char:findFirstChild("HumanoidRootPart")
  27. local camera = workspace.CurrentCamera
  28. local anim = char:findFirstChild("Animate")
  29. DA = false
  30. NoSentry = true
  31. maincolor = game.Players.LocalPlayer.Character.Torso.BrickColor.Name
  32. secondcolor = "Really black"
  33. WSHM = {0,0,0}
  34. WSH = WSHM[math.random(1,#WSHM)]
  35. wait(1 / 60)
  36. Effects = { }
  37. local Player = game.Players.localPlayer
  38. local Character = Player.Character
  39. local Humanoid = Character.Humanoid
  40. local mouse = Player:GetMouse()
  41. local LeftArm = Character["Left Arm"]
  42. local RightArm = Character["Right Arm"]
  43. local LeftLeg = Character["Left Leg"]
  44. local RightLeg = Character["Right Leg"]
  45. local Head = Character.Head
  46. local Torso = Character.Torso
  47. local cam = game.Workspace.CurrentCamera
  48. local RootPart = Character.HumanoidRootPart
  49. local RootJoint = RootPart.RootJoint
  50. local equipped = false
  51. local attack = false
  52. local Anim = 'Idle'
  53. local idle = 0
  54. local attacktype = 1
  55. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  56. local velocity = RootPart.Velocity.y
  57. local sine = 0
  58. local change = 1
  59. local grabbed = false
  60. local cn = CFrame.new
  61. local mr = math.rad
  62. local angles = CFrame.Angles
  63. local ud = UDim2.new
  64. local c3 = Color3.new
  65. local slashDamage = 15
  66. trans = 1
  67. Wep = 1
  68. equippedgun2 = false
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. --SB Plasma Shotgun 2013
  80.  
  81. --madiik's plasma shottie
  82.  
  83. --variables
  84.  
  85.  
  86.  
  87. --some more variables
  88.  
  89. local spread = 1
  90. -- end of some more variables
  91.  
  92. local sound = Instance.new("Sound",head)
  93. sound.SoundId = "http://www.roblox.com/asset?id=10209842"
  94. sound.Volume = 2
  95. sound.Pitch = 1
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103. local sound2 = Instance.new("Sound",head)
  104. sound2.SoundId = "http://www.roblox.com/asset?id=10209881"
  105. sound2.Volume = 1
  106. sound2.Pitch = 1
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. function attach(weld, part0, part1)
  115. weld.Part0 = part0
  116. weld.Part1 = part1
  117. end
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127. --create func
  128. function part(parent, size, color, formfactor, collide, transparency)
  129. if transparency == nil then transparency = 0 end
  130. if collide == nil then collide = false end
  131. if formfactor == nil then formfactor = Enum.FormFactor.Custom end
  132. local p=Instance.new("Part", parent)
  133. p.FormFactor=formfactor
  134. p.CanCollide=false
  135. p.Size=size
  136. p.Locked=true
  137. p.Transparency=transparency
  138. p.Position=torso.Position
  139. p.BrickColor=color
  140. p.FrontSurface="SmoothNoOutlines"
  141. p.BackSurface="SmoothNoOutlines"
  142. p.LeftSurface="SmoothNoOutlines"
  143. p.BottomSurface="SmoothNoOutlines"
  144. p.TopSurface="SmoothNoOutlines"
  145. p.RightSurface="SmoothNoOutlines"
  146. return p
  147. end
  148. function wedge(parent, size, color, formfactor, collide, transparency)
  149.  
  150. if transparency == nil then transparency = 0 end
  151. if collide == nil then collide = false end
  152. if formfactor == nil then formfactor = Enum.FormFactor.Custom end
  153.  
  154. local p=Instance.new("WedgePart", parent)
  155. p.FormFactor=formfactor
  156. p.CanCollide=false
  157. p.Size=size
  158. p.Locked=true
  159. p.Position = torso.Position
  160. p.BrickColor=color
  161. p.FrontSurface="SmoothNoOutlines"
  162. p.BackSurface="SmoothNoOutlines"
  163. p.LeftSurface="SmoothNoOutlines"
  164. p.BottomSurface="SmoothNoOutlines"
  165. p.TopSurface="SmoothNoOutlines"
  166. p.RightSurface="SmoothNoOutlines"
  167. return p
  168. end
  169. function weld(part0, part1, c0, parent, c1)
  170. if parent == nil then parent = gun end
  171. if c1 == nil then c1 = CFrame.new() end
  172.  
  173. local wel=Instance.new("Weld", parent)
  174. wel.Part0 = part0
  175. wel.Part1 = part1
  176. wel.C0 = c0
  177. wel.C1 = c1
  178. return wel
  179. end
  180.  
  181. --some ray functi0n
  182.  
  183. function rayCast2(speed, gravity, from)
  184. coroutine.wrap(function()
  185. if char.Humanoid.Health == 0 then return end
  186. local rayP = Instance.new("Part")
  187. rayP.Name = "rayP"
  188. rayP.BrickColor = BrickColor.new("New Yeller")
  189. rayP.Material = 'Neon'
  190. rayP.Anchored = true
  191. rayP.CanCollide = false
  192. rayP.Locked = true
  193. rayP.TopSurface = Enum.SurfaceType.Smooth
  194. rayP.BottomSurface = Enum.SurfaceType.Smooth
  195. rayP.formFactor = Enum.FormFactor.Custom
  196. rayP.Size = Vector3.new(0.2, 0.2, 0.2)
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209. local bulletposition = from.Position + Vector3.new(0, 0.3, 0)
  210.  
  211. local bulletvelocity = (Vector3.new(math.random(-spread*4,spread*4), math.random(-spread*4,spread*4), math.random(-spread*4,spread*4)))+( plr:GetMouse().Hit.p - bulletposition).unit*speed
  212. local bulletlastposition = bulletposition
  213.  
  214.  
  215.  
  216.  
  217. coroutine.resume(coroutine.create(function()
  218. while true do
  219. local dt = wait()
  220. bulletlastposition = bulletposition
  221. bulletvelocity = bulletvelocity + (Vector3.new(0, -14.81*gravity, 0)*dt)
  222. bulletposition = bulletposition + (bulletvelocity*dt)
  223.  
  224. local ray = Ray.new(bulletlastposition, (bulletposition - bulletlastposition))
  225.  
  226. local hit, hitposition = workspace:FindPartOnRayWithIgnoreList( ray, { char, rayP, TrailPart} )
  227.  
  228. if (torso.Position - rayP.Position).magnitude > 540 then
  229. rayP:Destroy()
  230. break
  231. end
  232.  
  233.  
  234. if hit then
  235. local damage = math.random(10, 20)
  236. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  237. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage
  238. end
  239. if hit.Parent:IsA("Hat") and hit.Parent.Parent:findFirstChild("Humanoid") ~= nil then
  240. hit.Parent.Parent.Humanoid.Health = hit.Parent.Parent.Humanoid.Health - damage
  241. end
  242. bulletposition = hitposition
  243. rayP.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity)
  244. rayP:Destroy()
  245. break
  246. end
  247. rayP.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity)
  248. rayP.Parent = workspace
  249. end
  250. end))
  251. end)()
  252. end
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260. --function attach(weld, part0, part1)
  261. --weld.Part0 = part0
  262. --weld.Part1 = part1
  263. --end
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291. TmRed = false
  292. TmBlue = false
  293. TeamColor = BrickColor.new("Really Black")
  294.  
  295. New = function(Object, Parent, Name, Data)
  296. local Object = Instance.new(Object)
  297. for Index, Value in pairs(Data or {}) do
  298. Object[Index] = Value
  299. end
  300. Object.Parent = Parent
  301. Object.Name = Name
  302. return Object
  303. end
  304. local AddInstance = function(Object, ...)
  305. local Obj = Instance.new(Object)
  306. for i,v in next,(...) do
  307. Obj[i] = v
  308. end
  309. return Obj
  310. end
  311.  
  312.  
  313.  
  314.  
  315.  
  316. Team=function()
  317.  
  318. local r=math.random(1,2)
  319. if r==1 then
  320. print('RED')
  321. script.Name = "TeamRed"
  322. TmRed = true
  323.  
  324. end
  325.  
  326. if r==2 then
  327. print('BLUE')
  328. TmBlue = true
  329. script.Name = "TeamBlue"
  330.  
  331. end
  332. print(''..r)
  333. end
  334.  
  335. Team()
  336.  
  337.  
  338.  
  339. local MusThingHat = AddInstance("Part",{
  340. Parent = head,
  341. CFrame = head.CFrame,
  342. formFactor = "Symmetric",
  343. Size = Vector3.new(1, 1, 1),
  344. CanCollide = false,
  345. TopSurface = "Smooth",
  346. BottomSurface = "Smooth",
  347. Locked = true,
  348. BrickColor=BrickColor.new("Br. yellowish orange"),
  349. Transparency = 1,
  350. })
  351. local Weld = AddInstance("Weld",{
  352. Parent = MusThingHat,
  353. Part0 = head,
  354. C0 = CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),
  355. Part1 = MusThingHat,
  356. })
  357. local Mesh = AddInstance("SpecialMesh",{
  358. Parent = MusThingHat,
  359.  
  360. Scale = Vector3.new(.1,0,.1),
  361.  
  362. })
  363.  
  364. local Reaper = AddInstance("Part",{
  365. Parent = head,
  366. CFrame = head.CFrame,
  367. formFactor = "Symmetric",
  368. Size = Vector3.new(1, 1, 1),
  369. CanCollide = false,
  370. TopSurface = "Smooth",
  371. BottomSurface = "Smooth",
  372. Locked = true,
  373. BrickColor=BrickColor.new("Br. yellowish orange"),
  374. })
  375. local Weld = AddInstance("Weld",{
  376. Parent = Reaper,
  377. Part0 = head,
  378. C0 = CFrame.new(-.04,.7,-.1)*CFrame.Angles(0,0,.08),
  379. Part1 = Reaper,
  380. })
  381. local Mesh = AddInstance("SpecialMesh",{
  382. Parent = Reaper,
  383. MeshId = "rbxassetid://0",
  384. Scale = Vector3.new(1.06,1.05,1.06),
  385. VertexColor = Vector3.new(1,1,1),
  386. })
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408. local Reaper4 = AddInstance("Part",{
  409. Parent = RightArm,
  410. CFrame = RightArm.CFrame,
  411. formFactor = "Symmetric",
  412. Size = Vector3.new(0.1, 0.5, 3),
  413. CanCollide = false,
  414. TopSurface = "Smooth",
  415. BottomSurface = "Smooth",
  416. Locked = true,
  417. Transparency = 0
  418. })
  419. local Weld = AddInstance("Weld",{
  420. Parent = Reaper4,
  421. Part0 = RightArm,
  422. C0 = CFrame.new(-0.35,-1.8,-0.4)*CFrame.Angles(4.7,3.4,0),
  423. Part1 = Reaper4,
  424. })
  425. local Mesh = AddInstance("SpecialMesh",{
  426. Parent = Reaper4,
  427. MeshId = "rbxassetid://470533002",
  428. TextureId = "rbxassetid://470533004",
  429. Scale = Vector3.new(.03,.03,.03),
  430. VertexColor = Vector3.new(1,1,1),
  431. })
  432.  
  433. local GunFire = AddInstance("Part",{
  434. Parent = RightArm,
  435. CFrame = RightArm.CFrame,
  436. formFactor = "Symmetric",
  437. Size = Vector3.new(0.1, 0.1, 0.1),
  438. CanCollide = false,
  439. TopSurface = "Smooth",
  440. BottomSurface = "Smooth",
  441. Locked = true,
  442. Transparency = 1
  443. })
  444. local Weld = AddInstance("Weld",{
  445. Parent = GunFire,
  446. Part0 = RightArm,
  447. C0 = CFrame.new(-0.8,-3.5,-0.7)*CFrame.Angles(4.7,3.4,0),
  448. Part1 = GunFire,
  449. })
  450.  
  451.  
  452. local GunParticle = Instance.new("ParticleEmitter", GunFire);
  453. GunParticle.VelocitySpread = 60;
  454. GunParticle.LightEmission = 200;
  455.  
  456. local Colors2 = {Color3.new(1,.5,0), Color3.new(1,.7,0), Color3.new(1,.9,0);}
  457. GunParticle.Size = NumberSequence.new(.05,.07);
  458.  
  459. GunParticle.Color = ColorSequence.new(Colors2[math.random(#Colors2)]);
  460. GunParticle.Texture = "rbxassetid://252350680";
  461. GunParticle.RotSpeed = NumberRange.new(10,70);
  462. GunParticle.Rate = 600;
  463. GunParticle.Speed = NumberRange.new(15);
  464. GunParticle.Transparency = NumberSequence.new(0,1);
  465. GunParticle.Lifetime = NumberRange.new(.01,.2);
  466. GunParticle.EmissionDirection = 'Back'
  467. GunParticle.Enabled = false
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476. local Reaper5 = AddInstance("Part",{
  477. Parent = RightArm,
  478. CFrame = RightArm.CFrame,
  479. formFactor = "Symmetric",
  480. Size = Vector3.new(0.1, 0.5, 3),
  481. CanCollide = false,
  482. TopSurface = "Smooth",
  483. BottomSurface = "Smooth",
  484. Locked = true,
  485. Transparency = 1
  486. })
  487. local Weld = AddInstance("Weld",{
  488. Parent = Reaper5,
  489. Part0 = RightArm,
  490. C0 = CFrame.new(-.1,-0.75,-.7)*CFrame.Angles(1.5,0,3),
  491. Part1 = Reaper5,
  492. })
  493. local Mesh = AddInstance("SpecialMesh",{
  494. Parent = Reaper5,
  495. MeshId = "rbxassetid://431003868",
  496. TextureId = "rbxassetid://430627740",
  497. Scale = Vector3.new(1.93,1.99,1.99),
  498. VertexColor = Vector3.new(1,1,1),
  499. })
  500.  
  501.  
  502. local Reaper6 = AddInstance("Part",{
  503. Parent = Arms,
  504. CFrame = RightArm.CFrame,
  505. formFactor = "Symmetric",
  506. Size = Vector3.new(0.1, 0.1, .1),
  507. CanCollide = false,
  508. TopSurface = "Smooth",
  509. BottomSurface = "Smooth",
  510. Locked = true,
  511. Transparency = 1
  512. })
  513. local Weld = AddInstance("Weld",{
  514. Parent = Reaper6,
  515. Part0 = RightArm,
  516. C0 = CFrame.new(-0.35,-1.8,-0.4)*CFrame.Angles(4.7,3.4,0),
  517. Part1 = Reaper6,
  518. })
  519. local Mesh = AddInstance("SpecialMesh",{
  520. Parent = Reaper6,
  521. MeshId = "rbxassetid://24342877",
  522. TextureId = "rbxassetid://24342832",
  523. Scale = Vector3.new(.029,.029,.029),
  524. VertexColor = Vector3.new(1,1,1),
  525. })
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539. local Reaper7 = AddInstance("Part",{
  540. Parent = Arms,
  541. CFrame = RightArm.CFrame,
  542. formFactor = "Symmetric",
  543. Size = Vector3.new(0.1, 0.5, 3),
  544. CanCollide = false,
  545. TopSurface = "Smooth",
  546. BottomSurface = "Smooth",
  547. Locked = true,
  548. Transparency = 1
  549. })
  550. local Weld = AddInstance("Weld",{
  551. Parent = Reaper7,
  552. Part0 = RightArm,
  553. C0 = CFrame.new(-.1,-0.75,-.7)*CFrame.Angles(1.5,0,3),
  554. Part1 = Reaper7,
  555. })
  556. local Mesh = AddInstance("SpecialMesh",{
  557. Parent = Reaper7,
  558. MeshId = "rbxassetid://431003868",
  559. TextureId = "rbxassetid://430627740",
  560. Scale = Vector3.new(1.9,1.98,1.98),
  561. VertexColor = Vector3.new(1,1,1),
  562. })
  563.  
  564.  
  565. head.face.Texture = "http://www.roblox.com/asset/?id=156600391"
  566. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  567. Humanoid.Animator:Destroy()
  568. Character.Animate:Destroy()
  569.  
  570. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  571. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  572. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  573.  
  574.  
  575. RSH, LSH = nil, nil
  576.  
  577. RW = Instance.new("Weld")
  578. LW = Instance.new("Weld")
  579.  
  580. RH = Torso["Right Hip"]
  581. LH = Torso["Left Hip"]
  582.  
  583. RSH = Torso["Right Shoulder"]
  584. LSH = Torso["Left Shoulder"]
  585.  
  586. RSH.Parent = nil
  587. LSH.Parent = nil
  588.  
  589. RW.Name = "RW"
  590. RW.Part0 = Torso
  591. RW.C0 = cn(1.5, 0.5, 0)
  592. RW.C1 = cn(0, 0.5, 0)
  593. RW.Part1 = RightArm
  594. RW.Parent = Torso
  595.  
  596. LW.Name = "LW"
  597. LW.Part0 = Torso
  598. LW.C0 = cn(-1.5, 0.5, 0)
  599. LW.C1 = cn(0, 0.5, 0)
  600. LW.Part1 = LeftArm
  601. LW.Parent = Torso
  602.  
  603. function clerp(a, b, t)
  604. local qa = {
  605. QuaternionFromCFrame(a)
  606. }
  607. local qb = {
  608. QuaternionFromCFrame(b)
  609. }
  610. local ax, ay, az = a.x, a.y, a.z
  611. local bx, by, bz = b.x, b.y, b.z
  612. local _t = 1 - t
  613. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  614. end
  615.  
  616. function QuaternionFromCFrame(cf)
  617. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  618. local trace = m00 + m11 + m22
  619. if trace > 0 then
  620. local s = math.sqrt(1 + trace)
  621. local recip = 0.5 / s
  622. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  623. else
  624. local i = 0
  625. if m11 > m00 then
  626. i = 1
  627. end
  628. if m22 > (i == 0 and m00 or m11) then
  629. i = 2
  630. end
  631. if i == 0 then
  632. local s = math.sqrt(m00 - m11 - m22 + 1)
  633. local recip = 0.5 / s
  634. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  635. elseif i == 1 then
  636. local s = math.sqrt(m11 - m22 - m00 + 1)
  637. local recip = 0.5 / s
  638. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  639. elseif i == 2 then
  640. local s = math.sqrt(m22 - m00 - m11 + 1)
  641. local recip = 0.5 / s
  642. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  643. end
  644. end
  645. end
  646.  
  647. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  648. local xs, ys, zs = x + x, y + y, z + z
  649. local wx, wy, wz = w * xs, w * ys, w * zs
  650. local xx = x * xs
  651. local xy = x * ys
  652. local xz = x * zs
  653. local yy = y * ys
  654. local yz = y * zs
  655. local zz = z * zs
  656. 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))
  657. end
  658.  
  659. function QuaternionSlerp(a, b, t)
  660. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  661. local startInterp, finishInterp;
  662. if cosTheta >= 0.0001 then
  663. if (1 - cosTheta) > 0.0001 then
  664. local theta = math.acos(cosTheta)
  665. local invSinTheta = 1 / math.sin(theta)
  666. startInterp = math.sin((1 - t) * theta) * invSinTheta
  667. finishInterp = math.sin(t * theta) * invSinTheta
  668. else
  669. startInterp = 1 - t
  670. finishInterp = t
  671. end
  672. else
  673. if (1 + cosTheta) > 0.0001 then
  674. local theta = math.acos(-cosTheta)
  675. local invSinTheta = 1 / math.sin(theta)
  676. startInterp = math.sin((t - 1) * theta) * invSinTheta
  677. finishInterp = math.sin(t * theta) * invSinTheta
  678. else
  679. startInterp = t - 1
  680. finishInterp = t
  681. end
  682. end
  683. 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
  684. end
  685.  
  686. function swait(num)
  687. if num == 0 or num == nil then
  688. game:service'RunService'.RenderStepped:wait(0)
  689. else
  690. for i = 0, num do
  691. game:service'RunService'.RenderStepped:wait(0)
  692. end
  693. end
  694. end
  695.  
  696. local RbxUtility = LoadLibrary("RbxUtility")
  697. local Create = RbxUtility.Create
  698.  
  699. function RemoveOutlines(part)
  700. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  701. end
  702.  
  703. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  704. local Part = Create("Part"){
  705. formFactor = FormFactor,
  706. Parent = Parent,
  707. Reflectance = Reflectance,
  708. Transparency = Transparency,
  709. CanCollide = false,
  710. Locked = true,
  711. BrickColor = BrickColor.new(tostring(BColor)),
  712. Name = Name,
  713. Size = Size,
  714. Material = Material,
  715. }
  716. RemoveOutlines(Part)
  717. return Part
  718. end
  719.  
  720. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  721. local Msh = Create(Mesh){
  722. Parent = Part,
  723. Offset = OffSet,
  724. Scale = Scale,
  725. }
  726. if Mesh == "SpecialMesh" then
  727. Msh.MeshType = MeshType
  728. Msh.MeshId = MeshId
  729. end
  730. return Msh
  731. end
  732.  
  733. function CreateWeld(Parent, Part0, Part1, C0, C1)
  734. local Weld = Create("Weld"){
  735. Parent = Parent,
  736. Part0 = Part0,
  737. Part1 = Part1,
  738. C0 = C0,
  739. C1 = C1,
  740. }
  741. return Weld
  742. end
  743.  
  744. function rayCast(Position, Direction, Range, Ignore)
  745. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  746. end
  747.  
  748. function CreateSound(id, par, vol, pit)
  749. coroutine.resume(coroutine.create(function()
  750. local sou = Instance.new("Sound", par or workspace)
  751. sou.Volume = vol
  752. sou.Pitch = pit or 1
  753. sou.SoundId = id
  754. wait()
  755. sou:play()
  756. game:GetService("Debris"):AddItem(sou, 6)
  757. end))
  758. end
  759.  
  760. local function getclosest(obj, distance)
  761. local last, lastx = distance + 1
  762. for i, v in pairs(workspace:GetChildren()) do
  763. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  764. local t = v.Torso
  765. local dist = (t.Position - obj.Position).magnitude
  766. if dist <= distance then
  767. if dist < last then
  768. last = dist
  769. lastx = v
  770. end
  771. end
  772. end
  773. end
  774. return lastx
  775. end
  776.  
  777. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  778. for i, v in pairs(hit:GetChildren()) do
  779. if v:IsA("Humanoid") and hit.Name ~= Character.Name then
  780. local find = v:FindFirstChild("Hitz")
  781. if not find then
  782. if v.Parent:findFirstChild("Head") then
  783. local BillG = Create("BillboardGui"){
  784. Parent = v.Parent.Head,
  785. Size = UDim2.new(1, 0, 1, 0),
  786. Adornee = v.Parent.Head,
  787. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  788. }
  789. local TL = Create("TextLabel"){
  790. Parent = BillG,
  791. Size = UDim2.new(3, 3, 3, 3),
  792. BackgroundTransparency = 1,
  793. Text = tostring(damage).."-",
  794. TextColor3 = Color1.Color,
  795. TextStrokeColor3 = Color2.Color,
  796. TextStrokeTransparency = 0,
  797. TextXAlignment = Enum.TextXAlignment.Center,
  798. TextYAlignment = Enum.TextYAlignment.Center,
  799. FontSize = Enum.FontSize.Size18,
  800. Font = "ArialBold",
  801. }
  802. coroutine.resume(coroutine.create(function()
  803. wait(1)
  804. for i = 0, 1, .1 do
  805. wait(.1)
  806. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  807. end
  808. BillG:Destroy()
  809. end))
  810. end
  811. v.Health = v.Health - damage
  812. local bool = Create("BoolValue"){
  813. Parent = v,
  814. Name = 'Hitz',
  815. }
  816. if HSound ~= nil and HPitch ~= nil then
  817. CreateSound(HSound, hit, 1, HPitch)
  818. end
  819. game:GetService("Debris"):AddItem(bool, cooldown)
  820. end
  821. end
  822. end
  823. end
  824.  
  825.  
  826. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  827. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  828. prt.Anchored = true
  829. prt.CFrame = cframe
  830. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  831. game:GetService("Debris"):AddItem(prt, 10)
  832. if Type == 1 or Type == nil then
  833. table.insert(Effects, {
  834. prt,
  835. "Block1",
  836. delay,
  837. x3,
  838. y3,
  839. z3,
  840. msh
  841. })
  842. elseif Type == 2 then
  843. table.insert(Effects, {
  844. prt,
  845. "Block2",
  846. delay,
  847. x3,
  848. y3,
  849. z3,
  850. msh
  851. })
  852. end
  853. end
  854.  
  855. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  856. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  857. prt.Anchored = true
  858. prt.CFrame = cframe
  859. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  860. game:GetService("Debris"):AddItem(prt, 10)
  861. table.insert(Effects, {
  862. prt,
  863. "Cylinder",
  864. delay,
  865. x3,
  866. y3,
  867. z3,
  868. msh
  869. })
  870. end
  871.  
  872. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  873. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  874. prt.Anchored = true
  875. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  876. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  877. game:GetService("Debris"):AddItem(prt, 10)
  878. table.insert(Effects, {
  879. prt,
  880. "Cylinder",
  881. delay,
  882. x3,
  883. y3,
  884. z3,
  885. msh
  886. })
  887. end
  888.  
  889. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  890. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  891. prt.Anchored = true
  892. prt.CFrame = cframe
  893. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  894. game:GetService("Debris"):AddItem(prt, 10)
  895. table.insert(Effects, {
  896. prt,
  897. "Cylinder",
  898. delay,
  899. x3,
  900. y3,
  901. z3,
  902. msh
  903. })
  904. end
  905.  
  906. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  907. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  908. prt.Anchored = true
  909. prt.CFrame = cframe
  910. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  911. game:GetService("Debris"):AddItem(prt, 10)
  912. table.insert(Effects, {
  913. prt,
  914. "Cylinder",
  915. delay,
  916. x3,
  917. y3,
  918. z3,
  919. msh
  920. })
  921. end
  922.  
  923. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  924. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  925. prt.Anchored = true
  926. prt.CFrame = cframe
  927. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  928. game:GetService("Debris"):AddItem(prt, 10)
  929. table.insert(Effects, {
  930. prt,
  931. "Cylinder",
  932. delay,
  933. x3,
  934. y3,
  935. z3,
  936. msh
  937. })
  938. end
  939.  
  940. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  941. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  942. prt.Anchored = true
  943. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  944. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  945. local num = math.random(10, 50) / 1000
  946. game:GetService("Debris"):AddItem(prt, 10)
  947. table.insert(Effects, {
  948. prt,
  949. "Shatter",
  950. num,
  951. prt.CFrame,
  952. math.random() - math.random(),
  953. 0,
  954. math.random(50, 100) / 100
  955. })
  956. end
  957.  
  958.  
  959.  
  960.  
  961. for i = 0, 1, 0.05 do
  962. swait()
  963. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  964. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  965. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
  966. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3)
  967. if Torsovelocity > 2 then
  968. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2)
  969. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  970. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  971. elseif Torsovelocity < 1 then
  972. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
  973. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  974. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  975. end
  976. end
  977. attack = false
  978.  
  979.  
  980.  
  981. game:GetService'RunService'.Stepped:connect(function()
  982.  
  983.  
  984.  
  985. if Wep == 1 then
  986. equippedgun2 = false
  987. Reaper4.Transparency = 1
  988. Reaper5.Transparency = 0
  989. Reaper6.Transparency = 1
  990. Reaper7.Transparency = 0
  991. end
  992. if Wep == 2 then
  993. equippedgun2 = true
  994. Reaper4.Transparency = 0
  995. Reaper5.Transparency = 1
  996. Reaper6.Transparency = 0
  997. Reaper7.Transparency = 1
  998. end
  999. if Wep == 3 then
  1000. equippedgun2 = false
  1001. Reaper4.Transparency = 1
  1002. Reaper5.Transparency = 1
  1003. Reaper6.Transparency = 1
  1004. Reaper7.Transparency = 1
  1005. end
  1006.  
  1007. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1008. velocity = RootPart.Velocity.y
  1009. sine = sine + change
  1010. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  1011. if equipped == true or equipped == false then
  1012. if RootPart.Velocity.y > 1 and hit == nil then
  1013. Anim = "Jump"
  1014. if attack == false and Wep == 1 then
  1015. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1016. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1017. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
  1018. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
  1019. RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
  1020. LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
  1021. end
  1022. elseif RootPart.Velocity.y < -1 and hit == nil then
  1023. Anim = "Fall"
  1024. if attack == false and Wep == 1 then
  1025. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1026. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1027. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1)
  1028. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
  1029. RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1030. LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1031. end
  1032. elseif Torsovelocity < 1 and hit ~= nil then
  1033. Anim = "Idle"
  1034. if attack == false and Wep == 1 then
  1035. change = 1
  1036. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1)
  1037. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
  1038. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5 - -.1 * math.cos(sine / 25), 0) * angles(math.rad(50), math.rad(35 - 25 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1)
  1039. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(80 + 7 * math.cos(sine / 25)), math.rad(-30), math.rad(35 - 1 * math.cos(sine / 25))), 0.1)
  1040. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1041. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1042. end
  1043. elseif Torsovelocity > 2 and hit ~= nil then
  1044. Anim = "Walk"
  1045. if attack == false and Wep == 1 then
  1046. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 5))), .2)
  1047. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  1048. RW.C0 = clerp(RW.C0, CFrame.new(1.2 - -.05 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(50), math.rad(57 - .1 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1)
  1049. LW.C0 = clerp(LW.C0, CFrame.new(-1.2 - -.05 * math.cos(sine / 4), 0.4 - -.05 * math.cos(sine / 4), -.4) * angles(math.rad(80 + 1 * math.cos(sine / 25)), math.rad(-30), math.rad(35 - 1 * math.cos(sine / 25))), 0.1)
  1050. RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  1051. LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  1052. end
  1053. end
  1054. end
  1055. -----------------------[Anim2]--------------------------------------------------------------------------------------------------------------------------
  1056.  
  1057. if equipped == true or equipped == false then
  1058. if RootPart.Velocity.y > 1 and hit == nil then
  1059. Anim = "Jump"
  1060. if attack == false and Wep == 2 then
  1061. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1062. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1063. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.2, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
  1064. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.1, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
  1065. RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
  1066. LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
  1067. end
  1068.  
  1069. elseif RootPart.Velocity.y < -1 and hit == nil then
  1070. Anim = "Fall"
  1071. if attack == false and Wep == 2 then
  1072. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1073. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1074. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.8, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.05)
  1075. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.7, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.05)
  1076. RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1077. LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1078. end
  1079. elseif Torsovelocity < 1 and hit ~= nil then
  1080. Anim = "Idle"
  1081. if attack == false and Wep == 2 then
  1082. change = 1
  1083. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1)
  1084. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
  1085. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
  1086. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
  1087. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1088. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1089. end
  1090. elseif Torsovelocity > 2 and hit ~= nil then
  1091. Anim = "Walk"
  1092. if attack == false and Wep == 2 then
  1093. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-25 - 5 * math.cos(sine / 5))), .2)
  1094. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(25 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  1095. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
  1096. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
  1097. RH.C0 = clerp(RH.C0, cn(.95, -.9 + -.1 * math.cos(sine / 4),-.35) * RHCF * angles(math.rad(-2), math.rad(25), math.rad(50 * math.cos(sine / 4))), .3)
  1098. LH.C0 = clerp(LH.C0, cn(-.95, -.9 + .1 * math.cos(sine / 4), .35) * LHCF * angles(math.rad(-2), math.rad(25), math.rad(50 * math.cos(sine / 4))), .3)
  1099. end
  1100.  
  1101. end
  1102. end
  1103.  
  1104.  
  1105.  
  1106. -----------------------[Noraml Anim]--------------------------------------------------------------------------------------------------------------------------
  1107.  
  1108. if equipped == true or equipped == false then
  1109. if RootPart.Velocity.y > 1 and hit == nil then
  1110. Anim = "Jump"
  1111. if attack == false and Wep == 3 then
  1112. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1113. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1114. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
  1115. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
  1116. RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
  1117. LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
  1118. end
  1119. elseif RootPart.Velocity.y < -1 and hit == nil then
  1120. Anim = "Fall"
  1121. if attack == false and Wep == 3 then
  1122. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1123. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1124. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1)
  1125. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
  1126. RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1127. LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1128. end
  1129. elseif Torsovelocity < 1 and hit ~= nil then
  1130. Anim = "Idle"
  1131. if attack == false and Wep == 3 then
  1132. change = 1
  1133. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1)
  1134. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
  1135. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0 * math.cos(sine / 25), 0) * angles(math.rad(0), math.rad(0 - 0 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1)
  1136. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0 + 0 * math.cos(sine / 25)), math.rad(-0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.1)
  1137. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1138. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1139. end
  1140. elseif Torsovelocity > 2 and hit ~= nil then
  1141. Anim = "Walk"
  1142. if attack == false and Wep == 3 then
  1143. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 5))), .2)
  1144. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  1145. RW.C0 = clerp(RW.C0, CFrame.new(1.5 - -0 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(10 + -50 * math.cos(sine / 4)), math.rad(0 - .1 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.3)
  1146. LW.C0 = clerp(LW.C0, CFrame.new(-1.5 - -0 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(10 + 50 * math.cos(sine / 4)), math.rad(-0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.3)
  1147. RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  1148. LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  1149. end
  1150. end
  1151. end
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170. if #Effects > 0 then
  1171. for e = 1, #Effects do
  1172. if Effects[e] ~= nil then
  1173. local Thing = Effects[e]
  1174. if Thing ~= nil then
  1175. local Part = Thing[1]
  1176. local Mode = Thing[2]
  1177. local Delay = Thing[3]
  1178. local IncX = Thing[4]
  1179. local IncY = Thing[5]
  1180. local IncZ = Thing[6]
  1181. if Thing[1].Transparency <= 1 then
  1182. if Thing[2] == "Block1" then
  1183. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1184. local Mesh = Thing[1].Mesh
  1185. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1186. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1187. elseif Thing[2] == "Block2" then
  1188. Thing[1].CFrame = Thing[1].CFrame
  1189. local Mesh = Thing[7]
  1190. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1191. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1192. elseif Thing[2] == "Cylinder" then
  1193. local Mesh = Thing[1].Mesh
  1194. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1195. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1196. elseif Thing[2] == "Blood" then
  1197. local Mesh = Thing[7]
  1198. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  1199. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1200. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1201. elseif Thing[2] == "Elec" then
  1202. local Mesh = Thing[1].Mesh
  1203. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1204. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1205. elseif Thing[2] == "Disappear" then
  1206. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1207. elseif Thing[2] == "Shatter" then
  1208. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1209. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1210. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1211. Thing[6] = Thing[6] + Thing[5]
  1212. end
  1213. else
  1214. Part.Parent = nil
  1215. table.remove(Effects, e)
  1216. end
  1217. end
  1218. end
  1219. end
  1220. end
  1221. end)
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235. local No = Instance.new("Sound", head);
  1236. No.SoundId = "rbxassetid://245064504"
  1237. No.Volume = 3
  1238. local yes = Instance.new("Sound", head);
  1239. yes.SoundId = "rbxassetid://131384028"
  1240. yes.Volume = 3
  1241. local HitM = Instance.new("Sound", Reaper5);
  1242. HitM.SoundId = "rbxassetid://"..WSH
  1243. HitM.Volume = 1.1
  1244. local Swing = Instance.new("Sound", Reaper5);
  1245. Swing.SoundId = "rbxassetid://10209850"
  1246. Swing.Volume = 1.5
  1247. Swing.Pitch = 1.1
  1248. local SwingH = Instance.new("Sound", Reaper5);
  1249. SwingH.SoundId = "rbxassetid://10209590"
  1250. SwingH.Volume = 2.9
  1251. SwingH.Pitch = .8
  1252. local Taunt = Instance.new("Sound", head);
  1253. Taunt.SoundId = "rbxassetid://150611842"
  1254. Taunt.Volume = 2
  1255. local RUS = Instance.new("Sound", char);
  1256. RUS.SoundId = "rbxassetid://245913129"
  1257. RUS.Volume = 1
  1258. RUS.Pitch = 1
  1259. RUS.Looped = true
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270. function BuildSentry()
  1271. do --CFrame lerp (stravant, clerp by AntiBoomz0r)
  1272. local function QuaternionFromCFrame(cf) -- y u no axis angle interpolation?
  1273. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1274. local trace = m00 + m11 + m22
  1275. if trace > 0 then
  1276. local s = math.sqrt(1 + trace)
  1277. local recip = 0.5/s
  1278. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  1279. else
  1280. local i = 0
  1281. if m11 > m00 then
  1282. i = 1
  1283. end
  1284. if m22 > (i == 0 and m00 or m11) then
  1285. i = 2
  1286. end
  1287. if i == 0 then
  1288. local s = math.sqrt(m00-m11-m22+1)
  1289. local recip = 0.5/s
  1290. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  1291. elseif i == 1 then
  1292. local s = math.sqrt(m11-m22-m00+1)
  1293. local recip = 0.5/s
  1294. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  1295. elseif i == 2 then
  1296. local s = math.sqrt(m22-m00-m11+1)
  1297. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  1298. end
  1299. end
  1300. end
  1301. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1302. local xs, ys, zs = x + x, y + y, z + z
  1303. local wx, wy, wz = w*xs, w*ys, w*zs
  1304. local xx = x*xs
  1305. local xy = x*ys
  1306. local xz = x*zs
  1307. local yy = y*ys
  1308. local yz = y*zs
  1309. local zz = z*zs
  1310. 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))
  1311. end
  1312. function QuaternionSlerp(a, b, t)
  1313. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  1314. local startInterp, finishInterp;
  1315. if cosTheta >= 0.0001 then
  1316. if (1 - cosTheta) > 0.0001 then
  1317. local theta = math.acos(cosTheta)
  1318. local invSinTheta = 1/math.sin(theta)
  1319. startInterp = math.sin((1-t)*theta)*invSinTheta
  1320. finishInterp = math.sin(t*theta)*invSinTheta
  1321. else
  1322. startInterp = 1-t
  1323. finishInterp = t
  1324. end
  1325. else
  1326. if (1+cosTheta) > 0.0001 then
  1327. local theta = math.acos(-cosTheta)
  1328. local invSinTheta = 1/math.sin(theta)
  1329. startInterp = math.sin((t-1)*theta)*invSinTheta
  1330. finishInterp = math.sin(t*theta)*invSinTheta
  1331. else
  1332. startInterp = t-1
  1333. finishInterp = t
  1334. end
  1335. end
  1336. 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
  1337. end
  1338. function clerp(a,b,t)
  1339. local qa = {QuaternionFromCFrame(a)}
  1340. local qb = {QuaternionFromCFrame(b)}
  1341. local ax, ay, az = a.x, a.y, a.z
  1342. local bx, by, bz = b.x, b.y, b.z
  1343. local _t = 1-t
  1344. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  1345. end
  1346. end
  1347.  
  1348.  
  1349.  
  1350.  
  1351. local ABS = math.abs;
  1352. local SIN = math.sin;
  1353. local ASIN = math.asin;
  1354. local COS = math.cos;
  1355.  
  1356. local new = Instance.new;
  1357.  
  1358. function math_pos(float)
  1359. if float < 0 then float = 0 end
  1360. return float
  1361. end
  1362. function math_neg(float)
  1363. if float > 0 then float = 0 end
  1364. return float
  1365. end
  1366. function math_max(float, max)
  1367. if float > max then float = max end
  1368. return float
  1369. end
  1370. function math_min(float, min)
  1371. if float > min then float = min end
  1372. return float
  1373. end
  1374.  
  1375. function SharpSin(double_p1)
  1376. return ASIN(SIN(double_p1));
  1377. end
  1378.  
  1379. local Storage = Instance.new("Model", script);
  1380.  
  1381. function WeldP(part0, part1, C0, C1)
  1382. local W = new("Weld", Storage);
  1383. W.Part0 = part0;
  1384. W.Part1 = part1;
  1385. W.C0 = C0 or CFrame.new();
  1386. W.C1 = C1 or CFrame.new();
  1387. return W;
  1388. end
  1389.  
  1390. function Bevel(part, sizeV3)
  1391. local BvlMesh = new("SpecialMesh", part)
  1392. BvlMesh.MeshId = "rbxasset://fonts/torso.mesh";
  1393. if (sizeV3 ~= nil) then
  1394. BvlMesh.Scale = Vector3.new(sizeV3.x/2, sizeV3.y/2, sizeV3.z);
  1395. else
  1396. BvlMesh.Scale = Vector3.new(part.Size.x/2, part.Size.y/2, part.Size.z);
  1397. end
  1398. end
  1399.  
  1400.  
  1401.  
  1402. local Scale = 0.5 -- 1 is size of a robloxian (mostly);
  1403.  
  1404. Storage.Name = "ä";
  1405.  
  1406. local BasePart = new("Part");
  1407. BasePart.FormFactor = "Custom";
  1408. BasePart.TopSurface = 10;
  1409. BasePart.BottomSurface = 10;
  1410. BasePart.LeftSurface = 10;
  1411. BasePart.RightSurface = 10;
  1412. BasePart.FrontSurface = 10;
  1413. BasePart.BackSurface = 10;
  1414.  
  1415. local CylPart = new("Part");
  1416. CylPart.FormFactor = "Custom";
  1417. CylPart.TopSurface = 10;
  1418. CylPart.BottomSurface = 10;
  1419. CylPart.LeftSurface = 10;
  1420. CylPart.RightSurface = 10;
  1421. CylPart.FrontSurface = 10;
  1422. CylPart.BackSurface = 10;
  1423. new("CylinderMesh", CylPart);
  1424.  
  1425. local TopFrame = BasePart:clone()
  1426. TopFrame.Parent = Storage;
  1427. TopFrame.Size = Vector3.new(3.5*Scale, 1.5*Scale, 3.5*Scale);
  1428. TopFrame.BrickColor = TeamColor;
  1429.  
  1430. new("CylinderMesh", TopFrame);
  1431.  
  1432. local Screw = CylPart:clone();
  1433. Screw.Parent = Storage;
  1434. Screw.Size = Vector3.new(.3*Scale, 1.6*Scale, .3*Scale);
  1435. Screw.BrickColor = BrickColor.new(199);
  1436.  
  1437. local CGreyStyle = CylPart:clone()
  1438. CGreyStyle.Parent = Storage;
  1439. CGreyStyle.Size = Vector3.new(2.2*Scale, 1.52*Scale, 2.6*Scale);
  1440. CGreyStyle.BrickColor = BrickColor.new(199);
  1441.  
  1442. local TurretCasing = BasePart:clone();
  1443. TurretCasing.Size = Vector3.new(2.2*Scale, 1.4*Scale, 5.6*Scale);
  1444. TurretCasing.BrickColor = BrickColor.new(199);
  1445. TurretCasing.Parent = Storage;
  1446.  
  1447. Bevel(TurretCasing);
  1448.  
  1449. local TurretFront = BasePart:clone();
  1450. TurretFront.Size = Vector3.new(1.7*Scale, 1*Scale, .2*Scale);
  1451. TurretFront.BrickColor = TeamColor;
  1452. TurretFront.Parent = Storage;
  1453.  
  1454. local Barrel = CylPart:clone();
  1455. Barrel.Parent = Storage;
  1456. Barrel.Size = Vector3.new(.7*Scale, .4*Scale, .7*Scale);
  1457. Barrel.BrickColor = BrickColor.Black();
  1458.  
  1459.  
  1460. local Particle = Instance.new("ParticleEmitter", Barrel);
  1461. Particle.VelocitySpread = 30;
  1462. Particle.LightEmission = 200;
  1463.  
  1464. local Colors = {Color3.new(1,.5,0), Color3.new(1,.7,0), Color3.new(1,.9,0);}
  1465.  
  1466. Particle.Size = NumberSequence.new(.05,.07);
  1467.  
  1468. Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]);
  1469. Particle.Texture = "rbxassetid://252350680";
  1470. Particle.RotSpeed = NumberRange.new(10,70);
  1471. Particle.Rate = 300;
  1472. Particle.Speed = NumberRange.new(15);
  1473. Particle.Transparency = NumberSequence.new(0,1);
  1474. Particle.Lifetime = NumberRange.new(.01,.2);
  1475. Particle.Enabled = false
  1476.  
  1477.  
  1478.  
  1479. local RedDot = BasePart:clone();
  1480. RedDot.Parent = Storage;
  1481. RedDot.Size = Vector3.new(.2*Scale, .2*Scale, .2*Scale);
  1482. RedDot.BrickColor = BrickColor.new("Really red");
  1483.  
  1484. local Sphere = Instance.new("SpecialMesh", RedDot);
  1485. Sphere.MeshType = "Sphere";
  1486. Sphere.Scale = Vector3.new(1*Scale,1*Scale,1*Scale);
  1487.  
  1488.  
  1489. Bevel(TurretFront, Vector3.new(1.7*Scale, 1*Scale, .05*Scale));
  1490.  
  1491. local Joint = CylPart:clone();
  1492. Joint.Parent = Storage;
  1493. Joint.Size = Vector3.new(.7*Scale, 2*Scale, .7*Scale);
  1494. Joint.BrickColor = BrickColor.Black();
  1495.  
  1496. local Hold = BasePart:clone();
  1497. Hold.Parent = Storage;
  1498. Hold.BrickColor = BrickColor.Black();
  1499. Hold.Size = Vector3.new(2.2*Scale, .2*Scale, .75*Scale);
  1500.  
  1501. local Bolt = BasePart:clone();
  1502. Bolt.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale);
  1503. Bolt.Parent = Storage;
  1504. Bolt.BrickColor = BrickColor.Black();
  1505.  
  1506. local Bolt2 = BasePart:clone();
  1507. Bolt2.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale);
  1508. Bolt2.Parent = Storage;
  1509. Bolt2.BrickColor = BrickColor.Black();
  1510.  
  1511.  
  1512. local TurretToFrame = WeldP(TopFrame, TurretCasing, CFrame.new(0, 0, 1.4*Scale));
  1513. WeldP(TopFrame, CGreyStyle);
  1514. WeldP(TurretCasing, TurretFront, CFrame.new(0, 0, 2.8*Scale));
  1515. WeldP(TopFrame, Screw);
  1516. local BarrelWeld = WeldP(Barrel, TurretFront, CFrame.new(.3*Scale, -.2*Scale, 0), CFrame.Angles(math.pi/2, 0, 0));
  1517.  
  1518. WeldP(RedDot, TurretFront, CFrame.new(-.55*Scale, 0, -.15*Scale), CFrame.Angles(math.pi/2, 0, 0));
  1519.  
  1520. local RotateAxisY = WeldP(Bolt, TurretCasing, CFrame.Angles(0,0,0), CFrame.new(1.1*Scale, -.75*Scale, 1*Scale));
  1521.  
  1522. WeldP(Bolt, Hold, CFrame.new(-1.1*Scale, -.5*Scale, 0));
  1523.  
  1524. WeldP(Bolt2, Hold, CFrame.new(1.1*Scale, -.5*Scale, 0));
  1525.  
  1526. local RotateAxisX = WeldP(Hold, Joint, CFrame.new(0, -1*Scale, 0));
  1527.  
  1528.  
  1529.  
  1530. local Leg1 = BasePart:clone();
  1531. Leg1.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
  1532. Leg1.Parent = Storage;
  1533. Leg1.BrickColor = BrickColor.Black();
  1534.  
  1535.  
  1536. WeldP(Leg1, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.75*Scale, 0) * CFrame.Angles(math.pi/3, 0, math.pi));
  1537.  
  1538.  
  1539. local Leg2 = BasePart:clone();
  1540. Leg2.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
  1541. Leg2.Parent = Storage;
  1542. Leg2.BrickColor = BrickColor.Black();
  1543.  
  1544.  
  1545. WeldP(Leg2, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.45*Scale, 0) * CFrame.Angles(-math.pi/4, 0, math.pi + -math.pi/6));
  1546.  
  1547.  
  1548. local Leg3 = BasePart:clone();
  1549. Leg3.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
  1550. Leg3.Parent = Storage;
  1551. Leg3.BrickColor = BrickColor.Black();
  1552.  
  1553.  
  1554. WeldP(Leg3, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.45*Scale, 0) * CFrame.Angles(-math.pi/4, 0, math.pi + math.pi/6));
  1555.  
  1556. for i,v in pairs(Storage:children()) do
  1557. if v.Name== "Part" then
  1558. trans = 1
  1559. v.Transparency = 1
  1560. end
  1561. end
  1562.  
  1563. local InvisiBox = BasePart:clone();
  1564. InvisiBox.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0);
  1565. InvisiBox.Parent = Storage;
  1566. InvisiBox.Transparency = 1
  1567. InvisiBox.Name = 'box'
  1568. WeldP(InvisiBox, Joint, CFrame.new(0, -.2*Scale, .97*Scale));
  1569.  
  1570. local InvisiBox2 = BasePart:clone();
  1571. InvisiBox2.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0);
  1572. InvisiBox2.Parent = Arms;
  1573. InvisiBox2.Transparency = .9
  1574. InvisiBox2.Name = 'box'
  1575. InvisiBox2.CanCollide = false
  1576. InvisiBox2.BrickColor = TeamColor
  1577. InvisiBox2.Material = 'Neon'
  1578. WeldP(InvisiBox2, Joint, CFrame.new(0, -1.2*Scale, .97*Scale));
  1579.  
  1580. InvisiBox.CFrame = torso.CFrame * CFrame.new(0, 5.5*Scale, -2.9) * CFrame.Angles(0, math.pi, 0);
  1581.  
  1582. local Action = "Idle";
  1583.  
  1584. local Target = nil;
  1585.  
  1586. wait(1)
  1587.  
  1588. InvisiBox.Anchored = true
  1589.  
  1590. for i,v in pairs(Storage:children()) do
  1591. if v:IsA'Part' then
  1592. v.Locked = true
  1593. end
  1594. end
  1595. --//
  1596. --// SOUNDS
  1597. --//
  1598. for i,v in pairs(Storage:children()) do
  1599. if v.Name== "Part" then
  1600. trans = 1
  1601. v.Transparency = 1
  1602. end
  1603. end
  1604. for i,v in pairs(Storage:children()) do
  1605. if v.Name== "Part" then
  1606. trans = 1
  1607. v.Transparency = 1
  1608. for i = 1,11 do
  1609.  
  1610. trans = trans - .1
  1611. v.Transparency = trans
  1612. wait()
  1613. end
  1614. end
  1615. end
  1616. trans = 1
  1617.  
  1618. local OnFind = new("Sound", TopFrame);
  1619. OnFind.SoundId = "rbxassetid://10209260"
  1620. OnFind.Volume = 1
  1621.  
  1622.  
  1623. local OnFire = new("Sound", TopFrame);
  1624. OnFire.SoundId = "rbxassetid://10209257"
  1625. OnFire.Volume = 1
  1626.  
  1627. local OnEmpty = new("Sound", TopFrame);
  1628. OnEmpty.SoundId = "rbxassetid://10209225"
  1629. OnEmpty.Volume = 1
  1630.  
  1631. local Scanning = new("Sound", TopFrame);
  1632. Scanning.SoundId = "rbxassetid://258704234"
  1633. Scanning.Volume = 1
  1634.  
  1635. local Explode = new("Sound", TopFrame);
  1636. Explode.SoundId = "rbxassetid://10209236"
  1637. Explode.Volume = .5
  1638.  
  1639. local Move = new("Sound", TopFrame);
  1640. Move.SoundId = "rbxassetid://258704467";
  1641. Move.Volume = 1;
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647. function FindShortest(Table)
  1648. local Current = Table[1]
  1649. local Final
  1650. for _,v in pairs(Table) do
  1651. if v[2] ~= Current[2] then
  1652. if v[1] < Current[1] then
  1653. Current = v
  1654. end
  1655. end
  1656. end
  1657. Final = Current
  1658. return Final
  1659. end
  1660.  
  1661. function GetNearbyPlayer()
  1662.  
  1663. local List = {}
  1664. for i,v in pairs(workspace:children()) do
  1665. if (v ~= nil) then
  1666. if (v:IsA'Model') then
  1667. if (v:findFirstChild'Torso' ~= nil) then
  1668. local rx, ry, rz = Hold.CFrame:toEulerAnglesXYZ();
  1669. if (v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude < 20 then
  1670. if (v ~= char) then
  1671. for x,z in next, v:children() do
  1672. if z:IsA'Humanoid' and z.Health > 0.01 then
  1673. table.insert(List, {(v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude, v})
  1674. end
  1675. end
  1676. end
  1677. end
  1678. end
  1679. end
  1680. end
  1681. end
  1682. if (FindShortest(List) ~= nil) then
  1683. return FindShortest(List)[2];
  1684. else
  1685. return nil;
  1686. end
  1687. end
  1688.  
  1689. local Health = Instance.new("Humanoid", Storage);
  1690. Health.MaxHealth = 150;
  1691. Health.Health = 150;
  1692.  
  1693.  
  1694.  
  1695. function RayC(Part, speed)
  1696. coroutine.wrap(function()
  1697. local Visual = BasePart:clone();
  1698. Visual.FormFactor = "Custom";
  1699. Visual.BrickColor = BrickColor.Yellow();
  1700. Visual.Size = Vector3.new(.2, 3, .2);
  1701. Visual.CFrame = Part.CFrame * CFrame.new(0, -1, 0);
  1702. Visual.Anchored = true;
  1703. Visual.CanCollide = false;
  1704. Visual.Locked = true
  1705.  
  1706.  
  1707. coroutine.wrap(function()
  1708.  
  1709. wait(.2)
  1710.  
  1711. wait(.1);
  1712. wait(.3)
  1713.  
  1714. end)()
  1715.  
  1716. Instance.new("SpecialMesh", Visual).MeshType = "Sphere";
  1717. Visual.Mesh.Scale = Vector3.new(.5, 1, .5);
  1718.  
  1719. local bulletpos = Visual.Position
  1720. local bulletvelocity = (Part.CFrame.p - bulletpos).unit*speed
  1721. local lastbulletpos = Visual.Position
  1722. Visual.Parent = Storage;
  1723. while game:service'RunService'.Stepped:wait() do
  1724.  
  1725. lastbulletpos = bulletpos
  1726. bulletpos = bulletpos + bulletvelocity
  1727. local RayCast = Ray.new(lastbulletpos, (bulletpos - lastbulletpos))
  1728. local hit, hitpos = workspace:FindPartOnRay(RayCast, Storage, false, true)
  1729. if (Joint.Position - Visual.Position).magnitude > 1000 or Visual.Parent == nil then
  1730. Visual:Destroy();
  1731. break
  1732. end
  1733. Visual.Anchored = true
  1734. Visual.CFrame = CFrame.new(bulletpos, bulletpos+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0);
  1735. if hit then
  1736. if hit.Parent:IsA'Hat' then
  1737. if hit.Parent.Parent:IsA'Model' then
  1738. for x,z in next, hit.Parent.Parent:children() do
  1739. if z:IsA'Humanoid' then
  1740. z:TakeDamage(math.random(8,12));
  1741. end
  1742. end
  1743. end
  1744. else
  1745. if hit.Parent:IsA'Model' then
  1746. for x,z in next, hit.Parent:children() do
  1747. if z:IsA'Humanoid' then
  1748. z:TakeDamage(math.random(8,12));
  1749. end
  1750. end
  1751. end
  1752. end
  1753.  
  1754. Visual:Destroy();
  1755. break
  1756. end
  1757. end
  1758. end)()
  1759. end
  1760.  
  1761. lastTick = tick();
  1762. local db = false;
  1763. game:service'RunService'.RenderStepped:connect(function()
  1764. if Action == "DEAD" then return end;
  1765.  
  1766.  
  1767. if not Wrangler then
  1768. --//
  1769. --// AUTOMATED MODE, MOTION SENSOR WILL DETECT MOVEMENT
  1770. --//
  1771.  
  1772.  
  1773. --//
  1774. --// IF PLAYER USED WRANGLER, THERE IS A SHIELD WICH MUST BE REMOVED
  1775. --//
  1776.  
  1777. if (Storage:findFirstChild'Shield') then
  1778. Storage:findFirstChild'Shield':Destroy();
  1779. end
  1780.  
  1781. local LastTarget = Target;
  1782.  
  1783. --//
  1784. --// CHECK FOR NEARBY ENEMIES
  1785. --//
  1786. local Player = GetNearbyPlayer();
  1787. Target = Player;
  1788.  
  1789. --//
  1790. --// BEEP ON TARGET FOUND
  1791. --//
  1792. if (Target ~= LastTarget and Target ~= nil) then
  1793. Move.Pitch = 0.9 + math.random()/9;
  1794. Move:play();
  1795. OnFind:play();
  1796. Action = "Standby";
  1797. end
  1798.  
  1799. --//
  1800. --// IDLE
  1801. --//
  1802. if Action == "Idle" then
  1803. RotateAxisX.C1 = clerp(RotateAxisX.C1, CFrame.Angles(0, SharpSin(tick()*2)*.2, 0), .1);
  1804. RotateAxisY.C0 = clerp(RotateAxisY.C0, CFrame.new(), .1);
  1805. end
  1806.  
  1807.  
  1808. --//
  1809. --// SENTRY DEAD
  1810. --//
  1811.  
  1812. --//
  1813. --// IF PLAYER EXISTS, FIRE!
  1814. --//
  1815.  
  1816.  
  1817.  
  1818. if Action == "Standby" then
  1819. pcall(function()
  1820. local tor = Target.Torso.CFrame.p -- Target CFrame
  1821. local direction = InvisiBox.CFrame.lookVector -- Direction handling, welds mess up, just a workaround.
  1822. local heading = math.atan2(direction.x, direction.z)--
  1823. local RotY = math.deg(heading)
  1824. if RotY < 0 then
  1825. RotY = (360 - math.abs(RotY));
  1826. end
  1827. RotateAxisX.C1 = --Begin here
  1828. clerp(RotateAxisX.C1,
  1829. CFrame.new(
  1830.  
  1831. Vector3.new(), --The Pivot0 of pointing the weld.
  1832. Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here
  1833.  
  1834. * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0),
  1835. .1
  1836. );
  1837.  
  1838. local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0)
  1839. local RX, RY, RZ = Point:toEulerAnglesXYZ()
  1840. if math.deg(RX) > 45 then
  1841. RX = math.rad(45)
  1842. elseif math.deg(RX) < -55 then
  1843. RX = math.rad(-55)
  1844. end
  1845. RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1)
  1846.  
  1847. end)
  1848. end
  1849. if Action == "Fire" then
  1850. pcall(function()
  1851. local tor = Target.Torso.CFrame.p;
  1852. local direction = InvisiBox.CFrame.lookVector
  1853. local heading = math.atan2(direction.x, direction.z)
  1854. local RotY = math.deg(heading)
  1855. if RotY < 0 then
  1856. RotY = (360 - math.abs(RotY));
  1857. end
  1858. RotateAxisX.C1 = --Begin here
  1859. clerp(RotateAxisX.C1,
  1860. CFrame.new(
  1861.  
  1862. Vector3.new(), --The Pivot0 of pointing the weld.
  1863. Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here
  1864.  
  1865. * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0),
  1866. .1
  1867. );
  1868.  
  1869. BarrelWeld.C0 = clerp(BarrelWeld.C0, CFrame.new())
  1870. local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0)
  1871. local RX, RY, RZ = Point:toEulerAnglesXYZ()
  1872. if math.deg(RX) > 45 then
  1873. RX = math.rad(45)
  1874. elseif math.deg(RX) < -55 then
  1875. RX = math.rad(-55)
  1876. end
  1877. RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1)
  1878. end)
  1879. end
  1880.  
  1881. if (Target ~= nil) then
  1882. if Action == "Fire" or db then return end
  1883. if Action == "Standby" then
  1884. db = true
  1885. wait(.2);
  1886. end
  1887. Action = "Fire";
  1888. db = false
  1889. OnFire:play();
  1890.  
  1891. Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]);
  1892.  
  1893. local PointLight = Instance.new("PointLight", Barrel);
  1894. PointLight.Color = Color3.new(1,.8,0)
  1895. PointLight.Brightness = 6;
  1896. Particle.Enabled = true
  1897. game:service'Debris':AddItem(PointLight, .05);
  1898.  
  1899.  
  1900.  
  1901. RayC(Barrel, 20)
  1902.  
  1903.  
  1904.  
  1905.  
  1906. wait(.1)
  1907. Particle.Enabled = false
  1908. if (Target ~= nil) then
  1909. Action = "Standby";
  1910. else
  1911. Action = "Idle";
  1912. end
  1913. end
  1914.  
  1915. if tick() - lastTick > 2.5 and Target == nil then
  1916. lastTick = tick();
  1917. Scanning:play();
  1918. end
  1919. end
  1920.  
  1921. if (Health.Health < 0.0001 or RotateAxisX.Parent == nil) then
  1922. Action = "DEAD";
  1923. if db then return end
  1924. RotateAxisY:Destroy();
  1925. TurretToFrame:Destroy();
  1926. Joint:Destroy();
  1927. InvisiBox2:Destroy();
  1928. db = true
  1929. local expl = Instance.new("Explosion", Storage);
  1930.  
  1931. expl.BlastRadius = .3;
  1932. expl.BlastPressure = 2050000;
  1933. expl.Position = TopFrame.Position;
  1934. Explode:Play()
  1935. NoSentry = true
  1936. game:service'Debris':AddItem(Storage, 3);
  1937.  
  1938. end
  1939.  
  1940. end)
  1941. end
  1942.  
  1943.  
  1944.  
  1945. combo = 0
  1946. function strike(hit)
  1947. if hit and hit.Parent and hit.Parent.Name ~= char.Name then
  1948. local targetHumanoid = hit.Parent:FindFirstChild("Humanoid")
  1949. if targetHumanoid and targetHumanoid ~= char:FindFirstChild("Humanoid") then
  1950. if combo == 1 then
  1951. targetHumanoid:TakeDamage(slashDamage)
  1952. SwingH:Play()
  1953.  
  1954. end
  1955.  
  1956.  
  1957.  
  1958. end
  1959. end
  1960. end
  1961.  
  1962.  
  1963.  
  1964. Reaper5.Touched:connect(strike)
  1965. --------------------------------------------------------------------------------------------------------------------------
  1966. function AnimSit()
  1967. for i = 0, 1, 0.05 do
  1968.  
  1969. swait()
  1970. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  1971. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  1972. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
  1973. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(5)), 0.1)
  1974. RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  1975. LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1)
  1976. end
  1977.  
  1978. end
  1979.  
  1980. function AnimSitHit1()
  1981. for i = 0, 1, 0.05 do
  1982.  
  1983. swait()
  1984. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1985. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  1986. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
  1987. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(-5)), 0.08)
  1988. RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(10)), .1)
  1989. LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(50)), .1)
  1990. end
  1991.  
  1992. end
  1993.  
  1994.  
  1995. function AnimSitHit2()
  1996. for i = 0, 1, 0.05 do
  1997.  
  1998. swait()
  1999. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2000. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(15), math.rad(0), math.rad(0)), .1)
  2001. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
  2002. RW.C0 = clerp(RW.C0, CFrame.new(1.55, 0.4, -.1) * angles(math.rad(40), math.rad(3 ), math.rad(-15)), 0.3)
  2003. RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2004. LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1)
  2005. end
  2006.  
  2007. end
  2008. --------------------------------------------------------------------------------------------------------------------------
  2009.  
  2010. function No1()
  2011. for i = 0, 1, 0.05 do
  2012.  
  2013. swait()
  2014. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2015. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(30), math.rad(0), math.rad(40)), .1)
  2016. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2017. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2018. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2019. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2020. end
  2021.  
  2022. end
  2023.  
  2024.  
  2025.  
  2026. function No2()
  2027. for i = 0, 1, 0.05 do
  2028.  
  2029. swait()
  2030. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2031. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-40)), .1)
  2032. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2033. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2034. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2035. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2036. end
  2037.  
  2038. end
  2039.  
  2040.  
  2041.  
  2042. --------------------------------------------------------------------------------------------------------------------------
  2043.  
  2044. function Yes1()
  2045. for i = 0, 1, 0.1 do
  2046.  
  2047. swait()
  2048. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2049. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(25), math.rad(0), math.rad(0)), .1)
  2050. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2051. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2052. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2053. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2054. end
  2055.  
  2056. end
  2057.  
  2058.  
  2059.  
  2060. function Yes2()
  2061. for i = 0, 1, 0.1 do
  2062.  
  2063. swait()
  2064. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2065. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  2066. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2067. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2068. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2069. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2070. end
  2071.  
  2072. end
  2073.  
  2074.  
  2075.  
  2076. --------------------------------------------------------------------------------------------------------------------------
  2077. function AttackAnim1()
  2078. for i = 0, 1, 0.05 do
  2079. swait()
  2080. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  2081. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  2082. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(10)), 0.08)
  2083. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(40), math.rad(0), math.rad(10)), 0.3)
  2084. if Torsovelocity > 2 then
  2085. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  2086. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  2087. elseif Torsovelocity < 1 then
  2088. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1)
  2089. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1)
  2090. end
  2091. end
  2092. end
  2093.  
  2094.  
  2095. function AttackAnim2()
  2096. for i = 0, 1, 0.05 do
  2097. swait()
  2098. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), .2)
  2099. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  2100. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(10), math.rad(-10)), 0.25)
  2101. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3)
  2102. if Torsovelocity > 2 then
  2103. RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  2104. LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  2105.  
  2106. elseif Torsovelocity < 1 then
  2107. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1)
  2108. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1)
  2109. end
  2110. end
  2111. end
  2112. --------------------------------------------------------------------------------------------------------------------------
  2113.  
  2114.  
  2115.  
  2116. function ShotAttackAnim1()
  2117. for i = 0, 1, 0.07 do
  2118. swait()
  2119.  
  2120. if Torsovelocity > 2 then
  2121. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
  2122. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  2123. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(90), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.2)
  2124. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(85 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.2)
  2125. RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2126. LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2127.  
  2128.  
  2129.  
  2130. elseif Torsovelocity < 1 then
  2131.  
  2132.  
  2133. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2134. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2135. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(90), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.2)
  2136. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(85 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.2)
  2137. RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2138. LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2139.  
  2140.  
  2141. end
  2142. end
  2143. end
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149. function ShotAttackAnim2()
  2150. for i = 0, 1, 0.05 do
  2151. swait()
  2152.  
  2153. if Torsovelocity > 2 then
  2154. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
  2155. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  2156. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(100), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
  2157. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(75 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
  2158. RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2159. LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2160.  
  2161.  
  2162.  
  2163. elseif Torsovelocity < 1 then
  2164.  
  2165.  
  2166. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2167. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2168. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(100), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
  2169. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(75 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
  2170. RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2171. LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2172.  
  2173.  
  2174. end
  2175. end
  2176. end
  2177.  
  2178.  
  2179.  
  2180. function ShotAttackAnim3()
  2181. for i = 0, 1, 0.05 do
  2182. swait()
  2183.  
  2184. if Torsovelocity > 2 then
  2185. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
  2186. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  2187. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, -.2) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
  2188. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.6) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-30 - 1 * math.cos(sine / 25))), 0.2)
  2189. RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2190. LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2191.  
  2192.  
  2193.  
  2194. elseif Torsovelocity < 1 then
  2195.  
  2196.  
  2197. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2198. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2199. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, -.2) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
  2200. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.6) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-30 - 1 * math.cos(sine / 25))), 0.2)
  2201. RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2202. LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2203.  
  2204.  
  2205. end
  2206. end
  2207. end
  2208.  
  2209. function ShotAttackAnim4()
  2210. for i = 0, 1, 0.05 do
  2211. swait()
  2212.  
  2213. if Torsovelocity > 2 then
  2214. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
  2215. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  2216. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, 0) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
  2217. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.8) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-50 - 1 * math.cos(sine / 25))), 0.2)
  2218. RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2219. LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2220.  
  2221.  
  2222.  
  2223. elseif Torsovelocity < 1 then
  2224.  
  2225.  
  2226. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2227. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2228. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, 0) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
  2229. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.8) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-50 - 1 * math.cos(sine / 25))), 0.2)
  2230. RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2231. LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2232.  
  2233.  
  2234. end
  2235. end
  2236. end
  2237. --------------------------------------------------------------------------------------------------------------------------
  2238.  
  2239. function DanAni1()
  2240. for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do
  2241.  
  2242. swait()
  2243. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,-.4) * angles(math.rad(5), math.rad(-8), math.rad(0)), MusThingHat.Mesh.Scale.Y*0.2)
  2244. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(MusThingHat.Mesh.Scale.Y*30) +math.rad(-10),0,math.rad(0)),MusThingHat.Mesh.Scale.Y*0.2)
  2245. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.25) * angles(math.rad(170), math.rad(0), math.rad(20)), MusThingHat.Mesh.Scale.Y*0.2)
  2246. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.0) * angles(math.rad(90), math.rad(0), math.rad(-45)), MusThingHat.Mesh.Scale.Y*0.2)
  2247. RH.C0 = clerp(RH.C0, cn(1, -.2, -.4) * RHCF * angles(math.rad(-4), math.rad(-15), math.rad(-5)), MusThingHat.Mesh.Scale.Y*0.3)
  2248. LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(4), math.rad(5), math.rad(5)), MusThingHat.Mesh.Scale.Y*0.2)
  2249. end
  2250.  
  2251. end
  2252.  
  2253.  
  2254.  
  2255. function DanAni2()
  2256. for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do
  2257.  
  2258. swait()
  2259. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,-.5) * angles(math.rad(8), math.rad(8), math.rad(0)), MusThingHat.Mesh.Scale.Y*0.2)
  2260. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(MusThingHat.Mesh.Scale.Y*30) +math.rad(-10),0,math.rad(0)),MusThingHat.Mesh.Scale.Y*0.2)
  2261. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.25) * angles(math.rad(180), math.rad(0), math.rad(25)), MusThingHat.Mesh.Scale.Y*0.2)
  2262. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.0) * angles(math.rad(0), math.rad(0), math.rad(45)), MusThingHat.Mesh.Scale.Y*0.2)
  2263. RH.C0 = clerp(RH.C0, cn(1, -1, -.0) * RHCF * angles(math.rad(4), math.rad(-5), math.rad(-8)), MusThingHat.Mesh.Scale.Y*0.2)
  2264. LH.C0 = clerp(LH.C0, cn(-1, -.2, -.4) * LHCF * angles(math.rad(-4), math.rad(15), math.rad(8)), MusThingHat.Mesh.Scale.Y*0.3)
  2265. end
  2266.  
  2267.  
  2268. end
  2269.  
  2270.  
  2271.  
  2272. --------------------------------------------------------------------------------------------------------------------------
  2273.  
  2274. BuildNow = false
  2275.  
  2276. Shotuse = false
  2277.  
  2278. wait2 = false
  2279.  
  2280. mouse.KeyDown:connect(function(key)
  2281.  
  2282. if key == "g" and attack == false then
  2283. yes:Play()
  2284. head.face.Texture = "http://www.roblox.com/asset/?id=346556360"
  2285. humanoid.WalkSpeed = 0
  2286. attack = true
  2287. Yes1()
  2288. Yes2()
  2289. Yes1()
  2290. Yes2()
  2291. attack = false
  2292. humanoid.WalkSpeed = 16
  2293. head.face.Texture = "http://www.roblox.com/asset/?id=1077399124"
  2294. end
  2295. end)
  2296.  
  2297.  
  2298. mouse.KeyDown:connect(function(key)
  2299. if key == "e" and attack == false then
  2300. if Wep == 1 then
  2301. Wep = 2
  2302. else
  2303. Wep = 1
  2304. end
  2305.  
  2306.  
  2307. end
  2308. end)
  2309.  
  2310. mouse.KeyDown:connect(function(key)
  2311. if key == "p" and attack == false then
  2312.  
  2313. Wep = 3
  2314.  
  2315.  
  2316.  
  2317. end
  2318. end)
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331. equippedgun = true
  2332.  
  2333.  
  2334.  
  2335.  
  2336. coroutine.wrap(function()
  2337. while equippedgun do
  2338.  
  2339. if spread < 0 then spread = 0 end
  2340. if humanoid.Health == 0 then break end
  2341.  
  2342.  
  2343. game:service'RunService'.Stepped:wait()
  2344. end
  2345. end)()
  2346.  
  2347. mouse.Button1Down:connect(function()
  2348. if debounce then return end
  2349. if equippedgun2 == true and attack == false then
  2350. Shotuse = true
  2351. debounce = true
  2352.  
  2353. wait(.2)
  2354.  
  2355. sound:play()
  2356.  
  2357.  
  2358.  
  2359. coroutine.wrap(function()
  2360. wait(0.3)
  2361. for angle = 0, 4 do
  2362.  
  2363. wait()
  2364. end
  2365.  
  2366. wait(0.2)
  2367. sound2:play()
  2368.  
  2369.  
  2370. wait(0.1)
  2371. for move = 0, 3 do
  2372. if move > 2 then return end
  2373.  
  2374.  
  2375. wait(0.06)
  2376. end
  2377. end)()
  2378. spread = spread + 1
  2379. coroutine.wrap(function()
  2380. for bullitz = 0, 7 do
  2381. if bullitz > 6 then return end
  2382. rayCast2(300, 1, Reaper4)
  2383. GunParticle.Enabled = true
  2384. local PointLight = Instance.new("PointLight", Reaper4);
  2385. PointLight.Color = Color3.new(.2,.2,0)
  2386. PointLight.Brightness = 2;
  2387. game:service'Debris':AddItem(PointLight, .05);
  2388. end
  2389. end)()
  2390. coroutine.wrap(function()
  2391. for _ = 0, 50 do
  2392. pcall(function()
  2393. spread = spread - 0.03
  2394. end)
  2395. wait()
  2396. end
  2397. end)()
  2398. wait(1)
  2399. debounce = false
  2400. end
  2401.  
  2402. end)
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412. mouse.Button1Down:connect(function(key)
  2413.  
  2414. if attack == false and Wep == 1 then
  2415. attack = true
  2416.  
  2417. AttackAnim1()
  2418. combo = 1
  2419. Swing:Play()
  2420. AttackAnim2()
  2421. attack = false
  2422. combo = 0
  2423. end
  2424. end)
  2425.  
  2426.  
  2427.  
  2428. mouse.KeyDown:connect(function(key)
  2429.  
  2430. if key == "f" and attack == false then
  2431. No:Play()
  2432. humanoid.WalkSpeed = 0
  2433. attack = true
  2434. No1()
  2435. No2()
  2436. attack = false
  2437. humanoid.WalkSpeed = 16
  2438. end
  2439. end)
  2440.  
  2441.  
  2442.  
  2443.  
  2444. mouse.KeyDown:connect(function(key)
  2445. if attack == false or DA == true then
  2446. if key == "r" and Wep == 3 then
  2447.  
  2448. if DA == false then
  2449. DA = true
  2450. RUS:Play()
  2451. attack=true
  2452. humanoid.WalkSpeed = 0
  2453. head.face.Texture = "http://www.roblox.com/asset/?id=246592748"
  2454. else
  2455. DA = false
  2456. RUS:Stop()
  2457. attack=false
  2458. humanoid.WalkSpeed = 16
  2459. head.face.Texture = "http://www.roblox.com/asset/?id=1077399124"
  2460. end
  2461. end
  2462. end
  2463. end)
  2464.  
  2465.  
  2466.  
  2467. mouse.KeyDown:connect(function(key)
  2468.  
  2469. if key == "t" and attack == false then
  2470. Taunt:Play()
  2471. humanoid.WalkSpeed = 0
  2472. attack = true
  2473. No1()
  2474. Yes2()
  2475. attack = false
  2476. humanoid.WalkSpeed = 16
  2477. end
  2478. end)
  2479.  
  2480. mouse.KeyDown:connect(function(key)
  2481. if key == "z" then
  2482.  
  2483.  
  2484.  
  2485. if NoSentry == false and attack == false and wait2 == false then
  2486. wait2 = true
  2487. for i,v in pairs(script:children()) do
  2488. if (v:IsA'Model') then
  2489.  
  2490.  
  2491. for i,v in pairs(v:children()) do
  2492. if (v:IsA'Humanoid') then
  2493. v.Health = 0
  2494. end
  2495. end
  2496.  
  2497.  
  2498. end
  2499.  
  2500. NoSentry = true
  2501.  
  2502. end
  2503.  
  2504.  
  2505.  
  2506. end
  2507.  
  2508.  
  2509.  
  2510. if NoSentry == true and attack == false and wait2 == false and Wep == 1 then
  2511. attack = true
  2512. wait2 = true
  2513. humanoid.WalkSpeed = 0
  2514. AnimSit()
  2515. AnimSitHit1()
  2516. WSH = WSHM[math.random(1,#WSHM)]
  2517. HitM.SoundId = "rbxassetid://"..WSH
  2518. HitM:Play()
  2519. BuildNow = true
  2520. AnimSitHit2()
  2521. AnimSitHit1()
  2522. WSH = WSHM[math.random(1,#WSHM)]
  2523. HitM.SoundId = "rbxassetid://"..WSH
  2524. HitM:Play()
  2525. AnimSitHit2()
  2526. AnimSitHit1()
  2527. WSH = WSHM[math.random(1,#WSHM)]
  2528. HitM.SoundId = "rbxassetid://"..WSH
  2529. HitM:Play()
  2530. AnimSitHit2()
  2531. AnimSitHit1()
  2532. WSH = WSHM[math.random(1,#WSHM)]
  2533. HitM.SoundId = "rbxassetid://"..WSH
  2534. HitM:Play()
  2535. AnimSitHit2()
  2536. AnimSitHit1()
  2537. WSH = WSHM[math.random(1,#WSHM)]
  2538. HitM.SoundId = "rbxassetid://"..WSH
  2539. HitM:Play()
  2540. AnimSitHit2()
  2541. AnimSitHit1()
  2542. WSH = WSHM[math.random(1,#WSHM)]
  2543. HitM.SoundId = "rbxassetid://"..WSH
  2544. HitM:Play()
  2545. AnimSitHit2()
  2546. AnimSitHit1()
  2547. WSH = WSHM[math.random(1,#WSHM)]
  2548. HitM.SoundId = "rbxassetid://"..WSH
  2549. HitM:Play()
  2550. AnimSitHit2()
  2551. AnimSitHit1()
  2552. WSH = WSHM[math.random(1,#WSHM)]
  2553. HitM.SoundId = "rbxassetid://"..WSH
  2554. HitM:Play()
  2555. AnimSitHit2()
  2556. AnimSitHit1()
  2557. WSH = WSHM[math.random(1,#WSHM)]
  2558. HitM.SoundId = "rbxassetid://"..WSH
  2559. HitM:Play()
  2560. AnimSitHit2()
  2561. AnimSitHit1()
  2562. WSH = WSHM[math.random(1,#WSHM)]
  2563. HitM.SoundId = "rbxassetid://"..WSH
  2564. HitM:Play()
  2565. AnimSitHit2()
  2566. AnimSit()
  2567.  
  2568. humanoid.WalkSpeed = 16
  2569. attack = false
  2570. NoSentry = false
  2571.  
  2572. end
  2573. wait()
  2574.  
  2575. wait2 = false
  2576. end end)
  2577.  
  2578.  
  2579.  
  2580. humanoid.Died:connect(function()
  2581. Arms:Destroy()
  2582. end)
  2583.  
  2584. print([[
  2585.  
  2586.  
  2587. ----------------------------------------
  2588. Tf2 Engineer Class
  2589. ----------------------------------------
  2590. Script by: 123jl123
  2591. Sentry by: Madiik
  2592. TheBoozled gave me a Mesh and Sounds from tf2
  2593. edited by GAMEKILLERTOY
  2594. ----------------------------------------
  2595. Dont leak and dont do it.....
  2596. ----------------------------------------
  2597. ]])
  2598.  
  2599. game:GetService("RunService"):BindToRenderStep("ew", 0, function()
  2600. MusThingHat.Mesh.Scale = Vector3.new(MusThingHat.Mesh.Scale.X, RUS.PlaybackLoudness / 160, MusThingHat.Mesh.Scale.Z)
  2601. end)
  2602.  
  2603. local mesh1anan = Instance.new("SpecialMesh")
  2604. mesh1anan.MeshType = Enum.MeshType.FileMesh
  2605. mesh1anan.Scale = Vector3.new(.5,.5,.5)
  2606. mesh1anan.MeshId = "http://www.roblox.com/asset/?id=602885639"
  2607. mesh1anan.TextureId = "http://www.roblox.com/asset/?id=602886463"
  2608.  
  2609. Glow1 = Color3.new(1,1,1)
  2610. Glow2 = Color3.new(0,0,0)
  2611.  
  2612. GlowParticle = Instance.new("ParticleEmitter")
  2613. GlowParticle.LightEmission = 1
  2614.  
  2615. GlowParticle.Size = NumberSequence.new(0,2)
  2616. GlowParticle.Texture = "http://www.roblox.com/asset/?id=52620985"
  2617. GlowParticle.Transparency = NumberSequence.new(0,1)
  2618. GlowParticle.LockedToPart = false
  2619. GlowParticle.Lifetime = NumberRange.new(0.5)
  2620. GlowParticle.Rate= 25
  2621. GlowParticle.Speed =NumberRange.new(0)
  2622.  
  2623.  
  2624. function RainDucks()
  2625. local locationanan = char.Torso.CFrame
  2626. local tacoa = Instance.new("Part")
  2627. tacoa.Size = Vector3.new(.5,.5,.5)
  2628. tacoa.CanCollide = false
  2629. tacoa.RotVelocity = Vector3.new(math.random(0,6),math.random(0,6),math.random(0,6))
  2630. local meshanananan = mesh1anan:clone()
  2631. meshanananan.Parent = tacoa
  2632. meshanananan.Scale = Vector3.new(1,1,1)
  2633. tacoa.CFrame = locationanan * CFrame.new(math.random(-8,8),math.random(10,40),math.random(-8,8))
  2634. tacoa.Parent = workspace
  2635.  
  2636.  
  2637. game:GetService("Debris"):AddItem(tacoa,4)
  2638. local GP = GlowParticle:clone()
  2639. GP.Parent = tacoa
  2640. Glow1 = Color3.new(math.random(), math.random(), math.random())
  2641. GP.Color = ColorSequence.new(Glow1,Glow2)
  2642.  
  2643. end
  2644.  
  2645.  
  2646.  
  2647. --]]
  2648.  
  2649.  
  2650.  
  2651. while true do wait()
  2652. if BuildNow == true then
  2653. BuildNow = false
  2654.  
  2655. BuildSentry()
  2656. end
  2657. if Shotuse == true then
  2658. Shotuse = false
  2659. attack = true
  2660. ShotAttackAnim1()
  2661. GunParticle.Enabled = false
  2662. ShotAttackAnim2()
  2663. ShotAttackAnim3()
  2664. ShotAttackAnim4()
  2665. ShotAttackAnim3()
  2666. attack = false
  2667. end
  2668.  
  2669.  
  2670.  
  2671.  
  2672. if DA == true then
  2673. DanAni1()
  2674. RainDucks()
  2675. local PointLight = Instance.new("PointLight", Torso);
  2676. PointLight.Color = Color3.new(math.random(), math.random(), math.random())
  2677. PointLight.Brightness = 50;
  2678. PointLight.Range = MusThingHat.Mesh.Scale.Y*10;
  2679. game:service'Debris':AddItem(PointLight, .3);
  2680.  
  2681. DanAni2()
  2682. RainDucks()
  2683. local PointLight = Instance.new("PointLight", Torso);
  2684. PointLight.Color = Color3.new(math.random(), math.random(), math.random())
  2685. PointLight.Brightness = 50;
  2686. PointLight.Range = MusThingHat.Mesh.Scale.Y*10;
  2687. game:service'Debris':AddItem(PointLight, .3);
  2688.  
  2689.  
  2690.  
  2691. end
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement