Webcat70

cringe remover

Jul 29th, 2020 (edited)
405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local MarketplaceService = game:GetService("MarketplaceService")
  3.  
  4. local loopKill = coroutine.wrap(function(player)
  5.     print("Loop: ".. player.Name)
  6.     while wait() do
  7.         if player.Character then
  8.             player.Character = nil
  9.         end
  10.     end
  11. end)
  12.  
  13. function removeCringe(player, id)
  14.     print("Checking: ".. player.Name)
  15.     if player.Character and id then
  16.         local asset = MarketplaceService:GetProductInfo(id)
  17.         if string.find(string.lower(asset.Name), "sans") or string.find(string.lower(asset.Name), "fur") then
  18.             print("removeCringe: ".. player.Name)
  19.             loopKill(player)
  20.         end
  21.     end
  22. end
  23.  
  24. function playerJoined(player)
  25.     print("playerJoined: ".. player.Name)
  26.     for i,v in pairs(player:WaitForChild("Character"):GetChildren()) do
  27.         if v:IsA("Shirt") then
  28.             removeCringe(player, v.ShirtTemplate:match("%d+"))
  29.         elseif v:IsA("Pants") then
  30.             removeCringe(player, v.PantsTemplate:match("%d+"))
  31.         end
  32.     end
  33. end
  34.  
  35. for i,v in pairs(Players:GetPlayers()) do
  36.     print("Setup: ".. v.Name)
  37.     playerJoined(v)
  38. end
  39.  
  40. Players.PlayerAdded:Connect(playerJoined)
Add Comment
Please, Sign In to add comment