Dark_EccentricYT

Untitled

Aug 12th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.44 KB | None | 0 0
  1. print"Loading"
  2. --script=Instance.new("LocalScript")
  3. -- << K1LL0X >> --
  4.  
  5.  
  6. local UIS = game:GetService("UserInputService")
  7.  
  8. local Player = game.Players.LocalPlayer
  9. local Mouse = Player:GetMouse()
  10.  
  11.  
  12. function GetCharacter()
  13. return game.Players.LocalPlayer.Character
  14. end
  15.  
  16. function Teleport(pos)
  17. local Char = GetCharacter()
  18. if Char then
  19. Char:MoveTo(pos)
  20. end
  21. end
  22.  
  23.  
  24. UIS.InputBegan:Connect(function(input)
  25. if input.UserInputType == Enum.UserInputType.MouseButton1 and UIS:IsKeyDown(Enum.KeyCode.LeftControl) then
  26. Teleport(Mouse.Hit.p)
  27. end
  28. end)
  29.  
  30.  
  31.  
  32.  
  33. local source = [[
  34. function GetM9()
  35. local m9 = game.Players.LocalPlayer.Backpack:FindFirstChild("M9")
  36. if m9 then
  37. return m9
  38. else
  39. return game.Players.LocalPlayer.Character:FindFirstChild("M9")
  40. end
  41. end
  42. repeat wait() until GetM9().ClassName == "Tool"
  43.  
  44. local Player = game.Players.LocalPlayer
  45. local Mouse = Player:GetMouse()
  46. local Character = game.Workspace:WaitForChild(Player.Name)
  47. local Humanoid = Character:WaitForChild("Humanoid")
  48.  
  49.  
  50.  
  51.  
  52. local Data = {
  53. Damages = {
  54. Head = 30,
  55. Torso = 25,
  56. Else = 20
  57. },
  58. FireRate = 1/11,
  59. ReloadTime = 0.1,
  60. ClipSize = 350,
  61. Accuracy = 10,
  62. NumBullets = 1,
  63. FireMode = "Auto",
  64. Range = 1000,
  65. BarrelOffset = CFrame.new(0,.25,-.7)
  66. }
  67.  
  68. function F1R3(Human, dmg)
  69. for i = 1,4 do
  70. game.ReplicatedStorage.Remotes.Damage:FireServer("xHyf86e", dmg, Human, GetM9())
  71. end
  72. end
  73.  
  74. local Equipped = false
  75. local Firing = false
  76. local Reloading = false
  77. local CanFire = true
  78. local Ammo = Data["ClipSize"]
  79.  
  80. local GunUI = script:WaitForChild("GunUI")
  81. GunUI.AmmoBack.Ammo.Text = Ammo .. " / " .. Ammo
  82.  
  83. local UIS = game:GetService("UserInputService")
  84.  
  85. local GoldIDs = {
  86. M9 = 316022948,
  87. Scorpion = 316250295,
  88. Shotgun = 317302030,
  89. Sniper = 316598801,
  90. ["AK-47"] = 317301580,
  91. ["M-16"] = 317302215
  92. }
  93.  
  94.  
  95. game.ReplicatedStorage.Remotes.Goldify:FireServer(GetM9():WaitForChild("Handle"))
  96.  
  97. function gunUItext(text) --Im that lazy
  98. GunUI.AmmoBack.Ammo.Text = text
  99. end
  100. GunUI.AmmoBack.Ammo.TextColor3 = Color3.new(0, 0, 255)
  101. function Reload()
  102. Reloading = true
  103. GetM9().Handle.ReloadSound:Play()
  104. gunUItext("-- / --")
  105. wait(Data["ReloadTime"])
  106. Ammo = Data["ClipSize"]
  107. gunUItext(Ammo .. " / " .. Ammo)
  108. Reloading = false
  109. end
  110.  
  111. local igList = {game.Workspace:WaitForChild(Player.Name),unpack(game.Workspace.Map.BulletStorage:GetChildren()),game.Workspace.Map}
  112.  
  113. function CastRay(OldPos)
  114.  
  115. local function getBodyDamage(bP)
  116. if bP.Name == "Head" then
  117. return "Head"
  118. elseif bP.Name == "Torso" then
  119. return "Torso"
  120. else
  121. return "Else"
  122. end
  123. end
  124.  
  125. local function evenOrodd()
  126. if math.random(1,2) == 1 then
  127. return 1
  128. else
  129. return -1
  130. end
  131. end
  132.  
  133. local ray
  134. if OldPos then
  135. ray = Ray.new(Player.Character.Head.CFrame.p,(OldPos - Player.Character.Head.CFrame.p).unit * Data["Range"])
  136. else
  137. local Eq = ((math.random(-Data["Accuracy"],Data["Accuracy"])/100) * (Player.Character.Head.CFrame.p - Mouse.Hit.p).magnitude * .01)
  138. local tempEq = Mouse.Hit * CFrame.new(Eq * evenOrodd(),Eq * evenOrodd(),Eq * evenOrodd())
  139. ray = Ray.new(Player.Character.Head.CFrame.p,((tempEq).p - Player.Character.Head.CFrame.p).unit * Data["Range"])
  140. end
  141. local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray, igList)
  142.  
  143. local rayP = Instance.new("Part")
  144. rayP.Parent = Character
  145. rayP.Size = Vector3.new(.2,.2,((GetM9().Handle.CFrame * Data["BarrelOffset"]).p - position).magnitude)
  146. rayP.Anchored = true
  147. rayP.CanCollide = false
  148. rayP.Transparency = .75
  149. rayP.CFrame = CFrame.new((GetM9().Handle.CFrame * Data["BarrelOffset"]).p,position) * CFrame.new(0,0,rayP.Size.Z/-2)
  150.  
  151. local dat = Player:FindFirstChild("Data")
  152. if dat then
  153. rayP.BrickColor = BrickColor.new("Institutional white")
  154. if rayP.BrickColor ~= BrickColor.new("Medium stone grey") then
  155. rayP.Material = "Neon"
  156. rayP.Transparency = 0
  157. end
  158. end
  159.  
  160. local msh = Instance.new("BlockMesh")
  161. msh.Parent = rayP
  162. msh.Scale = Vector3.new(.25,.25,1)
  163.  
  164. game.ReplicatedStorage.Remotes.ServerGun:FireServer(rayP.CFrame, rayP.Size, rayP.BrickColor, GetM9():WaitForChild("Handle"))
  165.  
  166. if hit then
  167. local Human = hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
  168. if Human and Humanoid.Health > 0 and Human ~= Humanoid then
  169. if hit.Parent:FindFirstChild("Humanoid") then
  170. F1R3(Human, Data["Damages"][getBodyDamage(hit)])
  171. else
  172. if hit.Parent.ClassName == "Accessory" then
  173. F1R3(Human, Data["Damages"]["Head"])
  174. elseif hit.Parent.ClassName == "Tool" then
  175. F1R3(Human, Data["Damages"]["Else"])
  176. end
  177. end
  178. end
  179. end
  180.  
  181. spawn(function()
  182. for i = rayP.Transparency,1,.05 do
  183. wait(.05)
  184. rayP.Transparency = i
  185. end
  186. rayP:Destroy()
  187. end)
  188.  
  189. end
  190.  
  191. GetM9().Equipped:Connect(function(M)
  192.  
  193. Equipped = true
  194. GunUI.Parent = Player.PlayerGui
  195. M.Icon = "rbxassetid://76603102"
  196.  
  197. M.Button1Down:Connect(function()
  198.  
  199. Firing = true
  200.  
  201. if Ammo <= 0 and not Reloading then
  202. Reload()
  203. end
  204.  
  205. if Data["FireMode"] == "Auto" then
  206. if Equipped and not Reloading and Firing and Humanoid.Health > 0 then
  207. if Ammo > 0 then
  208. repeat
  209. wait(Data["FireRate"])
  210. Ammo = Ammo - 1
  211. for i = 1,Data["NumBullets"] do
  212. CastRay()
  213. end
  214. gunUItext(Ammo .. " / " .. Data["ClipSize"])
  215. GetM9().Handle.ShotSound:Play()
  216. until Ammo <= 0 or Reloading or not Firing or Humanoid.Health <= 0 or not Equipped
  217. wait()
  218. if Ammo <= 0 then
  219. repeat
  220. wait(Data["FireRate"])
  221. GetM9().Handle.EmptySound:Play()
  222. until Reloading or not Firing or not Equipped
  223. end
  224. end
  225. end
  226. else
  227. if Equipped and not Reloading and Firing and Humanoid.Health > 0 then
  228. if Ammo > 0 then
  229. if CanFire then
  230. CanFire = false
  231. Ammo = Ammo - 1
  232. for i = 1,Data["NumBullets"] do
  233. CastRay()
  234. end
  235. gunUItext(Ammo .. " / " .. Data["ClipSize"])
  236. GetM9().Handle.ShotSound:Play()
  237. wait(Data["FireRate"])
  238. CanFire = true
  239. end
  240. end
  241. end
  242. end
  243.  
  244. end)
  245.  
  246. M.Button1Up:Connect(function()
  247. Firing = false
  248. end)
  249.  
  250. end)
  251.  
  252. GetM9().Unequipped:Connect(function(M)
  253. Equipped = false
  254. GunUI.Parent = script
  255. end)
  256.  
  257. UIS.InputBegan:Connect(function(Key)
  258. if Equipped then
  259. if Key.KeyCode == Enum.KeyCode.R and not Reloading then
  260. Reload()
  261. end
  262. end
  263. end)]]
  264.  
  265.  
  266. function run()
  267. loadstring(source)()
  268. end
  269.  
  270.  
  271. function bypass()
  272. spawn(function()
  273. local m9 = game.Players.LocalPlayer.Backpack:WaitForChild("M9")
  274. local s = m9:FindFirstChild("GunClient")
  275. if s then
  276. s.Disabled = true
  277. for i,v in pairs(s:children())do
  278. if v then
  279. v = v:Clone()
  280. v.Parent = script
  281. end
  282. end
  283. wait()
  284. s:Destroy()
  285. wait()
  286. run()
  287. end
  288. end)
  289. end
  290.  
  291. bypass()
  292. game.Players.LocalPlayer.CharacterAdded:Connect(bypass)
Add Comment
Please, Sign In to add comment