MenacingAlberts

Mlg glasses?

Aug 5th, 2017
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.18 KB | None | 0 0
  1.  
  2. --Converted with PenguinAnonymous's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Part0 = Instance.new("Part")
  20. SpecialMesh1 = Instance.new("SpecialMesh")
  21. Script2 = Instance.new("Script")
  22. Part0.Name = "Deal With It"
  23. Part0.Parent = mas
  24. Part0.Position = Vector3.new(-26.2999992, 0.30000028, -41.7000008)
  25. Part0.Rotation = Vector3.new(0, -90, 0)
  26. Part0.Anchored = true
  27. Part0.FormFactor = Enum.FormFactor.Custom
  28. Part0.Size = Vector3.new(1.4000001, 0.599999845, 1.4000001)
  29. Part0.CFrame = CFrame.new(-26.2999992, 0.30000028, -41.7000008, -1.49011612e-07, -4.17956898e-07, -1, -7.933712e-08, 1, -4.17956841e-07, 0.99999994, 7.93370702e-08, -5.96046448e-08)
  30. Part0.BottomSurface = Enum.SurfaceType.Smooth
  31. Part0.TopSurface = Enum.SurfaceType.Smooth
  32. Part0.Position = Vector3.new(-26.2999992, 0.30000028, -41.7000008)
  33. Part0.Orientation = Vector3.new(0, -90, 0)
  34. SpecialMesh1.Parent = Part0
  35. SpecialMesh1.MeshId = "http://www.roblox.com/asset/?id=121910245 "
  36. SpecialMesh1.Scale = Vector3.new(0.699999988, 0.699999988, 0.699999988)
  37. SpecialMesh1.TextureId = "http://www.roblox.com/asset/?id=182196075"
  38. SpecialMesh1.MeshType = Enum.MeshType.FileMesh
  39. SpecialMesh1.Scale = Vector3.new(0.699999988, 0.699999988, 0.699999988)
  40. Script2.Name = "HatHelperGuideGiverScript"
  41. Script2.Parent = Part0
  42. table.insert(cors,sandbox(Script2,function()
  43. -- Guide to how to make a hat giver.
  44.  
  45. -- To adjust where your hat will be postioned on your head, go to the script line that says "h.AttachmentPos = Vector3.new(0,0,0)
  46. -- The first number in the (0,0,0) will make your hat go to the left, or to the right, making the number positive will make your hat be
  47. -- placed to the left, making it negative( ex. "-1") will make it be placed to the right. If your hat is pretty semetrical, you wont have to
  48. -- adjust the first number, it stays usually in the middle, a zero.
  49.  
  50. -- The middle number adjusts how high/low the hat will be placed on the head. The higher the number is, the lower the hat will be
  51. -- placed. If you are at zero, and you want the hat to go lower, make the number a negative. Negative numbers will make the hat
  52. -- be place higher on your robloxian head.
  53.  
  54. -- The third number determines how far ahead/back your hat will be placed. Making the number positive will place the hat ahead of
  55. -- you, while making the number negative will place the hat behind you some.
  56.  
  57. -- NOTE, on the first, and last numbers, the ones that make your hat go left/right/ahead/back shouldn't be changed by whole numbers
  58. -- to make your hat giver perfect, if you have to use those two numbers, move it slowly by ".1's"
  59. -- This can also go for the middle number. If your hat is slightly higher than its supposed to be, than edit the number slightly.
  60. -- Do not change the numbers by whole numbers, or else it will go really far off. Change the numbers by ".1's" and ".2's"
  61.  
  62.  
  63.  
  64. -- If you want to after how many seconds can you get another hat on your head, change the line that says "wait(5)"
  65. -- Changing this will change after how many seconds can someone touch the giver, and get a hat. It's best to leave it as it is,
  66. -- Changing it really doesnt matter.
  67.  
  68. -- In build mode, after every time you change this script, copy the script, delete it, and paste it back into your hat, if you don't,
  69. -- nothing will change, I don't know why, but this is how I make my givers.
  70.  
  71. -- If you want to change the hat that you are trying on, change the "Mesh" Just delete the one in the brick that this script is in,
  72. -- and copy a mesh from a different hat, that you want to try on with this script.
  73.  
  74. -- Do not rename the name of the "Mesh", leave it saying Mesh, or the giver wont work.
  75.  
  76.  
  77. -- Ask any questions here: http://www.roblox.com/Forum/ShowPost.aspx?PostID=13178947
  78.  
  79.  
  80. -- If you want to know how to retexture a hat, read this: http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89. debounce = true
  90.  
  91. function onTouched(hit)
  92. if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
  93. debounce = false
  94. h = Instance.new("Hat")
  95. p = Instance.new("Part")
  96. h.Name = "Hat" -- It doesn't make a difference, but if you want to make your place in Explorer neater, change this to the name of your hat.
  97. p.Parent = h
  98. p.Position = hit.Parent:findFirstChild("Head").Position
  99. p.Name = "Handle"
  100. p.formFactor = 0
  101. p.Size = Vector3.new(-0,-0,-1)
  102. p.BottomSurface = 0
  103. p.TopSurface = 0
  104. p.Locked = true
  105. script.Parent.Mesh:clone().Parent = p
  106. h.Parent = hit.Parent
  107. h.AttachmentPos = Vector3.new(0, 0.4, 0.08) -- Change these to change the positiones of your hat, as I said earlier.
  108. wait(5) debounce = true
  109. end
  110. end
  111.  
  112. script.Parent.Touched:connect(onTouched)
  113.  
  114. -- Script Guide by HatHelper
  115. end))
  116. for i,v in pairs(mas:GetChildren()) do
  117. v.Parent = game:GetService("Players").LocalPlayer.Character
  118. pcall(function() v:MakeJoints() end)
  119. end
  120. mas:Destroy()
  121. for i,v in pairs(cors) do
  122. spawn(function()
  123. pcall(v)
  124. end)
  125. end
Advertisement
Add Comment
Please, Sign In to add comment