Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local function get_player(name: string): Player | nil
- name = name:lower()
- for _, player in ipairs(Players:GetPlayers()) do
- if name == player.Name:lower():sub(1, #name) then
- return player
- end
- end
- return nil
- end
- local plr = (get_player(plyoeyy)
- local pmds = game.Workspace.PlayerModels
- local PlaceR = game.ReplicatedStorage.Interaction.DestroyStructure
- for i, v in pairs(pmds:GetChildren()) do
- if v:FindFirstChild("Owner") and v.Owner.Value ~= nil and v.Owner.Value == game.Players[plr] and v:FindFirstChild("ItemName") and v:FindFirstChild("Type") and (v.PrimaryPart ~= nil or v:FindFirstChild("MainCFrame")) then
- PlaceR:FireServer(v)
- end
- end
Add Comment
Please, Sign In to add comment