[Archived] MoonScale

This post has been moved.

7 Likes

bro the code😭
Making new closures each pcall instead of doing pcall(inst.Function, inst, …):pensive_face:
Why are they needed anyway???
image
like dude just check if that EXISTS
image
never code again

3 Likes

I believe it’s kind of unfair to the author.

You can’t simply check if a property exists (more if it is at runtime). You could optimize this a bit by taking the instance and prop as arguments, but even then there’s a fair reason to pcall, it’s just the unnecessary upvalues that are a problem, it’s fair to do pcall, since mul and index can be overridden and will be overridden for instances and user data objects, else they can’t work.

there is something called ReflectionService and it lets you get all the properties of an instance

5 Likes

I’d like to add that performance-wise, you should cache the results of :GetPropertiesOfClass() because it doesn’t do that internally and is quite slow.

local ReflectionService = game:GetService("ReflectionService")

local classPropertiesCache = {}

local function cacheClassProperties(className : string) : ()
	local cachedProperties = {}
	
	for _, v in ReflectionService:GetPropertiesOfClass(className) do
		cachedProperties[v.Name] =  v
	end
	
	classPropertiesCache[className] = cachedProperties
end

local function safeRead(instance : Instance, property : string) : any
	if not classPropertiesCache[instance.ClassName] then
		cacheClassProperties(instance.ClassName)
	end
	
	local hasProperty = classPropertiesCache[instance.ClassName][property] ~= nil
	if hasProperty then
		return instance[property]
	end
	
	return nil
end

Sure bud you can’t stop me :victory_hand:

This was made in a rush, I usually don’t use pcalls much but I was in a hurry so I couldn’t think, this module isn’t even fully tested. I’m gonna fix any issue as I work with this, everyday.

Also since reflectionservice is new, I didn’t really cared too much to go through all the methods, now I know there are only four :sob:

Yeah and I also missed caches

Wow! I didn’t think of that!1! I always though you had to call it every time you needed!
(Yes ik ik the reply wasn’t fully to me)

not the community resource slop!

dude this is undeserved hate, go hate on cheatblocker or superbulletai instead, in the post it literally said it was made in a rush.

3 Likes

Whaā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž ā€Ž

You gotta be serious mate
Name yourself ryanair

1 Like

Have you not realized that this is one of the only 2 modules that allow effects like slow motion, this one and this one created 4 years ago by @FracturedSoftware (If you’re reading this, It truly apologise, I didn’t know you were gonna update it. You posted the same day I got the idea)

3 Likes

It is more than fair. The module has quite an amount of objectively inefficient solutions. It’s more easier to make a 80 line tick module (and build game cycle on this) than using this module. Furthermore, using roblox’s Tweens is old age.
Yes, ā€œnever code againā€ was surely kind of unfair.

I think there’s some forgotten thing to tell but I can’t prove it. There’s no any point in using pcalls unless they (functions used) can output an internal roblox’s error (like cloud APIs). Which is obviously not what indexing nor multiplying will do.

There’s no excuse for dismissing criticism, no matter how long it took you to make. ā€œIt was made in rushā€: cool, and I made this feedback in rush as well, so you can’t criticise me? You literally point out the poor work that was done for this solution.

You imply that your module can’t get negative feedback just because there’s only 2 modules that ā€œallowā€ effects like slow motion directly? That’s just sounds strange. Also you’re being sorry for what exactly??? For making a less appealing slow motion effect? That just gives out huge amount of egoism…

Please stop pointing this out.

3 Likes

nah closures are deadly and should always be stoppedā›”

well if one is the best it can be in roblox why have 2? Like with the signal modules, there’s a lot of them and not even 5% are actually worth using.

1 Like

Why use methods if you don’t use self in any function? (I think)

2 Likes

Is there any way to set a timescale ā€œblacklistā€? say for example I have a skill to slow down time / stop time, i shouldn’t be affected by my own skill.

If not, perhaps you can include a table of instances to exclude in the Toggle function that gets overwritten everytime toggle is called (or some other function related to it) like MoonScale:Toggle(true, {Character}).

1 Like

why is this even in a pcall :sob:


this module is cooked

2 Likes

Alright people
I’ll only talk in this post after I get the work done (the ones I hearted btw)

Cheers :victory_hand: (you owe me hearts too lol)

don’t abuse pcalls with the safeWrite and safeRead btw pcalls are really slow

2 Likes

Oh wow I.. didn’t know that, thanks
Oh wow I just replied, nvm not after this

Btw are attributes good or should i use tables