Advertisement
rewfsdg3

Untitled

Nov 2nd, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 56.08 KB | None | 0 0
  1. --[[/-------------------------------\]]--
  2. --[[ .:{ Portable Script Builder }:. ]]--
  3. --[[ (c) stephen77 || 04/28/2013 ]]--
  4. --[[ Version[Date]: 06/26/2013 ]]--
  5. --[[\-------------------------------/]]--
  6.  
  7. --[[
  8. Whats new in version 06/26/2013:
  9. - FPS (@Frostftw)
  10. - Gui tweens
  11. - Minor Bug Fix (4): #1. CreateLocal error Handling
  12. #2. CreateLocal environment
  13. #3. Scroll-buttons '>' and '<' now depends on TextFit
  14. #4. ZIndex fix
  15. - Faster RunLocal
  16.  
  17. Full update list:
  18. [06/22/2013]: - Menu
  19. - Differentiate between Run, Error, and Print
  20. [06/12/2013]: - Can be used in other security context as well
  21. [06/11/2013]: - Now you can close output!
  22. - Main gui now supports cl, and l
  23. - Draggable output! (Drag on the title!)
  24. [06/10/2013]: - Renewed output
  25. - Scroll-buttons!
  26. [06/08/2013]: - Fixed output
  27. - New main gui!
  28. [06/06/2013]: - Portable SB now optimized for Security Context 7
  29.  
  30. To do:
  31. - Damned scrollbar.
  32. - How about an auto-update?
  33. ]]--
  34.  
  35. wait();
  36. if _G.PortableSBRan == nil or _G.PortableSBRan == false then
  37.  
  38. if pcall(function() return settings() end) then pcall(function() script.Parent = _Portable_SB_; end) end
  39. pcall(function() script.Parent = nil; end)
  40.  
  41. Services = setmetatable(getmetatable(newproxy(true)), {__index = function(o, k) return game:service(k) or nil end; __call = function(o, k) return game:service(k) or nil end; __tostring = function(o, k) return "Services List" end; __metatable = "This metatable has been locked";});
  42. LocalPlayer = game:service'Players'.LocalPlayer;
  43. Appearance, NameChosen = LocalPlayer.CharacterAppearance, LocalPlayer.Name;
  44. local GuiParent = pcall(function() game:service'CoreGui'.Name = game:service'CoreGui'.Name end) and game:service'CoreGui' or LocalPlayer.PlayerGui
  45. local OutputGui, GuiPositionIndex, MaxStack, CurrentPosition, CurrentSub, TextList, TextClass, OutputFrame, MouseHold, MousePosition = Instance.new("ScreenGui"), {}, 15, 1, 1, {}, {["P"] = {}; ["E"] = {}; ["R"] = {};}, nil, "None", UDim2.new();
  46. local UsingEnter, UseChat, NoClip = false, false, true;
  47. local Version = "06/26/2013 [STABLE]"
  48. pcall(function() OutputGui.Name = "[Portable SB] - Output"; end);
  49. pcall(function() OutputGui.Parent = GuiParent; end);
  50.  
  51. --[[ Important Function ]]--
  52. local CreateLine, SetZIndex;
  53. function CreateLine(Position)
  54. if GuiPositionIndex[Position] ~= nil then return GuiPositionIndex[Position] end
  55. local NewLine = Instance.new("TextButton", OutputFrame)
  56. NewLine.Name = "[Portable SB] - OutputLine"
  57. NewLine.FontSize = "Size9"
  58. NewLine.Size = UDim2.new(1, -15, 0, 15)
  59. NewLine.Position = UDim2.new(0, 0, 0, (Position * 15) + 10)
  60. NewLine.TextXAlignment = "Left"
  61. NewLine.BorderSizePixel = 0
  62. NewLine.TextWrapped = true;
  63. NewLine.BackgroundColor3 = Color3.new(.5, .5, .5)
  64. NewLine.BackgroundTransparency = .5
  65. NewLine.BorderColor3 = Color3.new(1, 1, 1)
  66. NewLine.TextStrokeColor3 = Color3.new()
  67. NewLine.TextStrokeTransparency = 0.7
  68. NewLine.ZIndex = 1;
  69. GuiPositionIndex[Position] = NewLine;
  70. return NewLine
  71. end
  72. function SetZIndex(Prn, ZIdx)
  73. pcall(function() Prn.ZIndex = ZIdx; end);
  74. if #Prn:children() > 0 then
  75. for i, v in pairs(Prn:children()) do
  76. coroutine.resume(coroutine.create(SetZIndex), v, ZIdx);
  77. end
  78. end
  79. end
  80. --[[ End of Important Function ]]--
  81.  
  82.  
  83. --[[ Shared ]]--
  84. function CheckPermissions()
  85. local ran, err = pcall(function() return settings() end)
  86. return ran
  87. end
  88. function print(...)
  89. local time = tick()
  90. local hour = math.floor((time % 86400) / 3600)
  91. local minute = math.floor((time % 3600) / 60)
  92. local second = math.floor(time % 60)
  93. hour = string.len(hour) == 2 and hour or "0" .. hour
  94. minute = string.len(minute) == 2 and minute or "0" .. minute
  95. second = string.len(second) == 2 and second or "0" .. second
  96. local Msg = "";
  97. local args = {...}
  98. local pos = #TextList + 1
  99. local function lastIndex(t)
  100. local last = 0;
  101. for i, v in pairs(t) do
  102. last = i > last and i or last;
  103. end
  104. return last;
  105. end
  106. for i = 1, lastIndex(args) do
  107. local v = args[i];
  108. Msg = Msg .. tostring(v) .. "\t";
  109. end
  110. Msg = Msg:gsub("\n", " "):gsub("\t", " ");
  111. Msg = " [" .. hour .. ":" .. minute .. ":" .. second .. "]\t" .. string.sub(Msg, 1, string.len(Msg) - 1);
  112. TextList[pos] = Msg;
  113. TextClass["P"][pos] = true;
  114. if (pos - MaxStack) == CurrentPosition then
  115. CurrentPosition = CurrentPosition + 1
  116. for i = CurrentPosition, MaxStack + CurrentPosition - 1 do
  117. local posx = (i - CurrentPosition) + 1
  118. if TextList[i] ~= nil then
  119. local line = CreateLine(posx);
  120. line.TextColor3 = TextClass["P"][i] ~= nil and TextClass["P"][i] and Color3.new(1, 1, 1) or TextClass["E"][i] ~= nil and TextClass["E"][i] and Color3.new(1, 0, 0) or TextClass["R"][i] ~= nil and TextClass["R"][i] and Color3.new(0, 1, 0);
  121. line.Text = string.sub(TextList[i], CurrentSub)
  122. else
  123. if GuiPositionIndex[posx] ~= nil then
  124. GuiPositionIndex[posx].Parent = nil;
  125. GuiPositionIndex[posx] = nil;
  126. end
  127. end
  128. end
  129. end
  130. if (pos - CurrentPosition + 1) <= MaxStack then
  131. local line = CreateLine(pos - CurrentPosition + 1);
  132. line.TextColor3 = Color3.new(1, 1, 1);
  133. line.Text = string.sub(Msg, CurrentSub);
  134. end
  135. end
  136. function GetRecursiveChildren(Parent)
  137. local ret = {}
  138. for i, v in pairs(Parent:GetChildren()) do
  139. if #v:GetChildren() > 0 then
  140. local childs = GetRecursiveChildren(v)
  141. for i1, v1 in pairs(childs) do
  142. ret[#ret + 1] = v1
  143. end
  144. end
  145. ret[#ret + 1] = v
  146. end
  147. return ret
  148. end
  149. function UnFilter(Msg)
  150. local newMsg = ""
  151. for i = 1, string.len(Msg) do
  152. newMsg = newMsg .. string.sub(Msg, i, i) .. "\127"
  153. end
  154. return newMsg
  155. end
  156. --[[ End of Shared ]]--
  157.  
  158. --[[ Non - Shared ]]--
  159. local function customError(msg, scr)
  160. local msg = (tostring(msg) == nil or tostring(msg) == "") and "Unknown Error" or tostring(msg);
  161. local pattern = ":(%d+):"
  162. local match = string.match(msg, pattern)
  163. local time = tick()
  164. local hour = math.floor((time % 86400) / 3600)
  165. local minute = math.floor((time % 3600) / 60)
  166. local second = math.floor(time % 60)
  167. hour = string.len(hour) == 2 and hour or "0" .. hour
  168. minute = string.len(minute) == 2 and minute or "0" .. minute
  169. second = string.len(second) == 2 and second or "0" .. second
  170. local function GetLine(msg, line)
  171. if msg == nil or tonumber(line) == nil then return end
  172. local line = tonumber(line) - 1
  173. for i = 1, line do
  174. if string.find(msg, "\n") then local f = string.find(msg, "\n") msg = string.sub(msg, f + 1) end
  175. end
  176. if string.find(msg, "\n") then local f = string.find(msg, "\n") msg = string.sub(msg, 1, f - 1) end
  177. return msg
  178. end
  179. if match then
  180. local st, en = string.find(msg, pattern)
  181. local rm
  182. if scr then
  183. local line = GetLine(scr, match)
  184. local txt = string.len(line) <= 25 and line or string.sub(line, 1, 22) .. "..."
  185. rm = '[string "' .. txt .. '"]:' .. string.sub(msg, en + 1)
  186. else
  187. rm = string.sub(msg, en + 1)
  188. end
  189. msg = rm;
  190. end
  191. local pos = #TextList + 1
  192. msg = " [" .. hour .. ":" .. minute .. ":" .. second .. "]\t" .. msg;
  193. TextList[pos] = msg;
  194. TextClass["E"][pos] = true;
  195. if (pos - MaxStack) == CurrentPosition then
  196. CurrentPosition = CurrentPosition + 1
  197. for i = CurrentPosition, MaxStack + CurrentPosition - 1 do
  198. local posx = (i - CurrentPosition) + 1
  199. if TextList[i] ~= nil then
  200. local line = CreateLine(posx);
  201. line.TextColor3 = TextClass["P"][i] ~= nil and TextClass["P"][i] and Color3.new(1, 1, 1) or TextClass["E"][i] ~= nil and TextClass["E"][i] and Color3.new(1, 0, 0) or TextClass["R"][i] ~= nil and TextClass["R"][i] and Color3.new(0, 1, 0);
  202. line.Text = string.sub(TextList[i], CurrentSub)
  203. else
  204. if GuiPositionIndex[posx] ~= nil then
  205. GuiPositionIndex[posx].Parent = nil;
  206. GuiPositionIndex[posx] = nil;
  207. end
  208. end
  209. end
  210. end
  211. if (pos - CurrentPosition + 1) <= MaxStack then
  212. local line = CreateLine(pos - CurrentPosition + 1);
  213. line.TextColor3 = Color3.new(1, 0, 0);
  214. line.Text = string.sub(msg, CurrentSub);
  215. end
  216. end
  217. local function createRun(msg)
  218. local time = tick()
  219. local hour = math.floor((time % 86400) / 3600)
  220. local minute = math.floor((time % 3600) / 60)
  221. local second = math.floor(time % 60)
  222. hour = string.len(hour) == 2 and hour or "0" .. hour
  223. minute = string.len(minute) == 2 and minute or "0" .. minute
  224. second = string.len(second) == 2 and second or "0" .. second
  225. local pos = #TextList + 1
  226. msg = " [" .. hour .. ":" .. minute .. ":" .. second .. "]\t" .. msg;
  227. TextList[pos] = msg;
  228. TextClass["R"][pos] = true;
  229. if (pos - MaxStack) == CurrentPosition then
  230. CurrentPosition = CurrentPosition + 1
  231. for i = CurrentPosition, MaxStack + CurrentPosition - 1 do
  232. local posx = (i - CurrentPosition) + 1
  233. if TextList[i] ~= nil then
  234. local line = CreateLine(posx);
  235. line.TextColor3 = TextClass["P"][i] ~= nil and TextClass["P"][i] and Color3.new(1, 1, 1) or TextClass["E"][i] ~= nil and TextClass["E"][i] and Color3.new(1, 0, 0) or TextClass["R"][i] ~= nil and TextClass["R"][i] and Color3.new(0, 1, 0);
  236. line.Text = string.sub(TextList[i], CurrentSub)
  237. else
  238. if GuiPositionIndex[posx] ~= nil then
  239. GuiPositionIndex[posx].Parent = nil;
  240. GuiPositionIndex[posx] = nil;
  241. end
  242. end
  243. end
  244. end
  245. if (pos - CurrentPosition + 1) <= MaxStack then
  246. local line = CreateLine(pos - CurrentPosition + 1);
  247. line.TextColor3 = Color3.new(0, 1, 0);
  248. line.Text = string.sub(msg, CurrentSub);
  249. end
  250. end
  251. local function fake_loadstring(...)
  252. local args = {...}
  253. local rets = {loadstring(unpack(args))}
  254. return unpack(rets)
  255. end
  256. local function FindPlayer(str)
  257. local str = tostring(str) or " "
  258. local rtn = {};
  259. if str == "me" then
  260. table.insert(rtn, LocalPlayer);
  261. elseif str == "all" then
  262. for i, v in pairs(game:service'Players':GetPlayers()) do
  263. if v ~= LocalPlayer then
  264. table.insert(rtn, v)
  265. end
  266. end
  267. table.insert(rtn, LocalPlayer)
  268. elseif str == "random" then
  269. rtn = {game:service'Players':GetPlayers()[math.random(#game:service'Players':GetPlayers())]}
  270. else
  271. for i, v in pairs(game:service'Players':GetPlayers()) do
  272. if str == "others" then
  273. if v ~= LocalPlayer then
  274. table.insert(rtn, v)
  275. end
  276. elseif str == "teams" then
  277. if v.TeamColor == LocalPlayer.TeamColor then
  278. table.insert(rtn, v);
  279. end
  280. elseif str == "nonteams" then
  281. if v.TeamColor ~= LocalPlayer.TeamColor then
  282. table.insert(rtn, v);
  283. end
  284. else
  285. if string.find(v.Name:lower(), str:lower()) then
  286. table.insert(rtn, v);
  287. end
  288. end
  289. end
  290. end
  291. return rtn;
  292. end
  293. local function MakeChat(Msg)
  294. local Msg = tostring(Msg) or " "
  295. Msg = Msg:gsub("\n", " "):gsub("\t", " ");
  296. coroutine.wrap(function()
  297. local function TweenColor3(obj, properties)
  298. local R, G, B = math.random(), math.random(), math.random();
  299. for x = 1, 3 do
  300. for i = 1, 50 do
  301. obj[properties] = x == 1 and Color3.new(R + i/50, G, B) or x == 2 and Color3.new(R + 1, G + i/50, B) or x == 3 and Color3.new(R + 1, G + 1, B + i/50);
  302. wait();
  303. end
  304. end
  305. end
  306. local Part = Instance.new("Part", LocalPlayer.Character)
  307. Part.CanCollide = false
  308. Part.Transparency = 1
  309. Part.Locked = true;
  310. Part.Anchored = true;
  311. Part:BreakJoints()
  312. local BBG = Instance.new("BillboardGui", Part)
  313. BBG.Adornee = Part
  314. BBG.Size = UDim2.new(0, 10 * string.len(Msg), 0, 30)
  315. BBG.StudsOffset = Vector3.new(0, 1, 0)
  316. local Txt = Instance.new("TextLabel", BBG)
  317. Txt.Text = Msg
  318. Txt.BackgroundTransparency = 1
  319. Txt.Font = "ArialBold"
  320. Txt.FontSize = "Size24"
  321. Txt.BackgroundColor3 = Color3.new(1,1,1)
  322. Txt.Size = UDim2.new(1, 0, 1, 0)
  323. coroutine.wrap(function() TweenColor3(Txt, "TextColor3") end)();
  324. coroutine.resume(coroutine.create(function()
  325. while Part.Parent == LocalPlayer.Character do
  326. Part.CFrame = LocalPlayer.Character.Head.CFrame * CFrame.new(0, 3, 0);
  327. wait();
  328. end
  329. end))
  330. coroutine.resume(coroutine.create(function()
  331. for i = 3, 250 do
  332. BBG.StudsOffset = Vector3.new(0, 1 + (i / 25), 0);
  333. Txt.TextTransparency = i / 250;
  334. wait()
  335. end
  336. Part.Parent = nil;
  337. end))
  338. end)()
  339. end
  340. --[[ End of Non - Shared ]]--
  341.  
  342. --[[ Output GUI ]]--
  343. local DraggingFrame = Instance.new("Frame", OutputGui);
  344. DraggingFrame.Name = "[Portable SB] - DraggingFrame";
  345. DraggingFrame.Size = UDim2.new(1, 1, 1, 1);
  346. DraggingFrame.Position = UDim2.new(0, 0, 0, 0);
  347. DraggingFrame.BackgroundTransparency = 1;
  348. DraggingFrame.MouseMoved:connect(function(X, Y)
  349. coroutine.wrap(function()
  350. if MouseHold == "OutputTitle" then
  351. pcall(function() OutputFrame.Position = UDim2.new(0, X, 0, Y) - MousePosition; end)
  352. elseif MouseHold == "MenuTitle" then
  353. pcall(function() OutputGui["[Portable SB] - MenuFrame"].Position = UDim2.new(0, X, 0, Y) - MousePosition; end)
  354. end
  355. end)()
  356. end)
  357. OutputFrame = Instance.new("Frame", OutputGui);
  358. OutputFrame.Name = "[Portable SB] - OutputFrame";
  359. OutputFrame.Size = UDim2.new(0.4, 15, 0, 270);
  360. OutputFrame.Position = UDim2.new(0, 5, 1, -350);
  361. OutputFrame.BackgroundColor3 = Color3.new(0, 0, 0);
  362. OutputFrame.BackgroundTransparency = .5;
  363. local OutputTitle = Instance.new("TextButton", OutputFrame)
  364. OutputTitle.Name = "[Portable SB] - OutputTitle"
  365. OutputTitle.FontSize = "Size10"
  366. OutputTitle.Size = UDim2.new(1, -45, 0, 15)
  367. OutputTitle.Position = UDim2.new(0, 0, 0, 5)
  368. OutputTitle.BackgroundColor3 = Color3.new(.5, .5, .5)
  369. OutputTitle.BackgroundTransparency = .5
  370. OutputTitle.TextColor3 = Color3.new(1, 1, 1);
  371. OutputTitle.TextStrokeColor3 = Color3.new(0, 0, 0)
  372. OutputTitle.TextStrokeTransparency = 0.7
  373. OutputTitle.TextXAlignment = "Left"
  374. OutputTitle.BorderSizePixel = 0
  375. OutputTitle.TextWrapped = true;
  376. OutputTitle.Text = " [Portable SB] - Output"
  377. OutputTitle.MouseButton1Down:connect(function(X, Y)
  378. MouseHold = "OutputTitle"
  379. MousePosition = UDim2.new(0, X, 0, Y) - OutputFrame.Position
  380. end)
  381. OutputTitle.MouseButton1Up:connect(function()
  382. MouseHold = "None"
  383. end)
  384. local ShowNote = Instance.new("TextLabel", OutputTitle)
  385. ShowNote.Name = "[Portable SB] - Note"
  386. ShowNote.FontSize = "Size10"
  387. ShowNote.Size = UDim2.new(1, 0, 1, 0)
  388. ShowNote.Position = UDim2.new(0, 0, 0, 0)
  389. ShowNote.BackgroundTransparency = 1
  390. ShowNote.TextColor3 = Color3.new(1, 1, 1);
  391. ShowNote.TextStrokeColor3 = Color3.new(0, 0, 0)
  392. ShowNote.TextStrokeTransparency = 0.7
  393. ShowNote.TextXAlignment = "Right"
  394. ShowNote.BorderSizePixel = 0
  395. ShowNote.TextWrapped = true;
  396. coroutine.resume(coroutine.create(function()
  397. repeat
  398. local FPS, ModF = math.modf(1/wait());
  399. local hour, minute, second = math.floor((tick() % 86400) / 3600), math.floor((tick() % 3600) / 60), math.floor(tick() % 60);
  400. hour, minute, second = string.len(hour) == 2 and hour or "0" .. hour, string.len(minute) == 2 and minute or "0" .. minute, string.len(second) == 2 and second or "0" .. second;
  401. ShowNote.Text = "[" .. hour .. ":" .. minute .. ":" .. second .. "]\tFPS [" .. FPS .. "] ";
  402. until nil;
  403. end))
  404. local Button_CLEAR = Instance.new("TextButton", OutputTitle)
  405. Button_CLEAR.Name = "[Portable SB] - ClearOutput"
  406. Button_CLEAR.Size = UDim2.new(0, 15, 0, 15)
  407. Button_CLEAR.Position = UDim2.new(1, 0, 0, 0)
  408. Button_CLEAR.Text = "C"
  409. Button_CLEAR.BackgroundColor3 = Color3.new(1, 1, 1)
  410. Button_CLEAR.BackgroundTransparency = 0;
  411. Button_CLEAR.BorderColor3 = Color3.new(1, 1, 1)
  412. Button_CLEAR.TextColor3 = Color3.new(0, 0, 0);
  413. Button_CLEAR.TextStrokeColor3 = Color3.new(1, 1, 1)
  414. Button_CLEAR.FontSize = "Size10"
  415. Button_CLEAR.TextStrokeTransparency = 0.7
  416. Button_CLEAR.BorderSizePixel = 0
  417. Button_CLEAR.MouseButton1Down:connect(function()
  418. coroutine.wrap(function()
  419. for i = 1, MaxStack do
  420. if GuiPositionIndex[i] ~= nil then
  421. GuiPositionIndex[i].Parent = nil;
  422. GuiPositionIndex[i] = nil;
  423. end
  424. TextList = {};
  425. TextClass = {["P"] = {}; ["E"] = {}; ["R"] = {};}
  426. CurrentPosition = 1;
  427. CurrentSub = 1;
  428. end
  429. end)()
  430. end)
  431. local Button_MENU = Instance.new("TextButton", OutputTitle) ;
  432. Button_MENU.Name = "[Portable SB] - Menu";
  433. Button_MENU.Size = UDim2.new(0, 15, 0, 15);
  434. Button_MENU.Position = UDim2.new(1, 15, 0, 0);
  435. Button_MENU.Text = "M";
  436. Button_MENU.BackgroundColor3 = Color3.new(1, 1, 0);
  437. Button_MENU.BackgroundTransparency = 0;
  438. Button_MENU.TextColor3 = Color3.new(0, 0, 0);
  439. Button_MENU.TextStrokeColor3 = Color3.new(1, 1, 1);
  440. Button_MENU.FontSize = "Size10";
  441. Button_MENU.TextStrokeTransparency = 0.7;
  442. Button_MENU.BorderSizePixel = 0;
  443. Button_MENU.MouseButton1Down:connect(function()
  444. coroutine.wrap(function()
  445. if OutputGui:FindFirstChild("[Portable SB] - MenuFrame") == nil then
  446. local MenuFrame = Instance.new("Frame", OutputGui);
  447. MenuFrame.Name = "[Portable SB] - MenuFrame";
  448. MenuFrame.Size = UDim2.new(0, 15, 0, 15);
  449. MenuFrame.Position = UDim2.new(0, Button_MENU.AbsolutePosition.X, 0, Button_MENU.AbsolutePosition.Y);
  450. MenuFrame.BackgroundColor3 = Color3.new(0, 0, 0);
  451. MenuFrame.BackgroundTransparency = .5;
  452. MenuFrame:TweenSizeAndPosition(UDim2.new(0.4,0,0,150), UDim2.new(0.3,0,0.5,-125), 1, 1, 0.25, false);
  453. local MenuTitle = Instance.new("TextButton", MenuFrame)
  454. MenuTitle.Name = "[Portable SB] - MenuTitle"
  455. MenuTitle.FontSize = "Size10"
  456. MenuTitle.Size = UDim2.new(1, -15, 0, 15)
  457. MenuTitle.Position = UDim2.new(0, 0, 0, 5)
  458. MenuTitle.BackgroundColor3 = Color3.new(.5, .5, .5)
  459. MenuTitle.BackgroundTransparency = .5
  460. MenuTitle.TextColor3 = Color3.new(1, 1, 1);
  461. MenuTitle.TextStrokeColor3 = Color3.new(0, 0, 0)
  462. MenuTitle.TextStrokeTransparency = 0.7
  463. MenuTitle.TextXAlignment = "Left"
  464. MenuTitle.BorderSizePixel = 0
  465. MenuTitle.TextWrapped = true;
  466. MenuTitle.Text = " [Portable SB] - Menu"
  467. MenuTitle.MouseButton1Down:connect(function(X, Y)
  468. MouseHold = "MenuTitle"
  469. MousePosition = UDim2.new(0, X, 0, Y) - MenuFrame.Position
  470. end)
  471. MenuTitle.MouseButton1Up:connect(function()
  472. MouseHold = "None"
  473. end)
  474. local Button_MenuCLOSE = Instance.new("TextButton", MenuTitle)
  475. Button_MenuCLOSE.Name = "[Portable SB] - CloseOutput"
  476. Button_MenuCLOSE.Size = UDim2.new(0, 15, 0, 15)
  477. Button_MenuCLOSE.Position = UDim2.new(1, 0, 0, 0)
  478. Button_MenuCLOSE.Text = "X"
  479. Button_MenuCLOSE.BackgroundColor3 = Color3.new(1, 0, 0)
  480. Button_MenuCLOSE.BackgroundTransparency = 0;
  481. Button_MenuCLOSE.BorderColor3 = Color3.new(1, 1, 1)
  482. Button_MenuCLOSE.TextColor3 = Color3.new(1, 1, 1);
  483. Button_MenuCLOSE.TextStrokeColor3 = Color3.new(0, 0, 0)
  484. Button_MenuCLOSE.FontSize = "Size10"
  485. Button_MenuCLOSE.TextStrokeTransparency = 0.7
  486. Button_MenuCLOSE.BorderSizePixel = 0
  487. Button_MenuCLOSE.MouseButton1Down:connect(function()
  488. MenuFrame:ClearAllChildren();
  489. MenuFrame:TweenSizeAndPosition(UDim2.new(0,15,0,15), UDim2.new(0, Button_MENU.AbsolutePosition.X, 0, Button_MENU.AbsolutePosition.Y), 1, 1, 0.25, false);
  490. game:service'Debris':AddItem(MenuFrame, 0.25);
  491. end)
  492. local Vars = setmetatable({}, {
  493. __index = function(o, k)
  494. if k == "NoClip" then return NoClip;
  495. elseif k == "UseChat" then return UseChat;
  496. elseif k == "UseEnter" or k == "UsingEnter" then return UsingEnter;
  497. end
  498. end;
  499. __newindex = function(o, k, v)
  500. pcall(function()
  501. if k == "NoClip" then NoClip = v;
  502. elseif k == "UseChat" then UseChat = v;
  503. elseif k == "UseEnter" or k == "UsingEnter" then UsingEnter = v;
  504. end
  505. end)
  506. end;
  507. });
  508. for i, v in pairs({"NoClip"; "UseChat"; "UseEnter";}) do
  509. local Button_Option, Status_Option;
  510. Button_Option = Instance.new("TextButton", MenuFrame)
  511. Button_Option.Name = "[Portable SB] - Button_Option"
  512. Button_Option.FontSize = "Size10"
  513. Button_Option.Size = UDim2.new(0.80, 0, 0, 15)
  514. Button_Option.Position = UDim2.new(0, 0, 0, 10 + (15 * i))
  515. Button_Option.BackgroundColor3 = Color3.new(.5, .5, .5)
  516. Button_Option.BackgroundTransparency = .5
  517. Button_Option.TextColor3 = Color3.new(1, 1, 1);
  518. Button_Option.TextStrokeColor3 = Color3.new(0, 0, 0)
  519. Button_Option.TextStrokeTransparency = 0.7
  520. Button_Option.TextXAlignment = "Left"
  521. Button_Option.BorderSizePixel = 0
  522. Button_Option.TextWrapped = true;
  523. Button_Option.Text = "\t" .. v
  524. Button_Option.MouseButton1Down:connect(function()
  525. Vars[v] = not Vars[v];
  526. pcall(function()
  527. Status_Option.Text = Vars[v] and "[ENABLED]" or "[DISABLED]";
  528. Status_Option.TextColor3 = Vars[v] and Color3.new(0, 1, 0) or Color3.new(1, 0, 0);
  529. end);
  530. end)
  531. Status_Option = Instance.new("TextLabel", MenuFrame)
  532. Status_Option.Name = "[Portable SB] - Status_Option"
  533. Status_Option.Font = "ArialBold";
  534. Status_Option.FontSize = "Size12"
  535. Status_Option.Size = UDim2.new(0.20, 0, 0, 15)
  536. Status_Option.Position = UDim2.new(0.80, 0, 0, 10 + (15 * i))
  537. Status_Option.BackgroundTransparency = 1
  538. Status_Option.TextColor3 = Vars[v] and Color3.new(0, 1, 0) or Color3.new(1, 0, 0);
  539. Status_Option.TextStrokeColor3 = Color3.new(0, 0, 0)
  540. Status_Option.TextStrokeTransparency = 0.7
  541. Status_Option.TextXAlignment = "Right"
  542. Status_Option.BorderSizePixel = 0
  543. Status_Option.TextWrapped = true;
  544. Status_Option.Text = Vars[v] and "[ENABLED]" or "[DISABLED]";
  545. end
  546. coroutine.resume(coroutine.create(SetZIndex), MenuFrame, 2);
  547. else
  548. local MenuFrame = OutputGui:FindFirstChild("[Portable SB] - MenuFrame");
  549. MenuFrame.Archivable = true;
  550. local MenuClone = MenuFrame:clone();
  551. MenuClone.Name = "[Portable SB] - FakeMenuFrame";
  552. MenuClone.Parent = MenuFrame.Parent;
  553. MenuFrame:Destroy();
  554. MenuClone:ClearAllChildren();
  555. MenuClone:TweenSizeAndPosition(UDim2.new(0,15,0,15), UDim2.new(0, Button_MENU.AbsolutePosition.X, 0, Button_MENU.AbsolutePosition.Y), 1, 1, 0.25, false);
  556. game:service'Debris':AddItem(MenuClone, 0.25);
  557. end
  558. end)()
  559. end)
  560. local Button_CLOSE = Instance.new("TextButton", OutputTitle)
  561. Button_CLOSE.Name = "[Portable SB] - CloseOutput"
  562. Button_CLOSE.Size = UDim2.new(0, 15, 0, 15)
  563. Button_CLOSE.Position = UDim2.new(1, 30, 0, 0)
  564. Button_CLOSE.Text = "X"
  565. Button_CLOSE.BackgroundColor3 = Color3.new(1, 0, 0)
  566. Button_CLOSE.BackgroundTransparency = 0;
  567. Button_CLOSE.BorderColor3 = Color3.new(1, 1, 1)
  568. Button_CLOSE.TextColor3 = Color3.new(1, 1, 1);
  569. Button_CLOSE.TextStrokeColor3 = Color3.new(0, 0, 0)
  570. Button_CLOSE.FontSize = "Size10"
  571. Button_CLOSE.TextStrokeTransparency = 0.7
  572. Button_CLOSE.BorderSizePixel = 0
  573. Button_CLOSE.MouseButton1Down:connect(function()
  574. coroutine.wrap(function()
  575. if OutputGui:FindFirstChild("[Portable SB] - MenuFrame") then
  576. local MenuFrame = OutputGui:FindFirstChild("[Portable SB] - MenuFrame")
  577. MenuFrame.Archivable = true;
  578. local MenuClone = MenuFrame:clone();
  579. MenuClone.Name = "[Portable SB] - FakeMenuFrame";
  580. MenuClone.Parent = MenuFrame.Parent;
  581. MenuFrame:Destroy();
  582. MenuClone:ClearAllChildren();
  583. MenuClone:TweenSizeAndPosition(UDim2.new(0,15,0,15), UDim2.new(0, Button_MENU.AbsolutePosition.X, 0, Button_MENU.AbsolutePosition.Y), 1, 1, 0.25, false);
  584. game:service'Debris':AddItem(MenuClone, 0.25);
  585. wait(.25);
  586. end
  587. OutputFrame.Archivable = true;
  588. local OutputClone = OutputFrame:clone();
  589. OutputClone.Name = "[Portable SB] - FakeOutputFrame";
  590. OutputClone.Parent = OutputFrame.Parent;
  591. OutputFrame.Parent = nil;
  592. OutputClone:ClearAllChildren();
  593. OutputClone:TweenSizeAndPosition(UDim2.new(0, 135, 0, 15), UDim2.new(0, 1, 1, -75), 1, 1, 0.25, false);
  594. game:service'Debris':AddItem(OutputClone, 0.25);
  595. wait(.25);
  596. local Button_SHOW = Instance.new("TextButton", OutputGui)
  597. Button_SHOW.Name = "[Portable SB] - Button_SHOW"
  598. Button_SHOW.FontSize = "Size10"
  599. Button_SHOW.Size = UDim2.new(0, 135, 0, 15)
  600. Button_SHOW.Position = UDim2.new(0, 1, 1, -75)
  601. Button_SHOW.BackgroundColor3 = Color3.new(.5, .5, .5)
  602. Button_SHOW.BackgroundTransparency = .75
  603. Button_SHOW.BorderColor3 = Color3.new(1, 1, 1)
  604. Button_SHOW.TextColor3 = Color3.new(1, 1, 1);
  605. Button_SHOW.TextStrokeColor3 = Color3.new(0, 0, 0)
  606. Button_SHOW.TextStrokeTransparency = 0.75
  607. Button_SHOW.BorderSizePixel = 0
  608. Button_SHOW.TextWrapped = true;
  609. Button_SHOW.Text = "[Portable SB] - Output"
  610. Button_SHOW.MouseButton1Down:connect(function()
  611. coroutine.wrap(function()
  612. game:service'Debris':AddItem(Button_SHOW, 0);
  613. local RealPos, RealSize = OutputFrame.Position, OutputFrame.Size;
  614. OutputFrame.Size = UDim2.new(0, 135, 0, 15)
  615. OutputFrame.Position = UDim2.new(0, 1, 1, -75)
  616. OutputFrame.Parent = OutputGui;
  617. OutputFrame:TweenSizeAndPosition(RealSize, RealPos, 1, 1, 0.25, false);
  618. end)()
  619. end)
  620. end)()
  621. end)
  622. local Button_UP = Instance.new("TextButton", OutputFrame)
  623. Button_UP.Name = "[Portable SB] - Scrollbar_UP"
  624. Button_UP.Size = UDim2.new(0, 15, 0, 15)
  625. Button_UP.Position = UDim2.new(1, -15, 0, 25)
  626. Button_UP.Text = "^"
  627. Button_UP.BackgroundColor3 = Color3.new(.5, .5, .5)
  628. Button_UP.BackgroundTransparency = 0.5;
  629. Button_UP.BorderColor3 = Color3.new(1, 1, 1)
  630. Button_UP.TextColor3 = Color3.new(1, 1, 1);
  631. Button_UP.TextStrokeColor3 = Color3.new(0, 0, 0)
  632. Button_UP.FontSize = "Size12"
  633. Button_UP.TextStrokeTransparency = 0.7
  634. Button_UP.BorderSizePixel = 0
  635. Button_UP.MouseButton1Down:connect(function()
  636. coroutine.wrap(function()
  637. MouseHold = "Button_UP"
  638. CurrentPosition = CurrentPosition - 1 >= 1 and CurrentPosition - 1 or CurrentPosition
  639. for i = CurrentPosition, MaxStack + CurrentPosition - 1 do
  640. local pos = (i - CurrentPosition) + 1
  641. if TextList[i] ~= nil then
  642. local line = CreateLine(pos);
  643. line.Text = string.sub(TextList[i], CurrentSub)
  644. line.TextColor3 = TextClass["P"][i] ~= nil and TextClass["P"][i] and Color3.new(1, 1, 1) or TextClass["E"][i] ~= nil and TextClass["E"][i] and Color3.new(1, 0, 0) or TextClass["R"][i] ~= nil and TextClass["R"][i] and Color3.new(0, 1, 0);
  645. end
  646. end
  647. end)()
  648. end)
  649. Button_UP.MouseButton1Up:connect(function()
  650. MouseHold = "None";
  651. end)
  652. local Button_DOWN = Instance.new("TextButton", OutputFrame)
  653. Button_DOWN.Name = "[Portable SB] - Scrollbar_DOWN"
  654. Button_DOWN.Size = UDim2.new(0, 15, 0, 15)
  655. Button_DOWN.Position = UDim2.new(1, -15, 0, 235)
  656. Button_DOWN.Text = "v"
  657. Button_DOWN.BackgroundColor3 = Color3.new(.5, .5, .5)
  658. Button_DOWN.BackgroundTransparency = 0.5;
  659. Button_DOWN.BorderColor3 = Color3.new(1, 1, 1)
  660. Button_DOWN.TextColor3 = Color3.new(1, 1, 1);
  661. Button_DOWN.TextStrokeColor3 = Color3.new(0, 0, 0)
  662. Button_DOWN.FontSize = "Size10"
  663. Button_DOWN.TextStrokeTransparency = 0.7
  664. Button_DOWN.BorderSizePixel = 0
  665. Button_DOWN.MouseButton1Down:connect(function()
  666. coroutine.wrap(function()
  667. MouseHold = "Button_DOWN"
  668. CurrentPosition = TextList[CurrentPosition + 1] ~= nil and CurrentPosition + 14 < #TextList and CurrentPosition + 1 or CurrentPosition
  669. for i = CurrentPosition, MaxStack + CurrentPosition - 1 do
  670. local pos = (i - CurrentPosition) + 1
  671. if TextList[i] ~= nil then
  672. local line = CreateLine(pos);
  673. line.Text = string.sub(TextList[i], CurrentSub)
  674. line.TextColor3 = TextClass["P"][i] ~= nil and TextClass["P"][i] and Color3.new(1, 1, 1) or TextClass["E"][i] ~= nil and TextClass["E"][i] and Color3.new(1, 0, 0) or TextClass["R"][i] ~= nil and TextClass["R"][i] and Color3.new(0, 1, 0);
  675. else
  676. if GuiPositionIndex[pos] ~= nil then
  677. GuiPositionIndex[pos].Parent = nil;
  678. GuiPositionIndex[pos] = nil;
  679. end
  680. end
  681. end
  682. end)()
  683. end)
  684. Button_DOWN.MouseButton1Up:connect(function()
  685. MouseHold = "None";
  686. end)
  687. local Button_LEFT = Instance.new("TextButton", OutputFrame)
  688. Button_LEFT.Name = "[Portable SB] - Scrollbar_LEFT"
  689. Button_LEFT.Size = UDim2.new(0, 15, 0, 15)
  690. Button_LEFT.Position = UDim2.new(0, 0, 0, 250)
  691. Button_LEFT.Text = "<"
  692. Button_LEFT.BackgroundColor3 = Color3.new(.5, .5, .5)
  693. Button_LEFT.BackgroundTransparency = 0.5;
  694. Button_LEFT.BorderColor3 = Color3.new(1, 1, 1)
  695. Button_LEFT.TextColor3 = Color3.new(1, 1, 1);
  696. Button_LEFT.TextStrokeColor3 = Color3.new(0, 0, 0)
  697. Button_LEFT.FontSize = "Size10"
  698. Button_LEFT.TextStrokeTransparency = 0.7
  699. Button_LEFT.BorderSizePixel = 0
  700. Button_LEFT.MouseButton1Down:connect(function()
  701. coroutine.wrap(function()
  702. MouseHold = "Button_LEFT"
  703. CurrentSub = CurrentSub - 1 > 0 and CurrentSub - 1 or CurrentSub
  704. for i = 1, 15 do
  705. local pos = (i + CurrentPosition) - 1
  706. if GuiPositionIndex[i] ~= nil then
  707. GuiPositionIndex[i].Text = string.sub(TextList[pos], CurrentSub)
  708. end
  709. end
  710. end)()
  711. end)
  712. Button_LEFT.MouseButton1Up:connect(function()
  713. MouseHold = "None";
  714. end)
  715. local Button_RIGHT = Instance.new("TextButton", OutputFrame)
  716. Button_RIGHT.Name = "[Portable SB] - Scrollbar_RIGHT"
  717. Button_RIGHT.Size = UDim2.new(0, 15, 0, 15)
  718. Button_RIGHT.Position = UDim2.new(1, -30, 0, 250)
  719. Button_RIGHT.Text = ">"
  720. Button_RIGHT.BackgroundColor3 = Color3.new(.5, .5, .5)
  721. Button_RIGHT.BackgroundTransparency = 0.5;
  722. Button_RIGHT.BorderColor3 = Color3.new(1, 1, 1)
  723. Button_RIGHT.TextColor3 = Color3.new(1, 1, 1);
  724. Button_RIGHT.TextStrokeColor3 = Color3.new(0, 0, 0)
  725. Button_RIGHT.FontSize = "Size10"
  726. Button_RIGHT.TextStrokeTransparency = 0.7
  727. Button_RIGHT.BorderSizePixel = 0
  728. Button_RIGHT.MouseButton1Down:connect(function()
  729. coroutine.wrap(function()
  730. MouseHold = "Button_RIGHT"
  731. CurrentSub = CurrentSub + 1
  732. local Allow = false;
  733. pcall(function()
  734. for i, v in pairs(GuiPositionIndex) do
  735. if not v.TextFits then
  736. Allow = true;
  737. break
  738. end
  739. end
  740. end)
  741. if not Allow then CurrentSub = CurrentSub - 1 end
  742. for i = 1, 15 do
  743. local pos = (i + CurrentPosition) - 1
  744. if GuiPositionIndex[i] ~= nil then
  745. GuiPositionIndex[i].Text = string.sub(TextList[pos], CurrentSub)
  746. end
  747. end
  748. end)()
  749. end)
  750. Button_RIGHT.MouseButton1Up:connect(function()
  751. MouseHold = "None";
  752. end)
  753. coroutine.resume(coroutine.create(SetZIndex), OutputFrame, 1);
  754. --[[ End of Output GUI ]]--
  755.  
  756. --[[ CMDBar GUI ]]--
  757. local ChatBox = Instance.new("TextBox", OutputGui)
  758. ChatBox.Name = "[Portable SB] - CMDBar"
  759. ChatBox.Font = "ArialBold"
  760. ChatBox.FontSize = "Size12"
  761. ChatBox.Size = UDim2.new(0, 500, 0, 20)
  762. ChatBox.Position = UDim2.new(0, 75, 1, -25)
  763. ChatBox.BackgroundColor3 = Color3.new(.5, .5, .5)
  764. ChatBox.BackgroundTransparency = 0.7
  765. ChatBox.BorderColor3 = Color3.new(1 , 1, 1)
  766. ChatBox.TextColor3 = Color3.new(0, 0, 0);
  767. ChatBox.Text = " - Type Portable SB commands / chats here, click '>' - "
  768. ChatBox.TextStrokeColor3 = Color3.new(1, 1, 1)
  769. ChatBox.TextStrokeTransparency = 0.7
  770. ChatBox.TextXAlignment = "Left"
  771. ChatBox.BorderSizePixel = 1
  772. ChatBox.ClearTextOnFocus = true;
  773. ChatBox.TextWrapped = true;
  774. ChatBox.Draggable = true;
  775. ChatBox.MultiLine = false;
  776. ChatBox.Changed:connect(function(p)
  777. if UsingEnter and p == "Text" and p.Text ~= "" then
  778. local Msg = tostring(ChatBox.Text) or " "
  779. local isRunning, anyError = coroutine.resume(coroutine.create(function()
  780. if Msg:sub(1, 1) == "#" then
  781. LoadScript(Msg:sub(2));
  782. elseif Msg:sub(1, 2) == "s#" then
  783. RunScript(Msg:sub(3));
  784. createRun("[Portable SB]: Created a script. Note: the script might not run!");
  785. elseif Msg:sub(1, 2) == "l#" then
  786. RunLocal(Msg:sub(3), LocalPlayer);
  787. createRun("[Portable SB]: Created a localscript on you.");
  788. elseif Msg:sub(1, 3) == "cl#" then
  789. local MsgA = Msg:sub(4);
  790. local s, e = string.find(MsgA, "#");
  791. if s and e then
  792. local plr = FindPlayer(string.sub(MsgA, 1, s - 1))
  793. for i, v in pairs(plr) do
  794. RunLocal(string.sub(MsgA, e + 1), v);
  795. if v ~= LocalPlayer then
  796. createRun("[Portable SB]: Created a localscript on " .. v.Name .. ". Note: the script might not run!");
  797. else
  798. createRun("[Portable SB]: Created a localscript on you.");
  799. end
  800. end
  801. end
  802. else
  803. MakeChat(UnFilter(Msg));
  804. end
  805. end))
  806. if not isRunning then customError(anyError); end
  807. end
  808. end)
  809. local Button_OK = Instance.new("TextButton", ChatBox)
  810. Button_OK.Name = "[Portable SB] - Chat_OK"
  811. Button_OK.Size = UDim2.new(0, 25, 0, 20)
  812. Button_OK.Position = UDim2.new(0, 500, 0, 0)
  813. Button_OK.Text = ">"
  814. Button_OK.BackgroundColor3 = Color3.new(.5, .5, .5)
  815. Button_OK.BackgroundTransparency = 0.7
  816. Button_OK.TextColor3 = Color3.new(0, 0, 0)
  817. Button_OK.BorderColor3 = Color3.new(1, 1, 1)
  818. Button_OK.Font = "ArialBold"
  819. Button_OK.FontSize = "Size12"
  820. Button_OK.TextStrokeColor3 = Color3.new(1, 1, 1)
  821. Button_OK.TextStrokeTransparency = 0.7
  822. Button_OK.BorderSizePixel = 1
  823. Button_OK.MouseButton1Down:connect(function()
  824. local Msg = tostring(ChatBox.Text) or " "
  825. local isRunning, anyError = coroutine.resume(coroutine.create(function()
  826. if Msg:sub(1, 1) == "#" then
  827. LoadScript(Msg:sub(2));
  828. elseif Msg:sub(1, 2) == "s#" then
  829. RunScript(Msg:sub(3));
  830. createRun("[Portable SB]: Created a script. Note: the script might not run!");
  831. elseif Msg:sub(1, 2) == "l#" then
  832. RunLocal(Msg:sub(3), LocalPlayer);
  833. createRun("[Portable SB]: Created a localscript on you.");
  834. elseif Msg:sub(1, 3) == "cl#" then
  835. local MsgA = Msg:sub(4);
  836. local s, e = string.find(MsgA, "#");
  837. if s and e then
  838. local plr = FindPlayer(string.sub(MsgA, 1, s - 1))
  839. for i, v in pairs(plr) do
  840. RunLocal(string.sub(MsgA, e + 1), v);
  841. if v ~= LocalPlayer then
  842. createRun("[Portable SB]: Created a localscript on " .. v.Name .. ". Note: the script might not run!");
  843. else
  844. createRun("[Portable SB]: Created a localscript on you.");
  845. end
  846. end
  847. end
  848. else
  849. MakeChat(UnFilter(Msg));
  850. end
  851. end))
  852. if not isRunning then customError(anyError); end
  853. end)
  854. coroutine.resume(coroutine.create(SetZIndex), ChatBox, 3);
  855. --[[ End of CMDBar Gui ]]--
  856.  
  857. function LoadScript(Msg)
  858. local works, fail = fake_loadstring(Msg)
  859. if works then
  860. local works2, fail2 = coroutine.resume(coroutine.create(works))
  861. if works2 then
  862. createRun("[Portable SB]: Script ran successfully!")
  863. else
  864. fail2 = tostring(fail2) ~= "" and tostring(fail2) or "Unknown Error";
  865. customError(fail2, Msg)
  866. end
  867. else
  868. fail = tostring(fail) ~= "" and tostring(fail) or "Unknown Error";
  869. customError(fail, Msg)
  870. end
  871. end
  872. function RunLocal(Source, Player)
  873. local NewLocalScript;
  874. coroutine.wrap(function()
  875. NewLocalScript = Instance.new("LocalScript")
  876. NewLocalScript.Source = [[
  877. repeat wait() until script:FindFirstChild("NewSource") and script:FindFirstChild("Owner");
  878. Services = setmetatable(getmetatable(newproxy(true)), {__index = function(o, k) return game:service(k) or nil end; __call = function(o, k) return game:service(k) or nil end; __tostring = function(o, k) return "Services List" end; __metatable = "This metatable has been locked";});
  879. LocalPlayer = Services["Players"].LocalPlayer
  880.  
  881. local function createOutput(Msg, type)
  882. local create_output = Instance.new("ObjectValue")
  883. create_output.Name = "create_output"
  884. create_output.Value = script
  885. create_output.Parent = script:FindFirstChild("Owner").Value;
  886. local value_toPrint = Instance.new("StringValue")
  887. value_toPrint.Name = "value_toPrint"
  888. value_toPrint.Value = Msg
  889. value_toPrint.Parent = create_output
  890. local output_type = Instance.new("StringValue")
  891. output_type.Name = "output_type"
  892. output_type.Value = type
  893. output_type.Parent = create_output
  894. end
  895.  
  896. local function print(...)
  897. local Msg = "";
  898. local args = {...}
  899. local function lastIndex(t)
  900. local last = 0;
  901. for i, v in pairs(t) do
  902. last = i > last and i or last;
  903. end
  904. return last;
  905. end
  906. for i = 1, lastIndex(args) do
  907. local v = args[i];
  908. Msg = Msg .. tostring(v) .. "\t";
  909. end
  910. Msg = string.sub(Msg, 1, string.len(Msg) - 1);
  911. createOutput(Msg, "print");
  912. end
  913.  
  914. local works, fail = loadstring(script:FindFirstChild("NewSource").Value)
  915. if works then
  916. getfenv(works)["print"] = print;
  917. local works2, fail2 = coroutine.resume(coroutine.create(works))
  918. if works2 then
  919. createOutput("Script ran successfully!", "createRun")
  920. else
  921. createOutput(fail2, "customError");
  922. end
  923. else
  924. createOutput(fail, "customError");
  925. end
  926. ]]
  927. NewLocalScript.Disabled = true;
  928. NewLocalScript.Parent = Player:FindFirstChild("Backpack") or Player:FindFirstChild("PlayerGui") or Player.Character or Player.ChildAdded:wait();
  929. wait();
  930. NewLocalScript.Disabled = false;
  931. local ScrSource = Instance.new("StringValue")
  932. ScrSource.Name = "NewSource"
  933. ScrSource.Value = Source
  934. ScrSource.Parent = NewLocalScript
  935. local Owner = Instance.new("ObjectValue")
  936. Owner.Name = "Owner"
  937. Owner.Value = LocalPlayer
  938. Owner.Parent = NewLocalScript
  939. end)()
  940. return NewLocalScript;
  941. end
  942. function RunScript(Source)
  943. local NewScript;
  944. coroutine.wrap(function()
  945. NewScript = Instance.new("Script")
  946. NewScript.Source = [[
  947. repeat wait() until script:FindFirstChild("NewSource") and script:FindFirstChild("Owner");
  948. Services = setmetatable(getmetatable(newproxy(true)), {__index = function(o, k) return game:service(k) or nil end; __call = function(o, k) return game:service(k) or nil end; __tostring = function(o, k) return "Services List" end; __metatable = "This metatable has been locked";});
  949.  
  950. local function createOutput(Msg, type)
  951. local create_output = Instance.new("ObjectValue")
  952. create_output.Name = "create_output"
  953. create_output.Value = script
  954. create_output.Parent = script:FindFirstChild("Owner").Value;
  955. local value_toPrint = Instance.new("StringValue")
  956. value_toPrint.Name = "value_toPrint"
  957. value_toPrint.Value = Msg
  958. value_toPrint.Parent = create_output
  959. local output_type = Instance.new("StringValue")
  960. output_type.Name = "output_type"
  961. output_type.Value = type
  962. output_type.Parent = create_output
  963. end
  964.  
  965. local function print(...)
  966. local Msg = "";
  967. local args = {...}
  968. local function lastIndex(t)
  969. local last = 0;
  970. for i, v in pairs(t) do
  971. last = i > last and i or last;
  972. end
  973. return last;
  974. end
  975. for i = 1, lastIndex(args) do
  976. local v = args[i];
  977. Msg = Msg .. tostring(v) .. "\t";
  978. end
  979. Msg = string.sub(Msg, 1, string.len(Msg) - 1);
  980. createOutput(Msg, "print");
  981. end
  982.  
  983. local works, fail = loadstring(script:FindFirstChild("NewSource").Value)
  984. if works then
  985. getfenv(works)["print"] = print;
  986. local works2, fail2 = coroutine.resume(coroutine.create(works))
  987. if works2 then
  988. createOutput("Script ran successfully!", "createRun")
  989. else
  990. createOutput(fail2, "customError");
  991. end
  992. else
  993. createOutput(fail, "customError");
  994. end
  995. ]]
  996. NewScript.Disabled = true;
  997. NewScript.Parent = nil;
  998. wait();
  999. game:service'InsertService':Insert(NewScript);
  1000. NewScript.Disabled = false;
  1001. local ScrSource = Instance.new("StringValue")
  1002. ScrSource.Name = "NewSource"
  1003. ScrSource.Value = Source
  1004. ScrSource.Parent = NewScript
  1005. local Owner = Instance.new("ObjectValue")
  1006. Owner.Name = "Owner"
  1007. Owner.Value = LocalPlayer
  1008. Owner.Parent = NewScript
  1009. end)()
  1010. return NewScript;
  1011. end
  1012.  
  1013. --[[ Connections (also Connection-like) ]]--
  1014. LocalPlayer.ChildAdded:connect(function(Obj)
  1015. coroutine.resume(coroutine.create(function()
  1016. if Obj.Name == "create_output" and Obj.className == "ObjectValue" then
  1017. repeat wait() until Obj:FindFirstChild("value_toPrint") and Obj:FindFirstChild("output_type")
  1018. local Skrip = Obj.Value
  1019. local value_toPrint = Obj:FindFirstChild("value_toPrint").Value
  1020. if Obj:FindFirstChild("output_type").Value == "createRun" then
  1021. createRun(Skrip:GetFullName() .. ": " .. value_toPrint)
  1022. elseif Obj:FindFirstChild("output_type").Value == "customError" then
  1023. local time = tick()
  1024. local hour = math.floor((time % 86400) / 3600)
  1025. local minute = math.floor((time % 3600) / 60)
  1026. local second = math.floor(time % 60)
  1027. hour = string.len(hour) == 2 and hour or "0" .. hour
  1028. minute = string.len(minute) == 2 and minute or "0" .. minute
  1029. second = string.len(second) == 2 and second or "0" .. second
  1030. local pos = #TextList + 1
  1031. msg = " [" .. hour .. ":" .. minute .. ":" .. second .. "]\t" .. Skrip:GetFullName() .. ": " .. value_toPrint;
  1032. TextList[pos] = msg;
  1033. TextClass["E"][pos] = true;
  1034. if (pos - MaxStack) == CurrentPosition then
  1035. CurrentPosition = CurrentPosition + 1
  1036. for i = CurrentPosition, MaxStack + CurrentPosition - 1 do
  1037. local posx = (i - CurrentPosition) + 1
  1038. if TextList[i] ~= nil then
  1039. local line = CreateLine(posx);
  1040. line.TextColor3 = TextClass["P"][i] ~= nil and TextClass["P"][i] and Color3.new(1, 1, 1) or TextClass["E"][i] ~= nil and TextClass["E"][i] and Color3.new(1, 0, 0) or TextClass["R"][i] ~= nil and TextClass["R"][i] and Color3.new(0, 1, 0);
  1041. line.Text = string.sub(TextList[i], CurrentSub)
  1042. else
  1043. if GuiPositionIndex[posx] ~= nil then
  1044. GuiPositionIndex[posx].Parent = nil;
  1045. GuiPositionIndex[posx] = nil;
  1046. end
  1047. end
  1048. end
  1049. end
  1050. if (pos - CurrentPosition + 1) <= MaxStack then
  1051. local line = CreateLine(pos - CurrentPosition + 1);
  1052. line.TextColor3 = Color3.new(1, 0, 0);
  1053. line.Text = string.sub(msg, CurrentSub);
  1054. end
  1055. else
  1056. print(Skrip:GetFullName() .. ": " .. value_toPrint)
  1057. end
  1058. pcall(function() game:service'Debris':AddItem(Obj, 0); end)
  1059. end
  1060. end))
  1061. end)
  1062. LocalPlayer.Chatted:connect(function(Msg)
  1063. local isRunning, anyError = coroutine.resume(coroutine.create(function()
  1064. if Msg:sub(1, 1) == "#" then
  1065. LoadScript(Msg:sub(2));
  1066. elseif Msg:sub(1, 2) == "s#" then
  1067. RunScript(Msg:sub(3));
  1068. createRun("[Portable SB]: Created a script. Note: the script might not run!");
  1069. elseif Msg:sub(1, 2) == "l#" then
  1070. RunLocal(Msg:sub(3), LocalPlayer);
  1071. createRun("[Portable SB]: Created a localscript on you.");
  1072. elseif Msg:sub(1, 3) == "cl#" then
  1073. local MsgA = Msg:sub(4);
  1074. local s, e = string.find(MsgA, "#");
  1075. if s and e then
  1076. local plr = FindPlayer(string.sub(MsgA, 1, s - 1))
  1077. for i, v in pairs(plr) do
  1078. RunLocal(string.sub(MsgA, e + 1), v);
  1079. if v ~= LocalPlayer then
  1080. createRun("[Portable SB]: Created a localscript on " .. v.Name .. ". Note: the script might not run!");
  1081. else
  1082. createRun("[Portable SB]: Created a localscript on you.");
  1083. end
  1084. end
  1085. end
  1086. end
  1087. end))
  1088. if not isRunning then customError(anyError); end
  1089. pcall(function() if UseChat or LocalPlayer.Parent ~= game:service'Players' then MakeChat(UnFilter(Msg)) end end)
  1090. end)
  1091. game:service'RunService'.Stepped:connect(function()
  1092. coroutine.resume(coroutine.create(function()
  1093. if NoClip then
  1094. for i, v in pairs(GetRecursiveChildren(LocalPlayer.Character)) do
  1095. if v:IsA("BasePart") then
  1096. pcall(function() v.CanCollide = false; end)
  1097. end
  1098. end
  1099. end
  1100. end))
  1101. coroutine.resume(coroutine.create(function()
  1102. LocalPlayer.Name = NameChosen;
  1103. LocalPlayer.Character.Name = NameChosen;
  1104. end))
  1105. coroutine.resume(coroutine.create(function()
  1106. if LocalPlayer.CharacterAppearance ~= Appearance then
  1107. if Appearance ~= "" then
  1108. LocalPlayer.CharacterAppearance = Appearance;
  1109. LocalPlayer.Character:BreakJoints();
  1110. else
  1111. Appearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=" .. LocalPlayer.userId .. "placeId=" .. game.placeId;
  1112. end
  1113. end
  1114. end))
  1115. end)
  1116. coroutine.resume(coroutine.create(function()
  1117. while wait() do
  1118. if MouseHold ~= "None" then
  1119. wait(.75);
  1120. if MouseHold == "Button_UP" then
  1121. while MouseHold == "Button_UP" do
  1122. wait(.1)
  1123. coroutine.wrap(function()
  1124. CurrentPosition = CurrentPosition - 1 >= 1 and CurrentPosition - 1 or CurrentPosition
  1125. for i = CurrentPosition, MaxStack + CurrentPosition - 1 do
  1126. local pos = (i - CurrentPosition) + 1
  1127. if TextList[i] ~= nil then
  1128. local line = CreateLine(pos);
  1129. line.TextColor3 = TextClass["P"][i] ~= nil and TextClass["P"][i] and Color3.new(1, 1, 1) or TextClass["E"][i] ~= nil and TextClass["E"][i] and Color3.new(1, 0, 0) or TextClass["R"][i] ~= nil and TextClass["R"][i] and Color3.new(0, 1, 0);
  1130. line.Text = string.sub(TextList[i], CurrentSub)
  1131. end
  1132. end
  1133. end)()
  1134. end
  1135. elseif MouseHold == "Button_DOWN" then
  1136. while MouseHold == "Button_DOWN" do
  1137. wait(.1)
  1138. coroutine.wrap(function()
  1139. CurrentPosition = TextList[CurrentPosition + 1] ~= nil and CurrentPosition + 14 < #TextList and CurrentPosition + 1 or CurrentPosition
  1140. for i = CurrentPosition, MaxStack + CurrentPosition - 1 do
  1141. local pos = (i - CurrentPosition) + 1
  1142. if TextList[i] ~= nil then
  1143. local line = CreateLine(pos);
  1144. line.TextColor3 = TextClass["P"][i] ~= nil and TextClass["P"][i] and Color3.new(1, 1, 1) or TextClass["E"][i] ~= nil and TextClass["E"][i] and Color3.new(1, 0, 0) or TextClass["R"][i] ~= nil and TextClass["R"][i] and Color3.new(0, 1, 0);
  1145. line.Text = string.sub(TextList[i], CurrentSub)
  1146. else
  1147. if GuiPositionIndex[pos] ~= nil then
  1148. GuiPositionIndex[pos].Parent = nil;
  1149. GuiPositionIndex[pos] = nil;
  1150. end
  1151. end
  1152. end
  1153. end)()
  1154. end
  1155. elseif MouseHold == "Button_LEFT" then
  1156. while MouseHold == "Button_LEFT" do
  1157. wait(.075)
  1158. coroutine.wrap(function()
  1159. CurrentSub = CurrentSub - 1 > 0 and CurrentSub - 1 or CurrentSub
  1160. for i = 1, 15 do
  1161. local pos = (i + CurrentPosition) - 1
  1162. if GuiPositionIndex[i] ~= nil then
  1163. GuiPositionIndex[i].Text = string.sub(TextList[pos], CurrentSub)
  1164. end
  1165. end
  1166. end)()
  1167. end
  1168. elseif MouseHold == "Button_RIGHT" then
  1169. while MouseHold == "Button_RIGHT" do
  1170. wait(.075)
  1171. coroutine.wrap(function()
  1172. CurrentSub = CurrentSub + 1
  1173. local Allow = false;
  1174. pcall(function()
  1175. for i, v in pairs(GuiPositionIndex) do
  1176. if not v.TextFits then
  1177. Allow = true;
  1178. break
  1179. end
  1180. end
  1181. end)
  1182. if not Allow then CurrentSub = CurrentSub - 1 end
  1183. for i = 1, 15 do
  1184. local pos = (i + CurrentPosition) - 1
  1185. if GuiPositionIndex[i] ~= nil then
  1186. GuiPositionIndex[i].Text = string.sub(TextList[pos], CurrentSub)
  1187. end
  1188. end
  1189. end)()
  1190. end
  1191. end
  1192. end
  1193. end
  1194. end))
  1195. --[[ End of Connections (also Connection-like) ]]--
  1196.  
  1197. --[[ No Double ]]--
  1198. _G.PortableSBRan = true;
  1199. --[[ End of No Double ]]--
  1200.  
  1201. createRun("[Portable SB]: Ran successfully! | Made by stephen77");
  1202. createRun("[Portable SB]: Hello, " .. LocalPlayer.Name);
  1203. createRun("[Portable SB]: You are currently running version " .. Version);
  1204.  
  1205. local rLocalInit = false;
  1206. coroutine.resume(coroutine.create(function()
  1207. repeat wait() until #FindPlayer("others") > 0
  1208. while game:service'Workspace':FindFirstChild("RandomObject-Local") == nil do
  1209. wait()
  1210. local scr = RunLocal([[
  1211. function print(...) end
  1212. if Services["Workspace"]:FindFirstChild("RandomObject-Local") == nil then
  1213. Instance.new("Model", Services["Workspace"]).Name = "RandomObject-Local";
  1214. end
  1215. ]], FindPlayer("others")[math.random(#FindPlayer("others"))])
  1216. game:service'Debris':AddItem(scr, .25);
  1217. end
  1218. pcall(function() game:service'Workspace':FindFirstChild("RandomObject-Local").Parent = nil; end)
  1219. createRun("[Portable SB]: RunLocal initialized successfully.");
  1220. rLocalInit = true;
  1221. end))
  1222. coroutine.resume(coroutine.create(function()
  1223. while game:service'Workspace':FindFirstChild("RandomObject-Script") == nil do
  1224. wait()
  1225. local scr = RunScript([[
  1226. function print(...) end
  1227. if Services["Workspace"]:FindFirstChild("RandomObject-Script") == nil then
  1228. Instance.new("Model", Services["Workspace"]).Name = "RandomObject-Script";
  1229. end
  1230. ]])
  1231. game:service'Debris':AddItem(scr, .25);
  1232. end
  1233. pcall(function() game:service'Workspace':FindFirstChild("RandomObject-Script").Parent = nil; end)
  1234. createRun("[Portable SB]: RunScript initialized successfully.");
  1235. end))
  1236. coroutine.resume(coroutine.create(function()
  1237. repeat wait() until #FindPlayer("others") > 0 and LocalPlayer.Character and LocalPlayer.Character.Parent
  1238. repeat
  1239. local scr = RunLocal([[
  1240. script.Parent = LocalPlayer.Character;
  1241. ]], LocalPlayer)
  1242. game:service'Debris':AddItem(scr, .25);
  1243. wait(.25)
  1244. until rLocalInit or LocalPlayer.Parent ~= game:service'Players';
  1245. end))
  1246.  
  1247. end
  1248.  
  1249. -- fuck suck mediafire hitler lego yolo swag dick shit bitch Portable Script Builder Stable 06/26/2013
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement