Advertisement
Createok

btools

Dec 6th, 2018
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.75 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. local RunService = game:service("RunService")
  88. local RbxUtility = LoadLibrary("RbxUtility")
  89.  
  90. local plr = owner
  91. --local coregui = game:service("CoreGui")
  92. local bin = game.CoreGui
  93.  
  94. local state = false
  95. local mode = 1
  96.  
  97. local stuff = {
  98. ["spectate"] = nil,
  99. ["sound"] = nil,
  100. ["musicbin"] = nil
  101. }
  102.  
  103. for i,v in pairs(game.Workspace:children()) do
  104. if v.ClassName == "Model" or v.ClassName == "Folder" then
  105. if game.Players:FindFirstChild(v.Name) == nil then
  106. stuff.musicbin = v
  107. print("music bin found")
  108. break
  109. end
  110. end
  111. end
  112.  
  113. local modes = {}
  114.  
  115. local ModeP = {}
  116. local ModeP_mt = {}
  117.  
  118. function ModeP:Create(Name, Call, Settings)
  119. local New_Mode = {
  120. ["name"] = Name,
  121. ["call"] = Call,
  122. ["settings"] = Settings
  123. }
  124. setmetatable(New_Mode, ModeP_mt)
  125. table.insert(modes, 1, New_Mode)
  126. return New_Mode
  127. end
  128.  
  129. function ModeP:Run(...)
  130. print("run method found")
  131. if bin:FindFirstChild("_COOL_SETTINGS") == nil then
  132. self.call(self.settings, ...)
  133. end
  134. end
  135.  
  136. ModeP_mt.__index = function(ModeObj, Key)
  137. return ModeP[Key]
  138. end
  139.  
  140. ModeP:Create("Brick Bomb", function(settings, target, hitpoint)
  141. print("XX", hitpoint)
  142. local t
  143. local doFunction
  144. local blocks
  145. if settings.players_only == true then
  146. if game.Players:FindFirstChild(target.Parent.Name) then
  147. t = game.Players:FindFirstChild(target.Parent.Name)
  148. elseif game.Players:FindFirstChild(target.Parent.Parent.Name) then
  149. t = game.Players:FindFirstChild(target.Parent.Parent.Name)
  150. end
  151. end
  152. blocks = Instance.new("Model", workspace)
  153. blocks.RobloxLocked = true
  154. local blocks2 = nil
  155. if settings.cleanup == true then
  156. blocks2 = blocks
  157. end
  158. for i=1, settings.threads do
  159. spawn(function()
  160. print(settings.bricks_per_thread)
  161. while true do
  162. if settings.brick_spawn_delay == 0 then
  163. RunService.Stepped:wait()
  164. else
  165. wait(settings.brick_spawn_delay)
  166. end
  167. if t ~= nil then
  168. if t.Character ~= nil then
  169. if t.Character:FindFirstChild("Torso") then
  170. local p = Instance.new("Part")
  171. p.Anchored = settings.anchored
  172. p.CanCollide = settings.collision
  173. p.RobloxLocked = true
  174. p.Material = settings.material
  175. p.Size = Vector3.new(settings.brick_size_x, settings.brick_size_y, settings.brick_size_z)
  176. p.BrickColor = BrickColor.random()
  177. p.CFrame = t.Character:FindFirstChild("Torso").CFrame
  178. p.Parent = blocks
  179. end
  180. end
  181. elseif settings.players_only == false then
  182. local p = Instance.new("Part")
  183. p.Anchored = settings.anchored
  184. p.RobloxLocked = true
  185. p.CanCollide = settings.collision
  186. p.Material = settings.material
  187. p.Size = Vector3.new(settings.brick_size_x, settings.brick_size_y, settings.brick_size_z)
  188. p.BrickColor = BrickColor.random()
  189. p.CFrame = hitpoint
  190. p.Parent = blocks
  191. end
  192. end
  193. end)
  194. end
  195. if settings.stop == true then
  196. spawn(function()
  197. wait(settings.stop_delay)
  198. blocks = nil
  199. end)
  200. end
  201. wait(settings.clean_delay)
  202. blocks2:Destroy()
  203. end, {
  204. ["threads"] = 8,
  205. ["brick_size_x"] = 5,
  206. ["brick_size_y"] = 5,
  207. ["brick_size_z"] = 5,
  208. ["cleanup"] = true,
  209. ["clean_delay"] = 60,
  210. ["brick_spawn_delay"] = 0.1,
  211. ["players_only"] = false,
  212. ["stop"] = true,
  213. ["stop_delay"] = 20,
  214. ["material"] = Enum.Material.Neon,
  215. ["anchored"] = false,
  216. ["collision"] = true
  217. })
  218.  
  219. ModeP:Create("View", function(settings, target)
  220. local cam = workspace.CurrentCamera
  221. cam.CameraType = "Follow"
  222. local setcam = game.Players:GetChildren()[math.random(1,#game.Players:GetChildren())]
  223. if game.Players:FindFirstChild(tostring(target.Parent)) ~= nil then
  224. setcam = game.Players:FindFirstChild(tostring(target.Parent))
  225. elseif game.Players:FindFirstChild(tostring(target.Parent.Parent)) ~= nil then
  226. setcam = game.Players:FindFirstChild(tostring(target.Parent.Parent))
  227. end
  228. if setcam:FindFirstChild("leaderstats") == nil then
  229. local te = Instance.new("StringValue")
  230. te.Name = "leaderstats"
  231. end
  232. --[[if stuff.spectate ~= nil then
  233. stuff.spectate.Parent = setcam.leaderstats
  234. stuff.spectate.Value = "Demon"
  235. else
  236. local fes = Instance.new("StringValue")
  237. fes.Name = "Host"
  238. stuff.spectate = fes
  239. stuff.spectate.Parent = setcam.leaderstats
  240. stuff.spectate.Value = "Demon"
  241. end]]
  242. cam.CameraSubject = setcam.Character.Head
  243. end)
  244.  
  245. ModeP:Create("Freeze & Thaw", function(settings,target)
  246. if game.Players:FindFirstChild(tostring(target.Parent)) then
  247. if game.Players:FindFirstChild(tostring(target.Parent)).Character.Torso.Anchored == true then
  248. game.Players:FindFirstChild(tostring(target.Parent)).Character.Torso.Anchored = false
  249. else
  250. game.Players:FindFirstChild(tostring(target.Parent)).Character.Torso.Anchored = true
  251. end
  252. elseif game.Players:FindFirstChild(tostring(target.Parent.Parent)) then
  253. if game.Players:FindFirstChild(tostring(target.Parent.Parent)).Character.Torso.Anchored == true then
  254. game.Players:FindFirstChild(tostring(target.Parent.Parent)).Character.Torso.Anchored = false
  255. else
  256. game.Players:FindFirstChild(tostring(target.Parent.Parent)).Character.Torso.Anchored = true
  257. end
  258. end
  259. end)
  260.  
  261. ModeP:Create("Kick", function(settings, target)
  262. if game.Players:FindFirstChild(tostring(target.Parent)) then
  263. game.Players:FindFirstChild(tostring(target.Parent)):Kick("Kicked")
  264. elseif game.Players:FindFirstChild(tostring(target.Parent.Parent)) then
  265. game.Players:FindFirstChild(tostring(target.Parent.Parent)):Kick("Kicked")
  266. end
  267. end)
  268.  
  269. ModeP:Create("Humanoid Kill", function(settings, target)
  270. if game.Players:FindFirstChild(tostring(target.Parent)) then
  271. game.Players:FindFirstChild(tostring(target.Parent)).Character.Humanoid:Destroy()
  272. elseif game.Players:FindFirstChild(tostring(target.Parent.Parent)) then
  273. game.Players:FindFirstChild(tostring(target.Parent.Parent)).Character.Humanoid:Destroy()
  274. end
  275. end)
  276.  
  277. ModeP:Create("Delete", function(settings, target)
  278. target:Destroy()
  279. end)
  280.  
  281. ModeP:Create("Kill", function(settings, target)
  282. if game.Players:FindFirstChild(tostring(target.Parent)) then
  283. game.Players:FindFirstChild(tostring(target.Parent)).Character.Humanoid.Health = 0
  284. elseif game.Players:FindFirstChild(tostring(target.Parent.Parent)) then
  285. game.Players:FindFirstChild(tostring(target.Parent.Parent)).Character.Humanoid.Health = 0
  286. end
  287. end)
  288.  
  289. ModeP:Create("Send AWay", function(settings, target)
  290. if game.Players:FindFirstChild(tostring(target.Parent)) then
  291. target = game.Players:FindFirstChild(tostring(target.Parent))
  292. elseif game.Players:FindFirstChild(tostring(target.Parent.Parent)) then
  293. target = game.Players:FindFirstChild(tostring(target.Parent.Parent))
  294. else
  295. print("returning")
  296. return
  297. end
  298.  
  299. local p = Instance.new("Part")
  300. local w = Instance.new("Weld")
  301. w.Parent = p
  302. w.Part0 = p
  303. p.Size = Vector3.new(6, 7, 3)
  304. p.BrickColor = BrickColor.random()
  305. p.Material = Enum.Material.Neon
  306. p.Anchored = true
  307. p.CanCollide = false
  308. p.Transparency = 0.5
  309. p.Locked = true
  310. p.Parent = workspace
  311. p.CFrame = target.Character.Torso.CFrame
  312. w.Part1 = target.Character.Torso
  313. spawn(function()
  314. while wait(0.1) do
  315. p.BrickColor = BrickColor.random()
  316. end
  317. end)
  318. local e
  319. e = p.Changed:connect(function()
  320. target.Character.Torso.CFrame = p.CFrame
  321. end)
  322.  
  323. for i=1, settings.move_distance do
  324. wait(settings.move_rate)
  325. p.CFrame = p.CFrame + Vector3.new(0, settings.move_step, 0)
  326. end
  327. e:Disconnect()
  328. p:Destroy()
  329. end, {
  330. ["move_rate"] = 0,
  331. ["move_step"] = 1.5,
  332. ["move_distance"] = 1000,
  333. ["move_threads"] = 1
  334. })
  335.  
  336. ModeP:Create("Tsunami Sushi", function(settings, target)
  337. if game.Players:FindFirstChild(tostring(target.Parent)) then
  338. target = game.Players:FindFirstChild(tostring(target.Parent))
  339. elseif game.Players:FindFirstChild(tostring(target.Parent.Parent)) then
  340. target = game.Players:FindFirstChild(tostring(target.Parent.Parent))
  341. else
  342. game.Workspace.GiveSystem.GiveItem:FireServer(game.Players.LocalPlayer, target)
  343. plr.PlayerGui:WaitForChild("reciever", 15)
  344. plr.PlayerGui.reciever:Destroy()
  345. return
  346. end
  347.  
  348. game.Workspace.GiveSystem.GiveItem:FireServer(game.Players.LocalPlayer, target.Character.Humanoid)
  349. plr.PlayerGui:WaitForChild("reciever", 15)
  350. plr.PlayerGui.reciever:Destroy()
  351. end)
  352.  
  353.  
  354. local gui = Instance.new("ScreenGui")
  355.  
  356. local music_frame = Instance.new("Frame")
  357. music_frame.Size = UDim2.new(0, 150, 0, 60)
  358. music_frame.Position = UDim2.new(0, 0, 1, -215)
  359. music_frame.BorderSizePixel = 5
  360. music_frame.BorderColor3 = Color3.new(255/255, 255/255, 255/255)
  361. music_frame.BackgroundTransparency = 0.1
  362. music_frame.BackgroundColor3 = Color3.new(57/255, 57/255, 57/255)
  363.  
  364. local music_entry = Instance.new("TextBox")
  365. music_entry.BackgroundTransparency = 0.9
  366. music_entry.Size = UDim2.new((2/3), 0, 0.5, 0)
  367. music_entry.BackgroundColor3 = Color3.new(0/255, 0/255, 0/255)
  368. music_entry.BorderSizePixel = 0
  369. music_entry.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  370. music_entry.TextSize = 18
  371. music_entry.Text = "Music ID"
  372. music_entry.Font = "SciFi"
  373.  
  374. local volume = Instance.new("TextBox")
  375. volume.BackgroundTransparency = 0.8
  376. volume.Size = UDim2.new((1/3), 0, 0.5, 0)
  377. volume.Position = UDim2.new((2/3), 0, 0, 0)
  378. volume.BackgroundColor3 = Color3.new(0/255, 0/255, 0/255)
  379. volume.BorderSizePixel = 0
  380. volume.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  381. volume.TextSize = 16
  382. volume.Text = "Vol"
  383. volume.Font = "SciFi"
  384.  
  385. volume.FocusLost:connect(function()
  386. if type(tonumber(volume.Text)) == type(1337) then
  387. stuff.sound.Volume = tonumber(volume.Text)
  388. volume.Text = tostring(stuff.sound.Volume)
  389. else
  390. volume.Text = tostring(stuff.sound.Volume)
  391. end
  392. end)
  393.  
  394. local play = Instance.new("TextButton")
  395. play.BackgroundColor3 = Color3.new(22/255, 95/255, 0/255)
  396. play.BorderSizePixel = 0
  397. play.Position = UDim2.new(0, 0, 0.5, 0)
  398. play.Size = UDim2.new((1/3), 0, 0.5, 0)
  399. play.Font = "SciFi"
  400. play.TextSize = 16
  401. play.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  402. play.Text = "Plaay"
  403.  
  404. play.MouseButton1Click:connect(function()
  405. if stuff.sound == nil then
  406. stuff.sound = Instance.new("Sound", stuff.musicbin)
  407. elseif stuff.sound.Parent ~= stuff.musicbin then
  408. stuff.sound:Stop()
  409. stuff.sound:Destroy()
  410. stuff.sound = Instance.new("Sound", stuff.musicbin)
  411. elseif stuff.sound.Parent == stuff.musicbin then
  412. stuff.sound:Stop()
  413. end
  414. stuff.sound.SoundId = ("rbxassetid://" .. music_entry.Text)
  415. stuff.sound:Play()
  416. end)
  417.  
  418. local stop = Instance.new("TextButton")
  419. stop.BackgroundColor3 = Color3.new(95/255, 0/255, 0/255)
  420. stop.BorderSizePixel = 0
  421. stop.Position = UDim2.new((1/3), 0, 0.5, 0)
  422. stop.Size = UDim2.new((1/3), 0, 0.5, 0)
  423. stop.Font = "SciFi"
  424. stop.TextSize = 16
  425. stop.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  426. stop.Text = "Stop"
  427.  
  428. stop.MouseButton1Click:connect(function()
  429. stuff.sound:Stop()
  430. stuff.sound:Destroy()
  431. stuff.sound = nil
  432. end)
  433.  
  434. local allstop = Instance.new("TextButton")
  435. allstop.BackgroundColor3 = Color3.new(0/255, 0/255, 0/255)
  436. allstop.BorderSizePixel = 0
  437. allstop.Position = UDim2.new((2/3), 0, 0.5, 0)
  438. allstop.Size = UDim2.new((1/3), 0, 0.5, 0)
  439. allstop.Font = "SciFi"
  440. allstop.TextSize = 16
  441. allstop.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  442. allstop.Text = "Solo"
  443.  
  444. allstop.MouseButton1Click:connect(function()
  445. local function search(container)
  446. for i,v in pairs(container:children()) do
  447. if #v:children() > 0 then
  448. search(v)
  449. elseif v.ClassName == "Sound" and v ~= stuff.sound then
  450. v:Stop()
  451. end
  452. end
  453. end
  454. search(workspace)
  455. end)
  456.  
  457. allstop.Parent = music_frame
  458. stop.Parent = music_frame
  459. play.Parent = music_frame
  460. volume.Parent = music_frame
  461. music_entry.Parent = music_frame
  462.  
  463. music_frame.Parent = gui
  464.  
  465. local frame = Instance.new("Frame")
  466. frame.Size = UDim2.new(0, 150, 0, 100)
  467. frame.Position = UDim2.new(0, 0, 1, -140)
  468. frame.BackgroundColor3 = Color3.new(57/255, 57/255, 57/255)
  469. frame.BackgroundTransparency = 0.1
  470. frame.BorderSizePixel = 5
  471. frame.BorderColor3 = Color3.new(255/255, 255/255, 255/255)
  472.  
  473. local a_line = Instance.new("Frame")
  474. a_line.Size = UDim2.new(1, 0, 0, 5)
  475. a_line.Position = UDim2.new(0, 0, 0, 17)
  476. a_line.BorderSizePixel = 0
  477. a_line.BackgroundColor3 = Color3.new(255/255, 255/255, 255/255)
  478.  
  479. local title = Instance.new("TextLabel")
  480. title.Position = UDim2.new(0, 0, 0, 3)
  481. title.Size = UDim2.new(1, 0, 0, 20)
  482. title.BackgroundTransparency = 1
  483. title.Font = "SciFi"
  484. title.TextSize = 14
  485. title.TextYAlignment = "Top"
  486. if game.Workspace.FilteringEnabled ~= true then
  487. title.TextColor3 = Color3.new(0/255, 255/255, 0/255)
  488. else
  489. title.TextColor3 = Color3.new(255/255, 0/255, 0/255)
  490. end
  491. title.Text = "Cooler Kids Gui2"
  492.  
  493. local instru = Instance.new("TextButton")
  494. instru.Position = UDim2.new(0, 0, 0, 20)
  495. instru.Size = UDim2.new(1, 0, 0, 20)
  496. instru.BackgroundTransparency = 0.9
  497. instru.Font = "SciFi"
  498. instru.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  499. instru.TextSize = 14
  500. instru.TextXAlignment = "Left"
  501. instru.BorderSizePixel = 0
  502. instru.Text = "On"
  503.  
  504. instru.MouseButton1Click:connect(function()
  505. if instru.Text == "On" then
  506. instru.Text = "Off"
  507. else
  508. instru.Text = "On"
  509. end
  510. end)
  511.  
  512. local mode_l = Instance.new("TextLabel")
  513. mode_l.Position = UDim2.new(0, 0, 0, 40)
  514. mode_l.Size = UDim2.new(1, 0, 0, 20)
  515. mode_l.BackgroundTransparency = 1
  516. mode_l.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  517. mode_l.Font = "SciFi"
  518. mode_l.TextSize = 18
  519. mode_l.Text = "[ Press E ]"
  520.  
  521. local sets_b = Instance.new("TextButton")
  522. sets_b.Position = UDim2.new(0, 0, 1, -40)
  523. sets_b.Size = UDim2.new(1, 0, 0, 20)
  524. sets_b.BackgroundTransparency = 0.9
  525. sets_b.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  526. sets_b.Font = "SciFi"
  527. sets_b.TextSize = 32
  528. sets_b.TextScaled = true
  529. sets_b.BorderSizePixel = 0
  530. sets_b.Modal = true
  531. sets_b.Text = "[ Settings ]"
  532.  
  533. local sets_b_db = false
  534. sets_b.MouseButton1Click:connect(function()
  535. sets_b_db = true
  536. if bin:FindFirstChild("_COOL_SETTINGS") then
  537. bin:FindFirstChild("_COOL_SETTINGS"):Destroy()
  538. else
  539.  
  540. local gui = Instance.new("ScreenGui")
  541. gui.Name = "_COOL_SETTINGS"
  542.  
  543. local frame = Instance.new("Frame")
  544. frame.BackgroundColor3 = Color3.new(57/255, 57/255, 57/255)
  545. frame.BackgroundTransparency = 0.1
  546. frame.BorderColor3 = Color3.new(255/255, 255/255, 255/255)
  547. frame.BorderSizePixel = 5
  548. frame.Position = UDim2.new(0.5, -150, 0.5, -250)
  549. frame.Size = UDim2.new(0, 300, 0, 500)
  550.  
  551. local a_line = Instance.new("Frame")
  552. a_line.BackgroundColor3 = Color3.new(255/255, 255/255, 255/255)
  553. a_line.BorderSizePixel = 0
  554. a_line.Position = UDim2.new(0, 0, 0, 22)
  555. a_line.Size = UDim2.new(1, 0, 0, 5)
  556.  
  557. local title = Instance.new("TextLabel")
  558. title.BackgroundTransparency = 1
  559. title.Size = UDim2.new(1, 0, 0, 22)
  560. title.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  561. title.TextScaled = true
  562. title.Font = "SciFi"
  563. title.TextXAlignment = "Left"
  564. title.Text = "Mode Settings"
  565.  
  566. local scroller = Instance.new("ScrollingFrame")
  567. scroller.BackgroundTransparency = 1
  568. scroller.Position = UDim2.new(0, 0, 0, 27)
  569. scroller.Size = UDim2.new(1, 0, 1, -27)
  570. scroller.ScrollBarThickness = 0
  571.  
  572. local hostmode = modes[mode]
  573.  
  574. --scroller.CanvasSize = Vector2.new(0,(#hostmode*20))
  575. for i,v in pairs(hostmode.settings) do
  576. scroller.CanvasSize = UDim2.new(0, 0, 0, scroller.CanvasSize.Y.Offset+20)
  577. local frame = Instance.new("Frame")
  578. frame.BackgroundTransparency = 1
  579. frame.Size = UDim2.new(1, 0, 0, 20)
  580. frame.Position = UDim2.new(0, 0, 0, scroller.CanvasSize.Y.Offset-20)
  581.  
  582. local label = Instance.new("TextLabel")
  583. label.BackgroundTransparency = 1
  584. label.Size = UDim2.new(0.5, 0, 1, 0)
  585. label.Font = "SciFi"
  586. label.TextScaled = true
  587. label.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  588. label.TextXAlignment = "Left"
  589. label.Text = i
  590.  
  591. local input = Instance.new("TextBox")
  592. input.BackgroundTransparency = 0.8
  593. input.BackgroundColor3 = Color3.new(0/255, 0/255, 0/255)
  594. input.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  595. input.BorderSizePixel = 0
  596. input.ClearTextOnFocus = true
  597. input.Position = UDim2.new(0.5, 0, 0, 0)
  598. input.Size = UDim2.new(0.5, 0, 1, 0)
  599. input.Font = "SciFi"
  600. input.TextScaled = true
  601. input.Text = tostring(v)
  602.  
  603. input.FocusLost:connect(function(property)
  604. print("ffffffff")
  605. if type(v) == type(true) then
  606. if input.Text:lower() == "true" then
  607. hostmode.settings[i] = true
  608. elseif input.Text:lower() == "false" then
  609. hostmode.settings[i] = false
  610. else
  611. input.Text = tostring(hostmode.settings[i])
  612. end
  613. elseif type(v) == type(45678) then
  614. if tonumber(input.Text) ~= nil then
  615. hostmode.settings[i] = tonumber(input.Text)
  616. else
  617. input.Text = tostring(hostmode.settings[i])
  618. end
  619. elseif type(v) == type(Enum.Material.Plastic) then
  620. for _,v in pairs(Enum.Material:GetEnumItems()) do
  621. print("TEST", tostring(v):lower() == ("enum.material."..input.Text), tostring(v):lower(), ("enum.material."..input.Text))
  622. if tostring(v):lower() == ("enum.material."..input.Text) then
  623. print(hostmode.settings[i])
  624. hostmode.settings[i] = v
  625. print("match", hostmode.settings[i])
  626. return
  627. end
  628. end
  629. input.Text = tostring(hostmode.settings[i])
  630. end
  631. end)
  632.  
  633. input.Parent = frame
  634. label.Parent = frame
  635.  
  636. frame.Parent = scroller
  637. end
  638.  
  639. scroller.Parent = frame
  640. title.Parent = frame
  641. a_line.Parent = frame
  642.  
  643. frame.Parent = gui
  644.  
  645. gui.Parent = bin
  646.  
  647. end
  648. sets_b_db = false
  649. end)
  650.  
  651. local lock = Instance.new("TextButton")
  652. lock.Position = UDim2.new(0, 0, 1, -20)
  653. lock.Size = UDim2.new(1, 0, 0, 20)
  654. lock.BackgroundTransparency = 0.9
  655. lock.TextColor3 = Color3.new(255/255, 255/255, 255/255)
  656. lock.Font = "SciFi"
  657. lock.TextSize = 32
  658. lock.TextScaled = true
  659. lock.BorderSizePixel = 0
  660. lock.Text = "[ Unlocked ]"
  661.  
  662. lock.MouseButton1Click:connect(function()
  663. state = not state
  664. if state then
  665. lock.Text = "[ Locked ]"
  666. else
  667. lock.Text = "[ Unlocked ]"
  668. end
  669. end)
  670.  
  671. lock.Parent = frame
  672. sets_b.Parent = frame
  673. mode_l.Parent = frame
  674. instru.Parent = frame
  675. title.Parent = frame
  676. a_line.Parent = frame
  677.  
  678. frame.Parent = gui
  679.  
  680.  
  681.  
  682.  
  683. gui.Parent = bin
  684.  
  685.  
  686. m.Button1Down:connect(function()
  687. if m.Target ~= nil and instru.Text == "On" and bin:FindFirstChild("_COOL_SETTINGS") == nil then
  688. print(m.Hit)
  689. modes[mode]:Run(m.Target, m.Hit)
  690. end
  691. end)
  692.  
  693. game:GetService("UserInputService").InputBegan:connect(function(iob, gpe)
  694. if iob.KeyCode == Enum.KeyCode.E and not state and bin:FindFirstChild("_COOL_SETTINGS") == nil then
  695. if mode < #modes then
  696. mode = mode + 1
  697. mode_l.Text = modes[mode].name
  698. else
  699. mode = 1
  700. mode_l.Text = modes[mode].name
  701. end
  702. elseif iob.KeyCode == Enum.KeyCode.R then
  703. for i,v in pairs(_G.csets) do
  704. print(i)
  705. for i,v in pairs(v) do
  706. print("[[ " .. i .. " ]] -- " .. "[[ " .. v .. " ]]")
  707. end
  708. end
  709. end
  710. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement