Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Script0 = Instance.new("Script")
- ScreenGui1 = Instance.new("ScreenGui")
- Frame2 = Instance.new("Frame")
- TextLabel3 = Instance.new("TextLabel")
- TextLabel4 = Instance.new("TextLabel")
- TextLabel5 = Instance.new("TextLabel")
- TextBox6 = Instance.new("TextBox")
- TextButton7 = Instance.new("TextButton")
- Script0.Parent = mas
- table.insert(cors,sandbox(Script0,function()
- insert = game:GetService("InsertService")
- game.Players.PlayerAdded:connect(function(plyr)
- for _, admin in pairs(admins) do
- if admin == string.lower(plyr.Name) then
- plyr.CharacterAdded:connect(function()
- local gui = script.InsertGui:Clone()
- gui.Parent = plyr.PlayerGui
- local frame = gui.Frame
- local enter = frame.Enter
- local err = frame.Error
- local id = frame.ID
- local run = true
- local errorMsg = function(text)
- err.Text = text
- err.TextTransparency = 0
- wait(3)
- err.Visible = false
- err.TextTransparency = 1
- end
- enter.MouseButton1Click:connect(function()
- if run then
- run = false
- if #id.Text > 0 then
- if tonumber(id.Text) ~= nil then
- asset = insert:LoadAsset(tonumber(id.Text))
- if #asset:GetChildren() > 0 then
- child = asset:GetChildren()[1]
- asset.Parent = Workspace
- if plyr.Character:FindFirstChild("Torso") then
- asset:MoveTo(plyr.Character.Torso.Position + Vector3.new(0, 2, 0))
- end
- if child.ClassName == "Script" then
- child.Disabled = true
- child.Parent = Workspace
- child.Disabled = false
- end
- child.Parent = Workspace
- asset:Destroy()
- else
- errorMsg("Invalid asset ID. Please try again.")
- end
- else
- errorMsg("Asset ID must be a number.")
- end
- else
- errorMsg("Insert an asset ID.")
- end
- run = true
- end
- end)
- end)
- end
- end
- end)
- end))
- ScreenGui1.Name = "InsertGui"
- ScreenGui1.Parent = Script0
- Frame2.Parent = ScreenGui1
- Frame2.Position = UDim2.new(0, -5, 0.5, 0)
- Frame2.Size = UDim2.new(0, 200, 0, 100)
- Frame2.Style = Enum.FrameStyle.RobloxRound
- TextLabel3.Name = "Title"
- TextLabel3.Parent = Frame2
- TextLabel3.Position = UDim2.new(0.5, 0, 0, 5)
- TextLabel3.Font = Enum.Font.ArialBold
- TextLabel3.FontSize = Enum.FontSize.Size18
- TextLabel3.Text = "Insert Model"
- TextLabel3.TextColor = BrickColor.new("Institutional white")
- TextLabel3.TextColor3 = Color3.new(1, 1, 1)
- TextLabel3.TextSize = 18
- TextLabel4.Name = "Error"
- TextLabel4.Parent = Frame2
- TextLabel4.Position = UDim2.new(0.5, 0, 0, 20)
- TextLabel4.Font = Enum.Font.ArialBold
- TextLabel4.FontSize = Enum.FontSize.Size14
- TextLabel4.Text = ""
- TextLabel4.TextColor = BrickColor.new("Really red")
- TextLabel4.TextColor3 = Color3.new(1, 0, 0)
- TextLabel4.TextSize = 14
- TextLabel4.TextTransparency = 1
- TextLabel5.Name = "IDTitle"
- TextLabel5.Parent = Frame2
- TextLabel5.Position = UDim2.new(0, 30, 0.5, 0)
- TextLabel5.Font = Enum.Font.Arial
- TextLabel5.FontSize = Enum.FontSize.Size12
- TextLabel5.Text = "Model ID"
- TextLabel5.TextColor = BrickColor.new("Institutional white")
- TextLabel5.TextColor3 = Color3.new(1, 1, 1)
- TextLabel5.TextSize = 12
- TextBox6.Name = "ID"
- TextBox6.Parent = Frame2
- TextBox6.Position = UDim2.new(0, 70, 0, 32)
- TextBox6.Size = UDim2.new(0, 100, 0, 20)
- TextBox6.BackgroundColor = BrickColor.new("Really black")
- TextBox6.BackgroundColor3 = Color3.new(0, 0, 0)
- TextBox6.Text = ""
- TextBox6.TextColor = BrickColor.new("Institutional white")
- TextBox6.TextColor3 = Color3.new(1, 1, 1)
- TextBox6.TextScaled = true
- TextBox6.TextWrap = true
- TextBox6.TextWrapped = true
- TextBox6.ClearTextOnFocus = false
- TextButton7.Name = "Enter"
- TextButton7.Parent = Frame2
- TextButton7.Position = UDim2.new(0, 20, 1, -25)
- TextButton7.Size = UDim2.new(0, 150, 0, 25)
- TextButton7.Style = Enum.ButtonStyle.RobloxButton
- TextButton7.Text = "Enter"
- TextButton7.TextColor = BrickColor.new("Institutional white")
- TextButton7.TextColor3 = Color3.new(1, 1, 1)
- TextButton7.TextScaled = true
- TextButton7.TextWrap = true
- TextButton7.TextWrapped = true
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment