daily pastebin goal
35%
SHARE
TWEET

Fix (Test)

Grenka16067_Dev Jun 13th, 2018 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Character = game.Players.LocalPlayer.Character
  2. Player = game.Players.LocalPlayer
  3. char = Character
  4. hum = Character.Humanoid
  5. Torso = Character.Torso
  6. Head = Character.Head
  7.  
  8.     char.Shirt.ShirtTemplate = "rbxassetid://1141871069"
  9.  
  10.     local BC = char["Body Colors"]
  11.     BC.HeadColor = BrickColor.new("Pastel brown")
  12.     BC.LeftArmColor = BrickColor.new("Pastel brown")
  13.     BC.LeftLegColor = BrickColor.new("Pastel brown")
  14.     BC.RightArmColor = BrickColor.new("Pastel brown")
  15.     BC.RightLegColor = BrickColor.new("Pastel brown")
  16.     BC.TorsoColor = BrickColor.new("Pastel brown")
  17.  
  18.     char.Head.face.Texture = "rbxassetid://23931977"
  19.  
  20. hum.MaxHealth = math.huge
  21.  
  22.  
  23.  
  24.  
  25. for i,v in pairs(char:children()) do
  26.     if v:IsA("Hat") then
  27.         v:Destroy()
  28.     end
  29. end
  30. for i,v in pairs(char:children()) do
  31.     if v:IsA("Accessory") then
  32.         v:Destroy()
  33.     end
  34. end
  35. for i,v in pairs(char:children()) do
  36.     if v:IsA("Hair") then
  37.         v:Destroy()
  38.     end
  39. end
  40. --141378828
  41. Reaper = Instance.new("Model")
  42. Reaper.Parent = Player.Character
  43. Reaper.Name = "Reaper"
  44. rh = Instance.new("Part")
  45. rh.Parent = Reaper
  46. rh.BrickColor = BrickColor.new("Really red")
  47. rh.Locked = true
  48. rh.CanCollide = false
  49. mesh = Instance.new("SpecialMesh")
  50. rh.formFactor =  "Symmetric"
  51. mesh.MeshType = "FileMesh"
  52. mesh.MeshId = "http://www.roblox.com/asset/?id=29713297"
  53. mesh.TextureId = "http://www.roblox.com/asset/?id=29713290"
  54. mesh.Parent = rh
  55. mesh.Scale = Vector3.new(1.1,1.1,1.1)
  56. local weld = Instance.new("Weld")
  57. weld.Parent = rh
  58. rh.Transparency = 0
  59. weld.Part0 = rh
  60. weld.Part1 = Player.Character.Head
  61. weld.C0 = CFrame.new(-0, 0.7, -0)*CFrame.Angles(0, 0, 0)
  62.  
  63. local s = Instance.new("Sound",char)
  64. s.SoundId = "http://www.roblox.com/asset/?id=624510858"
  65. s.Pitch = 1
  66. s.Volume = 2
  67. s.Looped = true
  68. wait(1)
  69. s:play()
  70. local txtfag = Instance.new("BillboardGui", game.Players.LocalPlayer.Character.Head)
  71. txtfag.Adornee = suckadick
  72. txtfag.Name = "kys nigga"
  73. txtfag.Size = UDim2.new(2, 0, 1.2, 0)
  74. txtfag.StudsOffset = Vector3.new(-5, 3, 0)
  75. local textfag = Instance.new("TextLabel", txtfag)
  76. textfag.Size = UDim2.new(6, 0, 1, 0)
  77. textfag.FontSize = "Size8"
  78. textfag.TextScaled = true
  79. textfag.TextTransparency = 0
  80. textfag.BackgroundTransparency = 1
  81. textfag.TextTransparency = 0
  82. textfag.TextStrokeTransparency = 0
  83. textfag.Font = "Code"
  84. textfag.TextStrokeColor3 = Color3.new(0, 255, 0)
  85. v = Instance.new("Part")
  86. v.Name = "ColorBrick"
  87. v.Parent = part
  88. v.FormFactor = "Symmetric"
  89. v.Anchored = true
  90. v.CanCollide = false
  91. v.BottomSurface = "Smooth"
  92. v.TopSurface = "Smooth"
  93. v.Size = Vector3.new(10, 5, 3)
  94. v.Transparency = 0.7
  95. v.BrickColor = game.Players.LocalPlayer.Character.Torso.BrickColor
  96. v.Transparency = 1
  97. textfag.TextColor3 = v.BrickColor.Color
  98. v.Shape = "Block"
  99. textfag.TextStrokeColor3 = Color3.new(0, 255, 0)
  100. textfag.Text = "You...."
  101. wait(2)
  102. textfag.Text = "You....killed...mankind."
  103. wait(2)
  104. textfag.Text = "How can you do this?"
  105. wait(2)
  106. textfag.Text = "You banned so much people, Why would you do this to everyone?"
  107. wait(2)
  108. textfag.Text = "Well, your final opponent is me. If you ever want to destroy Roblox forever, Your very mistaken."
  109. wait(2)
  110. textfag.Text = game.Players.LocalPlayer.Character.Name.." the Last Oder "
  111.  
  112. local runDummyScript = function(f,scri)
  113. local oldenv = getfenv(f)
  114. local newenv = setmetatable({}, {
  115. __index = function(_, k)
  116. if k:lower() == 'script' then
  117. return scri
  118. else
  119. return oldenv[k]
  120. end
  121. end
  122. })
  123. setfenv(f, newenv)
  124. ypcall(function() f() end)
  125. end
  126. cors = {}
  127. mas = Instance.new("Model",game:GetService("Lighting"))
  128. mas.Name = "CompiledModel"
  129. o1 = Instance.new("Tool")
  130. o2 = Instance.new("Part")
  131. o3 = Instance.new("SpecialMesh")
  132. o4 = Instance.new("Sound")
  133. o5 = Instance.new("Sound")
  134. o6 = Instance.new("Sound")
  135. o7 = Instance.new("PointLight")
  136. o8 = Instance.new("Sound")
  137. o10 = Instance.new("LocalScript")
  138. o11 = Instance.new("Animation")
  139. o12 = Instance.new("ScreenGui")
  140. o13 = Instance.new("Frame")
  141. o14 = Instance.new("TextLabel")
  142. o15 = Instance.new("TextLabel")
  143. o16 = Instance.new("TextLabel")
  144. o17 = Instance.new("Frame")
  145. o18 = Instance.new("Frame")
  146. o19 = Instance.new("Frame")
  147. o20 = Instance.new("Frame")
  148. o21 = Instance.new("ImageLabel")
  149. o22 = Instance.new("TextLabel")
  150. o23 = Instance.new("Frame")
  151. o24 = Instance.new("Frame")
  152. o25 = Instance.new("TextLabel")
  153. o26 = Instance.new("LocalScript")
  154. o1.Name = "AUG"
  155. o1.Parent = game.Players.LocalPlayer.Backpack
  156. o1.TextureId = "http://www.roblox.com/asset/?id=470208943"
  157. o1.GripForward = Vector3.new(-0.242535636, -0, -0.970142484)
  158. o1.GripPos = Vector3.new(0.200000003, -0.400000006, 0.200000003)
  159. o1.GripRight = Vector3.new(0.970142484, 0, -0.242535636)
  160. o1.ToolTip = "Steyr AUG"
  161. o1.CanBeDropped = false
  162. o2.Name = "Handle"
  163. o2.Parent = o1
  164. o2.BrickColor = BrickColor.new("Hot pink")
  165. o2.Position = Vector3.new(15.9000006, -8.5, 3.20000005)
  166. o2.FormFactor = Enum.FormFactor.Custom
  167. o2.Size = Vector3.new(0.200000003, 1, 3.5999999)
  168. o2.CFrame = CFrame.new(15.9000006, -8.5, 3.20000005, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  169. o2.BottomSurface = Enum.SurfaceType.Smooth
  170. o2.TopSurface = Enum.SurfaceType.Smooth
  171. o2.Color = Color3.new(0.105882, 0.164706, 0.207843)
  172. o2.Position = Vector3.new(15.9000006, -8.5, 3.20000005)
  173. o3.Parent = o2
  174. o3.MeshId = "http://www.roblox.com/asset/?id=2761723"
  175. o3.Scale = Vector3.new(1.33000004, 1.33000004, 1.33000004)
  176. o3.TextureId = "http://www.roblox.com/asset?ID=56168143"
  177. o3.MeshType = Enum.MeshType.FileMesh
  178. o4.Name = "FireSound"
  179. o4.Parent = o2
  180. o4.Pitch = 1.3999999761581
  181. o4.SoundId = "http://www.roblox.com/asset/?id=10209821"
  182. o4.Volume = 1
  183. o5.Name = "Reload"
  184. o5.Parent = o2
  185. o5.SoundId = "http://www.roblox.com/asset/?id=97094986"
  186. o5.Volume = 1
  187. o6.Name = "EquipSound"
  188. o6.Parent = o2
  189. o6.SoundId = "http://www.roblox.com/asset/?id=10209881"
  190. o6.Volume = 1
  191. o7.Name = "Flash"
  192. o7.Parent = o2
  193. o7.Color = Color3.new(1, 1, 0)
  194. o7.Enabled = false
  195. o7.Brightness = 1.5
  196. o8.Name = "Tick"
  197. o8.Parent = o2
  198. o8.SoundId = "rbxasset://sounds//clickfast.wav"
  199. o8.Volume = 1
  200. o10.Name = "AUG"
  201. o10.Parent = o1
  202. print("Giving "..game.Players.LocalPlayer.Name.. " an " ..o1.Name.. " I will find ur friends and while i do. Ill date them >:) ")
  203. table.insert(cors,coroutine.create(function()
  204. wait()
  205. runDummyScript(function()
  206. --------------------- TEMPLATE ASSAULT RIFLE WEAPON ---------------------------
  207. -- Waits for the child of the specified parent
  208. local function WaitForChild(parent, childName)
  209.     while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
  210.     return parent[childName]
  211. end
  212.  
  213. ----- MAGIC NUMBERS ABOUT THE TOOL -----
  214. -- How much damage a bullet does
  215. local Damage = math.huge
  216. -- How many times per second the gun can fire
  217. local FireRate = 1 / 15
  218. -- The maximum distance the can can shoot, this value should never go above 1000
  219. local Range = 700
  220. -- In radians the minimum accuracy penalty
  221. local MinSpread = 0.01
  222. -- In radian the maximum accuracy penalty
  223. local MaxSpread = 0.06
  224. -- Number of bullets in a clip
  225. local ClipSize = math.huge
  226. -- DefaultValue for spare ammo
  227. local SpareAmmo = math.huge
  228. -- The amount the aim will increase or decrease by
  229. -- decreases this number reduces the speed that recoil takes effect
  230. local AimInaccuracyStepAmount = 0.01
  231. -- Time it takes to reload weapon
  232. local ReloadTime = 2.3
  233. ----------------------------------------
  234.  
  235. -- Colors
  236. local FriendlyReticleColor = Color3.new(0, 1, 0)
  237. local EnemyReticleColor = Color3.new(1, 0, 0)
  238. local NeutralReticleColor   = Color3.new(1, 1, 1)
  239.  
  240. local Spread = MinSpread
  241. local AmmoInClip = ClipSize
  242.  
  243. local Tool = o1
  244. local Handle = WaitForChild(Tool, 'Handle')
  245. local WeaponGui = nil
  246.  
  247. local LeftButtonDown
  248. local Reloading = false
  249. local IsShooting = false
  250.  
  251. -- Player specific convenience variables
  252. local MyPlayer = nil
  253. local MyCharacter = nil
  254. local MyHumanoid = nil
  255. local MyTorso = nil
  256. local MyMouse = nil
  257.  
  258. local RecoilAnim
  259. local RecoilTrack = nil
  260.  
  261. local IconURL = Tool.TextureId  -- URL to the weapon icon asset
  262.  
  263. local DebrisService = game:GetService('Debris')
  264. local PlayersService = game:GetService('Players')
  265.  
  266.  
  267. local FireSound
  268.  
  269. local OnFireConnection = nil
  270. local OnReloadConnection = nil
  271.  
  272. local DecreasedAimLastShot = false
  273. local LastSpreadUpdate = time()
  274.  
  275. -- this is a dummy object that holds the flash made when the gun is fired
  276. local FlashHolder = nil
  277.  
  278.  
  279. local WorldToCellFunction = Workspace.Terrain.WorldToCellPreferSolid
  280. local GetCellFunction = Workspace.Terrain.GetCell
  281.  
  282. function RayIgnoreCheck(hit, pos)
  283.     if hit then
  284.         if hit.Transparency >= 1 or string.lower(hit.Name) == "water" or
  285.                 hit.Name == "Effect" or hit.Name == "Rocket" or hit.Name == "Bullet" or
  286.                 hit.Name == "Handle" or hit:IsDescendantOf(MyCharacter) then
  287.             return true
  288.         elseif hit:IsA('Terrain') and pos then
  289.             local cellPos = WorldToCellFunction(Workspace.Terrain, pos)
  290.             if cellPos then
  291.                 local cellMat = GetCellFunction(Workspace.Terrain, cellPos.x, cellPos.y, cellPos.z)
  292.                 if cellMat and cellMat == Enum.CellMaterial.Water then
  293.                     return true
  294.                 end
  295.             end
  296.         end
  297.     end
  298.     return false
  299. end
  300.  
  301. -- @preconditions: vec should be a unit vector, and 0 < rayLength <= 1000
  302. function RayCast(startPos, vec, rayLength)
  303.     local hitObject, hitPos = game.Workspace:FindPartOnRay(Ray.new(startPos + (vec * .01), vec * rayLength), Handle)
  304.     if hitObject and hitPos then
  305.         local distance = rayLength - (hitPos - startPos).magnitude
  306.         if RayIgnoreCheck(hitObject, hitPos) and distance > 0 then
  307.             -- there is a chance here for potential infinite recursion
  308.             return RayCast(hitPos, vec, distance)
  309.         end
  310.     end
  311.     return hitObject, hitPos
  312. end
  313.  
  314.  
  315.  
  316. function TagHumanoid(humanoid, player)
  317.     -- Add more tags here to customize what tags are available.
  318.     while humanoid:FindFirstChild('creator') do
  319.         humanoid:FindFirstChild('creator'):Destroy()
  320.     end
  321.     local creatorTag = Instance.new("ObjectValue")
  322.     creatorTag.Value = player
  323.     creatorTag.Name = "creator"
  324.     creatorTag.Parent = humanoid
  325.     DebrisService:AddItem(creatorTag, 1.5)
  326.  
  327.     local weaponIconTag = Instance.new("StringValue")
  328.     weaponIconTag.Value = IconURL
  329.     weaponIconTag.Name = "icon"
  330.     weaponIconTag.Parent = creatorTag
  331. end
  332.  
  333.  
  334. local function CreateBullet(bulletPos)
  335.     local bullet = Instance.new('Part', Workspace)
  336.     bullet.FormFactor = Enum.FormFactor.Custom
  337.     bullet.Size = Vector3.new(0.1, 0.1, 0.1)
  338.     bullet.BrickColor = BrickColor.new("Black")
  339.     bullet.Shape = Enum.PartType.Block
  340.     bullet.CanCollide = false
  341.     bullet.CFrame = CFrame.new(bulletPos)
  342.     bullet.Anchored = true
  343.     bullet.TopSurface = Enum.SurfaceType.Smooth
  344.     bullet.BottomSurface = Enum.SurfaceType.Smooth
  345.     bullet.Name = 'Bullet'
  346.     DebrisService:AddItem(bullet, 2.5)
  347.     return bullet
  348. end
  349.  
  350. local function Reload()
  351.     if not Reloading then
  352.         Reloading = true
  353.         -- Don't reload if you are already full or have no extra ammo
  354.         if AmmoInClip ~= ClipSize and SpareAmmo > 0 then
  355.             if RecoilTrack then
  356.                 RecoilTrack:Stop()
  357.             end
  358.             if WeaponGui and WeaponGui:FindFirstChild('Crosshair') then
  359.                 if WeaponGui.Crosshair:FindFirstChild('ReloadingLabel') then
  360.                     WeaponGui.Crosshair.ReloadingLabel.Visible = true
  361.                 end
  362.             end
  363.             script.Parent.Handle.Reload:Play()
  364.             wait(ReloadTime)
  365.             -- Only use as much ammo as you have
  366.             local ammoToUse = math.min(ClipSize - AmmoInClip, SpareAmmo)
  367.             AmmoInClip = AmmoInClip + ammoToUse
  368.             SpareAmmo = SpareAmmo - ammoToUse
  369.             UpdateAmmo(AmmoInClip)
  370.             WeaponGui.Reload.Visible = false
  371.         end
  372.         Reloading = false
  373.     end
  374. end
  375.  
  376. function OnFire()
  377.     if IsShooting then return end
  378.     if MyHumanoid and MyHumanoid.Health > 0 then
  379.         if RecoilTrack and AmmoInClip > 0 then
  380.             RecoilTrack:Play()
  381.         end
  382.         IsShooting = true
  383.         while LeftButtonDown and AmmoInClip > 0 and not Reloading do
  384.             if Spread and not DecreasedAimLastShot then
  385.                 Spread = math.min(MaxSpread, Spread + AimInaccuracyStepAmount)
  386.                 UpdateCrosshair(Spread)
  387.             end
  388.             DecreasedAimLastShot = not DecreasedAimLastShot
  389.             if Handle:FindFirstChild('FireSound') then
  390.                 Handle.FireSound:Play()
  391.                 Handle.Flash.Enabled = true
  392.             end
  393.             if MyMouse then
  394.                 local targetPoint = MyMouse.Hit.p
  395.                 local shootDirection = (targetPoint - Handle.Position).unit
  396.                 -- Adjust the shoot direction randomly off by a little bit to account for recoil
  397.                 shootDirection = CFrame.Angles((0.5 - math.random()) * 2 * Spread,
  398.                                                                 (0.5 - math.random()) * 2 * Spread,
  399.                                                                 (0.5 - math.random()) * 2 * Spread) * shootDirection
  400.                 local hitObject, bulletPos = RayCast(Handle.Position, shootDirection, Range)
  401.                 local bullet
  402.                 -- Create a bullet here
  403.                 if hitObject then
  404.                     bullet = CreateBullet(bulletPos)
  405.                 end
  406.                 if hitObject and hitObject.Parent then
  407.                     local hitHumanoid = hitObject.Parent:FindFirstChild("Humanoid")
  408.                     if hitHumanoid then
  409.                         local hitPlayer = game.Players:GetPlayerFromCharacter(hitHumanoid.Parent)
  410.                         if MyPlayer.Neutral or hitPlayer then
  411.                             TagHumanoid(hitHumanoid, MyPlayer)
  412.                             hitHumanoid:TakeDamage(Damage)
  413.                             if bullet then
  414.                                 bullet:Destroy()
  415.                                 bullet = nil
  416.                                 --bullet.Transparency = 1
  417.                             end
  418.                             Spawn(UpdateTargetHit)
  419.                         end
  420.                     end
  421.                 end
  422.    
  423.                 AmmoInClip = AmmoInClip - 1
  424.                 UpdateAmmo(AmmoInClip)
  425.             end
  426.             wait(FireRate)
  427.         end
  428.         Handle.Flash.Enabled = false
  429.         IsShooting = false
  430.         if AmmoInClip == 0 then
  431.             Handle.Tick:Play()
  432.             WeaponGui.Reload.Visible = true
  433.         end
  434.         if RecoilTrack then
  435.             RecoilTrack:Stop()
  436.         end
  437.     end
  438. end
  439.  
  440. local TargetHits = 0
  441. function UpdateTargetHit()
  442.     TargetHits = TargetHits + 1
  443.     if WeaponGui and WeaponGui:FindFirstChild('Crosshair') and WeaponGui.Crosshair:FindFirstChild('TargetHitImage') then
  444.         WeaponGui.Crosshair.TargetHitImage.Visible = true
  445.     end
  446.     wait(0.5)
  447.     TargetHits = TargetHits - 1
  448.     if TargetHits == 0 and WeaponGui and WeaponGui:FindFirstChild('Crosshair') and WeaponGui.Crosshair:FindFirstChild('TargetHitImage') then
  449.         WeaponGui.Crosshair.TargetHitImage.Visible = false
  450.     end
  451. end
  452.  
  453. function UpdateCrosshair(value, mouse)
  454.     if WeaponGui then
  455.         local absoluteY = 650
  456.         WeaponGui.Crosshair:TweenSize(
  457.             UDim2.new(0, value * absoluteY * 2 + 23, 0, value * absoluteY * 2 + 23),
  458.             Enum.EasingDirection.Out,
  459.             Enum.EasingStyle.Linear,
  460.             0.33)
  461.     end
  462. end
  463.  
  464. function UpdateAmmo(value)
  465.     if WeaponGui and WeaponGui:FindFirstChild('AmmoHud') and WeaponGui.AmmoHud:FindFirstChild('ClipAmmo') then
  466.         WeaponGui.AmmoHud.ClipAmmo.Text = AmmoInClip
  467.         if value > 0 and WeaponGui:FindFirstChild('Crosshair') and WeaponGui.Crosshair:FindFirstChild('ReloadingLabel') then
  468.             WeaponGui.Crosshair.ReloadingLabel.Visible = false
  469.         end
  470.     end
  471.     if WeaponGui and WeaponGui:FindFirstChild('AmmoHud') and WeaponGui.AmmoHud:FindFirstChild('TotalAmmo') then
  472.         WeaponGui.AmmoHud.TotalAmmo.Text = SpareAmmo
  473.     end
  474. end
  475.  
  476.  
  477. function OnMouseDown()
  478.     LeftButtonDown = true
  479.     OnFire()
  480. end
  481.  
  482. function OnMouseUp()
  483.     LeftButtonDown = false
  484. end
  485.  
  486. function OnKeyDown(key)
  487.     if string.lower(key) == 'r' then
  488.         Reload()
  489.     end
  490. end
  491.  
  492.  
  493. function OnEquipped(mouse)
  494.     Handle.EquipSound:Play()
  495.     RecoilAnim = WaitForChild(Tool, 'Recoil')
  496.     FireSound  = WaitForChild(Handle, 'FireSound')
  497.  
  498.     MyCharacter = Tool.Parent
  499.     MyPlayer = game:GetService('Players'):GetPlayerFromCharacter(MyCharacter)
  500.     MyHumanoid = MyCharacter:FindFirstChild('Humanoid')
  501.     MyTorso = MyCharacter:FindFirstChild('Torso')
  502.     MyMouse = mouse
  503.     WeaponGui = WaitForChild(Tool, 'WeaponHud'):Clone()
  504.     if WeaponGui and MyPlayer then
  505.         WeaponGui.Parent = MyPlayer.PlayerGui
  506.         UpdateAmmo(AmmoInClip)
  507.     end
  508.     if RecoilAnim then
  509.         RecoilTrack = MyHumanoid:LoadAnimation(RecoilAnim)
  510.     end
  511.  
  512.     if MyMouse then
  513.         -- Disable mouse icon
  514.         MyMouse.Icon = "http://www.roblox.com/asset/?id=142406345"
  515.         MyMouse.Button1Down:connect(OnMouseDown)
  516.         MyMouse.Button1Up:connect(OnMouseUp)
  517.         MyMouse.KeyDown:connect(OnKeyDown)
  518.     end
  519. end
  520.  
  521.  
  522. -- Unequip logic here
  523. function OnUnequipped()
  524.     LeftButtonDown = false
  525.     Reloading = false
  526.     MyCharacter = nil
  527.     MyHumanoid = nil
  528.     MyTorso = nil
  529.     MyPlayer = nil
  530.     MyMouse = nil
  531.     if OnFireConnection then
  532.         OnFireConnection:disconnect()
  533.     end
  534.     if OnReloadConnection then
  535.         OnReloadConnection:disconnect()
  536.     end
  537.     if FlashHolder then
  538.         FlashHolder = nil
  539.     end
  540.     if WeaponGui then
  541.         WeaponGui.Parent = nil
  542.         WeaponGui = nil
  543.     end
  544.     if RecoilTrack then
  545.         RecoilTrack:Stop()
  546.     end
  547. end
  548.  
  549. local function SetReticleColor(color)
  550.     if WeaponGui and WeaponGui:FindFirstChild('Crosshair') then
  551.         for _, line in pairs(WeaponGui.Crosshair:GetChildren()) do
  552.             if line:IsA('Frame') then
  553.                 line.BorderColor3 = color
  554.             end
  555.         end
  556.     end
  557. end
  558.  
  559.  
  560. Tool.Equipped:connect(OnEquipped)
  561. Tool.Unequipped:connect(OnUnequipped)
  562.  
  563. while true do
  564.     wait(0.033)
  565.     if WeaponGui and WeaponGui:FindFirstChild('Crosshair') and MyMouse then
  566.         WeaponGui.Crosshair.Position = UDim2.new(0, MyMouse.X, 0, MyMouse.Y)
  567.         SetReticleColor(NeutralReticleColor)
  568.  
  569.         local target = MyMouse.Target
  570.         if target and target.Parent then
  571.             local player = PlayersService:GetPlayerFromCharacter(target.Parent)
  572.             if player then
  573.                 if MyPlayer.Neutral or player.TeamColor ~= MyPlayer.TeamColor then
  574.                     SetReticleColor(EnemyReticleColor)
  575.                 else
  576.                     SetReticleColor(FriendlyReticleColor)
  577.                 end
  578.             end
  579.         end
  580.     end
  581.     if Spread and not IsShooting then
  582.         local currTime = time()
  583.         if currTime - LastSpreadUpdate > FireRate * 2 then
  584.             LastSpreadUpdate = currTime
  585.             Spread = math.max(MinSpread, Spread - AimInaccuracyStepAmount)
  586.             UpdateCrosshair(Spread, MyMouse)
  587.         end
  588.     end
  589. end
  590.  
  591. end,o10)
  592. end))
  593. o11.Name = "Recoil"
  594. o11.Parent = o1
  595. o11.AnimationId = "http://www.roblox.com/Asset?ID=94331086"
  596. o12.Name = "WeaponHud"
  597. o12.Parent = o1
  598. o13.Name = "AmmoHud"
  599. o13.Parent = o12
  600. o13.Position = UDim2.new(1,-265,1,-60)
  601. o13.Size = UDim2.new(0,200,0,50)
  602. o13.Style = Enum.FrameStyle.RobloxSquare
  603. o13.Position = UDim2.new(1,-265,1,-60)
  604. o13.BackgroundTransparency = 1
  605. o13.BorderSizePixel = 0
  606. o14.Name = "ForwardSlash"
  607. o14.Parent = o13
  608. o14.Position = UDim2.new(0.5,0,0.5,0)
  609. o14.Text = "/"
  610. o14.Position = UDim2.new(0.5,0,0.5,0)
  611. o14.BackgroundTransparency = 1
  612. o14.BorderSizePixel = 0
  613. o14.FontSize = Enum.FontSize.Size24
  614. o14.TextColor3 = Color3.new(1, 1, 1)
  615. o14.TextStrokeTransparency = 0
  616. o15.Name = "ClipAmmo"
  617. o15.Parent = o13
  618. o15.Position = UDim2.new(0.44999998807907,0,0.5,0)
  619. o15.Text = "54"
  620. o15.Position = UDim2.new(0.44999998807907,0,0.5,0)
  621. o15.BackgroundTransparency = 1
  622. o15.BorderSizePixel = 0
  623. o15.FontSize = Enum.FontSize.Size24
  624. o15.TextColor3 = Color3.new(1, 1, 1)
  625. o15.TextStrokeTransparency = 0
  626. o15.TextXAlignment = Enum.TextXAlignment.Right
  627. o16.Name = "TotalAmmo"
  628. o16.Parent = o13
  629. o16.Position = UDim2.new(0.55000001192093,0,0.5,0)
  630. o16.Text = "180"
  631. o16.Position = UDim2.new(0.55000001192093,0,0.5,0)
  632. o16.BackgroundTransparency = 1
  633. o16.BorderSizePixel = 0
  634. o16.FontSize = Enum.FontSize.Size24
  635. o16.TextColor3 = Color3.new(1, 1, 1)
  636. o16.TextStrokeTransparency = 0
  637. o16.TextXAlignment = Enum.TextXAlignment.Left
  638. o17.Name = "Crosshair"
  639. o17.Parent = o12
  640. o17.Position = UDim2.new(0,500,0,500)
  641. o17.Size = UDim2.new(0,150,0,150)
  642. o17.Position = UDim2.new(0,500,0,500)
  643. o17.BackgroundColor3 = Color3.new(0, 1, 0)
  644. o17.BackgroundTransparency = 1
  645. o17.BorderSizePixel = 0
  646. o18.Name = "TopFrame"
  647. o18.Parent = o17
  648. o18.Position = UDim2.new(0,-1,-0.5,-7)
  649. o18.Size = UDim2.new(0,2,0,14)
  650. o18.Position = UDim2.new(0,-1,-0.5,-7)
  651. o18.BackgroundColor3 = Color3.new(1, 1, 1)
  652. o18.BorderColor3 = Color3.new(0, 0, 0)
  653. o19.Name = "RightFrame"
  654. o19.Parent = o17
  655. o19.Position = UDim2.new(0.5,-7,0,-1)
  656. o19.Size = UDim2.new(0,14,0,2)
  657. o19.Position = UDim2.new(0.5,-7,0,-1)
  658. o19.BackgroundColor3 = Color3.new(1, 1, 1)
  659. o19.BorderColor3 = Color3.new(0, 0, 0)
  660. o20.Name = "LeftFrame"
  661. o20.Parent = o17
  662. o20.Position = UDim2.new(-0.5,-7,0,-1)
  663. o20.Size = UDim2.new(0,14,0,2)
  664. o20.Position = UDim2.new(-0.5,-7,0,-1)
  665. o20.BackgroundColor3 = Color3.new(1, 1, 1)
  666. o20.BorderColor3 = Color3.new(0, 0, 0)
  667. o21.Name = "TargetHitImage"
  668. o21.Parent = o17
  669. o21.Position = UDim2.new(0,-25,0,-25)
  670. o21.Size = UDim2.new(0,50,0,50)
  671. o21.Position = UDim2.new(0,-25,0,-25)
  672. o21.Visible = false
  673. o21.BackgroundTransparency = 1
  674. o21.BorderSizePixel = 0
  675. o21.Image = "http://www.roblox.com/asset/?id=115400215"
  676. o22.Name = "ReloadingLabel"
  677. o22.Parent = o17
  678. o22.Position = UDim2.new(0,20,0,-20)
  679. o22.Text = "Reloading"
  680. o22.Position = UDim2.new(0,20,0,-20)
  681. o22.Visible = false
  682. o22.BackgroundTransparency = 1
  683. o22.BorderSizePixel = 0
  684. o22.Font = Enum.Font.ArialBold
  685. o22.FontSize = Enum.FontSize.Size18
  686. o22.TextColor3 = Color3.new(1, 1, 1)
  687. o22.TextStrokeTransparency = 0
  688. o22.TextXAlignment = Enum.TextXAlignment.Left
  689. o22.TextYAlignment = Enum.TextYAlignment.Bottom
  690. o23.Name = "BottomFrame"
  691. o23.Parent = o17
  692. o23.Position = UDim2.new(0,-1,0.5,-7)
  693. o23.Size = UDim2.new(0,2,0,14)
  694. o23.Position = UDim2.new(0,-1,0.5,-7)
  695. o23.BackgroundColor3 = Color3.new(1, 1, 1)
  696. o23.BorderColor3 = Color3.new(0, 0, 0)
  697. o24.Name = "Reload"
  698. o24.Parent = o12
  699. o24.Position = UDim2.new(1,-265,1,-120)
  700. o24.Size = UDim2.new(0,200,0,50)
  701. o24.Position = UDim2.new(1,-265,1,-120)
  702. o24.Visible = false
  703. o24.BackgroundTransparency = 1
  704. o24.BorderSizePixel = 0
  705. o25.Name = "Reload"
  706. o25.Parent = o24
  707. o25.Position = UDim2.new(0.5,0,0.5,0)
  708. o25.Text = "Press R to Reload"
  709. o25.Position = UDim2.new(0.5,0,0.5,0)
  710. o25.BackgroundTransparency = 1
  711. o25.BorderSizePixel = 0
  712. o25.Font = Enum.Font.ArialBold
  713. o25.FontSize = Enum.FontSize.Size24
  714. o25.TextColor3 = Color3.new(1, 0, 0)
  715. o25.TextStrokeTransparency = 0
  716. o26.Name = "ArmWeld [Rifle]"
  717. o26.Parent = o1
  718. table.insert(cors,coroutine.create(function()
  719. wait()
  720. runDummyScript(function()
  721. Tool = script.Parent;
  722.  
  723. local arms = nil
  724. local torso = nil
  725. local welds = {}
  726.  
  727. function Equip(mouse)
  728. wait(0.01)
  729. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  730. torso = Tool.Parent:FindFirstChild("Torso")
  731. if arms ~= nil and torso ~= nil then
  732. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  733. if sh ~= nil then
  734. local yes = true
  735. if yes then
  736. yes = false
  737. sh[1].Part1 = nil
  738. sh[2].Part1 = nil
  739. local weld1 = Instance.new("Weld")
  740. weld1.Part0 = torso
  741. weld1.Parent = torso
  742. weld1.Part1 = arms[1]
  743. weld1.C1 = CFrame.new(-.1, 1.25, .6) * CFrame.fromEulerAnglesXYZ(math.rad(290), math.rad(10), math.rad(-90)) ---The first set of numbers changes where the arms move to the second set changes their angles
  744. welds[1] = weld1
  745. weld1.Name = "weld1"
  746. local weld2 = Instance.new("Weld")
  747. weld2.Part0 = torso
  748. weld2.Parent = torso
  749. weld2.Part1 = arms[2]
  750. weld2.C1 = CFrame.new(-1, -0.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0) --- Same as top
  751. welds[2] = weld2
  752. weld2.Name = "weld2"
  753. end
  754. else
  755. print("sh")
  756. end
  757. else
  758. print("arms")
  759. end
  760. end
  761.  
  762. function Unequip(mouse)
  763. if arms ~= nil and torso ~= nil then
  764. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  765. if sh ~= nil then
  766. local yes = true
  767. if yes then
  768. yes = false
  769. sh[1].Part1 = arms[1]
  770. sh[2].Part1 = arms[2]
  771. welds[1].Parent = nil
  772. welds[2].Parent = nil
  773. end
  774. else
  775. print("sh")
  776. end
  777. else
  778. print("arms")
  779. end
  780. end
  781. Tool.Equipped:connect(Equip)
  782. Tool.Unequipped:connect(Unequip)
  783.  
  784. end,o26)
  785. end))
  786. mas.Parent = workspace
  787. mas:MakeJoints()
  788. local mas1 = mas:GetChildren()
  789. for i=1,#mas1 do
  790.     mas1[i].Parent = workspace
  791.     ypcall(function() mas1[i]:MakeJoints() end)
  792. end
  793. mas:Destroy()
  794. for i=1,#cors do
  795. coroutine.resume(cors[i])
  796. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top