Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Part0 = Instance.new("Part")
- local SurfaceGui1 = Instance.new("SurfaceGui")
- local TextLabel2 = Instance.new("TextLabel")
- Part0.Name = "Score"
- Part0.Parent = script
- Part0.CFrame = CFrame.new(0, 0, 91.226, 0, 0, -1, -1, 0, 0, 0, 1, 0)
- Part0.Orientation = Vector3.new(0, -90, -90)
- Part0.Position = Vector3.new(0, 0, 91.226)
- Part0.Rotation = Vector3.new(90, -90, 0)
- Part0.Transparency = 2
- Part0.Size = Vector3.new(1.68533111, 16.1999741, 96.569458)
- Part0.Anchored = true
- Part0.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- Part0.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part0.CanCollide = false
- Part0.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part0.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part0.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part0.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part0.FormFactor = Enum.FormFactor.Custom
- Part0.formFactor = Enum.FormFactor.Custom
- SurfaceGui1.Parent = Part0
- SurfaceGui1.Face = Enum.NormalId.Left
- SurfaceGui1.CanvasSize = Vector2.new(400, 60)
- TextLabel2.Parent = SurfaceGui1
- TextLabel2.Size = UDim2.new(1, 0, 1, 0)
- TextLabel2.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel2.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel2.BackgroundTransparency = 1
- TextLabel2.BorderSizePixel = 0
- TextLabel2.Font = Enum.Font.SourceSansBold
- TextLabel2.FontSize = Enum.FontSize.Size36
- TextLabel2.Text = "" --"Corner Hits : 0"
- TextLabel2.TextColor = BrickColor.new("Institutional white")
- TextLabel2.TextColor3 = Color3.new(1, 1, 1)
- TextLabel2.TextScaled = true
- TextLabel2.TextSize = 36
- TextLabel2.TextStrokeTransparency = 0
- TextLabel2.TextWrap = true
- TextLabel2.TextWrapped = true
- amount = 1
- local X = 1
- local Z = 1
- local speed = 1
- local hits = 0
- if math.random(1,2) == 1 then
- X = -1
- end
- if math.random(1,2) == 1 then
- Z = -1
- end
- local A = Instance.new("Part",script)
- A.Anchored = true
- A.Size = Vector3.new(320,1,200) --(350,1,220)
- A.BrickColor = BrickColor.new("Really black")
- A.Material = Enum.Material.Neon
- local P = Instance.new("Part",script)
- P.Anchored = true
- P.Size = Vector3.new(40,1,20)
- P.Position = Vector3.new(math.random(-135,135),0.25,math.random(-80,80))
- P.Transparency = 1
- local D = Instance.new("Decal",P)
- D.Face = Enum.NormalId.Top
- D.Texture = "rbxassetid://2642637131"
- local Last = 1
- function Change()
- local Choice = math.random(1,4)
- local No = false
- if Choice == Last then
- No = true
- end
- if Choice == 1 then
- P.BrickColor = BrickColor.new("Really red")
- Last = 1
- elseif Choice == 2 then
- P.BrickColor = BrickColor.new("Really blue")
- Last = 2
- elseif Choice == 3 then
- P.BrickColor = BrickColor.new("Lime green")
- Last = 3
- else
- P.BrickColor = BrickColor.new("White")
- Last = 4
- end
- if No then
- Change()
- end
- D.Color3 = P.Color
- end
- spawn(function()
- while true do
- wait()
- P.Position = P.Position + Vector3.new(X * speed,0,Z * speed)
- local x = false
- local z = false
- if P.Position.X > A.Size.X/2-P.Size.X/2 then
- X = -1
- x = true
- local thump = Instance.new("Sound",script)
- thump.Volume = 1
- thump.SoundId = "rbxassetid://181308673"
- thump.Looped = false
- thump:Play()
- Change()
- elseif P.Position.X < -(A.Size.X/2-P.Size.X/2) then
- X = 1
- x = true
- local thump = Instance.new("Sound",script)
- thump.Volume = 1
- thump.SoundId = "rbxassetid://181308673"
- thump.Looped = false
- thump:Play()
- Change()
- end
- if P.Position.Z > A.Size.Z/2-P.Size.Z/2 then
- Z = -1
- z = true
- local thump = Instance.new("Sound",script)
- thump.Volume = 1
- thump.SoundId = "rbxassetid://181308673"
- thump.Looped = false
- thump:Play()
- Change()
- elseif P.Position.Z < -(A.Size.Z/2-P.Size.Z/2) then
- Z = 1
- z = true
- local thump = Instance.new("Sound",script)
- thump.Volume = 1
- thump.SoundId = "rbxassetid://181308673"
- thump.Looped = false
- thump:Play()
- Change()
- end
- if x and z then
- delay(0,function()
- spawn(function()
- --hits = hits + 1
- TextLabel2.TextTransparency = 0
- TextLabel2.Text = "Corner Has Been Hit!" --"Corner Hits : " ..hits
- local corner = Instance.new("Sound",script)
- corner.Volume = 10
- corner.SoundId = "rbxassetid://516103418"
- corner.Looped = false
- corner:Play()
- spawn(function()
- for i = 1,720 do
- wait()
- TextLabel2.TextColor3 = Color3.new(math.random(0.00,1.00),math.random(0.00,1.00),math.random(0.00,1.00))
- end
- end)
- local TweenService = game:GetService("TweenService")
- local Info = TweenInfo.new(4,Enum.EasingStyle.Linear)
- wait(8)
- local tween = TweenService:Create(TextLabel2,Info,{TextTransparency = 1})
- tween:Play()
- --A.BrickColor = BrickColor.new("Really black")
- end)
- end)
- end
- end
- end)
- function deploy(spawns)
- for i = 1,spawns do
- local X = 1
- local Z = 1
- local hits = 0
- if math.random(1,2) == 1 then
- X = -1
- end
- if math.random(1,2) == 1 then
- Z = -1
- end
- local A = Instance.new("Part",script)
- A.Anchored = true
- A.Size = Vector3.new(320,1,200) --(350,1,220)
- A.BrickColor = BrickColor.new("Really black")
- A.Material = Enum.Material.Neon
- local P = Instance.new("Part",script)
- P.Anchored = true
- P.Size = Vector3.new(40,1,20)
- P.Position = Vector3.new(math.random(-135,135),0.25,math.random(-80,80))
- P.Transparency = 1
- local D = Instance.new("Decal",P)
- D.Face = Enum.NormalId.Top
- D.Texture = "rbxassetid://2642637131"
- local Last = 1
- local function change2()
- local Choice = math.random(1,4)
- local No = false
- if Choice == Last then
- No = true
- end
- if Choice == 1 then
- P.BrickColor = BrickColor.new("Really red")
- Last = 1
- elseif Choice == 2 then
- P.BrickColor = BrickColor.new("Really blue")
- Last = 2
- elseif Choice == 3 then
- P.BrickColor = BrickColor.new("Lime green")
- Last = 3
- else
- P.BrickColor = BrickColor.new("White")
- Last = 4
- end
- if No then
- change2()
- end
- D.Color3 = P.Color
- end
- spawn(function()
- while true do
- wait()
- P.Position = P.Position + Vector3.new(X * speed,0,Z * speed)
- local x = false
- local z = false
- if P.Position.X > A.Size.X/2-P.Size.X/2 then
- X = -1
- x = true
- local thump = Instance.new("Sound",script)
- thump.Volume = 1
- thump.SoundId = "rbxassetid://181308673"
- thump.Looped = false
- thump:Play()
- change2()
- elseif P.Position.X < -(A.Size.X/2-P.Size.X/2) then
- X = 1
- x = true
- local thump = Instance.new("Sound",script)
- thump.Volume = 1
- thump.SoundId = "rbxassetid://181308673"
- thump.Looped = false
- thump:Play()
- change2()
- end
- if P.Position.Z > A.Size.Z/2-P.Size.Z/2 then
- Z = -1
- z = true
- local thump = Instance.new("Sound",script)
- thump.Volume = 1
- thump.SoundId = "rbxassetid://181308673"
- thump.Looped = false
- thump:Play()
- change2()
- elseif P.Position.Z < -(A.Size.Z/2-P.Size.Z/2) then
- Z = 1
- z = true
- local thump = Instance.new("Sound",script)
- thump.Volume = 1
- thump.SoundId = "rbxassetid://181308673"
- thump.Looped = false
- thump:Play()
- change2()
- end
- if x and z then
- delay(0,function()
- spawn(function()
- --hits = hits + 1
- TextLabel2.TextTransparency = 0
- TextLabel2.Text = "Corner Has Been Hit!" --"Corner Hits : " ..hits
- local corner = Instance.new("Sound",script)
- corner.Volume = 10
- corner.SoundId = "rbxassetid://516103418"
- corner.Looped = false
- corner:Play()
- spawn(function()
- for i = 1,720 do
- wait()
- TextLabel2.TextColor3 = Color3.new(math.random(0.00,1.00),math.random(0.00,1.00),math.random(0.00,1.00))
- end
- end)
- local TweenService = game:GetService("TweenService")
- local Info = TweenInfo.new(4,Enum.EasingStyle.Linear)
- wait(8)
- local tween = TweenService:Create(TextLabel2,Info,{TextTransparency = 1})
- tween:Play()
- --A.BrickColor = BrickColor.new("Really black")
- end)
- end)
- end
- end
- end)
- end
- end
- plr = owner
- plr.Chatted:Connect(function(msg)
- if msg:lower():sub(1,4) == "dvd/" then
- local choice = msg:sub(5)
- if tonumber(choice) then
- deploy(tonumber(choice))
- amount = amount + tonumber(choice)
- end
- end
- if msg:lower():sub(1,6) == "total/" then
- warn(amount .." DvDs are spawned.")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement