--[[ How to use: Commands = /copycode <<< COPIES THE SELECTED CODE /runcode <<< RUNS THE SELECTED CODE /startcode <<< SAY THIS IN CHAT TO START CODING SOME STUFF /stopcode <<< THIS FINISHES THE CODE (MUST BE USED FOR /startcode) /deletecode <<< THIS DELETES THE SELECTED CODE ]] local Player = {Chatted={}}-- = game:GetService("Players").LocalPlayer local JSONService = game:GetService("HttpService") local Loadstring = loadstring local Table = { CanOnlyStop = false, Please = false } local GuiList = {} do GuiList.Gui = Instance.new("ScreenGui",game.CoreGui) GuiList.Blox = Instance.new("TextBox",GuiList.Gui) GuiList.Gui.Name = "Bloxthon" GuiList.Blox.Size = UDim2.new(0.3,0,0.075,0) GuiList.Blox.Position = UDim2.new(0.35,0,0,0) GuiList.Blox.TextScaled = true GuiList.Blox.BackgroundTransparency = 0.5 GuiList.Blox.Text = "Click me to start coding" function Player.Chatted:Connect(func) return GuiList.Blox.FocusLost:Connect(function(Ping) if Ping then func(GuiList.Blox.Text) delay(0.01,function() GuiList.Blox.Text = "" end) end end) end function Player.Chatted:Wait() local Enabled = false repeat task.wait() Enabled = GuiList.Blox.FocusLost:Wait() until Enabled delay(0.01,function() GuiList.Blox.Text = "" end) return GuiList.Blox.Text end end if _G.Bloxthon then return warn"Running already." end _G.Bloxthon = "RUNNING" warn"Running" local SavedScripts = {} Player.Chatted:Connect(function(msg) print(msg) if Table.Please then if Table.CanOnlyStop then if msg == "/stopcode" then warn'Stopping.' Table.CanOnlyStop = false end end return end if not Table.CanOnlyStop then if msg == "/startcode" then Table.CanOnlyStop = true Table.Please = true local Hint = Instance.new("Message",workspace) Hint.Text = "Started coding." task.wait(1.75) local CodeList = {} local Connection = Player.Chatted:Connect(function(msg) if msg ~= "/stopcode" then if msg == "/removeline" then table.remove(CodeList,(#CodeList-1)) else table.insert(CodeList,msg) end end end) repeat task.wait() Hint.Text = "Lines of code: "..#CodeList.."" if not Table.CanOnlyStop then break end until false Connection:Disconnect() Hint.Text = "What should the script be named?" local scriptName = Player.Chatted:Wait() Hint.Text = "Script named: "..scriptName task.wait(2.5) Hint.Text = "Encoding..." local Encoded = JSONService:JSONEncode(CodeList) task.wait(1) Hint.Text = "Encoded! Saved script." Table.Please = false SavedScripts[scriptName] = Encoded --table.insert(SavedScripts,Encoded) task.wait(1) Hint:Destroy() elseif msg == "/runcode" then local Hint = Instance.new("Message",workspace) Hint.Text = "Script name:" local scriptname = Player.Chatted:Wait() Hint.Text = "Searching." task.wait(0.3) Hint.Text = "Searching.." task.wait(0.3) Hint.Text = "Searching..." task.wait(0.3) if SavedScripts[scriptname] then Hint.Text = "Ran "..scriptname local t = task.spawn(function() local DecodedScript = "" local DecodedJSON = JSONService:JSONDecode(SavedScripts[scriptname]) for i = 1, #DecodedJSON do if i == #DecodedJSON then DecodedScript = DecodedScript .. DecodedJSON[i] else DecodedScript = DecodedScript .. DecodedJSON[i] .. "\n" end end Loadstring(DecodedScript)(0) end) else Hint.Text = "Sorry, theres no " ..scriptname.."." end task.wait(1) Hint:Destroy() elseif msg == "/deletecode" then local Hint = Instance.new("Message",workspace) Hint.Text = "Script name:" local scriptname = Player.Chatted:Wait() Hint.Text = "Searching." task.wait(0.3) Hint.Text = "Searching.." task.wait(0.3) Hint.Text = "Searching..." task.wait(0.3) if SavedScripts[scriptname] then SavedScripts[scriptname] = nil Hint.Text = "Deleted "..scriptname else Hint.Text = "Sorry, theres no " ..scriptname..", Maybe you already deleted it?" end task.wait(1) Hint:Destroy() elseif msg == "/copycode" then local Hint = Instance.new("Message",workspace) Hint.Text = "Script name:" local scriptname = Player.Chatted:Wait() Hint.Text = "Searching." task.wait(0.3) Hint.Text = "Searching.." task.wait(0.3) Hint.Text = "Searching..." task.wait(0.3) if SavedScripts[scriptname] then setrbxclipboard(game:GetService("HttpService"):JSONDecode(SavedScripts[scriptname])) Hint.Text = "Copied "..scriptname.."'s source" else Hint.Text = "Sorry, theres no " ..scriptname.."." end task.wait(1) Hint:Destroy() end end end)