Advertisement
kentho9

Untitled

Aug 22nd, 2022
7,086
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. local RemoveOldHats = false -- remove old accessories?
  2. local whitelist = {"hat to keep","some other accessory to keep"} -- exact name of hats to keep
  3. local lp = game:GetService("Players").LocalPlayer
  4. local ch = lp.Character
  5. local hrp = ch:WaitForChild("HumanoidRootPart")
  6. if RemoveOldHats then
  7. for i,v in pairs(ch:GetChildren()) do
  8. if v:IsA("Accessory") and not table.find(whitelist, v.Name) then
  9. v:Destroy()
  10. end
  11. end
  12. end
  13. for i,v in pairs(workspace:GetChildren()) do
  14. if v:IsA("BasePart") and v:FindFirstChild("TouchInterest") and not v:FindFirstChild("shading") then
  15. firetouchinterest(hrp,v,0)
  16. firetouchinterest(hrp,v,1)
  17. end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement