Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This is made for Void Script Builder! The creator is GAM3RBOY2008!
- local model = Instance.new("Model", workspace)
- local base = Instance.new("Part", model)
- local side = Instance.new("Part", model)
- local top = Instance.new("Part", model)
- local light = Instance.new("Part", model)
- local pointlight = Instance.new("PointLight", light)
- local screen = Instance.new("Part", model)
- local gui = Instance.new("SurfaceGui", screen)
- local hole = Instance.new("Part", model)
- model.Name = "CoffeeVendingMachine"
- base.Anchored = true
- base.Name = "Base"
- base.Size = Vector3.new(4.5,8.37,2.25)
- base.Position = base.Position + Vector3.new(0,4,0)
- base.BrickColor = BrickColor.new("Reddish brown")
- base.Material = "WoodPlanks"
- base.CastShadow = false
- side.Name = "Left"
- side.Anchored = true
- side.CanCollide = false
- side.Size = Vector3.new(0.625, 8.375, 4.5)
- side.Position = base.Position + Vector3.new(2.5,0,0)
- side.BrickColor = BrickColor.new("Lily white")
- local right = side:Clone()
- right.Name = "Right"
- right.Parent = model
- right.Position = base.Position - Vector3.new(2.5,0,0)
- top.Name = "Top"
- top.Anchored = true
- top.Size = Vector3.new(5.65, 0.625, 4.5)
- top.Position = base.Position + Vector3.new(0,4.5,0)
- top.BrickColor = BrickColor.new("Lily white")
- top.TopSurface = "Smooth"
- top.BottomSurface = "Smooth"
- top.CastShadow = false
- light.Name = "Light"
- light.Anchored = true
- light.Size = Vector3.new(4, 0.5, 1.5)
- light.Position = top.Position + Vector3.new(0,-.1,-1.25)
- light.Material = "Neon"
- pointlight.Brightness = 1.5
- pointlight.Range = 13
- hole.Name = "Hole"
- hole.Anchored = true
- hole.Size = Vector3.new(1.39, 1.77, 0.05)
- hole.Position = screen.Position - Vector3.new(-1,-2,1.25)
- hole.Transparency = 1
- local holedecal = Instance.new("Decal", hole)
- holedecal.Name = "Hole Decal"
- holedecal.Texture = "rbxassetid://226014391"
- holedecal.Face = "Front"
- local sidedecalpart = right:Clone()
- sidedecalpart.Name = "Side Decal / Text"
- sidedecalpart.Parent = model
- sidedecalpart.Size = Vector3.new(0.625, 7.345, 3.25)
- sidedecalpart.Position = right.Position + Vector3.new(-0.11,-0.515,-0.065)
- sidedecalpart.Transparency = 1
- sidedecalpart.CanCollide = false
- local sidedecal = Instance.new("Decal", sidedecalpart)
- sidedecal.Face = "Left"
- sidedecal.Texture = "http://www.roblox.com/asset/?id=3668600312"
- local sidetext = Instance.new("SurfaceGui", sidedecalpart)
- sidetext.Face = "Left"
- local sidetextlabel = Instance.new("TextLabel", sidetext)
- sidetextlabel.Font = "Arcade"
- sidetextlabel.Text = "Coffee Machine Script by GAM3RBOY2008"
- sidetextlabel.TextScaled = true
- sidetextlabel.Size = UDim2.new(0,800,0,200)
- sidetextlabel.BackgroundTransparency = 1
- sidetextlabel.BorderSizePixel = 0
- screen.Name = "Screen"
- screen.Anchored = true
- screen.Transparency = 1
- screen.CastShadow = false
- screen.Size = Vector3.new(3.5, 3, 1.5)
- screen.Position = base.Position - Vector3.new(0,-1.7,0.5)
- local backlight = Instance.new("Frame", gui)
- backlight.Size = UDim2.new(0, 800,0, 600)
- gui.Name = "Screen-Gui"
- gui.LightInfluence = 25
- local clicktostart = Instance.new("TextButton", backlight)
- clicktostart.Font = "SourceSans"
- clicktostart.Size = UDim2.new(0, 800,0, 600)
- clicktostart.BackgroundTransparency = 1
- clicktostart.Text = "Click To Start!"
- clicktostart.TextScaled = true
- clicktostart.TextColor3 = Color3.new(0,0,0)
- local coffeetype_Cappuccino = Instance.new("TextButton", backlight)
- coffeetype_Cappuccino.Font = "SourceSans"
- coffeetype_Cappuccino.TextColor3 = Color3.new(0,0,0)
- coffeetype_Cappuccino.Name = "TypeCappuccino"
- coffeetype_Cappuccino.Size = UDim2.new(0,400,0,600)
- coffeetype_Cappuccino.BorderSizePixel = 0
- coffeetype_Cappuccino.TextScaled = true
- coffeetype_Cappuccino.Text = "Cappuccino"
- coffeetype_Cappuccino.Visible = false
- local coffeetype_Black = coffeetype_Cappuccino:Clone()
- coffeetype_Black.Font = "SourceSans"
- coffeetype_Black.Parent = backlight
- coffeetype_Black.Text = "Black Coffee"
- coffeetype_Black.Position = UDim2.new(0,400,0,0)
- coffeetype_Black.Visible = false
- local coffeetype_label = Instance.new("TextLabel", backlight)
- coffeetype_label.Font = "SourceSans"
- coffeetype_label.Name = "LabelType"
- coffeetype_label.TextColor3 = Color3.new(0,0,0)
- coffeetype_label.Size = UDim2.new(0,800,0,100)
- coffeetype_label.BorderSizePixel = 0
- coffeetype_label.TextScaled = true
- coffeetype_label.Text = "Choose a Coffee Type"
- coffeetype_label.Visible = false
- local coffee_load = Instance.new("ImageLabel", backlight)
- coffee_load.Size = UDim2.new(0,400,0,800)
- coffee_load.Name = "Brewing"
- coffee_load.Image = "http://www.roblox.com/asset/?id=3668600312"
- coffee_load.BackgroundTransparency = 1
- coffee_load.Position = UDim2.new(0,200,0,-125)
- coffee_load.Visible = false
- local coffee_load_label = Instance.new("TextLabel",backlight)
- coffee_load_label.Font = "SourceSans"
- coffee_load_label.Name = "BrewingLabel"
- coffee_load_label.Size = UDim2.new(0,800,0,100)
- coffee_load_label.TextScaled = true
- coffee_load_label.TextColor3 = Color3.new(0,0,0)
- coffee_load_label.BorderSizePixel = 0
- coffee_load_label.BackgroundTransparency = 1
- coffee_load_label.Text = "Brewing your coffee..."
- coffee_load_label.Visible = false
- local enjoy_label = Instance.new("TextLabel", backlight)
- enjoy_label.Font = "SourceSans"
- enjoy_label.Name = "EnjoyLabel"
- enjoy_label.Size = UDim2.new(0, 800,0, 600)
- enjoy_label.BackgroundTransparency = 1
- enjoy_label.Text = "Enjoy your coffee!"
- enjoy_label.TextScaled = true
- enjoy_label.TextColor3 = Color3.new(0,0,0)
- enjoy_label.Visible = false
- -- SCRIPTING!!!
- clicktostart.MouseButton1Click:Connect(function()
- clicktostart.Visible = false
- coffeetype_label.Visible = true
- coffeetype_Cappuccino.Visible = true
- coffeetype_Black.Visible = true
- end)
- coffeetype_Cappuccino.MouseButton1Click:Connect(function()
- coffeetype_Cappuccino.Visible = false
- coffeetype_Black.Visible = false
- coffeetype_label.Visible = false
- coffee_load.Visible = true
- coffee_load_label.Visible = true
- for i = 1,100 do
- coffee_load.Rotation = coffee_load.Rotation + 5
- wait(0.01)
- end
- MakeCap()
- coffee_load.Rotation = 0
- coffee_load.Visible = false
- coffee_load_label.Visible = false
- enjoy_label.Visible = true
- wait(3)
- enjoy_label.Visible = false
- clicktostart.Visible = true
- end)
- coffeetype_Black.MouseButton1Click:Connect(function()
- coffeetype_Cappuccino.Visible = false
- coffeetype_Black.Visible = false
- coffeetype_label.Visible = false
- coffee_load.Visible = true
- coffee_load_label.Visible = true
- for i = 1,100 do
- coffee_load.Rotation = coffee_load.Rotation + 5
- wait(0.01)
- end
- MakeBlack()
- coffee_load.Rotation = 0
- coffee_load.Visible = false
- coffee_load_label.Visible = false
- enjoy_label.Visible = true
- wait(3)
- enjoy_label.Visible = false
- clicktostart.Visible = true
- end)
- function MakeBlack()
- local tool = Instance.new("Tool", workspace)
- local handle = Instance.new("Part", tool)
- local mesh = Instance.new("SpecialMesh", handle)
- local coffee
- local cmesh
- local weld
- local cdecal
- local enabled = true
- tool.Name = "Cup Of Black Coffee"
- tool.ToolTip = "mmm.. Tasty!"
- local torso = findTorso(base.Position)
- if torso ~= nil then
- handle.CFrame = torso.CFrame
- end
- handle.Name = "Handle"
- handle.BrickColor = BrickColor.new("Institutional white")
- mesh.Name = "m"
- mesh.MeshType = "FileMesh"
- mesh.MeshId="http://www.roblox.com/asset/?id=32023686"
- mesh.Scale = Vector3.new(1.325, 1.325, 1.325)
- coffee = handle:Clone()
- coffee.Name = "Brown"
- coffee.Parent = handle
- cdecal = Instance.new("Decal", coffee)
- cdecal.Texture = "rbxassetid://38053293"
- cdecal.Face = "Top"
- weld = Instance.new("Weld",coffee)
- weld.Part0 = handle
- weld.Part1 = coffee
- coffee.CanCollide = false
- coffee.Size = Vector3.new(0.883, 0.353, 1.767)
- coffee.m:Destroy()
- cmesh = Instance.new("CylinderMesh", coffee)
- cmesh.Offset = Vector3.new(-0.15,-0,0)
- cmesh.Scale = Vector3.new(0.7, 1.75, 0.65)
- handle.Touched:Connect(function(hit)
- if enabled == false then return end
- if hit.Parent:FindFirstChild("Humanoid") then
- tool.Parent = game.Players:FindFirstChild(hit.Parent.Name).Backpack
- end
- end)
- end
- function MakeCap()
- local tool = Instance.new("Tool", workspace)
- local handle = Instance.new("Part", tool)
- local mesh = Instance.new("SpecialMesh", handle)
- local coffee
- local cmesh
- local weld
- local cdecal
- local enabled = true
- tool.Name = "Cup Of Cappuccino"
- tool.ToolTip = "mmm.. Tasty!"
- local torso = findTorso(base.Position)
- if torso ~= nil then
- handle.CFrame = torso.CFrame
- end
- handle.Name = "Handle"
- handle.BrickColor = BrickColor.new("Institutional white")
- mesh.Name = "m"
- mesh.MeshType = "FileMesh"
- mesh.MeshId="http://www.roblox.com/asset/?id=32023686"
- mesh.Scale = Vector3.new(1.325, 1.325, 1.325)
- coffee = handle:Clone()
- coffee.Name = "Brown"
- coffee.Parent = handle
- cdecal = Instance.new("Decal", coffee)
- cdecal.Texture = "rbxassetid://322384913"
- cdecal.Face = "Top"
- weld = Instance.new("Weld",coffee)
- weld.Part0 = handle
- weld.Part1 = coffee
- coffee.CanCollide = false
- coffee.Size = Vector3.new(0.883, 0.353, 1.767)
- coffee.m:Destroy()
- cmesh = Instance.new("CylinderMesh", coffee)
- cmesh.Offset = Vector3.new(-0.15,-0,0)
- cmesh.Scale = Vector3.new(0.7, 1.75, 0.65)
- handle.Touched:Connect(function(hit)
- if enabled == false then return end
- if hit.Parent:FindFirstChild("Humanoid") then
- tool.Parent = game.Players:FindFirstChild(hit.Parent.Name).Backpack
- end
- end)
- end
- function findTorso(pos)
- local torso = nil
- local dist = 75
- local child = workspace:children()
- for i=1, #child do
- if child[i].className == "Model" then
- local h = child[i]:findFirstChild("Humanoid")
- if h ~= nil then
- local check = child[i]:findFirstChild("Torso")
- if check ~= nil then
- if (check.Position - pos).magnitude < dist then
- torso = check
- dist = (check.Position - pos).magnitude
- end
- end
- end
- end
- end
- return torso
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement