Guest User

Untitled

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