FANDOM


This system was made for developers who need help scripting in various subjects. It should not be used from people who have no clue how to script.

ThunderServices is a feature currently in development, made by Thundermaker300. It features different services that were all made by Thundermaker300.

Want to be notified when new updates come out? Click here.

Table of Contents


How to use

To use the system, put the following code into a ExplorerImageIndex 6Script, ExplorerImageIndex 76ModuleScript, or the Command bar. Note that ThunderServices will NOT work on a ExplorerImageIndex 18LocalScript.

local services = require(892129133)

This returns a ThunderServicesMain object.

Documentation (Services)

There is currently eleven services, each one is different, and inherits one main object.

ThunderServicesMain

This object is what gets services, and gets and sets settings. It has six methods.

Pubmethod ThunderService LoadService(string service)

Returns a ThunderService with the given name, or nil if the service doesn't exist.

Pubmethod Settings GetSettings()

Returns a Settings object.

Pubmethod Array GetServices()

Returns an array of strings, each one being the name of a service.

Pubmethod Array GetHTTPServices()

Returns an array of strings, each one being the name of a service that requires ExplorerImageIndex 0HttpService's HttpEnabled property to be enabled.

If one of these services is required but HttpEnabled is false, nil will be returned rather than the service.

Pubmethod Array GetNonHTTPServices()

Opposite function of GetHTTPServices. Returns an array of services that do not need HttpEnabled property to be on.

Pubmethod Array GetServicesUsingOtherServices()

Some services rely on others to work properly. Returns an array of arrays. Each array has two items.

Item # Name Type Description
1 Service String The Service that relies on another service.
2 RelyService String The Service that is being relied on.

Settings

This object is used to get and set settings. It has two methods.

Pubmethod Variant GetSetting(string name)

Returns the value of the given setting.

Pubmethod void SetSetting(string name, Variant Value)

Sets the setting with the given name.

Example Usage of Settings

In this example, we will set the SponsorTime to 5. The correct usage is below.

local TS = require(892129133)
local Settings = TS:GetSettings()
Settings:SetSetting("SponsorTime",5)

All Settings

The following settings can be changed by a Settings object.

  • bool IncognitoDiscordWebhooks: If set to true, A message will not be printed when a webhook is sent to discord. Default is 'false'.
  • string PictureForm: Determines how the PictureService returns messages. Value must be 'content' or 'id', or PictureService will not work correctly. If value is 'content', then a content will be returned, while if the value is 'id', then an int will be returned. Default is 'content'.
  • int SponsorTime: Determines how long sponsors sent by the SponsorService will last. The value must be '5', '10', or '15', or the script will error. Default is 10.
  • bool MuteSponsorWarnings: If set to true, there is no warning when SponsorService cannot display an error when the given player follows one of the no-sponsor criteria. Default is false.

ThunderService

ThunderService is an object that each service inherits from. It currently has two methods.

Pubmethod string GetInfo()

Returns a string that explains information about the service.

Pubmethod bool IsA(string object)

Returns whether or not the given service is or inherits the given object. Every service inherits only ThunderService. Works similar to the IsA method of the Instance class.

Color3Service

Color3Service is an extension of the Color3 data type. It has sixteen methods.

Pubmethod Color3 RandomColor3()

Returns a Random Color3.

Pubmethod Color3 DarkRed()

Returns Dark Red.

Pubmethod Color3 ReallyRed()

Returns Really Red.

Pubmethod Color3 NavyBlue()

Returns Navy Blue.

Pubmethod Color3 ReallyBlue()

Returns Really Blue.

Pubmethod Color3 Teal()

Returns Teal.

Pubmethod Color3 VeryYellow()

Returns New Yeller.

Pubmethod Color3 BrightYellow()

Returns Bright yellow.

Pubmethod Color3 DeepOrange()

Returns Deep Orange.

Pubmethod Color3 Gold()

Returns Gold.

Pubmethod Color3 LimeGreen()

Returns Lime Green.

Pubmethod Color3 BrightGreen()

Returns Bright green.

Pubmethod Color3 White()

Returns White.

Pubmethod Color3 Black()

Returns Black.

Pubmethod Color3 Gray()

Returns Gray.

Pubmethod Color3 Brown()

Returns Brown.

ExtraLightingService

ExtraLightingService is an extension of the ExplorerImageIndex 13Lighting service. It has one method.

Pubmethod function, function Grayscale()

Causes a grayscale effect, that is defaultly disabled. Returns two functions. The first requires a bool argument, and it will enable/disable the grayscale. The second function requires no arguments, and when called, will destroy the grayscale. Grayscale cannot be used when destroyed.

DiscordWebhookService

NOTE: If HttpEnabled is set to false, getting this service will return nil.

DiscordWebhookService is a service that allows easily sending webhooks to discord. It has one method.

Pubmethod WebhookObject MakeWebhook(string id, string key)

Creates a WebhookObject with the given id and key, and returns it.

ThunderNewsService

ThunderNewsService is a service that can be used with ThunderNews. It has one method.

Pubmethod ThunderNewsObject GetThunderNews()

Loads ThunderNews and returns a ThunderNewsObject.

NPCService

NPCService is a service used for easily handling NPCs. It has one method.

Pubmethod NPCObject CreateNPC(HumanoidRigType rigType = R6)

Creates a blank NPC, and returns an NPCObject object.

PlayersService

PlayersService is an expansion of the ExplorerImageIndex 21Players service. It has two methods.

Pubmethod Object FindPlayerWithName(string name)

Attempts to find the player with the name of "name". This function will also find players if the name is a prefix of the user's name. Eg. if there is a player named "Shedletsky", and "Shed" is set as the name parameter, it will return Shedletsky's ExplorerImageIndex 12Player. However, if there is a player named "Shed" present, it will return that player instead of Shedletsky. This function will return nil if:

  • There are multiple people with this prefix.
  • There are no people with this prefix.

Pubmethod Object FindFirstPlayerWithMembership(MembershipType MembershipType)

Returns the first player with the membership of MembershipType, or nil if none is found.

MathService

MathService is a service designed to add more functions than the math table includes. It has one method.

Pubmethod double Invert(double number)

Attempts to invert the given double, returning the opposite of it. For example, if 10 is given, -10 will be returned. Note: nil will be returned if the input is 0 or math.huge.

PictureService

PictureService is a service that returns different pictures. It has one method.

Pubmethod Variant Kitty()

Returns a random kitten picture. It will return either a content or int based on the 'PictureForm' setting. It will return nil if 'PictureForm' is not 'content' or 'id'.

TimeService

TimeService is no longer being updated. It is not recommended to be used.
TimeService is a serviced used for managing time. It has five methods.

Pubmethod int ConvertToMilitary(int hour, string period)

Returns the given hour and period as military time. 'period' must be 'am' or 'pm'.

Pubmethod int, string ConvertTo12Hour(int hour)

Returns the given hour as 12-hour time. Returns an int, the hour, and a string, am or pm.

Pubmethod int, int, int GetESTTime()

Returns the current hour, minute, and second of time in Eastern Standard Time. It is returned as military time.

Pubmethod int, int, int GetCSTTime()

NOTE: This service uses MathService.

Returns the current hour, minute, and second of time in Central Standard Time. It is returned as military time.

Pubmethod int, int, int GetMSTTime()

NOTE: This service uses MathService.

Returns the current hour, minute, and second of time in Mountain Standard Time. It is returned as military time.

SponsorService

SponsorService is a service that functions similar to AdServiceAdService, but has pictures instead of videos. Due to ROBLOX limitations, ROBUX cannot be awarded to the developer for playing a sponsor, but rather to make features for the players.

SponsorService will not show a sponsor when :PlaySponsor() is called if the player owns the "No Sponsors" gamepass.

SponsorService has five methods and two events.

NOTICE: Unlike AdServiceAdService, SponsorService does not limit on the amount of sponsors that can be seen. Because of this, if you make a "watch a sponsor for x" feature, you need to make limits on your own, or players can nerf the system.

Pubmethod bool, int PlaySponsor(Object player)

Plays a sponsor on the given player. The sponsor will not play if the given player is already seeing a sponsor. The time the sponsor lasts is based on the SponsorTime setting. Returns two values. The first is a bool, describing whether or not a sponsor was shown. The second is the id of the sponsor that was shown. The second value will be nil if the first value is false.

Pubmethod Array SponsorsVisible()

Returns an array of players who are currently seeing sponsors. Returns nil if no players are seeing sponsors.

Pubmethod bool PlayerSeeingSponsor(Object player)

Returns true if the given player is seeing a sponsor. False otherwise.

Pubmethod void YieldForAllSponsors()

Yields the script until no players are seeing a sponsor.

Pubmethod void YieldForSponsor(Object player)

Yields the script until the given player is not seeing a sponsor.

Pubevent SponsorBegin(Object player)

Fires when a sponsor is beginning to show.

Pubevent SponsorFinished(Object player)

Fires when a sponsor has finished.

StrawpollService

NOTE: If HttpEnabled is set to false, getting this service will return nil.

StrawpollService is a service used for managing strawpolls, created on strawpoll.me. It has two methods.

Pubmethod Strawpoll GetStrawpoll(int id)

Returns a strawpoll object with the given strawpoll id.

Pubmethod int, Strawpoll CreateStrawpoll(string title, Array options, bool captcha)

This method does not work, due to internal ROBLOX issues. Please do not use.

Creates a strawpoll with the given title, and options. captcha is a bool describing whether or not captcha is required to vote on the poll. Returns an int, which is the id, and a strawpoll object. This method will return 1 nil if the option is not an Array or there is 1 or less items in the array.

QuoteService

This service is disabled and cannot be used. Please wait for it to be enabled before using.

QuoteService is a service used to easily get quotes. It has one method.

Pubmethod Quote GetQuoteByCategory(string category = Funny)

Returns a Quote object based on the given category. If no category is given, then funny is default. The following categories are acceptable:

  • Funny

TranslateService

NOTE: If HttpEnabled is set to false, getting this service will return nil.

TranslateService is a service used to easily get different translations. TranslateService uses Yandex Translation API. It has two methods.

Pubmethod string GetLanguageCode(string language)

Returns the language code based on the given language (for example, "Spanish" returns es). Not all are supported and an alert will be given if a parameter not supported is given.

Pubmethod string, string GetTranslation(string text, string languageCode)

Returns the given text in the given language code. If successful, returns two strings. The first string is the translation that was made. Format is [fromlanguagecode]-[tolanguagecode]. For example, if converting from English to Spanish, this would be en-es. The second string is the actual translation. For example, if text is "Hello" and languageCode is "es", then "Hola" would be returned as this string.

Documentation (Objects)

Objects are returned from services, that cannot be created. There is currently three objects.

WebhookObject

A WebhookObject is an object that represents a Discord webhook. It is created by the DiscordWebhookService. It has one method.

Pubmethod void Post(table configs)

Sends the webhook to discord. configs is a table allowing you to configure the webhook's content. There is two settings currently:

Setting Name Setting Type Setting Description
username string The username shown on the webhook.
content string The text to be shown on the webhook.

NPCObject

An NPCObject is an object that represents a NPC. It has three methods.

Pubmethod void SetShirt(Content id)

Destroys the NPC's current shirt and puts on the shirt with the given id.

Pubmethod void SetPants(Content id)

Destroys the NPC's current pants and puts on the pants with the given id.

Pubmethod Object GetNpc()

Returns a ExplorerImageIndex 2Model that is the NPC that was created when :CreateNPC() was called.

Strawpoll

A Strawpoll is an object that represents a strawpoll created on strawpoll.me. It has two methods.

Pubmethod string GetTitle()

Returns the title of the strawpoll.

Pubmethod Array MatchOptionsWithVotes()

Returns an array of arrays. In each array, there is two elements.

Element # Type Name Description
1 string Option The option name.
2 int Votes The amount of votes this option got.

Quote

This object is disabled and cannot be used. Please wait for it to be enabled before using.

Quote is an object that represents a quote, returned from QuoteService. It has two methods.

Pubmethod string GetQuote()

Returns the actual quote associated with this quote.

Pubmethod string GetAuthor()

Returns the author of this quote. Usually it is formatted as "-[Author]", but you can do this however you want.

Community content is available under CC-BY-SA unless otherwise noted.