Universal Script 📌
27.9k Views
401 Executions

Chat Seperator

Universal Script 📌
areyoumental110
areyoumental110Published 50
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Splits any text you insert into a table which you can use to say the text under the chat limit how to use: -- get the script and define it as a variable like this: local txtsep = loadstring(game:HttpGet("https://rawscripts.net/raw/Universal-Script-Chat-Seperator-21154"))() -- use the function "getmessages" to get the table of messages (that is all seperated) local tosay = txtsep.getmessages("hello") -- theres some other stuff you can customize about the function ofc -- txtsep.getmessages(txthere (string),charactercap (number),stopatwordendings (bool)) -- stopatwordendings just means the splitted text will "erase" some text so the full thing stops at an ending of a word (the erased part will still be there at the next part of the text) -- now that you got your table, you can either make a script that says them or use the "built in" function of saying them local id = txtsep.saymessages(tosay) -- more customizable stuff is there too -- txtsep.saymessages(tosay (table),delay (number),antichatlog (bool)) -- the delay is how much it waits until saying the next message -- the anti chat log turns the anti chat log on when its saying stuff (by anthony) -- and the function also returns an id which u can use with "stopsaying" to make it stop saying the text txtsep.stopsaying(id) If you want to support me, go through this linkvertise https://link-target.net/1262127/support-me

Updates

  1. Script edited: Update script

  2. Script edited: Create script

View Raw
-- i hate string manipulation, causes headaches every time
function findlast(str,fstr)
    local rstr = string.reverse(str)
    local rfstr = string.reverse(fstr)
    local fstart,fend = string.find(rstr,rfstr)
    local rfstart,rfend = (string.len(str)-fend)+1,(string.len(str)-fstart)+1
    return rfstart,rfend
end
function splitwords(txt,stopatwordends,chrcap)
    local amttodo = string.len(txt)/chrcap
    local amt = 0
    local rettable = {}
    local tr = true
    while tr do
        local oldamt = amt
        if amttodo < 1 then
            amt = amt + amttodo*chrcap
        else
            amt = amt + chrcap
        end
        local newtxt = string.sub(txt,oldamt,amt)
        if stopatwordends and amttodo > 1 then
            local pos = findlast(newtxt," ")
            if pos then
                newtxt = string.sub(newtxt,oldamt,pos)
            end
        end
        if string.len(newtxt) > 0 then
            table.insert(rettable,newtxt)
        end
        amttodo = amttodo - 1
        if amttodo <= 0 then
            tr = false
        end
    end
    return rettable
end
function gettable(txt,chrcap,stopatwordends,newlines)
    if chrcap == nil then
        chrcap = 199


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Script hub
6.8k
100.7k
Bumped 13 minutes ago

Script hub

SAGAZx Hub

Script hub
280.0k
188.8k
Bumped 46 minutes ago
Key System
Script hub
307
351
Bumped 2 hours ago

Script hub

Blythe

Script hub
9.0k
55.2k
Bumped 3 hours ago
Key System
Script hub
516
6.7k
Bumped 6 hours ago
Key System
Universal Script 📌
7.2k
105.0k
Bumped 8 hours ago
Script hub
523
2.2k
Bumped 9 hours ago
Key System