Advertisement
DrakerMaker

Weird Randomized Button

Nov 21st, 2020 (edited)
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.33 KB | None | 0 0
  1. local group = Instance.new("Accessory", owner.Character)
  2. local base = Instance.new("Part", group)
  3. base.BrickColor = BrickColor.new("Pearl")
  4. base.Material = "Metal"
  5. base.Size = Vector3.new(3, 0.5, 3)
  6. base.Anchored = true
  7. local button= Instance.new("Part", group)
  8. button.BrickColor = BrickColor.new("Really red")
  9. button.Material = "Metal"
  10. button.Size = Vector3.new(2.5, 0.5, 2.5)
  11. button.Anchored = true
  12. local button2= Instance.new("Part", workspace)
  13. button2.BrickColor = BrickColor.new("Really red")
  14. button2.Transparency = 1
  15. button2.Material = "Metal"
  16. button2.Size = Vector3.new(2.5, 0.5, 2.5)
  17. button2.Anchored = true
  18. local cd = Instance.new("ClickDetector", button)
  19. local cd2 = Instance.new("ClickDetector", button2)
  20. local click = Instance.new("Sound", button)
  21. click.SoundId = "rbxassetid://421058925"
  22. click.Volume = 2
  23. local BillboardGui = Instance.new("BillboardGui")
  24. local Frame = Instance.new("Frame")
  25. local Text = Instance.new("TextBox")
  26. BillboardGui.MaxDistance = 50
  27. BillboardGui.Name = "Type"
  28. BillboardGui.Parent = button
  29. BillboardGui.Active = true
  30. BillboardGui.Size = UDim2.new(15.5, 0, 15, 0)
  31. BillboardGui.StudsOffset = Vector3.new(0, 6, 0)
  32. local blacklisted = {"Dinoturto"}
  33. Frame.Name = "Framer"
  34. Frame.Parent = BillboardGui
  35. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  36. Frame.BackgroundTransparency = 1
  37. Frame.BorderSizePixel = 0
  38. Frame.Position = UDim2.new(0.209999993, 0, 0.209999993, 0)
  39. Frame.Selectable = true
  40. Frame.Size = UDim2.new(0.600000024, 0, 0.699999988, 0)
  41.  
  42. Text.Name = "Labeler"
  43. Text.Parent = Frame
  44. Text.BackgroundColor3 = Color3.new(0, 0, 0)
  45. Text.BackgroundTransparency = 1
  46. Text.BorderColor3 = Color3.new(0, 0, 0)
  47. Text.Position = UDim2.new(0.200000003, 0, 0.150000006, 0)
  48. Text.Size = UDim2.new(0.600000024, 0, 0.699999988, 0)
  49. Text.ClearTextOnFocus = false
  50. Text.Text = "Weird Randomized Button"
  51. Text.TextColor3 = Color3.new(255, 255, 255)
  52. Text.TextSize = 100
  53. Text.TextScaled = true
  54. Text.Font = "Arcade"
  55. function wbtwe(Part0, Part1, C0)
  56. local weld = Instance.new("Weld", Part0)
  57. weld.Part0 = Part0
  58. weld.Part1 = Part1
  59. weld.C0 = Part1.CFrame:inverse() *Part1.CFrame *C0
  60. return weld
  61. end
  62. local f = 0
  63. anim = coroutine.wrap(function()
  64. while game:GetService("RunService").Stepped:wait() do
  65. for i = 1, 25 do
  66. f = f +0.05
  67. game:GetService("RunService").Stepped:wait()
  68. base.CFrame = base.CFrame:lerp(owner.Character.Torso.CFrame *CFrame.new(-5, 0 +math.sin(f) *0.3, 0), 0.5)
  69. button.CFrame = button.CFrame:lerp(owner.Character.Torso.CFrame *CFrame.new(-5, 0.5 +math.sin(f) *0.3, 0), 0.5)
  70. button2.CFrame = button.CFrame:lerp(owner.Character.Torso.CFrame *CFrame.new(-5, 0.5 +math.sin(f) *0.3, 0), 0.5)
  71. end
  72. end
  73. end)anim()
  74. function onMouseClick(player)
  75. if player.Name ~= "Dinoturto" or player.UserId ~= "977157910" or player.Name ~= "Vulnerali" then
  76. click:Play()
  77. random = math.random(1, 8)
  78. if random == 1 then
  79. local fart = Instance.new("Sound", button)
  80. fart.SoundId = "rbxassetid://5164672146"
  81. fart:Play()
  82. Text.Text = "It is funny. Laugh."
  83. end
  84. if random == 2 then
  85. local burg = Instance.new("Sound", button)
  86. burg.SoundId = "rbxassetid://3217252760"
  87. burg:Play()
  88. Text.Text = "How about a burger?"
  89. local mesh = Instance.new("Part", workspace)
  90. mesh.Size = Vector3.new(1, 0.8, 1)
  91. mesh.Transparency = 1
  92. mesh.Anchored = true
  93. mesh.Position = button.Position +Vector3.new(0, 2, 0)
  94. local mesh2 = Instance.new("SpecialMesh", mesh)
  95. mesh2.MeshId = "http://www.roblox.com/asset/?id=16646125"
  96. mesh2.TextureId = "http://www.roblox.com/asset/?id=16432575"
  97. mesh2.Scale = Vector3.new(1, 1, 1)
  98. for i = 1,10 do
  99. wait()
  100. mesh.Transparency = mesh.Transparency -0.1
  101. end
  102. mesh.Anchored = false
  103. end
  104. if random == 3 then
  105. Text.Text = "You're*"
  106. end
  107. if random == 4 then
  108. Text.Text = "You are an amazing person, "..player.Name.."."
  109. wait(2)
  110. Text.TextColor = BrickColor.new("Really red")
  111. Text.Text = "So lets trade accounts."
  112. wait(0.1)
  113. Text.TextColor = BrickColor.new("Institutional white")
  114. Text.Text = "I didn't ask anything about trading accounts in that red flash."
  115. end
  116. if random == 5 then
  117. local burg = Instance.new("Sound", button)
  118. burg.SoundId = "rbxassetid://5752104931"
  119. burg:Play()
  120. Text.Text = "How about a burger?"
  121. local mesh = Instance.new("Part", workspace)
  122. mesh.Size = Vector3.new(3.79, 3.14, 3.45)
  123. mesh.Transparency = 1
  124. mesh.Anchored = true
  125. mesh.Position = button.Position +Vector3.new(0, 4, 0)
  126. local mesh2 = Instance.new("SpecialMesh", mesh)
  127. mesh2.MeshId = "http://www.roblox.com/asset/?id=16646125"
  128. mesh2.TextureId = "http://www.roblox.com/asset/?id=16432575"
  129. mesh2.Scale = Vector3.new(3.79, 3.925, 3.45)
  130. for i = 1,10 do
  131. wait()
  132. mesh.Transparency = mesh.Transparency -0.1
  133. end
  134. mesh.Anchored = false
  135. local cd3 = Instance.new("ClickDetector", mesh)
  136. local eat = Instance.new("Sound", mesh)
  137. eat.SoundId = "http://www.roblox.com/asset/?id=22593942"
  138. eat.Volume = 5
  139. function onMouseClick3(player)
  140. eat:Play()
  141. end
  142. cd3.MouseClick:connect(onMouseClick3)
  143. end
  144. if random == 6 then
  145. Text.Text = "Block. Push it around. Yay."
  146. local mesh = Instance.new("Part", workspace)
  147. mesh.Size = Vector3.new(3.79, 3.14, 3.45)
  148. mesh.Transparency = 1
  149. mesh.Anchored = true
  150. mesh.Position = button.Position +Vector3.new(0, 4, 0)
  151. for i = 1,10 do
  152. wait()
  153. mesh.Transparency = mesh.Transparency -0.1
  154. end
  155. mesh.Anchored = false
  156. end
  157. if random == 7 then
  158. Text.Text = "Bobux"
  159. local mesh = Instance.new("Part", workspace)
  160. mesh.Size = Vector3.new(3.79, 3.14, 3.45)
  161. mesh.Transparency = 1
  162. mesh.Anchored = true
  163. mesh.Position = button.Position +Vector3.new(0, 4, 0)
  164. mesh.BrickColor = BrickColor.new("Bright green")
  165. for i = 1,10 do
  166. wait()
  167. mesh.Transparency = mesh.Transparency -0.1
  168. end
  169. mesh.Anchored = false
  170. local BillboardGui = Instance.new("BillboardGui")
  171. local Frame = Instance.new("Frame")
  172. local Text = Instance.new("TextBox")
  173. BillboardGui.MaxDistance = 50
  174. BillboardGui.Name = "Type"
  175. BillboardGui.Parent = mesh
  176. BillboardGui.Active = true
  177. BillboardGui.Size = UDim2.new(15.5, 0, 15, 0)
  178. BillboardGui.StudsOffset = Vector3.new(0, 6, 0)
  179.  
  180. Frame.Name = "Framer"
  181. Frame.Parent = BillboardGui
  182. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  183. Frame.BackgroundTransparency = 1
  184. Frame.BorderSizePixel = 0
  185. Frame.Position = UDim2.new(0.209999993, 0, 0.209999993, 0)
  186. Frame.Selectable = true
  187. Frame.Size = UDim2.new(0.600000024, 0, 0.699999988, 0)
  188.  
  189. Text.Name = "Labeler"
  190. Text.Parent = Frame
  191. Text.BackgroundColor3 = Color3.new(0, 0, 0)
  192. Text.BackgroundTransparency = 1
  193. Text.BorderColor3 = Color3.new(0, 0, 0)
  194. Text.Position = UDim2.new(0.200000003, 0, 0.150000006, 0)
  195. Text.Size = UDim2.new(0.600000024, 0, 0.699999988, 0)
  196. Text.ClearTextOnFocus = false
  197. Text.Text = "500 Bobux"
  198. Text.TextColor3 = Color3.new(0, 255, 0)
  199. Text.TextSize = 100
  200. Text.TextScaled = true
  201. Text.Font = "Arcade"
  202. end
  203. if random == 8 then
  204. Text.Text = "Don't click it please."
  205. local mesh = Instance.new("Part", workspace)
  206. mesh.Size = Vector3.new(3.79, 3.14, 3.45)
  207. mesh.Transparency = 1
  208. mesh.Anchored = true
  209. mesh.Position = button.Position +Vector3.new(0, 4, 0)
  210. for i = 1,10 do
  211. wait()
  212. mesh.Transparency = mesh.Transparency -0.1
  213. end
  214. mesh.Anchored = false
  215. local cd3 = Instance.new("ClickDetector", mesh)
  216. function onMouseClick3(player)
  217. for i = 1,5 do
  218. mesh.Material = "Neon"
  219. wait(0)
  220. mesh.Material = "Plastic"
  221. wait(0)
  222. end
  223. Instance.new("Explosion", workspace).Position = mesh.Position
  224. mesh:Destroy()
  225. end
  226. cd3.MouseClick:connect(onMouseClick3)
  227. end
  228. end
  229. end
  230. function onMouseClick2(player)
  231. if player.Name == owner.Name then
  232. click:Play()
  233. random = math.random(1, 8)
  234. if random == 1 then
  235. Text.Text = "It is funny. Laugh."
  236. local fart = Instance.new("Sound", button)
  237. fart.SoundId = "rbxassetid://5164672146"
  238. fart:Play()
  239. end
  240. if random == 2 then
  241. local burg = Instance.new("Sound", button)
  242. burg.SoundId = "rbxassetid://3217252760"
  243. burg:Play()
  244. Text.Text = "How about a burger?"
  245. local mesh = Instance.new("Part", workspace)
  246. mesh.Size = Vector3.new(1, 0.8, 1)
  247. mesh.Transparency = 1
  248. mesh.Anchored = true
  249. mesh.Position = button.Position +Vector3.new(0, 2, 0)
  250. local mesh2 = Instance.new("SpecialMesh", mesh)
  251. mesh2.MeshId = "http://www.roblox.com/asset/?id=16646125"
  252. mesh2.TextureId = "http://www.roblox.com/asset/?id=16432575"
  253. mesh2.Scale = Vector3.new(1, 1, 1)
  254. for i = 1,10 do
  255. wait()
  256. mesh.Transparency = mesh.Transparency -0.1
  257. end
  258. mesh.Anchored = false
  259. end
  260. if random == 3 then
  261. Text.Text = "You're*"
  262. end
  263. if random == 4 then
  264. Text.Text = "..."
  265. end
  266. if random == 5 then
  267. local burg = Instance.new("Sound", button)
  268. burg.SoundId = "rbxassetid://5752104931"
  269. burg:Play()
  270. Text.Text = "Eat up!"
  271. local mesh = Instance.new("Part", workspace)
  272. mesh.Size = Vector3.new(3.79, 3.14, 3.45)
  273. mesh.Transparency = 1
  274. mesh.Anchored = true
  275. mesh.Position = button.Position +Vector3.new(0, 4, 0)
  276. local mesh2 = Instance.new("SpecialMesh", mesh)
  277. mesh2.MeshId = "http://www.roblox.com/asset/?id=16646125"
  278. mesh2.TextureId = "http://www.roblox.com/asset/?id=16432575"
  279. mesh2.Scale = Vector3.new(3.79, 3.925, 3.45)
  280. for i = 1,10 do
  281. wait()
  282. mesh.Transparency = mesh.Transparency -0.1
  283. end
  284. mesh.Anchored = false
  285. local cd3 = Instance.new("ClickDetector", mesh)
  286. local eat = Instance.new("Sound", mesh)
  287. eat.SoundId = "http://www.roblox.com/asset/?id=22593942"
  288. eat.Volume = 5
  289. function onMouseClick3(player)
  290. eat:Play()
  291. end
  292. cd3.MouseClick:connect(onMouseClick3)
  293. end
  294. if random == 6 then
  295. Text.Text = "Block. Push it around. Yay."
  296. local mesh = Instance.new("Part", workspace)
  297. mesh.Size = Vector3.new(3.79, 3.14, 3.45)
  298. mesh.Transparency = 1
  299. mesh.Anchored = true
  300. mesh.Position = button.Position +Vector3.new(0, 4, 0)
  301. for i = 1,10 do
  302. wait()
  303. mesh.Transparency = mesh.Transparency -0.1
  304. end
  305. mesh.Anchored = false
  306. end
  307. if random == 7 then
  308. Text.Text = "Bobux"
  309. local mesh = Instance.new("Part", workspace)
  310. mesh.Size = Vector3.new(3.79, 3.14, 3.45)
  311. mesh.Transparency = 1
  312. mesh.Anchored = true
  313. mesh.Position = button.Position +Vector3.new(0, 4, 0)
  314. mesh.BrickColor = BrickColor.new("Bright green")
  315. for i = 1,10 do
  316. wait()
  317. mesh.Transparency = mesh.Transparency -0.1
  318. end
  319. mesh.Anchored = false
  320. local BillboardGui = Instance.new("BillboardGui")
  321. local Frame = Instance.new("Frame")
  322. local Text = Instance.new("TextBox")
  323. BillboardGui.MaxDistance = 50
  324. BillboardGui.Name = "Type"
  325. BillboardGui.Parent = mesh
  326. BillboardGui.Active = true
  327. BillboardGui.Size = UDim2.new(15.5, 0, 15, 0)
  328. BillboardGui.StudsOffset = Vector3.new(0, 6, 0)
  329.  
  330. Frame.Name = "Framer"
  331. Frame.Parent = BillboardGui
  332. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  333. Frame.BackgroundTransparency = 1
  334. Frame.BorderSizePixel = 0
  335. Frame.Position = UDim2.new(0.209999993, 0, 0.209999993, 0)
  336. Frame.Selectable = true
  337. Frame.Size = UDim2.new(0.600000024, 0, 0.699999988, 0)
  338.  
  339. Text.Name = "Labeler"
  340. Text.Parent = Frame
  341. Text.BackgroundColor3 = Color3.new(0, 0, 0)
  342. Text.BackgroundTransparency = 1
  343. Text.BorderColor3 = Color3.new(0, 0, 0)
  344. Text.Position = UDim2.new(0.200000003, 0, 0.150000006, 0)
  345. Text.Size = UDim2.new(0.600000024, 0, 0.699999988, 0)
  346. Text.ClearTextOnFocus = false
  347. Text.Text = "500 Bobux"
  348. Text.TextColor3 = Color3.new(0, 255, 0)
  349. Text.TextSize = 100
  350. Text.TextScaled = true
  351. Text.Font = "Arcade"
  352. end
  353. if random == 8 then
  354. Text.Text = "Don't click it please."
  355. local mesh = Instance.new("Part", workspace)
  356. mesh.Size = Vector3.new(3.79, 3.14, 3.45)
  357. mesh.Transparency = 1
  358. mesh.Anchored = true
  359. mesh.Position = button.Position +Vector3.new(0, 4, 0)
  360. for i = 1,10 do
  361. wait()
  362. mesh.Transparency = mesh.Transparency -0.1
  363. end
  364. mesh.Anchored = false
  365. local cd3 = Instance.new("ClickDetector", mesh)
  366. function onMouseClick3(player)
  367. for i = 1,5 do
  368. mesh.Material = "Neon"
  369. wait(0)
  370. mesh.Material = "Plastic"
  371. wait(0)
  372. end
  373. Instance.new("Explosion", workspace).Position = mesh.Position
  374. mesh:Destroy()
  375. end
  376. cd3.MouseClick:connect(onMouseClick3)
  377. end
  378. end
  379. end
  380. cd.MouseClick:connect(onMouseClick)
  381. cd2.MouseClick:connect(onMouseClick2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement