Advertisement
koreanhackerman

Hat ID Script

Dec 4th, 2019
10,961
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.10 KB | None | 0 0
  1. --1. Open up ROBLOX Studio and edit a place.
  2. --2. Insert a script into Workspace and paste the code from above into it (change the hat id to suit your needs)
  3. --3. Copy the output from the script
  4. --4. Run the script in a LocalScript (or from your level 7 exploit)
  5. --5. Profit?
  6. --if you want to give a hat to someone else, simply change the last line from
  7. --Accessory.Parent = game.Players.LocalPlayer.Character
  8. --to
  9. --Accessory.Parent = game.Players['OtherPlayer'].Character
  10. -- enjoy
  11.  
  12. local Properties = {
  13. Accessory = {'Name','AttachmentForward','AttachmentPos','AttachmentRight','AttachmentUp'},
  14. Handle = {'Name','Size', 'Transparency', 'Parent'},
  15. Attachment = {'Name', 'Position', 'Rotation', 'Axis', 'SecondaryAxis', 'Parent'},
  16. Mesh = {'MeshId','Scale','TextureId','Parent'}
  17. }
  18. function LoadAsset(AssetId)
  19. local printMe = "" -- DONT TOUCH
  20. local Hat = game:GetService("InsertService"):LoadAsset(AssetId):GetChildren()[1]
  21. local Handle = Hat:FindFirstChild('Handle')
  22. local Mesh = Handle:FindFirstChild('Mesh')
  23. local Attachment = nil
  24. for i, Object in pairs(Handle:GetChildren()) do if Object:IsA('Attachment') then Attachment = Object break end end
  25. local Temp = {{'Accessory',Hat},{'Handle',Handle},{'Mesh',Mesh},{'Attachment',Attachment}}
  26. for i, Array in pairs(Temp) do
  27. local Properties_ = Properties[Array[1]]
  28. for ii, Property in pairs(Properties_) do
  29. if ii == 1 then printMe = printMe..Array[1]..' = Instance.new("'..Array[2].ClassName..'")\n' end
  30. local TypeOfValue = typeof(Array[2][Property])
  31. if TypeOfValue == 'string' then TypeOfValue = {'"', '"'} elseif TypeOfValue == 'Vector3' then TypeOfValue = {'Vector3.new(',')'} else TypeOfValue = {'',''} end
  32. if Property ~= 'Parent' then
  33. printMe = printMe..Array[1]..'.'..Property..' = '..TypeOfValue[1]..tostring(Array[2][Property])..TypeOfValue[2].."\n"
  34. else
  35. local Parent = (Array[1] == 'Handle' and 'Accessory' or 'Handle')
  36. printMe = printMe..Array[1]..'.Parent = '..Parent..'\n'
  37. end
  38. end
  39. end
  40. printMe = printMe..'Accessory.Parent = game.Players.LocalPlayer.Character'
  41. print(printMe)
  42. end
  43. local HatId = 69344141 -- change this to any hat id
  44. LoadAsset(HatId)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement