Advertisement
helloiamhello

Roblox Click Gui Script

Oct 3rd, 2021
6,891
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 12.75 KB | None | 0 0
  1. if loaded then
  2.     error("it's already running!",0)
  3.     return
  4. end
  5.  
  6. pcall(function()
  7.     getgenv().loaded = true
  8.     game.StarterGui:SetCore("SendNotification", {
  9.     Title = "Loaded!"; -- the title (ofc)
  10.     Text = "Click GUI has loaded! Enjoy!"; -- what the text says (ofc)t.  
  11.     Duration = 2; -- how long the notification should in secounds
  12.     })
  13. end)
  14.  
  15. local function getClickCounter()
  16.     local result = 0
  17.     for _, object in next, game:GetDescendants() do
  18.         if object:IsA("ClickDetector") then
  19.             result = result + 1
  20.         end
  21.     end
  22.     return result
  23. end
  24.  
  25. local function getTouchCounter()
  26.     local result = 0
  27.     for _, object in next, game:GetDescendants() do
  28.         if object:IsA("TouchTransmitter") then
  29.             result = result + 1
  30.         end
  31.     end
  32.     return result
  33. end
  34.  
  35. local ClickGUI = Instance.new("ScreenGui")
  36. local ClickFrame = Instance.new("Frame")
  37. local SecondClickFrame= Instance.new("Frame")
  38. local FireClick = Instance.new("TextButton")
  39. local FirePause = Instance.new("TextButton")
  40. local MaxActive = Instance.new("TextButton")
  41. local DestroyButton = Instance.new("TextButton")
  42. local FireSound = Instance.new("TextButton")
  43. local ShowSelectionClick = Instance.new("TextButton")
  44. local ShowSelectionTouch = Instance.new("TextButton")
  45. local RandomPitch = Instance.new("TextButton")
  46. local TriggerTouch = Instance.new("TextButton")
  47. local UnlockParts = Instance.new("TextButton")
  48. local KickMe = Instance.new("TextButton")
  49. local ReasonText = Instance.new("TextBox")
  50. local ClickCount = Instance.new("TextLabel")
  51. local TouchCount = Instance.new("TextLabel")
  52. local TitleTex = Instance.new("TextLabel")
  53.  
  54. local isOpen = false
  55.  
  56. -- 1st Grid = 0
  57. -- 2nd Grid = 25
  58. -- 3rd Grid = 50
  59.  
  60. -- Properties
  61.  
  62. ClickGUI.Name = "ClickGUI"
  63. ClickGUI.Parent = game.CoreGui
  64.  
  65. ClickFrame.Name = "ClickFrame"
  66. ClickFrame.Parent = ClickGUI
  67. ClickFrame.Active = true
  68. ClickFrame.BackgroundColor3 = Color3.fromRGB(0, 90, 247)
  69. ClickFrame.BackgroundTransparency = 0.25
  70. ClickFrame.Position = UDim2.new(0.75, 0, 0.2, 0)
  71. ClickFrame.Size = UDim2.new(0, 310, 0, 155)
  72. ClickFrame.Draggable = true
  73.  
  74. SecondClickFrame.Name = "SecondClickFrame"
  75. SecondClickFrame.Parent = ClickFrame
  76. SecondClickFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  77. SecondClickFrame.BackgroundTransparency = 0.25
  78. SecondClickFrame.Position = UDim2.new(0.03, 0, 0.15, 0)
  79. SecondClickFrame.Size = UDim2.new(0, 290, 0, 126)
  80.  
  81. FireSound.Name = "FireSound"
  82. FireSound.Parent = SecondClickFrame
  83. FireSound.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  84. FireSound.Position = UDim2.new(0, 0, 0, 0)
  85. FireSound.Size = UDim2.new(0, 66, 0, 18)
  86. FireSound.Font = Enum.Font.SourceSans
  87. FireSound.Text = "Fire All Sounds"
  88. FireSound.TextColor3 = Color3.new(1, 1, 1)
  89. FireSound.TextScaled = true
  90. FireSound.TextSize = 14
  91. FireSound.TextWrapped = true
  92. FireSound.MouseButton1Click:connect(function()
  93. local Click = click_detector or fireclickdetector
  94.     for _, object in next, game:GetDescendants() do
  95.         if object.parent.Name == "play" and object:IsA("ClickDetector") then
  96.             Click(object, 1)
  97.         end
  98.     end
  99. end)
  100.  
  101. FireClick.Name = "FireClick"
  102. FireClick.Parent = SecondClickFrame
  103. FireClick.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  104. FireClick.Position = UDim2.new(0, 0, 0, 25)
  105. FireClick.Size = UDim2.new(0, 66, 0, 18)
  106. FireClick.Font = Enum.Font.SourceSans
  107. FireClick.Text = "Fire Click Detectors"
  108. FireClick.TextColor3 = Color3.new(1, 1, 1)
  109. FireClick.TextScaled = true
  110. FireClick.TextSize = 14
  111. FireClick.TextWrapped = true
  112. FireClick.MouseButton1Click:connect(function()
  113. local Click = click_detector or fireclickdetector
  114.     for _, object in next, game:GetDescendants() do
  115.         if object:IsA("ClickDetector") then
  116.             Click(object, 1)
  117.         end
  118.     end
  119. end)
  120.  
  121. TriggerTouch.Name = "TriggerTouch"
  122. TriggerTouch.Parent = SecondClickFrame
  123. TriggerTouch.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  124. TriggerTouch.Position = UDim2.new(0, 224.5, 0, 0)
  125. TriggerTouch.Size = UDim2.new(0, 66, 0, 18)
  126. TriggerTouch.Font = Enum.Font.SourceSans
  127. TriggerTouch.Text = "Trigger Touch Interests"
  128. TriggerTouch.TextColor3 = Color3.new(1, 1, 1)
  129. TriggerTouch.TextScaled = true
  130. TriggerTouch.TextSize = 14
  131. TriggerTouch.TextWrapped = true
  132. TriggerTouch.MouseButton1Click:connect(function()
  133.     for _,v in pairs(workspace:GetDescendants()) do
  134.         if v:IsA("TouchTransmitter") then
  135.             firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, v.Parent, 0) --0 is touch
  136.             task.wait(.01)
  137.             firetouchinterest(game.Players.LocalPlayer.Character.HumanoidRootPart, v.Parent, 1) -- 1 is untouch
  138.         end
  139.     end
  140. end)
  141.  
  142. UnlockParts.Name = "UnlockParts"
  143. UnlockParts.Parent = SecondClickFrame
  144. UnlockParts.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  145. UnlockParts.Position = UDim2.new(0, 224.5, 0, 25)
  146. UnlockParts.Size = UDim2.new(0, 66, 0, 18)
  147. UnlockParts.Font = Enum.Font.SourceSans
  148. UnlockParts.Text = "Unlock Parts"
  149. UnlockParts.TextColor3 = Color3.new(1, 1, 1)
  150. UnlockParts.TextScaled = true
  151. UnlockParts.TextSize = 14
  152. UnlockParts.TextWrapped = true
  153. UnlockParts.MouseButton1Click:connect(function()
  154.     function unlockEverything(a)
  155.         for n,o in pairs(a:GetChildren())do
  156.             if (o:IsA("BasePart")) then
  157.                 o.Locked = false
  158.             end
  159.             unlockEverything(o)
  160.         end
  161.     end
  162.     unlockEverything(Workspace)
  163. end)
  164.  
  165. FirePause.Name = "ClickPause"
  166. FirePause.Parent = SecondClickFrame
  167. FirePause.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  168. FirePause.Position = UDim2.new(0, 75, 0, 0)
  169. FirePause.Size = UDim2.new(0, 66, 0, 18)
  170. FirePause.Font = Enum.Font.SourceSans
  171. FirePause.Text = "Pause Sounds"
  172. FirePause.TextColor3 = Color3.new(1, 1, 1)
  173. FirePause.TextScaled = true
  174. FirePause.TextSize = 14
  175. FirePause.TextWrapped = true
  176. FirePause.MouseButton1Click:connect(function()
  177. local Click = click_detector or fireclickdetector
  178.     for _, object in next, game:GetDescendants() do
  179.         if object.parent.Name == "Stop" and object:IsA("ClickDetector") then
  180.             Click(object, 1)
  181.         end
  182.     end
  183. end)
  184.  
  185. RandomPitch.Name = "RandomPitch"
  186. RandomPitch.Parent = SecondClickFrame
  187. RandomPitch.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  188. RandomPitch.Position = UDim2.new(0, 75, 0, 25)
  189. RandomPitch.Size = UDim2.new(0, 66, 0, 18)
  190. RandomPitch.Font = Enum.Font.SourceSans
  191. RandomPitch.Text = "Random Pitch"
  192. RandomPitch.TextColor3 = Color3.new(1, 1, 1)
  193. RandomPitch.TextScaled = true
  194. RandomPitch.TextSize = 14
  195. RandomPitch.TextWrapped = true
  196. RandomPitch.MouseButton1Click:connect(function()
  197.     for i, object in pairs(game.Workspace:GetDescendants()) do
  198.         if object:IsA("Sound") then
  199.             object.PlaybackSpeed = math.random(1, 3);
  200.         end
  201.     end
  202. end)
  203.  
  204. MaxActive.Name = "MaxActivation"
  205. MaxActive.Parent = SecondClickFrame
  206. MaxActive.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  207. MaxActive.Position = UDim2.new(0, 149, 0, 0)
  208. MaxActive.Size = UDim2.new(0, 66, 0, 18)
  209. MaxActive.Font = Enum.Font.SourceSans
  210. MaxActive.Text = "Max Activation"
  211. MaxActive.TextColor3 = Color3.new(1, 1, 1)
  212. MaxActive.TextScaled = true
  213. MaxActive.TextSize = 14
  214. MaxActive.TextWrapped = true
  215. MaxActive.MouseButton1Click:connect(function()
  216.     for _, object in next, game:GetDescendants() do
  217.         if object:IsA("ClickDetector") and object then
  218.             object.MaxActivationDistance = 1000000
  219.         end
  220.     end
  221. end)
  222.  
  223. ShowSelectionClick.Name = "ShowSelection"
  224. ShowSelectionClick.Parent = SecondClickFrame
  225. ShowSelectionClick.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  226. ShowSelectionClick.Position = UDim2.new(0, 149, 0, 25)
  227. ShowSelectionClick.Size = UDim2.new(0, 66, 0, 18)
  228. ShowSelectionClick.Font = Enum.Font.SourceSans
  229. ShowSelectionClick.Text = "Show Selection Click"
  230. ShowSelectionClick.TextColor3 = Color3.new(1, 1, 1)
  231. ShowSelectionClick.TextScaled = true
  232. ShowSelectionClick.TextSize = 14
  233. ShowSelectionClick.TextWrapped = true
  234. ShowSelectionClick.MouseButton1Click:connect(function()
  235.     if not isOpen then
  236.         for _, object in next, game:GetDescendants() do
  237.             if object:IsA("ClickDetector") and object.parent:FindFirstChild("SelectionBox") == nil then
  238.                 local selectionbox = Instance.new("SelectionBox", object.parent)
  239.                 selectionbox.Adornee = object.parent
  240.             end
  241.         end
  242.         ShowSelectionClick.Text = "Hide Selection Click"
  243.     else
  244.         for _, object in next, game:GetDescendants() do
  245.             if object:IsA("ClickDetector") and object.parent:FindFirstChild("SelectionBox") ~= nil then
  246.                 object.parent:FindFirstChild("SelectionBox"):Destroy()
  247.             end
  248.         end
  249.         ShowSelectionClick.Text = "Show Selection Click"
  250.     end
  251.     isOpen = not isOpen
  252. end)
  253.  
  254. ShowSelectionTouch.Name = "ShowSelectionTouch"
  255. ShowSelectionTouch.Parent = SecondClickFrame
  256. ShowSelectionTouch.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  257. ShowSelectionTouch.Position = UDim2.new(0, 0, 0, 50)
  258. ShowSelectionTouch.Size = UDim2.new(0, 66, 0, 18)
  259. ShowSelectionTouch.Font = Enum.Font.SourceSans
  260. ShowSelectionTouch.Text = "Show Selection Touch"
  261. ShowSelectionTouch.TextColor3 = Color3.new(1, 1, 1)
  262. ShowSelectionTouch.TextScaled = true
  263. ShowSelectionTouch.TextSize = 14
  264. ShowSelectionTouch.TextWrapped = true
  265. ShowSelectionTouch.MouseButton1Click:connect(function()
  266.     if not isOpen then
  267.         for _, object in next, game:GetDescendants() do
  268.             if object:IsA("TouchTransmitter") and object.parent:FindFirstChild("SelectionBox") == nil then
  269.                 local selectionbox = Instance.new("SelectionBox", object.parent)
  270.                 selectionbox.Adornee = object.parent
  271.             end
  272.         end
  273.         ShowSelectionTouch.Text = "Hide Selection Touch"
  274.     else
  275.         for _, object in next, game:GetDescendants() do
  276.             if object:IsA("TouchTransmitter") and object.parent:FindFirstChild("SelectionBox") ~= nil then
  277.                 object.parent:FindFirstChild("SelectionBox"):Destroy()
  278.             end
  279.         end
  280.         ShowSelectionTouch.Text = "Show Selection Touch"
  281.     end
  282.     isOpen = not isOpen
  283. end)
  284.  
  285. RandomPitch.Name = "RandomPitch"
  286. RandomPitch.Parent = SecondClickFrame
  287. RandomPitch.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  288. RandomPitch.Position = UDim2.new(0, 75, 0, 25)
  289. RandomPitch.Size = UDim2.new(0, 66, 0, 18)
  290. RandomPitch.Font = Enum.Font.SourceSans
  291. RandomPitch.Text = "Random Pitch"
  292. RandomPitch.TextColor3 = Color3.new(1, 1, 1)
  293. RandomPitch.TextScaled = true
  294. RandomPitch.TextSize = 14
  295. RandomPitch.TextWrapped = true
  296. RandomPitch.MouseButton1Click:connect(function()
  297.     for i, object in pairs(game.Workspace:GetDescendants()) do
  298.         if object:IsA("Sound") then
  299.             object.PlaybackSpeed = math.random(1, 3);
  300.         end
  301.     end
  302. end)
  303.  
  304. KickMe.Name = "KickMe"
  305. KickMe.Parent = SecondClickFrame
  306. KickMe.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  307. KickMe.Position = UDim2.new(0, 149, 0, 50)
  308. KickMe.Size = UDim2.new(0, 66, 0, 18)
  309. KickMe.Font = Enum.Font.SourceSans
  310. KickMe.Text = "Kick Yourself"
  311. KickMe.TextColor3 = Color3.new(1, 1, 1)
  312. KickMe.TextScaled = true
  313. KickMe.TextSize = 14
  314. KickMe.TextWrapped = true
  315. KickMe.MouseButton1Click:connect(function()
  316.     game.Players.LocalPlayer:Kick(ReasonText.Text)
  317. end)
  318.  
  319. ReasonText.Name = "ReasonText"
  320. ReasonText.Parent = SecondClickFrame
  321. ReasonText.Position = UDim2.new(0, 75, 0, 50)
  322. ReasonText.Size = UDim2.new(0, 66, 0, 18)
  323. ReasonText.Font = Enum.Font.SourceSans
  324. ReasonText.Text = "ClickDetector"
  325. ReasonText.TextColor3 = Color3.new(1, 1, 1)
  326. ReasonText.TextScaled = true
  327. ReasonText.TextSize = 14
  328. ReasonText.TextWrapped = true
  329.  
  330. ClickCount.Name = "ClickCount"
  331. ClickCount.Parent = SecondClickFrame
  332. ClickCount.BackgroundTransparency = 1
  333. ClickCount.Position = UDim2.new(0, 0, 0, 108.5)
  334. ClickCount.Size = UDim2.new(0, 130, 0, 18)
  335. ClickCount.Font = Enum.Font.SourceSans
  336. ClickCount.Text = "Clickable Count: " .. getClickCounter()
  337. ClickCount.TextColor3 = Color3.new(0, 0, 0)
  338. ClickCount.TextSize = 17
  339.  
  340. TouchCount.Name = "TouchCount"
  341. TouchCount.Parent = SecondClickFrame
  342. TouchCount.BackgroundTransparency = 1
  343. TouchCount.Position = UDim2.new(0, 0, 0, 97.5)
  344. TouchCount.Size = UDim2.new(0, 130, 0, 18)
  345. TouchCount.Font = Enum.Font.SourceSans
  346. TouchCount.Text = "Touchable Count: " .. getTouchCounter()
  347. TouchCount.TextColor3 = Color3.new(0, 0, 0)
  348. TouchCount.TextSize = 17
  349.  
  350. DestroyButton.Name = "DestroyButton"
  351. DestroyButton.Parent = SecondClickFrame
  352. DestroyButton.BackgroundColor3 = Color3.fromRGB(231, 74, 3)
  353. DestroyButton.BackgroundTransparency = 0.25
  354. DestroyButton.Position = UDim2.new(0, 270, 0, -23)
  355. DestroyButton.Size = UDim2.new(0, 20, 0, 18)
  356. DestroyButton.Font = Enum.Font.SourceSans
  357. DestroyButton.Text = "X"
  358. DestroyButton.TextColor3 = Color3.new(1, 1, 1)
  359. DestroyButton.TextScaled = true
  360. DestroyButton.TextSize = 14
  361. DestroyButton.TextWrapped = true
  362. DestroyButton.MouseButton1Click:connect(function()
  363.     ClickGUI:Destroy()
  364.     pcall(function()
  365.         getgenv().loaded = false
  366.     end)
  367. end)
  368.  
  369. TitleTex.Name = "TitleTex"
  370. TitleTex.Parent = SecondClickFrame
  371. TitleTex.BackgroundColor3 = Color3.new(1, 1, 1)
  372. TitleTex.BackgroundTransparency = 1
  373. TitleTex.Position = UDim2.new(0, 70, 0, -40)
  374. TitleTex.Size = UDim2.new(0, 150, 0, 50)
  375. TitleTex.Font = Enum.Font.SourceSans
  376. TitleTex.Text = "Click GUI By Friskshift"
  377. TitleTex.TextColor3 = Color3.new(1, 1, 1)
  378. TitleTex.TextSize = 20
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement