Advertisement
4zx16

Badge Door (probably quitting badge service after this)

Dec 30th, 2021 (edited)
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. --[[
  2.  || 📜 AUTHOR: @4zx16 || BADGE DOOR
  3. ]]
  4. local BadgeService = game:GetService("BadgeService")
  5. local id = 0
  6.  
  7. local function onTouched(hit)
  8.     local player = game.Players:GetPlayerFromCharacter(hit.Parent)
  9.    
  10.     if player ~= nil then
  11.         if BadgeService:UserHasBadgeAsync(player.UserId, id) then
  12.             script.Parent.Transparency = 0.8
  13.             script.Parent.CanCollide = false
  14.             wait(1)
  15.             script.Parent.Transparency = 0.5
  16.             script.Parent.CanCollide = true
  17.         else
  18.             player.Character:BreakJoints()
  19.         end
  20.     end
  21. end
  22. script.Parent.Touched:Connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement