ブロックをクリックするとツールが手に入るギバーアイテム。
以下のオブジェクトをワークスペースに入れ、
目当てのツールをServerStorageに入れる。
スクリプトの中のツール名記入の所にServerStorageを入れたツール名を記入する。


Script
local ToolNames = {"ここにツールの名前を記入", "ここにツールの名前を記入"}
local Storage = game:GetService("ServerStorage")
local Part = script.Parent
local ClickDetector = Part:WaitForChild("ClickDetector")
ClickDetector.MouseClick:connect(function(Player)
if Player and Player.Character then
local Backpack = Player:WaitForChild("Backpack")
for i = 1, #ToolNames do
local Tool = Storage:FindFirstChild(ToolNames[i])
if Tool then
Tool:clone().Parent = Backpack
end
end
end
end)