whiteyume

tesy

Sep 5th, 2022
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. local Gun = "Remington 870"
  2.  
  3. local Player = game.Players.LocalPlayer.Name
  4.  
  5. game.Workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver[Gun].ITEMPICKUP)
  6.  
  7. for i,v in pairs(game.Players[Player].Backpack:GetChildren()) do
  8. if v.name == (Gun) then
  9. v.Parent = game.Players.LocalPlayer.Character
  10. end
  11. end
  12.  
  13. Gun = game.Players[Player].Character[Gun]
  14.  
  15. game.Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid"):UnequipTools()
  16.  
  17. function FireGun(target)
  18. coroutine.resume(coroutine.create(function()
  19. local bulletTable = {}
  20. table.insert(bulletTable, {
  21. Hit = target,
  22. Distance = 100,
  23. Cframe = CFrame.new(0,1,1),
  24. RayObject = Ray.new(Vector3.new(0.1,0.2), Vector3.new(0.3,0.4))
  25. })
  26. game.ReplicatedStorage.ShootEvent:FireServer(bulletTable, Gun)
  27. wait()
  28. end))
  29. end
  30.  
  31. while game:GetService("RunService").Stepped:wait() do
  32. for count = 0, 10, 10 do
  33. FireGun()
  34. end
  35. end
Add Comment
Please, Sign In to add comment