Advertisement
memberhero

woot

Dec 7th, 2017
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.24 KB | None | 0 0
  1. Hopperbin = Instance.new("HopperBin")
  2. Hopperbin.Parent = game.Players.LocalPlayer.Backpack
  3. Players = game:GetService("Players")
  4. Me = Players.LocalPlayer
  5. Char = Me.Character
  6. necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  7. Asset = "http://www.roblox.com/asset/?id="
  8. EffectModel = nil
  9. MeleeDmg = 200
  10. Accuracy = {Minimum = 2, Maximum = 5.5, Momentum = 2}
  11. Selected = false
  12. ReloadFlash = false
  13. Attacking = false
  14. ReloadHold = false
  15. Reloading = false
  16. Swinging = false
  17. Aiming = false
  18. ReloadOn = false
  19. Debounce = true
  20. Hurt = false
  21. ModelName = "Weapon"
  22. ToolName = "Weapon"
  23. Icon = Asset..(58334502)
  24. function ReNew()
  25. if EffectModel then
  26. if EffectModel.Parent ~= workspace then
  27. pcall(function() EffectModel:remove() end)
  28. EffectModel = Instance.new("Model",workspace)
  29. EffectModel.Name = "Effects"
  30. end
  31. else
  32. EffectModel = Instance.new("Model",workspace)
  33. EffectModel.Name = "Effects"
  34. end
  35. end
  36. Ammunition = {
  37. MaxAmmo = 500,
  38. Ammo = 500,
  39. Ammoleft = 5000,
  40. }
  41. Images = {
  42. Asset..(64291927),
  43. Asset..(64291941),
  44. Asset..(64291961),
  45. Asset..(64291977),
  46. }
  47. Sounds = {
  48. Fire = {Id = Asset..(2697294), Pitch = 0.92, Volume = 0.8},
  49. Reload = {Id = Asset..(2697295), Pitch = 1, Volume = 0.5},
  50. Slash = {Id = "rbxasset://sounds//swordslash.wav", Pitch = 1.2, Volume = 0.6},
  51. Out = {Id = "rbxasset://sounds\\clickfast.wav", Pitch = 1.4, Volume = 0.6},
  52. Hit = {Id = Asset..(10209590), Pitch = 1.1, Volume = 0.45},
  53. PartHit = {Id = "rbxasset://sounds\\metal.ogg", Pitch = 1, Volume = 0.2},
  54. }
  55. ContentProvider = game:GetService("ContentProvider")
  56. for _,v in pairs(Images) do ContentProvider:Preload(v) end
  57. V3 = Vector3.new
  58. C3 = Color3.new
  59. BN = BrickColor.new
  60. CN = CFrame.new
  61. CA = CFrame.Angles
  62. MR = math.rad
  63. MRA = math.random
  64. MP = math.pi
  65. MH = math.huge
  66. UD = UDim2.new
  67. function RC(Pos, Dir, Max, Ignore)
  68. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999)), Ignore)
  69. end
  70. function RayC(Start, En, MaxDist, Ignore)
  71. return RC(Start, (En - Start), MaxDist, Ignore)
  72. end
  73. function ComputePos(pos1, pos2)
  74. return CN(pos1, V3(pos2.x, pos1.y, pos2.z))
  75. end
  76. function DetectSurface(pos, part)
  77. local surface = nil
  78. local pospos = part.CFrame
  79. local pos2 = pospos:pointToObjectSpace(pos)
  80. local siz = part.Size
  81. local shaep = part.Shape
  82. if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
  83. surface = {"Anything", CN(pospos.p, pos)*CN(0, 0, -(pospos.p - pos).magnitude+0.12)*CA(MR(-90), 0, 0)}
  84. else
  85. if pos2.Y > ((siz.Y/2)-0.01) then
  86. surface = {"Top", CA(0, 0, 0)}
  87. elseif pos2.Y < -((siz.Y/2)-0.01) then
  88. surface = {"Bottom", CA(-MP, 0, 0)}
  89. elseif pos2.X > ((siz.X/2)-0.01) then
  90. surface = {"Right", CA(0, 0, MR(-90))}
  91. elseif pos2.X < -((siz.X/2)-0.01) then
  92. surface = {"Left", CA(0, 0, MR(90))}
  93. elseif pos2.Z > ((siz.Z/2)-0.01) then
  94. surface = {"Back", CA(MR(90), 0, 0)}
  95. elseif pos2.Z < -((siz.Z/2)-0.01) then
  96. surface = {"Front", CA(MR(-90), 0, 0)}
  97. end
  98. end
  99. return surface
  100. end
  101. function Compute(pos1, pos2)
  102. local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
  103. return CN(pos1, pos3)
  104. end
  105. function waitChild(n, p)
  106. local c = p:findFirstChild(n)
  107. if c then return c end
  108. while true do
  109. c = p.ChildAdded:wait()
  110. if c.Name == n then return c end
  111. end
  112. end
  113. function Notime(func)
  114. coroutine.resume(coroutine.create(function()
  115. func()
  116. end))
  117. end
  118. local C3 = Color3.new
  119. local UD = UDim2.new
  120. local V2 = Vector2.new
  121. Torso = waitChild("Torso", Char)
  122. Head = waitChild("Head", Char)
  123. Rarm = waitChild("Right Arm", Char)
  124. Larm = waitChild("Left Arm", Char)
  125. Rleg = waitChild("Right Leg", Char)
  126. Lleg = waitChild("Left Leg", Char)
  127. Neck = waitChild("Neck", Torso)
  128. Hum = waitChild("Humanoid", Char)
  129. RSH = waitChild("Right Shoulder", Torso)
  130. LSH = waitChild("Left Shoulder", Torso)
  131. RH = waitChild("Right Hip", Torso)
  132. LH = waitChild("Left Hip", Torso)
  133. RSH.Part0 = Torso
  134. LSH.Part0 = Torso
  135. RH.Part0 = Torso
  136. LH.Part0 = Torso
  137. local Classes = {"Frame", "ImageLabel", "ImageButton", "TextLabel", "TextButton", "TextBox"}
  138. function Make(Class, Par, Size, Pos, Color, Trans, Border, Borderc, Txt, TxtC, Img)
  139. local Mk = "Frame"
  140. for _,v in pairs(Classes) do
  141. if Class == v then
  142. Mk = v
  143. end
  144. end
  145. local g = Instance.new(Mk)
  146. g.Size = Size
  147. g.Position = Pos
  148. g.BackgroundColor3 = Color
  149. g.Transparency = Trans
  150. g.BorderSizePixel = Border
  151. g.BorderColor3 = Borderc
  152. if Mk == "TextButton" or Mk == "TextLabel" or Mk == "TextBox" then
  153. g.Text = Txt
  154. g.TextColor3 = TxtC
  155. elseif Mk == "ImageLabel" or Mk == "ImageButton" then
  156. g.Image = Img
  157. end
  158. g.Parent = Par
  159. return g
  160. end
  161. Gui = Me:findFirstChild("PlayerGui")
  162. if Gui then
  163. for _,v in pairs(Gui:children()) do if v.Name == "Weapon GUI" then v:remove() end end
  164. end
  165. Screen = Instance.new("ScreenGui")
  166. Screen.Name = "Weapon GUI"
  167. AmmoTable = {}
  168. AccuracyGuis = {}
  169. lul = {
  170. {unit = V2(0, -1), size = V2(2, 25), offset = V2(-1, -1-25)},
  171. {unit = V2(1, 0), size = V2(25, 2), offset = V2(1, -1)},
  172. {unit = V2(0, 1), size = V2(2, 25), offset = V2(-1, -1)},
  173. {unit = V2(-1, 0), size = V2(25, 2), offset = V2(-1-25, -1)}
  174. }
  175. 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())
  176. for i = 1, Ammunition.MaxAmmo, 1 do
  177. 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())
  178. table.insert(AmmoTable, Fr)
  179. end
  180. AmmoAtm = Make("TextLabel", Main, UD(0, 0, 0, 0), UD(0, 8, 0.5, 0), C3(), 0, 0, C3(), "0", C3(1, 1, 1))
  181. AmmoAtm.BackgroundTransparency = 1
  182. AmmoAtm.TextXAlignment = "Left"
  183. AmmoAtm.Font = "ArialBold"
  184. AmmoAtm.FontSize = "Size18"
  185. AmmoLeft = Make("TextLabel", Main, UD(0, 0, 0, 0), UD(1, -8, 0.5, 0), C3(), 0, 0, C3(), "40", C3(1, 1, 1))
  186. AmmoLeft.BackgroundTransparency = 1
  187. AmmoLeft.TextXAlignment = "Right"
  188. AmmoLeft.Font = "ArialBold"
  189. AmmoLeft.FontSize = "Size18"
  190. 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))
  191. ReloadGui.TextXAlignment = "Right"
  192. ReloadGui.Font = "ArialBold"
  193. ReloadGui.FontSize = "Size24"
  194. for _, prop in pairs(lul) do
  195. 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())
  196. table.insert(AccuracyGuis, {Gui = g, props = prop})
  197. end
  198. Screen.Parent = Gui
  199. local Offset = 0.1
  200. local Thing = 1
  201. local Speed1 = 0.1
  202. local Speed2 = 0
  203. local TempAcc = 0
  204. local AccTimesMax = 17
  205. local AccTime = 1.25
  206. local AccTimes = AccTimesMax
  207. local AccOn = false
  208. function AddInaccuracy(Acc)
  209. TempAcc = Acc
  210. end
  211. Notime(function()
  212. while true do
  213. ReNew()
  214. AmmoAtm.Text = Ammunition.Ammo
  215. AmmoLeft.Text = Ammunition.Ammoleft
  216. for i,v in pairs(AmmoTable) do
  217. v.Transparency = 1
  218. end
  219. for i = 1, Ammunition.Ammo do
  220. AmmoTable[i].Transparency = 0.6
  221. end
  222. if Ammunition.Ammo <= Ammunition.MaxAmmo/4 then ReloadFlash = true else ReloadFlash = false end
  223. local Speed = Torso.Velocity.magnitude
  224. Offset = 0
  225. if Speed > 1 then
  226. Speed1 = Speed
  227. Thing = Thing*1.2
  228. else
  229. Speed2 = Speed
  230. local lol = 1.4
  231. if AccOn then lol = AccTime end
  232. Thing = Thing/lol
  233. end
  234. if TempAcc ~= 0 then
  235. Speed1 = TempAcc
  236. Thing = TempAcc/2
  237. AccOn = true
  238. if TempAcc ~= 0 then
  239. AccTimes = AccTimes - 1
  240. if AccTimes < 1 then AccTimes = AccTimesMax Notime(function() wait(0.4) AccOn = false end) TempAcc = 0 end
  241. end
  242. end
  243. if Thing < 1 then Thing = 1 elseif Thing > 14 then Thing = 14 end
  244. Offset = Accuracy.Minimum + ((Speed1 - Speed1/Thing)/(Speed1 - Speed1/14))*Accuracy.Maximum
  245. Accuracy.Momentum = Offset
  246. wait()
  247. end
  248. end)
  249. Notime(function()
  250. while true do
  251. if ReloadFlash then
  252. if ReloadOn then
  253. ReloadOn = false
  254. ReloadGui.Transparency = 1
  255. else
  256. ReloadOn = true
  257. ReloadGui.Transparency = 0
  258. end
  259. else
  260. ReloadGui.Transparency = 1
  261. end
  262. wait(0.4)
  263. end
  264. end)
  265. Add = {
  266. Head = function(P, Scale)
  267. local m = Instance.new("SpecialMesh")
  268. m.MeshType = "Head"
  269. m.Scale = Scale or V3(1, 1, 1)
  270. m.Parent = P
  271. return m
  272. end,
  273. Sphere = function(P, Scale)
  274. local m = Instance.new("SpecialMesh")
  275. m.MeshType = "Sphere"
  276. m.Scale = Scale or V3(1, 1, 1)
  277. m.Parent = P
  278. return m
  279. end,
  280. Wedge = function(P, Scale)
  281. local m = Instance.new("SpecialMesh")
  282. m.MeshType = "Wedge"
  283. m.Scale = Scale or V3(1, 1, 1)
  284. m.Parent = P
  285. return m
  286. end,
  287. Block = function(P, Scale, Bevel)
  288. local m = Instance.new("BlockMesh")
  289. m.Scale = Scale or V3(1,1,1)
  290. m.Parent = P
  291. return m
  292. end
  293. }
  294. for _,v in pairs(Sounds) do
  295. ContentProvider:Preload(v.Id)
  296. end
  297. function PlaySound(Sound, bool)
  298. Pitch = Sound.Pitch
  299. if bool then
  300. Pitch = MRA((Sound.Pitch*0.75)*1000, (Sound.Pitch*1.15)*1000)/1000
  301. end
  302. local a = Instance.new("Sound")
  303. a.SoundId = Sound.Id
  304. a.Volume = Sound.Volume
  305. a.Pitch = Pitch
  306. a.Name = "FX"
  307. a.Parent = Torso
  308. a:play()
  309. Notime(function()
  310. wait(1)
  311. a:remove()
  312. end)
  313. end
  314. function GetParts(pos, dist)
  315. local parts = {}
  316. local function o(p)
  317. for _,v in pairs(p:children()) do
  318. if v:IsA("BasePart") then
  319. if (pos - v.Position).magnitude <= dist then
  320. table.insert(parts, {v, (pos - v.Position).magnitude, v.Anchored})
  321. end
  322. end
  323. o(v)
  324. end
  325. end
  326. o(workspace)
  327. return parts
  328. end
  329. function GetHum(P)
  330. for _,v in pairs(P:children()) do
  331. if v:IsA("Humanoid") then
  332. if v.Health > 0 then
  333. return v
  334. end
  335. end
  336. end
  337. end
  338. function GetGroup(Pos, Distance, Hit)
  339. local tab = {}
  340. for _,v in pairs(workspace:children()) do
  341. local h = GetHum(v)
  342. local t = v:findFirstChild("Torso")
  343. if h and t and v ~= Hit.Parent then
  344. if (t.Position - Pos).magnitude <= Distance then
  345. table.insert(tab, {h, v, (t.Position - Pos).magnitude})
  346. end
  347. end
  348. end
  349. if Hit then
  350. local h = GetHum(Hit.Parent)
  351. if h then
  352. table.insert(tab, {h, Hit.Parent, 0})
  353. end
  354. end
  355. return tab
  356. end
  357. function Part(Par, Anc, Colli, Tran, Ref, Col, Siz)
  358. local p = Instance.new("Part")
  359. p.formFactor = "Custom"
  360. p.TopSurface = 0
  361. p.BottomSurface = 0
  362. p.Transparency = Tran
  363. p.Reflectance = Ref
  364. p.Anchored = Anc
  365. p.CanCollide = Colli
  366. p.BrickColor = Col
  367. p.Size = Siz
  368. p.Locked = true
  369. p.Parent = Par
  370. p:BreakJoints()
  371. return p
  372. end
  373. function Weld(P0, P1, C0, C1)
  374. local w = Instance.new("Weld")
  375. w.Part0 = P0
  376. w.Part1 = P1
  377. if C0 then
  378. w.C0 = C0
  379. end
  380. if C1 then
  381. w.C1 = C1
  382. end
  383. w.Parent = P0
  384. return w
  385. end
  386. for _,v in pairs(Char:children()) do
  387. if v.Name == ModelName then
  388. v:remove()
  389. end
  390. end
  391. for _,v in pairs(Char:children()) do if v.Name == ModelName then v:remove() end end
  392. Model = Instance.new("Model")
  393. Model.Name = ModelName
  394. FTorso = Part(Model, false, false, 1, 0, Torso.BrickColor, V3(2, 2, 1))
  395. FW = Weld(Torso, FTorso)
  396. RAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  397. LAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  398. RLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  399. LLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  400. RABW = Weld(Torso, RAB, CN(), CN(-1.5, -0.5, 0))
  401. LABW = Weld(Torso, LAB, CN(), CN(1.5, -0.5, 0))
  402. RLBW = Weld(Torso, RLB, CN(), CN(-0.5, 1, 0))
  403. LLBW = Weld(Torso, LLB, CN(), CN(0.5, 1, 0))
  404. RAW = Weld(RAB, nil, CN(), CN(0, 0.5, 0))
  405. LAW = Weld(LAB, nil, CN(), CN(0, 0.5, 0))
  406. RLW = Weld(RLB, nil, CN(), CN(0, 1, 0))
  407. LLW = Weld(LLB, nil, CN(), CN(0, 1, 0))
  408. TW = Weld(Torso, nil, CN(-0.4, -1.5, 0.7), CA(MR(55), MR(-90), MR(0)))
  409. local FH = Instance.new("Humanoid",Model)
  410. FH.PlatformStand = true
  411. FH.MaxHealth = math.huge
  412. FH.Health = math.huge
  413. pcall(function() Torso:findFirstChild("Shirt"):clone().Parent = Model end)
  414. local hh = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  415. hh.Name = "Head"
  416. Weld(FTorso, hh)
  417. Weapon = Instance.new("Model")
  418. Weapon.Name = "Weapon"
  419. HB = Part(Weapon, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  420. HBW = Weld(Rarm, HB, CN(0, -0.7, 0), CA(MR(-90), MR(180), 0))
  421. HW = Weld(HB, nil, CA(MR(38), MR(-28), MR(-90)) * CN(0, -0.2, -3.8))
  422. LHB = Part(Weapon, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
  423. LHBW = Weld(Larm, LHB, CN(0, -0.7, 0), CA(MR(-90), MR(180), 0))
  424. LHW = Weld(LHB, nil, CA(MR(-2), MR(30), MR(-3)) * CN(-0.1, 0.32, -0.24))
  425. LHWK = Weld(LHB, nil, CA(MR(170), 0, 0))
  426. Handle = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.5, 0.9, 0.9))
  427. TW.Part1 = Handle
  428. Handle2 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.5, 0.6, 1.6))
  429. Weld(Handle, Handle2, CA(MR(-45), 0, 0), CN(0, 0.5, -0.4))
  430. Handle3 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.5, 0.7, 1.3))
  431. Weld(Handle2, Handle3, CA(MR(45), 0, 0), CN(0, -0.4, -0.9))
  432. Pipe1 = Part(Weapon, false, false, 0, 0.1, BN("Light grey"), V3(0.3, 0.3, 3.2))
  433. Add.Block(Pipe1, V3(1,1,1), 0.08)
  434. Weld(Handle3, Pipe1, CN(0, 0.15, 1.6+0.55))
  435. Pipe2 = Part(Weapon, false, false, 0, 0.1, BN("Light grey"), V3(0.3, 0.3, 1.7))
  436. Add.Block(Pipe2, V3(1,1,1), 0.08)
  437. Weld(Handle3, Pipe2, CN(0, -0.15, 0.85+0.55))
  438. Pipe3 = Part(Weapon, false, false, 0, 0.1, BN("Light grey"), V3(0.25, 0.25, 1.6))
  439. Add.Block(Pipe3, V3(1,1,1), 0.065)
  440. Weld(Pipe2, Pipe3, CN(0, 0, 0.8+0.7))
  441. Pump = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.45, 0.45, 1.1))
  442. Add.Block(Pump, V3(1,1,1), 0.225/2)
  443. PumpWeld = Weld(Pipe2, Pump, CN(0, 0, 0.6), CN(0, 0, 0))
  444. Pump2 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.5, 0.5, 0.3))
  445. Add.Block(Pump, V3(1,1,1), 0.13)
  446. Weld(Pump, Pump2, CN(0, 0, -0.5))
  447. for degrees = -20, 200, 20 do
  448. local Derp = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.2, 0.2))
  449. Add.Block(Derp, V3(0.4,0.6,0.4), 0.02)
  450. Weld(Handle3, Derp, CN(0, -0.45, -0.32) * CA(MR(degrees), 0, 0), CN(0, 0, -0.2))
  451. end
  452. Derp = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.2, 0.3))
  453. Add.Block(Derp, V3(0.4,1,1), 0.02)
  454. Weld(Handle3, Derp, CN(0, 0, -0.32) * CA(MR(-20), 0, 0), CN(0, 0.45, -0.2))
  455. Trigger = Part(Weapon, false, false, 0, 0, BN("Really black"), V3(0.2, 0.3, 0.2))
  456. Add.Block(Trigger, V3(0.5, 0.9, 0.3), 0.02)
  457. TriggerWeld = Weld(Handle3, Trigger, CN(0, -0.45, -0.4) * CA(MR(2), 0, 0))
  458. Aim = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.3, 0.2, 0.7))
  459. Add.Block(Aim, V3(1,0.7,1), 0.05)
  460. Weld(Pipe1, Aim, CN(0, 0.12, 1.1))
  461. Aim1 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.2, 0.2))
  462. Add.Block(Aim1, V3(0.3, 0.7, 0.5))
  463. Weld(Aim, Aim1, CN(-.1, 0.1, -0.25))
  464. Aim2 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.2, 0.2))
  465. Add.Block(Aim2, V3(0.3, 0.7, 0.5))
  466. Weld(Aim, Aim2, CN(.1, 0.1, -0.25))
  467. Aim3 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.2, 0.2))
  468. Add.Block(Aim3, V3(0.3, 0.7, 0.5))
  469. Weld(Aim, Aim3, CN(0, 0.1, 0.25))
  470. BulletFlip = Part(Weapon, false, false, 0, 0, BN("Light grey"), V3(0.2, 0.3, 0.6))
  471. Flip = Weld(Handle3, BulletFlip, CN(-0.18, 0.1, 0.2) * CA(0, MR(-10), 0))
  472. ---POCKET
  473. BeltWelds = {}
  474. BeltK = nil
  475. for i = -0.5, 0.5, 1 do
  476. local Belt = Part(Weapon, false, false, 0, 0, BN("Black"), V3(2.1, 0.3, 0.2))
  477. table.insert(BeltWelds, Weld(Torso, Belt, CN(0, -0.9, i)))
  478. end
  479. for i = 1, -1, -2 do
  480. local Belt = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.2, 0.3, 1.1))
  481. table.insert(BeltWelds, Weld(Torso, Belt, CN(i, -0.9, 0)))
  482. BeltK = Belt
  483. end
  484. for i = -0.25, 0.25, 0.5 do
  485. local Pocket = Part(Weapon, false, false, 0, 0, BN("Black"), V3(1.1, 0.9, 0.2))
  486. table.insert(BeltWelds, Weld(Torso, Pocket, CN(0.8, -1.2, -0.8) * CA(0, MR(-15), 0), CN(0, 0, i)))
  487. end
  488. for i = -0.5, 0.5, 1 do
  489. local Pocket = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.6, 0.9, 0.2))
  490. table.insert(BeltWelds, Weld(Torso, Pocket, CN(0.8, -1.2, -0.8) * CA(0, MR(-15)+MP/2, 0), CN(0, 0, i)))
  491. end
  492. Pocket = Part(Weapon, false, false, 0, 0, BN("Black"), V3(1.1, 0.2, 0.6))
  493. table.insert(BeltWelds, Weld(Torso, Pocket, CN(0.8, -1.6, -0.8) * CA(0, MR(-15), 0)))
  494. function Shell(P)
  495. local Shel = Instance.new("Model")
  496. local Back = Part(Shel, false, false, 0, 0, BN("Bright yellow"), V3(0.3, 0.3, 0.25))
  497. local Main = Part(Shel, false, false, 0, 0, BN("Bright red"), V3(0.3, 0.3, 0.4))
  498. Add.Block(Back, V3(1,1,1), 0.077)
  499. Add.Block(Main, V3(1,1,1), 0.077)
  500. Weld(Main, Back, CN(0, 0, -0.225))
  501. Shel.Parent = P
  502. return {Model = Shel, Back = Back, Main = Main}
  503. end
  504. for y = 0.15, 0.65, 0.25 do
  505. for x = -0.12, 0.13, 0.24 do
  506. for z = -0.25, 0.26, 0.5 do
  507. local sh = Shell(Weapon)
  508. Weld(Pocket, sh.Main, CN(z-0.05, y, x), CA(0, MP/2, 0))
  509. end
  510. end
  511. end
  512. KnifeSheath = Part(Weapon, false, false, 0, 0, BN("Black"), V3(0.3, 0.9, 0.6))
  513. SheathWeld = Weld(BeltK, KnifeSheath, CN(-0.2, -0.3, -0.25) * CA(MR(-20), 0, 0))
  514. KnifeHandle = Part(Weapon, false, false, 0, 0, BN("Really black"), V3(0.3, 0.6, 0.3))
  515. KnifeWeld = Weld(KnifeSheath, KnifeHandle, CA(MP, 0, 0), CN(0, 0.9, 0))
  516. KnifeHandle2 = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(0.3, 0.2, 0.4))
  517. Weld(KnifeHandle, KnifeHandle2, CN(0, 0.35, 0))
  518. KnifeBlade1 = Part(Weapon, false, false, 0, 0.1, BN("Light grey"), V3(0.2, 0.8, 0.3))
  519. Add.Block(KnifeBlade1, V3(0.4, 1, 1), 0.05)
  520. Weld(KnifeHandle2, KnifeBlade1, CN(0, 0.42, 0))
  521. KnifeBlade2 = Part(Weapon, false, false, 0, 0.1, BN("Light grey"), V3(0.2, 0.24, 0.24))
  522. Add.Block(KnifeBlade2, V3(0.4, 1, 1), 0.05)
  523. Weld(KnifeBlade1, KnifeBlade2, CN(0, 0.32, 0), CA(MR(45), 0, 0))
  524. function Show_Damage(P, D, Area)
  525. local mo = Instance.new("Model")
  526. mo.Name = D
  527. local p = Part(mo, true, false, 0, 0, BN("Bright red"), V3(0.2, 0.2, 0.2))
  528. p.Name = "Head"
  529. local m = Instance.new("SpecialMesh")
  530. m.MeshType = "Brick"
  531. m.Scale = Vector3.new(3.5, 2.3, 3.5)
  532. m.Parent = p
  533. local h = Instance.new("Humanoid")
  534. h.Health = 0
  535. h.MaxHealth = 0
  536. h.Name = "asd"
  537. h.Parent = mo
  538. local nah = true
  539. mo.Parent = workspace
  540. local cf = CN(P) * CN(MRA(-Area*100, Area*100)/100, MRA(-Area*100, Area*100)/100, MRA(-Area*100, Area*100)/100)
  541. p.CFrame = cf
  542. Notime(function()
  543. Notime(function()
  544. for i = 0, 6, 0.03 do
  545. wait()
  546. p.CFrame = cf * CN(0, i, 0)
  547. end
  548. end)
  549. wait(1.5)
  550. for i = 0, 1, 0.05 do
  551. p.Transparency = i
  552. if nah then mo.Name = "" nah = false else mo.Name = "- "..D nah = true end
  553. wait()
  554. end
  555. mo:remove()
  556. end)
  557. end
  558. function Hit(part)
  559. local H = GetHum(part.Parent)
  560. if H and Debounce and Hurt then
  561. Debounce = false
  562. local Dmg = MRA(MeleeDmg/1.3, MeleeDmg)
  563. H.Health = H.Health - Dmg
  564. Show_Damage(KnifeBlade2.Position, Dmg, 0.1)
  565. end
  566. end
  567. KnifeBlade1.Touched:connect(Hit)
  568. KnifeBlade2.Touched:connect(Hit)
  569. Weapon.Parent = Model
  570. Model.Parent = Char
  571. if script.Parent.className ~= "HopperBin" then
  572. h = Instance.new("HopperBin", Me.Backpack)
  573. h.Name = ToolName
  574. script.Parent = h
  575. end
  576. bin = script.Parent
  577. function Attach(t)
  578. RSH.Part0 = t
  579. LSH.Part0 = t
  580. RH.Part0 = t
  581. LH.Part0 = t
  582. RABW.Part0 = t
  583. LABW.Part0 = t
  584. LLBW.Part0 = t
  585. RLBW.Part0 = t
  586. for _,v in pairs(BeltWelds) do
  587. v.Part0 = t
  588. end
  589. if t == Torso then
  590. FTorso.Transparency = 1
  591. else
  592. Torso.Transparency = 1
  593. end
  594. t.Transparency = 0
  595. end
  596. function Normal()
  597. RAW.C0 = CA(MR(90), 0, MR(-65)) * CN(0.6, -0.9, 0)
  598. LAW.C0 = CA(MR(85), 0, MR(-40)) * CN(0.5, -0.5, 0)
  599. FW.C0 = CA(0, MR(-70), 0)
  600. HW.C0 = CA(MR(0), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  601. LHW.C0 = CA(MR(-2), MR(30), MR(-3)) * CN(-0.1, 0.32, -0.24)
  602. PumpWeld.C1 = CN(0, 0, 0)
  603. Flip.C1 = CN(0, 0, 0)
  604. Attach(FTorso)
  605. LHW.Part1 = nil
  606. TW.Part1 = nil
  607. LHWK.Part1 = nil
  608. KnifeWeld.Part1 = KnifeHandle
  609. Neck.C0 = necko
  610. HW.Part1 = Handle
  611. end
  612. function Swing()
  613. Swinging = true
  614. for i = 0.5, 1, 0.5 do
  615. LAW.C0 = CA(MR(85-8*i), 0, MR(-40+5*i)) * CN(0.5, -0.5+0.2*i, 0)
  616. 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)
  617. HW.C0 = CA(MR(-5*i), MR(5+5*i), MR(0)) * CN(0.4, 0, -1.2)
  618. FW.C0 = CA(0, MR(-70+8*i), 0)
  619. wait()
  620. end
  621. for i = 0.33, 1, 0.33 do
  622. LAW.C0 = CA(MR(77-37*i), 0, MR(-35+30*i)) * CN(0.5-0.15*i, -0.3+0.3*i, 0)
  623. 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)
  624. HW.C0 = CA(MR(-5-15*i), MR(10+10*i), MR(0)) * CN(0.4, 0, -1.2)
  625. FW.C0 = CA(0, MR(-62+58*i), 0)
  626. wait()
  627. end
  628. LHWK.Part1 = KnifeHandle
  629. KnifeWeld.Part1 = nil
  630. PlaySound(Sounds.Slash)
  631. for i = 0.25, 1, 0.25 do
  632. LAW.C0 = CA(MR(40+30*i), 0, MR(-5-45*i)) * CN(0.35-0.2*i, -0.5*i, 0)
  633. 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)
  634. HW.C0 = CA(MR(-20-10*i), MR(20+5*i), MR(0)) * CN(0.4, 0, -1.2)
  635. FW.C0 = CA(0, MR(-4+14*i), 0)
  636. LHWK.C0 = CN(0, -0.1*i, 0.2*i) * CA(MR(170), 0, MR(-50*i))
  637. wait()
  638. end
  639. Hurt = true
  640. Debounce = true
  641. for i = 0.25, 1, 0.25 do
  642. LAW.C0 = CA(MR(70+20*i), 0, MR(-50+35*i)) * CN(0.15-0.05*i, -0.5-0.3*i, 0)
  643. FW.C0 = CA(0, MR(10-60*i), 0)
  644. LHWK.C0 = CN(0, -0.1-0.05*i, 0.2+0.1*i) * CA(MR(170), 0, MR(-50-40*i))
  645. wait()
  646. end
  647. for i = 0.25, 1, 0.25 do
  648. LAW.C0 = CA(MR(90+10*i), 0, MR(-15+15*i)) * CN(0.1, -0.9, 0)
  649. FW.C0 = CA(0, MR(-50-40*i), 0)
  650. LHWK.C0 = CN(0, -0.15, 0.3) * CA(MR(170), 0, MR(-90))
  651. wait()
  652. end
  653. for i = 0.33, 1, 0.33 do
  654. LAW.C0 = CA(MR(100+3*i), 0, 0) * CN(0.1, -0.9, 0)
  655. FW.C0 = CA(0, MR(-90-6*i), 0)
  656. LHWK.C0 = CN(0, -0.15, 0.3) * CA(MR(170), 0, MR(-90))
  657. wait()
  658. end
  659. Hurt = false
  660. wait(0.04)
  661. for i = 0.25, 1, 0.25 do
  662. LAW.C0 = CA(MR(103-13*i), 0, 0) * CN(0.1, -0.9+0.1*i, 0)
  663. FW.C0 = CA(0, MR(-96+16*i), 0)
  664. LHWK.C0 = CN(0, -0.15, 0.3-0.1*i) * CA(MR(170), 0, MR(-90+15*i))
  665. wait()
  666. end
  667. for i = 0.25, 1, 0.25 do
  668. LAW.C0 = CA(MR(90-42*i), 0, 0) * CN(0.1+0.1*i, -0.8+0.3*i, 0)
  669. 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)
  670. FW.C0 = CA(0, MR(-80+10*i), 0)
  671. HW.C0 = CA(MR(-30+20*i), MR(25-15*i), MR(0)) * CN(0.4, 0, -1.2)
  672. LHWK.C0 = CN(0, -0.15, 0.2-0.45*i) * CA(MR(170), 0, MR(-75+75*i))
  673. wait()
  674. end
  675. for i = 0.5, 1, 0.5 do
  676. LAW.C0 = CA(MR(48-8*i), 0, 0) * CN(0.2+0.05*i, -0.5, 0)
  677. 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)
  678. FW.C0 = CA(0, MR(-70), 0)
  679. HW.C0 = CA(MR(-10+10*i), MR(10-5*i), MR(0)) * CN(0.4, 0, -1.2)
  680. LHWK.C0 = CN(0, -0.15, -0.25-0.15*i) * CA(MR(170), 0, 0)
  681. wait()
  682. end
  683. LHWK.Part1 = nil
  684. KnifeWeld.Part1 = KnifeHandle
  685. for i = 0.25, 1, 0.25 do
  686. LAW.C0 = CA(MR(40+40*i), 0, MR(-30*i)) * CN(0.25+0.2*i, -0.5, 0)
  687. 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)
  688. wait()
  689. end
  690. for i = 0.5, 1, 0.5 do
  691. 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)
  692. RAW.C0 = CA(MR(90), 0, MR(-65)) * CN(0.6, -0.9, 0)
  693. wait()
  694. end
  695. Normal()
  696. Swinging = false
  697. end
  698. function Reload(once)
  699. while Ammunition.Ammo < Ammunition.MaxAmmo and Ammunition.Ammoleft > 0 do
  700. wait()
  701. for i = 0.33, 1, 0.33 do
  702. RAW.C0 = CA(MR(45-2*i), 0, MR(-15)) * CN(0, -0.15-0.05*i, 0)
  703. LAW.C0 = CA(MR(50), MR(40), MR(-15)) * CN(0.5, -0.5, 0)
  704. LHW.C0 = CA(MR(-35), MR(60), MR(-45)) * CN(-0.6, 0.2, -0.24)
  705. wait()
  706. end
  707. for i = 0.25, 1, 0.25 do
  708. RAW.C0 = CA(MR(43-8*i), 0, MR(-15)) * CN(0, -0.2-0.2*i, 0)
  709. LAW.C0 = CA(MR(50), MR(40), MR(-15)) * CN(0.5, -0.5, 0)
  710. LHW.C0 = CA(MR(-35), MR(60), MR(-45)) * CN(-0.6, 0.2, -0.24)
  711. wait()
  712. end
  713. for i = 0.5, 1, 0.5 do
  714. RAW.C0 = CA(MR(35-2*i), 0, MR(-15)) * CN(0, -0.4-0.05*i, 0)
  715. wait()
  716. end
  717. local shel = Shell(Weapon)
  718. local w = Weld(Rarm, shel.Main, CN(0, -1.25, 0.45), CA(MR(-140), 0, MR(60)))
  719. for i = 0.25, 1, 0.25 do
  720. RAW.C0 = CA(MR(33+20*i), 0, MR(-15-10*i)) * CN(0, -0.45+0.2*i, 0)
  721. LAW.C0 = CA(MR(50-5*i), MR(40), MR(-15+5*i)) * CN(0.5, -0.5, 0)
  722. w.C0 = CN(-0.1*i, -1.25, 0.45-0.25*i)
  723. wait()
  724. end
  725. for i = 0.2, 1, 0.2 do
  726. RAW.C0 = CA(MR(53+32*i), 0, MR(-25-12*i)) * CN(0, -0.25-0.3*i, 0)
  727. LAW.C0 = CA(MR(45), MR(40), MR(-10+10*i)) * CN(0.5, -0.5+0.15*i, 0)
  728. w.C0 = CN(-0.1-0.1*i, -1.25, 0.2-0.3*i)
  729. w.C1 = CA(MR(-140+50*i), 0, MR(60))
  730. wait()
  731. end
  732. PlaySound(Sounds.Reload, false)
  733. for i = 0.25, 1, 0.25 do
  734. RAW.C0 = CA(MR(85+10*i), 0, MR(-42-8*i)) * CN(0, -0.55-0.1*i, 0)
  735. LAW.C0 = CA(MR(45), MR(40), 0) * CN(0.5, -0.35, 0)
  736. w.C0 = CN(-0.2-0.05*i, -1.25, -0.1-0.1*i)
  737. wait()
  738. end
  739. shel.Model:remove() shell = nil
  740. Ammunition.Ammo = Ammunition.Ammo + 1
  741. Ammunition.Ammoleft = Ammunition.Ammoleft - 1
  742. wait(0.1)
  743. for i = 0.33, 1, 0.33 do
  744. RAW.C0 = CA(MR(95-10*i), 0, MR(-50+10*i)) * CN(0, -0.65+0.1*i, 0)
  745. LAW.C0 = CA(MR(45+5*i), MR(40), MR(-12*i)) * CN(0.5, -0.35-0.1*i, 0)
  746. wait()
  747. end
  748. for i = 0.25, 1, 0.25 do
  749. RAW.C0 = CA(MR(85-40*i), 0, MR(-40+25*i)) * CN(0, -0.55+0.4*i, 0)
  750. LAW.C0 = CA(MR(50), MR(40), MR(-12-3*i)) * CN(0.5, -0.45-0.05*i, 0)
  751. wait()
  752. end
  753. if once then break end
  754. if not ReloadHold then break end
  755. end
  756. for i = 0.33, 1, 0.33 do
  757. RAW.C0 = CA(MR(45+10*i), 0, MR(-15-10*i)) * CN(0.1*i, -0.15-0.1*i, 0)
  758. LAW.C0 = CA(MR(52+12*i), MR(40-5*i), MR(-15-5*i)) * CN(0.5, -0.5, 0)
  759. 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)
  760. wait()
  761. end
  762. for i = 0.2, 1, 0.2 do
  763. RAW.C0 = CA(MR(55+30*i), 0, MR(-25-30*i)) * CN(0.1+0.4*i, -0.25-0.55*i, 0)
  764. LAW.C0 = CA(MR(70+10*i), MR(35-30*i), MR(-20-15*i)) * CN(0.5, -0.5, 0)
  765. 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)
  766. wait()
  767. end
  768. for i = 0.25, 1, 0.25 do
  769. RAW.C0 = CA(MR(85+5*i), 0, MR(-55-10*i)) * CN(0.5+0.1*i, -0.8-0.1*i, 0)
  770. LAW.C0 = CA(MR(80+5*i), MR(5-5*i), MR(-35-5*i)) * CN(0.5, -0.5, 0)
  771. 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)
  772. wait()
  773. end
  774. end
  775. function ReloadStart(once)
  776. Reloading = true
  777. HW.Part1 = nil
  778. LHW.Part1 = Pipe2
  779. for i = 0.25, 1, 0.25 do
  780. RAW.C0 = CA(MR(90-10*i), 0, MR(-65+10*i)) * CN(0.6-0.2*i, -0.9+0.15*i, 0)
  781. LAW.C0 = CA(MR(85-5*i), MR(7*i), MR(-40+5*i)) * CN(0.5, -0.5, 0)
  782. 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)
  783. wait()
  784. end
  785. for i = 0.15, 1, 0.15 do
  786. RAW.C0 = CA(MR(80-35*i), 0, MR(-55+40*i)) * CN(0.4-0.4*i, -0.75+0.6*i, 0)
  787. LAW.C0 = CA(MR(80-30*i), MR(7+33*i), MR(-35+20*i)) * CN(0.5, -0.5, 0)
  788. 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)
  789. wait()
  790. end
  791. Reload(once)
  792. Normal()
  793. Reloading = false
  794. end
  795. function AimEet()
  796. end
  797. function Shoot(Start, To)
  798. 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))
  799. for Pellets = 1, 8 do
  800. local Power = 20
  801. local Drop = 0.2
  802. local Face = CN(Start, To) * Accu * CA(MR(MRA(-10000, 10000)/2500), MR(MRA(-10000, 10000)/2500), MR(MRA(-10000, 10000)/2500))
  803. local Pellet = Part(PelletModel, true, false, 0, 0, BN("Dark grey"), V3(0.2, 0.2, 0.3))
  804. Pellet.CFrame = Face
  805. local LastPoint = Face.p
  806. Notime(function()
  807. local HitObj
  808. local HitPos
  809. local DistThing = 250
  810. for Distance = Power, 600, Power do
  811. Face = Face * CA(MR(-Drop), 0, 0) * CN(0, 0, -Power)
  812. local PointNow = Face.p
  813. local Hit, Pos = RayC(LastPoint, PointNow, Power+2, EffectModel)
  814. if Hit then
  815. DistThing = Distance
  816. if DistThing > 250 then DistThing = 200 end
  817. PointNow = Pos
  818. HitPos = Pos
  819. HitObj = Hit
  820. end
  821. local Dist = (PointNow - LastPoint).magnitude
  822. Pellet.CFrame = Face
  823. Drop = Drop + 0.04
  824. local Effect = Part(EffectModel, true, false, 0, 0, BN("White"), V3(0.2, 0.2, 0.2))
  825. Effect.CFrame = CN(LastPoint, PointNow) * CA(MR(-90), 0, 0) * CN(0, Dist/2, 0)
  826. local H = Add.Head(Effect, V3(0.8, Dist*5, 0.8))
  827. LastPoint = Face.p
  828. Power = Power - Drop/3
  829. Notime(function()
  830. for i = 0, 1, 0.2 do
  831. wait()
  832. Effect.Transparency = i
  833. end
  834. Effect:remove()
  835. end)
  836. if Hit then
  837. Pellet.CFrame = CN(Pos)
  838. break
  839. end
  840. wait()
  841. end
  842. Pellet:remove()
  843. if HitObj then
  844. local Surface = DetectSurface(HitPos, HitObj)
  845. local C = CN(HitPos) * CA(HitObj.CFrame:toEulerAnglesXYZ()) * Surface[2]
  846. if Surface[1] == "Anything" then
  847. C = Surface[2]
  848. end
  849. local H = nil
  850. if HitObj.Parent ~= workspace then
  851. H = GetHum(HitObj.Parent)
  852. if HitObj.Parent.Parent ~= workspace and H == nil then
  853. H = GetHum(HitObj.Parent.Parent)
  854. end
  855. end
  856. if H then
  857. local Dmg = DistThing/200
  858. Dmg = (1-Dmg)*15
  859. Dmg = MRA(Dmg*850, Dmg*1100)/1000
  860. H.Health = H.Health - Dmg
  861. PlaySound(Sounds.Hit)
  862. Show_Damage(HitObj.Position, math.floor(Dmg), 1.5)
  863. else
  864. PlaySound(Sounds.PartHit)
  865. local BulletHole = Part(EffectModel, true, false, 1, 0, BN("White"), V3(0.8, 0.2, 0.8))
  866. BulletHole.CFrame = C * CN(0, -0.085, 0)
  867. local Dec = Instance.new("Decal",BulletHole)
  868. Dec.Texture = Images[MRA(1,#Images)]
  869. Dec.Face = "Top"
  870. if not HitObj.Anchored then
  871. BulletHole.Anchored = false
  872. local W = Weld(HitObj, BulletHole, HitObj.CFrame:toObjectSpace(C))
  873. end
  874. Notime(function()
  875. wait(MRA(700, 15000)/100)
  876. BulletHole:remove()
  877. end)
  878. end
  879. end
  880. end)
  881. end
  882. end
  883. function ShootAnim(From, To)
  884. Shoot(From, To)
  885. AddInaccuracy(16)
  886. PlaySound(Sounds.Fire, false)
  887. for i = 0.33, 1, 0.33 do
  888. RAW.C0 = CA(MR(90+10*i), 0, MR(-65)) * CN(0.6, -0.9+0.5*i, 0)
  889. LAW.C0 = CA(MR(85+26*i), 0, MR(-40)) * CN(0.5, -0.5+0.1*i, 0)
  890. HW.C0 = CA(MR(-15*i), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  891. wait()
  892. end
  893. for i = 0.2, 1, 0.2 do
  894. RAW.C0 = CA(MR(100+5*i), 0, MR(-65)) * CN(0.6, -0.4+0.15*i, 0)
  895. LAW.C0 = CA(MR(111+4*i), 0, MR(-40)) * CN(0.5, -0.4+0.05*i, 0)
  896. HW.C0 = CA(MR(-15-2*i), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  897. wait()
  898. end
  899. for i = 0.5, 1, 0.5 do
  900. RAW.C0 = CA(MR(105+2*i), 0, MR(-65)) * CN(0.6, -0.25+0.03*i, 0)
  901. LAW.C0 = CA(MR(115+2*i), 0, MR(-40)) * CN(0.5, -0.35+0.02*i, 0)
  902. HW.C0 = CA(MR(-17), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  903. wait()
  904. end
  905. for i = 0.2, 1, 0.2 do
  906. RAW.C0 = CA(MR(107-12*i), 0, MR(-65)) * CN(0.6, -0.22-0.68*i, 0)
  907. LAW.C0 = CA(MR(117-17*i), 0, MR(-40)) * CN(0.5, -0.33-0.02*i, 0)
  908. HW.C0 = CA(MR(-17+2*i), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  909. wait()
  910. end
  911. for i = 0.33, 1, 0.33 do
  912. RAW.C0 = CA(MR(95-5*i), 0, MR(-65)) * CN(0.6, -0.9-0.1*i, 0)
  913. LAW.C0 = CA(MR(100-5*i), 0, MR(-40)) * CN(0.5+0.1*i, -0.35+0.1*i, 0)
  914. HW.C0 = CA(MR(-15+11*i), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  915. PumpWeld.C1 = CN(0, 0, 0.1*i)
  916. wait()
  917. end
  918. for i = 0.33, 1, 0.33 do
  919. RAW.C0 = CA(MR(90-3*i), 0, MR(-65)) * CN(0.6, -1+0.05*i, 0)
  920. LAW.C0 = CA(MR(95-5*i), 0, MR(-40)) * CN(0.6+0.2*i, -0.25+0.35*i, 0)
  921. HW.C0 = CA(MR(-4+4*i), MR(5), MR(0)) * CN(0.4, 0, -1.2)
  922. PumpWeld.C1 = CN(0, 0, 0.1+0.6*i)
  923. Flip.C1 = CN(0, 0, 0.5*i)
  924. wait()
  925. end
  926. local sh = Shell(workspace)
  927. sh.Main.CanCollide = true
  928. sh.Back.CanCollide = true
  929. sh.Main.CFrame = Handle3.CFrame * CN(0.3, 0.2, 0)
  930. sh.Main.Velocity = (Handle3.CFrame * CA(0, MR(90), 0)).lookVector * 15
  931. Notime(function()
  932. wait(MRA(100,180)/10)
  933. for i = 0, 1, 0.005 do
  934. sh.Main.Transparency = i
  935. sh.Back.Transparency = i
  936. wait()
  937. end
  938. sh.Model:remove()
  939. end)
  940. for i = 0.33, 1, 0.33 do
  941. RAW.C0 = CA(MR(87+3*i), 0, MR(-65)) * CN(0.6, -0.95+0.05*i, 0)
  942. LAW.C0 = CA(MR(90-5*i), 0, MR(-40)) * CN(0.8-0.3*i, 0.1-0.6*i, 0)
  943. HW.C0 = CA(0, MR(5), 0) * CN(0.4, 0, -1.2)
  944. PumpWeld.C1 = CN(0, 0, 0.7-0.7*i)
  945. Flip.C1 = CN(0, 0, 0.5-0.5*i)
  946. wait()
  947. end
  948. Normal()
  949. end
  950. function ShootFunc(From, To)
  951. local H, Pos = RayC(From, To, 10, EffectModel)
  952. local Can = true
  953. if H then
  954. if H:IsDescendantOf(Char) then
  955. Can = false
  956. end
  957. end
  958. if Can then
  959. Attacking = true
  960. Ammunition.Ammo = Ammunition.Ammo - 1
  961. if Ammunition.Ammo < 0 then Ammunition.Ammo = 0 end
  962. ShootAnim(From, To)
  963. Attacking = false
  964. end
  965. end
  966. function SelectAnim()
  967. RAW.Part1 = Rarm
  968. for i = 0.25, 1, 0.25 do
  969. RAW.C0 = CA(MR(-10*i), 0, MR(2*i))
  970. wait()
  971. end
  972. for i = 0.1, 1, 0.1 do
  973. 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)
  974. wait()
  975. end
  976. for i = 0.25, 1, 0.25 do
  977. RAW.C0 = CN(-0.15, 0, -0.45-0.05*i) * CA(MR(-125-15*i), 0, MR(10)) * CN(0, -0.4, 0)
  978. wait()
  979. end
  980. TW.Part1 = nil
  981. HW.Part1 = Handle
  982. for i = 0.25, 1, 0.25 do
  983. 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)
  984. HW.C0 = CA(MR(38+12*i), MR(-28-15*i), MR(-90-10*i)) * CN(0, -0.1*i, -3.8)
  985. wait()
  986. end
  987. Attach(FTorso)
  988. for i = 0.1, 1, 0.1 do
  989. 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)
  990. 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)
  991. FW.C0 = CA(0, MR(-15*i), 0)
  992. wait()
  993. end
  994. LAW.Part1 = Larm
  995. for i = 0.15, 1, 0.15 do
  996. RAW.C0 = CN(0, 0, -0.1+0.1*i) * CA(MR(-40+60*i), 0, MR(42+4*i))
  997. LAW.C0 = CA(MR(10*i), 0, MR(-8*i)) * CN(0, -0.15*i, 0)
  998. FW.C0 = CA(0, MR(-15-20*i), 0)
  999. HW.C0 = CA(MR(80+50*i), MR(-93-57*i), MR(-150-30*i)) * CN(0, -0.8, -3.1+1*i)
  1000. wait()
  1001. end
  1002. for i = 0.15, 1, 0.15 do
  1003. RAW.C0 = CA(MR(20+58*i), 0, MR(46-60*i)) * CN(0.2*i, -0.35*i, 0)
  1004. LAW.C0 = CA(MR(10+65*i), 0, MR(-8-32*i)) * CN(0.3*i, -0.15-0.25*i, 0)
  1005. FW.C0 = CA(0, MR(-35-30*i), 0)
  1006. 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)
  1007. wait()
  1008. end
  1009. for i = 0.2, 1, 0.2 do
  1010. RAW.C0 = CA(MR(78+8*i), 0, MR(-14-41*i)) * CN(0.2+0.35*i, -0.35-0.55*i, 0)
  1011. LAW.C0 = CA(MR(75+7*i), 0, MR(-40)) * CN(0.3+0.15*i, -0.4-0.06*i, 0)
  1012. FW.C0 = CA(0, MR(-65-5*i), 0)
  1013. HW.C0 = CA(MR(0), MR(-10+10*i), MR(0)) * CN(0.25+0.1*i, -0.5+0.4*i, -1.2)
  1014. wait()
  1015. end
  1016. for i = 0.25, 1, 0.25 do
  1017. RAW.C0 = CA(MR(86+4*i), 0, MR(-55-10*i)) * CN(0.55+0.05*i, -0.8-0.1*i, 0)
  1018. LAW.C0 = CA(MR(82+3*i), 0, MR(-40)) * CN(0.45+0.05*i, -0.46-0.04*i, 0)
  1019. FW.C0 = CA(0, MR(-70), 0)
  1020. HW.C0 = CA(MR(0), MR(5*i), MR(0)) * CN(0.35+0.05*i, -0.1+0.1*i, -1.2)
  1021. wait()
  1022. end
  1023. end
  1024. function DeselAnim()
  1025. for i = 0.25, 1, 0.25 do
  1026. RAW.C0 = CA(MR(90-10*i), 0, MR(-65+10*i)) * CN(0.6-0.05*i, -0.9+0.35*i, 0)
  1027. LAW.C0 = CA(MR(85-10*i), 0, MR(-40+4*i)) * CN(0.5-0.05*i, -0.5+0.04*i, 0)
  1028. FW.C0 = CA(0, MR(-70+10*i), 0)
  1029. 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)
  1030. wait()
  1031. end
  1032. for i = 0.07, 1, 0.07 do
  1033. RAW.C0 = CA(MR(80-80*i), 0, MR(-55+90*i)) * CN(0.55-0.35*i, -0.55+0.55*i, 0)
  1034. LAW.C0 = CA(MR(75-70*i), 0, MR(-36+30*i)) * CN(0.45-0.35*i, -0.46+0.36*i, 0)
  1035. FW.C0 = CA(0, MR(-60+40*i), 0)
  1036. 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)
  1037. wait()
  1038. end
  1039. for i = 0.25, 1, 0.25 do
  1040. 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)
  1041. LAW.C0 = CA(MR(5-5*i), 0, MR(-6+6*i)) * CN(0.1-0.1*i, -0.1+0.1*i, 0)
  1042. FW.C0 = CA(0, MR(-20+15*i), 0)
  1043. HW.C0 = CA(MR(100-20*i), MR(-105+15*i), MR(100-15*i)) * CN(0, -0.2, -2.2-0.3*i)
  1044. wait()
  1045. end
  1046. LAW.Part1 = nil
  1047. for i = 0.12, 1, 0.12 do
  1048. 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)
  1049. FW.C0 = CA(0, MR(-5+5*i), 0)
  1050. HW.C0 = CA(MR(80-37*i), MR(-90+55*i), MR(85-135*i)) * CN(0, -0.2, -2.5-0.9*i)
  1051. wait()
  1052. end
  1053. Attach(Torso)
  1054. for i = 0.2, 1, 0.2 do
  1055. 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)
  1056. HW.C0 = CA(MR(43-5*i), MR(-35+7*i), MR(-50-40*i)) * CN(0, -0.2, -3.4-0.4*i)
  1057. wait()
  1058. end
  1059. TW.Part1 = Handle
  1060. HW.Part1 = nil
  1061. for i = 0.25, 1, 0.25 do
  1062. 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)
  1063. wait()
  1064. end
  1065. for i = 0.15, 1, 0.15 do
  1066. 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)
  1067. wait()
  1068. end
  1069. for i = 0.33, 1, 0.33 do
  1070. 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)
  1071. wait()
  1072. end
  1073. Attach(Torso)
  1074. TW.Part1 = Handle
  1075. HW.Part1 = nil
  1076. RAW.Part1 = nil
  1077. LAW.Part1 = nil
  1078. end
  1079. function ReloadFunc(once)
  1080. if Ammunition.Ammo < Ammunition.MaxAmmo and Selected and not Reloading and not Attacking and Ammunition.Ammoleft > 0 then
  1081. if not once then
  1082. ReloadHold = true
  1083. end
  1084. ReloadStart(once)
  1085. end
  1086. end
  1087. function onSelected(mouse)
  1088. SelectAnim()
  1089. mouse.Icon = Icon
  1090. Selected = true
  1091. Notime(function()
  1092. for _, g in pairs(AccuracyGuis) do
  1093. g.Gui.Transparency = 0.2
  1094. end
  1095. while Selected do
  1096. pcall(function()
  1097. for _, g in pairs(AccuracyGuis) do
  1098. 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))
  1099. end
  1100. end)
  1101. wait()
  1102. end
  1103. end)
  1104. mouse.Button1Down:connect(function()
  1105. if Selected and not Attacking and not Swinging then
  1106. if Reloading then
  1107. ReloadHold = false
  1108. else
  1109. if Ammunition.Ammo < 1 then
  1110. ReloadFunc(true)
  1111. else
  1112. ShootFunc((Pipe1.CFrame * CN(0, 0, 1.65)).p, mouse.Hit.p)
  1113. end
  1114. if Ammunition.Ammo < 1 and Ammunition.Ammoleft < 1 then
  1115. PlaySound(Sounds.Out)
  1116. end
  1117. end
  1118. end
  1119. end)
  1120. mouse.KeyDown:connect(function(key)
  1121. key = key:lower()
  1122. if Selected and not Attacking and not Swinging then
  1123. if key == "r" then
  1124. ReloadFunc()
  1125. elseif key == "e" then
  1126. Swing()
  1127. end
  1128. end
  1129. end)
  1130. mouse.KeyUp:connect(function(key)
  1131. key = key:lower()
  1132. if key == "r" then
  1133. ReloadHold = false
  1134. end
  1135. end)
  1136. end
  1137. function onDeselected(mouse)
  1138. Selected = false
  1139. for _, g in pairs(AccuracyGuis) do
  1140. g.Gui.Transparency = 1
  1141. end
  1142. DeselAnim()
  1143. end
  1144. bin.Selected:connect(onSelected)
  1145. bin.Deselected:connect(onDeselected)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement