script.Parent.ClickDetector.MouseClick:Connect(function()
local cs = script.Parent.Parent.Button.TurnScript
local part = script.Parent.Parent.Parent.Model.InputDoor
local partbis = script.Parent.Parent.Parent.Model.OutputDoor
local SS = game.ServerStorage
cs.Disabled = true
script.Parent.ClockworkSound:Resume()
local player = game:GetService("Players")
local card0 = game:GetService("Players").Character:FindFirstChild("[SCP] Card-L0")
local card1 = game:GetService("Players").Character:FindFirstChild("[SCP] Card-L1")
local card2 = game:GetService("Players").Character:FindFirstChild("[SCP] Card-L2")
local card3 = game:GetService("Players").Character:FindFirstChild("[SCP] Card-L3")
local card3b = game:GetService("Players").Character:FindFirstChild("[SCP] Guard")
local card4 = game:GetService("Players").Character:FindFirstChild("[SCP] Site Director")
local card4b = game:GetService("Players").Character:FindFirstChild("[SCP] MTF")
local card4c = game:GetService("Players").Character:FindFirstChild("[SCP] UIU")
local card4d = game:GetService("Players").Character:FindFirstChild("[SCP] GOC")
local card5 = game:GetService("Players").Character:FindFirstChild("[SCP] Card-L5")
local card5bis = game:GetService("Players").Character:FindFirstChild("[SCP] Alpha-1")
local cardb = player.Character:FindFirstChild("[SCP] Bypass")
script.Parent.Parent.Parent.Input.Detection.Touched:Connect(function(p)
local place = CFrame.new(-17.375, 5.6, -3.705)
local humanoid = p.Parent:findFirstChild("Humanoid")
local Mode = game.ReplicatedStorage.Scp914Mode
if Mode.Value == 1 then
player.Character:FindFirstChildWhichIsA("Tool"):Destroy()
wait(12)
humanoid.Torso.CFrame = place
humanoid.Health = 0
elseif Mode.Value == 2 then
if card0 then
card0:Destroy()
elseif card1 then
card1:Destroy()
local n0 = SS.AccessCard["[SCP] Card-L0"]:Clone()
n0.Parent = player.Character
elseif card2 then
card2:Destroy()
local n0 = SS.AccessCard["[SCP] Card-L1"]:Clone()
n0.Parent = player.Character
elseif card3 then
card3:Destroy()
local n0 = SS.AccessCard["[SCP] Card-L2"]:Clone()
n0.Parent = player.Character
elseif card4 then
card4:Destroy()
local n0 = SS.AccessCard["[SCP] Card-L3"]:Clone()
n0.Parent = player.Character
elseif card5 then
card5:Destroy()
local n0 = SS.AccessCard["[SCP] Site Director"]:Clone()
n0.Parent = player.Character
elseif card5bis then
card5bis:Destroy()
local n0 = SS.AccessCard["[SCP] Site Director"]:Clone()
n0.Parent = player.Character
elseif cardb then
cardb:Destroy()
local n0 = SS.AccessCard["[SCP] Guard"]:Clone()
n0.Parent = player.Character
end
wait(12)
humanoid.Torso.CFrame = place
humanoid.Health = humanoid.Health/2
elseif Mode.Value == 3 then
wait(12)
humanoid.Torso.CFrame = place
elseif Mode.Value == 4 then
if card0 then
card0:Destroy()
local n0 = SS.AccessCard["[SCP] Card-L1"]:Clone()
n0.Parent = player.Character
elseif card1 then
card1:Destroy()
local n0 = SS.AccessCard["[SCP] Card-L2"]:Clone()
n0.Parent = player.Character
elseif card2 then
card2:Destroy()
local n0 = SS.AccessCard["[SCP] Card-L3"]:Clone()
n0.Parent = player.Character
elseif card3 then
card3:Destroy()
local n0 = SS.AccessCard["[SCP] Site Director"]:Clone()
n0.Parent = player.Character
elseif card4 then
card4:Destroy()
local n0 = SS.AccessCard["[SCP] Card-L5"]:Clone()
n0.Parent = player.Character
elseif card5 then
card5:Destroy()
local n0 = SS.AccessCard["[SCP] Site Director"]:Clone()
n0.Parent = player.Character
elseif card5bis then
card5bis:Destroy()
local n0 = SS.AccessCard["[SCP] Site Director"]:Clone()
n0.Parent = player.Character
elseif cardb then
cardb:Destroy()
local n0 = SS.AccessCard["[SCP] Site Director"]:Clone()
n0.Parent = player.Character
end
wait(12)
humanoid.Torso.CFrame = place
humanoid.Health = humanoid.Health + 20
elseif Mode.Value == 5 then
wait(12)
humanoid.Torso.CFrame = place
humanoid.Health = 0
humanoid.BreakJointsOnDeath = false
end
end)
end)