Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- Snap2 = Instance.new("Snap")
- Model3 = Instance.new("Model")
- ClickDetector4 = Instance.new("ClickDetector")
- Part5 = Instance.new("Part")
- SpecialMesh6 = Instance.new("SpecialMesh")
- Script7 = Instance.new("Script")
- Part8 = Instance.new("Part")
- Part9 = Instance.new("Part")
- Snap10 = Instance.new("Snap")
- Part11 = Instance.new("Part")
- Snap12 = Instance.new("Snap")
- Part13 = Instance.new("Part")
- Snap14 = Instance.new("Snap")
- Part15 = Instance.new("Part")
- Decal16 = Instance.new("Decal")
- Model0.Name = "golden boombox giver"
- Model0.Parent = mas
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(2.1500051, 2.50000906, 50.7099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part1.Orientation = Vector3.new(0, 90, 0)
- Part1.Position = Vector3.new(2.1500051, 2.50000906, 50.7099838)
- Part1.Rotation = Vector3.new(0, 90, 0)
- Part1.Color = Color3.new(0.356863, 0.364706, 0.411765)
- Part1.Transparency = 0.5
- Part1.Size = Vector3.new(4, 5, 1)
- Part1.Anchored = true
- Part1.BrickColor = BrickColor.new("Smoky grey")
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Smoky grey")
- Snap2.Parent = Part1
- Snap2.C0 = CFrame.new(0, -2.5, 0, 1, 0, 0, -0, -0, -1, 0, 1, 0)
- Snap2.C1 = CFrame.new(2.1500051, 10.0000095, 50.7099838, 0, 1, 0, 0, 0, -1, -1, 0, 0)
- Snap2.Part0 = Part1
- Snap2.Part1 = nil
- Snap2.part1 = nil
- Model3.Name = "GoldenBoomBoxes"
- Model3.Parent = Model0
- ClickDetector4.Parent = Model3
- Part5.Name = "Interactive"
- Part5.Parent = Model3
- 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)
- Part5.Orientation = Vector3.new(0, 90, 0)
- Part5.Position = Vector3.new(-1.74995804, 2.80001211, 50.3099937)
- Part5.Rotation = Vector3.new(0, 90, 0)
- Part5.Size = Vector3.new(2.79999995, 1.60000002, 0.800000012)
- Part5.Anchored = true
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Part5.FormFactor = Enum.FormFactor.Custom
- Part5.formFactor = Enum.FormFactor.Custom
- SpecialMesh6.Parent = Part5
- SpecialMesh6.MeshId = "http://www.roblox.com/asset/?id=212302951 "
- SpecialMesh6.Scale = Vector3.new(4, 4, 4)
- SpecialMesh6.TextureId = "http://www.roblox.com/asset/?id=212303049 "
- SpecialMesh6.MeshType = Enum.MeshType.FileMesh
- Script7.Name = "GiveItemScript"
- Script7.Parent = Model3
- table.insert(cors,sandbox(Script7,function()
- local ClickerModule = require(343254562)
- local clickEvent = ClickerModule.RemoteEvent
- local interactiveParts = {}
- local activationDistance = 12
- for i, v in pairs(script.Parent:GetChildren()) do
- if v.Name == "Interactive" then
- table.insert(interactiveParts, v)
- end
- end
- local function distanceToCharacter(player, part)
- local character = player.Character
- if character then
- local torso = character:FindFirstChild("Torso")
- if torso then
- return((torso.Position - part.Position).magnitude)
- end
- end
- return math.huge
- end
- clickEvent.OnServerEvent:connect(function(player, part)
- local isPart = false
- for i = 1, #interactiveParts do
- if part == interactiveParts[i] then
- isPart = true
- end
- end
- if isPart and player.Character and distanceToCharacter(player, part) <= activationDistance then
- game:GetService("InsertService"):LoadAsset(212641536):GetChildren()[1].Parent = player.Backpack
- end
- end)
- end))
- Part8.Parent = Model0
- Part8.CFrame = CFrame.new(0.650004983, 5.49993277, 50.7099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part8.Orientation = Vector3.new(0, 90, 0)
- Part8.Position = Vector3.new(0.650004983, 5.49993277, 50.7099838)
- Part8.Rotation = Vector3.new(0, 90, 0)
- Part8.Color = Color3.new(0.356863, 0.364706, 0.411765)
- Part8.Transparency = 0.5
- Part8.Size = Vector3.new(4, 1, 4)
- Part8.Anchored = true
- Part8.BrickColor = BrickColor.new("Smoky grey")
- Part8.TopSurface = Enum.SurfaceType.Smooth
- Part8.brickColor = BrickColor.new("Smoky grey")
- Part9.Parent = Model0
- Part9.CFrame = CFrame.new(0.650004983, 2.50000906, 52.2099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part9.Orientation = Vector3.new(0, 90, 0)
- Part9.Position = Vector3.new(0.650004983, 2.50000906, 52.2099838)
- Part9.Rotation = Vector3.new(0, 90, 0)
- Part9.Color = Color3.new(0.356863, 0.364706, 0.411765)
- Part9.Transparency = 0.5
- Part9.Size = Vector3.new(1, 5, 2)
- Part9.Anchored = true
- Part9.BrickColor = BrickColor.new("Smoky grey")
- Part9.TopSurface = Enum.SurfaceType.Smooth
- Part9.brickColor = BrickColor.new("Smoky grey")
- Snap10.Parent = Part9
- Snap10.C0 = CFrame.new(0, -2.5, 0, 1, 0, 0, -0, -0, -1, 0, 1, 0)
- Snap10.C1 = CFrame.new(0.650004983, 10.0000095, 52.2099838, 0, 1, 0, 0, 0, -1, -1, 0, 0)
- Snap10.Part0 = Part9
- Snap10.Part1 = nil
- Snap10.part1 = nil
- Part11.Parent = Model0
- Part11.CFrame = CFrame.new(0.650004983, 2.50000906, 49.2099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part11.Orientation = Vector3.new(0, 90, 0)
- Part11.Position = Vector3.new(0.650004983, 2.50000906, 49.2099838)
- Part11.Rotation = Vector3.new(0, 90, 0)
- Part11.Color = Color3.new(0.356863, 0.364706, 0.411765)
- Part11.Transparency = 0.5
- Part11.Size = Vector3.new(1, 5, 2)
- Part11.Anchored = true
- Part11.BrickColor = BrickColor.new("Smoky grey")
- Part11.TopSurface = Enum.SurfaceType.Smooth
- Part11.brickColor = BrickColor.new("Smoky grey")
- Snap12.Parent = Part11
- Snap12.C0 = CFrame.new(0, -2.5, 0, 1, 0, 0, -0, -0, -1, 0, 1, 0)
- Snap12.C1 = CFrame.new(0.650004983, 10.0000095, 49.2099838, 0, 1, 0, 0, 0, -1, -1, 0, 0)
- Snap12.Part0 = Part11
- Snap12.Part1 = nil
- Snap12.part1 = nil
- Part13.Parent = Model0
- Part13.CFrame = CFrame.new(-0.849995017, 2.50000906, 50.7099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part13.Orientation = Vector3.new(0, 90, 0)
- Part13.Position = Vector3.new(-0.849995017, 2.50000906, 50.7099838)
- Part13.Rotation = Vector3.new(0, 90, 0)
- Part13.Color = Color3.new(0.356863, 0.364706, 0.411765)
- Part13.Transparency = 0.5
- Part13.Size = Vector3.new(4, 5, 1)
- Part13.Anchored = true
- Part13.BrickColor = BrickColor.new("Smoky grey")
- Part13.TopSurface = Enum.SurfaceType.Smooth
- Part13.brickColor = BrickColor.new("Smoky grey")
- Snap14.Parent = Part13
- Snap14.C0 = CFrame.new(0, -2.5, 0, 1, 0, 0, -0, -0, -1, 0, 1, 0)
- Snap14.C1 = CFrame.new(-0.849995017, 10.0000095, 50.7099838, 0, 1, 0, 0, 0, -1, -1, 0, 0)
- Snap14.Part0 = Part13
- Snap14.Part1 = nil
- Snap14.part1 = nil
- Part15.Parent = Model0
- Part15.CFrame = CFrame.new(-1.450001, 5.09993792, 50.7099838, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Part15.Orientation = Vector3.new(0, 90, 0)
- Part15.Position = Vector3.new(-1.450001, 5.09993792, 50.7099838)
- Part15.Rotation = Vector3.new(0, 90, 0)
- Part15.Color = Color3.new(0.356863, 0.364706, 0.411765)
- Part15.Transparency = 0.5
- Part15.Size = Vector3.new(4, 1.79999995, 0.200000003)
- Part15.Anchored = true
- Part15.BrickColor = BrickColor.new("Smoky grey")
- Part15.TopSurface = Enum.SurfaceType.Smooth
- Part15.brickColor = BrickColor.new("Smoky grey")
- Decal16.Parent = Part15
- Decal16.Texture = "http://www.roblox.com/asset/?id=431094308"
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement