Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local HttpService = game:GetService("HttpService")
- local Players = game:GetService("Players")
- _G.Owner = "ur name here lol"
- function getChat(message,plrname)
- local Split = message:gsub(" ", "+") -- This takes spaces within the person's message and turns it into for ex: Hi+How+Are+You... to ensure that there are no errors and to also make the URL work
- local Response = game:HttpGet("https://api.affiliateplus.xyz/api/chatbot?message=" .. Split .. "&botname=" .. plrname .. "&ownername=" .. _G.Owner .. "&user=1")
- local Data = HttpService:JSONDecode(Response)
- wait(1)
- game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(Data.message, "All")
- end
- Players.PlayerChatted:Connect(function(type, plr, message)
- if plr.Name ~= Players.LocalPlayer.Name then
- getChat(message, plr.Name)
- end
- end)
Advertisement
Comments
-
- where do i place
-
- i put it in serverscriptservice
-
- Does this script go in a dummy?
Add Comment
Please, Sign In to add comment
Advertisement