Corescript formatting, typing, and consistency improvements
This commit is contained in:
parent
4d5f484abd
commit
b9b47c1771
294
Modules/New.luau
294
Modules/New.luau
|
|
@ -1,17 +1,283 @@
|
||||||
-- You know what this is guyz
|
-- You know what this is guyz
|
||||||
-- HELIODEX'S BASIC NEW FUNCTION
|
-- HELIODEX'S (not so anymore now) BASIC NEW FUNCTION
|
||||||
|
|
||||||
return function(className: InstanceName | Instance)
|
type Return<T> = (props: { [string]: any }) -> T
|
||||||
local obj
|
|
||||||
if type(className) == "string" then
|
|
||||||
obj = Instance.new(className)
|
|
||||||
else
|
|
||||||
obj = className
|
|
||||||
end
|
|
||||||
|
|
||||||
local parent = nil
|
type New =
|
||||||
|
((className: never) -> never) -- induces a never type, not good enough but whatever
|
||||||
|
& ((className: "Accoutrement") -> Return<Accoutrement>)
|
||||||
|
& ((className: "Hat") -> Return<Hat>)
|
||||||
|
& ((className: "AdvancedDragger") -> Return<AdvancedDragger>)
|
||||||
|
& ((className: "Animation") -> Return<Animation>)
|
||||||
|
& ((className: "CurveAnimation") -> Return<CurveAnimation>)
|
||||||
|
& ((className: "KeyframeSequence") -> Return<KeyframeSequence>)
|
||||||
|
& ((className: "AnimationController") -> Return<AnimationController>)
|
||||||
|
& ((className: "AnimationRigData") -> Return<AnimationRigData>)
|
||||||
|
& ((className: "Animator") -> Return<Animator>)
|
||||||
|
& ((className: "AudioDeviceInput") -> Return<AudioDeviceInput>)
|
||||||
|
& ((className: "AudioDeviceOutput") -> Return<AudioDeviceOutput>)
|
||||||
|
& ((className: "AudioDistortion") -> Return<AudioDistortion>)
|
||||||
|
& ((className: "AudioEcho") -> Return<AudioEcho>)
|
||||||
|
& ((className: "AudioEmitter") -> Return<AudioEmitter>)
|
||||||
|
& ((className: "AudioEqualizer") -> Return<AudioEqualizer>)
|
||||||
|
& ((className: "AudioFader") -> Return<AudioFader>)
|
||||||
|
& ((className: "AudioFlanger") -> Return<AudioFlanger>)
|
||||||
|
& ((className: "AudioListener") -> Return<AudioListener>)
|
||||||
|
& ((className: "AudioPitchShifter") -> Return<AudioPitchShifter>)
|
||||||
|
& ((className: "AudioPlayer") -> Return<AudioPlayer>)
|
||||||
|
& ((className: "AudioReverb") -> Return<AudioReverb>)
|
||||||
|
& ((className: "AudioSearchParams") -> Return<AudioSearchParams>)
|
||||||
|
& ((className: "Backpack") -> Return<Backpack>)
|
||||||
|
& ((className: "BindableEvent") -> Return<BindableEvent>)
|
||||||
|
& ((className: "BindableFunction") -> Return<BindableFunction>)
|
||||||
|
& ((className: "BodyAngularVelocity") -> Return<BodyAngularVelocity>)
|
||||||
|
& ((className: "BodyForce") -> Return<BodyForce>)
|
||||||
|
& ((className: "BodyGyro") -> Return<BodyGyro>)
|
||||||
|
& ((className: "BodyPosition") -> Return<BodyPosition>)
|
||||||
|
& ((className: "BodyThrust") -> Return<BodyThrust>)
|
||||||
|
& ((className: "BodyVelocity") -> Return<BodyVelocity>)
|
||||||
|
& ((className: "RocketPropulsion") -> Return<RocketPropulsion>)
|
||||||
|
& ((
|
||||||
|
className: "BubbleChatMessageProperties"
|
||||||
|
) -> Return<BubbleChatMessageProperties>)
|
||||||
|
& ((className: "Camera") -> Return<Camera>)
|
||||||
|
& ((className: "BodyColors") -> Return<BodyColors>)
|
||||||
|
& ((className: "CharacterMesh") -> Return<CharacterMesh>)
|
||||||
|
& ((className: "Pants") -> Return<Pants>)
|
||||||
|
& ((className: "Shirt") -> Return<Shirt>)
|
||||||
|
& ((className: "ShirtGraphic") -> Return<ShirtGraphic>)
|
||||||
|
& ((className: "Skin") -> Return<Skin>)
|
||||||
|
& ((className: "ClickDetector") -> Return<ClickDetector>)
|
||||||
|
& ((className: "DragDetector") -> Return<DragDetector>)
|
||||||
|
& ((className: "Configuration") -> Return<Configuration>)
|
||||||
|
& ((className: "AngularVelocity") -> Return<AngularVelocity>)
|
||||||
|
& ((className: "AnimationConstraint") -> Return<AnimationConstraint>)
|
||||||
|
& ((className: "BallSocketConstraint") -> Return<BallSocketConstraint>)
|
||||||
|
& ((className: "HingeConstraint") -> Return<HingeConstraint>)
|
||||||
|
& ((className: "LineForce") -> Return<LineForce>)
|
||||||
|
& ((className: "LinearVelocity") -> Return<LinearVelocity>)
|
||||||
|
& ((className: "PlaneConstraint") -> Return<PlaneConstraint>)
|
||||||
|
& ((className: "Plane") -> Return<Plane>)
|
||||||
|
& ((className: "RigidConstraint") -> Return<RigidConstraint>)
|
||||||
|
& ((className: "RodConstraint") -> Return<RodConstraint>)
|
||||||
|
& ((className: "RopeConstraint") -> Return<RopeConstraint>)
|
||||||
|
& ((className: "CylindricalConstraint") -> Return<CylindricalConstraint>)
|
||||||
|
& ((className: "PrismaticConstraint") -> Return<PrismaticConstraint>)
|
||||||
|
& ((className: "SpringConstraint") -> Return<SpringConstraint>)
|
||||||
|
& ((className: "Torque") -> Return<Torque>)
|
||||||
|
& ((
|
||||||
|
className: "TorsionSpringConstraint"
|
||||||
|
) -> Return<TorsionSpringConstraint>)
|
||||||
|
& ((className: "UniversalConstraint") -> Return<UniversalConstraint>)
|
||||||
|
& ((className: "HumanoidController") -> Return<HumanoidController>)
|
||||||
|
& ((className: "SkateboardController") -> Return<SkateboardController>)
|
||||||
|
& ((className: "VehicleController") -> Return<VehicleController>)
|
||||||
|
& ((className: "AirController") -> Return<AirController>)
|
||||||
|
& ((className: "ClimbController") -> Return<ClimbController>)
|
||||||
|
& ((className: "GroundController") -> Return<GroundController>)
|
||||||
|
& ((className: "SwimController") -> Return<SwimController>)
|
||||||
|
& ((className: "ControllerManager") -> Return<ControllerManager>)
|
||||||
|
& ((className: "CustomEvent") -> Return<CustomEvent>)
|
||||||
|
& ((className: "CustomEventReceiver") -> Return<CustomEventReceiver>)
|
||||||
|
& ((className: "CylinderMesh") -> Return<CylinderMesh>)
|
||||||
|
& ((className: "DynamicMesh") -> Return<DynamicMesh>)
|
||||||
|
& ((className: "FileMesh") -> Return<FileMesh>)
|
||||||
|
& ((className: "SpecialMesh") -> Return<SpecialMesh>)
|
||||||
|
& ((
|
||||||
|
className: "DataStoreIncrementOptions"
|
||||||
|
) -> Return<DataStoreIncrementOptions>)
|
||||||
|
& ((className: "DataStoreOptions") -> Return<DataStoreOptions>)
|
||||||
|
& ((className: "DataStoreSetOptions") -> Return<DataStoreSetOptions>)
|
||||||
|
& ((className: "DebuggerWatch") -> Return<DebuggerWatch>)
|
||||||
|
& ((className: "Dialog") -> Return<Dialog>)
|
||||||
|
& ((className: "DialogChoice") -> Return<DialogChoice>)
|
||||||
|
& ((className: "Dragger") -> Return<Dragger>)
|
||||||
|
& ((
|
||||||
|
className: "ExperienceInviteOptions"
|
||||||
|
) -> Return<ExperienceInviteOptions>)
|
||||||
|
& ((className: "Explosion") -> Return<Explosion>)
|
||||||
|
& ((className: "Decal") -> Return<Decal>)
|
||||||
|
& ((className: "Texture") -> Return<Texture>)
|
||||||
|
& ((className: "Hole") -> Return<Hole>)
|
||||||
|
& ((className: "MotorFeature") -> Return<MotorFeature>)
|
||||||
|
& ((className: "Fire") -> Return<Fire>)
|
||||||
|
& ((className: "CSGDictionaryService") -> Return<CSGDictionaryService>)
|
||||||
|
& ((
|
||||||
|
className: "NonReplicatedCSGDictionaryService"
|
||||||
|
) -> Return<NonReplicatedCSGDictionaryService>)
|
||||||
|
& ((className: "ForceField") -> Return<ForceField>)
|
||||||
|
& ((className: "FunctionalTest") -> Return<FunctionalTest>)
|
||||||
|
& ((className: "GetTextBoundsParams") -> Return<GetTextBoundsParams>)
|
||||||
|
& ((className: "Frame") -> Return<Frame>)
|
||||||
|
& ((className: "ImageButton") -> Return<ImageButton>)
|
||||||
|
& ((className: "TextButton") -> Return<TextButton>)
|
||||||
|
& ((className: "ImageLabel") -> Return<ImageLabel>)
|
||||||
|
& ((className: "TextLabel") -> Return<TextLabel>)
|
||||||
|
& ((className: "TextBox") -> Return<TextBox>)
|
||||||
|
& ((className: "VideoFrame") -> Return<VideoFrame>)
|
||||||
|
& ((className: "ViewportFrame") -> Return<ViewportFrame>)
|
||||||
|
& ((className: "BillboardGui") -> Return<BillboardGui>)
|
||||||
|
& ((className: "ScreenGui") -> Return<ScreenGui>)
|
||||||
|
& ((className: "GuiMain") -> Return<GuiMain>)
|
||||||
|
& ((className: "AdGui") -> Return<AdGui>)
|
||||||
|
& ((className: "SurfaceGui") -> Return<SurfaceGui>)
|
||||||
|
& ((className: "FloorWire") -> Return<FloorWire>)
|
||||||
|
& ((className: "SelectionBox") -> Return<SelectionBox>)
|
||||||
|
& ((className: "BoxHandleAdornment") -> Return<BoxHandleAdornment>)
|
||||||
|
& ((className: "ConeHandleAdornment") -> Return<ConeHandleAdornment>)
|
||||||
|
& ((
|
||||||
|
className: "CylinderHandleAdornment"
|
||||||
|
) -> Return<CylinderHandleAdornment>)
|
||||||
|
& ((className: "ImageHandleAdornment") -> Return<ImageHandleAdornment>)
|
||||||
|
& ((className: "LineHandleAdornment") -> Return<LineHandleAdornment>)
|
||||||
|
& ((className: "SphereHandleAdornment") -> Return<SphereHandleAdornment>)
|
||||||
|
& ((
|
||||||
|
className: "WireframeHandleAdornment"
|
||||||
|
) -> Return<WireframeHandleAdornment>)
|
||||||
|
& ((className: "ParabolaAdornment") -> Return<ParabolaAdornment>)
|
||||||
|
& ((className: "SelectionSphere") -> Return<SelectionSphere>)
|
||||||
|
& ((className: "ArcHandles") -> Return<ArcHandles>)
|
||||||
|
& ((className: "Handles") -> Return<Handles>)
|
||||||
|
& ((className: "SurfaceSelection") -> Return<SurfaceSelection>)
|
||||||
|
& ((className: "SelectionPartLasso") -> Return<SelectionPartLasso>)
|
||||||
|
& ((className: "SelectionPointLasso") -> Return<SelectionPointLasso>)
|
||||||
|
& ((
|
||||||
|
className: "HeightmapImporterService"
|
||||||
|
) -> Return<HeightmapImporterService>)
|
||||||
|
& ((
|
||||||
|
className: "HiddenSurfaceRemovalAsset"
|
||||||
|
) -> Return<HiddenSurfaceRemovalAsset>)
|
||||||
|
& ((className: "Humanoid") -> Return<Humanoid>)
|
||||||
|
& ((className: "RotateP") -> Return<RotateP>)
|
||||||
|
& ((className: "RotateV") -> Return<RotateV>)
|
||||||
|
& ((className: "Glue") -> Return<Glue>)
|
||||||
|
& ((className: "ManualGlue") -> Return<ManualGlue>)
|
||||||
|
& ((className: "ManualWeld") -> Return<ManualWeld>)
|
||||||
|
& ((className: "Motor") -> Return<Motor>)
|
||||||
|
& ((className: "Motor6D") -> Return<Motor6D>)
|
||||||
|
& ((className: "Rotate") -> Return<Rotate>)
|
||||||
|
& ((className: "Snap") -> Return<Snap>)
|
||||||
|
& ((className: "VelocityMotor") -> Return<VelocityMotor>)
|
||||||
|
& ((className: "Weld") -> Return<Weld>)
|
||||||
|
& ((className: "Keyframe") -> Return<Keyframe>)
|
||||||
|
& ((className: "KeyframeMarker") -> Return<KeyframeMarker>)
|
||||||
|
& ((className: "PointLight") -> Return<PointLight>)
|
||||||
|
& ((className: "SpotLight") -> Return<SpotLight>)
|
||||||
|
& ((className: "SurfaceLight") -> Return<SurfaceLight>)
|
||||||
|
& ((className: "Script") -> Return<Script>)
|
||||||
|
& ((className: "LocalScript") -> Return<LocalScript>)
|
||||||
|
& ((className: "ModuleScript") -> Return<ModuleScript>)
|
||||||
|
& ((className: "MarkerCurve") -> Return<MarkerCurve>)
|
||||||
|
& ((className: "MemoryStoreService") -> Return<MemoryStoreService>)
|
||||||
|
& ((className: "Message") -> Return<Message>)
|
||||||
|
& ((className: "Hint") -> Return<Hint>)
|
||||||
|
& ((className: "CornerWedgePart") -> Return<CornerWedgePart>)
|
||||||
|
& ((className: "Part") -> Return<Part>)
|
||||||
|
& ((className: "FlagStand") -> Return<FlagStand>)
|
||||||
|
& ((className: "Seat") -> Return<Seat>)
|
||||||
|
& ((className: "SkateboardPlatform") -> Return<SkateboardPlatform>)
|
||||||
|
& ((className: "SpawnLocation") -> Return<SpawnLocation>)
|
||||||
|
& ((className: "WedgePart") -> Return<WedgePart>)
|
||||||
|
& ((className: "PartOperation") -> Return<PartOperation>)
|
||||||
|
& ((className: "IntersectOperation") -> Return<IntersectOperation>)
|
||||||
|
& ((className: "NegateOperation") -> Return<NegateOperation>)
|
||||||
|
& ((className: "UnionOperation") -> Return<UnionOperation>)
|
||||||
|
& ((className: "TrussPart") -> Return<TrussPart>)
|
||||||
|
& ((className: "VehicleSeat") -> Return<VehicleSeat>)
|
||||||
|
& ((className: "Model") -> Return<Model>)
|
||||||
|
& ((className: "HopperBin") -> Return<HopperBin>)
|
||||||
|
& ((className: "Tool") -> Return<Tool>)
|
||||||
|
& ((className: "Flag") -> Return<Flag>)
|
||||||
|
& ((className: "WorldModel") -> Return<WorldModel>)
|
||||||
|
& ((className: "PartOperationAsset") -> Return<PartOperationAsset>)
|
||||||
|
& ((className: "PathfindingLink") -> Return<PathfindingLink>)
|
||||||
|
& ((className: "PathfindingModifier") -> Return<PathfindingModifier>)
|
||||||
|
& ((className: "Player") -> Return<Player>)
|
||||||
|
& ((className: "PluginAction") -> Return<PluginAction>)
|
||||||
|
& ((className: "PluginCapabilities") -> Return<PluginCapabilities>)
|
||||||
|
& ((className: "NumberPose") -> Return<NumberPose>)
|
||||||
|
& ((className: "Pose") -> Return<Pose>)
|
||||||
|
& ((className: "ReflectionMetadata") -> Return<ReflectionMetadata>)
|
||||||
|
& ((
|
||||||
|
className: "ReflectionMetadataCallbacks"
|
||||||
|
) -> Return<ReflectionMetadataCallbacks>)
|
||||||
|
& ((
|
||||||
|
className: "ReflectionMetadataClasses"
|
||||||
|
) -> Return<ReflectionMetadataClasses>)
|
||||||
|
& ((
|
||||||
|
className: "ReflectionMetadataEnums"
|
||||||
|
) -> Return<ReflectionMetadataEnums>)
|
||||||
|
& ((
|
||||||
|
className: "ReflectionMetadataEvents"
|
||||||
|
) -> Return<ReflectionMetadataEvents>)
|
||||||
|
& ((
|
||||||
|
className: "ReflectionMetadataFunctions"
|
||||||
|
) -> Return<ReflectionMetadataFunctions>)
|
||||||
|
& ((
|
||||||
|
className: "ReflectionMetadataClass"
|
||||||
|
) -> Return<ReflectionMetadataClass>)
|
||||||
|
& ((className: "ReflectionMetadataEnum") -> Return<ReflectionMetadataEnum>)
|
||||||
|
& ((
|
||||||
|
className: "ReflectionMetadataEnumItem"
|
||||||
|
) -> Return<ReflectionMetadataEnumItem>)
|
||||||
|
& ((
|
||||||
|
className: "ReflectionMetadataMember"
|
||||||
|
) -> Return<ReflectionMetadataMember>)
|
||||||
|
& ((
|
||||||
|
className: "ReflectionMetadataProperties"
|
||||||
|
) -> Return<ReflectionMetadataProperties>)
|
||||||
|
& ((
|
||||||
|
className: "ReflectionMetadataYieldFunctions"
|
||||||
|
) -> Return<ReflectionMetadataYieldFunctions>)
|
||||||
|
& ((className: "RemoteEvent") -> Return<RemoteEvent>)
|
||||||
|
& ((className: "RemoteFunction") -> Return<RemoteFunction>)
|
||||||
|
& ((className: "RenderingTest") -> Return<RenderingTest>)
|
||||||
|
& ((className: "BuoyancySensor") -> Return<BuoyancySensor>)
|
||||||
|
& ((className: "ControllerPartSensor") -> Return<ControllerPartSensor>)
|
||||||
|
& ((className: "Sky") -> Return<Sky>)
|
||||||
|
& ((className: "Smoke") -> Return<Smoke>)
|
||||||
|
& ((className: "Sound") -> Return<Sound>)
|
||||||
|
& ((className: "Sparkles") -> Return<Sparkles>)
|
||||||
|
& ((
|
||||||
|
className: "StandalonePluginScripts"
|
||||||
|
) -> Return<StandalonePluginScripts>)
|
||||||
|
& ((className: "StarterGear") -> Return<StarterGear>)
|
||||||
|
& ((className: "StudioCallout") -> Return<StudioCallout>)
|
||||||
|
& ((className: "StudioObjectBase") -> Return<StudioObjectBase>)
|
||||||
|
& ((className: "StudioWidget") -> Return<StudioWidget>)
|
||||||
|
& ((className: "StyleDerive") -> Return<StyleDerive>)
|
||||||
|
& ((className: "StyleLink") -> Return<StyleLink>)
|
||||||
|
& ((className: "SurfaceAppearance") -> Return<SurfaceAppearance>)
|
||||||
|
& ((className: "Team") -> Return<Team>)
|
||||||
|
& ((className: "TeleportOptions") -> Return<TeleportOptions>)
|
||||||
|
& ((className: "TerrainDetail") -> Return<TerrainDetail>)
|
||||||
|
& ((className: "TerrainRegion") -> Return<TerrainRegion>)
|
||||||
|
& ((className: "TestService") -> Return<TestService>)
|
||||||
|
& ((className: "TextChannel") -> Return<TextChannel>)
|
||||||
|
& ((className: "TextChatCommand") -> Return<TextChatCommand>)
|
||||||
|
& ((
|
||||||
|
className: "TextChatMessageProperties"
|
||||||
|
) -> Return<TextChatMessageProperties>)
|
||||||
|
& ((className: "TrackerStreamAnimation") -> Return<TrackerStreamAnimation>)
|
||||||
|
& ((className: "BinaryStringValue") -> Return<BinaryStringValue>)
|
||||||
|
& ((className: "BoolValue") -> Return<BoolValue>)
|
||||||
|
& ((className: "BrickColorValue") -> Return<BrickColorValue>)
|
||||||
|
& ((className: "CFrameValue") -> Return<CFrameValue>)
|
||||||
|
& ((className: "Color3Value") -> Return<Color3Value>)
|
||||||
|
& ((className: "DoubleConstrainedValue") -> Return<DoubleConstrainedValue>)
|
||||||
|
& ((className: "IntConstrainedValue") -> Return<IntConstrainedValue>)
|
||||||
|
& ((className: "IntValue") -> Return<IntValue>)
|
||||||
|
& ((className: "NumberValue") -> Return<NumberValue>)
|
||||||
|
& ((className: "ObjectValue") -> Return<ObjectValue>)
|
||||||
|
& ((className: "RayValue") -> Return<RayValue>)
|
||||||
|
& ((className: "StringValue") -> Return<StringValue>)
|
||||||
|
& ((className: "Vector3Value") -> Return<Vector3Value>)
|
||||||
|
& ((className: "Wire") -> Return<Wire>)
|
||||||
|
|
||||||
|
local function propsApplier(obj)
|
||||||
return function(props: { [string]: any })
|
return function(props: { [string]: any })
|
||||||
|
local parent
|
||||||
|
|
||||||
for k, v in pairs(props) do
|
for k, v in pairs(props) do
|
||||||
if type(k) == "string" then
|
if type(k) == "string" then
|
||||||
if k == "Parent" then
|
if k == "Parent" then
|
||||||
|
|
@ -29,3 +295,13 @@ return function(className: InstanceName | Instance)
|
||||||
return obj
|
return obj
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local New = function(className)
|
||||||
|
return propsApplier(Instance.new(className))
|
||||||
|
end :: New
|
||||||
|
|
||||||
|
local Hydrate = function(target)
|
||||||
|
return propsApplier(target)
|
||||||
|
end :: <T>(T) -> (props: { [string]: any }) -> T
|
||||||
|
|
||||||
|
return { New = New, Hydrate = Hydrate }
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ print "[Mercury]: Loaded corescript 107893730"
|
||||||
|
|
||||||
local MarketplaceService = game:GetService "MarketplaceService"
|
local MarketplaceService = game:GetService "MarketplaceService"
|
||||||
local GuiService = game:GetService "GuiService"
|
local GuiService = game:GetService "GuiService"
|
||||||
|
local ContentProvider = game:GetService "ContentProvider"
|
||||||
|
local HttpService = game:GetService "HttpService"
|
||||||
|
|
||||||
-- wait for important items to appear
|
-- wait for important items to appear
|
||||||
while not Game do
|
while not Game do
|
||||||
|
|
@ -23,8 +25,7 @@ end
|
||||||
|
|
||||||
-------------------------------- Global Variables ----------------------------------------
|
-------------------------------- Global Variables ----------------------------------------
|
||||||
-- utility variables
|
-- utility variables
|
||||||
local RbxUtility
|
local baseUrl = ContentProvider.BaseUrl:lower()
|
||||||
local baseUrl = game:GetService("ContentProvider").BaseUrl:lower()
|
|
||||||
|
|
||||||
-- data variables
|
-- data variables
|
||||||
local currentProductInfo, currentAssetId, currentCurrencyType, currentCurrencyAmount, currentEquipOnPurchase, currentProductId, currentServerResponseTable
|
local currentProductInfo, currentAssetId, currentCurrencyType, currentCurrencyAmount, currentEquipOnPurchase, currentProductId, currentServerResponseTable
|
||||||
|
|
@ -40,10 +41,10 @@ local purchaseDialog
|
||||||
local tweenTime = 0.3
|
local tweenTime = 0.3
|
||||||
local showPosition = UDim2.new(0.5, -330, 0.5, -200)
|
local showPosition = UDim2.new(0.5, -330, 0.5, -200)
|
||||||
local hidePosition = UDim2.new(0.5, -330, 1, 25)
|
local hidePosition = UDim2.new(0.5, -330, 1, 25)
|
||||||
local isSmallScreen
|
-- local isSmallScreen
|
||||||
local spinning = false
|
local spinning = false
|
||||||
local spinnerIcons
|
local spinnerIcons
|
||||||
local smallScreenThreshold = 450
|
-- local smallScreenThreshold = 450
|
||||||
|
|
||||||
-- user facing images
|
-- user facing images
|
||||||
local function assetUrl(id: number)
|
local function assetUrl(id: number)
|
||||||
|
|
@ -92,13 +93,6 @@ local function getSecureApiBaseUrl()
|
||||||
return secureApiUrl
|
return secureApiUrl
|
||||||
end
|
end
|
||||||
|
|
||||||
local function getRbxUtility()
|
|
||||||
if not RbxUtility then
|
|
||||||
RbxUtility = LoadLibrary "RbxUtility"
|
|
||||||
end
|
|
||||||
return RbxUtility
|
|
||||||
end
|
|
||||||
|
|
||||||
local function preloadAssets()
|
local function preloadAssets()
|
||||||
for _, url in ipairs {
|
for _, url in ipairs {
|
||||||
errorImageUrl,
|
errorImageUrl,
|
||||||
|
|
@ -114,7 +108,7 @@ local function preloadAssets()
|
||||||
tixIcon,
|
tixIcon,
|
||||||
robuxIcon,
|
robuxIcon,
|
||||||
} do
|
} do
|
||||||
game:GetService("ContentProvider"):Preload(url)
|
ContentProvider:Preload(url)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -219,7 +213,7 @@ local function currencyEnumToInt(currencyEnum: Enum.CurrencyType)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- oi, this is ugly
|
-- oi, this is ugly
|
||||||
local function assetTypeToString(assetType)
|
local function assetTypeToString(assetType: number)
|
||||||
if assetType == 1 then
|
if assetType == 1 then
|
||||||
return "Image"
|
return "Image"
|
||||||
elseif assetType == 2 then
|
elseif assetType == 2 then
|
||||||
|
|
@ -307,7 +301,7 @@ local function currencyTypeToString(currencyType)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- make sure our gui displays the proper purchase data, and set the productid we will try and buy if use specifies a buy action
|
-- make sure our gui displays the proper purchase data, and set the productid we will try and buy if use specifies a buy action
|
||||||
local function updatePurchasePromptData(_)
|
local function updatePurchasePromptData()
|
||||||
local newItemDescription = ""
|
local newItemDescription = ""
|
||||||
|
|
||||||
-- id to use when we request a purchase
|
-- id to use when we request a purchase
|
||||||
|
|
@ -359,7 +353,7 @@ local function updatePurchasePromptData(_)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- more enum to int fun!
|
-- more enum to int fun!
|
||||||
local function membershipTypeToNumber(membership)
|
local function membershipTypeToNumber(membership: EnumItem) -- idk if there's a better type than EnumItem
|
||||||
if membership == Enum.MembershipType.None then
|
if membership == Enum.MembershipType.None then
|
||||||
return 0
|
return 0
|
||||||
elseif membership == Enum.MembershipType.BuildersClub then
|
elseif membership == Enum.MembershipType.BuildersClub then
|
||||||
|
|
@ -451,9 +445,7 @@ local function getPlayerBalance()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
playerBalance = getRbxUtility().DecodeJSON(playerBalance)
|
return HttpService:JSONDecode(playerBalance)
|
||||||
|
|
||||||
return playerBalance
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- figure out what currency to use based on the currency you can actually sell the item in and what the script specified
|
-- figure out what currency to use based on the currency you can actually sell the item in and what the script specified
|
||||||
|
|
@ -504,8 +496,7 @@ local function canPurchaseItem()
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
if success then
|
if success then
|
||||||
currentProductInfo =
|
currentProductInfo = HttpService:JSONDecode(currentProductInfoRaw)
|
||||||
getRbxUtility().DecodeJSON(currentProductInfoRaw)
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
success = ypcall(function()
|
success = ypcall(function()
|
||||||
|
|
@ -552,7 +543,7 @@ local function canPurchaseItem()
|
||||||
-- next we parse through product info and see if we can purchase
|
-- next we parse through product info and see if we can purchase
|
||||||
|
|
||||||
if type(currentProductInfo) ~= "table" then
|
if type(currentProductInfo) ~= "table" then
|
||||||
currentProductInfo = getRbxUtility().DecodeJSON(currentProductInfo)
|
currentProductInfo = HttpService:JSONDecode(currentProductInfo)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not currentProductInfo then
|
if not currentProductInfo then
|
||||||
|
|
@ -851,9 +842,7 @@ local function acceptPurchase()
|
||||||
|
|
||||||
local currencyData = `¤cyTypeId={currencyEnumToInt(
|
local currencyData = `¤cyTypeId={currencyEnumToInt(
|
||||||
currentCurrencyType
|
currentCurrencyType
|
||||||
)}¤cyTypeId={currencyEnumToInt(
|
)}¤cyTypeId={currencyEnumToInt(currentCurrencyType)}`
|
||||||
currentCurrencyType
|
|
||||||
)}`
|
|
||||||
|
|
||||||
-- consumables need to use a different url
|
-- consumables need to use a different url
|
||||||
if purchasingConsumable then
|
if purchasingConsumable then
|
||||||
|
|
@ -890,19 +879,17 @@ local function acceptPurchase()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- parse our response, decide how to react
|
-- parse our response, decide how to react
|
||||||
response = getRbxUtility().DecodeJSON(response)
|
response = HttpService:JSONDecode(response)
|
||||||
|
|
||||||
if response then
|
if response then
|
||||||
if response.success == false then
|
if response.success == false and response.status ~= "AlreadyOwned" then
|
||||||
if response.status ~= "AlreadyOwned" then
|
print(
|
||||||
print(
|
"web return response of fail on purchase of",
|
||||||
"web return response of fail on purchase of",
|
currentAssetId,
|
||||||
currentAssetId,
|
currentProductId
|
||||||
currentProductId
|
)
|
||||||
)
|
purchaseFailed((response.status == "EconomyDisabled"))
|
||||||
purchaseFailed((response.status == "EconomyDisabled"))
|
return
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
print(
|
print(
|
||||||
|
|
@ -1261,42 +1248,42 @@ end
|
||||||
|
|
||||||
-- next 2 functions are convenienvce creation functions for guis
|
-- next 2 functions are convenienvce creation functions for guis
|
||||||
|
|
||||||
local function cutSizeInHalfRecursive(_)
|
-- local function cutSizeInHalfRecursive(_)
|
||||||
-- todo: change the gui size based on how much space we have
|
-- todo: change the gui size based on how much space we have
|
||||||
--[[changeSize(instance,0.5)
|
-- changeSize(instance, 0.5)
|
||||||
|
|
||||||
local children = instance:GetChildren()
|
-- local children = instance:GetChildren()
|
||||||
for i = 1, #children do
|
-- for i = 1, #children do
|
||||||
cutSizeInHalfRecursive(children[i])
|
-- cutSizeInHalfRecursive(children[i])
|
||||||
end]]
|
-- end
|
||||||
end
|
-- end
|
||||||
|
|
||||||
local function doubleSizeRecursive(_)
|
-- local function doubleSizeRecursive(_)
|
||||||
-- todo: change the gui size based on how much space we have
|
-- todo: change the gui size based on how much space we have
|
||||||
--[[changeSize(instance,2)
|
-- changeSize(instance, 2)
|
||||||
|
|
||||||
local children = instance:GetChildren()
|
-- local children = instance:GetChildren()
|
||||||
for i = 1, #children do
|
-- for i = 1, #children do
|
||||||
doubleSizeRecursive(children[i])
|
-- doubleSizeRecursive(children[i])
|
||||||
end]]
|
-- end
|
||||||
end
|
-- end
|
||||||
|
|
||||||
local function modifyForSmallScreen()
|
-- local function modifyForSmallScreen()
|
||||||
cutSizeInHalfRecursive(purchaseDialog)
|
-- cutSizeInHalfRecursive(purchaseDialog)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
local function modifyForLargeScreen()
|
-- local function modifyForLargeScreen()
|
||||||
doubleSizeRecursive(purchaseDialog)
|
-- doubleSizeRecursive(purchaseDialog)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
-- depending on screen size, we need to change the gui
|
-- depending on screen size, we need to change the gui
|
||||||
local function changeGuiToScreenSize(smallScreen)
|
-- local function changeGuiToScreenSize(smallScreen)
|
||||||
if smallScreen then
|
-- if smallScreen then
|
||||||
modifyForSmallScreen()
|
-- modifyForSmallScreen()
|
||||||
else
|
-- else
|
||||||
modifyForLargeScreen()
|
-- modifyForLargeScreen()
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
|
||||||
local function doPurchasePrompt(
|
local function doPurchasePrompt(
|
||||||
player,
|
player,
|
||||||
|
|
@ -1373,20 +1360,20 @@ if enableBrowserWindowClosedEvent then
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
Game.CoreGui.RobloxGui.Changed:connect(function()
|
-- Game.CoreGui.RobloxGui.Changed:connect(function()
|
||||||
local nowIsSmallScreen = (
|
-- local nowIsSmallScreen = (
|
||||||
game.CoreGui.RobloxGui.AbsoluteSize.Y <= smallScreenThreshold
|
-- game.CoreGui.RobloxGui.AbsoluteSize.Y <= smallScreenThreshold
|
||||||
)
|
-- )
|
||||||
if nowIsSmallScreen and not isSmallScreen then
|
-- if nowIsSmallScreen and not isSmallScreen then
|
||||||
changeGuiToScreenSize(true)
|
-- changeGuiToScreenSize(true)
|
||||||
elseif not nowIsSmallScreen and isSmallScreen then
|
-- elseif not nowIsSmallScreen and isSmallScreen then
|
||||||
changeGuiToScreenSize(false)
|
-- changeGuiToScreenSize(false)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
isSmallScreen = nowIsSmallScreen
|
-- isSmallScreen = nowIsSmallScreen
|
||||||
end)
|
-- end)
|
||||||
|
|
||||||
isSmallScreen = (game.CoreGui.RobloxGui.AbsoluteSize.Y <= smallScreenThreshold)
|
-- isSmallScreen = (game.CoreGui.RobloxGui.AbsoluteSize.Y <= smallScreenThreshold)
|
||||||
if isSmallScreen then
|
-- if isSmallScreen then
|
||||||
changeGuiToScreenSize(true)
|
-- changeGuiToScreenSize(true)
|
||||||
end
|
-- end
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ for _ = 1, 8 do
|
||||||
end
|
end
|
||||||
|
|
||||||
--Include
|
--Include
|
||||||
local New = require "../Modules/New"
|
local New = (require "../Modules/New").New
|
||||||
|
|
||||||
-- A Few Script Globals
|
-- A Few Script Globals
|
||||||
local gui
|
local gui
|
||||||
|
|
@ -39,7 +39,7 @@ function initializeDeveloperConsole()
|
||||||
end
|
end
|
||||||
devConsoleInitialized = true
|
devConsoleInitialized = true
|
||||||
|
|
||||||
---Dev-Console Variables
|
-- Dev-Console Variables
|
||||||
local LOCAL_CONSOLE = 1
|
local LOCAL_CONSOLE = 1
|
||||||
local SERVER_CONSOLE = 2
|
local SERVER_CONSOLE = 2
|
||||||
|
|
||||||
|
|
@ -64,7 +64,7 @@ function initializeDeveloperConsole()
|
||||||
|
|
||||||
local frameNumber = 0
|
local frameNumber = 0
|
||||||
|
|
||||||
--Create Dev-Console
|
-- Create Dev-Console
|
||||||
|
|
||||||
local Dev_Body = New "Frame" {
|
local Dev_Body = New "Frame" {
|
||||||
Name = "Body",
|
Name = "Body",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
-- CoreGui.RobloxGui.CoreScripts/ToolTip
|
-- CoreGui.RobloxGui.CoreScripts/ToolTip
|
||||||
print "[Mercury]: Loaded corescript 36868950"
|
print "[Mercury]: Loaded corescript 36868950"
|
||||||
|
|
||||||
local New = require "../Modules/New"
|
local News = require "../Modules/New"
|
||||||
|
local New = News.New
|
||||||
|
local Hydrate = News.Hydrate
|
||||||
|
|
||||||
local controlFrame = script.Parent:FindFirstChild "ControlFrame"
|
local controlFrame = script.Parent:FindFirstChild "ControlFrame"
|
||||||
|
|
||||||
|
|
@ -72,12 +74,13 @@ local function createSettingsButtonTip(parent)
|
||||||
parent = bottomLeftControl:FindFirstChild "SettingsButton"
|
parent = bottomLeftControl:FindFirstChild "SettingsButton"
|
||||||
end
|
end
|
||||||
|
|
||||||
local toolTip = frameTip:clone()
|
local toolTip = Hydrate(frameTip:Clone()) {
|
||||||
toolTip.RobloxLocked = true
|
RobloxLocked = true,
|
||||||
toolTip.Text = "Settings/Leave Game"
|
Text = "Settings/Leave Game",
|
||||||
toolTip.Position = UDim2.new(0, 0, 0, -18)
|
Position = UDim2.new(0, 0, 0, -18),
|
||||||
toolTip.Size = UDim2.new(0, 120, 0, 20)
|
Size = UDim2.new(0, 120, 0, 20),
|
||||||
toolTip.Parent = parent
|
Parent = parent,
|
||||||
|
}
|
||||||
setUpListeners(toolTip)
|
setUpListeners(toolTip)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -89,7 +92,7 @@ local bottomLeftChildren = bottomLeftControl:GetChildren()
|
||||||
|
|
||||||
for i = 1, #bottomLeftChildren do
|
for i = 1, #bottomLeftChildren do
|
||||||
if bottomLeftChildren[i].Name == "Exit" then
|
if bottomLeftChildren[i].Name == "Exit" then
|
||||||
local exitTip = New(frameTip:clone()) {
|
local exitTip = Hydrate(frameTip:Clone()) {
|
||||||
RobloxLocked = true,
|
RobloxLocked = true,
|
||||||
Text = "Leave Place",
|
Text = "Leave Place",
|
||||||
Position = UDim2.new(0, 0, -1, 0),
|
Position = UDim2.new(0, 0, -1, 0),
|
||||||
|
|
@ -109,7 +112,7 @@ local bottomRightChildren = bottomRightControl:GetChildren()
|
||||||
|
|
||||||
for i = 1, #bottomRightChildren do
|
for i = 1, #bottomRightChildren do
|
||||||
if bottomRightChildren[i].Name:find "Camera" ~= nil then
|
if bottomRightChildren[i].Name:find "Camera" ~= nil then
|
||||||
local cameraTip = New(frameTip:clone()) {
|
local cameraTip = Hydrate(frameTip:Clone()) {
|
||||||
RobloxLocked = true,
|
RobloxLocked = true,
|
||||||
Text = "Camera View",
|
Text = "Camera View",
|
||||||
Size = UDim2.new(2, 0, 1.25, 0),
|
Size = UDim2.new(2, 0, 1.25, 0),
|
||||||
|
|
|
||||||
|
|
@ -23,36 +23,21 @@ end
|
||||||
waitForChild(CoreGui, "RobloxGui")
|
waitForChild(CoreGui, "RobloxGui")
|
||||||
local screenGui = CoreGui:FindFirstChild "RobloxGui"
|
local screenGui = CoreGui:FindFirstChild "RobloxGui"
|
||||||
|
|
||||||
-- ToolTipper (creates tool tips for gui)
|
local scripts = {
|
||||||
ScriptContext:AddCoreScript(36868950, screenGui, "CoreScripts/ToolTip")
|
[36868950] = "CoreScripts/ToolTip", -- ToolTipper (creates tool tips for gui)
|
||||||
-- SettingsScript
|
[46295863] = "CoreScripts/Settings", -- SettingsScript
|
||||||
ScriptContext:AddCoreScript(46295863, screenGui, "CoreScripts/Settings")
|
[39250920] = "CoreScripts/MainBotChatScript", -- MainBotChatScript
|
||||||
|
[48488451] = "CoreScripts/PopupScript", -- Popup Script
|
||||||
|
[48488398] = "CoreScripts/NotificationScript", -- Friend Notification Script (probably can use this script to expand out to other notifications)
|
||||||
|
[97188756] = "CoreScripts/ChatScript", -- Chat script
|
||||||
|
[107893730] = "CoreScripts/PurchasePromptScript", -- Purchase Prompt Script
|
||||||
|
}
|
||||||
|
|
||||||
-- MainBotChatScript
|
for id, path in pairs(scripts) do
|
||||||
ScriptContext:AddCoreScript(
|
ScriptContext:AddCoreScript(id, screenGui, path)
|
||||||
39250920,
|
end
|
||||||
screenGui,
|
|
||||||
"CoreScripts/MainBotChatScript"
|
|
||||||
)
|
|
||||||
|
|
||||||
-- Popup Script
|
if screenGui.AbsoluteSize.Y >= 600 then
|
||||||
ScriptContext:AddCoreScript(48488451, screenGui, "CoreScripts/PopupScript")
|
|
||||||
-- Friend Notification Script (probably can use this script to expand out to other notifications)
|
|
||||||
ScriptContext:AddCoreScript(
|
|
||||||
48488398,
|
|
||||||
screenGui,
|
|
||||||
"CoreScripts/NotificationScript"
|
|
||||||
)
|
|
||||||
-- Chat script
|
|
||||||
ScriptContext:AddCoreScript(97188756, screenGui, "CoreScripts/ChatScript")
|
|
||||||
-- Purchase Prompt Script
|
|
||||||
ScriptContext:AddCoreScript(
|
|
||||||
107893730,
|
|
||||||
screenGui,
|
|
||||||
"CoreScripts/PurchasePromptScript"
|
|
||||||
)
|
|
||||||
|
|
||||||
if screenGui.AbsoluteSize.Y > 600 then
|
|
||||||
-- New Player List
|
-- New Player List
|
||||||
ScriptContext:AddCoreScript(
|
ScriptContext:AddCoreScript(
|
||||||
48488235,
|
48488235,
|
||||||
|
|
@ -103,21 +88,4 @@ ScriptContext:AddCoreScript(
|
||||||
"CoreScripts/BackpackScripts/LoadoutScript"
|
"CoreScripts/BackpackScripts/LoadoutScript"
|
||||||
)
|
)
|
||||||
|
|
||||||
local IsPersonalServer = not not game.Workspace:FindFirstChild "PSVariable"
|
-- Personal servers are disabled, the corescript for it is not present
|
||||||
if IsPersonalServer then
|
|
||||||
ScriptContext:AddCoreScript(
|
|
||||||
64164692,
|
|
||||||
game.Players.LocalPlayer,
|
|
||||||
"BuildToolManager"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
game.Workspace.ChildAdded:connect(function(nchild)
|
|
||||||
if nchild.Name == "PSVariable" and nchild:IsA "BoolValue" then
|
|
||||||
IsPersonalServer = true
|
|
||||||
ScriptContext:AddCoreScript(
|
|
||||||
64164692,
|
|
||||||
game.Players.LocalPlayer,
|
|
||||||
"BuildToolManager"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ for _ = 1, 8 do
|
||||||
print "IF YOU SEE THIS MESSAGE, PLEASE REPORT IT TO THE MERCURY DEVELOPERS"
|
print "IF YOU SEE THIS MESSAGE, PLEASE REPORT IT TO THE MERCURY DEVELOPERS"
|
||||||
end
|
end
|
||||||
|
|
||||||
local damageGuiWidth = 5.0
|
local damageGuiWidth = 5
|
||||||
local damageGuiHeight = 5.0
|
local damageGuiHeight = 5
|
||||||
|
|
||||||
local function waitForChild(parent, childName)
|
local function waitForChild(parent, childName)
|
||||||
local child = parent:findFirstChild(childName)
|
local child = parent:findFirstChild(childName)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
-- CoreGui.RobloxGui.CoreScripts/MainBotChatScript
|
-- CoreGui.RobloxGui.CoreScripts/MainBotChatScript
|
||||||
print "[Mercury]: Loaded corescript 39250920"
|
print "[Mercury]: Loaded corescript 39250920"
|
||||||
|
|
||||||
local New = require "../Modules/New"
|
local News = require "../Modules/New"
|
||||||
|
local New = News.New
|
||||||
|
local Hydrate = News.Hydrate
|
||||||
|
|
||||||
local InsertService = game:GetService "InsertService"
|
local InsertService = game:GetService "InsertService"
|
||||||
|
|
||||||
|
|
@ -17,7 +19,9 @@ local function waitForChild(instance, name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local mainFrame
|
local mainFrame: Frame & {
|
||||||
|
Tail: ImageLabel,
|
||||||
|
}
|
||||||
local choices = {}
|
local choices = {}
|
||||||
local lastChoice
|
local lastChoice
|
||||||
local choiceMap = {}
|
local choiceMap = {}
|
||||||
|
|
@ -308,7 +312,7 @@ local function renewKillswitch(dialog)
|
||||||
currentAbortDialogScript = nil
|
currentAbortDialogScript = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
currentAbortDialogScript = New(timeoutScript:Clone()) {
|
currentAbortDialogScript = Hydrate(timeoutScript:Clone()) {
|
||||||
|
|
||||||
archivable = false,
|
archivable = false,
|
||||||
Disabled = false,
|
Disabled = false,
|
||||||
|
|
@ -357,11 +361,37 @@ local function selectChoice(choice)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function newChoice(numberText)
|
local function newChoice(numberText)
|
||||||
local frame = Instance.new "TextButton"
|
local frame = New "TextButton" {
|
||||||
frame.BackgroundColor3 = Color3.new(0 / 255, 0 / 255, 179 / 255)
|
BackgroundColor3 = Color3.new(0 / 255, 0 / 255, 179 / 255),
|
||||||
frame.AutoButtonColor = false
|
AutoButtonColor = false,
|
||||||
frame.BorderSizePixel = 0
|
BorderSizePixel = 0,
|
||||||
frame.Text = ""
|
Text = "",
|
||||||
|
RobloxLocked = true,
|
||||||
|
New "TextLabel" {
|
||||||
|
Name = "Number",
|
||||||
|
TextColor3 = Color3.new(127 / 255, 212 / 255, 255 / 255),
|
||||||
|
Text = numberText,
|
||||||
|
FontSize = Enum.FontSize.Size14,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Position = UDim2.new(0, 4, 0, 2),
|
||||||
|
Size = UDim2.new(0, 20, 0, 24),
|
||||||
|
TextXAlignment = Enum.TextXAlignment.Left,
|
||||||
|
TextYAlignment = Enum.TextYAlignment.Top,
|
||||||
|
RobloxLocked = true,
|
||||||
|
},
|
||||||
|
New "TextLabel" {
|
||||||
|
Name = "UserPrompt",
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
FontSize = Enum.FontSize.Size14,
|
||||||
|
Position = UDim2.new(0, 28, 0, 2),
|
||||||
|
Size = UDim2.new(1, -32, 1, -4),
|
||||||
|
TextXAlignment = Enum.TextXAlignment.Left,
|
||||||
|
TextYAlignment = Enum.TextYAlignment.Top,
|
||||||
|
TextWrap = true,
|
||||||
|
RobloxLocked = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
frame.MouseEnter:connect(function()
|
frame.MouseEnter:connect(function()
|
||||||
highlightColor(frame, currentTone())
|
highlightColor(frame, currentTone())
|
||||||
end)
|
end)
|
||||||
|
|
@ -371,33 +401,6 @@ local function newChoice(numberText)
|
||||||
frame.MouseButton1Click:connect(function()
|
frame.MouseButton1Click:connect(function()
|
||||||
selectChoice(frame)
|
selectChoice(frame)
|
||||||
end)
|
end)
|
||||||
frame.RobloxLocked = true
|
|
||||||
|
|
||||||
local number = Instance.new "TextLabel"
|
|
||||||
number.Name = "Number"
|
|
||||||
number.TextColor3 = Color3.new(127 / 255, 212 / 255, 255 / 255)
|
|
||||||
number.Text = numberText
|
|
||||||
number.FontSize = Enum.FontSize.Size14
|
|
||||||
number.BackgroundTransparency = 1
|
|
||||||
number.Position = UDim2.new(0, 4, 0, 2)
|
|
||||||
number.Size = UDim2.new(0, 20, 0, 24)
|
|
||||||
number.TextXAlignment = Enum.TextXAlignment.Left
|
|
||||||
number.TextYAlignment = Enum.TextYAlignment.Top
|
|
||||||
number.RobloxLocked = true
|
|
||||||
number.Parent = frame
|
|
||||||
|
|
||||||
local prompt = Instance.new "TextLabel"
|
|
||||||
prompt.Name = "UserPrompt"
|
|
||||||
prompt.BackgroundTransparency = 1
|
|
||||||
prompt.TextColor3 = Color3.new(1, 1, 1)
|
|
||||||
prompt.FontSize = Enum.FontSize.Size14
|
|
||||||
prompt.Position = UDim2.new(0, 28, 0, 2)
|
|
||||||
prompt.Size = UDim2.new(1, -32, 1, -4)
|
|
||||||
prompt.TextXAlignment = Enum.TextXAlignment.Left
|
|
||||||
prompt.TextYAlignment = Enum.TextYAlignment.Top
|
|
||||||
prompt.TextWrap = true
|
|
||||||
prompt.RobloxLocked = true
|
|
||||||
prompt.Parent = frame
|
|
||||||
|
|
||||||
return frame
|
return frame
|
||||||
end
|
end
|
||||||
|
|
@ -412,30 +415,29 @@ local function initialize(parent)
|
||||||
lastChoice.UserPrompt.Text = "Goodbye!"
|
lastChoice.UserPrompt.Text = "Goodbye!"
|
||||||
lastChoice.Size = UDim2.new(1, 0, 0, 28)
|
lastChoice.Size = UDim2.new(1, 0, 0, 28)
|
||||||
|
|
||||||
mainFrame = Instance.new "Frame"
|
mainFrame = New "Frame" {
|
||||||
mainFrame.Name = "UserDialogArea"
|
Name = "UserDialogArea",
|
||||||
mainFrame.Size = UDim2.new(0, 350, 0, 200)
|
Size = UDim2.new(0, 350, 0, 200),
|
||||||
mainFrame.Style = Enum.FrameStyle.ChatBlue
|
Style = Enum.FrameStyle.ChatBlue,
|
||||||
mainFrame.Visible = false
|
Visible = false,
|
||||||
|
RobloxLocked = true,
|
||||||
local imageLabel = Instance.new "ImageLabel"
|
New "ImageLabel" {
|
||||||
imageLabel.Name = "Tail"
|
Name = "Tail",
|
||||||
imageLabel.Size = UDim2.new(0, 62, 0, 53)
|
Size = UDim2.new(0, 62, 0, 53),
|
||||||
imageLabel.Position = UDim2.new(1, 8, 0.25)
|
Position = UDim2.new(1, 8, 0.25),
|
||||||
imageLabel.Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png"
|
Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png",
|
||||||
imageLabel.BackgroundTransparency = 1
|
BackgroundTransparency = 1,
|
||||||
imageLabel.RobloxLocked = true
|
RobloxLocked = true,
|
||||||
imageLabel.Parent = mainFrame
|
},
|
||||||
|
}
|
||||||
|
|
||||||
for _, obj in pairs(choices) do
|
for _, obj in pairs(choices) do
|
||||||
obj.RobloxLocked = true
|
obj.RobloxLocked = true
|
||||||
obj.Parent = mainFrame
|
obj.Parent = mainFrame
|
||||||
end
|
end
|
||||||
lastChoice.RobloxLocked = true
|
lastChoice.RobloxLocked = true
|
||||||
lastChoice.Parent = mainFrame
|
|
||||||
|
|
||||||
mainFrame.RobloxLocked = true
|
|
||||||
mainFrame.Parent = parent
|
mainFrame.Parent = parent
|
||||||
|
lastChoice.Parent = mainFrame
|
||||||
end
|
end
|
||||||
|
|
||||||
local function doDialog(dialog)
|
local function doDialog(dialog)
|
||||||
|
|
@ -521,7 +523,7 @@ end
|
||||||
local function addDialog(dialog)
|
local function addDialog(dialog)
|
||||||
if dialog.Parent then
|
if dialog.Parent then
|
||||||
if dialog.Parent:IsA "BasePart" then
|
if dialog.Parent:IsA "BasePart" then
|
||||||
local chatGui = New(chatNotificationGui:clone()) {
|
local chatGui = Hydrate(chatNotificationGui:Clone()) {
|
||||||
Enabled = not dialog.InUse,
|
Enabled = not dialog.InUse,
|
||||||
Adornee = dialog.Parent,
|
Adornee = dialog.Parent,
|
||||||
RobloxLocked = true,
|
RobloxLocked = true,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
-- RbxGui
|
-- RbxGui
|
||||||
print "[Mercury]: Loaded corescript 45284430"
|
print "[Mercury]: Loaded corescript 45284430"
|
||||||
|
|
||||||
local New = require "../Modules/New"
|
local News = require "../Modules/New"
|
||||||
|
local New = News.New
|
||||||
|
local Hydrate = News.Hydrate
|
||||||
|
|
||||||
local RbxGui = {}
|
local RbxGui = {}
|
||||||
|
|
||||||
|
|
@ -16,7 +18,7 @@ local function ScopedConnect(
|
||||||
local eventConnection
|
local eventConnection
|
||||||
|
|
||||||
--Connection on parentInstance is scoped by parentInstance (when destroyed, it goes away)
|
--Connection on parentInstance is scoped by parentInstance (when destroyed, it goes away)
|
||||||
local tryConnect = function()
|
local function tryConnect()
|
||||||
if game:IsAncestorOf(parentInstance) then
|
if game:IsAncestorOf(parentInstance) then
|
||||||
--Entering the world, make sure we are connected/synced
|
--Entering the world, make sure we are connected/synced
|
||||||
if not eventConnection then
|
if not eventConnection then
|
||||||
|
|
@ -53,26 +55,25 @@ local function getScreenGuiAncestor(instance)
|
||||||
return localInstance
|
return localInstance
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function Colour3(r, g, b)
|
||||||
|
return Color3.new(r / 255, g / 255, b / 255)
|
||||||
|
end
|
||||||
|
|
||||||
local function CreateButtons(frame, buttons, yPos, ySize)
|
local function CreateButtons(frame, buttons, yPos, ySize)
|
||||||
local buttonNum = 1
|
local buttonNum = 1
|
||||||
local buttonObjs = {}
|
local buttonObjs = {}
|
||||||
for _, obj in ipairs(buttons) do
|
for _, obj in ipairs(buttons) do
|
||||||
local button = Instance.new "TextButton"
|
buttonObjs[buttonNum] = New "TextButton" {
|
||||||
button.Name = "Button" .. buttonNum
|
Name = "Button" .. buttonNum,
|
||||||
button.Font = Enum.Font.Arial
|
Font = Enum.Font.Arial,
|
||||||
button.FontSize = Enum.FontSize.Size18
|
FontSize = Enum.FontSize.Size18,
|
||||||
button.AutoButtonColor = true
|
AutoButtonColor = true,
|
||||||
button.Modal = true
|
Modal = true,
|
||||||
if obj.Style then
|
Style = obj.Style or Enum.ButtonStyle.RobloxButton,
|
||||||
button.Style = obj.Style
|
Text = obj.Text,
|
||||||
else
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
button.Style = Enum.ButtonStyle.RobloxButton
|
Parent = frame,
|
||||||
end
|
}
|
||||||
button.Text = obj.Text
|
|
||||||
button.TextColor3 = Color3.new(1, 1, 1)
|
|
||||||
button.MouseButton1Click:connect(obj.Function)
|
|
||||||
button.Parent = frame
|
|
||||||
buttonObjs[buttonNum] = button
|
|
||||||
|
|
||||||
buttonNum += 1
|
buttonNum += 1
|
||||||
end
|
end
|
||||||
|
|
@ -151,7 +152,7 @@ RbxGui.CreateStyledMessageDialog = function(title, message, style, buttons)
|
||||||
Text = title,
|
Text = title,
|
||||||
TextStrokeTransparency = 0,
|
TextStrokeTransparency = 0,
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
TextColor3 = Color3.new(221 / 255, 221 / 255, 221 / 255),
|
TextColor3 = Colour3(221, 221, 221),
|
||||||
Position = UDim2.new(0, 80, 0, 0),
|
Position = UDim2.new(0, 80, 0, 0),
|
||||||
Size = UDim2.new(1, -80, 0, 40),
|
Size = UDim2.new(1, -80, 0, 40),
|
||||||
Font = Enum.Font.ArialBold,
|
Font = Enum.Font.ArialBold,
|
||||||
|
|
@ -163,7 +164,7 @@ RbxGui.CreateStyledMessageDialog = function(title, message, style, buttons)
|
||||||
Name = "Message",
|
Name = "Message",
|
||||||
Text = message,
|
Text = message,
|
||||||
TextStrokeTransparency = 0,
|
TextStrokeTransparency = 0,
|
||||||
TextColor3 = Color3.new(221 / 255, 221 / 255, 221 / 255),
|
TextColor3 = Colour3(221, 221, 221),
|
||||||
Position = UDim2.new(0.025, 80, 0, 45),
|
Position = UDim2.new(0.025, 80, 0, 45),
|
||||||
Size = UDim2.new(0.95, -80, 0, 55),
|
Size = UDim2.new(0.95, -80, 0, 55),
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
|
|
@ -211,7 +212,7 @@ RbxGui.CreateMessageDialog = function(title, message, buttons)
|
||||||
Name = "Title",
|
Name = "Title",
|
||||||
Text = title,
|
Text = title,
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
TextColor3 = Color3.new(221 / 255, 221 / 255, 221 / 255),
|
TextColor3 = Colour3(221, 221, 221),
|
||||||
Position = UDim2.new(0, 0, 0, 0),
|
Position = UDim2.new(0, 0, 0, 0),
|
||||||
Size = UDim2.new(1, 0, 0.15, 0),
|
Size = UDim2.new(1, 0, 0.15, 0),
|
||||||
Font = Enum.Font.ArialBold,
|
Font = Enum.Font.ArialBold,
|
||||||
|
|
@ -222,7 +223,7 @@ RbxGui.CreateMessageDialog = function(title, message, buttons)
|
||||||
New "TextLabel" {
|
New "TextLabel" {
|
||||||
Name = "Message",
|
Name = "Message",
|
||||||
Text = message,
|
Text = message,
|
||||||
TextColor3 = Color3.new(221 / 255, 221 / 255, 221 / 255),
|
TextColor3 = Colour3(221, 221, 221),
|
||||||
Position = UDim2.new(0.025, 0, 0.175, 0),
|
Position = UDim2.new(0.025, 0, 0.175, 0),
|
||||||
Size = UDim2.new(0.95, 0, 0.55, 0),
|
Size = UDim2.new(0.95, 0, 0.55, 0),
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
|
|
@ -552,7 +553,7 @@ RbxGui.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||||
|
|
||||||
for _, item in ipairs(items) do
|
for _, item in ipairs(items) do
|
||||||
-- needed to maintain local scope for items in event listeners below
|
-- needed to maintain local scope for items in event listeners below
|
||||||
local button = choiceButton:clone()
|
local button = choiceButton:Clone()
|
||||||
if forRoblox then
|
if forRoblox then
|
||||||
button.RobloxLocked = true
|
button.RobloxLocked = true
|
||||||
end
|
end
|
||||||
|
|
@ -857,7 +858,7 @@ RbxGui.CreateSlider = function(steps, width, position)
|
||||||
else
|
else
|
||||||
bar.Size = UDim2.new(0, 200, 0, 5)
|
bar.Size = UDim2.new(0, 200, 0, 5)
|
||||||
end
|
end
|
||||||
bar.BorderColor3 = Color3.new(95 / 255, 95 / 255, 95 / 255)
|
bar.BorderColor3 = Colour3(95, 95, 95)
|
||||||
bar.ZIndex = 2
|
bar.ZIndex = 2
|
||||||
bar.Parent = sliderGui
|
bar.Parent = sliderGui
|
||||||
|
|
||||||
|
|
@ -994,7 +995,7 @@ RbxGui.CreateTrueScrollingFrame = function()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local scrollDownButton = scrollUpButton:clone()
|
local scrollDownButton = scrollUpButton:Clone()
|
||||||
scrollDownButton.Name = "ScrollDownButton"
|
scrollDownButton.Name = "ScrollDownButton"
|
||||||
scrollDownButton.Position = UDim2.new(0, 0, 1, -18)
|
scrollDownButton.Position = UDim2.new(0, 0, 1, -18)
|
||||||
local downChildren = scrollDownButton:GetChildren()
|
local downChildren = scrollDownButton:GetChildren()
|
||||||
|
|
@ -1047,11 +1048,11 @@ RbxGui.CreateTrueScrollingFrame = function()
|
||||||
scrollNub.BackgroundTransparency = 0.5
|
scrollNub.BackgroundTransparency = 0.5
|
||||||
scrollNub.Parent = scrollbar
|
scrollNub.Parent = scrollbar
|
||||||
|
|
||||||
local newNub = scrollNub:clone()
|
local newNub = scrollNub:Clone()
|
||||||
newNub.Position = UDim2.new(0.5, -5, 0.5, -2)
|
newNub.Position = UDim2.new(0.5, -5, 0.5, -2)
|
||||||
newNub.Parent = scrollbar
|
newNub.Parent = scrollbar
|
||||||
|
|
||||||
local lastNub = scrollNub:clone()
|
local lastNub = scrollNub:Clone()
|
||||||
lastNub.Position = UDim2.new(0.5, -5, 0.5, 2)
|
lastNub.Position = UDim2.new(0.5, -5, 0.5, 2)
|
||||||
lastNub.Parent = scrollbar
|
lastNub.Parent = scrollbar
|
||||||
|
|
||||||
|
|
@ -2170,16 +2171,17 @@ end
|
||||||
RbxGui.AutoTruncateTextObject = function(textLabel)
|
RbxGui.AutoTruncateTextObject = function(textLabel)
|
||||||
local text = textLabel.Text
|
local text = textLabel.Text
|
||||||
|
|
||||||
local fullLabel = textLabel:Clone()
|
local fullLabel = Hydrate(textLabel:Clone()) {
|
||||||
fullLabel.Name = "Full" .. textLabel.Name
|
Name = "Full" .. textLabel.Name,
|
||||||
fullLabel.BorderSizePixel = 0
|
BorderSizePixel = 0,
|
||||||
fullLabel.BackgroundTransparency = 0
|
BackgroundTransparency = 0,
|
||||||
fullLabel.Text = text
|
Text = text,
|
||||||
fullLabel.TextXAlignment = Enum.TextXAlignment.Center
|
TextXAlignment = Enum.TextXAlignment.Center,
|
||||||
fullLabel.Position = UDim2.new(0, -3, 0, 0)
|
Position = UDim2.new(0, -3, 0, 0),
|
||||||
fullLabel.Size = UDim2.new(0, 100, 1, 0)
|
Size = UDim2.new(0, 100, 1, 0),
|
||||||
fullLabel.Visible = false
|
Visible = false,
|
||||||
fullLabel.Parent = textLabel
|
Parent = textLabel,
|
||||||
|
}
|
||||||
|
|
||||||
local shortText
|
local shortText
|
||||||
local mouseEnterConnection
|
local mouseEnterConnection
|
||||||
|
|
@ -2356,15 +2358,12 @@ RbxGui.CreateTutorial = function(name, tutorialKey, createButtons)
|
||||||
|
|
||||||
local function getVisiblePageAndHideOthers()
|
local function getVisiblePageAndHideOthers()
|
||||||
local visiblePage
|
local visiblePage
|
||||||
local children = pages:GetChildren()
|
for _, child in ipairs(pages:GetChildren() or {}) do
|
||||||
if children then
|
if child.Visible then
|
||||||
for _, child in ipairs(children) do
|
if visiblePage then
|
||||||
if child.Visible then
|
child.Visible = false
|
||||||
if visiblePage then
|
else
|
||||||
child.Visible = false
|
visiblePage = child
|
||||||
else
|
|
||||||
visiblePage = child
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -2521,11 +2520,8 @@ local function CreateBasicTutorialPage(
|
||||||
Parent = frame,
|
Parent = frame,
|
||||||
}
|
}
|
||||||
|
|
||||||
if giveDoneButton then
|
innerFrame.Size = giveDoneButton and UDim2.new(1, 0, 1, -75)
|
||||||
innerFrame.Size = UDim2.new(1, 0, 1, -75)
|
or UDim2.new(1, 0, 1, -22)
|
||||||
else
|
|
||||||
innerFrame.Size = UDim2.new(1, 0, 1, -22)
|
|
||||||
end
|
|
||||||
|
|
||||||
local parentConnection
|
local parentConnection
|
||||||
|
|
||||||
|
|
@ -2837,7 +2833,7 @@ RbxGui.CreateSetPanel = function(
|
||||||
Parent = waterFrame,
|
Parent = waterFrame,
|
||||||
}
|
}
|
||||||
|
|
||||||
local waterForceDirLabel = New(waterForceLabel:Clone()) {
|
local waterForceDirLabel = Hydrate(waterForceLabel:Clone()) {
|
||||||
Name = "WaterForceDirectionLabel",
|
Name = "WaterForceDirectionLabel",
|
||||||
Text = "Water Force Direction",
|
Text = "Water Force Direction",
|
||||||
Position = UDim2.new(0, 0, 0, 50),
|
Position = UDim2.new(0, 0, 0, 50),
|
||||||
|
|
@ -2943,7 +2939,7 @@ RbxGui.CreateSetPanel = function(
|
||||||
Size = UDim2.new(0, 3, 0.9, 0),
|
Size = UDim2.new(0, 3, 0.9, 0),
|
||||||
ZIndex = 6,
|
ZIndex = 6,
|
||||||
},
|
},
|
||||||
New(setsLists) {
|
Hydrate(setsLists) {
|
||||||
Size = UDim2.new(1, -6, 0.94, 0),
|
Size = UDim2.new(1, -6, 0.94, 0),
|
||||||
Position = UDim2.new(0, 0, 0.06, 0),
|
Position = UDim2.new(0, 0, 0.06, 0),
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
|
|
@ -3015,7 +3011,7 @@ RbxGui.CreateSetPanel = function(
|
||||||
end
|
end
|
||||||
|
|
||||||
local function buildSetButton(name, setId, _, _, _)
|
local function buildSetButton(name, setId, _, _, _)
|
||||||
return New(createSetButton(name)) {
|
return Hydrate(createSetButton(name)) {
|
||||||
Text = name,
|
Text = name,
|
||||||
Name = "SetButton",
|
Name = "SetButton",
|
||||||
Visible = true,
|
Visible = true,
|
||||||
|
|
@ -3106,7 +3102,7 @@ RbxGui.CreateSetPanel = function(
|
||||||
Parent = button,
|
Parent = button,
|
||||||
}
|
}
|
||||||
|
|
||||||
New(buttonImage:Clone()) {
|
Hydrate(buttonImage:Clone()) {
|
||||||
Name = "ConfigIcon",
|
Name = "ConfigIcon",
|
||||||
Visible = false,
|
Visible = false,
|
||||||
Position = UDim2.new(1, -23, 1, -24),
|
Position = UDim2.new(1, -23, 1, -24),
|
||||||
|
|
@ -3556,7 +3552,7 @@ RbxGui.CreateSetPanel = function(
|
||||||
)
|
)
|
||||||
|
|
||||||
local scrollFrame, controlFrame = RbxGui.CreateTrueScrollingFrame()
|
local scrollFrame, controlFrame = RbxGui.CreateTrueScrollingFrame()
|
||||||
New(scrollFrame) {
|
Hydrate(scrollFrame) {
|
||||||
Size = UDim2.new(0.54, 0, 0.85, 0),
|
Size = UDim2.new(0.54, 0, 0.85, 0),
|
||||||
Position = UDim2.new(0.24, 0, 0.085, 0),
|
Position = UDim2.new(0.24, 0, 0.085, 0),
|
||||||
Name = "ItemsFrame",
|
Name = "ItemsFrame",
|
||||||
|
|
@ -3640,86 +3636,60 @@ RbxGui.CreateSetPanel = function(
|
||||||
waterTypeChangedEvent
|
waterTypeChangedEvent
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local cm = Enum.CellMaterial
|
||||||
|
local EnumMaterialNames = {
|
||||||
|
[cm.Grass] = "Grass",
|
||||||
|
[cm.Sand] = "Sand",
|
||||||
|
[cm.Empty] = "Erase",
|
||||||
|
[cm.Brick] = "Brick",
|
||||||
|
[cm.Granite] = "Granite",
|
||||||
|
[cm.Asphalt] = "Asphalt",
|
||||||
|
[cm.Iron] = "Iron",
|
||||||
|
[cm.Aluminum] = "Aluminum",
|
||||||
|
[cm.Gold] = "Gold",
|
||||||
|
[cm.WoodPlank] = "Plank",
|
||||||
|
[cm.WoodLog] = "Log",
|
||||||
|
[cm.Gravel] = "Gravel",
|
||||||
|
[cm.CinderBlock] = "Cinder Block",
|
||||||
|
[cm.MossyStone] = "Stone Wall",
|
||||||
|
[cm.Cement] = "Concrete",
|
||||||
|
[cm.RedPlastic] = "Plastic (red)",
|
||||||
|
[cm.BluePlastic] = "Plastic (blue)",
|
||||||
|
[cm.Water] = "Water",
|
||||||
|
}
|
||||||
|
|
||||||
|
local MaterialNames = {
|
||||||
|
"Grass",
|
||||||
|
"Sand",
|
||||||
|
"Erase",
|
||||||
|
"Brick",
|
||||||
|
"Granite",
|
||||||
|
"Asphalt",
|
||||||
|
"Iron",
|
||||||
|
"Aluminum",
|
||||||
|
"Gold",
|
||||||
|
"Plank",
|
||||||
|
"Log",
|
||||||
|
"Gravel",
|
||||||
|
"Cinder Block",
|
||||||
|
"Stone Wall",
|
||||||
|
"Concrete",
|
||||||
|
"Plastic (red)",
|
||||||
|
"Plastic (blue)",
|
||||||
|
"Water",
|
||||||
|
}
|
||||||
|
|
||||||
|
local StringChoices = {}
|
||||||
|
for k, v in pairs(EnumMaterialNames) do
|
||||||
|
StringChoices[v] = k
|
||||||
|
end
|
||||||
|
|
||||||
local function getEnumFromName(choice)
|
local function getEnumFromName(choice)
|
||||||
if choice == "Grass" then
|
return StringChoices[choice]
|
||||||
return 1
|
|
||||||
elseif choice == "Sand" then
|
|
||||||
return 2
|
|
||||||
elseif choice == "Erase" then
|
|
||||||
return 0
|
|
||||||
elseif choice == "Brick" then
|
|
||||||
return 3
|
|
||||||
elseif choice == "Granite" then
|
|
||||||
return 4
|
|
||||||
elseif choice == "Asphalt" then
|
|
||||||
return 5
|
|
||||||
elseif choice == "Iron" then
|
|
||||||
return 6
|
|
||||||
elseif choice == "Aluminum" then
|
|
||||||
return 7
|
|
||||||
elseif choice == "Gold" then
|
|
||||||
return 8
|
|
||||||
elseif choice == "Plank" then
|
|
||||||
return 9
|
|
||||||
elseif choice == "Log" then
|
|
||||||
return 10
|
|
||||||
elseif choice == "Gravel" then
|
|
||||||
return 11
|
|
||||||
elseif choice == "Cinder Block" then
|
|
||||||
return 12
|
|
||||||
elseif choice == "Stone Wall" then
|
|
||||||
return 13
|
|
||||||
elseif choice == "Concrete" then
|
|
||||||
return 14
|
|
||||||
elseif choice == "Plastic (red)" then
|
|
||||||
return 15
|
|
||||||
elseif choice == "Plastic (blue)" then
|
|
||||||
return 16
|
|
||||||
elseif choice == "Water" then
|
|
||||||
return 17
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function getNameFromEnum(choice)
|
local function getNameFromEnum(choice)
|
||||||
if choice == Enum.CellMaterial.Grass or choice == 1 then
|
return EnumMaterialNames[choice] or MaterialNames[choice]
|
||||||
return "Grass"
|
|
||||||
elseif choice == Enum.CellMaterial.Sand or choice == 2 then
|
|
||||||
return "Sand"
|
|
||||||
elseif choice == Enum.CellMaterial.Empty or choice == 0 then
|
|
||||||
return "Erase"
|
|
||||||
elseif choice == Enum.CellMaterial.Brick or choice == 3 then
|
|
||||||
return "Brick"
|
|
||||||
elseif choice == Enum.CellMaterial.Granite or choice == 4 then
|
|
||||||
return "Granite"
|
|
||||||
elseif choice == Enum.CellMaterial.Asphalt or choice == 5 then
|
|
||||||
return "Asphalt"
|
|
||||||
elseif choice == Enum.CellMaterial.Iron or choice == 6 then
|
|
||||||
return "Iron"
|
|
||||||
elseif choice == Enum.CellMaterial.Aluminum or choice == 7 then
|
|
||||||
return "Aluminum"
|
|
||||||
elseif choice == Enum.CellMaterial.Gold or choice == 8 then
|
|
||||||
return "Gold"
|
|
||||||
elseif choice == Enum.CellMaterial.WoodPlank or choice == 9 then
|
|
||||||
return "Plank"
|
|
||||||
elseif choice == Enum.CellMaterial.WoodLog or choice == 10 then
|
|
||||||
return "Log"
|
|
||||||
elseif choice == Enum.CellMaterial.Gravel or choice == 11 then
|
|
||||||
return "Gravel"
|
|
||||||
elseif choice == Enum.CellMaterial.CinderBlock or choice == 12 then
|
|
||||||
return "Cinder Block"
|
|
||||||
elseif choice == Enum.CellMaterial.MossyStone or choice == 13 then
|
|
||||||
return "Stone Wall"
|
|
||||||
elseif choice == Enum.CellMaterial.Cement or choice == 14 then
|
|
||||||
return "Concrete"
|
|
||||||
elseif choice == Enum.CellMaterial.RedPlastic or choice == 15 then
|
|
||||||
return "Plastic (red)"
|
|
||||||
elseif choice == Enum.CellMaterial.BluePlastic or choice == 16 then
|
|
||||||
return "Plastic (blue)"
|
|
||||||
elseif choice == Enum.CellMaterial.Water or choice == 17 then
|
|
||||||
return "Water"
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.CreateTerrainMaterialSelector = function(size, position)
|
RbxGui.CreateTerrainMaterialSelector = function(size, position)
|
||||||
|
|
@ -3741,25 +3711,6 @@ RbxGui.CreateTerrainMaterialSelector = function(size, position)
|
||||||
terrainMaterialSelectionChanged.Parent = frame
|
terrainMaterialSelectionChanged.Parent = frame
|
||||||
|
|
||||||
local materialToImageMap = {}
|
local materialToImageMap = {}
|
||||||
local materialNames = {
|
|
||||||
"Grass",
|
|
||||||
"Sand",
|
|
||||||
"Brick",
|
|
||||||
"Granite",
|
|
||||||
"Asphalt",
|
|
||||||
"Iron",
|
|
||||||
"Aluminum",
|
|
||||||
"Gold",
|
|
||||||
"Plank",
|
|
||||||
"Log",
|
|
||||||
"Gravel",
|
|
||||||
"Cinder Block",
|
|
||||||
"Stone Wall",
|
|
||||||
"Concrete",
|
|
||||||
"Plastic (red)",
|
|
||||||
"Plastic (blue)",
|
|
||||||
"Water",
|
|
||||||
}
|
|
||||||
|
|
||||||
local currentMaterial = 1
|
local currentMaterial = 1
|
||||||
|
|
||||||
|
|
@ -3768,46 +3719,31 @@ RbxGui.CreateTerrainMaterialSelector = function(size, position)
|
||||||
terrainMaterialSelectionChanged:Fire(currentMaterial)
|
terrainMaterialSelectionChanged:Fire(currentMaterial)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- we so need a better way to do this
|
for _, v in pairs(MaterialNames) do
|
||||||
for _, v in pairs(materialNames) do
|
local materials = {
|
||||||
local toAdd
|
Grass = 56563112,
|
||||||
if v == "Grass" then
|
Sand = 62356652,
|
||||||
toAdd = 56563112
|
Brick = 65961537,
|
||||||
elseif v == "Sand" then
|
Granite = 67532153,
|
||||||
toAdd = 62356652
|
Asphalt = 67532038,
|
||||||
elseif v == "Brick" then
|
Iron = 67532093,
|
||||||
toAdd = 65961537
|
Aluminum = 67531995,
|
||||||
elseif v == "Granite" then
|
Gold = 67532118,
|
||||||
toAdd = 67532153
|
["Plastic (red)"] = 67531848,
|
||||||
elseif v == "Asphalt" then
|
["Plastic (blue)"] = 67531924,
|
||||||
toAdd = 67532038
|
Plank = 67532015,
|
||||||
elseif v == "Iron" then
|
Log = 67532051,
|
||||||
toAdd = 67532093
|
Gravel = 67532206,
|
||||||
elseif v == "Aluminum" then
|
["Cinder Block"] = 67532103,
|
||||||
toAdd = 67531995
|
["Stone Wall"] = 67531804,
|
||||||
elseif v == "Gold" then
|
Concrete = 67532059,
|
||||||
toAdd = 67532118
|
Water = 81407474,
|
||||||
elseif v == "Plastic (red)" then
|
}
|
||||||
toAdd = 67531848
|
local toAdd = materials[v]
|
||||||
elseif v == "Plastic (blue)" then
|
if not toAdd then
|
||||||
toAdd = 67531924
|
toAdd = 66887593
|
||||||
elseif v == "Plank" then
|
|
||||||
toAdd = 67532015
|
|
||||||
elseif v == "Log" then
|
|
||||||
toAdd = 67532051
|
|
||||||
elseif v == "Gravel" then
|
|
||||||
toAdd = 67532206
|
|
||||||
elseif v == "Cinder Block" then
|
|
||||||
toAdd = 67532103
|
|
||||||
elseif v == "Stone Wall" then
|
|
||||||
toAdd = 67531804
|
|
||||||
elseif v == "Concrete" then
|
|
||||||
toAdd = 67532059
|
|
||||||
elseif v == "Water" then
|
|
||||||
toAdd = 81407474
|
|
||||||
else
|
|
||||||
toAdd = 66887593 -- fill in the rest here!!
|
|
||||||
end
|
end
|
||||||
|
|
||||||
materialToImageMap[v] =
|
materialToImageMap[v] =
|
||||||
{ Regular = `http://banland.xyz/asset/?id={toAdd}` }
|
{ Regular = `http://banland.xyz/asset/?id={toAdd}` }
|
||||||
end
|
end
|
||||||
|
|
@ -3875,10 +3811,10 @@ RbxGui.CreateTerrainMaterialSelector = function(size, position)
|
||||||
return buttonWrap
|
return buttonWrap
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, #materialNames do
|
for i = 1, #MaterialNames do
|
||||||
local imageButton = createMaterialButton(materialNames[i])
|
local imageButton = createMaterialButton(MaterialNames[i])
|
||||||
|
|
||||||
if materialNames[i] == "Grass" then -- always start with grass as the default
|
if MaterialNames[i] == "Grass" then -- always start with grass as the default
|
||||||
selectedButton = imageButton
|
selectedButton = imageButton
|
||||||
imageButton.BackgroundTransparency = 0
|
imageButton.BackgroundTransparency = 0
|
||||||
end
|
end
|
||||||
|
|
@ -3886,11 +3822,8 @@ RbxGui.CreateTerrainMaterialSelector = function(size, position)
|
||||||
imageButton.Parent = scrollFrame
|
imageButton.Parent = scrollFrame
|
||||||
end
|
end
|
||||||
|
|
||||||
local forceTerrainMaterialSelection = function(newMaterialType)
|
local function forceTerrainMaterialSelection(newMaterialType)
|
||||||
if not newMaterialType then
|
if not newMaterialType or currentMaterial == newMaterialType then
|
||||||
return
|
|
||||||
end
|
|
||||||
if currentMaterial == newMaterialType then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -3898,23 +3831,16 @@ RbxGui.CreateTerrainMaterialSelector = function(size, position)
|
||||||
local buttons = scrollFrame:GetChildren()
|
local buttons = scrollFrame:GetChildren()
|
||||||
for i = 1, #buttons do
|
for i = 1, #buttons do
|
||||||
if
|
if
|
||||||
buttons[i].Name == "Plastic (blue)"
|
(
|
||||||
and matName == "Plastic (blue)"
|
buttons[i].Name == "Plastic (blue)"
|
||||||
|
and matName == "Plastic (blue)"
|
||||||
|
)
|
||||||
|
or (buttons[i].Name == "Plastic (red)" and matName == "Plastic (red)")
|
||||||
|
or string.find(buttons[i].Name, matName)
|
||||||
then
|
then
|
||||||
goToNewMaterial(buttons[i], matName)
|
goToNewMaterial(buttons[i], matName)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if
|
|
||||||
buttons[i].Name == "Plastic (red)"
|
|
||||||
and matName == "Plastic (red)"
|
|
||||||
then
|
|
||||||
goToNewMaterial(buttons[i], matName)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if string.find(buttons[i].Name, matName) then
|
|
||||||
goToNewMaterial(buttons[i], matName)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -3948,21 +3874,13 @@ RbxGui.CreateLoadingFrame = function(name, size, position)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if size then
|
loadingFrame.Size = size or UDim2.new(0, 300, 0, 160)
|
||||||
loadingFrame.Size = size
|
loadingFrame.Position = position or UDim2.new(0.5, -150, 0.5, -80)
|
||||||
else
|
|
||||||
loadingFrame.Size = UDim2.new(0, 300, 0, 160)
|
|
||||||
end
|
|
||||||
if position then
|
|
||||||
loadingFrame.Position = position
|
|
||||||
else
|
|
||||||
loadingFrame.Position = UDim2.new(0.5, -150, 0.5, -80)
|
|
||||||
end
|
|
||||||
|
|
||||||
local loadingBar = New "Frame" {
|
local loadingBar = New "Frame" {
|
||||||
Name = "LoadingBar",
|
Name = "LoadingBar",
|
||||||
BackgroundColor3 = Color3.new(0, 0, 0),
|
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||||
BorderColor3 = Color3.new(79 / 255, 79 / 255, 79 / 255),
|
BorderColor3 = Colour3(79, 79, 79),
|
||||||
Position = UDim2.new(0, 0, 0, 41),
|
Position = UDim2.new(0, 0, 0, 41),
|
||||||
Size = UDim2.new(1, 0, 0, 30),
|
Size = UDim2.new(1, 0, 0, 30),
|
||||||
Parent = loadingFrame,
|
Parent = loadingFrame,
|
||||||
|
|
@ -4096,7 +4014,7 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
Text = text,
|
Text = text,
|
||||||
TextColor3 = Color3.new(1, 1, 1),
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
BorderSizePixel = 0,
|
BorderSizePixel = 0,
|
||||||
BackgroundColor3 = Color3.new(20 / 255, 20 / 255, 20 / 255),
|
BackgroundColor3 = Colour3(20, 20, 20),
|
||||||
}
|
}
|
||||||
|
|
||||||
button.MouseEnter:connect(function()
|
button.MouseEnter:connect(function()
|
||||||
|
|
@ -4119,7 +4037,7 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
|
|
||||||
local dragBar = New "ImageButton" {
|
local dragBar = New "ImageButton" {
|
||||||
Name = `{name}DragBar`,
|
Name = `{name}DragBar`,
|
||||||
BackgroundColor3 = Color3.new(39 / 255, 39 / 255, 39 / 255),
|
BackgroundColor3 = Colour3(39, 39, 39),
|
||||||
BorderColor3 = Color3.new(0, 0, 0),
|
BorderColor3 = Color3.new(0, 0, 0),
|
||||||
Active = true,
|
Active = true,
|
||||||
Draggable = true,
|
Draggable = true,
|
||||||
|
|
@ -4147,10 +4065,10 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
end
|
end
|
||||||
--dragBar.Visible = false
|
--dragBar.Visible = false
|
||||||
dragBar.MouseEnter:connect(function()
|
dragBar.MouseEnter:connect(function()
|
||||||
dragBar.BackgroundColor3 = Color3.new(49 / 255, 49 / 255, 49 / 255)
|
dragBar.BackgroundColor3 = Colour3(49, 49, 49)
|
||||||
end)
|
end)
|
||||||
dragBar.MouseLeave:connect(function()
|
dragBar.MouseLeave:connect(function()
|
||||||
dragBar.BackgroundColor3 = Color3.new(39 / 255, 39 / 255, 39 / 255)
|
dragBar.BackgroundColor3 = Colour3(39, 39, 39)
|
||||||
end)
|
end)
|
||||||
dragBar.Parent = parent
|
dragBar.Parent = parent
|
||||||
|
|
||||||
|
|
@ -4230,7 +4148,7 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
|
|
||||||
local minimizeFrame = New "Frame" {
|
local minimizeFrame = New "Frame" {
|
||||||
Name = "MinimizeFrame",
|
Name = "MinimizeFrame",
|
||||||
BackgroundColor3 = Color3.new(73 / 255, 73 / 255, 73 / 255),
|
BackgroundColor3 = Colour3(73, 73, 73),
|
||||||
BorderColor3 = Color3.new(0, 0, 0),
|
BorderColor3 = Color3.new(0, 0, 0),
|
||||||
Position = UDim2.new(0, 0, 1, 0),
|
Position = UDim2.new(0, 0, 1, 0),
|
||||||
Visible = false,
|
Visible = false,
|
||||||
|
|
@ -4257,14 +4175,14 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
|
|
||||||
local separatingLine = New "Frame" {
|
local separatingLine = New "Frame" {
|
||||||
Name = "SeparatingLine",
|
Name = "SeparatingLine",
|
||||||
BackgroundColor3 = Color3.new(115 / 255, 115 / 255, 115 / 255),
|
BackgroundColor3 = Colour3(115, 115, 115),
|
||||||
BorderSizePixel = 0,
|
BorderSizePixel = 0,
|
||||||
Position = UDim2.new(1, -18, 0.5, -7),
|
Position = UDim2.new(1, -18, 0.5, -7),
|
||||||
Size = UDim2.new(0, 1, 0, 14),
|
Size = UDim2.new(0, 1, 0, 14),
|
||||||
Parent = dragBar,
|
Parent = dragBar,
|
||||||
}
|
}
|
||||||
-- otherSeparatingLine
|
-- otherSeparatingLine
|
||||||
New(separatingLine:clone()) {
|
Hydrate(separatingLine:Clone()) {
|
||||||
Position = UDim2.new(1, -35, 0.5, -7),
|
Position = UDim2.new(1, -35, 0.5, -7),
|
||||||
Parent = dragBar,
|
Parent = dragBar,
|
||||||
}
|
}
|
||||||
|
|
@ -4277,8 +4195,7 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
}
|
}
|
||||||
if not scrollable then
|
if not scrollable then
|
||||||
widgetContainer.BackgroundTransparency = 0
|
widgetContainer.BackgroundTransparency = 0
|
||||||
widgetContainer.BackgroundColor3 =
|
widgetContainer.BackgroundColor3 = Colour3(72, 72, 72)
|
||||||
Color3.new(72 / 255, 72 / 255, 72 / 255)
|
|
||||||
end
|
end
|
||||||
widgetContainer.Parent = dragBar
|
widgetContainer.Parent = dragBar
|
||||||
|
|
||||||
|
|
@ -4308,15 +4225,15 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
if scrollable then
|
if scrollable then
|
||||||
--frame for widgets
|
--frame for widgets
|
||||||
frame, control = RbxGui.CreateTrueScrollingFrame()
|
frame, control = RbxGui.CreateTrueScrollingFrame()
|
||||||
New(frame) {
|
Hydrate(frame) {
|
||||||
Size = UDim2.new(1, 0, 1, 0),
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
BackgroundColor3 = Color3.new(72 / 255, 72 / 255, 72 / 255),
|
BackgroundColor3 = Colour3(72, 72, 72),
|
||||||
BorderColor3 = Color3.new(0, 0, 0),
|
BorderColor3 = Color3.new(0, 0, 0),
|
||||||
Active = true,
|
Active = true,
|
||||||
Parent = widgetContainer,
|
Parent = widgetContainer,
|
||||||
}
|
}
|
||||||
New(control) {
|
Hydrate(control) {
|
||||||
BackgroundColor3 = Color3.new(72 / 255, 72 / 255, 72 / 255),
|
BackgroundColor3 = Colour3(72, 72, 72),
|
||||||
BorderSizePixel = 0,
|
BorderSizePixel = 0,
|
||||||
BackgroundTransparency = 0,
|
BackgroundTransparency = 0,
|
||||||
Position = UDim2.new(1, -21, 1, 1),
|
Position = UDim2.new(1, -21, 1, 1),
|
||||||
|
|
@ -4338,37 +4255,36 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
|
|
||||||
control.Parent = dragBar
|
control.Parent = dragBar
|
||||||
|
|
||||||
|
local function scrubFrame()
|
||||||
|
return New "Frame" {
|
||||||
|
Name = "ScrubFrame",
|
||||||
|
BackgroundColor3 = Color3.new(1, 1, 1),
|
||||||
|
BorderSizePixel = 0,
|
||||||
|
Size = UDim2.new(0, 10, 0, 1),
|
||||||
|
ZIndex = 5,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
verticalDragger = New "TextButton" {
|
verticalDragger = New "TextButton" {
|
||||||
ZIndex = 2,
|
ZIndex = 2,
|
||||||
AutoButtonColor = false,
|
AutoButtonColor = false,
|
||||||
Name = "VerticalDragger",
|
Name = "VerticalDragger",
|
||||||
BackgroundColor3 = Color3.new(50 / 255, 50 / 255, 50 / 255),
|
BackgroundColor3 = Colour3(50, 50, 50),
|
||||||
BorderColor3 = Color3.new(0, 0, 0),
|
BorderColor3 = Color3.new(0, 0, 0),
|
||||||
Size = UDim2.new(1, 20, 0, 20),
|
Size = UDim2.new(1, 20, 0, 20),
|
||||||
Position = UDim2.new(0, 0, 1, 0),
|
Position = UDim2.new(0, 0, 1, 0),
|
||||||
Active = true,
|
Active = true,
|
||||||
Text = "",
|
Text = "",
|
||||||
Parent = widgetContainer,
|
Parent = widgetContainer,
|
||||||
}
|
Hydrate(scrubFrame()) {
|
||||||
|
Position = UDim2.new(0.5, -5, 0.5, -2),
|
||||||
local scrubFrame = New "Frame" {
|
},
|
||||||
Name = "ScrubFrame",
|
Hydrate(scrubFrame()) {
|
||||||
BackgroundColor3 = Color3.new(1, 1, 1),
|
Position = UDim2.new(0.5, -5, 0.5, 0),
|
||||||
BorderSizePixel = 0,
|
},
|
||||||
Position = UDim2.new(0.5, -5, 0.5, 0),
|
Hydrate(scrubFrame()) {
|
||||||
Size = UDim2.new(0, 10, 0, 1),
|
Position = UDim2.new(0.5, -5, 0.5, 2),
|
||||||
ZIndex = 5,
|
},
|
||||||
Parent = verticalDragger,
|
|
||||||
}
|
|
||||||
-- scrubTwo
|
|
||||||
New(scrubFrame:clone()) {
|
|
||||||
Position = UDim2.new(0.5, -5, 0.5, -2),
|
|
||||||
Parent = verticalDragger,
|
|
||||||
}
|
|
||||||
-- scrubThree
|
|
||||||
New(scrubFrame:clone()) {
|
|
||||||
Position = UDim2.new(0.5, -5, 0.5, 2),
|
|
||||||
Parent = verticalDragger,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local areaSoak = New "TextButton" {
|
local areaSoak = New "TextButton" {
|
||||||
|
|
@ -4386,12 +4302,10 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
local draggingVertical = false
|
local draggingVertical = false
|
||||||
local startYPos
|
local startYPos
|
||||||
verticalDragger.MouseEnter:connect(function()
|
verticalDragger.MouseEnter:connect(function()
|
||||||
verticalDragger.BackgroundColor3 =
|
verticalDragger.BackgroundColor3 = Colour3(60, 60, 60)
|
||||||
Color3.new(60 / 255, 60 / 255, 60 / 255)
|
|
||||||
end)
|
end)
|
||||||
verticalDragger.MouseLeave:connect(function()
|
verticalDragger.MouseLeave:connect(function()
|
||||||
verticalDragger.BackgroundColor3 =
|
verticalDragger.BackgroundColor3 = Colour3(50, 50, 50)
|
||||||
Color3.new(50 / 255, 50 / 255, 50 / 255)
|
|
||||||
end)
|
end)
|
||||||
verticalDragger.MouseButton1Down:connect(function(_, y)
|
verticalDragger.MouseButton1Down:connect(function(_, y)
|
||||||
draggingVertical = true
|
draggingVertical = true
|
||||||
|
|
@ -4448,11 +4362,7 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
widgetContainer.Visible = not widgetContainer.Visible
|
widgetContainer.Visible = not widgetContainer.Visible
|
||||||
end
|
end
|
||||||
|
|
||||||
if minimizeFrame.Visible then
|
minimizeButton.Text = minimizeFrame.Visible and "+" or "-"
|
||||||
minimizeButton.Text = "+"
|
|
||||||
else
|
|
||||||
minimizeButton.Text = "-"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
minimizeBigButton.MouseButton1Click:connect(function()
|
minimizeBigButton.MouseButton1Click:connect(function()
|
||||||
|
|
@ -4470,84 +4380,84 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.Help = function(funcNameOrFunc)
|
RbxGui.Help = function(funcNameOrFunc)
|
||||||
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
|
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
|
||||||
if
|
if
|
||||||
funcNameOrFunc == "CreatePropertyDropDownMenu"
|
funcNameOrFunc == "CreatePropertyDropDownMenu"
|
||||||
or funcNameOrFunc == RbxGui.CreatePropertyDropDownMenu
|
or funcNameOrFunc == RbxGui.CreatePropertyDropDownMenu
|
||||||
then
|
then
|
||||||
return "Function CreatePropertyDropDownMenu. "
|
return "Function CreatePropertyDropDownMenu. "
|
||||||
.. "Arguments: (instance, propertyName, enumType). "
|
.. "Arguments: (instance, propertyName, enumType). "
|
||||||
.. "Side effect: returns a container with a drop-down-box that is linked to the 'property' field of 'instance' which is of type 'enumType'"
|
.. "Side effect: returns a container with a drop-down-box that is linked to the 'property' field of 'instance' which is of type 'enumType'"
|
||||||
elseif
|
elseif
|
||||||
funcNameOrFunc == "CreateDropDownMenu"
|
funcNameOrFunc == "CreateDropDownMenu"
|
||||||
or funcNameOrFunc == RbxGui.CreateDropDownMenu
|
or funcNameOrFunc == RbxGui.CreateDropDownMenu
|
||||||
then
|
then
|
||||||
return "Function CreateDropDownMenu. "
|
return "Function CreateDropDownMenu. "
|
||||||
.. "Arguments: (items, onItemSelected). "
|
.. "Arguments: (items, onItemSelected). "
|
||||||
.. "Side effect: Returns 2 results, a container to the gui object and a 'updateSelection' function for external updating. The container is a drop-down-box created around a list of items"
|
.. "Side effect: Returns 2 results, a container to the gui object and a 'updateSelection' function for external updating. The container is a drop-down-box created around a list of items"
|
||||||
elseif
|
elseif
|
||||||
funcNameOrFunc == "CreateMessageDialog"
|
funcNameOrFunc == "CreateMessageDialog"
|
||||||
or funcNameOrFunc == RbxGui.CreateMessageDialog
|
or funcNameOrFunc == RbxGui.CreateMessageDialog
|
||||||
then
|
then
|
||||||
return "Function CreateMessageDialog. "
|
return "Function CreateMessageDialog. "
|
||||||
.. "Arguments: (title, message, buttons). "
|
.. "Arguments: (title, message, buttons). "
|
||||||
.. "Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button"
|
.. "Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button"
|
||||||
elseif
|
elseif
|
||||||
funcNameOrFunc == "CreateStyledMessageDialog"
|
funcNameOrFunc == "CreateStyledMessageDialog"
|
||||||
or funcNameOrFunc == RbxGui.CreateStyledMessageDialog
|
or funcNameOrFunc == RbxGui.CreateStyledMessageDialog
|
||||||
then
|
then
|
||||||
return "Function CreateStyledMessageDialog. "
|
return "Function CreateStyledMessageDialog. "
|
||||||
.. "Arguments: (title, message, style, buttons). "
|
.. "Arguments: (title, message, style, buttons). "
|
||||||
.. "Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button, 'style' is a string, either Error, Notify or Confirm"
|
.. "Side effect: Returns a gui object of a message box with 'title' and 'message' as passed in. 'buttons' input is an array of Tables contains a 'Text' and 'Function' field for the text/callback of each button, 'style' is a string, either Error, Notify or Confirm"
|
||||||
elseif
|
elseif
|
||||||
funcNameOrFunc == "GetFontHeight"
|
funcNameOrFunc == "GetFontHeight"
|
||||||
or funcNameOrFunc == RbxGui.GetFontHeight
|
or funcNameOrFunc == RbxGui.GetFontHeight
|
||||||
then
|
then
|
||||||
return "Function GetFontHeight. "
|
return "Function GetFontHeight. "
|
||||||
.. "Arguments: (font, fontSize). "
|
.. "Arguments: (font, fontSize). "
|
||||||
.. "Side effect: returns the size in pixels of the given font + fontSize"
|
.. "Side effect: returns the size in pixels of the given font + fontSize"
|
||||||
elseif
|
elseif
|
||||||
funcNameOrFunc == "CreateScrollingFrame"
|
funcNameOrFunc == "CreateScrollingFrame"
|
||||||
or funcNameOrFunc == RbxGui.CreateScrollingFrame
|
or funcNameOrFunc == RbxGui.CreateScrollingFrame
|
||||||
then
|
then
|
||||||
return "Function CreateScrollingFrame. "
|
return "Function CreateScrollingFrame. "
|
||||||
.. "Arguments: (orderList, style) "
|
.. "Arguments: (orderList, style) "
|
||||||
.. "Side effect: returns 4 objects, (scrollFrame, scrollUpButton, scrollDownButton, recalculateFunction). 'scrollFrame' can be filled with GuiObjects. It will lay them out and allow scrollUpButton/scrollDownButton to interact with them. Orderlist is optional (and specifies the order to layout the children. Without orderlist, it uses the children order. style is also optional, and allows for a 'grid' styling if style is passed 'grid' as a string. recalculateFunction can be called when a relayout is needed (when orderList changes)"
|
.. "Side effect: returns 4 objects, (scrollFrame, scrollUpButton, scrollDownButton, recalculateFunction). 'scrollFrame' can be filled with GuiObjects. It will lay them out and allow scrollUpButton/scrollDownButton to interact with them. Orderlist is optional (and specifies the order to layout the children. Without orderlist, it uses the children order. style is also optional, and allows for a 'grid' styling if style is passed 'grid' as a string. recalculateFunction can be called when a relayout is needed (when orderList changes)"
|
||||||
elseif
|
elseif
|
||||||
funcNameOrFunc == "CreateTrueScrollingFrame"
|
funcNameOrFunc == "CreateTrueScrollingFrame"
|
||||||
or funcNameOrFunc == RbxGui.CreateTrueScrollingFrame
|
or funcNameOrFunc == RbxGui.CreateTrueScrollingFrame
|
||||||
then
|
then
|
||||||
return "Function CreateTrueScrollingFrame. "
|
return "Function CreateTrueScrollingFrame. "
|
||||||
.. "Arguments: (nil) "
|
.. "Arguments: (nil) "
|
||||||
.. "Side effect: returns 2 objects, (scrollFrame, controlFrame). 'scrollFrame' can be filled with GuiObjects, and they will be clipped if not inside the frame's bounds. controlFrame has children scrollup and scrolldown, as well as a slider. controlFrame can be parented to any guiobject and it will readjust itself to fit."
|
.. "Side effect: returns 2 objects, (scrollFrame, controlFrame). 'scrollFrame' can be filled with GuiObjects, and they will be clipped if not inside the frame's bounds. controlFrame has children scrollup and scrolldown, as well as a slider. controlFrame can be parented to any guiobject and it will readjust itself to fit."
|
||||||
elseif
|
elseif
|
||||||
funcNameOrFunc == "AutoTruncateTextObject"
|
funcNameOrFunc == "AutoTruncateTextObject"
|
||||||
or funcNameOrFunc == RbxGui.AutoTruncateTextObject
|
or funcNameOrFunc == RbxGui.AutoTruncateTextObject
|
||||||
then
|
then
|
||||||
return "Function AutoTruncateTextObject. "
|
return "Function AutoTruncateTextObject. "
|
||||||
.. "Arguments: (textLabel) "
|
.. "Arguments: (textLabel) "
|
||||||
.. "Side effect: returns 2 objects, (textLabel, changeText). The 'textLabel' input is modified to automatically truncate text (with ellipsis), if it gets too small to fit. 'changeText' is a function that can be used to change the text, it takes 1 string as an argument"
|
.. "Side effect: returns 2 objects, (textLabel, changeText). The 'textLabel' input is modified to automatically truncate text (with ellipsis), if it gets too small to fit. 'changeText' is a function that can be used to change the text, it takes 1 string as an argument"
|
||||||
elseif
|
elseif
|
||||||
funcNameOrFunc == "CreateSlider"
|
funcNameOrFunc == "CreateSlider"
|
||||||
or funcNameOrFunc == RbxGui.CreateSlider
|
or funcNameOrFunc == RbxGui.CreateSlider
|
||||||
then
|
then
|
||||||
return "Function CreateSlider. "
|
return "Function CreateSlider. "
|
||||||
.. "Arguments: (steps, width, position) "
|
.. "Arguments: (steps, width, position) "
|
||||||
.. "Side effect: returns 2 objects, (sliderGui, sliderPosition). The 'steps' argument specifies how many different positions the slider can hold along the bar. 'width' specifies in pixels how wide the bar should be (modifiable afterwards if desired). 'position' argument should be a UDim2 for slider positioning. 'sliderPosition' is an IntValue whose current .Value specifies the specific step the slider is currently on."
|
.. "Side effect: returns 2 objects, (sliderGui, sliderPosition). The 'steps' argument specifies how many different positions the slider can hold along the bar. 'width' specifies in pixels how wide the bar should be (modifiable afterwards if desired). 'position' argument should be a UDim2 for slider positioning. 'sliderPosition' is an IntValue whose current .Value specifies the specific step the slider is currently on."
|
||||||
elseif
|
elseif
|
||||||
funcNameOrFunc == "CreateLoadingFrame"
|
funcNameOrFunc == "CreateLoadingFrame"
|
||||||
or funcNameOrFunc == RbxGui.CreateLoadingFrame
|
or funcNameOrFunc == RbxGui.CreateLoadingFrame
|
||||||
then
|
then
|
||||||
return "Function CreateLoadingFrame. "
|
return "Function CreateLoadingFrame. "
|
||||||
.. "Arguments: (name, size, position) "
|
.. "Arguments: (name, size, position) "
|
||||||
.. "Side effect: Creates a gui that can be manipulated to show progress for a particular action. Name appears above the loading bar, and size and position are udim2 values (both size and position are optional arguments). Returns 3 arguments, the first being the gui created. The second being updateLoadingGuiPercent, which is a bindable function. This function takes one argument (two optionally), which should be a number between 0 and 1, representing the percentage the loading gui should be at. The second argument to this function is a boolean value that if set to true will tween the current percentage value to the new percentage value, therefore our third argument is how long this tween should take. Our third returned argument is a BindableEvent, that when fired means that someone clicked the cancel button on the dialog."
|
.. "Side effect: Creates a gui that can be manipulated to show progress for a particular action. Name appears above the loading bar, and size and position are udim2 values (both size and position are optional arguments). Returns 3 arguments, the first being the gui created. The second being updateLoadingGuiPercent, which is a bindable function. This function takes one argument (two optionally), which should be a number between 0 and 1, representing the percentage the loading gui should be at. The second argument to this function is a boolean value that if set to true will tween the current percentage value to the new percentage value, therefore our third argument is how long this tween should take. Our third returned argument is a BindableEvent, that when fired means that someone clicked the cancel button on the dialog."
|
||||||
elseif
|
elseif
|
||||||
funcNameOrFunc == "CreateTerrainMaterialSelector"
|
funcNameOrFunc == "CreateTerrainMaterialSelector"
|
||||||
or funcNameOrFunc == RbxGui.CreateTerrainMaterialSelector
|
or funcNameOrFunc == RbxGui.CreateTerrainMaterialSelector
|
||||||
then
|
then
|
||||||
return "Function CreateTerrainMaterialSelector. "
|
return "Function CreateTerrainMaterialSelector. "
|
||||||
.. "Arguments: (size, position) "
|
.. "Arguments: (size, position) "
|
||||||
.. "Side effect: Size and position are UDim2 values that specifies the selector's size and position. Both size and position are optional arguments. This method returns 3 objects (terrainSelectorGui, terrainSelected, forceTerrainSelection). terrainSelectorGui is just the gui object that we generate with this function, parent it as you like. TerrainSelected is a BindableEvent that is fired whenever a new terrain type is selected in the gui. ForceTerrainSelection is a function that takes an argument of Enum.CellMaterial and will force the gui to show that material as currently selected."
|
.. "Side effect: Size and position are UDim2 values that specifies the selector's size and position. Both size and position are optional arguments. This method returns 3 objects (terrainSelectorGui, terrainSelected, forceTerrainSelection). terrainSelectorGui is just the gui object that we generate with this function, parent it as you like. TerrainSelected is a BindableEvent that is fired whenever a new terrain type is selected in the gui. ForceTerrainSelection is a function that takes an argument of Enum.CellMaterial and will force the gui to show that material as currently selected."
|
||||||
end
|
end
|
||||||
return "No help available for this function"
|
return "No help available for this function"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -713,7 +713,7 @@ local function createGameMainMenu(baseZIndex, shield)
|
||||||
screenshotButton.Visible = not macClient
|
screenshotButton.Visible = not macClient
|
||||||
screenshotButton:SetVerb "Screenshot"
|
screenshotButton:SetVerb "Screenshot"
|
||||||
|
|
||||||
local screenshotShortcut = helpShortcut:clone()
|
local screenshotShortcut = helpShortcut:Clone()
|
||||||
screenshotShortcut.Name = "ScreenshotShortcutText"
|
screenshotShortcut.Name = "ScreenshotShortcutText"
|
||||||
screenshotShortcut.Text = "PrintSc"
|
screenshotShortcut.Text = "PrintSc"
|
||||||
screenshotShortcut.Position = UDim2.new(0, 118, 0, 0)
|
screenshotShortcut.Position = UDim2.new(0, 118, 0, 0)
|
||||||
|
|
@ -733,7 +733,7 @@ local function createGameMainMenu(baseZIndex, shield)
|
||||||
recordVideoButton.Visible = not macClient
|
recordVideoButton.Visible = not macClient
|
||||||
recordVideoButton:SetVerb "RecordToggle"
|
recordVideoButton:SetVerb "RecordToggle"
|
||||||
|
|
||||||
local recordVideoShortcut = helpShortcut:clone()
|
local recordVideoShortcut = helpShortcut:Clone()
|
||||||
recordVideoShortcut.Visible = hasGraphicsSlider
|
recordVideoShortcut.Visible = hasGraphicsSlider
|
||||||
recordVideoShortcut.Name = "RecordVideoShortcutText"
|
recordVideoShortcut.Name = "RecordVideoShortcutText"
|
||||||
recordVideoShortcut.Text = "F12"
|
recordVideoShortcut.Text = "F12"
|
||||||
|
|
@ -899,7 +899,7 @@ local function createGameSettingsMenu(baseZIndex, _)
|
||||||
studioText.BackgroundTransparency = 1
|
studioText.BackgroundTransparency = 1
|
||||||
studioText.Parent = gameSettingsMenuFrame
|
studioText.Parent = gameSettingsMenuFrame
|
||||||
|
|
||||||
local studioShortcut = fullscreenShortcut:clone()
|
local studioShortcut = fullscreenShortcut:Clone()
|
||||||
studioShortcut.Name = "StudioShortcutText"
|
studioShortcut.Name = "StudioShortcutText"
|
||||||
studioShortcut.Visible = false -- TODO: turn back on when f2 hack is fixed
|
studioShortcut.Visible = false -- TODO: turn back on when f2 hack is fixed
|
||||||
studioShortcut.Text = "F2"
|
studioShortcut.Text = "F2"
|
||||||
|
|
@ -921,7 +921,7 @@ local function createGameSettingsMenu(baseZIndex, _)
|
||||||
qualityText.Parent = gameSettingsMenuFrame
|
qualityText.Parent = gameSettingsMenuFrame
|
||||||
qualityText.Visible = not inStudioMode
|
qualityText.Visible = not inStudioMode
|
||||||
|
|
||||||
local autoText = qualityText:clone()
|
local autoText = qualityText:Clone()
|
||||||
autoText.Name = "AutoText"
|
autoText.Name = "AutoText"
|
||||||
autoText.Text = "Auto"
|
autoText.Text = "Auto"
|
||||||
autoText.Position = UDim2.new(0, 183, 0, 214)
|
autoText.Position = UDim2.new(0, 183, 0, 214)
|
||||||
|
|
@ -930,7 +930,7 @@ local function createGameSettingsMenu(baseZIndex, _)
|
||||||
autoText.Parent = gameSettingsMenuFrame
|
autoText.Parent = gameSettingsMenuFrame
|
||||||
autoText.Visible = not inStudioMode
|
autoText.Visible = not inStudioMode
|
||||||
|
|
||||||
local fasterText = autoText:clone()
|
local fasterText = autoText:Clone()
|
||||||
fasterText.Name = "FasterText"
|
fasterText.Name = "FasterText"
|
||||||
fasterText.Text = "Faster"
|
fasterText.Text = "Faster"
|
||||||
fasterText.Position = UDim2.new(0, 185, 0, 274)
|
fasterText.Position = UDim2.new(0, 185, 0, 274)
|
||||||
|
|
@ -939,14 +939,14 @@ local function createGameSettingsMenu(baseZIndex, _)
|
||||||
fasterText.Parent = gameSettingsMenuFrame
|
fasterText.Parent = gameSettingsMenuFrame
|
||||||
fasterText.Visible = not inStudioMode
|
fasterText.Visible = not inStudioMode
|
||||||
|
|
||||||
local fasterShortcut = fullscreenShortcut:clone()
|
local fasterShortcut = fullscreenShortcut:Clone()
|
||||||
fasterShortcut.Name = "FasterShortcutText"
|
fasterShortcut.Name = "FasterShortcutText"
|
||||||
fasterShortcut.Text = "F10 + Shift"
|
fasterShortcut.Text = "F10 + Shift"
|
||||||
fasterShortcut.Position = UDim2.new(0, 185, 0, 283)
|
fasterShortcut.Position = UDim2.new(0, 185, 0, 283)
|
||||||
fasterShortcut.Parent = gameSettingsMenuFrame
|
fasterShortcut.Parent = gameSettingsMenuFrame
|
||||||
fasterShortcut.Visible = not inStudioMode
|
fasterShortcut.Visible = not inStudioMode
|
||||||
|
|
||||||
local betterQualityText = autoText:clone()
|
local betterQualityText = autoText:Clone()
|
||||||
betterQualityText.Name = "BetterQualityText"
|
betterQualityText.Name = "BetterQualityText"
|
||||||
betterQualityText.Text = "Better Quality"
|
betterQualityText.Text = "Better Quality"
|
||||||
betterQualityText.TextWrap = true
|
betterQualityText.TextWrap = true
|
||||||
|
|
@ -957,7 +957,7 @@ local function createGameSettingsMenu(baseZIndex, _)
|
||||||
betterQualityText.Parent = gameSettingsMenuFrame
|
betterQualityText.Parent = gameSettingsMenuFrame
|
||||||
betterQualityText.Visible = not inStudioMode
|
betterQualityText.Visible = not inStudioMode
|
||||||
|
|
||||||
local betterQualityShortcut = fullscreenShortcut:clone()
|
local betterQualityShortcut = fullscreenShortcut:Clone()
|
||||||
betterQualityShortcut.Name = "BetterQualityShortcut"
|
betterQualityShortcut.Name = "BetterQualityShortcut"
|
||||||
betterQualityShortcut.Text = "F10"
|
betterQualityShortcut.Text = "F10"
|
||||||
betterQualityShortcut.Position = UDim2.new(0, 394, 0, 288)
|
betterQualityShortcut.Position = UDim2.new(0, 394, 0, 288)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
-- CoreGui.RobloxGui.CoreScripts/PlayerListScript
|
-- CoreGui.RobloxGui.CoreScripts/PlayerListScript
|
||||||
print "[Mercury]: Loaded corescript 48488235"
|
print "[Mercury]: Loaded corescript 48488235"
|
||||||
|
|
||||||
local New = require "../Modules/New"
|
local New = (require "../Modules/New").New
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
-- Super Util
|
-- Super Util
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
-- CoreGui.RobloxGui.CoreScripts/PopupScript
|
-- CoreGui.RobloxGui.CoreScripts/PopupScript
|
||||||
print "[Mercury]: Loaded corescript 48488451"
|
print "[Mercury]: Loaded corescript 48488451"
|
||||||
|
|
||||||
local New = require "../Modules/New"
|
local News = require "../Modules/New"
|
||||||
|
local New = News.New
|
||||||
|
local Hydrate = News.Hydrate
|
||||||
|
|
||||||
--build our gui
|
--build our gui
|
||||||
|
|
||||||
|
|
@ -39,7 +41,7 @@ local popupFrame = New "Frame" {
|
||||||
ZIndex = 5,
|
ZIndex = 5,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
New(popupFrame:clone()) {
|
Hydrate(popupFrame:Clone()) {
|
||||||
Name = "Darken",
|
Name = "Darken",
|
||||||
Size = UDim2.new(1, 16, 1, 16),
|
Size = UDim2.new(1, 16, 1, 16),
|
||||||
Position = UDim2.new(0, -8, 0, -8),
|
Position = UDim2.new(0, -8, 0, -8),
|
||||||
|
|
@ -58,13 +60,13 @@ local acceptButton = New "TextButton" {
|
||||||
ZIndex = 5,
|
ZIndex = 5,
|
||||||
Parent = popupFrame,
|
Parent = popupFrame,
|
||||||
}
|
}
|
||||||
New(acceptButton:clone()) {
|
Hydrate(acceptButton:Clone()) {
|
||||||
Name = "DeclineButton",
|
Name = "DeclineButton",
|
||||||
Text = "No",
|
Text = "No",
|
||||||
Position = UDim2.new(1, -120, 0, 270),
|
Position = UDim2.new(1, -120, 0, 270),
|
||||||
Parent = popupFrame,
|
Parent = popupFrame,
|
||||||
}
|
}
|
||||||
New(acceptButton:clone()) {
|
Hydrate(acceptButton:Clone()) {
|
||||||
Name = "OKButton",
|
Name = "OKButton",
|
||||||
Text = "OK",
|
Text = "OK",
|
||||||
Position = UDim2.new(0.5, -50, 0, 270),
|
Position = UDim2.new(0.5, -50, 0, 270),
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
-- CoreGui.RobloxGui.CoreScripts/BackpackScripts/BackpackBuild
|
-- CoreGui.RobloxGui.CoreScripts/BackpackScripts/BackpackBuild
|
||||||
print "[Mercury]: Loaded corescript 53878047"
|
print "[Mercury]: Loaded corescript 53878047"
|
||||||
|
|
||||||
local New = require "../Modules/New"
|
local News = require "../Modules/New"
|
||||||
|
local New = News.New
|
||||||
|
local Hydrate = News.Hydrate
|
||||||
|
|
||||||
-- This script creates almost all gui elements found in the backpack (warning: there are a lot!)
|
-- This script creates almost all gui elements found in the backpack (warning: there are a lot!)
|
||||||
-- TODO: automate this process
|
-- TODO: automate this process
|
||||||
|
|
@ -159,13 +161,13 @@ local CurrentLoadout = New "Frame" {
|
||||||
ZIndex = 5.0,
|
ZIndex = 5.0,
|
||||||
},
|
},
|
||||||
SlotNumber(),
|
SlotNumber(),
|
||||||
New(SlotNumber()) {
|
Hydrate(SlotNumber()) {
|
||||||
Name = "SlotNumberDownShadow",
|
Name = "SlotNumberDownShadow",
|
||||||
TextColor3 = Color3.new(0, 0, 0),
|
TextColor3 = Color3.new(0, 0, 0),
|
||||||
Position = UDim2.new(0, 1, 0, -1),
|
Position = UDim2.new(0, 1, 0, -1),
|
||||||
ZIndex = 2,
|
ZIndex = 2,
|
||||||
},
|
},
|
||||||
New(SlotNumber()) {
|
Hydrate(SlotNumber()) {
|
||||||
Name = "SlotNumberUpShadow",
|
Name = "SlotNumberUpShadow",
|
||||||
TextColor3 = Color3.new(0, 0, 0),
|
TextColor3 = Color3.new(0, 0, 0),
|
||||||
Position = UDim2.new(0, -1, 0, -1),
|
Position = UDim2.new(0, -1, 0, -1),
|
||||||
|
|
@ -184,7 +186,7 @@ New "ImageButton" {
|
||||||
Image = "http://banland.xyz/asset/?id=97617958",
|
Image = "http://banland.xyz/asset/?id=97617958",
|
||||||
Position = UDim2.new(0.5, -60, 1, -108),
|
Position = UDim2.new(0.5, -60, 1, -108),
|
||||||
Size = UDim2.new(0, 120, 0, 18),
|
Size = UDim2.new(0, 120, 0, 18),
|
||||||
Parent = gui.ControlFrame
|
Parent = gui.ControlFrame,
|
||||||
}
|
}
|
||||||
|
|
||||||
for i = 0, 9 do
|
for i = 0, 9 do
|
||||||
|
|
@ -391,7 +393,7 @@ New "Frame" {
|
||||||
TextColor3 = Color3.new(1, 1, 1),
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
New(GearGridScrollingArea()) {
|
Hydrate(GearGridScrollingArea()) {
|
||||||
Name = "GearLoadoutsScrollingArea",
|
Name = "GearLoadoutsScrollingArea",
|
||||||
Position = UDim2.new(1, -15, 0.15, 2),
|
Position = UDim2.new(1, -15, 0.15, 2),
|
||||||
Size = UDim2.new(0, 17, 0.85, -2),
|
Size = UDim2.new(0, 17, 0.85, -2),
|
||||||
|
|
@ -451,17 +453,17 @@ New "Frame" {
|
||||||
Visible = false,
|
Visible = false,
|
||||||
ZIndex = 9,
|
ZIndex = 9,
|
||||||
AttributeImage(),
|
AttributeImage(),
|
||||||
New(AttributeImage()) {
|
Hydrate(AttributeImage()) {
|
||||||
Name = "AttributeOneImage",
|
Name = "AttributeOneImage",
|
||||||
BackgroundColor3 = Color3.new(1, 51 / 255, 0),
|
BackgroundColor3 = Color3.new(1, 51 / 255, 0),
|
||||||
Position = UDim2.new(0.25, 0, 0, 0),
|
Position = UDim2.new(0.25, 0, 0, 0),
|
||||||
},
|
},
|
||||||
New(AttributeImage()) {
|
Hydrate(AttributeImage()) {
|
||||||
Name = "AttributeTwoImage",
|
Name = "AttributeTwoImage",
|
||||||
BackgroundColor3 = Color3.new(153 / 255, 1, 153 / 255),
|
BackgroundColor3 = Color3.new(153 / 255, 1, 153 / 255),
|
||||||
Position = UDim2.new(0.5, 0, 0, 0),
|
Position = UDim2.new(0.5, 0, 0, 0),
|
||||||
},
|
},
|
||||||
New(AttributeImage()) {
|
Hydrate(AttributeImage()) {
|
||||||
Name = "AttributeThreeImage",
|
Name = "AttributeThreeImage",
|
||||||
BackgroundColor3 = Color3.new(0, 0.5, 0.5),
|
BackgroundColor3 = Color3.new(0, 0.5, 0.5),
|
||||||
Position = UDim2.new(0.75, 0, 0, 0),
|
Position = UDim2.new(0.75, 0, 0, 0),
|
||||||
|
|
|
||||||
|
|
@ -620,17 +620,16 @@ local function resolveDrag(gearClone, x, y)
|
||||||
local frames = frame.Parent:GetChildren()
|
local frames = frame.Parent:GetChildren()
|
||||||
|
|
||||||
for i = 1, #frames do
|
for i = 1, #frames do
|
||||||
if frames[i]:IsA "Frame" then
|
if
|
||||||
if
|
frames[i]:IsA "Frame"
|
||||||
pointInRectangle(
|
and pointInRectangle(
|
||||||
mousePoint,
|
mousePoint,
|
||||||
frames[i].AbsolutePosition,
|
frames[i].AbsolutePosition,
|
||||||
frames[i].AbsoluteSize
|
frames[i].AbsoluteSize
|
||||||
)
|
)
|
||||||
then
|
then
|
||||||
swapGear(gearClone, frames[i])
|
swapGear(gearClone, frames[i])
|
||||||
return true
|
return true
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -738,7 +737,7 @@ local function addingPlayerChild(
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local gearClone = currentLoadout.TempSlot:clone()
|
local gearClone = currentLoadout.TempSlot:Clone()
|
||||||
gearClone.Name = child.Name
|
gearClone.Name = child.Name
|
||||||
gearClone.GearImage.Image = child.TextureId
|
gearClone.GearImage.Image = child.TextureId
|
||||||
if gearClone.GearImage.Image == "" then
|
if gearClone.GearImage.Image == "" then
|
||||||
|
|
@ -1174,27 +1173,20 @@ delay(1, function()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
delay(2, function()
|
delay(2, function()
|
||||||
--while true do
|
-- while true do
|
||||||
if not backpackWasOpened then
|
if not backpackWasOpened and robloxGui.AbsoluteSize.Y <= 320 then
|
||||||
if robloxGui.AbsoluteSize.Y <= 320 then
|
local cChildren = currentLoadout:GetChildren()
|
||||||
local cChildren = currentLoadout:GetChildren()
|
for i = 1, #cChildren do
|
||||||
for i = 1, #cChildren do
|
local slotNum = tonumber(
|
||||||
local slotNum = tonumber(
|
string.sub(cChildren[i].Name, 5, string.len(cChildren[i].Name))
|
||||||
string.sub(
|
)
|
||||||
cChildren[i].Name,
|
if type(slotNum) == "number" then
|
||||||
5,
|
cChildren[i].Position = UDim2.new(0, (slotNum - 1) * 60, 0, 0)
|
||||||
string.len(cChildren[i].Name)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if type(slotNum) == "number" then
|
|
||||||
cChildren[i].Position =
|
|
||||||
UDim2.new(0, (slotNum - 1) * 60, 0, 0)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
wait(0.25)
|
wait(0.25)
|
||||||
--end
|
-- end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
player.ChildAdded:connect(function(child)
|
player.ChildAdded:connect(function(child)
|
||||||
|
|
@ -1288,27 +1280,25 @@ player.CharacterAdded:connect(function()
|
||||||
waitForChild(player, "PlayerGui")
|
waitForChild(player, "PlayerGui")
|
||||||
moveHealthBar(player.PlayerGui)
|
moveHealthBar(player.PlayerGui)
|
||||||
delay(2, function()
|
delay(2, function()
|
||||||
--while true do
|
-- while true do
|
||||||
if not backpackWasOpened then
|
if not backpackWasOpened and robloxGui.AbsoluteSize.Y <= 320 then
|
||||||
if robloxGui.AbsoluteSize.Y <= 320 then
|
local cChildren = currentLoadout:GetChildren()
|
||||||
local cChildren = currentLoadout:GetChildren()
|
for i = 1, #cChildren do
|
||||||
for i = 1, #cChildren do
|
local slotNum = tonumber(
|
||||||
local slotNum = tonumber(
|
string.sub(
|
||||||
string.sub(
|
cChildren[i].Name,
|
||||||
cChildren[i].Name,
|
5,
|
||||||
5,
|
string.len(cChildren[i].Name)
|
||||||
string.len(cChildren[i].Name)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
if type(slotNum) == "number" then
|
)
|
||||||
cChildren[i].Position =
|
if type(slotNum) == "number" then
|
||||||
UDim2.new(0, (slotNum - 1) * 60, 0, 0)
|
cChildren[i].Position =
|
||||||
end
|
UDim2.new(0, (slotNum - 1) * 60, 0, 0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
wait(0.25)
|
wait(0.25)
|
||||||
--end
|
-- end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
-- RbxUtility
|
-- RbxUtility
|
||||||
print "[Mercury]: Loaded corescript 60595411"
|
print "[Mercury]: Loaded corescript 60595411"
|
||||||
|
|
||||||
|
local News = require "../Modules/New"
|
||||||
|
local New = News.New
|
||||||
|
local Hydrate = News.Hydrate
|
||||||
|
|
||||||
local Terrain = game:GetService "Terrain"
|
local Terrain = game:GetService "Terrain"
|
||||||
|
|
||||||
local RbxUtility = {}
|
local RbxUtility = {}
|
||||||
|
|
@ -66,14 +70,11 @@ RbxUtility.SelectTerrainRegion = function(
|
||||||
local emptyMaterial = Enum.CellMaterial.Empty
|
local emptyMaterial = Enum.CellMaterial.Empty
|
||||||
|
|
||||||
-- container for all adornments, passed back to user
|
-- container for all adornments, passed back to user
|
||||||
local selectionContainer = Instance.new "Model"
|
local selectionContainer = New "Model" {
|
||||||
selectionContainer.Name = "SelectionContainer"
|
Name = "SelectionContainer",
|
||||||
selectionContainer.Archivable = false
|
Archivable = false,
|
||||||
if selectionParent then
|
Parent = selectionParent or game.Workspace,
|
||||||
selectionContainer.Parent = selectionParent
|
}
|
||||||
else
|
|
||||||
selectionContainer.Parent = game.Workspace
|
|
||||||
end
|
|
||||||
|
|
||||||
local updateSelection -- function we return to allow user to update selection
|
local updateSelection -- function we return to allow user to update selection
|
||||||
local currentKeepAliveTag -- a tag that determines whether adorns should be destroyed
|
local currentKeepAliveTag -- a tag that determines whether adorns should be destroyed
|
||||||
|
|
@ -82,13 +83,14 @@ RbxUtility.SelectTerrainRegion = function(
|
||||||
local adornments = {} -- contains all adornments
|
local adornments = {} -- contains all adornments
|
||||||
local reusableAdorns = {}
|
local reusableAdorns = {}
|
||||||
|
|
||||||
local selectionPart = Instance.new "Part"
|
local selectionPart = New "Part" {
|
||||||
selectionPart.Name = "SelectionPart"
|
Name = "SelectionPart",
|
||||||
selectionPart.Transparency = 1
|
Transparency = 1,
|
||||||
selectionPart.Anchored = true
|
Anchored = true,
|
||||||
selectionPart.Locked = true
|
Locked = true,
|
||||||
selectionPart.CanCollide = false
|
CanCollide = false,
|
||||||
selectionPart.Size = Vector3.new(4.2, 4.2, 4.2)
|
Size = Vector3.new(4.2, 4.2, 4.2),
|
||||||
|
}
|
||||||
|
|
||||||
local selectionBox = Instance.new "SelectionBox"
|
local selectionBox = Instance.new "SelectionBox"
|
||||||
|
|
||||||
|
|
@ -104,18 +106,15 @@ RbxUtility.SelectTerrainRegion = function(
|
||||||
|
|
||||||
selectionBoxClone.Visible = true
|
selectionBoxClone.Visible = true
|
||||||
else
|
else
|
||||||
selectionPartClone = selectionPart:Clone()
|
selectionPartClone = Hydrate(selectionPart:Clone()) {
|
||||||
selectionPartClone.Archivable = false
|
Archivable = false,
|
||||||
|
}
|
||||||
|
|
||||||
selectionBoxClone = selectionBox:Clone()
|
selectionBoxClone = Hydrate(selectionBox:Clone()) {
|
||||||
selectionBoxClone.Archivable = false
|
Archivable = false,
|
||||||
|
Adornee = selectionPartClone,
|
||||||
selectionBoxClone.Adornee = selectionPartClone
|
Parent = selectionContainer,
|
||||||
selectionBoxClone.Parent = selectionContainer
|
}
|
||||||
|
|
||||||
selectionBoxClone.Adornee = selectionPartClone
|
|
||||||
|
|
||||||
selectionBoxClone.Parent = selectionContainer
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if theColour then
|
if theColour then
|
||||||
|
|
@ -142,9 +141,7 @@ RbxUtility.SelectTerrainRegion = function(
|
||||||
-- helper function to update tag
|
-- helper function to update tag
|
||||||
local function incrementAliveCounter()
|
local function incrementAliveCounter()
|
||||||
aliveCounter += 1
|
aliveCounter += 1
|
||||||
if aliveCounter > 1000000 then
|
aliveCounter %= 1000000
|
||||||
aliveCounter = 0
|
|
||||||
end
|
|
||||||
return aliveCounter
|
return aliveCounter
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -238,7 +235,7 @@ RbxUtility.SelectTerrainRegion = function(
|
||||||
if selectionContainer then
|
if selectionContainer then
|
||||||
selectionContainer:Destroy()
|
selectionContainer:Destroy()
|
||||||
end
|
end
|
||||||
adornments = nil
|
adornments = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
return updateSelection, destroyFunc
|
return updateSelection, destroyFunc
|
||||||
|
|
@ -597,7 +594,7 @@ RbxUtility.Help = function(funcNameOrFunc)
|
||||||
.. "Lua code. "
|
.. "Lua code. "
|
||||||
.. "Methods of the Signal object: :connect, :wait, :fire, :disconnect. "
|
.. "Methods of the Signal object: :connect, :wait, :fire, :disconnect. "
|
||||||
.. "For more info you can pass the method name to the Help function, or view the wiki page "
|
.. "For more info you can pass the method name to the Help function, or view the wiki page "
|
||||||
.. "for this library. EG: Help('Signal:connect')."
|
.. 'for this library. EG: Help "Signal:connect".'
|
||||||
end
|
end
|
||||||
if funcNameOrFunc == "Signal:connect" then
|
if funcNameOrFunc == "Signal:connect" then
|
||||||
return "Method Signal:connect. "
|
return "Method Signal:connect. "
|
||||||
|
|
@ -635,7 +632,7 @@ RbxUtility.Help = function(funcNameOrFunc)
|
||||||
return "Function Create. "
|
return "Function Create. "
|
||||||
.. "Arguments: A table containing information about how to construct a collection of objects. "
|
.. "Arguments: A table containing information about how to construct a collection of objects. "
|
||||||
.. "Returns: The constructed objects. "
|
.. "Returns: The constructed objects. "
|
||||||
.. "Descrition: Create is a very powerfull function, whose description is too long to fit here, and "
|
.. "Descrition: Create is a very powerful function, whose description is too long to fit here, and "
|
||||||
.. "is best described via example, please see the wiki page for a description of how to use it."
|
.. "is best described via example, please see the wiki page for a description of how to use it."
|
||||||
end
|
end
|
||||||
return "No help available for this function"
|
return "No help available for this function"
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ end
|
||||||
--
|
--
|
||||||
-- Return:
|
-- Return:
|
||||||
-- cellPos - Cell position hit. Nil if none.
|
-- cellPos - Cell position hit. Nil if none.
|
||||||
function GetTerrainForMouse(mouse)
|
local function GetTerrainForMouse(mouse)
|
||||||
-- There was no target, so all it could be is a plane intersection.
|
-- There was no target, so all it could be is a plane intersection.
|
||||||
-- Check for a plane intersection. If there isn't one then nothing will get hit.
|
-- Check for a plane intersection. If there isn't one then nothing will get hit.
|
||||||
local cell = game.Workspace.Terrain:WorldToCellPreferSolid(
|
local cell = game.Workspace.Terrain:WorldToCellPreferSolid(
|
||||||
|
|
@ -896,13 +896,9 @@ RbxStamper.GetStampModel = function(assetId, terrainShape, useAssetVersionId)
|
||||||
|
|
||||||
if totalTime >= maxWait then
|
if totalTime >= maxWait then
|
||||||
return nil, "Load Time Fail"
|
return nil, "Load Time Fail"
|
||||||
end
|
elseif root == nil then
|
||||||
|
|
||||||
if root == nil then
|
|
||||||
return nil, "Load Asset Fail"
|
return nil, "Load Asset Fail"
|
||||||
end
|
elseif not root:IsA "Model" then
|
||||||
|
|
||||||
if not root:IsA "Model" then
|
|
||||||
return nil, "Load Type Fail"
|
return nil, "Load Type Fail"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -2997,6 +2993,7 @@ RbxStamper.Help = function(funcNameOrFunc)
|
||||||
then
|
then
|
||||||
return "Function SetupStamperDragger. Side Effect: Creates 4x4 stamping mechanism for building out parts quickly. Arguments: ModelToStamp, Mouse, LegalStampCheckFunction. ModelToStamp should be a Model or Part, preferrably loaded from RbxStamper.GetStampModel and should have extents that are multiples of 4. Mouse should be a mouse object (obtained from things such as Tool.OnEquipped), used to drag parts around 'stamp' them out. LegalStampCheckFunction is optional, used as a callback with a table argument (table is full of instances about to be stamped). Function should return either true or false, false stopping the stamp action."
|
return "Function SetupStamperDragger. Side Effect: Creates 4x4 stamping mechanism for building out parts quickly. Arguments: ModelToStamp, Mouse, LegalStampCheckFunction. ModelToStamp should be a Model or Part, preferrably loaded from RbxStamper.GetStampModel and should have extents that are multiples of 4. Mouse should be a mouse object (obtained from things such as Tool.OnEquipped), used to drag parts around 'stamp' them out. LegalStampCheckFunction is optional, used as a callback with a table argument (table is full of instances about to be stamped). Function should return either true or false, false stopping the stamp action."
|
||||||
end
|
end
|
||||||
|
return "No help available for this function"
|
||||||
end
|
end
|
||||||
|
|
||||||
return RbxStamper
|
return RbxStamper
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
-- CoreGui.RobloxGui.Backpack.CoreScripts/BackpackScripts/Back (2?)
|
-- CoreGui.RobloxGui.Backpack.CoreScripts/BackpackScripts/Back (2?)
|
||||||
print "[Mercury]: Loaded corescript 89449093"
|
print "[Mercury]: Loaded corescript 89449093"
|
||||||
|
|
||||||
|
local News = require "../Modules/New"
|
||||||
|
local New = News.New
|
||||||
|
local Hydrate = News.Hydrate
|
||||||
|
|
||||||
local GuiService = game:GetService "GuiService"
|
local GuiService = game:GetService "GuiService"
|
||||||
|
|
||||||
-- basic functions
|
-- basic functions
|
||||||
|
|
@ -26,18 +30,17 @@ end
|
||||||
waitForProperty(game.Players, "LocalPlayer")
|
waitForProperty(game.Players, "LocalPlayer")
|
||||||
|
|
||||||
------------------------ Locals ------------------------------
|
------------------------ Locals ------------------------------
|
||||||
local backpack = script.Parent
|
local backpack = script.Parent :: GuiObject
|
||||||
waitForChild(backpack, "Gear")
|
waitForChild(backpack, "Gear")
|
||||||
|
|
||||||
local screen = script.Parent.Parent
|
local screen = backpack.Parent :: ScreenGui
|
||||||
assert(screen:IsA "ScreenGui")
|
|
||||||
|
|
||||||
waitForChild(backpack, "Tabs")
|
waitForChild(backpack, "Tabs")
|
||||||
waitForChild(backpack.Tabs, "CloseButton")
|
waitForChild(backpack.Tabs, "CloseButton")
|
||||||
local closeButton = backpack.Tabs.CloseButton
|
local closeButton = backpack.Tabs.CloseButton
|
||||||
|
|
||||||
waitForChild(backpack.Tabs, "InventoryButton")
|
waitForChild(backpack.Tabs, "InventoryButton")
|
||||||
local inventoryButton = backpack.Tabs.InventoryButton
|
local inventoryButton: TextButton = backpack.Tabs.InventoryButton
|
||||||
|
|
||||||
waitForChild(backpack.Parent, "ControlFrame")
|
waitForChild(backpack.Parent, "ControlFrame")
|
||||||
local backpackButton =
|
local backpackButton =
|
||||||
|
|
@ -78,100 +81,48 @@ end
|
||||||
|
|
||||||
---------------------------------------- Public Event Setup ----------------------------------------
|
---------------------------------------- Public Event Setup ----------------------------------------
|
||||||
|
|
||||||
function createPublicEvent(eventName)
|
function publicEvent(eventName: string)
|
||||||
assert(eventName, "eventName is nil")
|
return New "BindableEvent" {
|
||||||
assert(tostring(eventName), "eventName is not a string")
|
Name = eventName,
|
||||||
|
Parent = script,
|
||||||
local newEvent = Instance.new "BindableEvent"
|
}
|
||||||
newEvent.Name = tostring(eventName)
|
|
||||||
newEvent.Parent = script
|
|
||||||
|
|
||||||
return newEvent
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function createPublicFunction(funcName, invokeFunc)
|
function publicFunction(funcName: string, invokeFunc: () -> ())
|
||||||
assert(funcName, "funcName is nil")
|
return New "BindableFunction" {
|
||||||
assert(tostring(funcName), "funcName is not a string")
|
Name = funcName,
|
||||||
assert(invokeFunc, "invokeFunc is nil")
|
OnInvoke = invokeFunc,
|
||||||
assert(
|
Parent = script,
|
||||||
type(invokeFunc) == "function",
|
}
|
||||||
"invokeFunc should be of type 'function'"
|
|
||||||
)
|
|
||||||
|
|
||||||
local newFunction = Instance.new "BindableFunction"
|
|
||||||
newFunction.Name = tostring(funcName)
|
|
||||||
newFunction.OnInvoke = invokeFunc
|
|
||||||
newFunction.Parent = script
|
|
||||||
|
|
||||||
return newFunction
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Events
|
-- Events
|
||||||
local resizeEvent = createPublicEvent "ResizeEvent"
|
local resizeEvent = publicEvent "ResizeEvent"
|
||||||
local backpackOpenEvent = createPublicEvent "BackpackOpenEvent"
|
local backpackOpenEvent = publicEvent "BackpackOpenEvent"
|
||||||
local backpackCloseEvent = createPublicEvent "BackpackCloseEvent"
|
local backpackCloseEvent = publicEvent "BackpackCloseEvent"
|
||||||
local tabClickedEvent = createPublicEvent "TabClickedEvent"
|
local tabClickedEvent = publicEvent "TabClickedEvent"
|
||||||
local searchRequestedEvent = createPublicEvent "SearchRequestedEvent"
|
local searchRequestedEvent = publicEvent "SearchRequestedEvent"
|
||||||
---------------------------------------- End Public Event Setup ----------------------------------------
|
---------------------------------------- End Public Event Setup ----------------------------------------
|
||||||
|
|
||||||
--------------------------- Internal Functions ----------------------------------------
|
--------------------------- Internal Functions ----------------------------------------
|
||||||
|
|
||||||
function deactivateBackpack()
|
local function deactivateBackpack()
|
||||||
backpack.Visible = false
|
backpack.Visible = false
|
||||||
active = false
|
active = false
|
||||||
end
|
end
|
||||||
|
|
||||||
function initHumanoidDiedConnections()
|
local function initHumanoidDiedConnections()
|
||||||
if humanoidDiedCon then
|
if humanoidDiedCon then
|
||||||
humanoidDiedCon:disconnect()
|
humanoidDiedCon:disconnect()
|
||||||
end
|
end
|
||||||
waitForProperty(game.Players.LocalPlayer, "Character")
|
waitForProperty(game.Players.LocalPlayer, "Character")
|
||||||
waitForChild(game.Players.LocalPlayer.Character, "Humanoid")
|
local localPlayer = game.Players.LocalPlayer
|
||||||
humanoidDiedCon = game.Players.LocalPlayer.Character.Humanoid.Died:connect(
|
waitForChild(localPlayer.Character, "Humanoid")
|
||||||
deactivateBackpack
|
humanoidDiedCon =
|
||||||
)
|
localPlayer.Character.Humanoid.Died:connect(deactivateBackpack)
|
||||||
end
|
end
|
||||||
|
|
||||||
function activateBackpack()
|
local function showBackpack()
|
||||||
initHumanoidDiedConnections()
|
|
||||||
active = true
|
|
||||||
backpack.Visible = backpackIsOpen
|
|
||||||
if backpackIsOpen then
|
|
||||||
toggleBackpack()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local hideBackpack = function()
|
|
||||||
backpackIsOpen = false
|
|
||||||
readyForNextEvent = false
|
|
||||||
backpackButton.Selected = false
|
|
||||||
resetSearch()
|
|
||||||
backpackCloseEvent:Fire(currentTab)
|
|
||||||
backpack.Tabs.Visible = false
|
|
||||||
searchFrame.Visible = false
|
|
||||||
backpack:TweenSizeAndPosition(
|
|
||||||
UDim2.new(0, backpackSize.X.Offset, 0, 0),
|
|
||||||
UDim2.new(0.5, -backpackSize.X.Offset / 2, 1, -85),
|
|
||||||
Enum.EasingDirection.Out,
|
|
||||||
Enum.EasingStyle.Quad,
|
|
||||||
guiTweenSpeed,
|
|
||||||
true,
|
|
||||||
function()
|
|
||||||
game.GuiService:RemoveCenterDialog(backpack)
|
|
||||||
backpack.Visible = false
|
|
||||||
backpackButton.Selected = false
|
|
||||||
end
|
|
||||||
)
|
|
||||||
delay(guiTweenSpeed, function()
|
|
||||||
game.GuiService:RemoveCenterDialog(backpack)
|
|
||||||
backpack.Visible = false
|
|
||||||
backpackButton.Selected = false
|
|
||||||
readyForNextEvent = true
|
|
||||||
canToggle = true
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
function showBackpack()
|
|
||||||
game.GuiService:AddCenterDialog(
|
game.GuiService:AddCenterDialog(
|
||||||
backpack,
|
backpack,
|
||||||
Enum.CenterDialogType.PlayerInitiatedDialog,
|
Enum.CenterDialogType.PlayerInitiatedDialog,
|
||||||
|
|
@ -211,17 +162,45 @@ function showBackpack()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function toggleBackpack()
|
local function hideBackpack()
|
||||||
if not game.Players.LocalPlayer then
|
backpackIsOpen = false
|
||||||
return
|
readyForNextEvent = false
|
||||||
end
|
backpackButton.Selected = false
|
||||||
if not game.Players.LocalPlayer.Character then
|
resetSearch()
|
||||||
return
|
backpackCloseEvent:Fire(currentTab)
|
||||||
end
|
backpack.Tabs.Visible = false
|
||||||
if not canToggle then
|
searchFrame.Visible = false
|
||||||
return
|
backpack:TweenSizeAndPosition(
|
||||||
end
|
UDim2.new(0, backpackSize.X.Offset, 0, 0),
|
||||||
if not readyForNextEvent then
|
UDim2.new(0.5, -backpackSize.X.Offset / 2, 1, -85),
|
||||||
|
Enum.EasingDirection.Out,
|
||||||
|
Enum.EasingStyle.Quad,
|
||||||
|
guiTweenSpeed,
|
||||||
|
true,
|
||||||
|
function()
|
||||||
|
game.GuiService:RemoveCenterDialog(backpack)
|
||||||
|
backpack.Visible = false
|
||||||
|
backpackButton.Selected = false
|
||||||
|
end
|
||||||
|
)
|
||||||
|
delay(guiTweenSpeed, function()
|
||||||
|
game.GuiService:RemoveCenterDialog(backpack)
|
||||||
|
backpack.Visible = false
|
||||||
|
backpackButton.Selected = false
|
||||||
|
readyForNextEvent = true
|
||||||
|
canToggle = true
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function toggleBackpack()
|
||||||
|
if
|
||||||
|
not (
|
||||||
|
game.Players.LocalPlayer
|
||||||
|
and game.Players.LocalPlayer.Character
|
||||||
|
and canToggle
|
||||||
|
and readyForNextEvent
|
||||||
|
)
|
||||||
|
then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
readyForNextEvent = false
|
readyForNextEvent = false
|
||||||
|
|
@ -230,20 +209,26 @@ function toggleBackpack()
|
||||||
backpackIsOpen = not backpackIsOpen
|
backpackIsOpen = not backpackIsOpen
|
||||||
|
|
||||||
if backpackIsOpen then
|
if backpackIsOpen then
|
||||||
loadoutBackground.Image = "http://banland.xyz/asset/?id=97623721"
|
Hydrate(loadoutBackground) {
|
||||||
loadoutBackground.Position = UDim2.new(-0.03, 0, -0.17, 0)
|
Image = "http://banland.xyz/asset/?id=97623721",
|
||||||
loadoutBackground.Size = UDim2.new(1.05, 0, 1.25, 0)
|
Position = UDim2.new(-0.03, 0, -0.17, 0),
|
||||||
loadoutBackground.ZIndex = 2.0
|
Size = UDim2.new(1.05, 0, 1.25, 0),
|
||||||
loadoutBackground.Visible = true
|
ZIndex = 2.0,
|
||||||
|
Visible = true,
|
||||||
|
}
|
||||||
showBackpack()
|
showBackpack()
|
||||||
else
|
else
|
||||||
backpackButton.Position = UDim2.new(0.5, -60, 1, -44)
|
Hydrate(backpackButton) {
|
||||||
loadoutBackground.Visible = false
|
Position = UDim2.new(0.5, -60, 1, -44),
|
||||||
backpackButton.Selected = false
|
Selected = false,
|
||||||
backpackButton.Image = "http://banland.xyz/asset/?id=97617958"
|
Image = "http://banland.xyz/asset/?id=97617958",
|
||||||
loadoutBackground.Image = "http://banland.xyz/asset/?id=96536002"
|
}
|
||||||
loadoutBackground.Position = UDim2.new(-0.1, 0, -0.1, 0)
|
Hydrate(loadoutBackground) {
|
||||||
loadoutBackground.Size = UDim2.new(1.2, 0, 1.2, 0)
|
Visible = false,
|
||||||
|
Image = "http://banland.xyz/asset/?id=96536002",
|
||||||
|
Position = UDim2.new(-0.1, 0, -0.1, 0),
|
||||||
|
Size = UDim2.new(1.2, 0, 1.2, 0),
|
||||||
|
}
|
||||||
hideBackpack()
|
hideBackpack()
|
||||||
|
|
||||||
local clChildren = currentLoadout:GetChildren()
|
local clChildren = currentLoadout:GetChildren()
|
||||||
|
|
@ -265,98 +250,57 @@ function toggleBackpack()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function closeBackpack()
|
local function activateBackpack()
|
||||||
|
initHumanoidDiedConnections()
|
||||||
|
active = true
|
||||||
|
backpack.Visible = backpackIsOpen
|
||||||
if backpackIsOpen then
|
if backpackIsOpen then
|
||||||
toggleBackpack()
|
toggleBackpack()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function setSelected(tab)
|
local function closeBackpack()
|
||||||
assert(tab)
|
if backpackIsOpen then
|
||||||
assert(tab:IsA "TextButton")
|
toggleBackpack()
|
||||||
|
end
|
||||||
tab.BackgroundColor3 = Color3.new(1, 1, 1)
|
|
||||||
tab.TextColor3 = Color3.new(0, 0, 0)
|
|
||||||
tab.Selected = true
|
|
||||||
tab.ZIndex = 3
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function setUnselected(tab)
|
local function updateTabGui(selectedTab: string)
|
||||||
assert(tab)
|
|
||||||
assert(tab:IsA "TextButton")
|
|
||||||
|
|
||||||
tab.BackgroundColor3 = Color3.new(0, 0, 0)
|
|
||||||
tab.TextColor3 = Color3.new(1, 1, 1)
|
|
||||||
tab.Selected = false
|
|
||||||
tab.ZIndex = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
function updateTabGui(selectedTab)
|
|
||||||
assert(selectedTab)
|
|
||||||
|
|
||||||
if selectedTab == "gear" then
|
if selectedTab == "gear" then
|
||||||
setSelected(inventoryButton)
|
-- Selected
|
||||||
|
Hydrate(inventoryButton) {
|
||||||
|
BackgroundColor3 = Color3.new(1, 1, 1),
|
||||||
|
TextColor3 = Color3.new(0, 0, 0),
|
||||||
|
Selected = true,
|
||||||
|
ZIndex = 3,
|
||||||
|
}
|
||||||
elseif selectedTab == "wardrobe" then
|
elseif selectedTab == "wardrobe" then
|
||||||
setUnselected(inventoryButton)
|
-- Unselected
|
||||||
|
Hydrate(inventoryButton) {
|
||||||
|
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
Selected = false,
|
||||||
|
ZIndex = 1,
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mouseLeaveTab(button)
|
local function newTabClicked()
|
||||||
assert(button)
|
updateTabGui(currentTab)
|
||||||
assert(button:IsA "TextButton")
|
tabClickedEvent:Fire(currentTab)
|
||||||
|
|
||||||
if button.Selected then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
button.BackgroundColor3 = Color3.new(0, 0, 0)
|
|
||||||
end
|
|
||||||
|
|
||||||
function mouseOverTab(button)
|
|
||||||
assert(button)
|
|
||||||
assert(button:IsA "TextButton")
|
|
||||||
|
|
||||||
if button.Selected then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
button.BackgroundColor3 = Color3.new(39 / 255, 39 / 255, 39 / 255)
|
|
||||||
end
|
|
||||||
|
|
||||||
function newTabClicked(tabName)
|
|
||||||
assert(tabName)
|
|
||||||
tabName = string.lower(tabName)
|
|
||||||
currentTab = tabName
|
|
||||||
|
|
||||||
updateTabGui(tabName)
|
|
||||||
tabClickedEvent:Fire(tabName)
|
|
||||||
resetSearch()
|
resetSearch()
|
||||||
end
|
end
|
||||||
|
|
||||||
function trim(s)
|
local function trim(s)
|
||||||
return (s:gsub("^%s*(.-)%s*$", "%1"))
|
return (s:gsub("^%s*(.-)%s*$", "%1"))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- function splitByWhitespace(text)
|
local function resetSearchBoxGui()
|
||||||
-- if type(text) ~= "string" then
|
|
||||||
-- return nil
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- local terms = {}
|
|
||||||
-- for token in string.gmatch(text, "[^%s]+") do
|
|
||||||
-- if string.len(token) > 0 then
|
|
||||||
-- table.insert(terms, token)
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- return terms
|
|
||||||
-- end
|
|
||||||
|
|
||||||
function resetSearchBoxGui()
|
|
||||||
resetButton.Visible = false
|
resetButton.Visible = false
|
||||||
searchBox.Text = searchDefaultText
|
searchBox.Text = searchDefaultText
|
||||||
end
|
end
|
||||||
|
|
||||||
function doSearch()
|
local function doSearch()
|
||||||
local searchText = searchBox.Text
|
local searchText = searchBox.Text
|
||||||
if searchText == "" then
|
if searchText == "" then
|
||||||
resetSearch()
|
resetSearch()
|
||||||
|
|
@ -364,7 +308,6 @@ function doSearch()
|
||||||
end
|
end
|
||||||
searchText = trim(searchText)
|
searchText = trim(searchText)
|
||||||
resetButton.Visible = true
|
resetButton.Visible = true
|
||||||
-- termTable = splitByWhitespace(searchText)
|
|
||||||
searchRequestedEvent:Fire(searchText) -- todo: replace this with termtable when table passing is possible
|
searchRequestedEvent:Fire(searchText) -- todo: replace this with termtable when table passing is possible
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -407,9 +350,8 @@ end
|
||||||
--------------------------- End Internal Functions -------------------------------------
|
--------------------------- End Internal Functions -------------------------------------
|
||||||
|
|
||||||
------------------------------ Public Functions Setup -------------------------------------
|
------------------------------ Public Functions Setup -------------------------------------
|
||||||
createPublicFunction("CloseBackpack", hideBackpack)
|
publicFunction("CloseBackpack", hideBackpack)
|
||||||
createPublicFunction("BackpackReady", backpackReady)
|
publicFunction("BackpackReady", backpackReady)
|
||||||
------------------------------ End Public Functions Setup ---------------------------------
|
|
||||||
|
|
||||||
------------------------ Connections/Script Main -------------------------------------------
|
------------------------ Connections/Script Main -------------------------------------------
|
||||||
|
|
||||||
|
|
@ -421,14 +363,20 @@ pcall(function()
|
||||||
Game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
|
Game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
inventoryButton.MouseButton1Click:connect(function()
|
inventoryButton.MouseButton1Click:connect(newTabClicked)
|
||||||
newTabClicked "gear"
|
|
||||||
end)
|
|
||||||
inventoryButton.MouseEnter:connect(function()
|
inventoryButton.MouseEnter:connect(function()
|
||||||
mouseOverTab(inventoryButton)
|
if inventoryButton.Selected then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
inventoryButton.BackgroundColor3 = Color3.new(39 / 255, 39 / 255, 39 / 255)
|
||||||
end)
|
end)
|
||||||
inventoryButton.MouseLeave:connect(function()
|
inventoryButton.MouseLeave:connect(function()
|
||||||
mouseLeaveTab(inventoryButton)
|
if inventoryButton.Selected then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
inventoryButton.BackgroundColor3 = Color3.new(0, 0, 0)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
closeButton.MouseButton1Click:connect(closeBackpack)
|
closeButton.MouseButton1Click:connect(closeBackpack)
|
||||||
|
|
@ -445,8 +393,7 @@ GuiService:AddKey(backtick)
|
||||||
GuiService.KeyPressed:connect(function(key)
|
GuiService.KeyPressed:connect(function(key)
|
||||||
if not active or disabledByDeveloper then
|
if not active or disabledByDeveloper then
|
||||||
return
|
return
|
||||||
end
|
elseif key == tilde or key == backtick then
|
||||||
if key == tilde or key == backtick then
|
|
||||||
toggleBackpack()
|
toggleBackpack()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ print "[Mercury]: Loaded corescript 97188756"
|
||||||
//NOTE: If you find any bugs or inaccuracies PM Sorcus on Roblox or @Canavus on Twitter
|
//NOTE: If you find any bugs or inaccuracies PM Sorcus on Roblox or @Canavus on Twitter
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local SafeChat = require "../Modules/Safechat.yml"
|
local SafeChat = require "../Modules/Safechat.yml" -- THANK YOU DARKLUA
|
||||||
|
local New = (require "../Modules/New").New
|
||||||
|
|
||||||
local forceChatGUI = false
|
local forceChatGUI = false
|
||||||
|
|
||||||
|
|
@ -53,14 +54,13 @@ local Player = Game.Players.LocalPlayer
|
||||||
while Player.Character == nil do
|
while Player.Character == nil do
|
||||||
wait(0.03)
|
wait(0.03)
|
||||||
end
|
end
|
||||||
local RbxUtility = LoadLibrary "RbxUtility"
|
|
||||||
local Create = RbxUtility.Create
|
|
||||||
local Camera = Game.Workspace.CurrentCamera
|
local Camera = Game.Workspace.CurrentCamera
|
||||||
|
|
||||||
-- Services
|
-- Services
|
||||||
local CoreGuiService = Game:GetService "CoreGui"
|
local CoreGuiService = Game:GetService "CoreGui"
|
||||||
local PlayersService = Game:GetService "Players"
|
local PlayersService = Game:GetService "Players"
|
||||||
local GuiService = Game:GetService "GuiService"
|
local GuiService = Game:GetService "GuiService"
|
||||||
|
local UserInputService = Game:GetService "UserInputService"
|
||||||
|
|
||||||
-- Lua Enums
|
-- Lua Enums
|
||||||
local Enums, CreateEnum
|
local Enums, CreateEnum
|
||||||
|
|
@ -119,7 +119,6 @@ end
|
||||||
local Input = {
|
local Input = {
|
||||||
Mouse = Player:GetMouse(),
|
Mouse = Player:GetMouse(),
|
||||||
Speed = 0,
|
Speed = 0,
|
||||||
Simulating = false,
|
|
||||||
|
|
||||||
Configuration = {
|
Configuration = {
|
||||||
DefaultSpeed = 1,
|
DefaultSpeed = 1,
|
||||||
|
|
@ -252,38 +251,46 @@ end
|
||||||
-- end
|
-- end
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
-- Check if we are running on a touch device
|
|
||||||
function Chat:IsTouchDevice()
|
|
||||||
local touchEnabled = false
|
|
||||||
pcall(function()
|
|
||||||
touchEnabled = Game:GetService("UserInputService").TouchEnabled
|
|
||||||
end)
|
|
||||||
return touchEnabled
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Scrolling
|
-- Scrolling
|
||||||
-- function Chat:ScrollQueue(value)
|
function Chat:ScrollQueue(value)
|
||||||
-- for i = 1, #self.MessageQueue do
|
for i = 1, #self.MessageQueue do
|
||||||
-- if self.MessageQueue[i] then
|
if self.MessageQueue[i] then
|
||||||
-- for _, label in pairs(self.MessageQueue[i]) do
|
for _, label in pairs(self.MessageQueue[i]) do
|
||||||
-- local next = self.MessageQueue[i].Next
|
local Next = self.MessageQueue[i + 1]
|
||||||
-- local previous = self.MessageQueue[i].Previous
|
local Previous = self.MessageQueue[i - 1]
|
||||||
-- if
|
if
|
||||||
-- label and label:IsA "TextLabel" or label:IsA "TextButton"
|
label
|
||||||
-- then
|
and type(label) == "userdata" -- until i figure out what's going on
|
||||||
-- if value > 0 and previous and previous.Message then
|
and (label:IsA "TextLabel" or label:IsA "TextButton")
|
||||||
-- label.Position = previous["Message"].Position
|
then
|
||||||
-- elseif value < 1 and next.Message then
|
print(
|
||||||
-- label.Position = previous["Message"].Position
|
"scrolling",
|
||||||
-- end
|
value,
|
||||||
-- end
|
"|",
|
||||||
-- end
|
Previous,
|
||||||
-- end
|
"|",
|
||||||
-- end
|
Previous and Previous.message or "none",
|
||||||
-- end
|
"|",
|
||||||
|
Next,
|
||||||
|
"|",
|
||||||
|
Next and Next.message or "none"
|
||||||
|
)
|
||||||
|
-- if value > 0 and Previous and Previous.Message then
|
||||||
|
-- -- label.Position = previous.Message.Position
|
||||||
|
-- label.Position += UDim2.new(0, 0, 1, 0)
|
||||||
|
-- elseif value < 1 and Next.Message then
|
||||||
|
-- -- label.Position = previous.Message.Position
|
||||||
|
-- label.Position -= UDim2.new(0, 0, 1, 0)
|
||||||
|
-- end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Handles the rendering of the text objects in their appropriate places
|
-- Handles the rendering of the text objects in their appropriate places
|
||||||
function Chat:UpdateQueue(field, diff)
|
function Chat:UpdateQueue(field, diff)
|
||||||
|
print "Updating queue"
|
||||||
-- Have to do some sort of correction here
|
-- Have to do some sort of correction here
|
||||||
for i = #self.MessageQueue, 1, -1 do
|
for i = #self.MessageQueue, 1, -1 do
|
||||||
if self.MessageQueue[i] then
|
if self.MessageQueue[i] then
|
||||||
|
|
@ -356,15 +363,15 @@ function Chat:CheckIfInBounds(value)
|
||||||
if
|
if
|
||||||
value > 0
|
value > 0
|
||||||
and Chat.MessageQueue[1]
|
and Chat.MessageQueue[1]
|
||||||
and Chat.MessageQueue[1]["Player"]
|
and Chat.MessageQueue[1].Player
|
||||||
and Chat.MessageQueue[1]["Player"].Position.Y.Scale == 0
|
and Chat.MessageQueue[1].Player.Position.Y.Scale == 0
|
||||||
then
|
then
|
||||||
return true
|
return true
|
||||||
elseif
|
elseif
|
||||||
value < 0
|
value < 0
|
||||||
and Chat.MessageQueue[1]
|
and Chat.MessageQueue[1]
|
||||||
and Chat.MessageQueue[1]["Player"]
|
and Chat.MessageQueue[1].Player
|
||||||
and Chat.MessageQueue[1]["Player"].Position.Y.Scale < 0
|
and Chat.MessageQueue[1].Player.Position.Y.Scale < 0
|
||||||
then
|
then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
@ -376,7 +383,7 @@ end
|
||||||
function Chat:ComputeSpaceString(pLabel)
|
function Chat:ComputeSpaceString(pLabel)
|
||||||
local nString = " "
|
local nString = " "
|
||||||
if not self.TempSpaceLabel then
|
if not self.TempSpaceLabel then
|
||||||
self.TempSpaceLabel = Create "TextButton" {
|
self.TempSpaceLabel = New "TextButton" {
|
||||||
Size = UDim2.new(
|
Size = UDim2.new(
|
||||||
0,
|
0,
|
||||||
pLabel.AbsoluteSize.X,
|
pLabel.AbsoluteSize.X,
|
||||||
|
|
@ -427,31 +434,24 @@ function Chat:UpdateChat(cPlayer, message)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- function Chat:RecalculateSpacing()
|
-- function Chat:RecalculateSpacing()
|
||||||
--[[for i = 1, #self.MessageQueue do
|
-- for i = 1, #self.MessageQueue do
|
||||||
local pLabel = self.MessageQueue[i]['Player']
|
-- local pLabel = self.MessageQueue[i].Player
|
||||||
local mLabel = self.MessageQueue[i]['Message']
|
-- local mLabel = self.MessageQueue[i].Message
|
||||||
|
|
||||||
local prevYScale = mLabel.Size.Y.Scale
|
-- local prevYScale = mLabel.Size.Y.Scale
|
||||||
local prevText = mLabel.Text
|
-- local prevText = mLabel.Text
|
||||||
mLabel.Text = prevText
|
-- mLabel.Text = prevText
|
||||||
|
|
||||||
local heightField = mLabel.TextBounds.Y
|
-- local heightField = mLabel.TextBounds.Y
|
||||||
|
|
||||||
mLabel.Size = UDim2.new(1, 0, heightField/self.RenderFrame.AbsoluteSize.Y, 0)
|
-- mLabel.Size =
|
||||||
pLabel.Size = mLabel.Size
|
-- UDim2.new(1, 0, heightField / self.RenderFrame.AbsoluteSize.Y, 0)
|
||||||
|
-- pLabel.Size = mLabel.Size
|
||||||
|
|
||||||
local diff = mLabel.Size.Y.Scale - prevYScale
|
-- local diff = mLabel.Size.Y.Scale - prevYScale
|
||||||
|
|
||||||
Chat:UpdateQueue(self.MessageQueue[i], diff)
|
-- Chat:UpdateQueue(self.MessageQueue[i], diff)
|
||||||
end ]]
|
-- end
|
||||||
-- end
|
|
||||||
|
|
||||||
-- function Chat:ApplyFilter(str)
|
|
||||||
-- --[[for _, word in pair(self.Filter_List) do
|
|
||||||
-- if string.find(str, word) then
|
|
||||||
-- str:gsub(word, '@#$^')
|
|
||||||
-- end
|
|
||||||
-- end ]]
|
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
-- NOTE: Temporarily disabled ring buffer to allow for chat to always wrap around
|
-- NOTE: Temporarily disabled ring buffer to allow for chat to always wrap around
|
||||||
|
|
@ -469,43 +469,42 @@ function Chat:CreateMessage(cPlayer, message)
|
||||||
-- If we ever hit the mark, which would be in every popular game btw
|
-- If we ever hit the mark, which would be in every popular game btw
|
||||||
-- we wrap around and reuse the labels
|
-- we wrap around and reuse the labels
|
||||||
if #self.MessageQueue > self.Configuration.HistoryLength then
|
if #self.MessageQueue > self.Configuration.HistoryLength then
|
||||||
--[[pLabel = self.MessageQueue[#self.MessageQueue]["Player"]
|
-- pLabel = self.MessageQueue[#self.MessageQueue].Player
|
||||||
mLabel = self.MessageQueue[#self.MessageQueue]["Message"]
|
-- mLabel = self.MessageQueue[#self.MessageQueue].Message
|
||||||
|
|
||||||
pLabel.Text = `{pName}:`
|
-- pLabel.Text = `{pName}:`
|
||||||
pLabel.Name = pName
|
-- pLabel.Name = pName
|
||||||
|
|
||||||
local pColor
|
-- if cPlayer.Neutral then
|
||||||
if cPlayer.Neutral then
|
-- pLabel.TextColor3 = Chat:ComputeChatColor(pName)
|
||||||
pLabel.TextColor3 = Chat:ComputeChatColor(pName)
|
-- else
|
||||||
else
|
-- pLabel.TextColor3 = cPlayer.TeamColor.Color
|
||||||
pLabel.TextColor3 = cPlayer.TeamColor.Color
|
-- end
|
||||||
end
|
|
||||||
|
|
||||||
local nString
|
-- local nString
|
||||||
|
|
||||||
if not self.CachedSpaceStrings_List[pName] then
|
-- if not self.CachedSpaceStrings_List[pName] then
|
||||||
nString = Chat:ComputeSpaceString(pLabel)
|
-- nString = Chat:ComputeSpaceString(pLabel)
|
||||||
else
|
-- else
|
||||||
nString = self.CachedSpaceStrings_List[pName]
|
-- nString = self.CachedSpaceStrings_List[pName]
|
||||||
end
|
-- end
|
||||||
|
|
||||||
mLabel.Text = ""
|
-- mLabel.Text = ""
|
||||||
mLabel.Name = `{pName} - message`
|
-- mLabel.Name = `{pName} - message`
|
||||||
mLabel.Text = nString .. message
|
-- mLabel.Text = nString .. message
|
||||||
|
|
||||||
mLabel.Parent = nil
|
-- mLabel.Parent = nil
|
||||||
mLabel.Parent = self.RenderFrame
|
-- mLabel.Parent = self.RenderFrame
|
||||||
|
|
||||||
mLabel.Position = UDim2.new(0, 0, 1, 0)
|
-- mLabel.Position = UDim2.new(0, 0, 1, 0)
|
||||||
pLabel.Position = UDim2.new(0, 0, 1, 0)]]
|
-- pLabel.Position = UDim2.new(0, 0, 1, 0)
|
||||||
|
|
||||||
-- Reinserted at the beginning, ring buffer
|
-- Reinserted at the beginning, ring buffer
|
||||||
self.MessageQueue[#self.MessageQueue] = nil
|
self.MessageQueue[#self.MessageQueue] = nil
|
||||||
end
|
end
|
||||||
--else
|
--else
|
||||||
-- Haven't hit the mark yet, so keep creating
|
-- Haven't hit the mark yet, so keep creating
|
||||||
pLabel = Create "TextLabel" {
|
pLabel = New "TextLabel" {
|
||||||
Name = pName,
|
Name = pName,
|
||||||
Text = `{pName}:`,
|
Text = `{pName}:`,
|
||||||
-- TextColor3 = pColor,
|
-- TextColor3 = pColor,
|
||||||
|
|
@ -537,7 +536,7 @@ function Chat:CreateMessage(cPlayer, message)
|
||||||
nString = self.CachedSpaceStrings_List[pName]
|
nString = self.CachedSpaceStrings_List[pName]
|
||||||
end
|
end
|
||||||
|
|
||||||
mLabel = Create "TextLabel" {
|
mLabel = New "TextLabel" {
|
||||||
Name = `{pName} - message`,
|
Name = `{pName} - message`,
|
||||||
-- Max is 3 lines
|
-- Max is 3 lines
|
||||||
Size = UDim2.new(1, 0, 0.5, 0),
|
Size = UDim2.new(1, 0, 0.5, 0),
|
||||||
|
|
@ -580,10 +579,11 @@ function Chat:CreateMessage(cPlayer, message)
|
||||||
UDim2.new(1, 0, heightField / self.RenderFrame.AbsoluteSize.Y, 0)
|
UDim2.new(1, 0, heightField / self.RenderFrame.AbsoluteSize.Y, 0)
|
||||||
pLabel.Size = mLabel.Size
|
pLabel.Size = mLabel.Size
|
||||||
|
|
||||||
local queueField = {}
|
local queueField = {
|
||||||
queueField.Player = pLabel
|
Player = pLabel,
|
||||||
queueField.Message = mLabel
|
Message = mLabel,
|
||||||
queueField.SpawnTime = tick() -- Used for identifying when to make the message invisible
|
SpawnTime = tick(), -- Used for identifying when to make the message invisible
|
||||||
|
}
|
||||||
|
|
||||||
table.insert(self.MessageQueue, 1, queueField)
|
table.insert(self.MessageQueue, 1, queueField)
|
||||||
Chat:UpdateQueue(queueField)
|
Chat:UpdateQueue(queueField)
|
||||||
|
|
@ -631,7 +631,7 @@ function Chat:CreateSafeChatOptions(list, rootButton)
|
||||||
rootButton = rootButton or self.SafeChatButton
|
rootButton = rootButton or self.SafeChatButton
|
||||||
for msg, _ in pairs(list) do
|
for msg, _ in pairs(list) do
|
||||||
if type(msg) == "string" then
|
if type(msg) == "string" then
|
||||||
local chatText = Create "TextButton" {
|
local chatText = New "TextButton" {
|
||||||
Name = msg,
|
Name = msg,
|
||||||
Text = msg,
|
Text = msg,
|
||||||
Size = UDim2.new(0, 100, 0, 20),
|
Size = UDim2.new(0, 100, 0, 20),
|
||||||
|
|
@ -682,13 +682,13 @@ function Chat:CreateSafeChatOptions(list, rootButton)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Chat:CreateSafeChatGui()
|
function Chat:CreateSafeChatGui()
|
||||||
self.SafeChatFrame = Create "Frame" {
|
self.SafeChatFrame = New "Frame" {
|
||||||
Name = "SafeChatFrame",
|
Name = "SafeChatFrame",
|
||||||
Size = UDim2.new(1, 0, 1, 0),
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
Parent = self.Gui,
|
Parent = self.Gui,
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
|
|
||||||
Create "ImageButton" {
|
New "ImageButton" {
|
||||||
Name = "SafeChatButton",
|
Name = "SafeChatButton",
|
||||||
Size = UDim2.new(0, 44, 0, 31),
|
Size = UDim2.new(0, 44, 0, 31),
|
||||||
Position = UDim2.new(0, 1, 0.35, 0),
|
Position = UDim2.new(0, 1, 0.35, 0),
|
||||||
|
|
@ -721,21 +721,21 @@ end
|
||||||
|
|
||||||
-- For touch devices we create a button instead
|
-- For touch devices we create a button instead
|
||||||
function Chat:CreateTouchButton()
|
function Chat:CreateTouchButton()
|
||||||
self.ChatTouchFrame = Create "Frame" {
|
self.ChatTouchFrame = New "Frame" {
|
||||||
Name = "ChatTouchFrame",
|
Name = "ChatTouchFrame",
|
||||||
Size = UDim2.new(0, 128, 0, 32),
|
Size = UDim2.new(0, 128, 0, 32),
|
||||||
Position = UDim2.new(0, 88, 0, 0),
|
Position = UDim2.new(0, 88, 0, 0),
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
Parent = self.Gui,
|
Parent = self.Gui,
|
||||||
|
|
||||||
Create "ImageButton" {
|
New "ImageButton" {
|
||||||
Name = "ChatLabel",
|
Name = "ChatLabel",
|
||||||
Size = UDim2.new(0, 74, 0, 28),
|
Size = UDim2.new(0, 74, 0, 28),
|
||||||
Position = UDim2.new(0, 0, 0, 0),
|
Position = UDim2.new(0, 0, 0, 0),
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
ZIndex = 2.0,
|
ZIndex = 2.0,
|
||||||
},
|
},
|
||||||
Create "ImageLabel" {
|
New "ImageLabel" {
|
||||||
Name = "Background",
|
Name = "Background",
|
||||||
Size = UDim2.new(1, 0, 1, 0),
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
Position = UDim2.new(0, 0, 0, 0),
|
Position = UDim2.new(0, 0, 0, 0),
|
||||||
|
|
@ -746,7 +746,7 @@ function Chat:CreateTouchButton()
|
||||||
self.TapToChatLabel = self.ChatTouchFrame.ChatLabel
|
self.TapToChatLabel = self.ChatTouchFrame.ChatLabel
|
||||||
self.TouchLabelBackground = self.ChatTouchFrame.Background
|
self.TouchLabelBackground = self.ChatTouchFrame.Background
|
||||||
|
|
||||||
self.ChatBar = Create "TextBox" {
|
self.ChatBar = New "TextBox" {
|
||||||
Name = "ChatBar",
|
Name = "ChatBar",
|
||||||
Size = UDim2.new(1, 0, 0.2, 0),
|
Size = UDim2.new(1, 0, 0.2, 0),
|
||||||
Position = UDim2.new(0, 0, 0.8, 800),
|
Position = UDim2.new(0, 0, 0.8, 800),
|
||||||
|
|
@ -778,7 +778,7 @@ function Chat:CreateChatBar()
|
||||||
return GuiService.UseLuaChat
|
return GuiService.UseLuaChat
|
||||||
end)
|
end)
|
||||||
if forceChatGUI or (status and result) then
|
if forceChatGUI or (status and result) then
|
||||||
self.ClickToChatButton = Create "TextButton" {
|
self.ClickToChatButton = New "TextButton" {
|
||||||
Name = "ClickToChat",
|
Name = "ClickToChat",
|
||||||
Size = UDim2.new(1, 0, 0, 20),
|
Size = UDim2.new(1, 0, 0, 20),
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
|
|
@ -791,7 +791,7 @@ function Chat:CreateChatBar()
|
||||||
FontSize = Enum.FontSize.Size12,
|
FontSize = Enum.FontSize.Size12,
|
||||||
}
|
}
|
||||||
|
|
||||||
self.ChatBar = Create "TextBox" {
|
self.ChatBar = New "TextBox" {
|
||||||
Name = "ChatBar",
|
Name = "ChatBar",
|
||||||
Size = UDim2.new(1, 0, 0, 20),
|
Size = UDim2.new(1, 0, 0, 20),
|
||||||
Position = UDim2.new(0, 0, 1, 0),
|
Position = UDim2.new(0, 0, 1, 0),
|
||||||
|
|
@ -814,7 +814,7 @@ function Chat:CreateChatBar()
|
||||||
if not success then
|
if not success then
|
||||||
GuiService:SetGlobalSizeOffsetPixel(0, -20)
|
GuiService:SetGlobalSizeOffsetPixel(0, -20)
|
||||||
end
|
end
|
||||||
-- CHatHotKey is '/'
|
-- ChatHotKey is '/'
|
||||||
GuiService:AddSpecialKey(Enum.SpecialKey.ChatHotkey)
|
GuiService:AddSpecialKey(Enum.SpecialKey.ChatHotkey)
|
||||||
GuiService.SpecialKeyPressed:connect(function(key)
|
GuiService.SpecialKeyPressed:connect(function(key)
|
||||||
if key == Enum.SpecialKey.ChatHotkey then
|
if key == Enum.SpecialKey.ChatHotkey then
|
||||||
|
|
@ -832,7 +832,7 @@ end
|
||||||
-- Done only once
|
-- Done only once
|
||||||
function Chat:CreateGui()
|
function Chat:CreateGui()
|
||||||
self.Gui = WaitForChild(CoreGuiService, "RobloxGui")
|
self.Gui = WaitForChild(CoreGuiService, "RobloxGui")
|
||||||
self.Frame = Create "Frame" {
|
self.Frame = New "Frame" {
|
||||||
Name = "ChatFrame",
|
Name = "ChatFrame",
|
||||||
--Size = self.Configuration.Size;
|
--Size = self.Configuration.Size;
|
||||||
Size = UDim2.new(0, 500, 0, 120),
|
Size = UDim2.new(0, 500, 0, 120),
|
||||||
|
|
@ -843,7 +843,7 @@ function Chat:CreateGui()
|
||||||
Parent = self.Gui,
|
Parent = self.Gui,
|
||||||
Active = false,
|
Active = false,
|
||||||
|
|
||||||
Create "ImageLabel" {
|
New "ImageLabel" {
|
||||||
Name = "Background",
|
Name = "Background",
|
||||||
Image = "http://banland.xyz/asset/?id=97120937", --96551212';
|
Image = "http://banland.xyz/asset/?id=97120937", --96551212';
|
||||||
Size = UDim2.new(1.3, 0, 1.64, 0),
|
Size = UDim2.new(1.3, 0, 1.64, 0),
|
||||||
|
|
@ -853,7 +853,7 @@ function Chat:CreateGui()
|
||||||
Visible = false,
|
Visible = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
Create "Frame" {
|
New "Frame" {
|
||||||
Name = "Border",
|
Name = "Border",
|
||||||
Size = UDim2.new(1, 0, 0, 1),
|
Size = UDim2.new(1, 0, 0, 1),
|
||||||
Position = UDim2.new(0, 0, 0.8, 0),
|
Position = UDim2.new(0, 0, 0.8, 0),
|
||||||
|
|
@ -863,7 +863,7 @@ function Chat:CreateGui()
|
||||||
Visible = false,
|
Visible = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
Create "Frame" {
|
New "Frame" {
|
||||||
Name = "ChatRenderFrame",
|
Name = "ChatRenderFrame",
|
||||||
Size = UDim2.new(1.02, 0, 1.01, 0),
|
Size = UDim2.new(1.02, 0, 1.01, 0),
|
||||||
Position = UDim2.new(0, 0, 0, 0),
|
Position = UDim2.new(0, 0, 0, 0),
|
||||||
|
|
@ -882,10 +882,7 @@ function Chat:CreateGui()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self.RenderFrame = self.Frame.ChatRenderFrame
|
self.RenderFrame = self.Frame.ChatRenderFrame
|
||||||
if Chat:IsTouchDevice() then
|
if self.Frame.AbsoluteSize.Y > 120 then
|
||||||
self.Frame.Position = self.Configuration.Position
|
|
||||||
self.RenderFrame.Size = UDim2.new(1, 0, 1, 0)
|
|
||||||
elseif self.Frame.AbsoluteSize.Y > 120 then
|
|
||||||
Chat:ScreenSizeChanged()
|
Chat:ScreenSizeChanged()
|
||||||
self.Gui.Changed:connect(function(property)
|
self.Gui.Changed:connect(function(property)
|
||||||
if property == "AbsoluteSize" then
|
if property == "AbsoluteSize" then
|
||||||
|
|
@ -895,35 +892,19 @@ function Chat:CreateGui()
|
||||||
end
|
end
|
||||||
|
|
||||||
if forceChatGUI or Player.ChatMode == Enum.ChatMode.TextAndMenu then
|
if forceChatGUI or Player.ChatMode == Enum.ChatMode.TextAndMenu then
|
||||||
if Chat:IsTouchDevice() then
|
Chat:CreateChatBar()
|
||||||
Chat:CreateTouchButton()
|
-- Chat:CreateSafeChatGui()
|
||||||
else
|
|
||||||
Chat:CreateChatBar()
|
|
||||||
--Chat:CreateSafeChatGui()
|
|
||||||
end
|
|
||||||
|
|
||||||
if self.ChatBar then
|
if self.ChatBar then
|
||||||
self.ChatBar.FocusLost:connect(function(enterPressed)
|
self.ChatBar.FocusLost:connect(function(enterPressed)
|
||||||
Chat.GotFocus = false
|
Chat.GotFocus = false
|
||||||
if Chat:IsTouchDevice() then
|
|
||||||
self.ChatBar.Visible = false
|
|
||||||
self.TapToChatLabel.Visible = true
|
|
||||||
|
|
||||||
if self.TouchLabelBackground then
|
|
||||||
self.TouchLabelBackground.Visible = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if enterPressed and self.ChatBar.Text ~= "" then
|
if enterPressed and self.ChatBar.Text ~= "" then
|
||||||
local cText = self.ChatBar.Text
|
local cText = self.ChatBar.Text
|
||||||
if string.sub(self.ChatBar.Text, 1, 1) == "%" then
|
if string.sub(self.ChatBar.Text, 1, 1) == "%" then
|
||||||
cText = "(TEAM) " .. string.sub(cText, 2, #cText)
|
cText = "(TEAM) " .. string.sub(cText, 2, #cText)
|
||||||
pcall(function()
|
pcall(PlayersService.TeamChat, PlayersService, cText)
|
||||||
PlayersService:TeamChat(cText)
|
|
||||||
end)
|
|
||||||
else
|
else
|
||||||
pcall(function()
|
pcall(PlayersService.Chat, PlayersService, cText)
|
||||||
PlayersService:Chat(cText)
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.ClickToChatButton then
|
if self.ClickToChatButton then
|
||||||
|
|
@ -932,7 +913,7 @@ function Chat:CreateGui()
|
||||||
self.ChatBar.Text = ""
|
self.ChatBar.Text = ""
|
||||||
end
|
end
|
||||||
Spawn(function()
|
Spawn(function()
|
||||||
wait(5.0)
|
wait(5)
|
||||||
if not Chat.GotFocus then
|
if not Chat.GotFocus then
|
||||||
Chat.Frame.Background.Visible = false
|
Chat.Frame.Background.Visible = false
|
||||||
end
|
end
|
||||||
|
|
@ -965,14 +946,12 @@ function Input:OnMouseScroll()
|
||||||
if Chat:CheckIfInBounds(Input.Speed) then
|
if Chat:CheckIfInBounds(Input.Speed) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- Chat:ScrollQueue()
|
Chat:ScrollQueue(Input.Speed)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Input:ApplySpeed(value)
|
function Input:ApplySpeed(value)
|
||||||
Input.Speed += value
|
Input.Speed += value
|
||||||
if not self.Simulating then
|
Input:OnMouseScroll()
|
||||||
Input:OnMouseScroll()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Input:Initialize()
|
function Input:Initialize()
|
||||||
|
|
@ -1080,7 +1059,7 @@ function Chat:CoreGuiChanged(coreGuiType, enabled)
|
||||||
self.Frame.Visible = enabled
|
self.Frame.Visible = enabled
|
||||||
end
|
end
|
||||||
|
|
||||||
if not Chat:IsTouchDevice() and self.ChatBar then
|
if self.ChatBar then
|
||||||
self.ChatBar.Visible = enabled
|
self.ChatBar.Visible = enabled
|
||||||
if enabled then
|
if enabled then
|
||||||
GuiService:SetGlobalGuiInset(0, 0, 0, 20)
|
GuiService:SetGlobalGuiInset(0, 0, 0, 20)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
local ThumbnailGenerator = game:GetService "ThumbnailGenerator"
|
local ThumbnailGenerator = game:GetService "ThumbnailGenerator"
|
||||||
local RenderModule = require "../Modules/Render.luau"
|
local RenderModule = require "../Modules/Render.luau"
|
||||||
|
local New = (require "../Modules/New").New
|
||||||
local Render = RenderModule(_BASE_URL, _PING_URL, _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
|
local Render = RenderModule(_BASE_URL, _PING_URL, _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
|
||||||
|
|
||||||
local player =
|
local player =
|
||||||
|
|
@ -18,12 +19,13 @@ local CameraAngle = player.Character.Head.CFrame
|
||||||
local CameraPosition = CameraAngle
|
local CameraPosition = CameraAngle
|
||||||
+ CFrame.Angles(0, math.pi, 0).lookVector.unit * 2.75
|
+ CFrame.Angles(0, math.pi, 0).lookVector.unit * 2.75
|
||||||
|
|
||||||
local Camera = Instance.new "Camera"
|
local Camera = New "Camera" {
|
||||||
Camera.Name = "ThumbnailCamera"
|
Name = "ThumbnailCamera",
|
||||||
Camera.CameraType = Enum.CameraType.Scriptable
|
CameraType = Enum.CameraType.Scriptable,
|
||||||
Camera.CoordinateFrame = CFrame.new(CameraPosition.p, CameraAngle.p)
|
CoordinateFrame = CFrame.new(CameraPosition.p, CameraAngle.p),
|
||||||
Camera.FieldOfView = 52.5
|
FieldOfView = 52.5,
|
||||||
Camera.Parent = player.Character
|
Parent = player.Character,
|
||||||
|
}
|
||||||
workspace.CurrentCamera = Camera
|
workspace.CurrentCamera = Camera
|
||||||
|
|
||||||
local clickHead = ThumbnailGenerator:Click("PNG", 300, 300, true)
|
local clickHead = ThumbnailGenerator:Click("PNG", 300, 300, true)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue