local model = script.Parent
local trigger = model.trigger
local main = model.main
local activated = false
local TweenService = game:GetService("TweenService")
local tweeninfo = TweenInfo.new(
model.speed.Value,
Enum.EasingStyle.Quart,
Enum.EasingDirection.Out,
0,
true,
0
)
local function open(otherPart)
local player = game.Players:FindFirstChild(otherPart.Parent.Name)
if player and not activated then
activated = true
local tweendoor = TweenService:Create(door, tweeninfo, {Position = model.target.Position})
tweendoor:play()
tweendoor.Completed:Wait()
activated = false
end
end
local function verify()
local function OnTouched(Touched)
local Player1 = game:GetPlayerFromCharacter(Touched.Parent)
if Player1 then
local Tool = Player1.Backpack.tool
Tool.Equipped:Connect(function(open)
end)
end-- Execute the needed.
end
end
trigger.Touched:Connect(verify)
and the tool giver
local tool = game.ServerStorage["Tool"]-- Change this to the name of the item
local giver = script.Parent
local canGive = false
local function GiveTool (player)
if canGive == false then
local clone = tool:Clone()
clone.Parent = player.Backpack
wait(1)
canGive = false
end
end
giver.ClickDetector.MouseClick:Connect(function(player)
GiveTool(player)
end)
and litteraly nothing is WORKEING DDSADSADSDSADSADSAD SAd
