Advertisement
iiWolfie

boombox

Jul 4th, 2016
905
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.06 KB | None | 0 0
  1. <roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
  2. <External>null</External>
  3. <External>nil</External>
  4. <Item class="Script" referent="RBX5BDA6C70E8B745AFA79F02F3C9DD3156">
  5. <Properties>
  6. <bool name="Disabled">false</bool>
  7. <Content name="LinkedSource"><null></null></Content>
  8. <string name="Name">HatHelperGuideGiverScript</string>
  9. <ProtectedString name="Source"><![CDATA[-- Guide to how to make a hat giver.
  10.  
  11. -- 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)
  12. -- 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
  13. -- 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
  14. -- adjust the first number, it stays usually in the middle, a zero.
  15.  
  16. -- 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
  17. -- 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
  18. -- be place higher on your robloxian head.
  19.  
  20. -- The third number determines how far ahead/back your hat will be placed. Making the number positive will place the hat ahead of
  21. -- you, while making the number negative will place the hat behind you some.
  22.  
  23. -- 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
  24. -- to make your hat giver perfect, if you have to use those two numbers, move it slowly by ".1's"
  25. -- This can also go for the middle number. If your hat is slightly higher than its supposed to be, than edit the number slightly.
  26. -- 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"
  27.  
  28.  
  29.  
  30. -- If you want to after how many seconds can you get another hat on your head, change the line that says "wait(5)"
  31. -- 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,
  32. -- Changing it really doesnt matter.
  33.  
  34. -- 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,
  35. -- nothing will change, I don't know why, but this is how I make my givers.
  36.  
  37. -- 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,
  38. -- and copy a mesh from a different hat, that you want to try on with this script.
  39.  
  40. -- Do not rename the name of the "Mesh", leave it saying Mesh, or the giver wont work.
  41.  
  42.  
  43. -- Ask any questions here: http://www.roblox.com/Forum/ShowPost.aspx?PostID=13178947
  44.  
  45.  
  46. -- If you want to know how to retexture a hat, read this: http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. debounce = true
  56.  
  57. function onTouched(hit)
  58. if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
  59. debounce = false
  60. h = Instance.new("Hat")
  61. p = Instance.new("Part")
  62. s = Instance.new("Sound")
  63. h.Name = "BoomBox"
  64.  
  65. s.Looped = true
  66. s.Volume = 1 -- 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.
  67. p.Parent = h
  68. p.Position = hit.Parent:findFirstChild("Head").Position
  69. p.Name = "Handle"
  70. p.formFactor = 0
  71. p.Size = Vector3.new(-0,-0,-1)
  72. p.BottomSurface = 0
  73. p.TopSurface = 0
  74. p.Locked = true
  75. script.Parent.Mesh:clone().Parent = p
  76. h.Parent = hit.Parent
  77. s.Parent = hit.Parent.Torso
  78. h.AttachmentPos = Vector3.new(0,1.75,-0.7) -- Change these to change the positiones of your hat, as I said earlier.
  79. wait(5) debounce = true
  80. end
  81. end
  82.  
  83. script.Parent.Touched:connect(onTouched)
  84.  
  85. -- Script Guide by HatHelper]]></ProtectedString>
  86. </Properties>
  87. </Item>
  88. <Item class="SpecialMesh" referent="RBX00187890571B49EC906B43E3E4E81F81">
  89. <Properties>
  90. <token name="LODX">2</token>
  91. <token name="LODY">2</token>
  92. <Content name="MeshId"><url>http://www.roblox.com/asset/?id=151760030</url></Content>
  93. <token name="MeshType">5</token>
  94. <string name="Name">Mesh</string>
  95. <Vector3 name="Offset">
  96. <X>0</X>
  97. <Y>0</Y>
  98. <Z>0</Z>
  99. </Vector3>
  100. <Vector3 name="Scale">
  101. <X>-1</X>
  102. <Y>1</Y>
  103. <Z>-1</Z>
  104. </Vector3>
  105. <Content name="TextureId"><url>http://www.roblox.com/asset/?id=151760072</url></Content>
  106. <Vector3 name="VertexColor">
  107. <X>1</X>
  108. <Y>1</Y>
  109. <Z>1</Z>
  110. </Vector3>
  111. </Properties>
  112. </Item>
  113. <Item class="ScreenGui" referent="RBXA9A4895C3DDE42C99176F06A9712B3A1">
  114. <Properties>
  115. <string name="Name">SoundGui</string>
  116. </Properties>
  117. <Item class="Script" referent="RBX1F9BF8D52A5B433E9B91AC40771153F7">
  118. <Properties>
  119. <bool name="Disabled">false</bool>
  120. <Content name="LinkedSource"><null></null></Content>
  121. <string name="Name">GUI Giver</string>
  122. <ProtectedString name="Source"><![CDATA[local debounce = false
  123.  
  124. function getPlayer(humanoid)
  125. local players = game.Players:children()
  126. for i = 1, #players do
  127. if players[i].Character.Humanoid == humanoid then return players[i] end
  128. end
  129. return nil
  130. end
  131.  
  132. function onTouch(part)
  133.  
  134. local human = part.Parent:findFirstChild("Humanoid")
  135. if (human ~= nil) and debounce == false then
  136.  
  137. debounce = true
  138.  
  139. local player = getPlayer(human)
  140.  
  141. if (player == nil) then return end
  142.  
  143. script.Parent:clone().Parent = player.PlayerGui
  144. wait(1)
  145. debounce = false
  146. player.PlayerGui.OnTouchGui:remove()
  147. wait(5)
  148. debounce = false
  149. wait(5)
  150. end
  151. end
  152.  
  153.  
  154. script.Parent.Parent.Touched:connect(onTouch)
  155. ]]></ProtectedString>
  156. </Properties>
  157. </Item>
  158. <Item class="Frame" referent="RBX77AF12E234924ACA81FA07D7533A3EEB">
  159. <Properties>
  160. <bool name="Active">false</bool>
  161. <Color3 name="BackgroundColor3">4288914085</Color3>
  162. <float name="BackgroundTransparency">0</float>
  163. <Color3 name="BorderColor3">4279970357</Color3>
  164. <int name="BorderSizePixel">1</int>
  165. <bool name="ClipsDescendants">false</bool>
  166. <bool name="Draggable">false</bool>
  167. <string name="Name">Frame</string>
  168. <Ref name="NextSelectionDown">null</Ref>
  169. <Ref name="NextSelectionLeft">null</Ref>
  170. <Ref name="NextSelectionRight">null</Ref>
  171. <Ref name="NextSelectionUp">null</Ref>
  172. <UDim2 name="Position">
  173. <XS>0</XS>
  174. <XO>0</XO>
  175. <YS>0.5</YS>
  176. <YO>-25</YO>
  177. </UDim2>
  178. <float name="Rotation">0</float>
  179. <bool name="Selectable">false</bool>
  180. <Ref name="SelectionImageObject">null</Ref>
  181. <UDim2 name="Size">
  182. <XS>0</XS>
  183. <XO>200</XO>
  184. <YS>0</YS>
  185. <YO>100</YO>
  186. </UDim2>
  187. <token name="SizeConstraint">0</token>
  188. <token name="Style">3</token>
  189. <bool name="Visible">true</bool>
  190. <int name="ZIndex">1</int>
  191. </Properties>
  192. <Item class="TextButton" referent="RBX56A0C3A9A3004D0A851AB15F19176F6C">
  193. <Properties>
  194. <bool name="Active">true</bool>
  195. <bool name="AutoButtonColor">true</bool>
  196. <Color3 name="BackgroundColor3">4278255360</Color3>
  197. <float name="BackgroundTransparency">0</float>
  198. <Color3 name="BorderColor3">4294967295</Color3>
  199. <int name="BorderSizePixel">2</int>
  200. <bool name="ClipsDescendants">false</bool>
  201. <bool name="Draggable">false</bool>
  202. <token name="Font">4</token>
  203. <token name="FontSize">7</token>
  204. <bool name="Modal">false</bool>
  205. <string name="Name">TextButton</string>
  206. <Ref name="NextSelectionDown">null</Ref>
  207. <Ref name="NextSelectionLeft">null</Ref>
  208. <Ref name="NextSelectionRight">null</Ref>
  209. <Ref name="NextSelectionUp">null</Ref>
  210. <UDim2 name="Position">
  211. <XS>0</XS>
  212. <XO>0</XO>
  213. <YS>0</YS>
  214. <YO>46</YO>
  215. </UDim2>
  216. <float name="Rotation">0</float>
  217. <bool name="Selectable">true</bool>
  218. <bool name="Selected">false</bool>
  219. <Ref name="SelectionImageObject">null</Ref>
  220. <UDim2 name="Size">
  221. <XS>0.25</XS>
  222. <XO>0</XO>
  223. <YS>0</YS>
  224. <YO>35</YO>
  225. </UDim2>
  226. <token name="SizeConstraint">0</token>
  227. <token name="Style">0</token>
  228. <string name="Text">Play</string>
  229. <Color3 name="TextColor3">4294967295</Color3>
  230. <bool name="TextScaled">false</bool>
  231. <Color3 name="TextStrokeColor3">4278190080</Color3>
  232. <float name="TextStrokeTransparency">0.200000003</float>
  233. <float name="TextTransparency">0</float>
  234. <bool name="TextWrapped">false</bool>
  235. <token name="TextXAlignment">2</token>
  236. <token name="TextYAlignment">1</token>
  237. <bool name="Visible">true</bool>
  238. <int name="ZIndex">1</int>
  239. </Properties>
  240. </Item>
  241. <Item class="LocalScript" referent="RBX2D369AD63DAC432B81219E1E0843DD29">
  242. <Properties>
  243. <bool name="Disabled">false</bool>
  244. <Content name="LinkedSource"><null></null></Content>
  245. <string name="Name">LocalScript</string>
  246. <ProtectedString name="Source"><![CDATA[local ContentProvider = game:GetService("ContentProvider")
  247.  
  248. local totalWait = 20
  249.  
  250. local queueSize = ContentProvider.RequestQueueSize
  251.  
  252. function UpdateQueueSize()
  253. queueSize = ContentProvider.RequestQueueSize
  254. end
  255.  
  256. function WaitForSoundToLoad()
  257. local start = tick()
  258. while (ContentProvider.RequestQueueSize > queueSize) and ((tick() - start) < totalWait ) do
  259. wait(0.1)
  260. end
  261. if (start - tick() > 1) then print("Took " .. tostring(start - tick()) " seconds to load") end
  262. end
  263. local x = game.Workspace:FindFirstChild(""..script.Parent.Parent.Parent.Parent.Name)
  264. if not (x) then
  265. return
  266. else
  267.  
  268.  
  269. function PlaySound(id)
  270. if id == nil then print("Invalid sound") return end
  271. local sound = x.Torso.Sound
  272. sound.SoundId = "http://www.roblox.com/asset?id=" .. tostring(id)
  273. UpdateQueueSize()
  274. WaitForSoundToLoad()
  275. sound:Play()
  276. end
  277.  
  278. local TextBox = script.Parent:WaitForChild("TextBox")
  279. local TextButton = script.Parent:WaitForChild("TextButton")
  280. local Stop = script.Parent:WaitForChild("Stop")
  281.  
  282. TextBox.FocusLost:connect(function(enterPressed)
  283. Game:GetService("ContentProvider"):Preload(TextBox.Text)
  284. end)
  285.  
  286. TextButton.MouseButton1Click:connect(function()
  287. PlaySound(tonumber(TextBox.Text))
  288. end)
  289. Stop.MouseButton1Click:connect(function()
  290. local sound = x.Torso.Sound
  291. sound:Stop()
  292. end)
  293. end
  294.  
  295.  
  296.  
  297. ]]></ProtectedString>
  298. </Properties>
  299. </Item>
  300. <Item class="TextBox" referent="RBX5F796A9430144ADE96F736D152F5CF6A">
  301. <Properties>
  302. <bool name="Active">true</bool>
  303. <Color3 name="BackgroundColor3">4294967295</Color3>
  304. <float name="BackgroundTransparency">0</float>
  305. <Color3 name="BorderColor3">4291282887</Color3>
  306. <int name="BorderSizePixel">2</int>
  307. <bool name="ClearTextOnFocus">true</bool>
  308. <bool name="ClipsDescendants">false</bool>
  309. <bool name="Draggable">false</bool>
  310. <token name="Font">4</token>
  311. <token name="FontSize">5</token>
  312. <bool name="MultiLine">false</bool>
  313. <string name="Name">TextBox</string>
  314. <Ref name="NextSelectionDown">null</Ref>
  315. <Ref name="NextSelectionLeft">null</Ref>
  316. <Ref name="NextSelectionRight">null</Ref>
  317. <Ref name="NextSelectionUp">null</Ref>
  318. <UDim2 name="Position">
  319. <XS>0</XS>
  320. <XO>0</XO>
  321. <YS>0</YS>
  322. <YO>0</YO>
  323. </UDim2>
  324. <float name="Rotation">0</float>
  325. <bool name="Selectable">true</bool>
  326. <Ref name="SelectionImageObject">null</Ref>
  327. <UDim2 name="Size">
  328. <XS>1</XS>
  329. <XO>0</XO>
  330. <YS>0</YS>
  331. <YO>40</YO>
  332. </UDim2>
  333. <token name="SizeConstraint">0</token>
  334. <string name="Text">paste ID here</string>
  335. <Color3 name="TextColor3">4279970357</Color3>
  336. <bool name="TextScaled">false</bool>
  337. <Color3 name="TextStrokeColor3">4278190080</Color3>
  338. <float name="TextStrokeTransparency">1</float>
  339. <float name="TextTransparency">0</float>
  340. <bool name="TextWrapped">false</bool>
  341. <token name="TextXAlignment">2</token>
  342. <token name="TextYAlignment">1</token>
  343. <bool name="Visible">true</bool>
  344. <int name="ZIndex">1</int>
  345. </Properties>
  346. </Item>
  347. <Item class="TextButton" referent="RBXA04FA22920E6422A97BC1EC0F6F33489">
  348. <Properties>
  349. <bool name="Active">true</bool>
  350. <bool name="AutoButtonColor">true</bool>
  351. <Color3 name="BackgroundColor3">4294901760</Color3>
  352. <float name="BackgroundTransparency">0</float>
  353. <Color3 name="BorderColor3">4294967295</Color3>
  354. <int name="BorderSizePixel">2</int>
  355. <bool name="ClipsDescendants">false</bool>
  356. <bool name="Draggable">false</bool>
  357. <token name="Font">4</token>
  358. <token name="FontSize">7</token>
  359. <bool name="Modal">false</bool>
  360. <string name="Name">Stop</string>
  361. <Ref name="NextSelectionDown">null</Ref>
  362. <Ref name="NextSelectionLeft">null</Ref>
  363. <Ref name="NextSelectionRight">null</Ref>
  364. <Ref name="NextSelectionUp">null</Ref>
  365. <UDim2 name="Position">
  366. <XS>0</XS>
  367. <XO>138</XO>
  368. <YS>0</YS>
  369. <YO>46</YO>
  370. </UDim2>
  371. <float name="Rotation">0</float>
  372. <bool name="Selectable">true</bool>
  373. <bool name="Selected">false</bool>
  374. <Ref name="SelectionImageObject">null</Ref>
  375. <UDim2 name="Size">
  376. <XS>0.25</XS>
  377. <XO>0</XO>
  378. <YS>0</YS>
  379. <YO>35</YO>
  380. </UDim2>
  381. <token name="SizeConstraint">0</token>
  382. <token name="Style">0</token>
  383. <string name="Text">Stop</string>
  384. <Color3 name="TextColor3">4294967295</Color3>
  385. <bool name="TextScaled">false</bool>
  386. <Color3 name="TextStrokeColor3">4278190080</Color3>
  387. <float name="TextStrokeTransparency">0.200000003</float>
  388. <float name="TextTransparency">0</float>
  389. <bool name="TextWrapped">false</bool>
  390. <token name="TextXAlignment">2</token>
  391. <token name="TextYAlignment">1</token>
  392. <bool name="Visible">true</bool>
  393. <int name="ZIndex">1</int>
  394. </Properties>
  395. </Item>
  396. <Item class="Script" referent="RBX4DB8ABBD9D9044019B0623B372EB9BFC">
  397. <Properties>
  398. <bool name="Disabled">true</bool>
  399. <Content name="LinkedSource"><null></null></Content>
  400. <string name="Name">Script</string>
  401. <ProtectedString name="Source"><![CDATA[local x = game.Workspace:FindFirstChild(""..script.Parent.Parent.Parent.Parent.Name)
  402. if not (x) then
  403. return
  404. else
  405.  
  406. ]]></ProtectedString>
  407. </Properties>
  408. </Item>
  409. </Item>
  410. </Item>
  411. <Item class="Part" referent="RBX058D72A5AECF450C8F9C78419D30B939">
  412. <Properties>
  413. <bool name="Anchored">true</bool>
  414. <float name="BackParamA">-0.5</float>
  415. <float name="BackParamB">0.5</float>
  416. <token name="BackSurface">0</token>
  417. <token name="BackSurfaceInput">0</token>
  418. <float name="BottomParamA">-0.5</float>
  419. <float name="BottomParamB">0.5</float>
  420. <token name="BottomSurface">0</token>
  421. <token name="BottomSurfaceInput">0</token>
  422. <int name="BrickColor">194</int>
  423. <CoordinateFrame name="CFrame">
  424. <X>-20.5999985</X>
  425. <Y>2.99999905</Y>
  426. <Z>-23.7000008</Z>
  427. <R00>0</R00>
  428. <R01>0</R01>
  429. <R02>-1</R02>
  430. <R10>0</R10>
  431. <R11>1</R11>
  432. <R12>0</R12>
  433. <R20>1</R20>
  434. <R21>0</R21>
  435. <R22>0</R22>
  436. </CoordinateFrame>
  437. <bool name="CanCollide">true</bool>
  438. <PhysicalProperties name="CustomPhysicalProperties">
  439. <CustomPhysics>false</CustomPhysics>
  440. </PhysicalProperties>
  441. <float name="Elasticity">0.5</float>
  442. <float name="Friction">0.300000012</float>
  443. <float name="FrontParamA">-0.5</float>
  444. <float name="FrontParamB">0.5</float>
  445. <token name="FrontSurface">0</token>
  446. <token name="FrontSurfaceInput">0</token>
  447. <float name="LeftParamA">-0.5</float>
  448. <float name="LeftParamB">0.5</float>
  449. <token name="LeftSurface">0</token>
  450. <token name="LeftSurfaceInput">0</token>
  451. <bool name="Locked">false</bool>
  452. <token name="Material">256</token>
  453. <string name="Name">ROBLO-WORLD Boombox real works</string>
  454. <float name="Reflectance">0</float>
  455. <float name="RightParamA">-0.5</float>
  456. <float name="RightParamB">0.5</float>
  457. <token name="RightSurface">0</token>
  458. <token name="RightSurfaceInput">0</token>
  459. <Vector3 name="RotVelocity">
  460. <X>0</X>
  461. <Y>0</Y>
  462. <Z>0</Z>
  463. </Vector3>
  464. <float name="TopParamA">-0.5</float>
  465. <float name="TopParamB">0.5</float>
  466. <token name="TopSurface">0</token>
  467. <token name="TopSurfaceInput">0</token>
  468. <float name="Transparency">0</float>
  469. <Vector3 name="Velocity">
  470. <X>0</X>
  471. <Y>0</Y>
  472. <Z>0</Z>
  473. </Vector3>
  474. <token name="formFactorRaw">3</token>
  475. <token name="shape">1</token>
  476. <Vector3 name="size">
  477. <X>3.00000048</X>
  478. <Y>2.00000095</Y>
  479. <Z>0.600000024</Z>
  480. </Vector3>
  481. </Properties>
  482. <Item class="Script" referent="RBX5BDA6C70E8B745AFA79F02F3C9DD3156">
  483. <Properties>
  484. <bool name="Disabled">false</bool>
  485. <Content name="LinkedSource"><null></null></Content>
  486. <string name="Name">HatHelperGuideGiverScript</string>
  487. <ProtectedString name="Source"><![CDATA[-- Guide to how to make a hat giver.
  488.  
  489. -- 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)
  490. -- 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
  491. -- 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
  492. -- adjust the first number, it stays usually in the middle, a zero.
  493.  
  494. -- 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
  495. -- 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
  496. -- be place higher on your robloxian head.
  497.  
  498. -- The third number determines how far ahead/back your hat will be placed. Making the number positive will place the hat ahead of
  499. -- you, while making the number negative will place the hat behind you some.
  500.  
  501. -- 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
  502. -- to make your hat giver perfect, if you have to use those two numbers, move it slowly by ".1's"
  503. -- This can also go for the middle number. If your hat is slightly higher than its supposed to be, than edit the number slightly.
  504. -- 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"
  505.  
  506.  
  507.  
  508. -- If you want to after how many seconds can you get another hat on your head, change the line that says "wait(5)"
  509. -- 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,
  510. -- Changing it really doesnt matter.
  511.  
  512. -- 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,
  513. -- nothing will change, I don't know why, but this is how I make my givers.
  514.  
  515. -- 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,
  516. -- and copy a mesh from a different hat, that you want to try on with this script.
  517.  
  518. -- Do not rename the name of the "Mesh", leave it saying Mesh, or the giver wont work.
  519.  
  520.  
  521. -- Ask any questions here: http://www.roblox.com/Forum/ShowPost.aspx?PostID=13178947
  522.  
  523.  
  524. -- If you want to know how to retexture a hat, read this: http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533. debounce = true
  534.  
  535. function onTouched(hit)
  536. if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
  537. debounce = false
  538. h = Instance.new("Hat")
  539. p = Instance.new("Part")
  540. s = Instance.new("Sound")
  541. h.Name = "BoomBox"
  542.  
  543. s.Looped = true
  544. s.Volume = 1 -- 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.
  545. p.Parent = h
  546. p.Position = hit.Parent:findFirstChild("Head").Position
  547. p.Name = "Handle"
  548. p.formFactor = 0
  549. p.Size = Vector3.new(-0,-0,-1)
  550. p.BottomSurface = 0
  551. p.TopSurface = 0
  552. p.Locked = true
  553. script.Parent.Mesh:clone().Parent = p
  554. h.Parent = hit.Parent
  555. s.Parent = hit.Parent.Torso
  556. h.AttachmentPos = Vector3.new(0,1.75,-0.7) -- Change these to change the positiones of your hat, as I said earlier.
  557. wait(5) debounce = true
  558. end
  559. end
  560.  
  561. script.Parent.Touched:connect(onTouched)
  562.  
  563. -- Script Guide by HatHelper]]></ProtectedString>
  564. </Properties>
  565. </Item>
  566. <Item class="ScreenGui" referent="RBXA9A4895C3DDE42C99176F06A9712B3A1">
  567. <Properties>
  568. <string name="Name">SoundGui</string>
  569. </Properties>
  570. <Item class="Script" referent="RBX1F9BF8D52A5B433E9B91AC40771153F7">
  571. <Properties>
  572. <bool name="Disabled">false</bool>
  573. <Content name="LinkedSource"><null></null></Content>
  574. <string name="Name">GUI Giver</string>
  575. <ProtectedString name="Source"><![CDATA[local debounce = false
  576.  
  577. function getPlayer(humanoid)
  578. local players = game.Players:children()
  579. for i = 1, #players do
  580. if players[i].Character.Humanoid == humanoid then return players[i] end
  581. end
  582. return nil
  583. end
  584.  
  585. function onTouch(part)
  586.  
  587. local human = part.Parent:findFirstChild("Humanoid")
  588. if (human ~= nil) and debounce == false then
  589.  
  590. debounce = true
  591.  
  592. local player = getPlayer(human)
  593.  
  594. if (player == nil) then return end
  595.  
  596. script.Parent:clone().Parent = player.PlayerGui
  597. wait(1)
  598. debounce = false
  599. player.PlayerGui.OnTouchGui:remove()
  600. wait(5)
  601. debounce = false
  602. wait(5)
  603. end
  604. end
  605.  
  606.  
  607. script.Parent.Parent.Touched:connect(onTouch)
  608. ]]></ProtectedString>
  609. </Properties>
  610. </Item>
  611. <Item class="Frame" referent="RBX77AF12E234924ACA81FA07D7533A3EEB">
  612. <Properties>
  613. <bool name="Active">false</bool>
  614. <Color3 name="BackgroundColor3">4288914085</Color3>
  615. <float name="BackgroundTransparency">0</float>
  616. <Color3 name="BorderColor3">4279970357</Color3>
  617. <int name="BorderSizePixel">1</int>
  618. <bool name="ClipsDescendants">false</bool>
  619. <bool name="Draggable">false</bool>
  620. <string name="Name">Frame</string>
  621. <Ref name="NextSelectionDown">null</Ref>
  622. <Ref name="NextSelectionLeft">null</Ref>
  623. <Ref name="NextSelectionRight">null</Ref>
  624. <Ref name="NextSelectionUp">null</Ref>
  625. <UDim2 name="Position">
  626. <XS>0</XS>
  627. <XO>0</XO>
  628. <YS>0.5</YS>
  629. <YO>-25</YO>
  630. </UDim2>
  631. <float name="Rotation">0</float>
  632. <bool name="Selectable">false</bool>
  633. <Ref name="SelectionImageObject">null</Ref>
  634. <UDim2 name="Size">
  635. <XS>0</XS>
  636. <XO>200</XO>
  637. <YS>0</YS>
  638. <YO>100</YO>
  639. </UDim2>
  640. <token name="SizeConstraint">0</token>
  641. <token name="Style">3</token>
  642. <bool name="Visible">true</bool>
  643. <int name="ZIndex">1</int>
  644. </Properties>
  645. <Item class="TextButton" referent="RBX56A0C3A9A3004D0A851AB15F19176F6C">
  646. <Properties>
  647. <bool name="Active">true</bool>
  648. <bool name="AutoButtonColor">true</bool>
  649. <Color3 name="BackgroundColor3">4278255360</Color3>
  650. <float name="BackgroundTransparency">0</float>
  651. <Color3 name="BorderColor3">4294967295</Color3>
  652. <int name="BorderSizePixel">2</int>
  653. <bool name="ClipsDescendants">false</bool>
  654. <bool name="Draggable">false</bool>
  655. <token name="Font">4</token>
  656. <token name="FontSize">7</token>
  657. <bool name="Modal">false</bool>
  658. <string name="Name">TextButton</string>
  659. <Ref name="NextSelectionDown">null</Ref>
  660. <Ref name="NextSelectionLeft">null</Ref>
  661. <Ref name="NextSelectionRight">null</Ref>
  662. <Ref name="NextSelectionUp">null</Ref>
  663. <UDim2 name="Position">
  664. <XS>0</XS>
  665. <XO>0</XO>
  666. <YS>0</YS>
  667. <YO>46</YO>
  668. </UDim2>
  669. <float name="Rotation">0</float>
  670. <bool name="Selectable">true</bool>
  671. <bool name="Selected">false</bool>
  672. <Ref name="SelectionImageObject">null</Ref>
  673. <UDim2 name="Size">
  674. <XS>0.25</XS>
  675. <XO>0</XO>
  676. <YS>0</YS>
  677. <YO>35</YO>
  678. </UDim2>
  679. <token name="SizeConstraint">0</token>
  680. <token name="Style">0</token>
  681. <string name="Text">Play</string>
  682. <Color3 name="TextColor3">4294967295</Color3>
  683. <bool name="TextScaled">false</bool>
  684. <Color3 name="TextStrokeColor3">4278190080</Color3>
  685. <float name="TextStrokeTransparency">0.200000003</float>
  686. <float name="TextTransparency">0</float>
  687. <bool name="TextWrapped">false</bool>
  688. <token name="TextXAlignment">2</token>
  689. <token name="TextYAlignment">1</token>
  690. <bool name="Visible">true</bool>
  691. <int name="ZIndex">1</int>
  692. </Properties>
  693. </Item>
  694. <Item class="LocalScript" referent="RBX2D369AD63DAC432B81219E1E0843DD29">
  695. <Properties>
  696. <bool name="Disabled">false</bool>
  697. <Content name="LinkedSource"><null></null></Content>
  698. <string name="Name">LocalScript</string>
  699. <ProtectedString name="Source"><![CDATA[local ContentProvider = game:GetService("ContentProvider")
  700.  
  701. local totalWait = 20
  702.  
  703. local queueSize = ContentProvider.RequestQueueSize
  704.  
  705. function UpdateQueueSize()
  706. queueSize = ContentProvider.RequestQueueSize
  707. end
  708.  
  709. function WaitForSoundToLoad()
  710. local start = tick()
  711. while (ContentProvider.RequestQueueSize > queueSize) and ((tick() - start) < totalWait ) do
  712. wait(0.1)
  713. end
  714. if (start - tick() > 1) then print("Took " .. tostring(start - tick()) " seconds to load") end
  715. end
  716. local x = game.Workspace:FindFirstChild(""..script.Parent.Parent.Parent.Parent.Name)
  717. if not (x) then
  718. return
  719. else
  720.  
  721.  
  722. function PlaySound(id)
  723. if id == nil then print("Invalid sound") return end
  724. local sound = x.Torso.Sound
  725. sound.SoundId = "http://www.roblox.com/asset?id=" .. tostring(id)
  726. UpdateQueueSize()
  727. WaitForSoundToLoad()
  728. sound:Play()
  729. end
  730.  
  731. local TextBox = script.Parent:WaitForChild("TextBox")
  732. local TextButton = script.Parent:WaitForChild("TextButton")
  733. local Stop = script.Parent:WaitForChild("Stop")
  734.  
  735. TextBox.FocusLost:connect(function(enterPressed)
  736. Game:GetService("ContentProvider"):Preload(TextBox.Text)
  737. end)
  738.  
  739. TextButton.MouseButton1Click:connect(function()
  740. PlaySound(tonumber(TextBox.Text))
  741. end)
  742. Stop.MouseButton1Click:connect(function()
  743. local sound = x.Torso.Sound
  744. sound:Stop()
  745. end)
  746. end
  747.  
  748.  
  749.  
  750. ]]></ProtectedString>
  751. </Properties>
  752. </Item>
  753. <Item class="TextBox" referent="RBX5F796A9430144ADE96F736D152F5CF6A">
  754. <Properties>
  755. <bool name="Active">true</bool>
  756. <Color3 name="BackgroundColor3">4294967295</Color3>
  757. <float name="BackgroundTransparency">0</float>
  758. <Color3 name="BorderColor3">4291282887</Color3>
  759. <int name="BorderSizePixel">2</int>
  760. <bool name="ClearTextOnFocus">true</bool>
  761. <bool name="ClipsDescendants">false</bool>
  762. <bool name="Draggable">false</bool>
  763. <token name="Font">4</token>
  764. <token name="FontSize">5</token>
  765. <bool name="MultiLine">false</bool>
  766. <string name="Name">TextBox</string>
  767. <Ref name="NextSelectionDown">null</Ref>
  768. <Ref name="NextSelectionLeft">null</Ref>
  769. <Ref name="NextSelectionRight">null</Ref>
  770. <Ref name="NextSelectionUp">null</Ref>
  771. <UDim2 name="Position">
  772. <XS>0</XS>
  773. <XO>0</XO>
  774. <YS>0</YS>
  775. <YO>0</YO>
  776. </UDim2>
  777. <float name="Rotation">0</float>
  778. <bool name="Selectable">true</bool>
  779. <Ref name="SelectionImageObject">null</Ref>
  780. <UDim2 name="Size">
  781. <XS>1</XS>
  782. <XO>0</XO>
  783. <YS>0</YS>
  784. <YO>40</YO>
  785. </UDim2>
  786. <token name="SizeConstraint">0</token>
  787. <string name="Text">paste ID here</string>
  788. <Color3 name="TextColor3">4279970357</Color3>
  789. <bool name="TextScaled">false</bool>
  790. <Color3 name="TextStrokeColor3">4278190080</Color3>
  791. <float name="TextStrokeTransparency">1</float>
  792. <float name="TextTransparency">0</float>
  793. <bool name="TextWrapped">false</bool>
  794. <token name="TextXAlignment">2</token>
  795. <token name="TextYAlignment">1</token>
  796. <bool name="Visible">true</bool>
  797. <int name="ZIndex">1</int>
  798. </Properties>
  799. </Item>
  800. <Item class="TextButton" referent="RBXA04FA22920E6422A97BC1EC0F6F33489">
  801. <Properties>
  802. <bool name="Active">true</bool>
  803. <bool name="AutoButtonColor">true</bool>
  804. <Color3 name="BackgroundColor3">4294901760</Color3>
  805. <float name="BackgroundTransparency">0</float>
  806. <Color3 name="BorderColor3">4294967295</Color3>
  807. <int name="BorderSizePixel">2</int>
  808. <bool name="ClipsDescendants">false</bool>
  809. <bool name="Draggable">false</bool>
  810. <token name="Font">4</token>
  811. <token name="FontSize">7</token>
  812. <bool name="Modal">false</bool>
  813. <string name="Name">Stop</string>
  814. <Ref name="NextSelectionDown">null</Ref>
  815. <Ref name="NextSelectionLeft">null</Ref>
  816. <Ref name="NextSelectionRight">null</Ref>
  817. <Ref name="NextSelectionUp">null</Ref>
  818. <UDim2 name="Position">
  819. <XS>0</XS>
  820. <XO>138</XO>
  821. <YS>0</YS>
  822. <YO>46</YO>
  823. </UDim2>
  824. <float name="Rotation">0</float>
  825. <bool name="Selectable">true</bool>
  826. <bool name="Selected">false</bool>
  827. <Ref name="SelectionImageObject">null</Ref>
  828. <UDim2 name="Size">
  829. <XS>0.25</XS>
  830. <XO>0</XO>
  831. <YS>0</YS>
  832. <YO>35</YO>
  833. </UDim2>
  834. <token name="SizeConstraint">0</token>
  835. <token name="Style">0</token>
  836. <string name="Text">Stop</string>
  837. <Color3 name="TextColor3">4294967295</Color3>
  838. <bool name="TextScaled">false</bool>
  839. <Color3 name="TextStrokeColor3">4278190080</Color3>
  840. <float name="TextStrokeTransparency">0.200000003</float>
  841. <float name="TextTransparency">0</float>
  842. <bool name="TextWrapped">false</bool>
  843. <token name="TextXAlignment">2</token>
  844. <token name="TextYAlignment">1</token>
  845. <bool name="Visible">true</bool>
  846. <int name="ZIndex">1</int>
  847. </Properties>
  848. </Item>
  849. <Item class="Script" referent="RBX4DB8ABBD9D9044019B0623B372EB9BFC">
  850. <Properties>
  851. <bool name="Disabled">true</bool>
  852. <Content name="LinkedSource"><null></null></Content>
  853. <string name="Name">Script</string>
  854. <ProtectedString name="Source"><![CDATA[local x = game.Workspace:FindFirstChild(""..script.Parent.Parent.Parent.Parent.Name)
  855. if not (x) then
  856. return
  857. else
  858.  
  859. ]]></ProtectedString>
  860. </Properties>
  861. </Item>
  862. </Item>
  863. </Item>
  864. <Item class="SpecialMesh" referent="RBX00187890571B49EC906B43E3E4E81F81">
  865. <Properties>
  866. <token name="LODX">2</token>
  867. <token name="LODY">2</token>
  868. <Content name="MeshId"><url>http://www.roblox.com/asset/?id=151760030</url></Content>
  869. <token name="MeshType">5</token>
  870. <string name="Name">Mesh</string>
  871. <Vector3 name="Offset">
  872. <X>0</X>
  873. <Y>0</Y>
  874. <Z>0</Z>
  875. </Vector3>
  876. <Vector3 name="Scale">
  877. <X>-1</X>
  878. <Y>1</Y>
  879. <Z>-1</Z>
  880. </Vector3>
  881. <Content name="TextureId"><url>http://www.roblox.com/asset/?id=151760072</url></Content>
  882. <Vector3 name="VertexColor">
  883. <X>1</X>
  884. <Y>1</Y>
  885. <Z>1</Z>
  886. </Vector3>
  887. </Properties>
  888. </Item>
  889. </Item>
  890. </roblox>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement