Forum > General >

is there a way to change the type of script in the lua tab?

Posts: 2

Threads: 1

Joined: Apr, 2020

Reputation: 0

Posted

i know how to code but the type of script is local script. you can know this by typing

print(script.ClassName)

and it prints "Local Script"

is there a way to change this to a normal script? because there is a lot of wasted potential if you cant

  • 0

PoopMaster

SoundInfinity

noticed

Posts: 120

Threads: 23

Joined: Jul, 2019

Reputation: 9

Replied

You can't simply change the class, lol. Btw, the scripts you execute in your exploit, are not actual instances.

 

To emulate that:

[code]

function setproxymetatable(proxy, newmeta)

    local m = getmetatable(proxy)

    for method,func in next, newmeta do m[method]=func;end

 

    return proxy

end

 

script = setproxymetatable(newproxy(true), {

    __index = function(t,k)

        if k:lower():match("class") then return "Script"

        elseif k=="Name" then return "GlobalScript"

        elseif k=="Parent" then return game

        end

    end,

    __newindex = function()

        return error("Fake instance doesn't support this.", 2)

    end

})

 

print(script.Name, script.ClassName, script.Parent) -- (GlobalScript, Script, DataModel)

[/code]

  • 0

Proud creator of: WRD+

Posts: 2

Threads: 1

Joined: Apr, 2020

Reputation: 0

Replied

@PoopMaster

oh, im stupid, thank you

is there a shorter version of that script that i can put? thank you

EDIT: also, how do i run commands in this like i would a script?

  • 0

PoopMaster

SoundInfinity

noticed

Posts: 120

Threads: 23

Joined: Jul, 2019

Reputation: 9

Replied

@kingethanjriii

Note that these snippets of code don't change anything, besides adding fake script properties.

 

Shorter:

[code]

script = { Name="FakeScript", ClassName="Script", Parent="Game" }

[/code]

  • 0

Proud creator of: WRD+

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )