Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- Humanoid.MaxHealth = math.huge
- local Mouse = Player:GetMouse()
- local music = Instance.new("Sound", Player.Character.HumanoidRootPart)
- music.Looped = false
- music.Volume = 2
- music.Name = "music"
- music.MaxDistance = 50
- local music2 = Instance.new("Sound", Player.Character.HumanoidRootPart)
- music2.Volume = 0
- music2.Name = "analyzer"
- local miss = Instance.new("Sound", Player.Character.HumanoidRootPart)
- miss.Looped = false
- miss.Volume = 2.5
- miss.Name = "miss"
- miss.MaxDistance = 50
- miss.SoundId = "rbxassetid://367926738"
- local previd = "ID Here"
- local cannote = true
- local canv = true
- local createnotes = true
- local notes = {}
- local z = {}
- local x = {}
- local c = {}
- local vv = {}
- local b = {}
- local lastplayback = 0
- local difficulty = 1
- o1 = Instance.new("Part")
- o2 = Instance.new("SurfaceGui")
- o3 = Instance.new("ImageLabel")
- o4 = Instance.new("TextLabel")
- o5 = Instance.new("TextLabel")
- o6 = Instance.new("TextLabel")
- o7 = Instance.new("Frame")
- o8 = Instance.new("TextBox")
- o9 = Instance.new("TextButton")
- o10 = Instance.new("TextLabel")
- o11 = Instance.new("TextLabel")
- o12 = Instance.new("TextLabel")
- o1.Name = "BasePart"
- o1.Material = Enum.Material.SmoothPlastic
- o1.BrickColor = BrickColor.new("Dark grey metallic")
- o1.Position = Vector3.new(72.2750092, 5.66000509, 11.1000004)
- o1.Anchored = true
- o1.CanCollide = false
- o1.Locked = true
- o1.Size = Vector3.new(10,10,0.05)
- o1.CFrame = CFrame.new(72.2750092, 5.66000509, 11.1000004, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o1.Color = Color3.new(0.329412, 0.329412, 0.329412)
- o1.Position = Vector3.new(72.2750092, 5.66000509, 11.1000004)
- o1.Color = Color3.new(0.329412, 0.329412, 0.329412)
- o2.Name = "BeatMaster"
- o2.Parent = o1
- o2.CanvasSize = Vector2.new(1000,1000)
- o2.Adornee = o1
- o3.Name = "Back"
- o3.Parent = o2
- o3.Position = UDim2.new(0.34999999403954,0,0.30000001192093,0)
- o3.Size = UDim2.new(0.30000001192093,0,0.30000001192093,0)
- o3.Position = UDim2.new(0.34999999403954,0,0.30000001192093,0)
- o3.BackgroundColor3 = Color3.new(1, 1, 1)
- o3.BorderColor3 = Color3.new(0, 0, 0)
- o3.BorderSizePixel = 2
- o3.Image = "rbxassetid://473274964"
- o4.Name = "Z"
- o4.Parent = o3
- o4.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
- o4.Size = UDim2.new(0.20000000298023,0,0.20000000298023,0)
- o4.Text = "Z"
- o4.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
- o4.Visible = false
- o4.BackgroundColor3 = Color3.new(1, 1, 1)
- o4.BackgroundTransparency = 1
- o4.BorderSizePixel = 0
- o4.ZIndex = 2
- o4.Font = Enum.Font.SourceSans
- o4.FontSize = Enum.FontSize.Size14
- o4.TextColor3 = Color3.new(1, 1, 1)
- o4.TextScaled = true
- o4.TextWrapped = true
- o5.Name = "X"
- o5.Parent = o3
- o5.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
- o5.Size = UDim2.new(0.20000000298023,0,0.20000000298023,0)
- o5.Text = "X"
- o5.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
- o5.Visible = false
- o5.BackgroundColor3 = Color3.new(1, 1, 1)
- o5.BackgroundTransparency = 1
- o5.BorderSizePixel = 0
- o5.ZIndex = 2
- o5.Font = Enum.Font.SourceSans
- o5.FontSize = Enum.FontSize.Size14
- o5.TextColor3 = Color3.new(1, 1, 1)
- o5.TextScaled = true
- o5.TextWrapped = true
- o6.Name = "C"
- o6.Parent = o3
- o6.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
- o6.Size = UDim2.new(0.20000000298023,0,0.20000000298023,0)
- o6.Text = "C"
- o6.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
- o6.Visible = false
- o6.BackgroundColor3 = Color3.new(1, 1, 1)
- o6.BackgroundTransparency = 1
- o6.BorderSizePixel = 0
- o6.ZIndex = 2
- o6.Font = Enum.Font.SourceSans
- o6.FontSize = Enum.FontSize.Size14
- o6.TextColor3 = Color3.new(1, 1, 1)
- o6.TextScaled = true
- o6.TextWrapped = true
- o7.Name = "Middle"
- o7.Parent = o3
- o7.Position = UDim2.new(0.425,0,0.425,0)
- o7.Size = UDim2.new(0.15,0,0.18,0)
- o7.BackgroundColor3 = Color3.new(0, 0, 0)
- o7.BorderColor3 = Color3.new(0.152941, 0.152941, 0.152941)
- o7.BorderSizePixel = 10
- o8.Name = "Song"
- o8.Parent = o3
- o8.Position = UDim2.new(0,0,1.0499999523163,0)
- o8.Size = UDim2.new(1,0,0.10000000149012,0)
- o8.Text = "ID"
- o8.Position = UDim2.new(0,0,1.0499999523163,0)
- o8.BackgroundColor3 = Color3.new(0, 0, 0)
- o8.BorderColor3 = Color3.new(0.0823529, 0.0823529, 0.0823529)
- o8.BorderSizePixel = 2
- o8.Font = Enum.Font.SourceSans
- o8.FontSize = Enum.FontSize.Size14
- o8.TextColor3 = Color3.new(1, 1, 1)
- o8.TextScaled = true
- o8.TextStrokeColor3 = Color3.new(0, 0, 0.470588)
- o8.TextStrokeTransparency = 0
- o8.TextWrapped = true
- o9.Name = "Difficulty"
- o9.Parent = o3
- o9.Position = UDim2.new(0,0,1.1749999523163,0)
- o9.Size = UDim2.new(1,0,0.10000000149012,0)
- o9.Text = "Easy"
- o9.Position = UDim2.new(0,0,1.1749999523163,0)
- o9.BackgroundColor3 = Color3.new(0, 0, 0)
- o9.BorderColor3 = Color3.new(0.0823529, 0.0823529, 0.0823529)
- o9.BorderSizePixel = 2
- o9.Font = Enum.Font.SourceSans
- o9.FontSize = Enum.FontSize.Size14
- o9.TextColor3 = Color3.new(0.333333, 1, 1)
- o9.TextScaled = true
- o9.TextWrapped = true
- o10.Name = "Combo"
- o10.Parent = o3
- o10.Position = UDim2.new(0.30000001192093,0,0.55000001192093,0)
- o10.Size = UDim2.new(0.40000000596046,0,0.5,0)
- o10.Text = "0x"
- o10.Position = UDim2.new(0.30000001192093,0,0.55000001192093,0)
- o10.BackgroundColor3 = Color3.new(1, 1, 1)
- o10.BackgroundTransparency = 1
- o10.BorderSizePixel = 0
- o10.Font = Enum.Font.SourceSans
- o10.FontSize = Enum.FontSize.Size96
- o10.TextColor3 = Color3.new(0.611765, 0.996078, 1)
- o10.TextScaled = true
- o10.TextWrapped = true
- o11.Name = "Title"
- o11.Parent = o2
- o11.Position = UDim2.new(0,0,0.75,0)
- o11.Size = UDim2.new(1,0,0.10000000149012,0)
- o11.Text = "Beat Master"
- o11.Position = UDim2.new(0,0,0.75,0)
- o11.BackgroundColor3 = Color3.new(1, 1, 1)
- o11.BackgroundTransparency = 1
- o11.BorderSizePixel = 0
- o11.Font = Enum.Font.Fantasy
- o11.FontSize = Enum.FontSize.Size14
- o11.TextColor3 = Color3.new(1, 1, 1)
- o11.TextScaled = true
- o11.TextWrapped = true
- o12.Name = "Author"
- o12.Parent = o2
- o12.Position = UDim2.new(0.25,0,0.85000002384186,0)
- o12.Size = UDim2.new(0.5,0,0.050000000745058,0)
- o12.Text = "MlgArcOfOz"
- o12.Position = UDim2.new(0.25,0,0.85000002384186,0)
- o12.BackgroundColor3 = Color3.new(1, 1, 1)
- o12.BackgroundTransparency = 1
- o12.BorderSizePixel = 0
- o12.Font = Enum.Font.Code
- o12.FontSize = Enum.FontSize.Size14
- o12.TextColor3 = Color3.new(1, 1, 1)
- o12.TextScaled = true
- o12.TextWrapped = true
- o13 = Instance.new("TextLabel")
- o13.Name = "Score"
- o13.Parent = o2
- o13.Position = UDim2.new(0.025,0,0.925,0)
- o13.Size = UDim2.new(0.3,0,0.05,0)
- o13.Text = "Score: 0"
- o13.BackgroundColor3 = Color3.new(1,1,1)
- o13.BackgroundTransparency = 1
- o13.BorderSizePixel = 0
- o13.Font = Enum.Font.Code
- o13.FontSize = Enum.FontSize.Size14
- o13.TextColor3 = Color3.new(1,1,1)
- o13.TextScaled = true
- o13.TextWrapped = true
- o14 = Instance.new("TextLabel")
- o14.Name = "NotesHit"
- o14.Parent = o2
- o14.Position = UDim2.new(0.65,0,0.925,0)
- o14.Size = UDim2.new(0.32,0,0.05,0)
- o14.Text = "Notes Hit: 0%"
- o14.BackgroundColor3 = Color3.new(1, 1, 1)
- o14.BackgroundTransparency = 1
- o14.BorderSizePixel = 0
- o14.Font = Enum.Font.Code
- o14.FontSize = Enum.FontSize.Size14
- o14.TextColor3 = Color3.new(1, 1, 1)
- o14.TextScaled = true
- o14.TextWrapped = true
- o15 = Instance.new("TextLabel")
- o15.Name = "V"
- o15.Parent = o3
- o15.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
- o15.Size = UDim2.new(0.20000000298023,0,0.20000000298023,0)
- o15.Text = "V"
- o15.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
- o15.Visible = false
- o15.BackgroundColor3 = Color3.new(1, 1, 1)
- o15.BackgroundTransparency = 1
- o15.BorderSizePixel = 0
- o15.ZIndex = 2
- o15.Font = Enum.Font.SourceSans
- o15.FontSize = Enum.FontSize.Size14
- o15.TextColor3 = Color3.new(1, 1, 1)
- o15.TextScaled = true
- o15.TextWrapped = true
- o16 = Instance.new("TextLabel")
- o16.Name = "B"
- o16.Parent = o2
- o16.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
- o16.Size = UDim2.new(0.20000000298023,0,0.20000000298023,0)
- o16.Text = "B"
- o16.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
- o16.Visible = false
- o16.BackgroundColor3 = Color3.new(1, 1, 1)
- o16.BackgroundTransparency = 1
- o16.BorderSizePixel = 0
- o16.ZIndex = 2
- o16.Font = Enum.Font.SourceSans
- o16.FontSize = Enum.FontSize.Size14
- o16.TextColor3 = Color3.new(1, 1, 1)
- o16.TextScaled = true
- o16.TextWrapped = true
- local inputbase = Instance.new("ScreenGui",Player.PlayerGui)
- inputbase.Name = "inputbase"
- local inputbox = Instance.new("TextBox",inputbase)
- inputbox.Name = "inputbox"
- inputbox.Size = UDim2.new(0.025,0,0.05,0)
- inputbox.Position = UDim2.new(0.493,0,0.8,0)
- inputbox.BackgroundColor3 = Color3.new(0,0,0)
- inputbox.BorderSizePixel = 0
- inputbox.Text = "ID"
- inputbox.TextScaled = true
- inputbox.TextWrapped = true
- inputbox.TextColor3 = Color3.new(0,0,0)
- inputbox.TextTransparency = 1
- local partbase = o1
- partbase.Parent = Character
- local idbox = o8
- local zkey = o4
- local xkey = o5
- local ckey = o6
- local vkey = o15
- local bkey = o16
- local middle = o7
- local back = o3
- local difficulty = o9
- local difficultynum = 1
- local combo = o10
- local combonum = 0
- local rotdirec = 0
- local scorebox = o13
- local score = 0
- local totalnotes = 0
- local noteshit = 0
- local percentagebox = o14
- game:GetService("RunService").Stepped:connect(function()
- if not music.IsPlaying and not music2.IsPlaying then
- idbox.Text = inputbox.Text
- music.SoundId = "rbxassetid://"..idbox.Text
- music2.SoundId = "rbxassetid://"..idbox.Text
- end
- combo.Text = combonum.."x"
- scorebox.Text = "Score: "..score
- if totalnotes > 0 then
- percentagebox.Text = "Notes Hit: "..math.floor((noteshit/totalnotes)*100).."%"
- end
- partbase.CFrame = partbase.CFrame:lerp(Character.HumanoidRootPart.CFrame*CFrame.new(0,2,-3),math.sin(math.rad(90)))
- if music.IsPlaying then
- if combonum <= 30 then
- combo.TextColor3 = Color3.new(0.6,1,1)
- if rotdirec == 0 then
- if combo.Rotation <= 25 then
- combo.Rotation = combo.Rotation + 0.7
- else
- rotdirec = 1
- end
- else
- if combo.Rotation >= -25 then
- combo.Rotation = combo.Rotation - 0.7
- else
- rotdirec = 0
- end
- end
- elseif combonum > 30 and combonum <= 70 then
- combo.TextColor3 = Color3.new(0.2,1,0.8)
- if rotdirec == 0 then
- if combo.Rotation <= 28 then
- combo.Rotation = combo.Rotation + 0.85
- else
- rotdirec = 1
- end
- else
- if combo.Rotation >= -28 then
- combo.Rotation = combo.Rotation - 0.85
- else
- rotdirec = 0
- end
- end
- elseif combonum > 70 and combonum <= 100 then
- combo.TextColor3 = Color3.new(0.9,1,0.4)
- if rotdirec == 0 then
- if combo.Rotation <= 32 then
- combo.Rotation = combo.Rotation + 0.95
- else
- rotdirec = 1
- end
- else
- if combo.Rotation >= -32 then
- combo.Rotation = combo.Rotation - 0.95
- else
- rotdirec = 0
- end
- end
- elseif combonum > 100 and combonum <= 150 then
- combo.TextColor3 = Color3.new(1,1,0)
- if rotdirec == 0 then
- if combo.Rotation <= 35 then
- combo.Rotation = combo.Rotation + 1.15
- else
- rotdirec = 1
- end
- else
- if combo.Rotation >= -35 then
- combo.Rotation = combo.Rotation - 1.15
- else
- rotdirec = 0
- end
- end
- elseif combonum > 150 and combonum <= 200 then
- combo.TextColor3 = Color3.new(1,0.5,0)
- if rotdirec == 0 then
- if combo.Rotation <= 35 then
- combo.Rotation = combo.Rotation + 1.45
- else
- rotdirec = 1
- end
- else
- if combo.Rotation >= -35 then
- combo.Rotation = combo.Rotation - 1.45
- else
- rotdirec = 0
- end
- end
- elseif combonum > 200 and combonum <= 250 then
- combo.TextColor3 = Color3.new(1,0,0)
- if rotdirec == 0 then
- if combo.Rotation <= 35 then
- combo.Rotation = combo.Rotation + 1.45
- else
- rotdirec = 1
- end
- else
- if combo.Rotation >= -35 then
- combo.Rotation = combo.Rotation - 1.45
- else
- rotdirec = 0
- end
- end
- elseif combonum > 250 and combonum <= 300 then
- combo.TextColor3 = Color3.new(0.5,0,1)
- if rotdirec == 0 then
- if combo.Rotation <= 25 then
- combo.Rotation = combo.Rotation + 1.85
- else
- rotdirec = 1
- end
- else
- if combo.Rotation >= -25 then
- combo.Rotation = combo.Rotation - 1.85
- else
- rotdirec = 0
- end
- end
- elseif combonum > 300 then
- combo.TextColor3 = Color3.new(1,0,1)
- if rotdirec == 0 then
- if combo.Rotation <= 15 then
- combo.Rotation = combo.Rotation + 2
- else
- rotdirec = 1
- end
- else
- if combo.Rotation >= -15 then
- combo.Rotation = combo.Rotation - 2
- else
- rotdirec = 0
- end
- end
- end
- else
- combo.Rotation = 0
- end
- if music2.IsPlaying and createnotes then
- if lastplayback == 0 and music2.PlaybackLoudness > 0 then
- lastplayback = music2.PlaybackLoudness
- end
- local base = 80
- if difficulty.Text == "Hard" or difficulty.Text == "Expert" then
- base = 40
- end
- if music2.PlaybackLoudness > 0 and math.abs((lastplayback - music2.PlaybackLoudness)) >= base/difficultynum then
- local prevplayback = lastplayback
- lastplayback = music2.PlaybackLoudness
- local louddiff = math.abs((prevplayback - lastplayback))
- local decider;
- if difficulty.Text == "Expert" and louddiff >= 200/difficultynum then
- decider = 5
- elseif (difficulty.Text == "Hard" or difficulty.Text == "Expert") and louddiff >= 40/difficultynum and louddiff < 80/difficultynum then
- decider = 4
- elseif louddiff >= 80/difficultynum and louddiff < 100/difficultynum then
- decider = 1
- elseif louddiff >= 100/difficultynum and louddiff < 150/difficultynum then
- decider = 2
- elseif louddiff >= 150/difficultynum then
- if difficulty.Text ~= "Expert" then
- decider = 3
- elseif louddiff < 200 then
- decider = 3
- end
- end
- if decider ~= 4 then
- if cannote then
- cannote = false
- local waiter = coroutine.wrap(function()
- wait(0.3)
- cannote = true
- end)
- waiter()
- if decider == 1 then
- local clone = zkey:Clone()
- clone.Parent = back
- clone.Visible = true
- clone.Name = "z"..#notes
- clone.Position = UDim2.new((0.4-music2.TimePosition*difficultynum),0,0.4,0)
- local correct = Instance.new("BoolValue", clone)
- correct.Name = "correct"
- correct.Value = false
- local timepos = Instance.new("NumberValue", clone)
- timepos.Name = "timepos"
- timepos.Value = music2.TimePosition
- local move = Instance.new("BoolValue", clone)
- move.Name = "move"
- move.Value = true
- table.insert(notes,clone)
- elseif decider == 2 then
- local clone = xkey:Clone()
- clone.Parent = back
- clone.Visible = true
- clone.Name = "x"..#notes
- clone.Position = UDim2.new(0.4,0,(0.4-music2.TimePosition),0)
- local correct = Instance.new("BoolValue", clone)
- correct.Name = "correct"
- correct.Value = false
- local timepos = Instance.new("NumberValue", clone)
- timepos.Name = "timepos"
- timepos.Value = music2.TimePosition
- local move = Instance.new("BoolValue", clone)
- move.Name = "move"
- move.Value = true
- table.insert(notes,clone)
- elseif decider == 5 then
- local clone = bkey:Clone()
- clone.Parent = back
- clone.Visible = true
- clone.Name = "b"..#notes
- clone.Position = UDim2.new(0.4,0,(0.4-music2.TimePosition),0)
- local correct = Instance.new("BoolValue", clone)
- correct.Name = "correct"
- correct.Value = false
- local timepos = Instance.new("NumberValue", clone)
- timepos.Name = "timepos"
- timepos.Value = music2.TimePosition
- local move = Instance.new("BoolValue", clone)
- move.Name = "move"
- move.Value = true
- table.insert(notes,clone)
- elseif decider == 3 then
- local clone = ckey:Clone()
- clone.Parent = back
- clone.Visible = true
- clone.Name = "c"..#notes
- clone.Position = UDim2.new((0.4+music2.TimePosition),0,0.4,0)
- local correct = Instance.new("BoolValue", clone)
- correct.Name = "correct"
- correct.Value = false
- local move = Instance.new("BoolValue", clone)
- move.Name = "move"
- move.Value = true
- local timepos = Instance.new("NumberValue", clone)
- timepos.Name = "timepos"
- timepos.Value = music2.TimePosition
- table.insert(notes,clone)
- end
- end
- elseif cannote and canv then
- canv = false
- cannote = false
- local waiter = coroutine.wrap(function()
- wait(0.3)
- cannote = true
- wait(1.5)
- canv = true
- end)
- waiter()
- local clone = vkey:Clone()
- clone.Parent = back
- clone.Visible = true
- clone.Name = "v"..#notes
- clone.Position = UDim2.new((0.4-music2.TimePosition*difficultynum),0,(0.4-music2.TimePosition),0)
- local correct = Instance.new("BoolValue", clone)
- correct.Name = "correct"
- correct.Value = false
- local timepos = Instance.new("NumberValue", clone)
- timepos.Name = "timepos"
- timepos.Value = music2.TimePosition
- local move = Instance.new("BoolValue", clone)
- move.Name = "move"
- move.Value = true
- table.insert(notes,clone)
- end
- end
- end
- if music.IsPlaying then
- for l,v in pairs (notes) do
- if v:FindFirstChild("move") then
- local letter = string.sub(v.Name,1,1)
- local num = string.sub(v.Name,2,string.len(v.Name))
- if v:FindFirstChild("move").Value == true then
- if letter == "z" then
- v.Position = UDim2.new(0.4-(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0,0.4,0)
- elseif letter == "x" then
- v.Position = UDim2.new(0.4,0,0.4-(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0)
- elseif letter == "c" then
- v.Position = UDim2.new(0.4+(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0,0.4,0)
- elseif letter == "v" then
- v.Position = UDim2.new(0.4-(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0,0.4-(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0)
- elseif letter == "b" then
- v.Position = UDim2.new(0.4+(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0,0.4-(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0)
- end
- end
- if v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum <= 0.1 and v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum >= -0.1 then
- if letter == "z" then
- table.insert(z,v)
- elseif letter == "x" then
- table.insert(x,v)
- elseif letter == "c" then
- table.insert(c,v)
- elseif letter == "v" then
- table.insert(vv,v)
- elseif letter == "b" then
- table.insert(b,v)
- end
- elseif v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum < -0.1 and v:FindFirstChild("correct").Value == false and v:FindFirstChild("move").Value == true then
- v:FindFirstChild("move").Value = false
- music.Volume = 0
- miss:Play()
- totalnotes = totalnotes + 1
- combonum = 0
- if letter == "z" then
- for i,p in pairs (z) do
- local pnum = string.sub(p.Name,2,string.len(p.Name))
- if pnum == num then
- p.TextColor3 = Color3.new(1,0,0)
- table.remove(z,i)
- local flasher = coroutine.wrap(function()
- for i=1, 10 do
- p.TextTransparency = i/10
- wait(0.01)
- end
- p:Remove()
- end)
- flasher()
- end
- end
- elseif letter == "x" then
- for i,p in pairs (x) do
- local pnum = string.sub(p.Name,2,string.len(p.Name))
- if pnum == num then
- p.TextColor3 = Color3.new(1,0,0)
- table.remove(x,i)
- local flasher = coroutine.wrap(function()
- for i=1, 10 do
- p.TextTransparency = i/10
- wait(0.01)
- end
- p:Remove()
- end)
- flasher()
- end
- end
- elseif letter == "b" then
- for i,p in pairs (b) do
- local pnum = string.sub(p.Name,2,string.len(p.Name))
- if pnum == num then
- p.TextColor3 = Color3.new(1,0,0)
- table.remove(b,i)
- local flasher = coroutine.wrap(function()
- for i=1, 10 do
- p.TextTransparency = i/10
- wait(0.01)
- end
- p:Remove()
- end)
- flasher()
- end
- end
- elseif letter == "v" then
- for i,p in pairs (vv) do
- local pnum = string.sub(p.Name,2,string.len(p.Name))
- if pnum == num then
- p.TextColor3 = Color3.new(1,0,0)
- table.remove(vv,i)
- local flasher = coroutine.wrap(function()
- for i=1, 10 do
- p.TextTransparency = i/10
- wait(0.01)
- end
- p:Remove()
- end)
- flasher()
- end
- end
- elseif letter == "c" then
- for i,p in pairs (c) do
- local pnum = string.sub(p.Name,2,string.len(p.Name))
- if pnum == num then
- p.TextColor3 = Color3.new(1,0,0)
- table.remove(c,i)
- local flasher = coroutine.wrap(function()
- for i=1, 10 do
- p.TextTransparency = i/10
- wait(0.01)
- end
- p:Remove()
- end)
- flasher()
- end
- end
- end
- end
- else
- table.remove(notes,l)
- end
- end
- end
- end)
- music.Ended:connect(function()
- idbox.Text = "ID"
- lastplayback = 0
- for i=1, #notes do
- if notes[1]:FindFirstChild("move") then
- notes[1]:Remove()
- table.remove(notes,1)
- end
- end
- notes = {}
- idbox.TextColor3 = Color3.new(1,1,1)
- end)
- Mouse.KeyDown:connect(function(key)
- if key == "z" and music.IsPlaying then
- local success = false
- if #z > 0 then
- for i,v in pairs (z) do
- if v:FindFirstChild("move") then
- if v:FindFirstChild("move").Value == true then
- v:FindFirstChild("correct").Value = true
- v:FindFirstChild("move").Value = false
- success = true
- v.TextColor3 = Color3.new(0,1,0)
- v:TweenSizeAndPosition(UDim2.new(0.01,0,0.01,0),UDim2.new(0.5,0,0.5,0),1,1,0.5)
- table.remove(z,i)
- local randirec = math.random(1,2)
- local flasher = coroutine.wrap(function()
- for i=1, 10 do
- v.TextTransparency = i/10
- if randirec == 1 then
- v.Rotation = v.Rotation + 2
- else
- v.Rotation = v.Rotation - 2
- end
- wait(0.01)
- end
- v:Remove()
- end)
- flasher()
- end
- end
- end
- end
- if success then
- music.Volume = 2
- combonum = combonum + 1
- totalnotes = totalnotes + 1
- noteshit = noteshit + 1
- score = math.floor(score + (100*difficultynum) + (combonum/2))
- combo:TweenSizeAndPosition(UDim2.new(0.2,0,0.25,0),UDim2.new(0.4,0,0.65,0),1,1,0.1,true)
- middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
- local tweenback = coroutine.wrap(function()
- wait(0.1)
- combo:TweenSizeAndPosition(UDim2.new(0.4,0,0.5,0),UDim2.new(0.3,0,0.55,0),1,1,0.1,false)
- middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
- end)
- tweenback()
- else
- music.Volume = 0
- combonum = 0
- totalnotes = totalnotes + 1
- miss:Play()
- middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
- local tweenback2 = coroutine.wrap(function()
- wait(0.1)
- middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
- end)
- tweenback2()
- local misser = coroutine.wrap(function()
- middle.BackgroundColor3 = Color3.new(1,0,0)
- for i=1, 5 do
- middle.BackgroundColor3 = Color3.new(1-i/5,0,0)
- wait()
- end
- end)
- misser()
- end
- elseif key == "x" and music.IsPlaying then
- local success = false
- if #x > 0 then
- for i,v in pairs (x) do
- if v:FindFirstChild("move") then
- if v:FindFirstChild("move").Value == true then
- v:FindFirstChild("correct").Value = true
- v:FindFirstChild("move").Value = false
- success = true
- v.TextColor3 = Color3.new(0,1,0)
- v:TweenSizeAndPosition(UDim2.new(0.01,0,0.01,0),UDim2.new(0.5,0,0.5,0),1,1,0.5)
- table.remove(x,i)
- local randirec = math.random(1,2)
- local flasher = coroutine.wrap(function()
- for i=1, 10 do
- v.TextTransparency = i/10
- if randirec == 1 then
- v.Rotation = v.Rotation + 2
- else
- v.Rotation = v.Rotation - 2
- end
- wait(0.01)
- end
- v:Remove()
- end)
- flasher()
- end
- end
- end
- end
- if success then
- music.Volume = 2
- combonum = combonum + 1
- totalnotes = totalnotes + 1
- noteshit = noteshit + 1
- score = math.floor(score + (100*difficultynum) + (combonum/2))
- combo:TweenSizeAndPosition(UDim2.new(0.2,0,0.25,0),UDim2.new(0.4,0,0.65,0),1,1,0.1,true)
- middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
- local tweenback = coroutine.wrap(function()
- wait(0.1)
- combo:TweenSizeAndPosition(UDim2.new(0.4,0,0.5,0),UDim2.new(0.3,0,0.55,0),1,1,0.1,false)
- middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
- end)
- tweenback()
- else
- music.Volume = 0
- combonum = 0
- miss:Play()
- middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
- local tweenback2 = coroutine.wrap(function()
- wait(0.1)
- middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
- end)
- tweenback2()
- totalnotes = totalnotes + 1
- local misser = coroutine.wrap(function()
- middle.BackgroundColor3 = Color3.new(1,0,0)
- for i=1, 5 do
- middle.BackgroundColor3 = Color3.new(1-i/5,0,0)
- wait()
- end
- end)
- misser()
- end
- elseif key == "b" and music.IsPlaying then
- local success = false
- if #b > 0 then
- for i,v in pairs (b) do
- if v:FindFirstChild("move") then
- if v:FindFirstChild("move").Value == true then
- v:FindFirstChild("correct").Value = true
- v:FindFirstChild("move").Value = false
- success = true
- v.TextColor3 = Color3.new(0,1,0)
- v:TweenSizeAndPosition(UDim2.new(0.01,0,0.01,0),UDim2.new(0.5,0,0.5,0),1,1,0.5)
- table.remove(b,i)
- local randirec = math.random(1,2)
- local flasher = coroutine.wrap(function()
- for i=1, 10 do
- v.TextTransparency = i/10
- if randirec == 1 then
- v.Rotation = v.Rotation + 2
- else
- v.Rotation = v.Rotation - 2
- end
- wait(0.01)
- end
- v:Remove()
- end)
- flasher()
- end
- end
- end
- end
- if success then
- music.Volume = 2
- combonum = combonum + 1
- totalnotes = totalnotes + 1
- noteshit = noteshit + 1
- score = math.floor(score + (100*difficultynum) + (combonum/2))
- combo:TweenSizeAndPosition(UDim2.new(0.2,0,0.25,0),UDim2.new(0.4,0,0.65,0),1,1,0.1,true)
- middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
- local tweenback = coroutine.wrap(function()
- wait(0.1)
- combo:TweenSizeAndPosition(UDim2.new(0.4,0,0.5,0),UDim2.new(0.3,0,0.55,0),1,1,0.1,false)
- middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
- end)
- tweenback()
- else
- music.Volume = 0
- combonum = 0
- miss:Play()
- middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
- local tweenback2 = coroutine.wrap(function()
- wait(0.1)
- middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
- end)
- tweenback2()
- totalnotes = totalnotes + 1
- local misser = coroutine.wrap(function()
- middle.BackgroundColor3 = Color3.new(1,0,0)
- for i=1, 5 do
- middle.BackgroundColor3 = Color3.new(1-i/5,0,0)
- wait()
- end
- end)
- misser()
- end
- elseif key == "v" and music.IsPlaying then
- local success = false
- if #vv > 0 then
- for i,p in pairs (vv) do
- if p:FindFirstChild("move") then
- if p:FindFirstChild("move").Value == true then
- p:FindFirstChild("correct").Value = true
- p:FindFirstChild("move").Value = false
- success = true
- p.TextColor3 = Color3.new(0,1,0)
- p:TweenSizeAndPosition(UDim2.new(0.01,0,0.01,0),UDim2.new(0.5,0,0.5,0),1,1,0.5)
- table.remove(vv,i)
- local randirec = math.random(1,2)
- local flasher = coroutine.wrap(function()
- for i=1, 10 do
- p.TextTransparency = i/10
- if randirec == 1 then
- p.Rotation = p.Rotation + 2
- else
- p.Rotation = p.Rotation - 2
- end
- wait(0.01)
- end
- p:Remove()
- end)
- flasher()
- end
- end
- end
- end
- if success then
- music.Volume = 2
- combonum = combonum + 1
- totalnotes = totalnotes + 1
- noteshit = noteshit + 1
- score = math.floor(score + (100*difficultynum) + (combonum/2))
- combo:TweenSizeAndPosition(UDim2.new(0.2,0,0.25,0),UDim2.new(0.4,0,0.65,0),1,1,0.1,true)
- middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
- local tweenback = coroutine.wrap(function()
- wait(0.1)
- combo:TweenSizeAndPosition(UDim2.new(0.4,0,0.5,0),UDim2.new(0.3,0,0.55,0),1,1,0.1,false)
- middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
- end)
- tweenback()
- else
- music.Volume = 0
- combonum = 0
- miss:Play()
- middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
- local tweenback2 = coroutine.wrap(function()
- wait(0.1)
- middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
- end)
- tweenback2()
- totalnotes = totalnotes + 1
- local misser = coroutine.wrap(function()
- middle.BackgroundColor3 = Color3.new(1,0,0)
- for i=1, 5 do
- middle.BackgroundColor3 = Color3.new(1-i/5,0,0)
- wait()
- end
- end)
- misser()
- end
- elseif key == "c" and music.IsPlaying then
- local success = false
- if #c > 0 then
- for i,v in pairs (c) do
- if v:FindFirstChild("move") then
- if v:FindFirstChild("move").Value == true then
- v:FindFirstChild("correct").Value = true
- v:FindFirstChild("move").Value = false
- success = true
- v.TextColor3 = Color3.new(0,1,0)
- v:TweenSizeAndPosition(UDim2.new(0.01,0,0.01,0),UDim2.new(0.5,0,0.5,0),1,1,0.5)
- table.remove(c,i)
- local randirec = math.random(1,2)
- local flasher = coroutine.wrap(function()
- for i=1, 10 do
- v.TextTransparency = i/10
- if randirec == 1 then
- v.Rotation = v.Rotation + 2
- else
- v.Rotation = v.Rotation - 2
- end
- wait(0.01)
- end
- v:Remove()
- end)
- flasher()
- end
- end
- end
- end
- if success then
- music.Volume = 2
- combonum = combonum + 1
- totalnotes = totalnotes + 1
- noteshit = noteshit + 1
- score = math.floor(score + (100*difficultynum) + (combonum/2))
- combo:TweenSizeAndPosition(UDim2.new(0.2,0,0.25,0),UDim2.new(0.4,0,0.65,0),1,1,0.1,true)
- middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
- local tweenback = coroutine.wrap(function()
- wait(0.1)
- combo:TweenSizeAndPosition(UDim2.new(0.4,0,0.5,0),UDim2.new(0.3,0,0.55,0),1,1,0.1,false)
- middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
- end)
- tweenback()
- else
- music.Volume = 0
- combonum = 0
- miss:Play()
- middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
- local tweenback2 = coroutine.wrap(function()
- wait(0.1)
- middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
- end)
- tweenback2()
- totalnotes = totalnotes + 1
- local misser = coroutine.wrap(function()
- middle.BackgroundColor3 = Color3.new(1,0,0)
- for i=1, 5 do
- middle.BackgroundColor3 = Color3.new(1-i/5,0,0)
- wait()
- end
- end)
- misser()
- end
- elseif key == "e" then
- if music.IsPlaying then
- music:Stop()
- music2:Stop()
- idbox.Text = "ID"
- lastplayback = 0
- for i=1, #notes do
- if notes[1]:FindFirstChild("move") then
- notes[1]:Remove()
- table.remove(notes,1)
- end
- end
- notes = {}
- idbox.TextColor3 = Color3.new(1,1,1)
- elseif idbox.Text ~= "ID" and not music.IsPlaying and not music2.IsPlaying then
- music2:Play()
- score = 0
- percentagebox.Text = "Notes Hit: 0%"
- noteshit = 0
- totalnotes = 0
- combonum = 0
- combo.TextColor3 = Color3.new(0.6,1,1)
- idbox.TextColor3 = Color3.new(1,0.5,0)
- createnotes = false
- wait(3)
- createnotes = true
- wait(2)
- idbox.TextColor3 = Color3.new(0,1,0)
- idbox.Text = game:GetService("MarketplaceService"):GetProductInfo(tonumber(idbox.Text),0).Name
- music:Play()
- end
- elseif key == "q" then
- if not music2.IsPlaying and not music.IsPlaying then
- if difficulty.Text == "Super Easy" then
- difficulty.Text = "Easy"
- difficulty.TextColor3 = Color3.new(0,1,1)
- difficultynum = 1
- elseif difficulty.Text == "Easy" then
- difficulty.Text = "Medium"
- difficulty.TextColor3 = Color3.new(1,1,0)
- difficultynum = 1.35
- elseif difficulty.Text == "Medium" then
- difficulty.Text = "Hard"
- difficulty.TextColor3 = Color3.new(1,0.5,0)
- difficultynum = 1.75
- elseif difficulty.Text == "Hard" then
- difficulty.Text = "Expert"
- difficulty.TextColor3 = Color3.new(1,0,0)
- difficultynum = 2
- elseif difficulty.Text == "Expert" then
- difficulty.Text = "Super Easy"
- difficulty.TextColor3 = Color3.new(0.9,1,1)
- difficultynum = 0.7
- end
- end
- end
- end)
Add Comment
Please, Sign In to add comment