Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created with ttyyuu12345's compiler
- --Errors:
- Create = function(itemClass,tabl)
- local item = Instance.new(itemClass)
- for i,v in pairs(tabl) do
- local a,b = ypcall(function() return item[i] end)
- if a then
- item[i] = tabl[i]
- end
- end
- return item
- end
- function runDummyScript(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Create("Model",{
- ["Parent"] = mas,
- })
- o2 = Create("Part",{
- ["Parent"] = o1,
- ["Position"] = Vector3.new(7, 0.5, -11.5),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(7, 0.5, -11.5, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(46, 1, 31),
- })
- o3 = Create("Part",{
- ["Parent"] = o1,
- ["Position"] = Vector3.new(-15.5, 12.0000124, -11.5),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(-15.5, 12.0000124, -11.5, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(1, 22, 31),
- })
- o4 = Create("Part",{
- ["Parent"] = o1,
- ["Position"] = Vector3.new(29.5, 12, -11.5),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(29.5, 12, -11.5, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(1, 22, 31),
- })
- o5 = Create("Part",{
- ["Parent"] = o1,
- ["Position"] = Vector3.new(7.00000095, 12, -26.5),
- ["Rotation"] = Vector3.new(0, 90, 0),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(7.00000095, 12, -26.5, 0, 0, 1, 0, 1, 0, -1, 0, 0),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(1, 22, 44),
- })
- o6 = Create("Part",{
- ["Parent"] = o1,
- ["Position"] = Vector3.new(21.5, 12, 3.5),
- ["Rotation"] = Vector3.new(0, 90, 0),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(21.5, 12, 3.5, 0, 0, 1, 0, 1, 0, -1, 0, 0),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(1, 22, 15),
- })
- o7 = Create("Part",{
- ["Parent"] = o1,
- ["Position"] = Vector3.new(-7.5, 12, 3.5),
- ["Rotation"] = Vector3.new(-0, 90, 0),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(-7.5, 12, 3.5, -0, 0, 1, -0, 1, 0, -1, 0, 0),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(1, 22, 15),
- })
- o8 = Create("Part",{
- ["Parent"] = o1,
- ["Position"] = Vector3.new(7, 23.5000248, -11.5),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(7, 23.5000248, -11.5, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(46, 1, 31),
- })
- o9 = Create("Part",{
- ["Parent"] = o1,
- ["Transparency"] = 0.5,
- ["Position"] = Vector3.new(7, 12, 3.5),
- ["Rotation"] = Vector3.new(0, 90, 0),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(7, 12, 3.5, 0, 0, 1, 0, 1, 0, -1, 0, 0),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Size"] = Vector3.new(1, 22, 14),
- })
- o10 = Create("ClickDetector",{
- ["Parent"] = o9,
- })
- o11 = Create("Script",{
- ["Parent"] = o9,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local door = script.Parent
- local open = false
- script.Parent.ClickDetector.MouseClick:connect(function(pl)
- if open then
- open = false
- door.Transparency = 0.5
- door.CanCollide = true
- else
- open = true
- door.Transparency = 1
- door.CanCollide = false
- end
- end)
- end,o11)
- end))
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = script
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement