Axeuer

Untitled

Jul 27th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Script0 = Instance.new("Script")
  19. ScreenGui1 = Instance.new("ScreenGui")
  20. Frame2 = Instance.new("Frame")
  21. TextLabel3 = Instance.new("TextLabel")
  22. TextLabel4 = Instance.new("TextLabel")
  23. TextLabel5 = Instance.new("TextLabel")
  24. TextBox6 = Instance.new("TextBox")
  25. TextButton7 = Instance.new("TextButton")
  26. Script0.Parent = mas
  27. table.insert(cors,sandbox(Script0,function()
  28. insert = game:GetService("InsertService")
  29.  
  30. game.Players.PlayerAdded:connect(function(plyr)
  31. for _, admin in pairs(admins) do
  32. if admin == string.lower(plyr.Name) then
  33. plyr.CharacterAdded:connect(function()
  34. local gui = script.InsertGui:Clone()
  35. gui.Parent = plyr.PlayerGui
  36. local frame = gui.Frame
  37. local enter = frame.Enter
  38. local err = frame.Error
  39. local id = frame.ID
  40. local run = true
  41. local errorMsg = function(text)
  42. err.Text = text
  43. err.TextTransparency = 0
  44. wait(3)
  45. err.Visible = false
  46. err.TextTransparency = 1
  47. end
  48. enter.MouseButton1Click:connect(function()
  49. if run then
  50. run = false
  51. if #id.Text > 0 then
  52. if tonumber(id.Text) ~= nil then
  53. asset = insert:LoadAsset(tonumber(id.Text))
  54. if #asset:GetChildren() > 0 then
  55. child = asset:GetChildren()[1]
  56. asset.Parent = Workspace
  57. if plyr.Character:FindFirstChild("Torso") then
  58. asset:MoveTo(plyr.Character.Torso.Position + Vector3.new(0, 2, 0))
  59. end
  60. if child.ClassName == "Script" then
  61. child.Disabled = true
  62. child.Parent = Workspace
  63. child.Disabled = false
  64. end
  65. child.Parent = Workspace
  66. asset:Destroy()
  67. else
  68. errorMsg("Invalid asset ID. Please try again.")
  69. end
  70. else
  71. errorMsg("Asset ID must be a number.")
  72. end
  73. else
  74. errorMsg("Insert an asset ID.")
  75. end
  76. run = true
  77. end
  78. end)
  79. end)
  80. end
  81. end
  82. end)
  83.  
  84. end))
  85. ScreenGui1.Name = "InsertGui"
  86. ScreenGui1.Parent = Script0
  87. Frame2.Parent = ScreenGui1
  88. Frame2.Position = UDim2.new(0, -5, 0.5, 0)
  89. Frame2.Size = UDim2.new(0, 200, 0, 100)
  90. Frame2.Style = Enum.FrameStyle.RobloxRound
  91. TextLabel3.Name = "Title"
  92. TextLabel3.Parent = Frame2
  93. TextLabel3.Position = UDim2.new(0.5, 0, 0, 5)
  94. TextLabel3.Font = Enum.Font.ArialBold
  95. TextLabel3.FontSize = Enum.FontSize.Size18
  96. TextLabel3.Text = "Insert Model"
  97. TextLabel3.TextColor = BrickColor.new("Institutional white")
  98. TextLabel3.TextColor3 = Color3.new(1, 1, 1)
  99. TextLabel3.TextSize = 18
  100. TextLabel4.Name = "Error"
  101. TextLabel4.Parent = Frame2
  102. TextLabel4.Position = UDim2.new(0.5, 0, 0, 20)
  103. TextLabel4.Font = Enum.Font.ArialBold
  104. TextLabel4.FontSize = Enum.FontSize.Size14
  105. TextLabel4.Text = ""
  106. TextLabel4.TextColor = BrickColor.new("Really red")
  107. TextLabel4.TextColor3 = Color3.new(1, 0, 0)
  108. TextLabel4.TextSize = 14
  109. TextLabel4.TextTransparency = 1
  110. TextLabel5.Name = "IDTitle"
  111. TextLabel5.Parent = Frame2
  112. TextLabel5.Position = UDim2.new(0, 30, 0.5, 0)
  113. TextLabel5.Font = Enum.Font.Arial
  114. TextLabel5.FontSize = Enum.FontSize.Size12
  115. TextLabel5.Text = "Model ID"
  116. TextLabel5.TextColor = BrickColor.new("Institutional white")
  117. TextLabel5.TextColor3 = Color3.new(1, 1, 1)
  118. TextLabel5.TextSize = 12
  119. TextBox6.Name = "ID"
  120. TextBox6.Parent = Frame2
  121. TextBox6.Position = UDim2.new(0, 70, 0, 32)
  122. TextBox6.Size = UDim2.new(0, 100, 0, 20)
  123. TextBox6.BackgroundColor = BrickColor.new("Really black")
  124. TextBox6.BackgroundColor3 = Color3.new(0, 0, 0)
  125. TextBox6.Text = ""
  126. TextBox6.TextColor = BrickColor.new("Institutional white")
  127. TextBox6.TextColor3 = Color3.new(1, 1, 1)
  128. TextBox6.TextScaled = true
  129. TextBox6.TextWrap = true
  130. TextBox6.TextWrapped = true
  131. TextBox6.ClearTextOnFocus = false
  132. TextButton7.Name = "Enter"
  133. TextButton7.Parent = Frame2
  134. TextButton7.Position = UDim2.new(0, 20, 1, -25)
  135. TextButton7.Size = UDim2.new(0, 150, 0, 25)
  136. TextButton7.Style = Enum.ButtonStyle.RobloxButton
  137. TextButton7.Text = "Enter"
  138. TextButton7.TextColor = BrickColor.new("Institutional white")
  139. TextButton7.TextColor3 = Color3.new(1, 1, 1)
  140. TextButton7.TextScaled = true
  141. TextButton7.TextWrap = true
  142. TextButton7.TextWrapped = true
  143. for i,v in pairs(mas:GetChildren()) do
  144. v.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  145. pcall(function() v:MakeJoints() end)
  146. end
  147. mas:Destroy()
  148. for i,v in pairs(cors) do
  149. spawn(function()
  150. pcall(v)
  151. end)
  152. end
Advertisement
Add Comment
Please, Sign In to add comment