Advertisement
Hasli4

RBLX. GunDamage

May 14th, 2025
505
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local bullet = script.Parent
  2.  
  3. local function player_check(otherPart)
  4. local humanoid = otherPart.Parent:FindFirstChild('Humanoid')
  5. if humanoid then
  6. humanoid:TakeDamage(10)
  7. local player = game.Players:FindFirstChild(humanoid.Parent.Name)
  8. if player and humanoid.parent.name ~= bullet.Attacker.Value then
  9. local tag = player:FindFirstChild('Killer')
  10. if tag then
  11. tag.Value = bullet.Attacker.Value
  12. end
  13. end
  14. bullet:Destroy()
  15. end
  16. end
  17.  
  18. bullet.Touched:Connect(player_check)
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement