Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local BadgeService = game:GetService("BadgeService")
- local BadgeId = --// Badge Asset Id
- local Players = game:GetService("Players")
- local Part = script.Parent
- Part.Touched:Connect(function(Hit)
- local Humanoid = Hit.Parent:FindFirstChildOfClass("Humanoid")
- if (Humanoid) then
- local Player = Players:GetPlayerFromCharacter(Hit.Parent)
- if (Player) then
- if (BadgeService:UserHasBadge(Player.UserId, BadgeId) then
- print(Player.Name.." Has Badge")
- else
- Humanoid:TakeDamage(Humanoid.Health)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement