Advertisement
Brayden77

Universal Automatic Piano Script

Jul 14th, 2020 (edited)
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.04 KB | None | 0 0
  1. -- Farewell Infortality.
  2. -- Version: 2.82
  3. -- Instances:
  4. local ScreenGui = Instance.new("ScreenGui")
  5. local Main_GUI = Instance.new("Frame")
  6. local List = Instance.new("ScrollingFrame")
  7. local UIGridLayout = Instance.new("UIGridLayout")
  8. local Add = Instance.new("TextButton")
  9. local TopBar = Instance.new("Frame")
  10. local Exit = Instance.new("TextButton")
  11. local Delay = Instance.new("TextBox")
  12. local Count = Instance.new("TextLabel")
  13. local PLAY_BUTTON = Instance.new("TextButton")
  14. local PAUSE_BUTTON = Instance.new("TextButton")
  15. local STOP_BUTTON = Instance.new("TextButton")
  16. local Box = Instance.new("TextBox")
  17. local SideBar = Instance.new("Frame")
  18. local Adding_Frame = Instance.new("Frame")
  19. local TopBar_2 = Instance.new("Frame")
  20. local Exit_2 = Instance.new("TextButton")
  21. local Saving_Frame = Instance.new("Frame")
  22. local NAME = Instance.new("TextBox")
  23. local DELAY = Instance.new("TextBox")
  24. local SAVE = Instance.new("TextButton")
  25. local Box_2 = Instance.new("TextBox")
  26. local SAVE_2 = Instance.new("TextButton")
  27. local MusicBar = Instance.new("TextButton")
  28. --Properties:
  29. ScreenGui.Parent = game:GetService("CoreGui")
  30.  
  31. Main_GUI.Name = "Main_GUI"
  32. Main_GUI.Parent = ScreenGui
  33. Main_GUI.BackgroundColor3 = Color3.new(1, 1, 1)
  34. Main_GUI.BorderSizePixel = 0
  35. Main_GUI.Position = UDim2.new(0.32929045, 0, 0.339805812, 0)
  36. Main_GUI.Size = UDim2.new(0, 562, 0, 263)
  37.  
  38. List.Name = "List"
  39. List.Parent = Main_GUI
  40. List.BackgroundColor3 = Color3.new(0.952941, 0.952941, 0.952941)
  41. List.BorderSizePixel = 0
  42. List.Position = UDim2.new(0.772630453, 0, 0.125175327, 0)
  43. List.Size = UDim2.new(0, 128, 0, 198)
  44. List.ScrollBarThickness = 0
  45.  
  46. UIGridLayout.Parent = List
  47. UIGridLayout.CellPadding = UDim2.new(0, 0, 0, 0)
  48. UIGridLayout.CellSize = UDim2.new(0, 128, 0, 19)
  49.  
  50. Add.Name = "Add"
  51. Add.Parent = Main_GUI
  52. Add.BackgroundColor3 = Color3.new(0.952941, 0.952941, 0.952941)
  53. Add.BorderSizePixel = 0
  54. Add.Position = UDim2.new(0.772630453, 0, 0.878327012, 0)
  55. Add.Size = UDim2.new(0, 128, 0, 32)
  56. Add.Font = Enum.Font.SourceSans
  57. Add.Text = "+"
  58. Add.TextColor3 = Color3.new(0, 0.65098, 0)
  59. Add.TextScaled = true
  60. Add.TextSize = 14
  61. Add.TextWrapped = true
  62.  
  63. TopBar.Name = "TopBar"
  64. TopBar.Parent = Main_GUI
  65. TopBar.BackgroundColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  66. TopBar.BorderSizePixel = 0
  67. TopBar.Position = UDim2.new(0, 0, -0.00239951699, 0)
  68. TopBar.Size = UDim2.new(0, 562, 0, 34)
  69.  
  70. Exit.Name = "Exit"
  71. Exit.Parent = TopBar
  72. Exit.BackgroundColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  73. Exit.BorderSizePixel = 0
  74. Exit.Position = UDim2.new(0.937992275, 0, 0.120320939, 0)
  75. Exit.Size = UDim2.new(0, 35, 0, 25)
  76. Exit.Font = Enum.Font.SourceSans
  77. Exit.Text = "x"
  78. Exit.TextColor3 = Color3.new(1, 1, 1)
  79. Exit.TextScaled = true
  80. Exit.TextSize = 14
  81. Exit.TextWrapped = true
  82.  
  83. Delay.Name = "Delay"
  84. Delay.Parent = TopBar
  85. Delay.BackgroundColor3 = Color3.new(0.639216, 0.639216, 0.639216)
  86. Delay.BorderSizePixel = 0
  87. Delay.Size = UDim2.new(0, 59, 0, 34)
  88. Delay.Font = Enum.Font.SourceSans
  89. Delay.Text = ".5"
  90. Delay.TextColor3 = Color3.new(0.952941, 0.952941, 0.952941)
  91. Delay.TextScaled = true
  92. Delay.TextSize = 14
  93. Delay.TextWrapped = true
  94.  
  95. Count.Name = "Count"
  96. Count.Parent = TopBar
  97. Count.BackgroundColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  98. Count.BorderSizePixel = 0
  99. Count.Position = UDim2.new(0.346975088, 0, 0.0185609702, 0)
  100. Count.Size = UDim2.new(0, 173, 0, 31)
  101. Count.Font = Enum.Font.SourceSans
  102. Count.Text = "[0/0]"
  103. Count.TextColor3 = Color3.new(1, 1, 1)
  104. Count.TextScaled = true
  105. Count.TextSize = 14
  106. Count.TextWrapped = true
  107.  
  108. PLAY_BUTTON.Name = "PLAY_BUTTON"
  109. PLAY_BUTTON.Parent = Main_GUI
  110. PLAY_BUTTON.BackgroundColor3 = Color3.new(0.952941, 0.952941, 0.952941)
  111. PLAY_BUTTON.BorderSizePixel = 0
  112. PLAY_BUTTON.Position = UDim2.new(0, 0, 0.878326952, 0)
  113. PLAY_BUTTON.Size = UDim2.new(0, 144, 0, 32)
  114. PLAY_BUTTON.Font = Enum.Font.SourceSans
  115. PLAY_BUTTON.Text = "PLAY"
  116. PLAY_BUTTON.TextColor3 = Color3.new(0, 0.65098, 0)
  117. PLAY_BUTTON.TextScaled = true
  118. PLAY_BUTTON.TextSize = 14
  119. PLAY_BUTTON.TextWrapped = true
  120.  
  121. PAUSE_BUTTON.Name = "PAUSE_BUTTON"
  122. PAUSE_BUTTON.Parent = Main_GUI
  123. PAUSE_BUTTON.BackgroundColor3 = Color3.new(0.952941, 0.952941, 0.952941)
  124. PAUSE_BUTTON.BorderSizePixel = 0
  125. PAUSE_BUTTON.Position = UDim2.new(0.256227762, 0, 0.878327012, 0)
  126. PAUSE_BUTTON.Size = UDim2.new(0, 146, 0, 32)
  127. PAUSE_BUTTON.Font = Enum.Font.SourceSans
  128. PAUSE_BUTTON.Text = "PAUSE"
  129. PAUSE_BUTTON.TextColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  130. PAUSE_BUTTON.TextScaled = true
  131. PAUSE_BUTTON.TextSize = 14
  132. PAUSE_BUTTON.TextWrapped = true
  133.  
  134. STOP_BUTTON.Name = "STOP_BUTTON"
  135. STOP_BUTTON.Parent = Main_GUI
  136. STOP_BUTTON.BackgroundColor3 = Color3.new(0.952941, 0.952941, 0.952941)
  137. STOP_BUTTON.BorderSizePixel = 0
  138. STOP_BUTTON.Position = UDim2.new(0.516014218, 0, 0.874524713, 0)
  139. STOP_BUTTON.Size = UDim2.new(0, 144, 0, 32)
  140. STOP_BUTTON.Font = Enum.Font.SourceSans
  141. STOP_BUTTON.Text = "STOP"
  142. STOP_BUTTON.TextColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  143. STOP_BUTTON.TextScaled = true
  144. STOP_BUTTON.TextSize = 14
  145. STOP_BUTTON.TextWrapped = true
  146.  
  147. Box.Name = "Box"
  148. Box.Parent = Main_GUI
  149. Box.BackgroundColor3 = Color3.new(1, 1, 1)
  150. Box.BorderSizePixel = 0
  151. Box.Position = UDim2.new(0.060498219, 0, 0.126878053, 0)
  152. Box.Size = UDim2.new(0, 400, 0, 198)
  153. Box.Font = Enum.Font.SourceSans
  154. Box.MultiLine = true
  155. Box.Text = ""
  156. Box.TextColor3 = Color3.new(0, 0, 0)
  157. Box.TextSize = 14
  158. Box.TextWrapped = true
  159. Box.TextXAlignment = Enum.TextXAlignment.Left
  160. Box.TextYAlignment = Enum.TextYAlignment.Top
  161.  
  162. SideBar.Name = "SideBar"
  163. SideBar.Parent = Main_GUI
  164. SideBar.BackgroundColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  165. SideBar.BorderSizePixel = 0
  166. SideBar.Position = UDim2.new(0, 0, 0.126878053, 0)
  167. SideBar.Size = UDim2.new(0, 34, 0, 198)
  168.  
  169. Adding_Frame.Name = "Adding_Frame"
  170. Adding_Frame.Parent = ScreenGui
  171. Adding_Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  172. Adding_Frame.BorderSizePixel = 0
  173. Adding_Frame.Position = UDim2.new(0.32929042, 0, 0.339805812, 0)
  174. Adding_Frame.Size = UDim2.new(0, 435, 0, 262)
  175. Adding_Frame.Visible = false
  176.  
  177. TopBar_2.Name = "TopBar"
  178. TopBar_2.Parent = Adding_Frame
  179. TopBar_2.BackgroundColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  180. TopBar_2.BorderSizePixel = 0
  181. TopBar_2.Size = UDim2.new(0, 435, 0, 33)
  182.  
  183. Exit_2.Name = "Exit"
  184. Exit_2.Parent = TopBar_2
  185. Exit_2.BackgroundColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  186. Exit_2.BorderSizePixel = 0
  187. Exit_2.Position = UDim2.new(0.919540226, 0, 0.0909090936, 0)
  188. Exit_2.Size = UDim2.new(0, 34, 0, 25)
  189. Exit_2.Font = Enum.Font.SourceSans
  190. Exit_2.Text = "x"
  191. Exit_2.TextColor3 = Color3.new(1, 1, 1)
  192. Exit_2.TextScaled = true
  193. Exit_2.TextSize = 14
  194. Exit_2.TextWrapped = true
  195.  
  196. Saving_Frame.Name = "Saving_Frame"
  197. Saving_Frame.Parent = Adding_Frame
  198. Saving_Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  199. Saving_Frame.BorderSizePixel = 0
  200. Saving_Frame.Position = UDim2.new(1.40310704e-07, 0, 0.127362311, 0)
  201. Saving_Frame.Size = UDim2.new(0, 434, 0, 229)
  202. Saving_Frame.Visible = false
  203.  
  204. NAME.Name = "NAME"
  205. NAME.Parent = Saving_Frame
  206. NAME.BackgroundColor3 = Color3.new(0.952941, 0.952941, 0.952941)
  207. NAME.BorderColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  208. NAME.Position = UDim2.new(0.187925577, 0, 0.0809528008, 0)
  209. NAME.Size = UDim2.new(0, 270, 0, 52)
  210. NAME.Font = Enum.Font.SourceSans
  211. NAME.Text = "NAME"
  212. NAME.TextColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  213. NAME.TextScaled = true
  214. NAME.TextSize = 14
  215. NAME.TextWrapped = true
  216.  
  217. DELAY.Name = "DELAY"
  218. DELAY.Parent = Saving_Frame
  219. DELAY.BackgroundColor3 = Color3.new(0.952941, 0.952941, 0.952941)
  220. DELAY.BorderColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  221. DELAY.Position = UDim2.new(0.187153623, 0, 0.384966344, 0)
  222. DELAY.Size = UDim2.new(0, 270, 0, 52)
  223. DELAY.Font = Enum.Font.SourceSans
  224. DELAY.Text = "DELAY (optional)"
  225. DELAY.TextColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  226. DELAY.TextScaled = true
  227. DELAY.TextSize = 14
  228. DELAY.TextWrapped = true
  229.  
  230. SAVE.Name = "SAVE"
  231. SAVE.Parent = Saving_Frame
  232. SAVE.BackgroundColor3 = Color3.new(1, 1, 1)
  233. SAVE.BorderColor3 = Color3.new(0.658824, 0.658824, 0.658824)
  234. SAVE.Position = UDim2.new(0.18490921, 0, 0.687428534, 0)
  235. SAVE.Size = UDim2.new(0, 270, 0, 52)
  236. SAVE.Font = Enum.Font.SourceSans
  237. SAVE.Text = "Confirm"
  238. SAVE.TextColor3 = Color3.new(0, 0.65098, 0)
  239. SAVE.TextScaled = true
  240. SAVE.TextSize = 14
  241. SAVE.TextWrapped = true
  242.  
  243. Box_2.Name = "Box"
  244. Box_2.Parent = Adding_Frame
  245. Box_2.BackgroundColor3 = Color3.new(0.972549, 0.972549, 0.972549)
  246. Box_2.BorderSizePixel = 0
  247. Box_2.Position = UDim2.new(1.40310704e-07, 0, 0.127362311, 0)
  248. Box_2.Size = UDim2.new(0, 434, 0, 197)
  249. Box_2.Font = Enum.Font.SourceSans
  250. Box_2.MultiLine = true
  251. Box_2.Text = ""
  252. Box_2.TextColor3 = Color3.new(0, 0, 0)
  253. Box_2.TextSize = 14
  254. Box_2.TextWrapped = true
  255. Box_2.TextXAlignment = Enum.TextXAlignment.Left
  256. Box_2.TextYAlignment = Enum.TextYAlignment.Top
  257.  
  258. SAVE_2.Name = "SAVE"
  259. SAVE_2.Parent = Adding_Frame
  260. SAVE_2.BackgroundColor3 = Color3.new(0.952941, 0.952941, 0.952941)
  261. SAVE_2.BorderSizePixel = 0
  262. SAVE_2.Position = UDim2.new(0.291364282, 0, 0.881378293, 0)
  263. SAVE_2.Size = UDim2.new(0, 180, 0, 31)
  264. SAVE_2.Font = Enum.Font.SourceSans
  265. SAVE_2.Text = "SAVE"
  266. SAVE_2.TextColor3 = Color3.new(0, 0.65098, 0)
  267. SAVE_2.TextScaled = true
  268. SAVE_2.TextSize = 14
  269. SAVE_2.TextWrapped = true
  270.  
  271. MusicBar.Name = "MusicBar"
  272. MusicBar.Parent = ScreenGui
  273. MusicBar.BackgroundColor3 = Color3.new(0.705882, 0.705882, 0.705882)
  274. MusicBar.BorderSizePixel = 0
  275. MusicBar.Position = UDim2.new(0.494845361, 0, 0.45995146, 0)
  276. MusicBar.Size = UDim2.new(0, 128, 0, 19)
  277. MusicBar.Visible = false
  278. MusicBar.Font = Enum.Font.Highway
  279. MusicBar.Text = "SONG NAME"
  280. MusicBar.TextColor3 = Color3.new(1, 1, 1)
  281. MusicBar.TextSize = 14
  282. MusicBar.TextWrapped = true
  283. MusicBar.TextXAlignment = Enum.TextXAlignment.Left
  284. -- Scripts:
  285. function SCRIPT_RPQO89_FAKESCRIPT() -- ScreenGui.Control_Script
  286.     getfenv().script = Instance.new('LocalScript', ScreenGui)
  287.     local Saving = script.Parent.Adding_Frame
  288.     local mouse = game.Players.LocalPlayer:GetMouse()
  289.     local UserInputService = game:GetService("UserInputService")
  290.     loadstring(game:HttpGet('https://pastebin.com/raw/tqLie506'))()
  291.     GUI_Toggle = false
  292.    
  293.     function Set(a,b,c,d,e,f)
  294.         Saving.Visible = a
  295.         Saving.Saving_Frame.Visible = b
  296.         Saving.Box.Visible = c
  297.         Saving.SAVE.Visible = d
  298.         Saving.Saving_Frame.NAME.Text = e
  299.         Saving.Saving_Frame.DELAY.Text = f
  300.     end
  301.    
  302.     mouse.KeyDown:connect(function(input)
  303.         if input == '=' then
  304.             if GUI_Toggle == true then
  305.                 script.Parent.Main_GUI.Visible = true
  306.                 GUI_Toggle = false
  307.             else
  308.                 script.Parent.Main_GUI.Visible = false
  309.                 GUI_Toggle = true
  310.             end
  311.         end
  312.     end)
  313.    
  314.     Add_Toggle = false
  315.     script.Parent.Main_GUI.TopBar.Exit.MouseButton1Down:Connect(function()
  316.         script.Parent.Main_GUI.Visible = false; GUI_Toggle = true
  317.     end)
  318.    
  319.     Saving.TopBar.Exit.MouseButton1Down:Connect(function()
  320.         Saving.Box.Text = 'Example: 6e p u p u [6ep]'
  321.         Saving.Visible = false; Saving.Saving_Frame.NAME.Text = 'NAME'
  322.         Saving.Saving_Frame.DELAY.Text = 'DELAY (optional)'; Add_Toggle = false
  323.     end)
  324.    
  325.     script.Parent.Main_GUI.Add.MouseButton1Down:Connect(function()
  326.         if not Add_Toggle then
  327.             Set(true, false, true, true, 'NAME', 'DELAY (optional)')
  328.             Add_Toggle = true
  329.         else
  330.             Set(false, true, false, false, 'NAME', 'DELAY (optional')
  331.             Add_Toggle = false
  332.         end
  333.     end)
  334.    
  335.     Saving.SAVE.MouseButton1Down:Connect(function()
  336.         Saving.Box.Visible = false
  337.         Saving.Saving_Frame.Visible = true
  338.         Saving.SAVE.Visible = false
  339.     end)
  340.    
  341.     Saving.Saving_Frame.SAVE.MouseButton1Down:Connect(function()
  342.         local Ready = true
  343.         for i,v in pairs(script.Parent.Main_GUI.List:GetChildren()) do
  344.             if v.Name:match(Saving.Saving_Frame.NAME.Text) then
  345.                 Saving.Saving_Frame.SAVE.TextColor3 = Color3.fromRGB(208, 0, 0)
  346.                 wait(.2)
  347.                 Saving.Saving_Frame.SAVE.TextColor3 = Color3.fromRGB(0, 166, 0)
  348.                 Ready = false
  349.             end
  350.         end
  351.         if Ready then
  352.             Add_Toggle = false
  353.             local MouseIn = false
  354.             Saving.Visible = false
  355.             local Add_Bar = script.Parent.MusicBar:Clone()
  356.             local Notes = Instance.new('StringValue')
  357.             local Speed = Instance.new('StringValue')
  358.             Notes.Parent = Add_Bar
  359.             Speed.Parent = Add_Bar
  360.             Add_Bar.Name = Saving.Saving_Frame.NAME.Text
  361.             Add_Bar.Text = Saving.Saving_Frame.NAME.Text
  362.             Add_Bar.Parent = script.Parent.Main_GUI.List
  363.             Notes.Value = Saving.Box.Text
  364.             Speed.Value = Saving.Saving_Frame.DELAY.Text
  365.             Add_Bar.MouseEnter:connect(function()
  366.                 MouseIn = true
  367.                 mouse.KeyDown:connect(function(key)
  368.                     if key:lower() == 'e' then
  369.                         if MouseIn == true then
  370.                             Add_Bar:Remove()
  371.                         end
  372.                     end
  373.                 end)
  374.             end)
  375.             Add_Bar.MouseLeave:connect(function()
  376.                 MouseIn = false
  377.             end)
  378.             Add_Bar.MouseButton1Down:Connect(function()
  379.                 script.Parent.Main_GUI.Box.Text = Notes.Value
  380.                 if type(tonumber(Speed.Value)) == 'number' then
  381.                     script.Parent.Main_GUI.TopBar.Delay.Text = Speed.Value
  382.                 end
  383.             end)
  384.             Saving.Saving_Frame.Visible = false
  385.             Saving.Saving_Frame.NAME.Text = 'NAME'
  386.             Saving.Saving_Frame.DELAY.Text = 'DELAY (optional'
  387.             Add_Bar.Visible = true
  388.         end
  389.     end)
  390.    
  391.     Stop = false
  392.     GroupNote = false
  393.     script.Parent.Main_GUI.STOP_BUTTON.MouseButton1Down:Connect(function()
  394.         Stop = true
  395.     end)
  396.    
  397.     Special_Notes = {'!','@','$','^','(','%'}
  398.    
  399.     function ShiftKey(key)
  400.         local AsciiKey = _G.Ascii[key]
  401.         keypress(0xA0); keypress(AsciiKey);
  402.         keyrelease(0xA0); keyrelease(AsciiKey);
  403.     end
  404.    
  405.     script.Parent.Main_GUI.PLAY_BUTTON.MouseButton1Down:Connect(function()
  406.         local Count = 0
  407.         Speed = script.Parent.Main_GUI.TopBar.Delay.Text
  408.         script.Parent.Main_GUI.PAUSE_BUTTON.BackgroundColor3 = Color3.fromRGB(243, 243, 243)
  409.         script.Parent.Main_GUI.PAUSE_BUTTON.TextColor3 = Color3.fromRGB(168, 168, 168)
  410.         paused = false
  411.         c = coroutine.create(function()
  412.             for Notes in script.Parent.Main_GUI.Box.Text:gmatch('[^%.]') do
  413.                 if paused then
  414.                     coroutine.yield()
  415.                 end
  416.                 local Special_Play = false
  417.                 local DefaultSpeed = script.Parent.Main_GUI.TopBar.Delay.Text
  418.                 print(Speed)
  419.                 if Stop == true then Stop = false break end
  420.                 if Notes == '[' then
  421.                     GroupNote = true
  422.                     Speed = '0'
  423.                 elseif Notes == ']' then
  424.                     GroupNote = false
  425.                     Speed = DefaultSpeed
  426.                 elseif Notes == '|' then
  427.                 wait(.5)
  428.                 elseif Notes == '{' then
  429.                     Speed = Speed/2
  430.                 elseif Notes == '}' then
  431.                     Speed = DefaultSpeed
  432.                 elseif Notes == ' ' then
  433.                     wait(Speed+'.01')
  434.                 end
  435.                 for i=1,#Special_Notes do
  436.                     if Notes == Special_Notes[i] then
  437.                         ShiftKey(Notes)
  438.                         Special_Play = true
  439.                     end
  440.                 end
  441.                 if not Special_Play and not paused then
  442.                     if Notes:match('%w' or '%d') then
  443.                         local Press = _G.Ascii[Notes:lower()]
  444.                         if not Notes:match('%d') and Notes == Notes:upper() then
  445.                             keypress(0xA0); keypress(Press); keyrelease(Press);
  446.                             keyrelease(0xA0)
  447.                         else
  448.                             keypress(Press); keyrelease(Press)
  449.                         end
  450.                     end
  451.                 end
  452.                 print(Notes)
  453.                 Count=Count+1
  454.                 wait(tonumber(Speed))
  455.                 script.Parent.Main_GUI.TopBar.Count.Text = '['..Count..'/'..#script.Parent.Main_GUI.Box.Text..']'
  456.             end
  457.         end)
  458.         coroutine.resume(c)
  459.     end)
  460.    
  461.     Up = false
  462.     Down = false
  463.    
  464.     function onKeyPress(inputObject,gameProcessed)
  465.         success, err = pcall(function()
  466.             if inputObject.KeyCode == Enum.KeyCode.Up then
  467.                 Speed = Speed + .01
  468.                 script.Parent.Main_GUI.TopBar.Delay.Text = tostring(Speed)
  469.             elseif inputObject.KeyCode == Enum.KeyCode.Down then
  470.                 Speed = Speed - .01
  471.                 script.Parent.Main_GUI.TopBar.Delay.Text = tostring(Speed)
  472.             end
  473.         end)
  474.     end
  475.  
  476.     if not success then end
  477.  
  478.    
  479.     UserInputService.InputBegan:connect(onKeyPress)
  480.    
  481.     script.Parent.Main_GUI.PAUSE_BUTTON.MouseButton1Down:Connect(function()
  482.         if paused then
  483.             paused = false
  484.             script.Parent.Main_GUI.PAUSE_BUTTON.BackgroundColor3 = Color3.fromRGB(243, 243, 243)
  485.             script.Parent.Main_GUI.PAUSE_BUTTON.TextColor3 = Color3.fromRGB(168, 168, 168)
  486.             coroutine.resume(c)
  487.         else
  488.             paused = true
  489.             script.Parent.Main_GUI.PAUSE_BUTTON.BackgroundColor3 = Color3.fromRGB(168, 168, 168)
  490.             script.Parent.Main_GUI.PAUSE_BUTTON.TextColor3 = Color3.fromRGB(243, 243, 243)
  491.             coroutine.resume(c)
  492.         end
  493.     end)
  494.    
  495.    
  496.     local Main_GUI = script.Parent.Main_GUI
  497.     local dragging
  498.     local dragInput
  499.     local dragStart
  500.     local startPos
  501.    
  502.     local function update(input)
  503.         local delta = input.Position - dragStart
  504.         Main_GUI.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  505.     end
  506.    
  507.     Main_GUI.InputBegan:Connect(function(input)
  508.         if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  509.             dragging = true
  510.             dragStart = input.Position
  511.             startPos = Main_GUI.Position
  512.             input.Changed:Connect(function()
  513.                 if input.UserInputState == Enum.UserInputState.End then
  514.                     dragging = false
  515.                 end
  516.             end)
  517.         end
  518.     end)
  519.    
  520.     Main_GUI.InputChanged:Connect(function(input)
  521.         if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  522.             dragInput = input
  523.         end
  524.     end)
  525.    
  526.     UserInputService.InputChanged:Connect(function(input)
  527.         if input == dragInput and dragging then
  528.             update(input)
  529.         end
  530.     end)
  531.  
  532. end
  533. coroutine.resume(coroutine.create(SCRIPT_RPQO89_FAKESCRIPT))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement