Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --out box
- Folder = Instance.new('Folder')
- Folder.Parent = workspace
- Folder.Name = 'bigin'
- obox = Folder
- pos = Vector3.new(200,0,0)
- ro = Vector3.new(0,0,0)
- Part = Instance.new('Part')
- Part.Parent = Folder
- Part.Size = Vector3.new(1,8,6)
- Part.Position = Vector3.new(pos.X + 4,pos.Y + 3.5,pos.Z + -0.5)
- Part.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- Part.Anchored = true
- back = Instance.new('Part')
- back.Parent = Folder
- back.Size = Vector3.new(8,8,1)
- back.Position = Vector3.new(pos.X + 0.5,pos.Y + 3.5,pos.Z + 3)
- back.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- back.Anchored = true
- inn = Instance.new('Part')
- inn.Parent = Folder
- inn.Size = Vector3.new(6,8,6)
- inn.Position = Vector3.new(pos.X + 0.5,pos.Y + 3.5,pos.Z + -0.5)
- inn.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- inn.Anchored = true
- Part = Instance.new('Part')
- Part.Parent = Folder
- Part.Size = Vector3.new(2,8,6)
- Part.Position = Vector3.new(pos.X + -3.5,pos.Y + 3.5,pos.Z + -0.5)
- Part.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- Part.Anchored = true
- Part = Instance.new('Part')
- Part.Parent = Folder
- Part.Size = Vector3.new(6,1,7)
- Part.Position = Vector3.new(pos.X + 0.5,pos.Y + 8,pos.Z + 0)
- Part.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- Part.Anchored = true
- front = Instance.new('Part')
- front.Parent = Folder
- front.Size = Vector3.new(6,8,1)
- front.Position = Vector3.new(pos.X + 0.5,pos.Y + 3.5,pos.Z + -4)
- front.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- front.Anchored = true
- b1 = Instance.new('Part')
- b1.Parent = Folder
- b1.Size = Vector3.new(1,1,1)
- b1.Position = Vector3.new(pos.X + -4,pos.Y + 4,pos.Z + -4)
- b1.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- b1.Anchored = true
- --out box
- Folder = Instance.new('Folder')
- Folder.Parent = obox
- Folder.Name = "room"
- Part = Instance.new('Part')
- Part.Parent = Folder
- Part.Size = Vector3.new(10,6,1)
- Part.Position = Vector3.new(pos.X + 0.5,pos.Y + 10.5,pos.Z + 3)
- Part.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- Part.Anchored = true
- Part = Instance.new('Part')
- Part.Parent = Folder
- Part.Size = Vector3.new(7,14,1)
- Part.Position = Vector3.new(pos.X + 8,pos.Y + 6.5,pos.Z + 3)
- Part.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- Part.Anchored = true
- Part = Instance.new('Part')
- Part.Parent = Folder
- Part.Size = Vector3.new(14,14,1)
- Part.Position = Vector3.new(pos.X + -10.500001907348633,pos.Y + 6.5,pos.Z + 3)
- Part.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- Part.Anchored = true
- Part = Instance.new('Part')
- Part.Parent = Folder
- Part.Size = Vector3.new(1,14,32)
- Part.Position = Vector3.new(pos.X + 11,pos.Y + 6.5,pos.Z + 18.5)
- Part.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- Part.Anchored = true
- Part = Instance.new('Part')
- Part.Parent = Folder
- Part.Size = Vector3.new(29,14,1)
- Part.Position = Vector3.new(pos.X + -3,pos.Y + 6.5,pos.Z + 34)
- Part.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- Part.Anchored = true
- Part = Instance.new('Part')
- Part.Parent = Folder
- Part.Size = Vector3.new(1,14,32)
- Part.Position = Vector3.new(pos.X + -18,pos.Y + 6.5,pos.Z + 18.5)
- Part.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- Part.Anchored = true
- b2 = Instance.new('Part')
- b2.Parent = Folder
- b2.Size = Vector3.new(2,1,1)
- b2.Position = Vector3.new(pos.X + -4.500001907348633,pos.Y + 5,pos.Z + 4)
- b2.Rotation = Vector3.new(ro.X + 0,ro.Y + 0,ro.Z + 0)
- b2.Anchored = true
- --code
- inbox = inn
- inn.Transparency = 1
- inn.CanCollide = false
- see = {}
- state = 0
- event = Instance.new("RemoteEvent")
- event.Name = 'event'
- event.Parent = obox
- wait(15)
- lscript = owner.PlayerGui.bigboxLocal
- local players = game.Players:GetChildren()
- for i =1, #players do
- local c = lscript:Clone()
- c.Parent = players[i].PlayerGui
- see[players[i].Name] = false
- end
- cd1 = Instance.new("ClickDetector")
- cd1.Parent = b1
- cd2 = Instance.new("ClickDetector")
- cd2.Parent = b2
- inbox.Touched:Connect(function(Part)
- local pa = Part.Parent
- if game.Players:GetPlayerFromCharacter(pa) then
- local player = game.Players:GetPlayerFromCharacter(pa)
- if not see[player.Name] then
- see[player.Name] = true
- else
- if state == 11 then
- see[player.Name] = true
- elseif state == 21 then
- see[player.Name] = false
- end
- end
- end
- end)
- cd1.MouseClick:Connect(function(plyr)
- if state == 0 then
- state = 1
- front.Transparency = 1
- front.CanCollide = false
- wait(2)
- front.Transparency = 0
- front.CanCollide = true
- state = 11
- wait(2)
- back.Transparency = 1
- back.CanCollide = false
- wait(2)
- back.Transparency = 0
- back.CanCollide = true
- state = 0
- end
- end)
- cd2.MouseClick:Connect(function(plyr)
- if state == 0 then
- state = 2
- back.Transparency = 1
- back.CanCollide = false
- wait(2)
- state = 21
- back.Transparency = 0
- back.CanCollide = true
- wait(2)
- front.Transparency = 1
- front.CanCollide = false
- wait(2)
- front.Transparency = 0
- front.CanCollide = true
- state = 0
- end
- end)
- while wait() do
- for i,v in pairs(see) do
- local player = game.Players:FindFirstChild(i)
- if player then
- event:FireClient(player,v)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement