Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local owner = "KCROL" --// Who the GUI will load on
- local RbxGui = LoadLibrary("RbxGui")
- local GUI = Instance.new("ScreenGui")
- GUI.Parent = game:GetService("Players")[owner].PlayerGui
- local onChat = true
- local typec = ""
- local items = {"Choose One", "Message Something", "Hint Something"}
- game:GetService("Players")[owner].Chatted:connect(function(msg)
- if onChat == true then
- if typec == "Message" then
- onChat = false
- typec = ""
- local m = Instance.new("Message")
- m.Parent = workspace
- for i = 1, string.len(msg),1 do
- m.Text = string.sub(msg,1,i)
- wait(0.05)
- end
- wait(3)
- for i = string.len(msg),0,-1 do
- m.Text = string.sub(msg,1,i)
- wait()
- end
- m:Destroy()
- elseif typec == "Hint" then
- onChat = false
- typec = ""
- local m = Instance.new("Hint")
- m.Parent = workspace
- for i = 1, string.len(msg),1 do
- m.Text = string.sub(msg,1,i)
- wait(0.05)
- end
- wait(3)
- for i = string.len(msg),0,-1 do
- m.Text = string.sub(msg,1,i)
- wait()
- end
- m:Destroy()
- end
- end
- end)
- local function onItemSelected(itemSelected)
- if itemSelected == "Message Something" then
- if typec == "Hint" then
- error("Hint is already activated. Use that first.")
- elseif typec == "Message" then
- error("You already have a message session activated! Use that first.")
- else
- print("Chat what you want to message.")
- typec = "Message"
- onChat = true
- end
- elseif itemSelected == "Hint Something" then
- if typec == "Message" then
- error("Message is already activated. Use that first.")
- elseif typec == "Hint" then
- error("You already have a hint session activated! Use that first.")
- else
- print("Chat what you want to hint.")
- typec = "Hint"
- onChat = true
- end
- end
- end
- local dropDown = RbxGui.CreateDropDownMenu(items,onItemSelected,false,true) --// This returns a frame which will be parented into the ScreenGUI we created on Line 3
- dropDown.Parent = GUI
- dropDown.Size = UDim2.new(0,210,0,30)
- dropDown.Position = UDim2.new(0.85,-75,0.1,-15)
Advertisement
Add Comment
Please, Sign In to add comment