Advertisement
mohamedbh

ROBLOX (Shootgun) Script

Jun 19th, 2015
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.38 KB | None | 0 0
  1. --Type your name when u see YOURNAMEHERE--
  2. Players = game:GetService("Players")
  3.  
  4. Me = Players.YOURNAMEHERE
  5.  
  6. Char = Me.Character
  7.  
  8. necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  9.  
  10. Asset = "http://www.roblox.com/asset/?id="
  11.  
  12. EffectModel = nil
  13.  
  14. MeleeDmg = 55
  15.  
  16. Accuracy = {Minimum = 2, Maximum = 5.5, Momentum = 2}
  17.  
  18. Selected = false
  19.  
  20. ReloadFlash = false
  21.  
  22. Attacking = false
  23.  
  24. ReloadHold = false
  25.  
  26. Reloading = false
  27.  
  28. Swinging = false
  29.  
  30. Aiming = false
  31.  
  32. ReloadOn = false
  33.  
  34. Debounce = true
  35.  
  36. Hurt = false
  37.  
  38. ModelName = "Weapon"
  39.  
  40. ToolName = "Weapon"
  41.  
  42. Icon = Asset..(58334502)
  43.  
  44.  
  45.  
  46. function ReNew()
  47.  
  48. if EffectModel then
  49.  
  50. if EffectModel.Parent ~= workspace then
  51.  
  52. pcall(function() EffectModel:remove() end)
  53.  
  54. EffectModel = Instance.new("Model",workspace)
  55.  
  56. EffectModel.Name = "Effects"
  57.  
  58. end
  59.  
  60. else
  61.  
  62. EffectModel = Instance.new("Model",workspace)
  63.  
  64. EffectModel.Name = "Effects"
  65.  
  66. end
  67.  
  68. end
  69.  
  70.  
  71.  
  72. Ammunition = {
  73.  
  74. MaxAmmo = 8,
  75.  
  76. Ammo = 0,
  77.  
  78. Ammoleft = 40,
  79.  
  80. }
  81.  
  82.  
  83.  
  84. Images = {
  85.  
  86. Asset..(64291927),
  87.  
  88. Asset..(64291941),
  89.  
  90. Asset..(64291961),
  91.  
  92. Asset..(64291977),
  93.  
  94. }
  95.  
  96.  
  97.  
  98. Sounds = {
  99.  
  100. Fire = {Id = Asset..(2697294), Pitch = 0.92, Volume = 0.8},
  101.  
  102. Reload = {Id = Asset..(2697295), Pitch = 1, Volume = 0.5},
  103.  
  104. Slash = {Id = "rbxasset://sounds//swordslash.wav", Pitch = 1.2, Volume = 0.6},
  105.  
  106. Out = {Id = "rbxasset://sounds\\clickfast.wav", Pitch = 1.4, Volume = 0.6},
  107.  
  108. Hit = {Id = Asset..(10209590), Pitch = 1.1, Volume = 0.45},
  109.  
  110. PartHit = {Id = "rbxasset://sounds\\metal.ogg", Pitch = 1, Volume = 0.2},
  111.  
  112. }
  113.  
  114.  
  115.  
  116. ContentProvider = game:GetService("ContentProvider")
  117.  
  118. for _,v in pairs(Images) do ContentProvider:Preload(v) end
  119.  
  120.  
  121.  
  122. V3 = Vector3.new
  123.  
  124. C3 = Color3.new
  125.  
  126. BN = BrickColor.new
  127.  
  128. CN = CFrame.new
  129.  
  130. CA = CFrame.Angles
  131.  
  132. MR = math.rad
  133.  
  134. MRA = math.random
  135.  
  136. MP = math.pi
  137.  
  138. MH = math.huge
  139.  
  140. UD = UDim2.new
  141.  
  142.  
  143.  
  144. function RC(Pos, Dir, Max, Ignore)
  145.  
  146. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999)), Ignore)
  147.  
  148. end
  149.  
  150.  
  151.  
  152. function RayC(Start, En, MaxDist, Ignore)
  153.  
  154. return RC(Start, (En - Start), MaxDist, Ignore)
  155.  
  156. end
  157.  
  158.  
  159.  
  160. function ComputePos(pos1, pos2)
  161.  
  162. return CN(pos1, V3(pos2.x, pos1.y, pos2.z))
  163.  
  164. end
  165.  
  166.  
  167.  
  168. function DetectSurface(pos, part)
  169.  
  170. local surface = nil
  171.  
  172. local pospos = part.CFrame
  173.  
  174. local pos2 = pospos:pointToObjectSpace(pos)
  175.  
  176. local siz = part.Size
  177.  
  178. local shaep = part.Shape
  179.  
  180. if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
  181.  
  182. surface = {"Anything", CN(pospos.p, pos)*CN(0, 0, -(pospos.p - pos).magnitude+0.12)*CA(MR(-90), 0, 0)}
  183.  
  184. else
  185.  
  186. if pos2.Y > ((siz.Y/2)-0.01) then
  187.  
  188. surface = {"Top", CA(0, 0, 0)}
  189.  
  190. elseif pos2.Y < -((siz.Y/2)-0.01) then
  191.  
  192. surface = {"Bottom", CA(-MP, 0, 0)}
  193.  
  194. elseif pos2.X > ((siz.X/2)-0.01) then
  195.  
  196. surface = {"Right", CA(0, 0, MR(-90))}
  197.  
  198. elseif pos2.X < -((siz.X/2)-0.01) then
  199.  
  200. surface = {"Left", CA(0, 0, MR(90))}
  201.  
  202. elseif pos2.Z > ((siz.Z/2)-0.01) then
  203.  
  204. surface = {"Back", CA(MR(90), 0, 0)}
  205.  
  206. elseif pos2.Z < -((siz.Z/2)-0.01) then
  207.  
  208. surface = {"Front", CA(MR(-90), 0, 0)}
  209.  
  210. end
  211.  
  212. end
  213.  
  214. return surface
  215.  
  216. end
  217.  
  218.  
  219.  
  220. function Compute(pos1, pos2)
  221.  
  222. local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
  223.  
  224. return CN(pos1, pos3)
  225.  
  226. end
  227.  
  228.  
  229.  
  230. function waitChild(n, p)
  231.  
  232. local c = p:findFirstChild(n)
  233.  
  234. if c then return c end
  235.  
  236. while true do
  237.  
  238. c = p.ChildAdded:wait()
  239.  
  240. if c.Name == n then return c end
  241.  
  242. end
  243.  
  244. end
  245.  
  246.  
  247.  
  248. function Notime(func)
  249.  
  250. coroutine.resume(coroutine.create(function()
  251.  
  252. func()
  253.  
  254. end))
  255.  
  256. end
  257.  
  258.  
  259.  
  260. local C3 = Color3.new
  261.  
  262. local UD = UDim2.new
  263.  
  264. local V2 = Vector2.new
  265.  
  266.  
  267.  
  268. Torso = waitChild("Torso", Char)
  269.  
  270. Head = waitChild("Head", Char)
  271.  
  272. Rarm = waitChild("Right Arm", Char)
  273.  
  274. Larm = waitChild("Left Arm", Char)
  275.  
  276. Rleg = waitChild("Right Leg", Char)
  277.  
  278. Lleg = waitChild("Left Leg", Char)
  279.  
  280. Neck = waitChild("Neck", Torso)
  281.  
  282. Hum = waitChild("Humanoid", Char)
  283.  
  284.  
  285.  
  286. RSH = waitChild("Right Shoulder", Torso)
  287.  
  288. LSH = waitChild("Left Shoulder", Torso)
  289.  
  290. RH = waitChild("Right Hip", Torso)
  291.  
  292. LH = waitChild("Left Hip", Torso)
  293.  
  294.  
  295.  
  296. RSH.Part0 = Torso
  297.  
  298. LSH.Part0 = Torso
  299.  
  300. RH.Part0 = Torso
  301.  
  302. LH.Part0 = Torso
  303.  
  304.  
  305.  
  306. local Classes = {"Frame", "ImageLabel", "ImageButton", "TextLabel", "TextButton", "TextBox"}
  307.  
  308. function Make(Class, Par, Size, Pos, Color, Trans, Border, Borderc, Txt, TxtC, Img)
  309.  
  310. local Mk = "Frame"
  311.  
  312. for _,v in pairs(Classes) do
  313.  
  314. if Class == v then
  315.  
  316. Mk = v
  317.  
  318. end
  319.  
  320. end
  321.  
  322. local g = Instance.new(Mk)
  323.  
  324. g.Size = Size
  325.  
  326. g.Position = Pos
  327.  
  328. g.BackgroundColor3 = Color
  329.  
  330. g.Transparency = Trans
  331.  
  332. g.BorderSizePixel = Border
  333.  
  334. g.BorderColor3 = Borderc
  335.  
  336. if Mk == "TextButton" or Mk == "TextLabel" or Mk == "TextBox" then
  337.  
  338. g.Text = Txt
  339.  
  340. g.TextColor3 = TxtC
  341.  
  342. elseif Mk == "ImageLabel" or Mk == "ImageButton" then
  343.  
  344. g.Image = Img
  345.  
  346. end
  347.  
  348. g.Parent = Par
  349.  
  350. return g
  351.  
  352. end
  353.  
  354.  
  355.  
  356. Gui = Me:findFirstChild("PlayerGui")
  357.  
  358. if Gui then
  359.  
  360. for _,v in pairs(Gui:children()) do if v.Name == "Weapon GUI" then v:remove() end end
  361.  
  362. end
  363.  
  364.  
  365.  
  366. Screen = Instance.new("ScreenGui")
  367.  
  368. Screen.Name = "Weapon GUI"
  369.  
  370.  
  371.  
  372. AmmoTable = {}
  373.  
  374. AccuracyGuis = {}
  375.  
  376. lul = {
  377.  
  378. {unit = V2(0, -1), size = V2(2, 25), offset = V2(-1, -1-25)},
  379.  
  380. {unit = V2(1, 0), size = V2(25, 2), offset = V2(1, -1)},
  381.  
  382. {unit = V2(0, 1), size = V2(2, 25), offset = V2(-1, -1)},
  383.  
  384. {unit = V2(-1, 0), size = V2(25, 2), offset = V2(-1-25, -1)}
  385.  
  386. }
  387.  
  388.  
  389.  
  390. Main = Make("Frame", Screen, UD(0, 175, 0, 20), UD(1, -185-60, 1, -30), C3(0.25, 0.25, 0.3), 0.6, 0, C3())
  391.  
  392.  
  393.  
  394. for i = 1, Ammunition.MaxAmmo, 1 do
  395.  
  396. local Fr = Make("Frame", Main, UD(0, 8, 0, 14), UD(1, -12*i, 0, -14-6), C3(0.25, 0.25, 0.3), 0.6, 0, C3())
  397.  
  398. table.insert(AmmoTable, Fr)
  399.  
  400. end
  401.  
  402.  
  403.  
  404. AmmoAtm = Make("TextLabel", Main, UD(0, 0, 0, 0), UD(0, 8, 0.5, 0), C3(), 0, 0, C3(), "0", C3(1, 1, 1))
  405.  
  406. AmmoAtm.BackgroundTransparency = 1
  407.  
  408. AmmoAtm.TextXAlignment = "Left"
  409.  
  410. AmmoAtm.Font = "ArialBold"
  411.  
  412. AmmoAtm.FontSize = "Size18"
  413.  
  414.  
  415.  
  416. AmmoLeft = Make("TextLabel", Main, UD(0, 0, 0, 0), UD(1, -8, 0.5, 0), C3(), 0, 0, C3(), "40", C3(1, 1, 1))
  417.  
  418. AmmoLeft.BackgroundTransparency = 1
  419.  
  420. AmmoLeft.TextXAlignment = "Right"
  421.  
  422. AmmoLeft.Font = "ArialBold"
  423.  
  424. AmmoLeft.FontSize = "Size18"
  425.  
  426.  
  427.  
  428. ReloadGui = Make("TextLabel", Main, UD(0, 0, 0, 0), UD(1, -12, 0, -40), C3(), 1, 0, C3(), "RELOAD", C3(1, 0.25, 0.1))
  429.  
  430. ReloadGui.TextXAlignment = "Right"
  431.  
  432. ReloadGui.Font = "ArialBold"
  433.  
  434. ReloadGui.FontSize = "Size24"
  435.  
  436.  
  437.  
  438. for _, prop in pairs(lul) do
  439.  
  440. local g = Make("Frame", Screen, UD(0, prop.size.x, 0, prop.size.y), UD(0.5, prop.offset.x, 0.5, prop.offset.y), C3(0.8, 0.8, 0.9), 1, 0, C3())
  441.  
  442. table.insert(AccuracyGuis, {Gui = g, props = prop})
  443.  
  444. end
  445.  
  446.  
  447.  
  448. Screen.Parent = Gui
  449.  
  450.  
  451.  
  452. local Offset = 0.1
  453.  
  454. local Thing = 1
  455.  
  456. local Speed1 = 0.1
  457.  
  458. local Speed2 = 0
  459.  
  460. local TempAcc = 0
  461.  
  462. local AccTimesMax = 17
  463.  
  464. local AccTime = 1.25
  465.  
  466. local AccTimes = AccTimesMax
  467.  
  468. local AccOn = false
  469.  
  470. function AddInaccuracy(Acc)
  471.  
  472. TempAcc = Acc
  473.  
  474. end
  475.  
  476. Notime(function()
  477.  
  478. while true do
  479.  
  480. ReNew()
  481.  
  482. AmmoAtm.Text = Ammunition.Ammo
  483.  
  484. AmmoLeft.Text = Ammunition.Ammoleft
  485.  
  486. for i,v in pairs(AmmoTable) do
  487.  
  488. v.Transparency = 1
  489.  
  490. end
  491.  
  492. for i = 1, Ammunition.Ammo do
  493.  
  494. AmmoTable[i].Transparency = 0.6
  495.  
  496. end
  497.  
  498. if Ammunition.Ammo <= Ammunition.MaxAmmo/4 then ReloadFlash = true else ReloadFlash = false end
  499.  
  500. local Speed = Torso.Velocity.magnitude
  501.  
  502. Offset = 0
  503.  
  504. if Speed > 1 then
  505.  
  506. Speed1 = Speed
  507.  
  508. Thing = Thing*1.2
  509.  
  510. else
  511.  
  512. Speed2 = Speed
  513.  
  514. local lol = 1.4
  515.  
  516. if AccOn then lol = AccTime end
  517.  
  518. Thing = Thing/lol
  519.  
  520. end
  521.  
  522. if TempAcc ~= 0 then
  523.  
  524. Speed1 = TempAcc
  525.  
  526. Thing = TempAcc/2
  527.  
  528. AccOn = true
  529.  
  530. if TempAcc ~= 0 then
  531.  
  532. AccTimes = AccTimes - 1
  533.  
  534. if AccTimes < 1 then AccTimes = AccTimesMax Notime(function() wait(0.4) AccOn = false end) TempAcc = 0 end
  535.  
  536. end
  537.  
  538. end
  539.  
  540. if Thing < 1 then Thing = 1 elseif Thing > 14 then Thing = 14 end
  541.  
  542. Offset = Accuracy.Minimum + ((Speed1 - Speed1/Thing)/(Speed1 - Speed1/14))*Accuracy.Maximum
  543.  
  544. Accuracy.Momentum = Offset
  545.  
  546. wait()
  547.  
  548. end
  549.  
  550. end)
  551.  
  552.  
  553.  
  554. Notime(function()
  555.  
  556. while true do
  557.  
  558. if ReloadFlash then
  559.  
  560. if ReloadOn then
  561.  
  562. ReloadOn = false
  563.  
  564. ReloadGui.Transparency = 1
  565.  
  566. else
  567.  
  568. ReloadOn = true
  569.  
  570. ReloadGui.Transparency = 0
  571.  
  572. end
  573.  
  574. else
  575.  
  576. ReloadGui.Transparency = 1
  577.  
  578. end
  579.  
  580. wait(0.4)
  581.  
  582. end
  583.  
  584. end)
  585.  
  586.  
  587.  
  588.  
  589.  
  590. Add = {
  591.  
  592. Head = function(P, Scale)
  593.  
  594. local m = Instance.new("SpecialMesh")
  595.  
  596. m.MeshType = "Head"
  597.  
  598. m.Scale = Scale or V3(1, 1, 1)
  599.  
  600. m.Parent = P
  601.  
  602. return m
  603.  
  604. end,
  605.  
  606. Sphere = function(P, Scale)
  607.  
  608. local m = Instance.new("SpecialMesh")
  609.  
  610. m.MeshType = "Sphere"
  611.  
  612. m.Scale = Scale or V3(1, 1, 1)
  613.  
  614. m.Parent = P
  615.  
  616. return m
  617.  
  618. end,
  619.  
  620. Wedge = function(P, Scale)
  621.  
  622. local m = Instance.new("SpecialMesh")
  623.  
  624. m.MeshType = "Wedge"
  625.  
  626. m.Scale = Scale or V3(1, 1, 1)
  627.  
  628. m.Parent = P
  629.  
  630. return m
  631.  
  632. end,
  633.  
  634. Block = function(P, Scale, Bevel)
  635.  
  636. local m = Instance.new("BlockMesh")
  637.  
  638. m.Bevel = Bevel
  639.  
  640. m.Scale = Scale or V3(1,1,1)
  641.  
  642. m.Parent = P
  643.  
  644. return m
  645.  
  646. end
  647.  
  648. }
  649.  
  650.  
  651.  
  652. for _,v in pairs(Sounds) do
  653.  
  654. ContentProvider:Preload(v.Id)
  655.  
  656. end
  657.  
  658.  
  659.  
  660. function PlaySound(Sound, bool)
  661.  
  662. Pitch = Sound.Pitch
  663.  
  664. if bool then
  665.  
  666. Pitch = MRA((Sound.Pitch*0.75)*1000, (Sound.Pitch*1.15)*1000)/1000
  667.  
  668. end
  669.  
  670. local a = Instance.new("Sound")
  671.  
  672. a.SoundId = Sound.Id
  673.  
  674. a.Volume = Sound.Volume
  675.  
  676. a.Pitch = Pitch
  677.  
  678. a.Name = "FX"
  679.  
  680. a.Parent = Torso
  681.  
  682. a:play()
  683.  
  684. Notime(function()
  685.  
  686. wait(1)
  687.  
  688. a:remove()
  689.  
  690. end)
  691.  
  692. end
  693.  
  694.  
  695.  
  696. function GetParts(pos, dist)
  697.  
  698. local parts = {}
  699.  
  700. local function o(p)
  701.  
  702. for _,v in pairs(p:children()) do
  703.  
  704. if v:IsA("BasePart") then
  705.  
  706. if (pos - v.Position).magnitude <= dist then
  707.  
  708. table.insert(parts, {v, (pos - v.Position).magnitude, v.Anchored})
  709.  
  710. end
  711.  
  712. end
  713.  
  714. o(v)
  715.  
  716. end
  717.  
  718. end
  719.  
  720. o(workspace)
  721.  
  722. return parts
  723.  
  724. end
  725.  
  726.  
  727.  
  728. function GetHum(P)
  729.  
  730. for _,v in pairs(P:children()) do
  731.  
  732. if v:IsA("Humanoid") then
  733.  
  734. if v.Health > 0 then
  735.  
  736. return v
  737.  
  738. end
  739.  
  740. end
  741.  
  742. end
  743.  
  744. end
  745.  
  746.  
  747.  
  748. function GetGroup(Pos, Distance, Hit)
  749.  
  750. local tab = {}
  751.  
  752. for _,v in pairs(workspace:children()) do
  753.  
  754. local h = GetHum(v)
  755.  
  756. local t = v:findFirstChild("Torso")
  757.  
  758. if h and t and v ~= Hit.Parent then
  759.  
  760. if (t.Position - Pos).magnitude <= Distance then
  761.  
  762. table.insert(tab, {h, v, (t.Position - Pos).magnitude})
  763.  
  764. end
  765.  
  766. end
  767.  
  768. end
  769.  
  770. if Hit then
  771.  
  772. local h = GetHum(Hit.Parent)
  773.  
  774. if h then
  775.  
  776. table.insert(tab, {h, Hit.Parent, 0})
  777.  
  778. end
  779.  
  780. end
  781.  
  782. return tab
  783.  
  784. end
  785.  
  786.  
  787.  
  788. function Part(Par, Anc, Colli, Tran, Ref, Col, Siz)
  789.  
  790. local p = Instance.new("Part")
  791.  
  792. p.formFactor = "Custom"
  793.  
  794. p.TopSurface = 0
  795.  
  796. p.BottomSurface = 0
  797.  
  798. p.Transparency = Tran
  799.  
  800. p.Reflectance = Ref
  801.  
  802. p.Anchored = Anc
  803.  
  804. p.CanCollide = Colli
  805.  
  806. p.BrickColor = Col
  807.  
  808. p.Size = Siz
  809.  
  810. p.Locked = true
  811.  
  812. p.Parent = Par
  813.  
  814. p:BreakJoints()
  815.  
  816. return p
  817.  
  818. end
  819.  
  820.  
  821.  
  822. function Weld(P0, P1, C0, C1)
  823.  
  824. local w = Instance.new("Weld")
  825.  
  826. w.Part0 = P0
  827.  
  828. w.Part1 = P1
  829.  
  830. if C0 then
  831.  
  832. w.C0 = C0
  833.  
  834. end
  835.  
  836. if C1 then
  837.  
  838. w.C1 = C1
  839.  
  840. end
  841.  
  842. w.Parent = P0
  843.  
  844. return w
  845.  
  846. end
  847.  
  848.  
  849.  
  850. for _,v in pairs(Char:children()) do
  851.  
  852. if v.Name == ModelName then
  853.  
  854. v:remove()
  855.  
  856. end
  857.  
  858. end
  859.  
  860.  
  861.  
  862. for _,v in pairs(Char:children()) do if v.Name == ModelName then v:remove() end end
  863.  
  864.  
  865.  
  866. Model = Instance.new("Model")
  867.  
  868. Model.Name = ModelName
  869.  
  870.  
  871.  
  872. FTorso = Part(Model, false, false, 1, 0, Torso.BrickColor, V3(2, 2, 1))
  873.  
  874. FW = Weld(Torso, FTorso)
  875.  
  876.  
  877.  
  878. RAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  879.  
  880. LAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  881.  
  882. RLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  883.  
  884. LLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  885.  
  886.  
  887.  
  888. RABW = Weld(Torso, RAB, CN(), CN(-1.5, -0.5, 0))
  889.  
  890. LABW = Weld(Torso, LAB, CN(), CN(1.5, -0.5, 0))
  891.  
  892. RLBW = Weld(Torso, RLB, CN(), CN(-0.5, 1, 0))
  893.  
  894. LLBW = Weld(Torso, LLB, CN(), CN(0.5, 1, 0))
  895.  
  896.  
  897.  
  898. RAW = Weld(RAB, nil, CN(), CN(0, 0.5, 0))
  899.  
  900. LAW = Weld(LAB, nil, CN(), CN(0, 0.5, 0))
  901.  
  902. RLW = Weld(RLB, nil, CN(), CN(0, 1, 0))
  903.  
  904. LLW = Weld(LLB, nil, CN(), CN(0, 1, 0))
  905.  
  906.  
  907.  
  908. TW = Weld(Torso, nil, CN(-0.4, -1.5, 0.7), CA(MR(55), MR(-90), MR(0)))
  909.  
  910.  
  911.  
  912. local FH = Instance.new("Humanoid",Model)
  913.  
  914. FH.PlatformStand = true
  915.  
  916. FH.MaxHealth = math.huge
  917.  
  918. FH.Health = math.huge
  919.  
  920.  
  921.  
  922. pcall(function() Torso:findFirstChild("Shirt"):clone().Parent = Model end)
  923.  
  924.  
  925.  
  926. local hh = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  927.  
  928. hh.Name = "Head"
  929.  
  930. Weld(FTorso, hh)
  931.  
  932.  
  933.  
  934. Weapon = Instance.new("Model")
  935.  
  936. Weapon.Name = "Weapon"
  937.  
  938.  
  939.  
  940. HB = Part(Weapon, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  941.  
  942. HBW = Weld(Rarm, HB, CN(0, -0.7, 0), CA(MR(-90), MR(180), 0))
  943.  
  944. HW = Weld(HB, nil, CA(MR(38), MR(-28), MR(-90)) * CN(0, -0.2, -3.8))
  945.  
  946.  
  947.  
  948. LHB = Part(Weapon, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  949.  
  950. LHBW = Weld(Larm, LHB, CN(0, -0.7, 0), CA(MR(-90), MR(180), 0))
  951.  
  952. LHW = Weld(LHB, nil, CA(MR(-2), MR(30), MR(-3)) * CN(-0.1, 0.32, -0.24))
  953.  
  954. LHWK = Weld(LHB, nil, CA(MR(170), 0, 0))
  955.  
  956.  
  957.  
  958.  
  959.  
  960. Handle = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.5, 0.9, 0.9))
  961.  
  962. TW.Part1 = Handle
  963.  
  964.  
  965.  
  966. Handle2 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.5, 0.6, 1.6))
  967.  
  968. Weld(Handle, Handle2, CA(MR(-45), 0, 0), CN(0, 0.5, -0.4))
  969.  
  970.  
  971.  
  972. Handle3 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.5, 0.7, 1.3))
  973.  
  974. Weld(Handle2, Handle3, CA(MR(45), 0, 0), CN(0, -0.4, -0.9))
  975.  
  976.  
  977.  
  978. Pipe1 = Part(Weapon, false, false, 0, 0.1, BN("Light grey"), V3(0.3, 0.3, 3.2))
  979.  
  980. Add.Block(Pipe1, V3(1,1,1), 0.08)
  981.  
  982. Weld(Handle3, Pipe1, CN(0, 0.15, 1.6+0.55))
  983.  
  984.  
  985.  
  986. Pipe2 = Part(Weapon, false, false, 0, 0.1, BN("Light grey"), V3(0.3, 0.3, 1.7))
  987.  
  988. Add.Block(Pipe2, V3(1,1,1), 0.08)
  989.  
  990. Weld(Handle3, Pipe2, CN(0, -0.15, 0.85+0.55))
  991.  
  992.  
  993.  
  994. Pipe3 = Part(Weapon, false, false, 0, 0.1, BN("Light grey"), V3(0.25, 0.25, 1.6))
  995.  
  996. Add.Block(Pipe3, V3(1,1,1), 0.065)
  997.  
  998. Weld(Pipe2, Pipe3, CN(0, 0, 0.8+0.7))
  999.  
  1000.  
  1001.  
  1002. Pump = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.45, 0.45, 1.1))
  1003.  
  1004. Add.Block(Pump, V3(1,1,1), 0.225/2)
  1005.  
  1006. PumpWeld = Weld(Pipe2, Pump, CN(0, 0, 0.6), CN(0, 0, 0))
  1007.  
  1008.  
  1009.  
  1010. Pump2 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.5, 0.5, 0.3))
  1011.  
  1012. Add.Block(Pump, V3(1,1,1), 0.13)
  1013.  
  1014. Weld(Pump, Pump2, CN(0, 0, -0.5))
  1015.  
  1016.  
  1017.  
  1018. for degrees = -20, 200, 20 do
  1019.  
  1020. local Derp = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.2, 0.2))
  1021.  
  1022. Add.Block(Derp, V3(0.4,0.6,0.4), 0.02)
  1023.  
  1024. Weld(Handle3, Derp, CN(0, -0.45, -0.32) * CA(MR(degrees), 0, 0), CN(0, 0, -0.2))
  1025.  
  1026. end
  1027.  
  1028.  
  1029.  
  1030. Derp = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.2, 0.3))
  1031.  
  1032. Add.Block(Derp, V3(0.4,1,1), 0.02)
  1033.  
  1034. Weld(Handle3, Derp, CN(0, 0, -0.32) * CA(MR(-20), 0, 0), CN(0, 0.45, -0.2))
  1035.  
  1036.  
  1037.  
  1038. Trigger = Part(Weapon, false, false, 0, 0, BN("Really black"), V3(0.2, 0.3, 0.2))
  1039.  
  1040. Add.Block(Trigger, V3(0.5, 0.9, 0.3), 0.02)
  1041.  
  1042. TriggerWeld = Weld(Handle3, Trigger, CN(0, -0.45, -0.4) * CA(MR(2), 0, 0))
  1043.  
  1044.  
  1045.  
  1046. Aim = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.3, 0.2, 0.7))
  1047.  
  1048. Add.Block(Aim, V3(1,0.7,1), 0.05)
  1049.  
  1050. Weld(Pipe1, Aim, CN(0, 0.12, 1.1))
  1051.  
  1052.  
  1053.  
  1054. Aim1 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.2, 0.2))
  1055.  
  1056. Add.Block(Aim1, V3(0.3, 0.7, 0.5))
  1057.  
  1058. Weld(Aim, Aim1, CN(-.1, 0.1, -0.25))
  1059.  
  1060.  
  1061.  
  1062. Aim2 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.2, 0.2))
  1063.  
  1064. Add.Block(Aim2, V3(0.3, 0.7, 0.5))
  1065.  
  1066. Weld(Aim, Aim2, CN(.1, 0.1, -0.25))
  1067.  
  1068.  
  1069.  
  1070. Aim3 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.2, 0.2))
  1071.  
  1072. Add.Block(Aim3, V3(0.3, 0.7, 0.5))
  1073.  
  1074. Weld(Aim, Aim3, CN(0, 0.1, 0.25))
  1075.  
  1076.  
  1077.  
  1078. BulletFlip = Part(Weapon, false, false, 0, 0, BN("Light grey"), V3(0.2, 0.3, 0.6))
  1079.  
  1080. Flip = Weld(Handle3, BulletFlip, CN(-0.18, 0.1, 0.2) * CA(0, MR(-10), 0))
  1081.  
  1082.  
  1083.  
  1084. ---POCKET
  1085.  
  1086.  
  1087.  
  1088. BeltWelds = {}
  1089.  
  1090.  
  1091.  
  1092. BeltK = nil
  1093.  
  1094. for i = -0.5, 0.5, 1 do
  1095.  
  1096. local Belt = Part(Weapon, false, false, 0, 0, BN("Black"), V3(2.1, 0.3, 0.2))
  1097.  
  1098. table.insert(BeltWelds, Weld(Torso, Belt, CN(0, -0.9, i)))
  1099.  
  1100. end
  1101.  
  1102. for i = 1, -1, -2 do
  1103.  
  1104. local Belt = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.3, 1.1))
  1105.  
  1106. table.insert(BeltWelds, Weld(Torso, Belt, CN(i, -0.9, 0)))
  1107.  
  1108. BeltK = Belt
  1109.  
  1110. end
  1111.  
  1112.  
  1113.  
  1114. for i = -0.25, 0.25, 0.5 do
  1115.  
  1116. local Pocket = Part(Weapon, false, false, 0, 0, BN("Black"), V3(1.1, 0.9, 0.2))
  1117.  
  1118. table.insert(BeltWelds, Weld(Torso, Pocket, CN(0.8, -1.2, -0.8) * CA(0, MR(-15), 0), CN(0, 0, i)))
  1119.  
  1120. end
  1121.  
  1122.  
  1123.  
  1124. for i = -0.5, 0.5, 1 do
  1125.  
  1126. local Pocket = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.6, 0.9, 0.2))
  1127.  
  1128. table.insert(BeltWelds, Weld(Torso, Pocket, CN(0.8, -1.2, -0.8) * CA(0, MR(-15)+MP/2, 0), CN(0, 0, i)))
  1129.  
  1130. end
  1131.  
  1132. Pocket = Part(Weapon, false, false, 0, 0, BN("Black"), V3(1.1, 0.2, 0.6))
  1133.  
  1134. table.insert(BeltWelds, Weld(Torso, Pocket, CN(0.8, -1.6, -0.8) * CA(0, MR(-15), 0)))
  1135.  
  1136.  
  1137.  
  1138. function Shell(P)
  1139.  
  1140. local Shel = Instance.new("Model")
  1141.  
  1142. local Back = Part(Shel, false, false, 0, 0, BN("Bright yellow"), V3(0.3, 0.3, 0.25))
  1143.  
  1144. local Main = Part(Shel, false, false, 0, 0, BN("Bright red"), V3(0.3, 0.3, 0.4))
  1145.  
  1146. Add.Block(Back, V3(1,1,1), 0.077)
  1147.  
  1148. Add.Block(Main, V3(1,1,1), 0.077)
  1149.  
  1150. Weld(Main, Back, CN(0, 0, -0.225))
  1151.  
  1152. Shel.Parent = P
  1153.  
  1154. return {Model = Shel, Back = Back, Main = Main}
  1155.  
  1156. end
  1157.  
  1158.  
  1159.  
  1160. for y = 0.15, 0.65, 0.25 do
  1161.  
  1162. for x = -0.12, 0.13, 0.24 do
  1163.  
  1164. for z = -0.25, 0.26, 0.5 do
  1165.  
  1166. local sh = Shell(Weapon)
  1167.  
  1168. Weld(Pocket, sh.Main, CN(z-0.05, y, x), CA(0, MP/2, 0))
  1169.  
  1170. end
  1171.  
  1172. end
  1173.  
  1174. end
  1175.  
  1176.  
  1177.  
  1178. KnifeSheath = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.3, 0.9, 0.6))
  1179.  
  1180. SheathWeld = Weld(BeltK, KnifeSheath, CN(-0.2, -0.3, -0.25) * CA(MR(-20), 0, 0))
  1181.  
  1182.  
  1183.  
  1184. KnifeHandle = Part(Weapon, false, false, 0, 0, BN("Really black"), V3(0.3, 0.6, 0.3))
  1185.  
  1186. KnifeWeld = Weld(KnifeSheath, KnifeHandle, CA(MP, 0, 0), CN(0, 0.9, 0))
  1187.  
  1188.  
  1189.  
  1190. KnifeHandle2 = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(0.3, 0.2, 0.4))
  1191.  
  1192. Weld(KnifeHandle, KnifeHandle2, CN(0, 0.35, 0))
  1193.  
  1194.  
  1195.  
  1196. KnifeBlade1 = Part(Weapon, false, false, 0, 0.1, BN("Light grey"), V3(0.2, 0.8, 0.3))
  1197.  
  1198. Add.Block(KnifeBlade1, V3(0.4, 1, 1), 0.05)
  1199.  
  1200. Weld(KnifeHandle2, KnifeBlade1, CN(0, 0.42, 0))
  1201.  
  1202.  
  1203.  
  1204. KnifeBlade2 = Part(Weapon, false, false, 0, 0.1, BN("Light grey"), V3(0.2, 0.24, 0.24))
  1205.  
  1206. Add.Block(KnifeBlade2, V3(0.4, 1, 1), 0.05)
  1207.  
  1208. Weld(KnifeBlade1, KnifeBlade2, CN(0, 0.32, 0), CA(MR(45), 0, 0))
  1209.  
  1210.  
  1211.  
  1212. function Show_Damage(P, D, Area)
  1213.  
  1214. local mo = Instance.new("Model")
  1215.  
  1216. mo.Name = D
  1217.  
  1218. local p = Part(mo, true, false, 0, 0, BN("Bright red"), V3(0.2, 0.2, 0.2))
  1219.  
  1220. p.Name = "Head"
  1221.  
  1222. local m = Instance.new("SpecialMesh")
  1223.  
  1224. m.MeshType = "Brick"
  1225.  
  1226. m.Scale = Vector3.new(3.5, 2.3, 3.5)
  1227.  
  1228. m.Parent = p
  1229.  
  1230. local h = Instance.new("Humanoid")
  1231.  
  1232. h.Health = 0
  1233.  
  1234. h.MaxHealth = 0
  1235.  
  1236. h.Name = "asd"
  1237.  
  1238. h.Parent = mo
  1239.  
  1240. local nah = true
  1241.  
  1242. mo.Parent = workspace
  1243.  
  1244. local cf = CN(P) * CN(MRA(-Area*100, Area*100)/100, MRA(-Area*100, Area*100)/100, MRA(-Area*100, Area*100)/100)
  1245.  
  1246. p.CFrame = cf
  1247.  
  1248. Notime(function()
  1249.  
  1250. Notime(function()
  1251.  
  1252. for i = 0, 6, 0.03 do
  1253.  
  1254. wait()
  1255.  
  1256. p.CFrame = cf * CN(0, i, 0)
  1257.  
  1258. end
  1259.  
  1260. end)
  1261.  
  1262. wait(1.5)
  1263.  
  1264. for i = 0, 1, 0.05 do
  1265.  
  1266. p.Transparency = i
  1267.  
  1268. if nah then mo.Name = "" nah = false else mo.Name = "- "..D nah = true end
  1269.  
  1270. wait()
  1271.  
  1272. end
  1273.  
  1274. mo:remove()
  1275.  
  1276. end)
  1277.  
  1278. end
  1279.  
  1280.  
  1281.  
  1282. function Hit(part)
  1283.  
  1284. local H = GetHum(part.Parent)
  1285.  
  1286. if H and Debounce and Hurt then
  1287.  
  1288. Debounce = false
  1289.  
  1290. local Dmg = MRA(MeleeDmg/1.3, MeleeDmg)
  1291.  
  1292. H.Health = H.Health - Dmg
  1293.  
  1294. Show_Damage(KnifeBlade2.Position, Dmg, 0.1)
  1295.  
  1296. end
  1297.  
  1298. end
  1299.  
  1300.  
  1301.  
  1302. KnifeBlade1.Touched:connect(Hit)
  1303.  
  1304. KnifeBlade2.Touched:connect(Hit)
  1305.  
  1306.  
  1307.  
  1308. Weapon.Parent = Model
  1309.  
  1310. Model.Parent = Char
  1311.  
  1312.  
  1313.  
  1314. if script.Parent.className ~= "HopperBin" then
  1315.  
  1316. h = Instance.new("HopperBin", Me.Backpack)
  1317.  
  1318. h.Name = ToolName
  1319.  
  1320. script.Parent = h
  1321.  
  1322. end
  1323.  
  1324.  
  1325.  
  1326. bin = script.Parent
  1327.  
  1328.  
  1329.  
  1330. function Attach(t)
  1331.  
  1332. RSH.Part0 = t
  1333.  
  1334. LSH.Part0 = t
  1335.  
  1336. RH.Part0 = t
  1337.  
  1338. LH.Part0 = t
  1339.  
  1340. RABW.Part0 = t
  1341.  
  1342. LABW.Part0 = t
  1343.  
  1344. LLBW.Part0 = t
  1345.  
  1346. RLBW.Part0 = t
  1347.  
  1348. for _,v in pairs(BeltWelds) do
  1349.  
  1350. v.Part0 = t
  1351.  
  1352. end
  1353.  
  1354. if t == Torso then
  1355.  
  1356. FTorso.Transparency = 1
  1357.  
  1358. else
  1359.  
  1360. Torso.Transparency = 1
  1361.  
  1362. end
  1363.  
  1364. t.Transparency = 0
  1365.  
  1366. end
  1367.  
  1368.  
  1369.  
  1370. function Normal()
  1371.  
  1372. RAW.C0 = CA(MR(90), 0, MR(-65)) * CN(0.6, -0.9, 0)
  1373.  
  1374. LAW.C0 = CA(MR(85), 0, MR(-40)) * CN(0.5, -0.5, 0)
  1375.  
  1376. FW.C0 = CA(0, MR(-70), 0)
  1377.  
  1378. HW.C0 = CA(MR(0), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  1379.  
  1380. LHW.C0 = CA(MR(-2), MR(30), MR(-3)) * CN(-0.1, 0.32, -0.24)
  1381.  
  1382. PumpWeld.C1 = CN(0, 0, 0)
  1383.  
  1384. Flip.C1 = CN(0, 0, 0)
  1385.  
  1386. Attach(FTorso)
  1387.  
  1388. LHW.Part1 = nil
  1389.  
  1390. TW.Part1 = nil
  1391.  
  1392. LHWK.Part1 = nil
  1393.  
  1394. KnifeWeld.Part1 = KnifeHandle
  1395.  
  1396. Neck.C0 = necko
  1397.  
  1398. HW.Part1 = Handle
  1399.  
  1400. end
  1401.  
  1402.  
  1403.  
  1404. function Swing()
  1405.  
  1406. Swinging = true
  1407.  
  1408. for i = 0.5, 1, 0.5 do
  1409.  
  1410. LAW.C0 = CA(MR(85-8*i), 0, MR(-40+5*i)) * CN(0.5, -0.5+0.2*i, 0)
  1411.  
  1412. RAW.C0 = CA(MR(90-5*i), 0, MR(-65-5*i)) * CN(0.6+0.05*i, -0.9+0.05*i, -0.1*i)
  1413.  
  1414. HW.C0 = CA(MR(-5*i), MR(5+5*i), MR(0)) * CN(0.4, 0, -1.2)
  1415.  
  1416. FW.C0 = CA(0, MR(-70+8*i), 0)
  1417.  
  1418. wait()
  1419.  
  1420. end
  1421.  
  1422. for i = 0.33, 1, 0.33 do
  1423.  
  1424. LAW.C0 = CA(MR(77-37*i), 0, MR(-35+30*i)) * CN(0.5-0.15*i, -0.3+0.3*i, 0)
  1425.  
  1426. RAW.C0 = CA(MR(85-15*i), 0, MR(-70-5*i)) * CN(0.65+0.15*i, -0.85+0.2*i, -0.1-0.2*i)
  1427.  
  1428. HW.C0 = CA(MR(-5-15*i), MR(10+10*i), MR(0)) * CN(0.4, 0, -1.2)
  1429.  
  1430. FW.C0 = CA(0, MR(-62+58*i), 0)
  1431.  
  1432. wait()
  1433.  
  1434. end
  1435.  
  1436. LHWK.Part1 = KnifeHandle
  1437.  
  1438. KnifeWeld.Part1 = nil
  1439.  
  1440. PlaySound(Sounds.Slash)
  1441.  
  1442. for i = 0.25, 1, 0.25 do
  1443.  
  1444. LAW.C0 = CA(MR(40+30*i), 0, MR(-5-45*i)) * CN(0.35-0.2*i, -0.5*i, 0)
  1445.  
  1446. RAW.C0 = CA(MR(70-15*i), 0, MR(-75-5*i)) * CN(0.8, -0.65+0.15*i, -0.3-0.05*i)
  1447.  
  1448. HW.C0 = CA(MR(-20-10*i), MR(20+5*i), MR(0)) * CN(0.4, 0, -1.2)
  1449.  
  1450. FW.C0 = CA(0, MR(-4+14*i), 0)
  1451.  
  1452. LHWK.C0 = CN(0, -0.1*i, 0.2*i) * CA(MR(170), 0, MR(-50*i))
  1453.  
  1454. wait()
  1455.  
  1456. end
  1457.  
  1458. Hurt = true
  1459.  
  1460. Debounce = true
  1461.  
  1462. for i = 0.25, 1, 0.25 do
  1463.  
  1464. LAW.C0 = CA(MR(70+20*i), 0, MR(-50+35*i)) * CN(0.15-0.05*i, -0.5-0.3*i, 0)
  1465.  
  1466. FW.C0 = CA(0, MR(10-60*i), 0)
  1467.  
  1468. LHWK.C0 = CN(0, -0.1-0.05*i, 0.2+0.1*i) * CA(MR(170), 0, MR(-50-40*i))
  1469.  
  1470. wait()
  1471.  
  1472. end
  1473.  
  1474. for i = 0.25, 1, 0.25 do
  1475.  
  1476. LAW.C0 = CA(MR(90+10*i), 0, MR(-15+15*i)) * CN(0.1, -0.9, 0)
  1477.  
  1478. FW.C0 = CA(0, MR(-50-40*i), 0)
  1479.  
  1480. LHWK.C0 = CN(0, -0.15, 0.3) * CA(MR(170), 0, MR(-90))
  1481.  
  1482. wait()
  1483.  
  1484. end
  1485.  
  1486. for i = 0.33, 1, 0.33 do
  1487.  
  1488. LAW.C0 = CA(MR(100+3*i), 0, 0) * CN(0.1, -0.9, 0)
  1489.  
  1490. FW.C0 = CA(0, MR(-90-6*i), 0)
  1491.  
  1492. LHWK.C0 = CN(0, -0.15, 0.3) * CA(MR(170), 0, MR(-90))
  1493.  
  1494. wait()
  1495.  
  1496. end
  1497.  
  1498. Hurt = false
  1499.  
  1500. wait(0.04)
  1501.  
  1502. for i = 0.25, 1, 0.25 do
  1503.  
  1504. LAW.C0 = CA(MR(103-13*i), 0, 0) * CN(0.1, -0.9+0.1*i, 0)
  1505.  
  1506. FW.C0 = CA(0, MR(-96+16*i), 0)
  1507.  
  1508. LHWK.C0 = CN(0, -0.15, 0.3-0.1*i) * CA(MR(170), 0, MR(-90+15*i))
  1509.  
  1510. wait()
  1511.  
  1512. end
  1513.  
  1514. for i = 0.25, 1, 0.25 do
  1515.  
  1516. LAW.C0 = CA(MR(90-42*i), 0, 0) * CN(0.1+0.1*i, -0.8+0.3*i, 0)
  1517.  
  1518. RAW.C0 = CA(MR(55+15*i), 0, MR(-80+5*i)) * CN(0.8-0.05*i, -0.5-0.1*i, -0.35+0.05*i)
  1519.  
  1520. FW.C0 = CA(0, MR(-80+10*i), 0)
  1521.  
  1522. HW.C0 = CA(MR(-30+20*i), MR(25-15*i), MR(0)) * CN(0.4, 0, -1.2)
  1523.  
  1524. LHWK.C0 = CN(0, -0.15, 0.2-0.45*i) * CA(MR(170), 0, MR(-75+75*i))
  1525.  
  1526. wait()
  1527.  
  1528. end
  1529.  
  1530. for i = 0.5, 1, 0.5 do
  1531.  
  1532. LAW.C0 = CA(MR(48-8*i), 0, 0) * CN(0.2+0.05*i, -0.5, 0)
  1533.  
  1534. RAW.C0 = CA(MR(70+10*i), 0, MR(-75+7*i)) * CN(0.75-0.05*i, -0.6-0.1*i, -0.3+0.05*i)
  1535.  
  1536. FW.C0 = CA(0, MR(-70), 0)
  1537.  
  1538. HW.C0 = CA(MR(-10+10*i), MR(10-5*i), MR(0)) * CN(0.4, 0, -1.2)
  1539.  
  1540. LHWK.C0 = CN(0, -0.15, -0.25-0.15*i) * CA(MR(170), 0, 0)
  1541.  
  1542. wait()
  1543.  
  1544. end
  1545.  
  1546. LHWK.Part1 = nil
  1547.  
  1548. KnifeWeld.Part1 = KnifeHandle
  1549.  
  1550. for i = 0.25, 1, 0.25 do
  1551.  
  1552. LAW.C0 = CA(MR(40+40*i), 0, MR(-30*i)) * CN(0.25+0.2*i, -0.5, 0)
  1553.  
  1554. RAW.C0 = CA(MR(80+10*i), 0, MR(-68+3*i)) * CN(0.7-0.1*i, -0.7-0.2*i, -0.25+0.2*i)
  1555.  
  1556. wait()
  1557.  
  1558. end
  1559.  
  1560. for i = 0.5, 1, 0.5 do
  1561.  
  1562. LAW.C0 = CA(MR(80+5*i), 0, MR(-30-10*i)) * CN(0.45+0.05*i, -0.5, -0.05+0.05*i)
  1563.  
  1564. RAW.C0 = CA(MR(90), 0, MR(-65)) * CN(0.6, -0.9, 0)
  1565.  
  1566. wait()
  1567.  
  1568. end
  1569.  
  1570. Normal()
  1571.  
  1572. Swinging = false
  1573.  
  1574. end
  1575.  
  1576.  
  1577.  
  1578. function Reload(once)
  1579.  
  1580. while Ammunition.Ammo < Ammunition.MaxAmmo and Ammunition.Ammoleft > 0 do
  1581.  
  1582. wait()
  1583.  
  1584. for i = 0.33, 1, 0.33 do
  1585.  
  1586. RAW.C0 = CA(MR(45-2*i), 0, MR(-15)) * CN(0, -0.15-0.05*i, 0)
  1587.  
  1588. LAW.C0 = CA(MR(50), MR(40), MR(-15)) * CN(0.5, -0.5, 0)
  1589.  
  1590. LHW.C0 = CA(MR(-35), MR(60), MR(-45)) * CN(-0.6, 0.2, -0.24)
  1591.  
  1592. wait()
  1593.  
  1594. end
  1595.  
  1596. for i = 0.25, 1, 0.25 do
  1597.  
  1598. RAW.C0 = CA(MR(43-8*i), 0, MR(-15)) * CN(0, -0.2-0.2*i, 0)
  1599.  
  1600. LAW.C0 = CA(MR(50), MR(40), MR(-15)) * CN(0.5, -0.5, 0)
  1601.  
  1602. LHW.C0 = CA(MR(-35), MR(60), MR(-45)) * CN(-0.6, 0.2, -0.24)
  1603.  
  1604. wait()
  1605.  
  1606. end
  1607.  
  1608. for i = 0.5, 1, 0.5 do
  1609.  
  1610. RAW.C0 = CA(MR(35-2*i), 0, MR(-15)) * CN(0, -0.4-0.05*i, 0)
  1611.  
  1612. wait()
  1613.  
  1614. end
  1615.  
  1616. local shel = Shell(Weapon)
  1617.  
  1618. local w = Weld(Rarm, shel.Main, CN(0, -1.25, 0.45), CA(MR(-140), 0, MR(60)))
  1619.  
  1620. for i = 0.25, 1, 0.25 do
  1621.  
  1622. RAW.C0 = CA(MR(33+20*i), 0, MR(-15-10*i)) * CN(0, -0.45+0.2*i, 0)
  1623.  
  1624. LAW.C0 = CA(MR(50-5*i), MR(40), MR(-15+5*i)) * CN(0.5, -0.5, 0)
  1625.  
  1626. w.C0 = CN(-0.1*i, -1.25, 0.45-0.25*i)
  1627.  
  1628. wait()
  1629.  
  1630. end
  1631.  
  1632. for i = 0.2, 1, 0.2 do
  1633.  
  1634. RAW.C0 = CA(MR(53+32*i), 0, MR(-25-12*i)) * CN(0, -0.25-0.3*i, 0)
  1635.  
  1636. LAW.C0 = CA(MR(45), MR(40), MR(-10+10*i)) * CN(0.5, -0.5+0.15*i, 0)
  1637.  
  1638. w.C0 = CN(-0.1-0.1*i, -1.25, 0.2-0.3*i)
  1639.  
  1640. w.C1 = CA(MR(-140+50*i), 0, MR(60))
  1641.  
  1642. wait()
  1643.  
  1644. end
  1645.  
  1646. PlaySound(Sounds.Reload, false)
  1647.  
  1648. for i = 0.25, 1, 0.25 do
  1649.  
  1650. RAW.C0 = CA(MR(85+10*i), 0, MR(-42-8*i)) * CN(0, -0.55-0.1*i, 0)
  1651.  
  1652. LAW.C0 = CA(MR(45), MR(40), 0) * CN(0.5, -0.35, 0)
  1653.  
  1654. w.C0 = CN(-0.2-0.05*i, -1.25, -0.1-0.1*i)
  1655.  
  1656. wait()
  1657.  
  1658. end
  1659.  
  1660. shel.Model:remove() shell = nil
  1661.  
  1662. Ammunition.Ammo = Ammunition.Ammo + 1
  1663.  
  1664. Ammunition.Ammoleft = Ammunition.Ammoleft - 1
  1665.  
  1666. wait(0.1)
  1667.  
  1668. for i = 0.33, 1, 0.33 do
  1669.  
  1670. RAW.C0 = CA(MR(95-10*i), 0, MR(-50+10*i)) * CN(0, -0.65+0.1*i, 0)
  1671.  
  1672. LAW.C0 = CA(MR(45+5*i), MR(40), MR(-12*i)) * CN(0.5, -0.35-0.1*i, 0)
  1673.  
  1674. wait()
  1675.  
  1676. end
  1677.  
  1678. for i = 0.25, 1, 0.25 do
  1679.  
  1680. RAW.C0 = CA(MR(85-40*i), 0, MR(-40+25*i)) * CN(0, -0.55+0.4*i, 0)
  1681.  
  1682. LAW.C0 = CA(MR(50), MR(40), MR(-12-3*i)) * CN(0.5, -0.45-0.05*i, 0)
  1683.  
  1684. wait()
  1685.  
  1686. end
  1687.  
  1688. if once then break end
  1689.  
  1690. if not ReloadHold then break end
  1691.  
  1692. end
  1693.  
  1694. for i = 0.33, 1, 0.33 do
  1695.  
  1696. RAW.C0 = CA(MR(45+10*i), 0, MR(-15-10*i)) * CN(0.1*i, -0.15-0.1*i, 0)
  1697.  
  1698. LAW.C0 = CA(MR(52+12*i), MR(40-5*i), MR(-15-5*i)) * CN(0.5, -0.5, 0)
  1699.  
  1700. LHW.C0 = CA(MR(-35+10*i), MR(60-10*i), MR(-45+10*i)) * CN(-0.6+0.1*i, 0.2, -0.24)
  1701.  
  1702. wait()
  1703.  
  1704. end
  1705.  
  1706. for i = 0.2, 1, 0.2 do
  1707.  
  1708. RAW.C0 = CA(MR(55+30*i), 0, MR(-25-30*i)) * CN(0.1+0.4*i, -0.25-0.55*i, 0)
  1709.  
  1710. LAW.C0 = CA(MR(70+10*i), MR(35-30*i), MR(-20-15*i)) * CN(0.5, -0.5, 0)
  1711.  
  1712. LHW.C0 = CA(MR(-25+18*i), MR(50-15*i), MR(-35+25*i)) * CN(-0.5+0.3*i, 0.2+0.1*i, -0.24)
  1713.  
  1714. wait()
  1715.  
  1716. end
  1717.  
  1718. for i = 0.25, 1, 0.25 do
  1719.  
  1720. RAW.C0 = CA(MR(85+5*i), 0, MR(-55-10*i)) * CN(0.5+0.1*i, -0.8-0.1*i, 0)
  1721.  
  1722. LAW.C0 = CA(MR(80+5*i), MR(5-5*i), MR(-35-5*i)) * CN(0.5, -0.5, 0)
  1723.  
  1724. LHW.C0 = CA(MR(-7+5*i), MR(35-5*i), MR(-10+7*i)) * CN(-0.2+0.1*i, 0.3+0.02*i, -0.24)
  1725.  
  1726. wait()
  1727.  
  1728. end
  1729.  
  1730. end
  1731.  
  1732.  
  1733.  
  1734. function ReloadStart(once)
  1735.  
  1736. Reloading = true
  1737.  
  1738. HW.Part1 = nil
  1739.  
  1740. LHW.Part1 = Pipe2
  1741.  
  1742. for i = 0.25, 1, 0.25 do
  1743.  
  1744. RAW.C0 = CA(MR(90-10*i), 0, MR(-65+10*i)) * CN(0.6-0.2*i, -0.9+0.15*i, 0)
  1745.  
  1746. LAW.C0 = CA(MR(85-5*i), MR(7*i), MR(-40+5*i)) * CN(0.5, -0.5, 0)
  1747.  
  1748. LHW.C0 = CA(MR(-2-8*i), MR(30+5*i), MR(-3-12*i)) * CN(-0.1-0.1*i, 0.32-0.12*i, -0.24)
  1749.  
  1750. wait()
  1751.  
  1752. end
  1753.  
  1754. for i = 0.15, 1, 0.15 do
  1755.  
  1756. RAW.C0 = CA(MR(80-35*i), 0, MR(-55+40*i)) * CN(0.4-0.4*i, -0.75+0.6*i, 0)
  1757.  
  1758. LAW.C0 = CA(MR(80-30*i), MR(7+33*i), MR(-35+20*i)) * CN(0.5, -0.5, 0)
  1759.  
  1760. LHW.C0 = CA(MR(-10-25*i), MR(35+25*i), MR(-15-30*i)) * CN(-0.2-0.4*i, 0.2, -0.24)
  1761.  
  1762. wait()
  1763.  
  1764. end
  1765.  
  1766. Reload(once)
  1767.  
  1768. Normal()
  1769.  
  1770. Reloading = false
  1771.  
  1772. end
  1773.  
  1774.  
  1775.  
  1776. function AimEet()
  1777.  
  1778. end
  1779.  
  1780.  
  1781.  
  1782. function Shoot(Start, To)
  1783.  
  1784. local Accu = CA(MR(MRA(-Accuracy.Momentum*1000, Accuracy.Momentum*1000)/1700), MR(MRA(-Accuracy.Momentum*1000, Accuracy.Momentum*1000)/1000), MR(MRA(-Accuracy.Momentum*1000, Accuracy.Momentum*1000)/1000))
  1785.  
  1786. for Pellets = 1, 8 do
  1787.  
  1788. local Power = 20
  1789.  
  1790. local Drop = 0.2
  1791.  
  1792. local Face = CN(Start, To) * Accu * CA(MR(MRA(-10000, 10000)/2500), MR(MRA(-10000, 10000)/2500), MR(MRA(-10000, 10000)/2500))
  1793.  
  1794. local Pellet = Part(PelletModel, true, false, 0, 0, BN("Dark grey"), V3(0.2, 0.2, 0.3))
  1795.  
  1796. Pellet.CFrame = Face
  1797.  
  1798. local LastPoint = Face.p
  1799.  
  1800. Notime(function()
  1801.  
  1802. local HitObj
  1803.  
  1804. local HitPos
  1805.  
  1806. local DistThing = 250
  1807.  
  1808. for Distance = Power, 600, Power do
  1809.  
  1810. Face = Face * CA(MR(-Drop), 0, 0) * CN(0, 0, -Power)
  1811.  
  1812. local PointNow = Face.p
  1813.  
  1814. local Hit, Pos = RayC(LastPoint, PointNow, Power+2, EffectModel)
  1815.  
  1816. if Hit then
  1817.  
  1818. DistThing = Distance
  1819.  
  1820. if DistThing > 250 then DistThing = 200 end
  1821.  
  1822. PointNow = Pos
  1823.  
  1824. HitPos = Pos
  1825.  
  1826. HitObj = Hit
  1827.  
  1828. end
  1829.  
  1830. local Dist = (PointNow - LastPoint).magnitude
  1831.  
  1832. Pellet.CFrame = Face
  1833.  
  1834. Drop = Drop + 0.04
  1835.  
  1836. local Effect = Part(EffectModel, true, false, 0, 0, BN("White"), V3(0.2, 0.2, 0.2))
  1837.  
  1838. Effect.CFrame = CN(LastPoint, PointNow) * CA(MR(-90), 0, 0) * CN(0, Dist/2, 0)
  1839.  
  1840. local H = Add.Head(Effect, V3(0.8, Dist*5, 0.8))
  1841.  
  1842. LastPoint = Face.p
  1843.  
  1844. Power = Power - Drop/3
  1845.  
  1846. Notime(function()
  1847.  
  1848. for i = 0, 1, 0.2 do
  1849.  
  1850. wait()
  1851.  
  1852. Effect.Transparency = i
  1853.  
  1854. end
  1855.  
  1856. Effect:remove()
  1857.  
  1858. end)
  1859.  
  1860. if Hit then
  1861.  
  1862. Pellet.CFrame = CN(Pos)
  1863.  
  1864. break
  1865.  
  1866. end
  1867.  
  1868. wait()
  1869.  
  1870. end
  1871.  
  1872. Pellet:remove()
  1873.  
  1874. if HitObj then
  1875.  
  1876. local Surface = DetectSurface(HitPos, HitObj)
  1877.  
  1878. local C = CN(HitPos) * CA(HitObj.CFrame:toEulerAnglesXYZ()) * Surface[2]
  1879.  
  1880. if Surface[1] == "Anything" then
  1881.  
  1882. C = Surface[2]
  1883.  
  1884. end
  1885.  
  1886. local H = nil
  1887.  
  1888. if HitObj.Parent ~= workspace then
  1889.  
  1890. H = GetHum(HitObj.Parent)
  1891.  
  1892. if HitObj.Parent.Parent ~= workspace and H == nil then
  1893.  
  1894. H = GetHum(HitObj.Parent.Parent)
  1895.  
  1896. end
  1897.  
  1898. end
  1899.  
  1900. if H then
  1901.  
  1902. local Dmg = DistThing/200
  1903.  
  1904. Dmg = (1-Dmg)*15
  1905.  
  1906. Dmg = MRA(Dmg*850, Dmg*1100)/1000
  1907.  
  1908. H.Health = H.Health - Dmg
  1909.  
  1910. PlaySound(Sounds.Hit)
  1911.  
  1912. Show_Damage(HitObj.Position, math.floor(Dmg), 1.5)
  1913.  
  1914. else
  1915.  
  1916. PlaySound(Sounds.PartHit)
  1917.  
  1918. local BulletHole = Part(EffectModel, true, false, 1, 0, BN("White"), V3(0.8, 0.2, 0.8))
  1919.  
  1920. BulletHole.CFrame = C * CN(0, -0.085, 0)
  1921.  
  1922. local Dec = Instance.new("Decal",BulletHole)
  1923.  
  1924. Dec.Texture = Images[MRA(1,#Images)]
  1925.  
  1926. Dec.Face = "Top"
  1927.  
  1928. if not HitObj.Anchored then
  1929.  
  1930. BulletHole.Anchored = false
  1931.  
  1932. local W = Weld(HitObj, BulletHole, HitObj.CFrame:toObjectSpace(C))
  1933.  
  1934. end
  1935.  
  1936. Notime(function()
  1937.  
  1938. wait(MRA(700, 15000)/100)
  1939.  
  1940. BulletHole:remove()
  1941.  
  1942. end)
  1943.  
  1944. end
  1945.  
  1946. end
  1947.  
  1948. end)
  1949.  
  1950. end
  1951.  
  1952. end
  1953.  
  1954.  
  1955.  
  1956. function ShootAnim(From, To)
  1957.  
  1958. Shoot(From, To)
  1959.  
  1960. AddInaccuracy(16)
  1961.  
  1962. PlaySound(Sounds.Fire, false)
  1963.  
  1964. for i = 0.33, 1, 0.33 do
  1965.  
  1966. RAW.C0 = CA(MR(90+10*i), 0, MR(-65)) * CN(0.6, -0.9+0.5*i, 0)
  1967.  
  1968. LAW.C0 = CA(MR(85+26*i), 0, MR(-40)) * CN(0.5, -0.5+0.1*i, 0)
  1969.  
  1970. HW.C0 = CA(MR(-15*i), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  1971.  
  1972. wait()
  1973.  
  1974. end
  1975.  
  1976. for i = 0.2, 1, 0.2 do
  1977.  
  1978. RAW.C0 = CA(MR(100+5*i), 0, MR(-65)) * CN(0.6, -0.4+0.15*i, 0)
  1979.  
  1980. LAW.C0 = CA(MR(111+4*i), 0, MR(-40)) * CN(0.5, -0.4+0.05*i, 0)
  1981.  
  1982. HW.C0 = CA(MR(-15-2*i), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  1983.  
  1984. wait()
  1985.  
  1986. end
  1987.  
  1988. for i = 0.5, 1, 0.5 do
  1989.  
  1990. RAW.C0 = CA(MR(105+2*i), 0, MR(-65)) * CN(0.6, -0.25+0.03*i, 0)
  1991.  
  1992. LAW.C0 = CA(MR(115+2*i), 0, MR(-40)) * CN(0.5, -0.35+0.02*i, 0)
  1993.  
  1994. HW.C0 = CA(MR(-17), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  1995.  
  1996. wait()
  1997.  
  1998. end
  1999.  
  2000. for i = 0.2, 1, 0.2 do
  2001.  
  2002. RAW.C0 = CA(MR(107-12*i), 0, MR(-65)) * CN(0.6, -0.22-0.68*i, 0)
  2003.  
  2004. LAW.C0 = CA(MR(117-17*i), 0, MR(-40)) * CN(0.5, -0.33-0.02*i, 0)
  2005.  
  2006. HW.C0 = CA(MR(-17+2*i), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  2007.  
  2008. wait()
  2009.  
  2010. end
  2011.  
  2012. for i = 0.33, 1, 0.33 do
  2013.  
  2014. RAW.C0 = CA(MR(95-5*i), 0, MR(-65)) * CN(0.6, -0.9-0.1*i, 0)
  2015.  
  2016. LAW.C0 = CA(MR(100-5*i), 0, MR(-40)) * CN(0.5+0.1*i, -0.35+0.1*i, 0)
  2017.  
  2018. HW.C0 = CA(MR(-15+11*i), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  2019.  
  2020. PumpWeld.C1 = CN(0, 0, 0.1*i)
  2021.  
  2022. wait()
  2023.  
  2024. end
  2025.  
  2026. for i = 0.33, 1, 0.33 do
  2027.  
  2028. RAW.C0 = CA(MR(90-3*i), 0, MR(-65)) * CN(0.6, -1+0.05*i, 0)
  2029.  
  2030. LAW.C0 = CA(MR(95-5*i), 0, MR(-40)) * CN(0.6+0.2*i, -0.25+0.35*i, 0)
  2031.  
  2032. HW.C0 = CA(MR(-4+4*i), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  2033.  
  2034. PumpWeld.C1 = CN(0, 0, 0.1+0.6*i)
  2035.  
  2036. Flip.C1 = CN(0, 0, 0.5*i)
  2037.  
  2038. wait()
  2039.  
  2040. end
  2041.  
  2042. local sh = Shell(workspace)
  2043.  
  2044. sh.Main.CanCollide = true
  2045.  
  2046. sh.Back.CanCollide = true
  2047.  
  2048. sh.Main.CFrame = Handle3.CFrame * CN(0.3, 0.2, 0)
  2049.  
  2050. sh.Main.Velocity = (Handle3.CFrame * CA(0, MR(90), 0)).lookVector * 15
  2051.  
  2052. Notime(function()
  2053.  
  2054. wait(MRA(100,180)/10)
  2055.  
  2056. for i = 0, 1, 0.005 do
  2057.  
  2058. sh.Main.Transparency = i
  2059.  
  2060. sh.Back.Transparency = i
  2061.  
  2062. wait()
  2063.  
  2064. end
  2065.  
  2066. sh.Model:remove()
  2067.  
  2068. end)
  2069.  
  2070. for i = 0.33, 1, 0.33 do
  2071.  
  2072. RAW.C0 = CA(MR(87+3*i), 0, MR(-65)) * CN(0.6, -0.95+0.05*i, 0)
  2073.  
  2074. LAW.C0 = CA(MR(90-5*i), 0, MR(-40)) * CN(0.8-0.3*i, 0.1-0.6*i, 0)
  2075.  
  2076. HW.C0 = CA(0, MR(5), 0) * CN(0.4, 0, -1.2)
  2077.  
  2078. PumpWeld.C1 = CN(0, 0, 0.7-0.7*i)
  2079.  
  2080. Flip.C1 = CN(0, 0, 0.5-0.5*i)
  2081.  
  2082. wait()
  2083.  
  2084. end
  2085.  
  2086. Normal()
  2087.  
  2088. end
  2089.  
  2090.  
  2091.  
  2092. function ShootFunc(From, To)
  2093.  
  2094. local H, Pos = RayC(From, To, 10, EffectModel)
  2095.  
  2096. local Can = true
  2097.  
  2098. if H then
  2099.  
  2100. if H:IsDescendantOf(Char) then
  2101.  
  2102. Can = false
  2103.  
  2104. end
  2105.  
  2106. end
  2107.  
  2108. if Can then
  2109.  
  2110. Attacking = true
  2111.  
  2112. Ammunition.Ammo = Ammunition.Ammo - 1
  2113.  
  2114. if Ammunition.Ammo < 0 then Ammunition.Ammo = 0 end
  2115.  
  2116. ShootAnim(From, To)
  2117.  
  2118. Attacking = false
  2119.  
  2120. end
  2121.  
  2122. end
  2123.  
  2124.  
  2125.  
  2126. function SelectAnim()
  2127.  
  2128. RAW.Part1 = Rarm
  2129.  
  2130. for i = 0.25, 1, 0.25 do
  2131.  
  2132. RAW.C0 = CA(MR(-10*i), 0, MR(2*i))
  2133.  
  2134. wait()
  2135.  
  2136. end
  2137.  
  2138. for i = 0.1, 1, 0.1 do
  2139.  
  2140. RAW.C0 = CN(-0.15*i, 0, -0.45*i) * CA(MR(-10-115*i), 0, MR(2+8*i)) * CN(0, -0.4*i, 0)
  2141.  
  2142. wait()
  2143.  
  2144. end
  2145.  
  2146. for i = 0.25, 1, 0.25 do
  2147.  
  2148. RAW.C0 = CN(-0.15, 0, -0.45-0.05*i) * CA(MR(-125-15*i), 0, MR(10)) * CN(0, -0.4, 0)
  2149.  
  2150. wait()
  2151.  
  2152. end
  2153.  
  2154. TW.Part1 = nil
  2155.  
  2156. HW.Part1 = Handle
  2157.  
  2158. for i = 0.25, 1, 0.25 do
  2159.  
  2160. RAW.C0 = CN(-0.15+0.15*i, 0, -0.5+0.1*i) * CA(MR(-140+10*i), 0, MR(10+2*i)) * CN(0, -0.4+0.15*i, 0)
  2161.  
  2162. HW.C0 = CA(MR(38+12*i), MR(-28-15*i), MR(-90-10*i)) * CN(0, -0.1*i, -3.8)
  2163.  
  2164. wait()
  2165.  
  2166. end
  2167.  
  2168. Attach(FTorso)
  2169.  
  2170. for i = 0.1, 1, 0.1 do
  2171.  
  2172. RAW.C0 = CN(0, 0, -0.4+0.3*i) * CA(MR(-130+90*i), 0, MR(12+30*i)) * CN(0, -0.25+0.25*i, 0)
  2173.  
  2174. HW.C0 = CA(MR(50+30*i), MR(-43-50*i), MR(-100-50*i)) * CN(0, -0.1-0.7*i, -3.8+0.7*i)
  2175.  
  2176. FW.C0 = CA(0, MR(-15*i), 0)
  2177.  
  2178. wait()
  2179.  
  2180. end
  2181.  
  2182. LAW.Part1 = Larm
  2183.  
  2184. for i = 0.15, 1, 0.15 do
  2185.  
  2186. RAW.C0 = CN(0, 0, -0.1+0.1*i) * CA(MR(-40+60*i), 0, MR(42+4*i))
  2187.  
  2188. LAW.C0 = CA(MR(10*i), 0, MR(-8*i)) * CN(0, -0.15*i, 0)
  2189.  
  2190. FW.C0 = CA(0, MR(-15-20*i), 0)
  2191.  
  2192. HW.C0 = CA(MR(80+50*i), MR(-93-57*i), MR(-150-30*i)) * CN(0, -0.8, -3.1+1*i)
  2193.  
  2194. wait()
  2195.  
  2196. end
  2197.  
  2198. for i = 0.15, 1, 0.15 do
  2199.  
  2200. RAW.C0 = CA(MR(20+58*i), 0, MR(46-60*i)) * CN(0.2*i, -0.35*i, 0)
  2201.  
  2202. LAW.C0 = CA(MR(10+65*i), 0, MR(-8-32*i)) * CN(0.3*i, -0.15-0.25*i, 0)
  2203.  
  2204. FW.C0 = CA(0, MR(-35-30*i), 0)
  2205.  
  2206. HW.C0 = CA(MR(130+50*i), MR(-150-20*i), MR(-180)) * CN(0.25*i, -0.8+0.3*i, -2.1+0.9*i)
  2207.  
  2208. wait()
  2209.  
  2210. end
  2211.  
  2212. for i = 0.2, 1, 0.2 do
  2213.  
  2214. RAW.C0 = CA(MR(78+8*i), 0, MR(-14-41*i)) * CN(0.2+0.35*i, -0.35-0.55*i, 0)
  2215.  
  2216. LAW.C0 = CA(MR(75+7*i), 0, MR(-40)) * CN(0.3+0.15*i, -0.4-0.06*i, 0)
  2217.  
  2218. FW.C0 = CA(0, MR(-65-5*i), 0)
  2219.  
  2220. HW.C0 = CA(MR(0), MR(-10+10*i), MR(0)) * CN(0.25+0.1*i, -0.5+0.4*i, -1.2)
  2221.  
  2222. wait()
  2223.  
  2224. end
  2225.  
  2226. for i = 0.25, 1, 0.25 do
  2227.  
  2228. RAW.C0 = CA(MR(86+4*i), 0, MR(-55-10*i)) * CN(0.55+0.05*i, -0.8-0.1*i, 0)
  2229.  
  2230. LAW.C0 = CA(MR(82+3*i), 0, MR(-40)) * CN(0.45+0.05*i, -0.46-0.04*i, 0)
  2231.  
  2232. FW.C0 = CA(0, MR(-70), 0)
  2233.  
  2234. HW.C0 = CA(MR(0), MR(5*i), MR(0)) * CN(0.35+0.05*i, -0.1+0.1*i, -1.2)
  2235.  
  2236. wait()
  2237.  
  2238. end
  2239.  
  2240. end
  2241.  
  2242.  
  2243.  
  2244. function DeselAnim()
  2245.  
  2246. for i = 0.25, 1, 0.25 do
  2247.  
  2248. RAW.C0 = CA(MR(90-10*i), 0, MR(-65+10*i)) * CN(0.6-0.05*i, -0.9+0.35*i, 0)
  2249.  
  2250. LAW.C0 = CA(MR(85-10*i), 0, MR(-40+4*i)) * CN(0.5-0.05*i, -0.5+0.04*i, 0)
  2251.  
  2252. FW.C0 = CA(0, MR(-70+10*i), 0)
  2253.  
  2254. HW.C0 = CA(MR(180-10*i), MR(-185+10*i), MR(180-10*i)) * CN(0.4-0.05*i, -0.1*i, -1.2)
  2255.  
  2256. wait()
  2257.  
  2258. end
  2259.  
  2260. for i = 0.07, 1, 0.07 do
  2261.  
  2262. RAW.C0 = CA(MR(80-80*i), 0, MR(-55+90*i)) * CN(0.55-0.35*i, -0.55+0.55*i, 0)
  2263.  
  2264. LAW.C0 = CA(MR(75-70*i), 0, MR(-36+30*i)) * CN(0.45-0.35*i, -0.46+0.36*i, 0)
  2265.  
  2266. FW.C0 = CA(0, MR(-60+40*i), 0)
  2267.  
  2268. HW.C0 = CA(MR(170-70*i), MR(-175+70*i), MR(170-70*i)) * CN(0.35-0.35*i, -0.1-0.1*i, -1.2-1*i)
  2269.  
  2270. wait()
  2271.  
  2272. end
  2273.  
  2274. for i = 0.25, 1, 0.25 do
  2275.  
  2276. RAW.C0 = CN(-0.1*i, 0, -0.15*i) * CA(MR(-30*i), 0, MR(35+10*i)) * CN(0.2-0.2*i, 0, 0)
  2277.  
  2278. LAW.C0 = CA(MR(5-5*i), 0, MR(-6+6*i)) * CN(0.1-0.1*i, -0.1+0.1*i, 0)
  2279.  
  2280. FW.C0 = CA(0, MR(-20+15*i), 0)
  2281.  
  2282. HW.C0 = CA(MR(100-20*i), MR(-105+15*i), MR(100-15*i)) * CN(0, -0.2, -2.2-0.3*i)
  2283.  
  2284. wait()
  2285.  
  2286. end
  2287.  
  2288. LAW.Part1 = nil
  2289.  
  2290. for i = 0.12, 1, 0.12 do
  2291.  
  2292. RAW.C0 = CN(-0.1-0.05*i, 0, -0.15-0.3*i) * CA(MR(-30-100*i), 0, MR(45-30*i)) * CN(0, -0.3*i, 0)
  2293.  
  2294. FW.C0 = CA(0, MR(-5+5*i), 0)
  2295.  
  2296. HW.C0 = CA(MR(80-37*i), MR(-90+55*i), MR(85-135*i)) * CN(0, -0.2, -2.5-0.9*i)
  2297.  
  2298. wait()
  2299.  
  2300. end
  2301.  
  2302. Attach(Torso)
  2303.  
  2304. for i = 0.2, 1, 0.2 do
  2305.  
  2306. RAW.C0 = CN(-0.15*i, 0, -0.45-0.05*i) * CA(MR(-130-10*i), 0, MR(15-5*i)) * CN(0, -0.3-0.1*i, 0)
  2307.  
  2308. HW.C0 = CA(MR(43-5*i), MR(-35+7*i), MR(-50-40*i)) * CN(0, -0.2, -3.4-0.4*i)
  2309.  
  2310. wait()
  2311.  
  2312. end
  2313.  
  2314. TW.Part1 = Handle
  2315.  
  2316. HW.Part1 = nil
  2317.  
  2318. for i = 0.25, 1, 0.25 do
  2319.  
  2320. RAW.C0 = CN(-0.15+0.05*i, 0, -0.5+0.15*i) * CA(MR(-140+10*i), 0, MR(10-3*i)) * CN(0, -0.4+0.1*i, 0)
  2321.  
  2322. wait()
  2323.  
  2324. end
  2325.  
  2326. for i = 0.15, 1, 0.15 do
  2327.  
  2328. RAW.C0 = CN(-0.1+0.1*i, 0, -0.35+0.25*i) * CA(MR(-130+115*i), 0, MR(7-7*i)) * CN(0, -0.3+0.25*i, 0)
  2329.  
  2330. wait()
  2331.  
  2332. end
  2333.  
  2334. for i = 0.33, 1, 0.33 do
  2335.  
  2336. RAW.C0 = CN(0, 0, -0.1+0.1*i) * CA(MR(-15+15*i), 0, 0) * CN(0, -0.05+0.05*i, 0)
  2337.  
  2338. wait()
  2339.  
  2340. end
  2341.  
  2342. Attach(Torso)
  2343.  
  2344. TW.Part1 = Handle
  2345.  
  2346. HW.Part1 = nil
  2347.  
  2348. RAW.Part1 = nil
  2349.  
  2350. LAW.Part1 = nil
  2351.  
  2352. end
  2353.  
  2354.  
  2355.  
  2356. function ReloadFunc(once)
  2357.  
  2358. if Ammunition.Ammo < Ammunition.MaxAmmo and Selected and not Reloading and not Attacking and Ammunition.Ammoleft > 0 then
  2359.  
  2360. if not once then
  2361.  
  2362. ReloadHold = true
  2363.  
  2364. end
  2365.  
  2366. ReloadStart(once)
  2367.  
  2368. end
  2369.  
  2370. end
  2371.  
  2372.  
  2373.  
  2374. function onSelected(mouse)
  2375.  
  2376. SelectAnim()
  2377.  
  2378. mouse.Icon = Icon
  2379.  
  2380. Selected = true
  2381.  
  2382. Notime(function()
  2383.  
  2384. for _, g in pairs(AccuracyGuis) do
  2385.  
  2386. g.Gui.Transparency = 0.2
  2387.  
  2388. end
  2389.  
  2390. while Selected do
  2391.  
  2392. pcall(function()
  2393.  
  2394. for _, g in pairs(AccuracyGuis) do
  2395.  
  2396. g.Gui.Position = UD(0, mouse.X+g.props.offset.x+g.props.unit.x*(Accuracy.Momentum*11), 0, mouse.Y+g.props.offset.y+g.props.unit.y*(Accuracy.Momentum*11))
  2397.  
  2398. end
  2399.  
  2400. end)
  2401.  
  2402. wait()
  2403.  
  2404. end
  2405.  
  2406. end)
  2407.  
  2408. mouse.Button1Down:connect(function()
  2409.  
  2410. if Selected and not Attacking and not Swinging then
  2411.  
  2412. if Reloading then
  2413.  
  2414. ReloadHold = false
  2415.  
  2416. else
  2417.  
  2418. if Ammunition.Ammo < 1 then
  2419.  
  2420. ReloadFunc(true)
  2421.  
  2422. else
  2423.  
  2424. ShootFunc((Pipe1.CFrame * CN(0, 0, 1.65)).p, mouse.Hit.p)
  2425.  
  2426. end
  2427.  
  2428. if Ammunition.Ammo < 1 and Ammunition.Ammoleft < 1 then
  2429.  
  2430. PlaySound(Sounds.Out)
  2431.  
  2432. end
  2433.  
  2434. end
  2435.  
  2436. end
  2437.  
  2438. end)
  2439.  
  2440. mouse.KeyDown:connect(function(key)
  2441.  
  2442. key = key:lower()
  2443.  
  2444. if Selected and not Attacking and not Swinging then
  2445.  
  2446. if key == "r" then
  2447.  
  2448. ReloadFunc()
  2449.  
  2450. elseif key == "e" then
  2451.  
  2452. Swing()
  2453.  
  2454. end
  2455.  
  2456. end
  2457.  
  2458. end)
  2459.  
  2460. mouse.KeyUp:connect(function(key)
  2461.  
  2462. key = key:lower()
  2463.  
  2464. if key == "r" then
  2465.  
  2466. ReloadHold = false
  2467.  
  2468. end
  2469.  
  2470. end)
  2471.  
  2472. end
  2473.  
  2474.  
  2475.  
  2476. function onDeselected(mouse)
  2477.  
  2478. Selected = false
  2479.  
  2480. for _, g in pairs(AccuracyGuis) do
  2481.  
  2482. g.Gui.Transparency = 1
  2483.  
  2484. end
  2485.  
  2486. DeselAnim()
  2487.  
  2488. end
  2489.  
  2490.  
  2491.  
  2492. bin.Selected:connect(onSelected)
  2493.  
  2494. bin.Deselected:connect(onDeselected)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement