# data[].attributes.body
Bu cello udah

# data[].attributes.body
Bu aku udah bu

# data[].attributes.body
local item = script.Parent

local prompt= item.ProximityPrompt

function TakeItem(Player)

# data[].attributes.body
bisa ambil tool nya

# data[].attributes.body
local TweenService = game:GetService("TweenService")

local prompt = script.Parent

local door = script.Parent.Parent.Parent -- The actual door part

local open = false

-- Setup Tween Info

local tweenInfo = TweenInfo.new(

4, -- Time to move (seconds)

Enum.EasingStyle.Quad,

Enum.EasingDirection.Out

)

local closedPosition = door.Position

local openPosition = door.Position + Vector3.new(0, 50, 0) -- Move UP 50 studs (adjust as you want)

local requiredKeys = 8 -- Number of keys needed to open the door

local function onPromptTriggered(player)

local leaderstats = player:FindFirstChild("leaderstats")

local keys = leaderstats and leaderstats:FindFirstChild("Keys")

if keys and keys.Value >= requiredKeys then

if open == false then

-- Open door (move up)

local goal = {Position = openPosition}

local tween = TweenService:Create(door, tweenInfo, goal)

tween:Play()

prompt.ActionText = "Close door"

open = true

else

-- Close door (move down)

local goal = {Position = closedPosition}

local tween = TweenService:Create(door, tweenInfo, goal)

tween:Play()

prompt.ActionText = "Open door"

open = false

end

else

warn(player.Name .. " does not have enough keys to open the door.")

end

end

prompt.Triggered:Connect(onPromptTriggered)

# data[].attributes.body
fantastic (padlet told me to write this)