v12 = 0
v13 = 35
MainTab:CreateButton({
Name = "Safe Dupe",
Callback = function()
local currentTime = os.time()
if ((currentTime - v12) < v13) then
Rayfield:Notify({
Title = "Dupe Gun",
Content = "Please wait " .. v13 .. " seconds!",
Duration = 3,
Image = 4483345998,
})
return
end
v12 = currentTime
Rayfield:Notify({
Title = "Dupe Gun",
Content = "Duping...",
Duration = 5,
Image = 4483345998,
})
local replicatedStorage = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
local workspace = game:GetService("Workspace")
local inventory = replicatedStorage:WaitForChild("Inventory")
local backpackRemote = replicatedStorage:WaitForChild("BackpackRemote")
local function getCharacter()
return players.LocalPlayer.Character
end
local function teleportTo(position)
getCharacter().HumanoidRootPart.CFrame = CFrame.new(position.Position.X + 2, position.Position.Y, position.Position.Z)
end
if getCharacter():FindFirstChildOfClass("Tool") then
local step = 0
local toolName
local safe
local originalCFrame
while true do
if step == 4 then
task.wait(0.5)
teleportTo(originalCFrame)
Rayfield:Notify({
Title = "Dupe Gun",
Content = "Gun Duped",
Duration = 5,
Image = 4483345998,
})
break
end
if step == 2 then
task.spawn(function()
backpackRemote:InvokeServer("Store", toolName)
end)
task.spawn(function()
inventory:FireServer("Change", toolName, "Backpack", safe)
end)
task.wait(1.5)
step = 3
end
if step == 3 then
teleportTo(originalCFrame)
task.wait(1)
backpackRemote:InvokeServer("Grab", toolName)
step = 4
end
if step == 0 then
toolName = getCharacter():FindFirstChildOfClass("Tool").Name
getCharacter():FindFirstChildOfClass("Humanoid"):UnequipTools()
safe = workspace["1# Map"]["2 Crosswalks"].Safes:FindFirstChild("Safe")
step = 1
end
if step == 1 then
originalCFrame = getCharacter():FindFirstChild("HumanoidRootPart").CFrame
teleportTo(safe:FindFirstChildWhichIsA("BasePart").CFrame)
task.wait(0.5)
step = 2
end
end
else
Rayfield:Notify({
Title = "Dupe Gun",
Content = "No Tool Found!",
Duration = 5,
Image = 4483345998,
})
end
end
})
To embed this project on your website, copy the following code and paste it into your website's HTML: