Advertisement
antgame11

Untitled

Mar 24th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.44 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345'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. Model0 = Instance.new("Model")
  20. Part1 = Instance.new("Part")
  21. Snap2 = Instance.new("Snap")
  22. Model3 = Instance.new("Model")
  23. ClickDetector4 = Instance.new("ClickDetector")
  24. Part5 = Instance.new("Part")
  25. SpecialMesh6 = Instance.new("SpecialMesh")
  26. Script7 = Instance.new("Script")
  27. Part8 = Instance.new("Part")
  28. Part9 = Instance.new("Part")
  29. Snap10 = Instance.new("Snap")
  30. Part11 = Instance.new("Part")
  31. Snap12 = Instance.new("Snap")
  32. Part13 = Instance.new("Part")
  33. Snap14 = Instance.new("Snap")
  34. Part15 = Instance.new("Part")
  35. Decal16 = Instance.new("Decal")
  36. Model0.Name = "golden boombox giver"
  37. Model0.Parent = mas
  38. Part1.Parent = Model0
  39. Part1.CFrame = CFrame.new(2.1500051, 2.50000906, 50.7099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  40. Part1.Orientation = Vector3.new(0, 90, 0)
  41. Part1.Position = Vector3.new(2.1500051, 2.50000906, 50.7099838)
  42. Part1.Rotation = Vector3.new(0, 90, 0)
  43. Part1.Color = Color3.new(0.356863, 0.364706, 0.411765)
  44. Part1.Transparency = 0.5
  45. Part1.Size = Vector3.new(4, 5, 1)
  46. Part1.Anchored = true
  47. Part1.BrickColor = BrickColor.new("Smoky grey")
  48. Part1.TopSurface = Enum.SurfaceType.Smooth
  49. Part1.brickColor = BrickColor.new("Smoky grey")
  50. Snap2.Parent = Part1
  51. Snap2.C0 = CFrame.new(0, -2.5, 0, 1, 0, 0, -0, -0, -1, 0, 1, 0)
  52. Snap2.C1 = CFrame.new(2.1500051, 10.0000095, 50.7099838, 0, 1, 0, 0, 0, -1, -1, 0, 0)
  53. Snap2.Part0 = Part1
  54. Snap2.Part1 = nil
  55. Snap2.part1 = nil
  56. Model3.Name = "GoldenBoomBoxes"
  57. Model3.Parent = Model0
  58. ClickDetector4.Parent = Model3
  59. Part5.Name = "Interactive"
  60. Part5.Parent = Model3
  61. Part5.CFrame = CFrame.new(-1.74995804, 2.80001211, 50.3099937, 3.09007486e-09, -5.96046519e-08, 1, -2.71379879e-08, 1, 5.96046519e-08, -1, -2.71379896e-08, 3.09007353e-09)
  62. Part5.Orientation = Vector3.new(0, 90, 0)
  63. Part5.Position = Vector3.new(-1.74995804, 2.80001211, 50.3099937)
  64. Part5.Rotation = Vector3.new(0, 90, 0)
  65. Part5.Size = Vector3.new(2.79999995, 1.60000002, 0.800000012)
  66. Part5.Anchored = true
  67. Part5.BottomSurface = Enum.SurfaceType.Smooth
  68. Part5.TopSurface = Enum.SurfaceType.Smooth
  69. Part5.FormFactor = Enum.FormFactor.Custom
  70. Part5.formFactor = Enum.FormFactor.Custom
  71. SpecialMesh6.Parent = Part5
  72. SpecialMesh6.MeshId = "http://www.roblox.com/asset/?id=212302951 "
  73. SpecialMesh6.Scale = Vector3.new(4, 4, 4)
  74. SpecialMesh6.TextureId = "http://www.roblox.com/asset/?id=212303049 "
  75. SpecialMesh6.MeshType = Enum.MeshType.FileMesh
  76. Script7.Name = "GiveItemScript"
  77. Script7.Parent = Model3
  78. table.insert(cors,sandbox(Script7,function()
  79. local ClickerModule = require(343254562)
  80. local clickEvent = ClickerModule.RemoteEvent
  81. local interactiveParts = {}
  82. local activationDistance = 12
  83.  
  84. for i, v in pairs(script.Parent:GetChildren()) do
  85. if v.Name == "Interactive" then
  86. table.insert(interactiveParts, v)
  87. end
  88. end
  89.  
  90. local function distanceToCharacter(player, part)
  91. local character = player.Character
  92. if character then
  93. local torso = character:FindFirstChild("Torso")
  94. if torso then
  95. return((torso.Position - part.Position).magnitude)
  96. end
  97. end
  98. return math.huge
  99. end
  100.  
  101. clickEvent.OnServerEvent:connect(function(player, part)
  102. local isPart = false
  103. for i = 1, #interactiveParts do
  104. if part == interactiveParts[i] then
  105. isPart = true
  106. end
  107. end
  108. if isPart and player.Character and distanceToCharacter(player, part) <= activationDistance then
  109. game:GetService("InsertService"):LoadAsset(212641536):GetChildren()[1].Parent = player.Backpack
  110. end
  111. end)
  112. end))
  113. Part8.Parent = Model0
  114. Part8.CFrame = CFrame.new(0.650004983, 5.49993277, 50.7099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  115. Part8.Orientation = Vector3.new(0, 90, 0)
  116. Part8.Position = Vector3.new(0.650004983, 5.49993277, 50.7099838)
  117. Part8.Rotation = Vector3.new(0, 90, 0)
  118. Part8.Color = Color3.new(0.356863, 0.364706, 0.411765)
  119. Part8.Transparency = 0.5
  120. Part8.Size = Vector3.new(4, 1, 4)
  121. Part8.Anchored = true
  122. Part8.BrickColor = BrickColor.new("Smoky grey")
  123. Part8.TopSurface = Enum.SurfaceType.Smooth
  124. Part8.brickColor = BrickColor.new("Smoky grey")
  125. Part9.Parent = Model0
  126. Part9.CFrame = CFrame.new(0.650004983, 2.50000906, 52.2099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  127. Part9.Orientation = Vector3.new(0, 90, 0)
  128. Part9.Position = Vector3.new(0.650004983, 2.50000906, 52.2099838)
  129. Part9.Rotation = Vector3.new(0, 90, 0)
  130. Part9.Color = Color3.new(0.356863, 0.364706, 0.411765)
  131. Part9.Transparency = 0.5
  132. Part9.Size = Vector3.new(1, 5, 2)
  133. Part9.Anchored = true
  134. Part9.BrickColor = BrickColor.new("Smoky grey")
  135. Part9.TopSurface = Enum.SurfaceType.Smooth
  136. Part9.brickColor = BrickColor.new("Smoky grey")
  137. Snap10.Parent = Part9
  138. Snap10.C0 = CFrame.new(0, -2.5, 0, 1, 0, 0, -0, -0, -1, 0, 1, 0)
  139. Snap10.C1 = CFrame.new(0.650004983, 10.0000095, 52.2099838, 0, 1, 0, 0, 0, -1, -1, 0, 0)
  140. Snap10.Part0 = Part9
  141. Snap10.Part1 = nil
  142. Snap10.part1 = nil
  143. Part11.Parent = Model0
  144. Part11.CFrame = CFrame.new(0.650004983, 2.50000906, 49.2099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  145. Part11.Orientation = Vector3.new(0, 90, 0)
  146. Part11.Position = Vector3.new(0.650004983, 2.50000906, 49.2099838)
  147. Part11.Rotation = Vector3.new(0, 90, 0)
  148. Part11.Color = Color3.new(0.356863, 0.364706, 0.411765)
  149. Part11.Transparency = 0.5
  150. Part11.Size = Vector3.new(1, 5, 2)
  151. Part11.Anchored = true
  152. Part11.BrickColor = BrickColor.new("Smoky grey")
  153. Part11.TopSurface = Enum.SurfaceType.Smooth
  154. Part11.brickColor = BrickColor.new("Smoky grey")
  155. Snap12.Parent = Part11
  156. Snap12.C0 = CFrame.new(0, -2.5, 0, 1, 0, 0, -0, -0, -1, 0, 1, 0)
  157. Snap12.C1 = CFrame.new(0.650004983, 10.0000095, 49.2099838, 0, 1, 0, 0, 0, -1, -1, 0, 0)
  158. Snap12.Part0 = Part11
  159. Snap12.Part1 = nil
  160. Snap12.part1 = nil
  161. Part13.Parent = Model0
  162. Part13.CFrame = CFrame.new(-0.849995017, 2.50000906, 50.7099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  163. Part13.Orientation = Vector3.new(0, 90, 0)
  164. Part13.Position = Vector3.new(-0.849995017, 2.50000906, 50.7099838)
  165. Part13.Rotation = Vector3.new(0, 90, 0)
  166. Part13.Color = Color3.new(0.356863, 0.364706, 0.411765)
  167. Part13.Transparency = 0.5
  168. Part13.Size = Vector3.new(4, 5, 1)
  169. Part13.Anchored = true
  170. Part13.BrickColor = BrickColor.new("Smoky grey")
  171. Part13.TopSurface = Enum.SurfaceType.Smooth
  172. Part13.brickColor = BrickColor.new("Smoky grey")
  173. Snap14.Parent = Part13
  174. Snap14.C0 = CFrame.new(0, -2.5, 0, 1, 0, 0, -0, -0, -1, 0, 1, 0)
  175. Snap14.C1 = CFrame.new(-0.849995017, 10.0000095, 50.7099838, 0, 1, 0, 0, 0, -1, -1, 0, 0)
  176. Snap14.Part0 = Part13
  177. Snap14.Part1 = nil
  178. Snap14.part1 = nil
  179. Part15.Parent = Model0
  180. Part15.CFrame = CFrame.new(-1.450001, 5.09993792, 50.7099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  181. Part15.Orientation = Vector3.new(0, 90, 0)
  182. Part15.Position = Vector3.new(-1.450001, 5.09993792, 50.7099838)
  183. Part15.Rotation = Vector3.new(0, 90, 0)
  184. Part15.Color = Color3.new(0.356863, 0.364706, 0.411765)
  185. Part15.Transparency = 0.5
  186. Part15.Size = Vector3.new(4, 1.79999995, 0.200000003)
  187. Part15.Anchored = true
  188. Part15.BrickColor = BrickColor.new("Smoky grey")
  189. Part15.TopSurface = Enum.SurfaceType.Smooth
  190. Part15.brickColor = BrickColor.new("Smoky grey")
  191. Decal16.Parent = Part15
  192. Decal16.Texture = "http://www.roblox.com/asset/?id=431094308"
  193. for i,v in pairs(mas:GetChildren()) do
  194. v.Parent = workspace
  195. pcall(function() v:MakeJoints() end)
  196. end
  197. mas:Destroy()
  198. for i,v in pairs(cors) do
  199. spawn(function()
  200. pcall(v)
  201. end)
  202. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement