Version / Update: v1.0.0
- Download / Script Link
- -- [[ PIANOGOD PIANO: FULL BLUE EDITION - LOOP & TEMPO ]] --
local VIM = game:GetService("VirtualInputManager")
local UIS = game:GetService("UserInputService")
local CoreGui = game:GetService("CoreGui")
local TweenService = game:GetService("TweenService")
local HttpService = game:GetService("HttpService")
local Remote = workspace:FindFirstChild("GlobalPianoConnector")
-- [[ FILE SYSTEM ]] --
local fileName = "PianoGodVault.json"
local UserLibrary = {}
local function saveToDisk()
pcall(function() writefile(fileName, HttpService:JSONEncode(UserLibrary)) end)
end
local function loadFromDisk()
if isfile(fileName) then
local success, data = pcall(function() return HttpService:JSONDecode(readfile(fileName)) end)
if success then UserLibrary = data end
end
end
loadFromDisk()
-- [[ THEME CONSTANTS ]] --
local BLUE = Color3.fromRGB(0, 150, 255)
local BG = Color3.fromRGB(15, 20, 30)
local HEADER = Color3.fromRGB(25, 30, 40)
-- [[ KEY TRANSLATOR ]] --
local NumMap = {["0"]="Zero", ["1"]="One", ["2"]="Two", ["3"]="Three", ["4"]="Four", ["5"]="Five", ["6"]="Six", ["7"]="Seven", ["8"]="Eight", ["9"]="Nine"}
local ShiftMap = {["!"]="1", ["@"]="2", ["#"]="3", ["$"]="4", ["%"]="5", ["^"]="6", ["&"]="7", ["*"]="8", ["("]="9", [")"]="0", ["_"]="-", ["+"]="=", ["{"]="[", ["}"]="]", ["|"]="\\", [":"]=";", ["\""]="'", ["<"]=",", [">"]=".", ["?"]="/"}
local ALL_KEYS = [[!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~]]
-- [[ UI SETUP ]] --
if CoreGui:FindFirstChild("PianoGodVault") then CoreGui.PianoGodVault:Destroy() end
local sg = Instance.new("ScreenGui", CoreGui)
sg.Name = "PianoGodVault"
-- Intro
local intro = Instance.new("Frame", sg)
intro.Size = UDim2.new(1, 0, 1, 0)
intro.BackgroundColor3 = Color3.fromRGB(10, 10, 15)
intro.ZIndex = 100
local iL = Instance.new("TextLabel", intro)
iL.Size = UDim2.new(1,0,1,0)
iL.Text = "PIANOGOD"
iL.TextColor3 = BLUE
iL.Font = Enum.Font.FredokaOne
iL.TextSize = 100
task.spawn(function()
task.wait(0.5)
TweenService:Create(iL, TweenInfo.new(0.8), {TextTransparency = 1}):Play()
TweenService:Create(intro, TweenInfo.new(1), {BackgroundTransparency = 1}):Play()
task.wait(1)
intro:Destroy()
end)
-- Main Frame
local main = Instance.new("Frame", sg)
main.Size = UDim2.new(0, 600, 0, 420)
main.Position = UDim2.new(0.5, -300, 0.4, -210)
main.BackgroundColor3 = BG
main.BorderSizePixel = 0
main.ClipsDescendants = true
main.Active = true
main.Draggable = true
Instance.new("UICorner", main)
-- Header
local head = Instance.new("Frame", main)
head.Size = UDim2.new(1, 0, 0, 55)
head.BackgroundColor3 = HEADER
Instance.new("UICorner", head)
local logo = Instance.new("TextLabel", head)
logo.Size = UDim2.new(0, 150, 1, 0)
logo.Position = UDim2.new(0, 15, 0, 0)
logo.Text = "PIANOGOD"
logo.TextColor3 = BLUE
logo.Font = Enum.Font.FredokaOne
logo.TextSize = 35
logo.TextXAlignment = 0
logo.BackgroundTransparency = 1
-- Sidebar
local nav = Instance.new("Frame", main)
nav.Size = UDim2.new(0, 130, 1, -135)
nav.Position = UDim2.new(0, 10, 0, 65)
nav.BackgroundTransparency = 1
local container = Instance.new("Frame", main)
container.Position = UDim2.new(0, 150, 0, 65)
container.Size = UDim2.new(1, -160, 1, -135)
container.BackgroundTransparency = 1
local editor = Instance.new("TextBox", container)
editor.Size = UDim2.new(1, 0, 1, 0)
editor.BackgroundColor3 = Color3.fromRGB(22, 22, 28)
editor.Text = ""
editor.PlaceholderText = "**PASTE SHEET HERE...**"
editor.MultiLine = true
editor.TextColor3 = Color3.new(1, 1, 1)
editor.Font = Enum.Font.GothamBold
editor.TextXAlignment = 0
editor.TextYAlignment = 0
editor.ClearTextOnFocus = false
Instance.new("UICorner", editor)
local libPage = Instance.new("Frame", container)
libPage.Size = UDim2.new(1, 0, 1, 0)
libPage.Visible = false
libPage.BackgroundTransparency = 1
local libScroll = Instance.new("ScrollingFrame", libPage)
libScroll.Size = UDim2.new(1, 0, 1, -50)
libScroll.Position = UDim2.new(0, 0, 0, 50)
libScroll.BackgroundTransparency = 1
libScroll.ScrollBarThickness = 2
libScroll.CanvasSize = UDim2.new(0,0,0,0)
-- Library Controls
local addBar = Instance.new("Frame", libPage)
addBar.Size = UDim2.new(1, 0, 0, 40)
addBar.BackgroundColor3 = HEADER
Instance.new("UICorner", addBar)
local addInput = Instance.new("TextBox", addBar)
addInput.Size = UDim2.new(0.75, 0, 1, 0)
addInput.BackgroundTransparency = 1
addInput.Text = ""
addInput.PlaceholderText = "NAME YOUR SONG..."
addInput.TextColor3 = Color3.new(1,1,1)
addInput.Font = Enum.Font.GothamBold
local addBtn = Instance.new("TextButton", addBar)
addBtn.Size = UDim2.new(0.2, 0, 0.8, 0)
addBtn.Position = UDim2.new(0.78, 0, 0.1, 0)
addBtn.BackgroundColor3 = BLUE
addBtn.Text = "+"
addBtn.Font = Enum.Font.GothamBold
addBtn.TextColor3 = Color3.new(1,1,1)
Instance.new("UICorner", addBtn)
local function refreshLib()
for _, child in pairs(libScroll:GetChildren()) do if child:IsA("Frame") then child:Destroy() end end
local y = 0
for i, song in pairs(UserLibrary) do
local f = Instance.new("Frame", libScroll)
f.Size = UDim2.new(1, -10, 0, 45)
f.Position = UDim2.new(0, 0, 0, y)
f.BackgroundColor3 = HEADER
Instance.new("UICorner", f)
local t = Instance.new("TextLabel", f)
t.Size = UDim2.new(0.5, 0, 1, 0)
t.Position = UDim2.new(0, 10, 0, 0)
t.Text = song.Name
t.Font = Enum.Font.GothamBold
t.TextColor3 = Color3.new(1,1,1)
t.BackgroundTransparency = 1
t.TextXAlignment = 0
local lBtn = Instance.new("TextButton", f)
lBtn.Size = UDim2.new(0.2, 0, 0.7, 0)
lBtn.Position = UDim2.new(0.55, 0, 0.15, 0)
lBtn.Text = "LOAD"
lBtn.BackgroundColor3 = BLUE
lBtn.Font = Enum.Font.GothamBold
Instance.new("UICorner", lBtn)
lBtn.MouseButton1Click:Connect(function()
editor.Text = song.Sheet
editor.Visible = true
libPage.Visible = false
end)
local dBtn = Instance.new("TextButton", f)
dBtn.Size = UDim2.new(0.15, 0, 0.7, 0)
dBtn.Position = UDim2.new(0.8, 0, 0.15, 0)
dBtn.Text = "DEL"
dBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
dBtn.Font = Enum.Font.GothamBold
Instance.new("UICorner", dBtn)
dBtn.MouseButton1Click:Connect(function()
table.remove(UserLibrary, i)
saveToDisk()
refreshLib()
end)
y = y + 50
end
libScroll.CanvasSize = UDim2.new(0,0,0,y)
end
addBtn.MouseButton1Click:Connect(function()
if addInput.Text ~= "" and editor.Text ~= "" then
table.insert(UserLibrary, {Name = addInput.Text, Sheet = editor.Text})
addInput.Text = ""
saveToDisk()
refreshLib()
end
end)
refreshLib()
-- [[ ENGINE ]] --
local function press(char)
if not char or char == "" then return end
if Remote then
local n = ALL_KEYS:find(char, 1, true)
if n then task.spawn(function() Remote:FireServer("play", n + 23) end) end
end
task.spawn(function()
local isShift = false
local k = char:upper()
if NumMap[char] then k = NumMap[char]
elseif ShiftMap[char] then isShift = true; local mapped = ShiftMap[char]; k = NumMap[mapped] or mapped
elseif char:match("%u") then isShift = true end
local vk = Enum.KeyCode[k] or Enum.KeyCode[char:upper()]
if vk then
if isShift then VIM:SendKeyEvent(true, Enum.KeyCode.LeftShift, false, game) end
VIM:SendKeyEvent(true, vk, false, game)
task.delay(0.005, function() VIM:SendKeyEvent(false, vk, false, game); if isShift then VIM:SendKeyEvent(false, Enum.KeyCode.LeftShift, false, game) end end)
end
end)
end
-- [[ PLAYBACK ]] --
local playing = false
local playThread = nil
local footer = Instance.new("Frame", main)
footer.Size = UDim2.new(1, -20, 0, 55)
footer.Position = UDim2.new(0, 10, 1, -65)
footer.BackgroundTransparency = 1
local playBtn = Instance.new("TextButton", footer)
playBtn.Size = UDim2.new(0.7, -5, 1, 0)
playBtn.Text = "START PERFORMANCE"
playBtn.Font = Enum.Font.GothamBlack
playBtn.BackgroundColor3 = BLUE
playBtn.TextColor3 = Color3.new(1,1,1)
Instance.new("UICorner", playBtn)
local bpmBox = Instance.new("TextBox", footer)
bpmBox.Size = UDim2.new(0.3, 0, 1, 0)
bpmBox.Position = UDim2.new(0.7, 5, 0, 0)
bpmBox.Text = "160"
bpmBox.Font = Enum.Font.GothamBold
bpmBox.BackgroundColor3 = HEADER
bpmBox.TextColor3 = Color3.new(1,1,1)
Instance.new("UICorner", bpmBox)
playBtn.MouseButton1Click:Connect(function()
if playing then
playing = false
if playThread then task.cancel(playThread) end
playBtn.Text = "START PERFORMANCE"
playBtn.BackgroundColor3 = BLUE
return
end
playing = true
playBtn.Text = "STOP PERFORMANCE"
playBtn.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
playThread = task.spawn(function()
while playing do
local s = editor.Text:gsub("\n", " "):gsub("\r", " ")
local i = 1
local len = #s
while i <= len and playing do
local bpm = tonumber(bpmBox.Text) or 160
local waitT = 60 / bpm
local char = s:sub(i,i)
if char == "[" or char == "{" or char == "(" then
local endC = (char == "[") and "]" or (char == "{") and "}" or ")"
local close = s:find(endC, i)
if close then
local chord = s:sub(i+1, close-1)
for j=1, #chord do local c = chord:sub(j,j); if ALL_KEYS:find(c, 1, true) then press(c) end end
i = close
task.wait(waitT)
end
elseif ALL_KEYS:find(char, 1, true) then press(char); task.wait(waitT)
elseif char == " " or char == "-" or char == "|" then task.wait(waitT) end
i = i + 1
end
task.wait(0.5) -- Loop cooldown
end
end)
end)
-- [[ NAV & MINIMIZE ]] --
local function addNav(txt, y, lib)
local b = Instance.new("TextButton", nav)
b.Size = UDim2.new(1, 0, 0, 45); b.Position = UDim2.new(0, 0, 0, y)
b.Text = txt; b.Font = Enum.Font.GothamBold; b.BackgroundColor3 = HEADER; Instance.new("UICorner", b)
b.MouseButton1Click:Connect(function() editor.Visible = not lib; libPage.Visible = lib end)
end
addNav("EDITOR", 0, false); addNav("LIBRARY", 50, true)
local mBtn = Instance.new("TextButton", head)
mBtn.Size = UDim2.new(0, 35, 0, 35); mBtn.Position = UDim2.new(1, -45, 0, 10); mBtn.Text = "-"; mBtn.Font = Enum.Font.GothamBold; Instance.new("UICorner", mBtn)
local minimized = false
mBtn.MouseButton1Click:Connect(function() minimized = not minimized; main:TweenSize(minimized and UDim2.new(0, 600, 0, 55) or UDim2.new(0, 600, 0, 420), "Out", "Quart", 0.3, true) end)
UIS.InputBegan:Connect(function(i, g) if not g and i.KeyCode == Enum.KeyCode.RightShift then main.Visible = not main.Visible end end)[ View More ]
this is a universal piano autoplayer so that you can play the piano with no talent and impress your friends!
- Works on mobile
- Yes