Help me turn my [Teleporter script] server sided

So this is inside of the client.lua and it works fine. My problem is that everybody can use it, so to solve this problem i need to turn it server sided. Can someone help me out with this because im really new to fivem scripting.

RegisterCommand("pd", function()
    local ped = PlayerPedId()
    local currentPos = GetEntityCoords(ped)

    SetEntityCoords(ped, 436.491, -982.172, 30.699, false, false, false, false)
    
    BeginTextCommandThefeedPost("STRING")
    AddTextComponentSubstringPlayerName("~b~TELEPORTIERT~b~ " .. "zum " .. "~r~PD~r~")
    EndTextCommandThefeedPostTicker(true, true)
    

end, true)

Sry for my english

changing it to server side wont make it so everyone can use it. You have to setup some kind of permission system, ace perms seems to be the most common ACE Permissions - #7 by Vespura