BobMe

boop

Nov 12th, 2021 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.12 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local targetplayer
  7. local strr = ""
  8.  
  9. local function findPlayer(plrname)
  10. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  11. if string.lower(string.sub(tostring(v),1,#plrname)) == string.lower(plrname) then
  12. return v
  13. end
  14. end
  15. end
  16.  
  17. dis = owner.Chatted:Connect(function(msg)
  18. local str = string.split(msg,"/")
  19. if string.lower(str[1]) == "notf" then
  20. targetplayer = findPlayer(str[2])
  21. strr = str[3]
  22. end
  23. end)
  24.  
  25. repeat wait() until targetplayer ~= nil
  26. dis:Disconnect()
  27.  
  28. local currentplayer = targetplayer
  29.  
  30.  
  31. --Properties:
  32.  
  33. local function giveGui(player,strin)
  34. local NotificationGui = Instance.new("ScreenGui")
  35. local Frame = Instance.new("Frame")
  36. local Frame_2 = Instance.new("Frame")
  37. local TextButton = Instance.new("TextButton")
  38. local TextLabel = Instance.new("TextLabel")
  39. local Message = Instance.new("TextLabel")
  40. local ReplyFrame = Instance.new("Frame")
  41. local Namer = Instance.new("TextLabel")
  42. local TextBox = Instance.new("TextBox")
  43. local SendButton = Instance.new("TextButton")
  44. local Audio = Instance.new("Folder")
  45. NotificationGui.Name = "NotificationGui"
  46. NotificationGui.ResetOnSpawn = false
  47. NotificationGui.Parent = player.PlayerGui
  48.  
  49. Frame.Parent = NotificationGui
  50. Frame.AnchorPoint = Vector2.new(0.5, 0.5)
  51. Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  52. Frame.BackgroundTransparency = 0.500
  53. Frame.BorderSizePixel = 0
  54. Frame.Position = UDim2.new(0.5, 0, -0.5, 0)
  55. Frame.Size = UDim2.new(0.800000012, 0, 0.600000024, 0)
  56.  
  57. Frame_2.Parent = Frame
  58. Frame_2.AnchorPoint = Vector2.new(0, 1)
  59. Frame_2.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  60. Frame_2.BackgroundTransparency = 0.200
  61. Frame_2.BorderSizePixel = 0
  62. Frame_2.Size = UDim2.new(1, 0, 0.0799999982, 0)
  63.  
  64. TextButton.Parent = Frame_2
  65. TextButton.AnchorPoint = Vector2.new(1, 0.5)
  66. TextButton.BackgroundColor3 = Color3.fromRGB(255, 0, 4)
  67. TextButton.BackgroundTransparency = 0.400
  68. TextButton.Position = UDim2.new(1, -5, 0.5, 0)
  69. TextButton.Size = UDim2.new(0.800000012, 0, 0.800000012, 0)
  70. TextButton.SizeConstraint = Enum.SizeConstraint.RelativeYY
  71. TextButton.Font = Enum.Font.SourceSans
  72. TextButton.Text = "X"
  73. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  74. TextButton.TextScaled = true
  75. TextButton.TextSize = 14.000
  76. TextButton.TextWrapped = true
  77.  
  78. TextLabel.Parent = Frame_2
  79. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  80. TextLabel.BackgroundTransparency = 1.000
  81. TextLabel.Size = UDim2.new(0.902651608, 0, 1, 0)
  82. TextLabel.Font = Enum.Font.SourceSans
  83. TextLabel.Text = "Notification from : "
  84. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  85. TextLabel.TextScaled = true
  86. TextLabel.TextSize = 14.000
  87. TextLabel.TextWrapped = true
  88. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  89.  
  90. Message.Name = "Message"
  91. Message.Parent = Frame
  92. Message.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  93. Message.BackgroundTransparency = 1.000
  94. Message.Size = UDim2.new(1, 0, 0.75, 0)
  95. Message.Font = Enum.Font.SourceSans
  96. Message.Text = strin
  97. Message.TextColor3 = Color3.fromRGB(255, 255, 255)
  98. Message.TextSize = 32.000
  99. Message.TextWrapped = true
  100. Message.TextXAlignment = Enum.TextXAlignment.Left
  101. Message.TextYAlignment = Enum.TextYAlignment.Top
  102.  
  103. ReplyFrame.Name = "ReplyFrame"
  104. ReplyFrame.Parent = Frame
  105. ReplyFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  106. ReplyFrame.BackgroundTransparency = 1.000
  107. ReplyFrame.Position = UDim2.new(0, 0, 0.75, 0)
  108. ReplyFrame.Size = UDim2.new(1, 0, 0.25, 0)
  109.  
  110. Namer.Name = "Namer"
  111. Namer.Parent = ReplyFrame
  112. Namer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  113. Namer.BackgroundTransparency = 1.000
  114. Namer.Size = UDim2.new(0.157000005, 0, 0.25, 0)
  115. Namer.Font = Enum.Font.SourceSans
  116. Namer.Text = "Reply:"
  117. Namer.TextColor3 = Color3.fromRGB(255, 255, 255)
  118. Namer.TextScaled = true
  119. Namer.TextSize = 14.000
  120. Namer.TextWrapped = true
  121. Namer.TextXAlignment = Enum.TextXAlignment.Left
  122.  
  123. TextBox.Parent = ReplyFrame
  124. TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  125. TextBox.BackgroundTransparency = 0.500
  126. TextBox.BorderSizePixel = 0
  127. TextBox.Position = UDim2.new(0, 0, 0.299999923, 0)
  128. TextBox.Size = UDim2.new(1, 0, 0.700000226, 0)
  129. TextBox.Font = Enum.Font.SourceSans
  130. TextBox.PlaceholderText = "Enter your reply here..."
  131. TextBox.Text = ""
  132. TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  133. TextBox.TextSize = 25.000
  134. TextBox.TextWrapped = true
  135. TextBox.TextXAlignment = Enum.TextXAlignment.Left
  136. TextBox.TextYAlignment = Enum.TextYAlignment.Top
  137.  
  138. SendButton.Name = "SendButton"
  139. SendButton.Parent = ReplyFrame
  140. SendButton.AnchorPoint = Vector2.new(1, 0)
  141. SendButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  142. SendButton.BorderSizePixel = 0
  143. SendButton.Position = UDim2.new(1, 0, 0, 0)
  144. SendButton.Size = UDim2.new(0.117070489, 0, 0.299999714, 0)
  145. SendButton.Font = Enum.Font.SourceSans
  146. SendButton.Text = "SEND"
  147. SendButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  148. SendButton.TextScaled = true
  149. SendButton.TextSize = 14.000
  150. SendButton.TextWrapped = true
  151.  
  152. Audio.Name = "Audio"
  153. Audio.Parent = NotificationGui
  154.  
  155. local Beep = Instance.new("Sound",NotificationGui)
  156. Beep.SoundId = "rbxassetid://1029495337"
  157. Beep.Volume = 3
  158. Beep.PlaybackSpeed = 1.5
  159. Beep.PlayOnRemove = true
  160. local Beep2 = Beep:Clone()
  161. Beep2.Parent = NotificationGui
  162. Beep2.PlaybackSpeed = 1.75
  163.  
  164. -- Scripts:
  165.  
  166. Frame:TweenPosition(UDim2.new(.5, 0, .5, 0),"Out","Back",0.5)
  167. wait()
  168. Beep:Destroy()
  169. wait(0.125)
  170. Beep2:Destroy()
  171. wait()
  172. local antispam = false
  173.  
  174. local donk = false
  175. for i,v in pairs(player:GetChildren()) do
  176. if v.Name == "James" then
  177. v:Destroy()
  178. end
  179. end
  180. local remote = Instance.new("RemoteEvent",player)
  181. remote.Name = "James"
  182. local textboxdata = ""
  183. SendButton.MouseButton1Click:Connect((function()
  184. donk = true
  185. end))
  186. TextButton.MouseButton1Click:Connect(function()
  187. NotificationGui:Destroy()
  188. remote:Destroy()
  189. end)
  190. remote.OnServerEvent:Connect(function(plr,str)
  191. if str ~= "ready" and str ~= "send" then
  192. if plr == player then
  193. textboxdata = str
  194. else
  195. plr:Kick("ew no")
  196. end
  197. elseif str == "ready" then
  198. remote:FireClient(plr,TextBox)
  199. end
  200. end)
  201. remote.OnServerEvent:Connect(function(plr,str)
  202. if str == "shend" then
  203. donk = true
  204. end
  205. end)
  206. -- LOCALSCRIPT BELOW
  207. local ls = NLS([[
  208. wait(.5)
  209. local remote = game.Players.LocalPlayer:WaitForChild("James")
  210. local gui = nil
  211. remote:FireServer("ready")
  212. local poopoo = remote.OnClientEvent:Connect(function(g)
  213. gui = g
  214. end)
  215. repeat wait(.25) until gui ~= nil
  216. poopoo:Disconnect()
  217. gui.FocusLost:Connect(function(thing)
  218. if thing == true then
  219. remote:FireServer("shend")
  220. end
  221. end)
  222. while remote ~= nil and remote.Parent ~= nil do
  223. wait(.25)
  224. remote:FireServer(gui.Text)
  225. end]],NotificationGui)
  226.  
  227. repeat wait(.25) until donk
  228. Frame:TweenPosition(UDim2.new(.5, 0, -.5, 0),"Out","Back",0.5)
  229. wait(.5)
  230. NotificationGui.Parent = nil
  231. remote:Destroy()
  232. return textboxdata
  233. end
  234.  
  235. while true do
  236. local text = giveGui(currentplayer,strr)
  237. if currentplayer == targetplayer then
  238. currentplayer = owner
  239. else
  240. currentplayer = targetplayer
  241. end
  242. strr = text
  243. end
Add Comment
Please, Sign In to add comment