
Key RequiredUniversal

-- FE Model Inserter UI (Client + Server Remote)
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
-- Create GUI
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ModelInserterUI"
screenGui.ResetOnSpawn = true
screenGui.Parent = playerGui
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 400, 0, 200)
frame.Position = UDim2.new(0.5, -200, 0.5, -100)
frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
frame.BorderSizePixel = 0
frame.Active = true
frame.Draggable = true -- Basic drag (or use full drag script below)
frame.Parent = screenGui
local uiCorner = Instance.new("UICorner")
uiCorner.CornerRadius = UDim.new(0, 8)
uiCorner.Parent = frame
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, 0, 0, 30)
title.BackgroundTransparency = 1
title.Text = "FE Model Inserter"
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.TextScaled = true
title.Font = Enum.Font.GothamBold
title.Parent = frame
local textBox = Instance.new("TextBox")
textBox.Size = UDim2.new(0.9, 0, 0, 40)
textBox.Position = UDim2.new(0.05, 0, 0.3, 0)
textBox.PlaceholderText = "Enter Model Asset ID here"
textBox.Text = ""
textBox.TextColor3 = Color3.fromRGB(255, 255, 255)
textBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
textBox.Font = Enum.Font.SourceSans
textBox.TextSize = 18
textBox.Parent = frame
local uiCorner2 = Instance.new("UICorner")
uiCorner2.CornerRadius = UDim.new(0, 6)
uiCorner2.Parent = textBox
local insertButton = true Instance.new("TextButton")
insertButton.Size = true UDim2.new(0.4, 0, 0, 40)
insertButton.Position = true UDim2.new(0.05, 0, 0.65, 0)
insertButton.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
insertButton.Text = "Insert Model"
insertButton.TextColor3 = Color3.fromRGB(255, 255, 255)
insertButton.TextScaled = true
insertButton.Font = Enum.Font.GothamBold
insertButton.Parent = frame
local uiCorner3 = Instance.new("UICorner")
uiCorner3.CornerRadius = UDim.new(0, 6)
uiCorner3.Parent = insertButton
local closeButton = Instance.new("TextButton")
closeButton.Size = UDim2.new(0, 30, 0, 30)
closeButton.Position = UDim2.new(1, -35, 0, 5)
closeButton.BackgroundColor3 = Color3.fromRGB(255, 60, 60)
closeButton.Text = "X"
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
closeButton.TextScaled = true
closeButton.Font = Enum.Font.GothamBold
closeButton.Parent = frame
local statusLabel = Instance.new("TextLabel")
statusLabel.Size = UDim2.new(0.9, 0, 0, 20)
statusLabel.Position = UDim2.new(0.05, 0, 0.85, 0)
statusLabel.BackgroundTransparency = 1
statusLabel.Text = "Status: Ready"
statusLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
statusLabel.TextScaled = true
statusLabel.Font = Enum.Font.SourceSans
statusLabel.Parent = frame
-- RemoteEvent for server insertion (FE safe)
local remote = Instance.new("RemoteEvent")
remote.Name = "ModelInsertRemote"
remote.Parent = game.ReplicatedStorage -- or script.Parent if preferred
-- Insert logic (fires to server)
insertButton.MouseButton1Click:Connect(function()
local id = tonumber(textBox.Text)
if id then
statusLabel.Text = "Inserting ID: " .. id
statusLabel.TextColor3 = Color3.fromRGB(255, 255, 0)
remote:FireServer(id)
else
statusLabel.Text = "Invalid ID!"
statusLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
end
end)
closeButton.MouseButton1Click:Connect(function()
screenGui:Destroy()
end)
-- Server-side handler (run this separately in a Server Script or via executor if possible)
-- Place this in ServerScriptService or execute serverside:
--[[
game.ReplicatedStorage.ModelInsertRemote.OnServerEvent:Connect(function(player, assetId)
local success, model = pcall(function()
return game:GetService("InsertService"):LoadAsset(assetId)
end)
if success and model then
local mainModel = model:GetChildren()[1] or model
mainModel.Parent = workspace
mainModel.Name = "InsertedModel_" .. assetId
model:Destroy()
print(player.Name .. " inserted model " .. assetId)
else
warn("Failed to load asset: " .. assetId)
end
end)
]]
-- Optional: Enhanced drag functionality
local UIS = game:GetService("UserInputService")
local dragging, dragInput, dragStart, startPos
frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = frame.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end)
frame.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
UIS.InputChanged:Connect(function(input)
if input == dragInput and dragging then
local delta = input.Position - dragStart
frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
rs = game:GetService("ReplicatedStorage")
while wait(0.1) do
local clone = rs:FindFirstChild("Duck"):Clone()
clone.Parent = game.Workspace
end)



doesnt work