Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local SpawnGui = Instance.new("ScreenGui")
- local ItemName = Instance.new("TextBox")
- local TextButton = Instance.new("TextButton")
- local Count = Instance.new("TextBox")
- local TextButton_2 = Instance.new("TextButton")
- local Hide = Instance.new("TextButton")
- local Show = Instance.new("TextButton")
- local SpawnButton = Instance.new("TextButton")
- -- Properties
- Hide.Name = "Hide"
- Hide.Parent = SpawnGui
- Hide.BackgroundColor3 = Color3.new(1, 1, 1)
- Hide.Position = UDim2.new(0, 0, 0, 264)
- Hide.Size = UDim2.new(0, 50, 0, 35)
- Hide.Font = Enum.Font.SciFi
- Hide.FontSize = Enum.FontSize.Size10
- Hide.Text = "Hide <"
- Show.Name = "Show"
- Show.Parent = SpawnGui
- Show.BackgroundColor3 = Color3.new(1, 1, 1)
- Show.Position = UDim2.new(0, 0, 0, 264)
- Show.Size = UDim2.new(0, 50, 0, 35)
- Show.Visible = false
- Show.Font = Enum.Font.SciFi
- Show.FontSize = Enum.FontSize.Size10
- Show.Text = "Show >"
- SpawnGui.Name = "SpawnGui"
- SpawnGui.Parent = game.CoreGui
- ItemName.Name = "ItemName"
- ItemName.Parent = SpawnGui
- ItemName.BackgroundColor3 = Color3.new(0.529412, 0.529412, 0.529412)
- ItemName.Position = UDim2.new(0, 0, 0, 300)
- ItemName.Size = UDim2.new(0, 200, 0, 50)
- ItemName.Font = Enum.Font.SciFi
- ItemName.FontSize = Enum.FontSize.Size14
- ItemName.Text = "Item"
- TextButton.Parent = ItemName
- TextButton.BackgroundColor3 = Color3.new(1, 0, 0.0156863)
- TextButton.Position = UDim2.new(0, 200, 0, 0)
- TextButton.Size = UDim2.new(0, 50, 0, 50)
- TextButton.Font = Enum.Font.SciFi
- TextButton.FontSize = Enum.FontSize.Size10
- TextButton.Text = "Item OK!"
- Count.Name = "Count"
- Count.Parent = SpawnGui
- Count.BackgroundColor3 = Color3.new(0.529412, 0.529412, 0.529412)
- Count.Position = UDim2.new(0, 0, 0, 350)
- Count.Size = UDim2.new(0, 200, 0, 50)
- Count.Font = Enum.Font.SciFi
- Count.FontSize = Enum.FontSize.Size14
- Count.Text = "Stack in item"
- TextButton_2.Parent = Count
- TextButton_2.BackgroundColor3 = Color3.new(1, 0, 0.0156863)
- TextButton_2.Position = UDim2.new(0, 200, 0, 0)
- TextButton_2.Size = UDim2.new(0, 50, 0, 50)
- TextButton_2.Font = Enum.Font.SciFi
- TextButton_2.FontSize = Enum.FontSize.Size10
- TextButton_2.Text = "Stack OK!"
- SpawnButton.Name = "SpawnButton"
- SpawnButton.Parent = SpawnGui
- SpawnButton.BackgroundColor3 = Color3.new(1, 0.666667, 0)
- SpawnButton.Position = UDim2.new(0, 0, 0, 451)
- SpawnButton.Size = UDim2.new(0, 250, 0, 40)
- SpawnButton.Font = Enum.Font.SciFi
- SpawnButton.FontSize = Enum.FontSize.Size10
- SpawnButton.Text = "Spawn!"
- SpawnButton.TextColor3 = Color3.new(0, 0, 0)
- lightup = function(button)
- coroutine.resume(coroutine.create(function()
- local origincolor = button.BackgroundColor3
- button.BackgroundColor3 = Color3.new(0, 1, 0)
- wait(0.1)
- button.BackgroundColor3 = origincolor
- end))
- end
- function changename()
- lightup(TextButton)
- nameofitem = ItemName.Text
- end
- TextButton.MouseButton1Down:connect(changename)
- function changeamount()
- lightup(TextButton_2)
- Amount = tonumber(Count.Text)
- end
- TextButton_2.MouseButton1Down:connect(changeamount)
- HideGui = function()
- lightup(Hide)
- for _, v in pairs (SpawnGui:GetChildren()) do
- v.Visible = false
- end
- game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 100
- Show.Visible = true
- end
- Hide.MouseButton1Down:connect(HideGui)
- ShowGui = function()
- lightup(Show)
- for _, v in pairs (SpawnGui:GetChildren()) do
- v.Visible = true
- end
- Show.Visible = false
- end
- Show.MouseButton1Down:connect(ShowGui)
- local player = game.Players.LocalPlayer
- local user = player.Character;
- local cam = workspace.CurrentCamera;
- function spawnitem()
- lightup(SpawnButton)
- if Amount and nameofitem then
- for i = 1, Amount do
- local player = game.Players.LocalPlayer
- local user = player.Character;
- local cam = workspace.CurrentCamera;
- local hit, position =
- workspace:FindPartOnRayWithIgnoreList(Ray.new((user.Torso.CFrame*CFrame.new(0,
- 0, -5)).p, Vector3.new(0, -60, 0)), {cam, workspace.Terrain});
- local area = CFrame.new(position+Vector3.new(0, 3, 0))*CFrame.Angles(0, math.rad(math.random(0, 359)), 0);
- local origin = game.Players.LocalPlayer.Character.Torso.CFrame;
- local cframe = area*origin:toObjectSpace(game.Players.LocalPlayer.Character.Torso.CFrame);
- game.Workspace.resources.events.createItemInWorld:FireServer(10, tostring(nameofitem), cframe)
- end
- end
- end
- SpawnButton.MouseButton1Down:connect(spawnitem)
Add Comment
Please, Sign In to add comment