Guest User

Untitled

a guest
Aug 11th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.90 KB | None | 0 0
  1. sp = script.Parent
  2.  
  3. Mesh = false
  4. Shirt = true
  5.  
  6. function onEquipped(mouse)
  7. local Player = game:GetService("Players").LocalPlayer
  8. local Cam = game.Workspace.CurrentCamera
  9.  
  10. local Arms = Instance.new("Model")
  11. Arms.Name = "Arms"
  12. Arms.Parent = Cam
  13.  
  14. if Shirt == true then
  15. local Humanoid = Instance.new("Humanoid")
  16. Humanoid.MaxHealth = 0
  17. Humanoid.Health = 0
  18. Humanoid.Name = ""
  19. Humanoid.Parent = Arms
  20.  
  21. local newShirt = Player.Character:FindFirstChild("Shirt"):clone()
  22. newShirt.Parent = Arms
  23. else end
  24.  
  25. local RightArm = Player.Character:FindFirstChild("Right Arm"):clone()
  26. RightArm.Name = "Right Arm"
  27. RightArm.Transparency = 0
  28.  
  29. local w = Instance.new("Weld")
  30. w.Part0 = RightArm
  31. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  32. w.C0 = CFrame.new()
  33. w.C1 = CFrame.new()
  34. w.Parent = RightArm
  35. RightArm.Parent = Arms
  36.  
  37. local LeftArm = Player.Character:FindFirstChild("Left Arm"):clone()
  38. LeftArm.Name = "Left Arm"
  39. LeftArm.Transparency = 0
  40.  
  41. local w = Instance.new("Weld")
  42. w.Part0 = LeftArm
  43. w.Part1 = Player.Character:FindFirstChild("Left Arm")
  44. w.C0 = CFrame.new()
  45. w.C1 = CFrame.new()
  46. w.Parent = LeftArm
  47. LeftArm.Parent = Arms
  48.  
  49. if Mesh ~= false then
  50. local LeftArmMesh = script:FindFirstChild("LeftArm")
  51. LeftArmMesh.Parent = LeftArm
  52. local RightArmMesh = script:FindFirstChild("RightArm")
  53. RightArmMesh.Parent = RightArm
  54. else end
  55.  
  56. end
  57.  
  58. function onUnequipped(mouse)
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Cam = game.workspace.CurrentCamera
  61. for _, Model in pairs(Cam:GetChildren()) do
  62. if Model.Name == "Arms" then
  63. Model:remove()
  64. else end
  65. end
  66. end
  67.  
  68. sp.Equipped:connect(onEquipped)
  69. sp.Unequipped:connect(onUnequipped)
  70. wait(0.5)
  71. local Tool = script.Parent
  72. local Settings = {
  73. Range = 1000
  74. ,Spread = 5
  75. ,Damage = {35, 36}
  76. ,HeadShotDamage = {120, 120}
  77. ,Bullets = 1
  78. ,FireRate = 0
  79. ,Automatic = false
  80. ,AntiTK = false
  81. ,ImpactDuration = .5
  82.  
  83. ,ReloadKey = "R"
  84. ,ReloadTime = 1
  85. ,Ammo = 19
  86. ,IncludeChamberedBullet = true
  87.  
  88. ,GuiPos = Vector2.new(script.Gui.Frame.Position.X.Scale, script.Gui.Frame.Position.Y.Scale)
  89.  
  90. ,OneHanded = false
  91. ,FakeArms = true
  92. ,FakeArmTransparency = 0
  93. ,RightPos = CFrame.new(-0.75, 0.5, 0.45) * CFrame.Angles(math.rad(-90), 0, 0)
  94. ,LeftPos = CFrame.new(0.95, 0.18, 0.4) * CFrame.Angles(math.rad(-90), math.rad(70), 0)
  95. ,AimPart = Tool.AimPart
  96. ,AimPartOffset = CFrame.new()
  97. ,AimGripOffset = Vector3.new(0, 0, 0)
  98. ,LeftAimPos = CFrame.new(0.75, 0.05, 0.5) * CFrame.Angles(math.rad(-100), math.rad(45), 0)
  99. ,AimAnim = {
  100. Enabled = false
  101. ,Frames = 50
  102. ,Time = 0.1
  103. }
  104. ,ChangeFOV = {true, 50}
  105. ,SpreadReduction = 5
  106.  
  107. ,Weld = true
  108.  
  109. ,Icons = {
  110. Idle = "rbxassetid://70288585"
  111. ,Fire1 = "rbxassetid://70288578"
  112. ,Fire2 = "rbxassetid://70288572"
  113. ,Fire3 = "rbxassetid://70288578"
  114. ,Reload = "rbxassetid://70288599"
  115. ,Aim = "rbxasset://textures/Blank.png"
  116. }
  117. ,FireMouseAnimTime = 0.15
  118.  
  119. ,Recoil = math.rad(0.3)
  120.  
  121. ,Smoke = true
  122. ,SmokePart = Tool.SmokePart
  123. ,Smokes = {{script.Smoke, 6, 0.1}, {script.Smoke1, 0.1}, {script.Smoke2, 0.01}}
  124.  
  125. ,Sprint = true
  126. ,SprintSpeed = 25
  127. ,SprintKey = "0"
  128. ,SprintSpreadIncrease = 40
  129. ,SprintArmOffset = CFrame.new(0, -0.3, -0.5) * CFrame.Angles(math.rad(30), math.rad(-4), 0)
  130.  
  131. ,DropHats = true
  132. }
  133.  
  134.  
  135.  
  136. local Orig_Spread = Settings.Spread
  137. local Orig_Grip = Tool.GripPos
  138.  
  139. local Player = game.Players.LocalPlayer
  140. local Character = Player.Character
  141.  
  142. local Camera = workspace.CurrentCamera
  143.  
  144. local Ammo, StoredAmmo = script.Ammo, script.StoredAmmo
  145.  
  146. local Gui, CanUpdateGui = nil, true
  147.  
  148. local Sprinting, Equipped
  149.  
  150. function Update_Gui()
  151. if Gui and CanUpdateGui then
  152. Gui.Frame.AmmoDisplay.Text = Ammo.Value .. "|" .. StoredAmmo.Value
  153. end
  154. end
  155.  
  156. local Welded
  157. if Settings.Weld then
  158. Delay(0, function()
  159. local weldC0s = {}
  160. for i, v in pairs(Tool:GetChildren()) do
  161. if v:IsA("BasePart") and v ~= Tool.Handle then
  162. table.insert(weldC0s, {v, Tool.Handle.CFrame:toObjectSpace(v.CFrame)})
  163. v.Anchored = false
  164. end
  165. end
  166. Tool.Handle.Anchored = false
  167. local welds = {}
  168. Tool.Equipped:connect(function()
  169. for i, v in ipairs(welds) do
  170. v.Part1 = nil
  171. v:Destroy()
  172. end
  173. for i, v in ipairs(weldC0s) do
  174. if v[1] and v[2] then
  175. local w = Instance.new("Weld", Tool.Handle)
  176. w.Part0 = Tool.Handle
  177. w.Part1 = v[1]
  178. w.C0 = v[2]
  179. table.insert(welds, w)
  180. end
  181. end
  182. end)
  183. wait()
  184. Welded = true
  185. end)
  186. end
  187.  
  188. local Left_Weld, Right_Weld
  189.  
  190. Ammo.Changed:connect(Update_Gui)
  191. StoredAmmo.Changed:connect(Update_Gui)
  192.  
  193. Settings.Range = math.min(Settings.Range, 999)
  194.  
  195. local Ignore_Model = workspace:FindFirstChild("Ray_Ignore") or Instance.new("Model", workspace)
  196. Ignore_Model.Name = "Ray_Ignore"
  197.  
  198. local Ray_Ignore = {Character, Ignore_Model, Camera}
  199.  
  200. Character.Humanoid.Died:connect(function()
  201. Tool.Parent = Player.Backpack
  202. end)
  203.  
  204. function Fire(Mouse)
  205. local Spread = CFrame.Angles(math.rad(math.random(-Settings.Spread, Settings.Spread)/10), math.rad(math.random(-Settings.Spread, Settings.Spread)/10), math.rad(math.random(-Settings.Spread, Settings.Spread)/10))
  206. local Ray = Ray.new(Character.Head.Position, (CFrame.new(Character.Head.Position, Mouse.Hit.p) * Spread).lookVector.unit * Settings.Range)
  207. local Hit, Pos = workspace:FindPartOnRayWithIgnoreList(Ray, Ray_Ignore)
  208. if Hit and Hit.Parent:FindFirstChild("Humanoid") then
  209. local Hit_Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
  210. if Settings.AntiTK and not Hit_Player.Neutral and Hit_Player.TeamColor == Player.TeamColor then
  211. return
  212. end
  213. local Humanoid = Hit.Parent.Humanoid
  214. local c = Instance.new("ObjectValue")
  215. c.Name = "creator"
  216. c.Value = Player
  217. game.Debris:AddItem(c, 3)
  218. c.Parent = Humanoid
  219. if Hit.Name == "Head" then
  220. Humanoid.Health = Humanoid.Health - math.random(Settings.HeadShotDamage[1], Settings.HeadShotDamage[2])
  221. else
  222. Humanoid.Health = Humanoid.Health - math.random(Settings.Damage[1], Settings.Damage[2])
  223. end
  224. elseif Hit then
  225. local Hit_Part = Instance.new("Part", Ignore_Model)
  226. Hit_Part.FormFactor = "Custom"
  227. Hit_Part.TopSurface = 0
  228. Hit_Part.BottomSurface = 0
  229. Hit_Part.Anchored = true
  230. Hit_Part.CanCollide = false
  231. Hit_Part.Size = Vector3.new()
  232. Hit_Part.CFrame = CFrame.new(Pos) * CFrame.Angles(math.random(0, 360), math.random(0, 360), math.random(0, 360))
  233. Hit_Part.BrickColor = BrickColor.new("Black")
  234. Hit_Part.Material = "Metal"
  235. local Meta = Instance.new("Sound")
  236. Meta.Name = "Crack"
  237. Meta.SoundId = "rbxassetid://253950994"
  238. Meta.Volume = math.random(0.9,1)
  239. Meta.Pitch = math.random(0.6,0.6)
  240. Meta.Parent = Hit_Part
  241. Meta:play()
  242. local Cur = Instance.new("SpecialMesh")
  243. Cur.MeshType = "Sphere"
  244. Cur.Parent = Hit_Part
  245. Cur.Scale = Vector3.new(0.5,0.5,0.5)
  246. Instance.new("Smoke", Hit_Part).Opacity = 15
  247. local g = Instance.new("PointLight", Hit_Part)
  248. g.Color = Color3.new(0, 0, 0)
  249. g.Range = 0
  250. g.Shadows = true
  251. local PE = Instance.new("ParticleEmitter")
  252. PE.Parent = Hit_Part
  253. PE.Size = NumberSequence.new(0.75)
  254. PE.LightEmission = 0
  255. PE.Lifetime = NumberRange.new(5)
  256. PE.ZOffset = 0.5
  257. PE.Texture = "http://www.roblox.com/asset/?id=133619974"
  258. PE.Rate = 50
  259. PE.Speed = NumberRange.new(2.5)
  260. PE.VelocitySpread = NumberSequence.new(-0.05)
  261. PE.Transparency = NumberSequence.new(-1)
  262. game.Debris:AddItem(Hit_Part, Settings.ImpactDuration)
  263. game.Debris:AddItem(PE, 0.17)
  264. if not Hit.Anchored then
  265. local w = Instance.new("Weld", Hit_Part)
  266. w.Part0 = Hit
  267. w.Part1 = Hit_Part
  268. w.C0 = Hit.CFrame:toObjectSpace(Hit_Part.CFrame)
  269. Hit_Part.Anchored = false
  270. end
  271. if Hit.Parent:IsA("Hat") and Settings.DropHats then
  272. Hit.Parent.Parent = workspace
  273. game.Debris:AddItem(Hit, 3)
  274. end
  275. end
  276. end
  277.  
  278. local Can_Shoot = true
  279. local Reloading = false
  280.  
  281. local First_Person = false
  282.  
  283. local Mouse_Held
  284.  
  285. Tool.Equipped:connect(function(Mouse)
  286. Equipped = true
  287. if Settings.Weld and not Welded then
  288. wait()
  289. Tool.Parent = Player.Backpack
  290. end
  291. Character = Player.Character
  292. if Gui then
  293. return
  294. end
  295. Ray_Ignore = {Character, Ignore_Model, Camera}
  296. Mouse.Icon = Settings.Icons.Idle
  297. Gui = script.Gui:Clone()
  298. Gui.Parent = Player.PlayerGui
  299. Gui.Frame.Position = UDim2.new(Settings.GuiPos.X, Gui.Frame.Position.X.Offset, 1.1, Gui.Frame.Position.Y.Offset)
  300. Gui.Frame:TweenPosition(UDim2.new(Settings.GuiPos.X, Gui.Frame.Position.X.Offset, Settings.GuiPos.Y, Gui.Frame.Position.Y.Offset), "Out", "Bounce", 1)
  301. CanUpdateGui = true
  302. Update_Gui()
  303. Mouse.Button1Down:connect(function()
  304. if Can_Shoot and Ammo.Value > 0 and Character.Humanoid.Health > 0 then
  305. Mouse_Held = true
  306. while true do
  307. Can_Shoot = false
  308. Delay(0, function()
  309. local t = math.min(Settings.FireMouseAnimTime/3, Settings.FireRate/3)
  310. if not Aiming then
  311. Mouse.Icon = Settings.Icons.Fire1
  312. end
  313. wait(t)
  314. if not Aiming then
  315. if Reloading then return end
  316. Mouse.Icon = Settings.Icons.Fire2
  317. end
  318. wait(t)
  319. if not Aiming then
  320. if Reloading then return end
  321. Mouse.Icon = Settings.Icons.Fire3
  322. end
  323. wait(t)
  324. if not Aiming then
  325. if Reloading then return end
  326. Mouse.Icon = Settings.Icons.Idle
  327. end
  328. end)
  329.  
  330. for _ = 1, Settings.Bullets do
  331. Delay(0, function()
  332. Fire(Mouse, RANGE, SPEED, DROP)
  333. end)
  334. end
  335. local bg = Instance.new("BillboardGui", Settings.SmokePart)
  336. bg.Adornee = Settings.SmokePart
  337. local flashsize = math.random(5, 8)/10
  338. bg.Size = UDim2.new(flashsize, 0, flashsize, 0)
  339. local flash = Instance.new("ImageLabel", bg)
  340. flash.BackgroundTransparency = 1
  341. flash.Size = UDim2.new(1, 0, 1, 0)
  342. flash.Image = "rbxassetid://172841900"
  343. flash.Rotation = math.random(0, 360)
  344. game.Debris:AddItem(bg, 0.025)
  345. Delay(0, function()
  346. local r = math.abs(Settings.Recoil)
  347. local ran = math.random(-1, 1)
  348. Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(r, r*ran, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude)
  349. local c = -r/20
  350. local cx = -(r*ran)/20
  351. for i = 1, math.random(15, 25) do
  352. if EquipId == curId then
  353. Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(c, cx, 0) * CFrame.new(0, 0, (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude)
  354. wait()
  355. else
  356. break
  357. end
  358. end
  359. end)
  360. if Tool.Handle:FindFirstChild("Shoot") then
  361. Tool.Handle.Shoot:Play()
  362. end
  363. Ammo.Value = Ammo.Value - 1
  364. Tool.Bolt.Transparency = 1
  365. Tool.Bolt1.Transparency = 0
  366. wait(Settings.FireRate)
  367. Tool.Bolt.Transparency = 0
  368. Tool.Bolt1.Transparency = 1
  369. if not Settings.Automatic or Ammo.Value <= 0 or Character.Humanoid.Health <= 0 or not Mouse_Held then
  370. break
  371. end
  372. end
  373. Can_Shoot = true
  374. elseif Can_Shoot and Character.Humanoid.Health > 0 and Tool.Handle:FindFirstChild("Click") then
  375. Tool.Handle.Click:Play()
  376. end
  377. end)
  378. Mouse.Button1Up:connect(function()
  379. Mouse_Held = false
  380. end)
  381. Mouse.KeyDown:connect(function(Key)
  382. if Key:upper() == Settings.ReloadKey:upper() and Can_Shoot and StoredAmmo.Value > 0 and not Aiming then
  383. if Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo + 1 or not Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo then
  384. return
  385. end
  386. Can_Shoot = false
  387. Reloading = true
  388. local TextLabel = Gui.Frame.AmmoDisplay
  389. Delay(0, function()
  390. CanUpdateGui = false
  391. TextLabel.Text = "Reloading."
  392. wait(Settings.ReloadTime/3)
  393. if TextLabel then
  394. TextLabel.Text = "Reloading.."
  395. end
  396. wait(Settings.ReloadTime/3)
  397. if TextLabel then
  398. TextLabel.Text = "Reloading..."
  399. end
  400. end)
  401. if Tool.Handle:FindFirstChild("Reload") then
  402. Tool.Handle.Reload:Play()
  403. end
  404. Mouse.Icon = Settings.Icons.Reload
  405. wait(Settings.ReloadTime)
  406. Mouse.Icon = Settings.Icons.Idle
  407. CanUpdateGui = true
  408. local m = Settings.Ammo
  409. if Ammo.Value > 0 and Settings.IncludeChamberedBullet then
  410. m = m + 1
  411. end
  412. if (StoredAmmo.Value - (m - Ammo.Value)) <= 0 then
  413. Ammo.Value = Ammo.Value + StoredAmmo.Value
  414. StoredAmmo.Value = 0
  415. else
  416. StoredAmmo.Value = StoredAmmo.Value - (m - Ammo.Value)
  417. Ammo.Value = m
  418. end
  419. Can_Shoot = true
  420. Reloading = false
  421. elseif Key:upper() == Settings.SprintKey:upper() and Settings.Sprint and not Aiming then
  422. Sprinting = true
  423. Character.Humanoid.WalkSpeed = Settings.SprintSpeed
  424. Settings.Spread = Settings.Spread + Settings.SprintSpreadIncrease
  425. end
  426. end)
  427. Mouse.KeyUp:connect(function(Key)
  428. if Key:upper() == Settings.SprintKey:upper() and Sprinting then
  429. Sprinting = false
  430. Character.Humanoid.WalkSpeed = 16
  431. Settings.Spread = Settings.Spread - Settings.SprintSpreadIncrease
  432. Right_Weld.C0 = CFrame.new(0, -1.5, 0)
  433. end
  434. end)
  435. Mouse.Button2Down:connect(function()
  436. if not Reloading and not Sprinting and not Aiming and (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 then
  437. Aiming = true
  438. _G.MouseSensitivity = 0.3
  439. Mouse.Icon = Settings.Icons.Aim
  440. if Settings.AimAnim.Enabled then
  441. Right_Weld.C1 = CFrame.new()
  442. Right_Weld.C0 = CFrame.new()
  443. Delay(0, function()
  444. Tween_C0(Right_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Right_Weld.C0, Character.Head.CFrame:toObjectSpace(Settings.AimPart.CFrame))
  445. end)
  446. Delay(0, function()
  447. Tween_C1(Left_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Left_Weld.C1, Settings.LeftAimPos)
  448. end)
  449. Delay(0, function()
  450. if Settings.ChangeFOV[1] then
  451. Camera.FieldOfView = 70
  452. local Cam_Dif, T_F = 70 - Settings.ChangeFOV[2], Settings.AimAnim.Time * Settings.AimAnim.Frames
  453. for i = 1, T_F do
  454. local FOV = 70 - Cam_Dif/T_F * i
  455. Camera.FieldOfView = FOV
  456. wait(Settings.AimAnim.Time/Settings.AimAnim.Frames)
  457. if not Aiming then
  458. return
  459. end
  460. end
  461. Camera.FieldOfView = Settings.ChangeFOV[2]
  462. end
  463. end)
  464. else
  465. Right_Weld.C1 = CFrame.new()
  466. Right_Weld.C0 = CFrame.new()
  467. Right_Weld.C1 = Character.Head.CFrame:toObjectSpace(Settings.AimPart.CFrame)
  468. Left_Weld.C1 = Settings.LeftAimPos
  469. if Settings.ChangeFOV[1] then
  470. Camera.FieldOfView = Settings.ChangeFOV[2]
  471. end
  472. end
  473. Tool.GripPos = Orig_Grip + Settings.AimGripOffset
  474. Settings.Spread = Settings.Spread - Settings.SpreadReduction
  475. end
  476. end)
  477. Mouse.Button2Up:connect(function()
  478. if Aiming then
  479. Mouse.Icon = Settings.Icons.Idle
  480. Tool.GripPos = Orig_Grip
  481. if Settings.AimAnim.Enabled then
  482. Delay(0, function()
  483. Tween_C0(Right_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Right_Weld.C0, CFrame.new(0, -1.5, 0))
  484. end)
  485. Delay(0, function()
  486. Tween_C1(Left_Weld, Settings.AimAnim.Frames, Settings.AimAnim.Time, Left_Weld.C1, Settings.LeftPos)
  487. end)
  488. else
  489. Right_Weld.C1 = Settings.RightPos
  490. Right_Weld.C0 = CFrame.new(0, -1.5, 0)
  491. Left_Weld.C1 = Settings.LeftPos
  492. end
  493. if Settings.ChangeFOV[1] then
  494. Camera.FieldOfView = 70
  495. end
  496. Settings.Spread = Settings.Spread + Settings.SpreadReduction
  497. Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  498. Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  499. wait(0.25)
  500. Aiming = false
  501. _G.MouseSensitivity = 1
  502. end
  503. end)
  504. wait()
  505. Camera.Changed:connect(function()
  506. if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 and Equipped then
  507. Mouse.TargetFilter = workspace
  508. Character.Torso.Neck.C1 = CFrame.new()
  509. Character.Torso.Neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((Mouse.Hit.p - Mouse.Origin.p).unit.y), 0, 0)
  510. end
  511. end)
  512. Mouse.Idle:connect(function()
  513. if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude < 1 and Equipped then
  514. Mouse.TargetFilter = workspace
  515. Character.Torso.Neck.C1 = CFrame.new()
  516. Character.Torso.Neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin((Mouse.Hit.p - Mouse.Origin.p).unit.y), 0, 0)
  517. end
  518. end)
  519. while wait() and Equipped do
  520. if Sprinting then
  521. Can_Shoot = false
  522. Right_Weld.C0 = CFrame.new(0, -1.5, 0) * Settings.SprintArmOffset
  523. Left_Weld.C0 = CFrame.new(0, -1.5, 0) * Settings.SprintArmOffset
  524. elseif not Aiming and not Sprinting then
  525. Can_Shoot = true
  526. Left_Weld.C0 = CFrame.new(0, -1.5, 0)
  527. end
  528. if (Camera.Focus.p - Camera.CoordinateFrame.p).magnitude > 1 and Equipped then
  529. Mouse.TargetFilter = nil
  530. Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  531. Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  532. end
  533. end
  534. end)
  535.  
  536. local Arms_Made
  537. local Fake_Arm_Right, Fake_Arm_Left, Fake_Arm_Model
  538.  
  539. Tool.Equipped:connect(function(Mouse)
  540. if Character and not Arms_Made then
  541. Arms_Made = true
  542. local Torso = Character.Torso
  543. Torso["Right Shoulder"].Part1 = nil
  544. Left_Weld = Instance.new("Weld", Torso)
  545. Left_Weld.Name = "Left_Weld"
  546. Left_Weld.Part0 = Character.Head
  547. Left_Weld.C0 = CFrame.new(0, -1.5, 0)
  548. if not Settings.OneHanded then
  549. Torso["Left Shoulder"].Part1 = nil
  550. Left_Weld.Part1 = Character["Left Arm"]
  551. end
  552. Right_Weld = Instance.new("Weld", Torso)
  553. Right_Weld.Name = "Right_Weld"
  554. Right_Weld.Part0 = Character.Head
  555. Right_Weld.Part1 = Character["Right Arm"]
  556. Right_Weld.C0 = CFrame.new(0, -1.5, 0)
  557. Left_Weld.C1 = Settings.LeftPos
  558. Right_Weld.C1 = Settings.RightPos
  559. end
  560. if Settings.FakeArms and not Fake_Arm_Right then
  561. Fake_Arm_Right, Fake_Arm_Left = Character["Right Arm"]:Clone(), Character["Left Arm"]:Clone()
  562. Fake_Arm_Right.FormFactor, Fake_Arm_Left.FormFactor = "Custom", "Custom"
  563. Fake_Arm_Right.Size, Fake_Arm_Left.Size = Vector3.new(), Vector3.new()
  564. local fakeArms = {Fake_Arm_Right, Fake_Arm_Left}
  565. for i = 1, 2 do
  566. local w = Instance.new("Weld", fakeArms[i])
  567. w.Part0 = Character[fakeArms[i].Name]
  568. w.Part1 = fakeArms[i]
  569. fakeArms[i].Transparency = Settings.FakeArmTransparency
  570. end
  571. Fake_Arm_Model = Instance.new("Model", Camera)
  572. Fake_Arm_Right.Parent = Fake_Arm_Model
  573. if not Settings.OneHanded then
  574. Fake_Arm_Left.Parent = Fake_Arm_Model
  575. end
  576. Fake_Arm_Model.Name = "FakeArms"
  577. if Settings.CharacterMeshes then
  578. for i, v in pairs(Character:GetChildren()) do
  579. if v:IsA("CharacterMesh") and v.BodyPart == Enum.BodyPart.LeftArm or v:IsA("CharacterMesh") and v.BodyPart == Enum.BodyPart.RightArm then
  580. v:Clone().Parent = Fake_Arm_Model
  581. end
  582. end
  583. end
  584. if Character:FindFirstChild("Shirt") then
  585. Instance.new("Humanoid", Fake_Arm_Model)
  586. Character.Shirt:Clone().Parent = Fake_Arm_Model
  587. else
  588. local Arm_Mesh = Instance.new("SpecialMesh", Fake_Arm_Right)
  589. Arm_Mesh.MeshType, Arm_Mesh.Scale = "Brick", Vector3.new(5, 10, 5)
  590. local Arm_Mesh2 = Instance.new("SpecialMesh", Fake_Arm_Left)
  591. Arm_Mesh2.MeshType, Arm_Mesh2.Scale = "Brick", Vector3.new(5, 10, 5)
  592. end
  593. end
  594. end)
  595.  
  596. Tool.Unequipped:connect(function()
  597. Equipped = false
  598. Tool.GripPos = Orig_Grip
  599. Aiming = false
  600. Settings.Spread = Orig_Spread
  601. if Settings.ChangeFOV[1] then
  602. Camera.FieldOfView = 70
  603. end
  604. if Gui then
  605. Gui:Destroy()
  606. Gui = nil
  607. end
  608. for i, v in pairs(Tool.Handle:GetChildren()) do
  609. if v:IsA("Sound") then
  610. v:Stop()
  611. end
  612. end
  613. if Fake_Arm_Right and Fake_Arm_Left and Fake_Arm_Model then
  614. Fake_Arm_Model:Destroy()
  615. Fake_Arm_Right, Fake_Arm_Left, Fake_Arm_Model = nil, nil, nil
  616. end
  617. if Character and Left_Weld and Right_Weld then
  618. Arms_Made = false
  619. local Torso = Character.Torso
  620. Torso["Right Shoulder"].Part1, Torso["Left Shoulder"].Part1 = Character["Right Arm"], Character["Left Arm"]
  621. Left_Weld:Destroy()
  622. Right_Weld:Destroy()
  623. end
  624. Sprinting = false
  625. Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  626. Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  627. Character.Humanoid.WalkSpeed = 16
  628. end)
Advertisement
Add Comment
Please, Sign In to add comment