meatswordEvent.OnServerEvent:Connect(function(plr)
plr.Character.Humanoid:UnequipTools()
RemoveCurrentTool(plr)
wait(0.1)
local meatsword = game.ReplicatedStorage.WEAPONS.Meatsword
meatsword:Clone().Parent = plr.Backpack
end)
axeEvent.OnServerEvent:Connect(function(plr)
plr.Character.Humanoid:UnequipTools()
RemoveCurrentTool(plr)
wait(0.1)
local axe = game.ReplicatedStorage.WEAPONS.Axe
axe:Clone().Parent = plr.Backpack
end)
voltEvent.OnServerEvent:Connect(function(plr)
plr.Character.Humanoid:UnequipTools()
RemoveCurrentTool(plr)
wait(0.1)
local volt = game.ReplicatedStorage.WEAPONS.Voltsword
volt:Clone().Parent = plr.Backpack
end)
function RemoveCurrentTool(plr)
local character = plr.Character
for _, tool in pairs(plr.Backpack:GetChildren()) do
if tool:IsA("Tool") then
tool:Destroy()
end
end
if character then
for _, tool in pairs(character:GetChildren()) do
if tool:IsA("Tool") then
tool:Destroy()
end
end
end
end
#This script lags my game for 1 sec
1 messages · Page 1 of 1 (latest)