prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--[[Weight and CG]]
Tune.Weight = 3500 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 6 , --[[Height]] 3.5 , --[[Length]] 14 } Tune.WeightDist = 50 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) Tune.CGHeight = .01 -- Center of gravity height (studs relative to median of all wheels) Tune.WBVisible = false -- Makes the weight brick visible --Unsprung Weight Tune.FWheelDensity = .1 -- Front Wheel Density Tune.RWheelDensity = .1 -- Rear Wheel Density Tune.FWLgcyDensity = 1 -- Front Wheel Density [PGS OFF] Tune.RWLgcyDensity = 1 -- Rear Wheel Density [PGS OFF] Tune.AxleSize = 2 -- Size of structural members (larger = more stable/carry more weight) Tune.AxleDensity = .2 -- Density of structural members
--[=[ @param value T @return Option<T> Creates an Option instance with the given value. Throws an error if the given value is `nil`. ]=]
function Option.Some(value) assert(value ~= nil, "Option.Some() value cannot be nil") return Option._new(value) end
-- Initialize cached library list
_G.BTLibraryList = _G.BTLibraryList or {}; local LibraryList = _G.BTLibraryList; function GetLibrary(LibraryID) -- Returns the requested library -- Parse library ID local Creator, Name = LibraryID:match(NamePattern); local VersionRange, Major, Minor, Patch = LibraryID:match(VersionPattern); -- Convert version data to numbers local Major, Minor, Patch = tonumber(Major), tonumber(Minor), tonumber(Patch); -- Validate version information assert(VersionRange and (Major and Minor and Patch), 'Invalid version'); -- Ensure library ID was given if not (Creator and Name) then return; end; -- If no version provided, return latest if not VersionRange then for _, Library in ipairs(LibraryList) do if (Library.Creator:lower() == Creator:lower()) and (Library.Name:lower() == Name:lower()) then return Library.Library; end; end; -- If exact version provided, return that version elseif VersionRange == '' then for _, Library in ipairs(LibraryList) do if (Library.Creator:lower() == Creator:lower()) and (Library.Name:lower() == Name:lower()) and (Library.Version.Major == Major) and (Library.Version.Minor == Minor) and (Library.Version.Patch == Patch) then return Library.Library; end; end; -- If minor version specified, return latest compatible patch version elseif VersionRange == '~' then for _, Library in ipairs(LibraryList) do if (Library.Creator:lower() == Creator:lower()) and (Library.Name:lower() == Name:lower()) and (Library.Version.Major == Major) and (Library.Version.Minor == Minor) then return Library.Library; end; end; -- If major version specified, return latest compatible minor or patch version elseif VersionRange == '^' then for _, Library in ipairs(LibraryList) do if (Library.Creator:lower() == Creator:lower()) and (Library.Name:lower() == Name:lower()) and (Library.Version.Major == Major) then return Library.Library; end; end; end; end; function GetLibraries(...) -- Returns the requested libraries by their IDs local RequestedLibraries = { ... }; local FoundLibraries = {}; -- Get each library for Index, LibraryID in ipairs(RequestedLibraries) do FoundLibraries[Index] = GetLibrary(LibraryID); end; -- Return the found libraries return unpack(FoundLibraries, 1, table.maxn(FoundLibraries)); end; function RegisterLibrary(Metadata, Library) -- Registers the given library with its metadata into the cache list -- Validate metadata assert(type(Metadata.Name) == 'string', 'Library name must be a string'); assert(type(Metadata.Creator) == 'string', 'Library creator must be a string'); assert(Metadata.Name:match('^[A-Za-z0-9_-]+$'), 'Library name contains invalid characters'); assert(Metadata.Creator:match('^[A-Za-z0-9_-]+$'), 'Library creator contains invalid characters'); assert(type(Metadata.Version) == 'table', 'Invalid library version data'); assert(type(Metadata.Version.Major) == 'number', 'Invalid library version data'); assert(type(Metadata.Version.Minor) == 'number', 'Invalid library version data'); assert(type(Metadata.Version.Patch) == 'number', 'Invalid library version data'); -- Structure metadata local Metadata = { Name = Metadata.Name, Creator = Metadata.Creator, Version = { Major = Metadata.Version.Major, Minor = Metadata.Version.Minor, Patch = Metadata.Version.Patch }, Library = Library }; -- Insert the library and its metadata into the list table.insert(LibraryList, Metadata); -- Sort the list by version (from latest to earliest) table.sort(LibraryList, function (A, B) -- Sort by major version if A.Version.Major > B.Version.Major then return true; -- Sort by minor version when major version is same elseif A.Version.Major == B.Version.Major then if A.Version.Minor > B.Version.Minor then return true; -- Sort by patch version when same major and minor version elseif A.Version.Minor == B.Version.Minor then return A.Version.Patch > B.Version.Patch; else return false; end; -- Sort A after B if earlier version else return false; end; end); end;
--[[ Sets the new view, destructing any previous view if it exists, and then creating the specified new view. ]]
function UIController.setView(view, ...) coroutine.wrap( function(...) if not views[view] then Logger.warn("Tried to set UIController view to ", view, ", but it does not exist!") return end if currentView then currentView.exit() end currentView = views[view] currentView.enter(...) end )(...) end
--------------------------------------------------------------------------
local _WHEELTUNE = { --[[ SS6 Presets [Eco] WearSpeed = 1, TargetFriction = .7, MinFriction = .1, [Road] WearSpeed = 2, TargetFriction = .7, MinFriction = .1, [Sport] WearSpeed = 3, TargetFriction = .79, MinFriction = .1, ]] TireWearOn = true , --Friction and Wear FWearSpeed = .3 , FTargetFriction = 0.6 , FMinFriction = .5 , RWearSpeed = .3 , RTargetFriction = 0.5 , RMinFriction = .5 , --Tire Slip TCSOffRatio = 1/3 , WheelLockRatio = 1/2 , --SS6 Default = 1/4 WheelspinRatio = 1/1.1 , --SS6 Default = 1/1.2 --Wheel Properties FFrictionWeight = 1 , --SS6 Default = 1 RFrictionWeight = 1 , --SS6 Default = 1 FLgcyFrWeight = 10 , RLgcyFrWeight = 10 , FElasticity = 0 , --SS6 Default = .5 RElasticity = 0 , --SS6 Default = .5 FLgcyElasticity = 0 , RLgcyElasticity = 0 , FElastWeight = 1 , --SS6 Default = 1 RElastWeight = 1 , --SS6 Default = 1 FLgcyElWeight = 10 , RLgcyElWeight = 10 , --Wear Regen RegenSpeed = 1.8 --SS6 Default = 3.6 }
--[[handle.ChildRemoved:Connect(function(WHAT) --antinosound if WHAT.ClassName == "Sound" and not table.find(soundsdisabledfromrefit, WHAT.Name) then local backups = Instance.new("Sound", handle) backups.SoundId = WHAT.SoundId backups.Volume = WHAT.Volume backups.Name = WHAT.Name end end)--]]
--Stickmasterluke
sp=script.Parent taseduration=5 rate=.4 local s=Instance.new("Sound") s.SoundId="http://www.roblox.com/asset/?id=82277505" s.Looped=true if ypcall(function() joints={} local t=sp:FindFirstChild("Torso") if t~=nil then s.Parent=t s:Play() for i,v in ipairs(t:GetChildren()) do if v.className=="Motor" or v.className=="Motor6D" or v.className=="Weld" or v.className=="ManualWeld" then table.insert(joints,v) end end end if #joints>=1 then for i=1,taseduration/rate do for i,v in ipairs(joints) do if v~=nil then v.CurrentAngle=(math.random()-.5)*5 end end local h=sp:FindFirstChild("Humanoid") local t=sp:FindFirstChild("Torso") if t~=nil and h~=nil then h.Sit=true h.Torso.Anchored = true t.CFrame=t.CFrame*CFrame.Angles((math.random()-.5)*.5,(math.random()-.5)*.5,(math.random()-.5)*.5) wait(rate) end end local h=sp:FindFirstChild("Humanoid") h.Torso.Anchored = false h.Sit=false end s:Stop() script:remove() end) ~= true then wait() script:remove() end
--Motor6D's
local neck = torso.Neck local leftshoulder = torso["Left Shoulder"] local rightshoulder = torso["Right Shoulder"] local lefthip = torso["Left Hip"] local righthip = torso["Right Hip"] local root = scp.HumanoidRootPart.RootJoint
--[=[ Mounts Blend objects into an existing instance. :::tip Normally specifying ClassName as a property breaks mounting, since you can't write to ClassName. However, if you specify ClassName here, it will only listen to changes on children with that class name. ::: If multiple instances are named the same thing, then this will bind to both. :::tip This explicitly listens for any children underneath the mounted instance with the name passed in here. This is fine for small amounts of instances, like in most Gui hierarchies. However, it will be way less performance friendly for large class hierarchies. ::: ```lua maid:GiveTask(Blend.mount(frame, { Size = UDim2.new(0.5, 0, 0.5, 0); Blend.Find "MyUIScaleName" { Scale = 2; }; })) ``` @param name string @return function ]=]
function Blend.Find(name) assert(type(name) == "string", "Bad name") return function(props) assert(type(props) == "table", "Bad props") local mountProps = props local className if props.ClassName then className = props.ClassName mountProps = table.clone(props) mountProps.ClassName = nil else className = "Instance" end return function(parent) return RxInstanceUtils.observeChildrenOfNameBrio(parent, className, name):Pipe({ Rx.flatMap(function(brio) if brio:IsDead() then return end local maid = brio:ToMaid() local instance = brio:GetValue() maid:GiveTask(Blend.mount(instance, mountProps)) -- Dead after mounting? Clean up... -- Probably caused by name change. if brio:IsDead() then maid:DoCleaning() end -- Avoid emitting anything else so we don't get cleaned up return Rx.EMPTY end); }) end end end
--[[ Function called upon entering the state ]]
function PlayerSpectating.enter(stateMachine) end
-- (Giver - Loaded.)
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "Snake Eyes" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(1, 1, 2) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentForward = Vector3.new (-0, -0, -1) h.AttachmentPos = Vector3.new(0, -0.05, 0) h.AttachmentRight = Vector3.new (1, 0, 0) h.AttachmentUp = Vector3.new (0, 1, 0) wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
-- Персонаж горит 5 секунд
for i = 6, 2, -1 do -- наносим каждую секунду повреждения script.Parent.Parent.Humanoid:TakeDamage(15) -- уменьшаем размер огня script.Parent.Fire.Size=i wait(1) end
-- print("Деревьев: ",xix)
local primary = model.PrimaryPart local primaryCf = primary.CFrame for _,v in pairs(model:GetDescendants()) do if (v:IsA("BasePart")) then v.Size = (v.Size * scale) if (v ~= primary) then v.CFrame = (primaryCf + (primaryCf:inverse() * v.Position * scale)) end end end return model end local function spawnTree(pos) if rnd:NextInteger(1,10000) <= TREE_SCALE*100 then -- сажаем local mm=rnd:NextInteger(1,#tree) local co=tree[mm] local ct=co:Clone() ct=ScaleModel(ct,rnd:NextNumber(0.5,2))-- изменение размеров ct.Parent = game.Workspace.Tree ct.Name = "Tree " .. tostring(ct) local cx=pos.X local cz=pos.Z local cy=pos.y ct:SetPrimaryPartCFrame(CFrame.new(cx, cy + ct.PrimaryPart.Size.Y*0.5, cz)) -- переместить ct:SetPrimaryPartCFrame(ct:GetPrimaryPartCFrame() * CFrame.Angles(0, rnd:NextInteger(0,360), 0)) -- повернуть end end local chunks = {} local function chunkExists(chunkX, chunkZ) if not chunks[chunkX] then chunks[chunkX] = {} end return chunks[chunkX][chunkZ] end
--[[ Plays any relevant status related sound ]]
function VehicleSoundComponent:updateStatus(statusChanged) if statusChanged.Crashed and statusChanged.Crashed == true then local crashSound = CarSoundsFolder.Crashed[tonumber(math.random(1, 3))]:Clone() -- Parent then destroy it to play at that location crashSound.Parent = self.model.PrimaryPart crashSound:Play() Debris:AddItem(crashSound, 3) end if statusChanged.SharpTurn ~= nil then if statusChanged.SharpTurn == true and self.controller:getSpeed() > 80 then TweenService:Create(self.skid, tweenInfo, {Volume = 0.5}):Play() else TweenService:Create(self.skid, tweenInfo, {Volume = 0}):Play() end end if statusChanged.Boost ~= nil then if statusChanged.Boost then TweenService:Create(self.boost, tweenInfo, {Volume = 0.5}):Play() else TweenService:Create(self.boost, tweenInfo, {Volume = 0}):Play() end end end return VehicleSoundComponent
-- Percent chance an enemy spawns at a node (max value = 1.0)
GameSettings.EnemySpawnChance = { Easy = 0.35, Normal = 0.48, Hard = 0.65 } return GameSettings
--Variables
local GoodSound = game.SoundService.GoodSound local play = false
--Public functions
function DataStore:Get(defaultValue, dontAttemptGet) if dontAttemptGet then return self.value end local backupCount = 0 if not self.haveValue then while not self.haveValue do local success, error = self:_GetRaw():await() if not success then if self.backupRetries then backupCount = backupCount + 1 if backupCount >= self.backupRetries then self.backup = true self.haveValue = true self.value = self.backupValue break end end self:Debug("Get returned error:", error) end end if self.value ~= nil then for _, modifier in ipairs(self.beforeInitialGet) do self.value = modifier(self.value, self) end end end local value if self.value == nil and defaultValue ~= nil then --not using "not" because false is a possible value value = defaultValue else value = self.value end value = clone(value) self.value = value return value end function DataStore:GetAsync(...) return Promise.promisify(function(...) return self:Get(...) end)(...) end function DataStore:GetTable(default, ...) local success, result = self:GetTableAsync(default, ...):await() if not success then error(result) end return result end function DataStore:GetTableAsync(default, ...) assert(default ~= nil, "You must provide a default value.") return self:GetAsync(default, ...):andThen(function(result) local changed = false assert( typeof(result) == "table", ":GetTable/:GetTableAsync was used when the value in the data store isn't a table." ) for defaultKey, defaultValue in pairs(default) do if result[defaultKey] == nil then result[defaultKey] = defaultValue changed = true end end if changed then self:Set(result) end return result end) end function DataStore:Set(value, _dontCallOnUpdate) self.value = clone(value) self:_Update(_dontCallOnUpdate) end function DataStore:Update(updateFunc) self.value = updateFunc(self.value) self:_Update() end function DataStore:Increment(value, defaultValue) self:Set(self:Get(defaultValue) + value) end function DataStore:IncrementAsync(add, defaultValue) return self:GetAsync(defaultValue):andThen(function(value) return Promise.promisify(function() self:Set(value + add) end)() end) end function DataStore:OnUpdate(callback) table.insert(self.callbacks, callback) end function DataStore:BeforeInitialGet(modifier) table.insert(self.beforeInitialGet, modifier) end function DataStore:BeforeSave(modifier) self.beforeSave = modifier end function DataStore:AfterSave(callback) table.insert(self.afterSave, callback) end
-- METHODS
function Signal:Fire(...) for _, connection in pairs(self.connections) do --connection.Handler(...) task.spawn(connection.Handler, ...) end if self.totalWaiting > 0 then local packedArgs = table.pack(...) for waitingId, _ in pairs(self.waiting) do self.waiting[waitingId] = packedArgs end end end Signal.fire = Signal.Fire function Signal:Connect(handler) if not (type(handler) == "function") then error(("connect(%s)"):format(typeof(handler)), 2) end local signal = self local connectionId = HttpService:GenerateGUID(false) local connection = {} connection.Connected = true connection.ConnectionId = connectionId connection.Handler = handler self.connections[connectionId] = connection function connection:Disconnect() signal.connections[connectionId] = nil connection.Connected = false signal.totalConnections -= 1 if signal.connectionsChanged then signal.connectionsChanged:Fire(-1) end end connection.Destroy = connection.Disconnect connection.destroy = connection.Disconnect connection.disconnect = connection.Disconnect self.totalConnections += 1 if self.connectionsChanged then self.connectionsChanged:Fire(1) end return connection end Signal.connect = Signal.Connect function Signal:Wait() local waitingId = HttpService:GenerateGUID(false) self.waiting[waitingId] = true self.totalWaiting += 1 repeat heartbeat:Wait() until self.waiting[waitingId] ~= true self.totalWaiting -= 1 local args = self.waiting[waitingId] self.waiting[waitingId] = nil return unpack(args) end Signal.wait = Signal.Wait function Signal:Destroy() if self.bindableEvent then self.bindableEvent:Destroy() self.bindableEvent = nil end if self.connectionsChanged then self.connectionsChanged:Fire(-self.totalConnections) self.connectionsChanged:Destroy() self.connectionsChanged = nil end self.totalConnections = 0 for connectionId, connection in pairs(self.connections) do self.connections[connectionId] = nil end end Signal.destroy = Signal.Destroy Signal.Disconnect = Signal.Destroy Signal.disconnect = Signal.Destroy return Signal
-- Tools --
function Tools:RotateVector(Vector : Vector3, Rotation : Vector3 | CFrame) if typeof(Rotation) == 'Vector3' then Rotation = Tools:Vector3ToCFrameAngles(Rotation) end local RotatedVector = Rotation:VectorToWorldSpace(Vector) return RotatedVector end function Tools:GetObjectByAddress(Address, StartInput) local Current if StartInput then Current = StartInput else Current = game end for i, k in pairs(Address) do Current = Current:FindFirstChild(k) if Current == nil then return end end return Current end function Tools:Waitf(frames : number) if frames == 0 then return 0 end local start = os.clock() --Tools:SuperWait(frames / 60) task.wait(frames / 60) return os.clock() - start end function Tools:Vector3ToCFrameAngles(vector3) return CFrame.Angles(math.rad(vector3.X), math.rad(vector3.Y), math.rad(vector3.Z)) end function Tools:GetCFrameOrientation(c : CFrame) local Orientation = Vector3.new(c:ToOrientation()) Orientation = Tools:Vector3InDegrees(Orientation) return Orientation end local AvailableAnimations = {} local LoadedAnimations = {} function Tools:PlayAnim( Character : Model, Animation : string | number | Animation, PlayArguments : {fadeTime : number, weight : number, speed : number} ) local Humanoid = Character:FindFirstChildWhichIsA('Humanoid') if Animation == nil then return end if Humanoid:IsAncestorOf(workspace) == nil then warn('No animation argument') return end local Animator : Animator = Humanoid:FindFirstChild('Animator') or Instance.new('Animator', Humanoid) if typeof(Animation) == 'Animation' then -- shouldn't need to do anything for this elseif typeof(Animation) == 'string' then local AnimationInstance = Instance.new('Animation', Animator) AnimationInstance.Name = Animation AnimationInstance.AnimationId = Animation Animation = AnimationInstance elseif typeof(Animation) == 'number' then local AnimationInstance = Instance.new('Animation', Animator) AnimationInstance.Name = Animation AnimationInstance.AnimationId = 'rbxassetid://'.. tostring(Animation) Animation = AnimationInstance end local Anim : AnimationTrack local AnimatorLoadedAnimations = LoadedAnimations[Animator] if AnimatorLoadedAnimations == nil then LoadedAnimations[Animator] = {} AnimatorLoadedAnimations = LoadedAnimations[Animator] local KillCheck KillCheck = Humanoid.StateChanged:Connect(function(old, new) if new == Enum.HumanoidStateType.Dead then LoadedAnimations[Animator] = nil KillCheck:Disconnect() end end) end Anim = Animator:LoadAnimation(Animation) Animation:Destroy() table.insert(LoadedAnimations[Animator], Anim) if PlayArguments then Anim:Play(table.unpack(PlayArguments)) else Anim:AdjustWeight(0) Anim:Play() end local Ended, Destroyed Ended = Anim.Ended:Once(function() Ended:Disconnect() Anim:Destroy() end) Destroyed = Anim.Destroying:Once(function() Ended:Disconnect() end) return Anim end function Tools:GetPlayerByRig(rig) local PotentialPlayer = Players:FindFirstChild(rig.Name) if PotentialPlayer then if PotentialPlayer.Character == rig then return PotentialPlayer end end return nil end function Tools:Vector3InRadians(v) return Vector3.new(math.rad(v.x), math.rad(v.y), math.rad(v.z)) end function Tools:Vector3InDegrees(vector3) return Vector3.new( math.deg(vector3.x), math.deg(vector3.y), math.deg(vector3.z) ) end function Tools:SuperWait(sec) local Start = time() repeat task.desynchronize() task.synchronize() until time() - Start >= sec end function Tools:DictionaryConcat(a1 : {}, a2 : {}) local new = a1 for i, k in pairs(a2) do new[i] = k end return new end function Tools:GetChildrenNames(instance : Instance) local Children = instance:GetChildren() for i, k in ipairs(Children) do table.insert(Children, i, k.Name) table.remove(Children, i + 1) end return Children end function Tools:GetCameraAimAngle() local Player = Players.LocalPlayer local Character = Player.Character local Mouse = Player:GetMouse() local Camera = workspace.CurrentCamera local CameraAngle if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then -- if in shiftlock CameraAngle = Camera.CFrame.Rotation else -- if not in shiftlock local RootPart = Character:FindFirstChild('HumanoidRootPart') if RootPart == nil then return nil end CameraAngle = CFrame.lookAt(RootPart.Position, Mouse.Hit.Position).Rotation end return CameraAngle end function Tools:WaitUntilAnimationTrackLoaded(Animator : Animator, AnimationTrackId : string | number) if typeof(AnimationTrackId) == 'number' then AnimationTrackId = 'rbxassetid://'.. tostring(AnimationTrackId) end local AnimationLoaded = false local Animation = nil local function CheckIfInAnimator() local InAnimator = false for i, AnimationTrack : AnimationTrack in ipairs(Animator:GetPlayingAnimationTracks()) do if AnimationTrack.Animation.AnimationId == AnimationTrackId then Animation = AnimationTrack InAnimator = true break end end return InAnimator end AnimationLoaded = CheckIfInAnimator() if not AnimationLoaded then repeat task.wait(0) AnimationLoaded = CheckIfInAnimator() until AnimationLoaded end if Animation.Length > 0 then return end repeat task.wait(0) until Animation.Length > 0 end function Tools:BeamArc(Angle : number, Radius : number) local BeamPart = Instance.new('Part', workspace) BeamPart.Transparency = 1 BeamPart.CanCollide = false BeamPart.CanTouch = false BeamPart.CanQuery = false BeamPart.Size = Vector3.one BeamPart.Anchored = true local Attachment0 = Instance.new('Attachment', BeamPart) Attachment0.Name = 'Attachment0' Attachment0.CFrame = CFrame.new(0, 0, Radius) local Attachment1 = Instance.new('Attachment', BeamPart) Attachment1.Name = 'Attachment1' Attachment1.CFrame = (CFrame.Angles(0, math.rad(Angle), 0) * CFrame.new(0, 0, Radius)) Attachment1.CFrame *= CFrame.Angles(0, math.rad(180), 0) local Beam = Instance.new('Beam', BeamPart) Beam.Attachment0 = Attachment0 Beam.Attachment1 = Attachment1 Beam.CurveSize0 = (4/3) * math.tan(math.pi/8) * Radius * (Angle / 90) Beam.CurveSize1 = -Beam.CurveSize0 return BeamPart end function Tools:DeepCopy(Original) local Copy = {} for k, v in pairs(Original) do if type(v) == "table" then v = Tools:DeepCopy(v) end Copy[k] = v end return Copy end return Tools
-- Variables for Module Scripts
local screenSpace = require(Tool:WaitForChild("ScreenSpace")) local connection
--[[ Handles the PurchasingSeed stage during the First Time User Experience, which waits for the player to purchase a seed --]]
local ServerStorage = game:GetService("ServerStorage") local ReplicatedStorage = game:GetService("ReplicatedStorage") local FarmManagerServer = require(ServerStorage.Source.Farm.FarmManagerServer) local Market = require(ServerStorage.Source.Market) local FtueStage = require(ReplicatedStorage.Source.SharedConstants.FtueStage) local ItemCategory = require(ReplicatedStorage.Source.SharedConstants.ItemCategory) local PurchasingSeedFtueStage = {} function PurchasingSeedFtueStage.handleAsync(player: Player): FtueStage.EnumType? local farm = FarmManagerServer.getFarmForPlayer(player) farm:openDoor() repeat local playerWhoBought, _, itemCategory = Market.itemsPurchased:Wait() until playerWhoBought == player and itemCategory == ItemCategory.Seeds return FtueStage.PurchasingPot end return PurchasingSeedFtueStage
--[[Transmission]]
Tune.Clutch = true -- Implements a realistic clutch, change to "false" for the chassis to act like AC6.81T. Tune.TransModes = {"Semi","Manual","Auto"} --[[ [Modes] "Auto" : Automatic shifting "Semi" : Clutchless manual shifting, dual clutch transmission "Manual" : Manual shifting with clutch >Include within brackets eg: {"Semi"} or {"Auto", "Manual"} >First mode is default mode ]] Tune.ClutchMode = "New" --[[ [Modes] "New" : Speed controls clutch engagement (AC6C V1.2) "Old" : Speed and RPM control clutch engagement (AC6C V1.1) ]] Tune.ClutchType = "Clutch" --[[ [Types] "Clutch" : Standard clutch, recommended "TorqueConverter" : Torque converter, keeps RPM up "CVT" : CVT, found in scooters ]] --[[Transmission]] --Transmission Settings Tune.Stall = true -- Stalling, enables the car to stall. An ignition plugin would be necessary. Disables if Tune.Clutch is false. Tune.ClutchRel = false -- If true, the driver must let off the gas before shifting to a higher gear. Recommended false for beginners. Tune.ClutchEngage = 10 -- How fast engagement is (0 = instant, 99 = super slow) Tune.SpeedEngage = 20 -- Speed the clutch fully engages at (Based on SPS) --Clutch Kick (STANDARDIZED DO NOT TOUCH UNLESS YOU KNOW WHAT YOU'RE DOING) Tune.ClutchKick = false -- Enables clutch kicking, true or false Tune.KickMult = 5 -- Torque multiplier on launch Tune.KickSpeedThreshold = 20 -- Speed limit on launch (SPS) Tune.KickRPMThreshold = 2000 -- RPM limit on launch, range is created below redline --Clutch: "Old" mode Tune.ClutchRPMMult = 1.0 -- Clutch RPM multiplier, recommended to leave at 1.0 --Torque Converter: Tune.TQLock = false -- Torque converter starts locking at a certain RPM --Torque Converter and CVT: Tune.RPMEngage = 3500 -- Keeps RPMs to this level until passed --Neutral Rev Limiter (Avxnturador) Tune.NeutralLimit = false -- Enables a different redline RPM for when the car is in neutral Tune.NeutralRevRPM = 5000 -- The rev limiter when the car is in neutral Tune.LimitClutch = false -- Will also limit RPMs while the clutch is pressed down --Automatic Settings Tune.AutoShiftMode = "Speed" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] Tune.AutoShiftType = "DCT" --[[ [Types] "Rev" : Clutch engages fully once RPM reached (AC6C V1) "DCT" : Clutch engages after a set time has passed (AC6.81T) ]] Tune.AutoShiftVers = "New" --[[ [Versions] "New" : Shift from Reverse, Neutral, and Drive (AC6.81T) "Old" : Auto shifts into R or D when stopped. (AC6.52S2) ]] Tune.AutoUpThresh = -200 -- Automatic upshift point (relative to peak RPM, positive = Over-rev) Tune.AutoDownThresh = 1400 -- Automatic downshift point (relative to peak RPM, positive = Under-rev) --Automatic: Revmatching Tune.ShiftThrot = 100 -- Throttle level when shifting down to revmatch, 0 - 100% --Automatic: DCT Tune.ShiftUpTime = 0.25 -- Time required to shift into next gear, from a lower gear to a higher one. Tune.ShiftDnTime = 0.125 -- Time required to shift into next gear, from a higher gear to a lower one. --Gear Ratios Tune.FinalDrive = 3.545 Tune.Ratios = { --[[Reverse]] 3.28 , --[[Neutral]] 0 , --[[ 1 ]] 3.827 , --[[ 2 ]] 2.36 , --[[ 3 ]] 1.685 , --[[ 4 ]] 1.313 , --[[ 5 ]] 1 , --[[ 6 ]] .793 , } Tune.FDMult = 1 -- Ratio multiplier (keep this at 1 if car is not struggling with torque)
--Position
local MoneyPX = MoneyBag.Position.X.Scale local MoneyPY = MoneyBag.Position.Y.Scale
----[UPDATE SLIDERS WHEN GUI SIZE X CHANGES]----
local function ResizeSlider() if PluginGui.AbsoluteSize.X ~= PreviousSizeX then PreviousSizeX = Plugin.AbsoluteSize.X for i = 1, #ColorPickers do UpdateRGBSliders(i) end end end PluginGui.Changed:Connect(ResizeSlider)
-- Functions
local function sprint(Type) if Type == "Begin" then isSprinting = true humanoid.WalkSpeed *= 2 elseif Type == "Ended" then isSprinting = false humanoid.WalkSpeed = 16 end end
--// EDIT THIS SECTION IF DESIRED
local sens = 0.5 --sensitivity (changes Gs too) local min = 0.15 --min Gs for it to work local max = 1 --max Gs, will NOT exceed this number
-- Lewin4 2020/10/20 -- last edited 2020/10/20
local vat = script.Parent local teles = game.workspace.teles local function steppedOn(part) local parent = part.Parent if game.Players:GetPlayerFromCharacter(parent) then wait(0.5) parent.HumanoidRootPart.Position = vat.Position parent.HumanoidRootPart.Position = teles.tele1.Position end end vat.Touched:connect(steppedOn)
--Signals----------
ReplicatedStorage.Signals.Functions.RequestPlacement.OnServerInvoke = Place
--// Services
local L_98_ = game:GetService('RunService').RenderStepped local L_99_ = game:GetService('UserInputService')
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent local debounce = true local tool = game.ServerStorage.Stick
-- Create smoke for specified part (being destroyed)
local function createSmoke(targetPart) local pos = Vector3.new(0, 0, 0) local size = 3 if targetPart:IsA("Model") and targetPart.PrimaryPart then --local plate = targetPart:FindFirstChild("Plate", true) local plate = targetPart.PrimaryPart pos = plate.Position size = 1*plate.Size.X else pos = targetPart.Position size = 1*targetPart.Size.X end local smokePart = Instance.new("Part") smokePart.Name = "SmokePart" smokePart.Transparency = 1 smokePart.CanCollide = false smokePart.Anchored = true --smokePart.Position = getPositionRelativetoBase(smokePart, pos) + Vector3.new(0, 1, 0) smokePart.Position = pos + Vector3.new(0, 1, 0) smokePart.Size = Vector3.new(1, 1, 1) smokePart.Parent = mapManager.getMap() local crushSound local randomNum = math.random(1,3) if randomNum == 1 then crushSound = ServerStorage.CrushSound1:Clone() elseif randomNum == 2 then crushSound = ServerStorage.CrushSound2:Clone() elseif randomNum == 3 then crushSound = ServerStorage.CrushSound3:Clone() end crushSound.Parent = smokePart if not crushSound.IsLoaded then crushSound.Loaded:wait() end crushSound:Play() local smoke = Instance.new("Smoke") smoke.Parent = smokePart smoke.RiseVelocity = 0 smoke.Size = size DebrisService:AddItem(smokePart, 2) end
--// Renders
local L_161_ L_103_:connect(function() if L_15_ then L_156_, L_157_ = L_156_ or 0, L_157_ or 0 if L_159_ == nil or L_158_ == nil then L_159_ = L_45_.C0 L_158_ = L_45_.C1 end local L_271_ = (math.sin(L_150_ * L_152_ / 2) * L_151_) local L_272_ = (math.sin(L_150_ * L_152_) * L_151_) local L_273_ = CFrame.new(L_271_, L_272_, 0.02) local L_274_ = (math.sin(L_146_ * L_149_ / 2) * L_148_) local L_275_ = (math.cos(L_146_ * L_149_) * L_148_) local L_276_ = CFrame.new(L_274_, L_275_, 0.02) if L_143_ then L_150_ = L_150_ + .017 if L_24_.WalkAnimEnabled == true then L_144_ = L_273_ else L_144_ = CFrame.new() end else L_150_ = 0 L_144_ = CFrame.new() end L_142_.t = Vector3.new(L_137_, L_138_, 0) local L_277_ = L_142_.p local L_278_ = L_277_.X / L_139_ * (L_61_ and L_141_ or L_140_) local L_279_ = L_277_.Y / L_139_ * (L_61_ and L_141_ or L_140_) L_5_.CFrame = L_5_.CFrame:lerp(L_5_.CFrame * L_145_, 0.2) if L_61_ then L_133_ = CFrame.Angles(math.rad(-L_278_), math.rad(L_278_), math.rad(L_279_)) * CFrame.fromAxisAngle(Vector3.new(5, 0, -1), math.rad(L_278_)) L_146_ = 0 L_147_ = CFrame.new() elseif not L_61_ then L_133_ = CFrame.Angles(math.rad(-L_279_), math.rad(-L_278_), math.rad(-L_278_)) * CFrame.fromAxisAngle(L_44_.Position, math.rad(-L_279_)) L_146_ = L_146_ + 0.017 L_147_ = L_276_ end if L_24_.SwayEnabled == true then L_45_.C0 = L_45_.C0:lerp(L_159_ * L_133_ * L_144_ * L_147_, 0.1) else L_45_.C0 = L_45_.C0:lerp(L_159_ * L_144_, 0.1) end if L_64_ and not L_67_ and L_69_ and not L_61_ and not L_63_ and not Shooting then L_45_.C1 = L_45_.C1:lerp(L_45_.C0 * L_24_.SprintPos, 0.1) elseif not L_64_ and not L_67_ and not L_69_ and not L_61_ and not L_63_ and not Shooting and not L_76_ then L_45_.C1 = L_45_.C1:lerp(CFrame.new(), 0.1) end if L_61_ and not L_64_ then if not L_62_ then L_87_ = L_24_.AimCamRecoil L_86_ = L_24_.AimGunRecoil L_88_ = L_24_.AimKickback elseif L_62_ then if L_90_ == 1 then L_87_ = L_24_.AimCamRecoil / 1.5 L_86_ = L_24_.AimGunRecoil / 1.5 L_88_ = L_24_.AimKickback / 1.5 end if L_90_ == 2 then L_87_ = L_24_.AimCamRecoil / 2 L_86_ = L_24_.AimGunRecoil / 2 L_88_ = L_24_.AimKickback / 2 end end if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 then L_45_.C1 = L_45_.C1:lerp(L_45_.C0 * L_53_.CFrame:toObjectSpace(L_44_.CFrame), L_24_.AimSpeed) L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = true L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_ L_104_.MouseDeltaSensitivity = L_51_ end elseif not L_61_ and not L_64_ and L_15_ and not L_76_ then if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 then L_45_.C1 = L_45_.C1:lerp(CFrame.new(), L_24_.UnaimSpeed) L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = false L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_ L_104_.MouseDeltaSensitivity = L_52_ end if not L_62_ then L_87_ = L_24_.camrecoil L_86_ = L_24_.gunrecoil L_88_ = L_24_.Kickback elseif L_62_ then if L_90_ == 1 then L_87_ = L_24_.camrecoil / 1.5 L_86_ = L_24_.gunrecoil / 1.5 L_88_ = L_24_.Kickback / 1.5 end if L_90_ == 2 then L_87_ = L_24_.camrecoil / 2 L_86_ = L_24_.gunrecoil / 2 L_88_ = L_24_.Kickback / 2 end end end if Recoiling then L_145_ = CFrame.Angles(L_87_, 0, 0) --cam.CoordinateFrame = cam.CoordinateFrame * CFrame.fromEulerAnglesXYZ(math.rad(camrecoil*math.random(0,3)), math.rad(camrecoil*math.random(-1,1)), math.rad(camrecoil*math.random(-1,1))) L_45_.C0 = L_45_.C0:lerp(L_45_.C0 * CFrame.new(0, 0, L_86_) * CFrame.Angles(-math.rad(L_88_), 0, 0), 0.3) elseif not Recoiling then L_145_ = CFrame.Angles(0, 0, 0) L_45_.C0 = L_45_.C0:lerp(CFrame.new(), 0.2) end if L_62_ then L_3_:WaitForChild('Humanoid').Jump = false end if L_15_ then L_5_.FieldOfView = L_5_.FieldOfView * (1 - L_24_.ZoomSpeed) + (L_94_ * L_24_.ZoomSpeed) if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude >= 2 then L_87_ = L_24_.AimCamRecoil L_86_ = L_24_.AimGunRecoil L_88_ = L_24_.AimKickback L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = true L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_ L_104_.MouseDeltaSensitivity = L_51_ elseif (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 and not L_61_ and not L_62_ then L_87_ = L_24_.camrecoil L_86_ = L_24_.gunrecoil L_88_ = L_24_.Kickback L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = false L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_ L_104_.MouseDeltaSensitivity = L_52_ end end if L_15_ and L_24_.CameraGo then --and (char.Head.Position - cam.CoordinateFrame.p).magnitude < 2 then L_4_.TargetFilter = game.Workspace local L_280_ = L_3_:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(0, 1.5, 0) * CFrame.new(L_3_:WaitForChild("Humanoid").CameraOffset) L_48_.C0 = L_8_.CFrame:toObjectSpace(L_280_) L_48_.C1 = CFrame.Angles(-math.asin((L_4_.Hit.p - L_4_.Origin.p).unit.y), 0, 0) L_104_.MouseIconEnabled = false end if L_15_ and (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude >= 2 then if L_4_.Icon ~= "http://www.roblox.com/asset?id=" .. L_24_.TPSMouseIcon then L_4_.Icon = "http://www.roblox.com/asset?id=" .. L_24_.TPSMouseIcon end L_104_.MouseIconEnabled = true if L_3_:FindFirstChild('Right Arm') and L_3_:FindFirstChild('Left Arm') then L_3_['Right Arm'].LocalTransparencyModifier = 1 L_3_['Left Arm'].LocalTransparencyModifier = 1 end end; end end)
--local sounds = game:GetService('SoundService')
local runtime = game:GetService('RunService')
--!strict
local Sift = script.Parent.Parent local Util = require(Sift.Util)
--/Other
module.EnableLaser = false module.EnableFlashlight = true module.InfraRed = false
-- VIP SERVER OWNER
VipServerOwner = "Moderator";
--[[ streamable = Streamable.new(parent: Instance, childName: string) streamable:Observe(handler: (child: Instance, janitor: Janitor) -> void): Connection streamable:Destroy() --]]
type StreamableWithInstance = { Instance: Instance?, [any]: any, } local Janitor = require(script.Parent.Janitor) local Signal = require(script.Parent.Signal) local Streamable = {} Streamable.__index = Streamable function Streamable.new(parent: Instance, childName: string) local self: StreamableWithInstance = {} setmetatable(self, Streamable) self._janitor = Janitor.new() self._shown = Signal.new(self._janitor) self._shownJanitor = Janitor.new() self._janitor:Add(self._shownJanitor) self.Instance = parent:FindFirstChild(childName) local function OnInstanceSet() local instance = self.Instance if typeof(instance) == "Instance" then self._shown:Fire(instance, self._shownJanitor) self._shownJanitor:Add(instance:GetPropertyChangedSignal("Parent"):Connect(function() if not instance.Parent then self._shownJanitor:Clean() end end)) self._shownJanitor:Add(function() if self.Instance == instance then self.Instance = nil end end) end end local function OnChildAdded(child: Instance) if child.Name == childName and not self.Instance then self.Instance = child OnInstanceSet() end end self._janitor:Add(parent.ChildAdded:Connect(OnChildAdded)) if self.Instance then OnInstanceSet() end return self end function Streamable:Observe(handler) if self.Instance then task.spawn(handler, self.Instance, self._shownJanitor) end return self._shown:Connect(handler) end function Streamable:Destroy() self._janitor:Destroy() end export type Streamable = typeof(Streamable.new(workspace, "X")) return Streamable
-- Make the object appear when the ProximityPrompt is used
local function effect() if object then Prox.Enabled = true script.Parent.Transparency = 0 object.Transparency = 1 game.Workspace.Light.SpotLight.Enabled = false end end local function onPromptTriggered() if object then Prox.Enabled = false game.Workspace.swewe:Destroy() object.Transparency = 0 script.Parent.Transparency = 1 script.Parent.Parent.clockactivate.Transparency = 0 game.Workspace.Light.SpotLight.Enabled = true game.Workspace.serp.ind1.Script.Enabled = true game.Workspace.serp.ind2.Script.Disabled = false game.Workspace.Door:Destroy() game.Workspace.Dummy:Destroy() script.Parent.Parent.objective.BillboardGui.ImageLabel.Visible = false game.Workspace.Phone.Phone.BillboardGui.Enabled = true wait(120) effect() end end
--brightness
local amplitudeB = 2 --Cuanto varía hacia arriba y hacia abajo local offsetB = 2 --El punto medio
-- /** -- * Class representing one diff tuple. -- * Attempts to look like a two-element array (which is what this used to be). -- * @param {number} op Operation, one of: DIFF_DELETE, DIFF_INSERT, DIFF_EQUAL. -- * @param {string} text Text to be deleted, inserted, or retained. -- * @constructor -- */ -- ROBLOX FIXME Luau: Luau can't represent [1]: number, [2]: string
export type Diff = Array<any> local Diff = {} Diff.__index = Diff function Diff.new(op: number, text: string): Diff return (setmetatable({ op :: any, text }, Diff) :: any) :: Diff end
-- Represents a CastStateInfo :: https://etithespirit.github.io/FastCastAPIDocs/fastcast-objects/caststateinfo/
export type CastStateInfo = { UpdateConnection: RBXScriptSignal, HighFidelityBehavior: number, HighFidelitySegmentSize: number, Paused: boolean, TotalRuntime: number, DistanceCovered: number, IsActivelySimulatingPierce: boolean, IsActivelyResimulating: boolean, CancelHighResCast: boolean, Trajectories: {[number]: CastTrajectory} }
--[=[ Gets and sets the target position. @prop t number @within AccelTween ]=]
--[=[ @param orElseFn () -> Option @return Option If caller has a value, returns itself. Otherwise, returns the option generated by the `orElseFn` function. ]=]
function Option:OrElse(orElseFn) if self:IsSome() then return self else local result = orElseFn() Option.Assert(result) return result end end
---////==========================================\\\--- --To install the product, group them together with the switch. You can have multiple products installed and be controlled by one switch!-- --Products include, but not limited to: some fans, lights, alarms, etc. ---////==========================================\\\---
IsOn = false function onClicked() if IsOn == false then IsOn = true script.Parent.Parent.Switch2.Transparency = 1 script.Parent.Parent.Switch1.Transparency = 0 script.Parent.Parent.IsOn.Value = true elseif IsOn == true then IsOn = false script.Parent.Parent.Switch2.Transparency = 0 script.Parent.Parent.Switch1.Transparency = 1 script.Parent.Parent.IsOn.Value = false end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- init chat bubble tables
local function initChatBubbleType(chatBubbleType, fileName, imposterFileName, isInset, sliceRect) this.ChatBubble[chatBubbleType] = createChatBubbleMain(fileName, sliceRect) this.ChatBubbleWithTail[chatBubbleType] = createChatBubbleWithTail(fileName, UDim2.new(0.5, -CHAT_BUBBLE_TAIL_HEIGHT, 1, isInset and -1 or 0), UDim2.new(0, 30, 0, CHAT_BUBBLE_TAIL_HEIGHT), sliceRect) this.ScalingChatBubbleWithTail[chatBubbleType] = createScaledChatBubbleWithTail(fileName, 0.5, UDim2.new(-0.5, 0, 0, isInset and -1 or 0), sliceRect) end initChatBubbleType(BubbleColor.WHITE, "ui/dialog_white", "ui/chatBubble_white_notify_bkg", false, Rect.new(5,5,15,15)) initChatBubbleType(BubbleColor.BLUE, "ui/dialog_blue", "ui/chatBubble_blue_notify_bkg", true, Rect.new(7,7,33,33)) initChatBubbleType(BubbleColor.RED, "ui/dialog_red", "ui/chatBubble_red_notify_bkg", true, Rect.new(7,7,33,33)) initChatBubbleType(BubbleColor.GREEN, "ui/dialog_green", "ui/chatBubble_green_notify_bkg", true, Rect.new(7,7,33,33)) function this:SanitizeChatLine(msg) if string.len(msg) > MaxChatMessageLengthExclusive then return string.sub(msg, 1, MaxChatMessageLengthExclusive + string.len(ELIPSES)) else return msg end end local function createBillboardInstance(adornee) local billboardGui = Instance.new("BillboardGui") billboardGui.Adornee = adornee billboardGui.Size = UDim2.new(0,BILLBOARD_MAX_WIDTH,0,BILLBOARD_MAX_HEIGHT) billboardGui.StudsOffset = Vector3.new(0, 1.5, 2) billboardGui.Parent = BubbleChatScreenGui local billboardFrame = Instance.new("Frame") billboardFrame.Name = "BillboardFrame" billboardFrame.Size = UDim2.new(1,0,1,0) billboardFrame.Position = UDim2.new(0,0,-0.5,0) billboardFrame.BackgroundTransparency = 1 billboardFrame.Parent = billboardGui local billboardChildRemovedCon = nil billboardChildRemovedCon = billboardFrame.ChildRemoved:connect(function() if #billboardFrame:GetChildren() <= 1 then billboardChildRemovedCon:disconnect() billboardGui:Destroy() end end) this:CreateSmallTalkBubble(BubbleColor.WHITE).Parent = billboardFrame return billboardGui end function this:CreateBillboardGuiHelper(instance, onlyCharacter) if instance and not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then if not onlyCharacter then if instance:IsA("BasePart") then -- Create a new billboardGui object attached to this player local billboardGui = createBillboardInstance(instance) this.CharacterSortedMsg:Get(instance)["BillboardGui"] = billboardGui return end end if instance:IsA("Model") then local head = instance:FindFirstChild("Head") if head and head:IsA("BasePart") then -- Create a new billboardGui object attached to this player local billboardGui = createBillboardInstance(head) this.CharacterSortedMsg:Get(instance)["BillboardGui"] = billboardGui end end end end local function distanceToBubbleOrigin(origin) if not origin then return 100000 end return (origin.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude end local function isPartOfLocalPlayer(adornee) if adornee and PlayersService.LocalPlayer.Character then return adornee:IsDescendantOf(PlayersService.LocalPlayer.Character) end end function this:SetBillboardLODNear(billboardGui) local isLocalPlayer = isPartOfLocalPlayer(billboardGui.Adornee) billboardGui.Size = UDim2.new(0, BILLBOARD_MAX_WIDTH, 0, BILLBOARD_MAX_HEIGHT) billboardGui.StudsOffset = Vector3.new(0, isLocalPlayer and 1.5 or 2.5, isLocalPlayer and 2 or 0.1) billboardGui.Enabled = true local billChildren = billboardGui.BillboardFrame:GetChildren() for i = 1, #billChildren do billChildren[i].Visible = true end billboardGui.BillboardFrame.SmallTalkBubble.Visible = false end function this:SetBillboardLODDistant(billboardGui) local isLocalPlayer = isPartOfLocalPlayer(billboardGui.Adornee) billboardGui.Size = UDim2.new(4,0,3,0) billboardGui.StudsOffset = Vector3.new(0, 3, isLocalPlayer and 2 or 0.1) billboardGui.Enabled = true local billChildren = billboardGui.BillboardFrame:GetChildren() for i = 1, #billChildren do billChildren[i].Visible = false end billboardGui.BillboardFrame.SmallTalkBubble.Visible = true end function this:SetBillboardLODVeryFar(billboardGui) billboardGui.Enabled = false end function this:SetBillboardGuiLOD(billboardGui, origin) if not origin then return end if origin:IsA("Model") then local head = origin:FindFirstChild("Head") if not head then origin = origin.PrimaryPart else origin = head end end local bubbleDistance = distanceToBubbleOrigin(origin) if bubbleDistance < NEAR_BUBBLE_DISTANCE then this:SetBillboardLODNear(billboardGui) elseif bubbleDistance >= NEAR_BUBBLE_DISTANCE and bubbleDistance < MAX_BUBBLE_DISTANCE then this:SetBillboardLODDistant(billboardGui) else this:SetBillboardLODVeryFar(billboardGui) end end function this:CameraCFrameChanged() for index, value in pairs(this.CharacterSortedMsg:GetData()) do local playerBillboardGui = value["BillboardGui"] if playerBillboardGui then this:SetBillboardGuiLOD(playerBillboardGui, index) end end end function this:CreateBubbleText(message) local bubbleText = Instance.new("TextLabel") bubbleText.Name = "BubbleText" bubbleText.TextColor3 = Color3.new(255,255,255) bubbleText.BackgroundTransparency = 1 bubbleText.Position = UDim2.new(0,CHAT_BUBBLE_WIDTH_PADDING/2,0,0) bubbleText.Size = UDim2.new(1,-CHAT_BUBBLE_WIDTH_PADDING,1,0) bubbleText.Font = CHAT_BUBBLE_FONT if shouldClipInGameChat then bubbleText.ClipsDescendants = true end bubbleText.TextWrapped = true bubbleText.FontSize = CHAT_BUBBLE_FONT_SIZE bubbleText.Text = message bubbleText.Visible = false return bubbleText end function this:CreateSmallTalkBubble(chatBubbleType) local smallTalkBubble = this.ScalingChatBubbleWithTail[chatBubbleType]:Clone() smallTalkBubble.Name = "SmallTalkBubble" smallTalkBubble.AnchorPoint = Vector2.new(0, 0.5) smallTalkBubble.Position = UDim2.new(0,0,0.5,0) smallTalkBubble.Visible = false local text = this:CreateBubbleText("...") text.TextScaled = true text.TextWrapped = false text.Visible = true text.Parent = smallTalkBubble return smallTalkBubble end function this:UpdateChatLinesForOrigin(origin, currentBubbleYPos) local bubbleQueue = this.CharacterSortedMsg:Get(origin).Fifo local bubbleQueueSize = bubbleQueue:Size() local bubbleQueueData = bubbleQueue:GetData() if #bubbleQueueData <= 1 then return end for index = (#bubbleQueueData - 1), 1, -1 do local value = bubbleQueueData[index] local bubble = value.RenderBubble if not bubble then return end local bubblePos = bubbleQueueSize - index + 1 if bubblePos > 1 then local tail = bubble:FindFirstChild("ChatBubbleTail") if tail then tail:Destroy() end local bubbleText = bubble:FindFirstChild("BubbleText") if bubbleText then bubbleText.TextTransparency = 0.5 end end local udimValue = UDim2.new( bubble.Position.X.Scale, bubble.Position.X.Offset, 1, currentBubbleYPos - bubble.Size.Y.Offset - CHAT_BUBBLE_TAIL_HEIGHT ) bubble:TweenPosition(udimValue, Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 0.1, true) currentBubbleYPos = currentBubbleYPos - bubble.Size.Y.Offset - CHAT_BUBBLE_TAIL_HEIGHT end end function this:DestroyBubble(bubbleQueue, bubbleToDestroy) if not bubbleQueue then return end if bubbleQueue:Empty() then return end local bubble = bubbleQueue:Front().RenderBubble if not bubble then bubbleQueue:PopFront() return end spawn(function() while bubbleQueue:Front().RenderBubble ~= bubbleToDestroy do wait() end bubble = bubbleQueue:Front().RenderBubble local timeBetween = 0 local bubbleText = bubble:FindFirstChild("BubbleText") local bubbleTail = bubble:FindFirstChild("ChatBubbleTail") while bubble and bubble.ImageTransparency < 1 do timeBetween = wait() if bubble then local fadeAmount = timeBetween * CHAT_BUBBLE_FADE_SPEED bubble.ImageTransparency = bubble.ImageTransparency + fadeAmount if bubbleText then bubbleText.TextTransparency = bubbleText.TextTransparency + fadeAmount end if bubbleTail then bubbleTail.ImageTransparency = bubbleTail.ImageTransparency + fadeAmount end end end if bubble then bubble:Destroy() bubbleQueue:PopFront() end end) end function this:CreateChatLineRender(instance, line, onlyCharacter, fifo) if not instance then return end if not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then this:CreateBillboardGuiHelper(instance, onlyCharacter) end local billboardGui = this.CharacterSortedMsg:Get(instance)["BillboardGui"] if billboardGui then local chatBubbleRender = this.ChatBubbleWithTail[line.BubbleColor]:Clone() chatBubbleRender.Visible = false local bubbleText = this:CreateBubbleText(line.Message) bubbleText.Parent = chatBubbleRender chatBubbleRender.Parent = billboardGui.BillboardFrame line.RenderBubble = chatBubbleRender local currentTextBounds = TextService:GetTextSize( bubbleText.Text, CHAT_BUBBLE_FONT_SIZE_INT, CHAT_BUBBLE_FONT, Vector2.new(BILLBOARD_MAX_WIDTH, BILLBOARD_MAX_HEIGHT)) local bubbleWidthScale = math.max((currentTextBounds.X + CHAT_BUBBLE_WIDTH_PADDING)/BILLBOARD_MAX_WIDTH, 0.1) local numOflines = (currentTextBounds.Y/CHAT_BUBBLE_FONT_SIZE_INT) -- prep chat bubble for tween chatBubbleRender.Size = UDim2.new(0,0,0,0) chatBubbleRender.Position = UDim2.new(0.5,0,1,0) local newChatBubbleOffsetSizeY = numOflines * CHAT_BUBBLE_LINE_HEIGHT chatBubbleRender:TweenSizeAndPosition(UDim2.new(bubbleWidthScale, 0, 0, newChatBubbleOffsetSizeY), UDim2.new( (1-bubbleWidthScale)/2, 0, 1, -newChatBubbleOffsetSizeY), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true, function() bubbleText.Visible = true end) -- todo: remove when over max bubbles this:SetBillboardGuiLOD(billboardGui, line.Origin) this:UpdateChatLinesForOrigin(line.Origin, -newChatBubbleOffsetSizeY) delay(line.BubbleDieDelay, function() this:DestroyBubble(fifo, chatBubbleRender) end) end end function this:OnPlayerChatMessage(sourcePlayer, message, targetPlayer) if not this:BubbleChatEnabled() then return end local localPlayer = PlayersService.LocalPlayer local fromOthers = localPlayer ~= nil and sourcePlayer ~= localPlayer local safeMessage = this:SanitizeChatLine(message) local line = createPlayerChatLine(sourcePlayer, safeMessage, not fromOthers) if sourcePlayer and line.Origin then local fifo = this.CharacterSortedMsg:Get(line.Origin).Fifo fifo:PushBack(line) --Game chat (badges) won't show up here this:CreateChatLineRender(sourcePlayer.Character, line, true, fifo) end end function this:OnGameChatMessage(origin, message, color) local localPlayer = PlayersService.LocalPlayer local fromOthers = localPlayer ~= nil and (localPlayer.Character ~= origin) local bubbleColor = BubbleColor.WHITE if color == Enum.ChatColor.Blue then bubbleColor = BubbleColor.BLUE elseif color == Enum.ChatColor.Green then bubbleColor = BubbleColor.GREEN elseif color == Enum.ChatColor.Red then bubbleColor = BubbleColor.RED end local safeMessage = this:SanitizeChatLine(message) local line = createGameChatLine(origin, safeMessage, not fromOthers, bubbleColor) this.CharacterSortedMsg:Get(line.Origin).Fifo:PushBack(line) this:CreateChatLineRender(origin, line, false, this.CharacterSortedMsg:Get(line.Origin).Fifo) end function this:BubbleChatEnabled() local clientChatModules = ChatService:FindFirstChild("ClientChatModules") if clientChatModules then local chatSettings = clientChatModules:FindFirstChild("ChatSettings") if chatSettings then local chatSettings = require(chatSettings) if chatSettings.BubbleChatEnabled ~= nil then return chatSettings.BubbleChatEnabled end end end return PlayersService.BubbleChat end function this:ShowOwnFilteredMessage() local clientChatModules = ChatService:FindFirstChild("ClientChatModules") if clientChatModules then local chatSettings = clientChatModules:FindFirstChild("ChatSettings") if chatSettings then chatSettings = require(chatSettings) return chatSettings.ShowUserOwnFilteredMessage end end return false end function findPlayer(playerName) for i,v in pairs(PlayersService:GetPlayers()) do if v.Name == playerName then return v end end end ChatService.Chatted:connect(function(origin, message, color) this:OnGameChatMessage(origin, message, color) end) local cameraChangedCon = nil if game.Workspace.CurrentCamera then cameraChangedCon = game.Workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):connect(function(prop) this:CameraCFrameChanged() end) end game.Workspace.Changed:connect(function(prop) if prop == "CurrentCamera" then if cameraChangedCon then cameraChangedCon:disconnect() end if game.Workspace.CurrentCamera then cameraChangedCon = game.Workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):connect(function(prop) this:CameraCFrameChanged() end) end end end) local AllowedMessageTypes = nil function getAllowedMessageTypes() if AllowedMessageTypes then return AllowedMessageTypes end local clientChatModules = ChatService:FindFirstChild("ClientChatModules") if clientChatModules then local chatSettings = clientChatModules:FindFirstChild("ChatSettings") if chatSettings then chatSettings = require(chatSettings) if chatSettings.BubbleChatMessageTypes then AllowedMessageTypes = chatSettings.BubbleChatMessageTypes return AllowedMessageTypes end end local chatConstants = clientChatModules:FindFirstChild("ChatConstants") if chatConstants then chatConstants = require(chatConstants) AllowedMessageTypes = {chatConstants.MessageTypeDefault, chatConstants.MessageTypeWhisper} end return AllowedMessageTypes end return {"Message", "Whisper"} end function checkAllowedMessageType(messageData) local allowedMessageTypes = getAllowedMessageTypes() for i = 1, #allowedMessageTypes do if allowedMessageTypes[i] == messageData.MessageType then return true end end return false end local ChatEvents = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents") local OnMessageDoneFiltering = ChatEvents:WaitForChild("OnMessageDoneFiltering") local OnNewMessage = ChatEvents:WaitForChild("OnNewMessage") OnNewMessage.OnClientEvent:connect(function(messageData, channelName) if not checkAllowedMessageType(messageData) then return end local sender = findPlayer(messageData.FromSpeaker) if not sender then return end if not messageData.IsFiltered or messageData.FromSpeaker == LocalPlayer.Name then if messageData.FromSpeaker ~= LocalPlayer.Name or this:ShowOwnFilteredMessage() then return end end this:OnPlayerChatMessage(sender, messageData.Message, nil) end) OnMessageDoneFiltering.OnClientEvent:connect(function(messageData, channelName) if not checkAllowedMessageType(messageData) then return end local sender = findPlayer(messageData.FromSpeaker) if not sender then return end if messageData.FromSpeaker == LocalPlayer.Name and not this:ShowOwnFilteredMessage() then return end this:OnPlayerChatMessage(sender, messageData.Message, nil) end)
--//Handling//--
SteeringAngle = 40 --{Steering angle in degrees} SteerSpeed = 0.085 --{.02 being slow, 0.1 being almost instantly} TiresFront = 2 --{1 = eco, 2 = road, 3 = sport} TiresRear = 2 --{1 = eco, 2 = road, 3 = sport} DownforceF = 0 --{[0-5] Provides downforce to the front at the cost of drag} DownforceR = 0 --{[0-5] Provides downforce to the rear at the cost of drag} BrakeBias = 72 --{100 = all on front || 0 = all on rear} BrakePower = 80 --{100 = strong brakes 0 = close to no brakes} TC = false ABS = true
--- Calls the transform function on this argument. -- The return value(s) from this function are passed to all of the other argument methods. -- Called automatically at instantiation
function Argument:Transform() if #self.TransformedValues ~= 0 then return end local rawValue = self.RawValue if self.Type.ArgumentOperatorAliases then rawValue = self.Type.ArgumentOperatorAliases[rawValue] or rawValue end if rawValue == "." and self.Type.Default then rawValue = self.Type.Default(self.Executor) or "" self.RawSegmentsAreAutocomplete = true end if rawValue == "?" and self.Type.Autocomplete then local strings, options = self:GetDefaultAutocomplete() if not options.IsPartial and #strings > 0 then rawValue = strings[math.random(1, #strings)] self.RawSegmentsAreAutocomplete = true end end if self.Type.Listable and #self.RawValue > 0 then local randomMatch = rawValue:match("^%?(%d+)$") if randomMatch then local maxSize = tonumber(randomMatch) if maxSize and maxSize > 0 then local items = {} local remainingItems, options = self:GetDefaultAutocomplete() if not options.IsPartial and #remainingItems > 0 then for _ = 1, math.min(maxSize, #remainingItems) do table.insert(items, table.remove(remainingItems, math.random(1, #remainingItems))) end rawValue = table.concat(items, ",") self.RawSegmentsAreAutocomplete = true end end elseif rawValue == "*" or rawValue == "**" then local strings, options = self:GetDefaultAutocomplete() if not options.IsPartial and #strings > 0 then if rawValue == "**" and self.Type.Default then local defaultString = self.Type.Default(self.Executor) or "" for i, string in ipairs(strings) do if string == defaultString then table.remove(strings, i) end end end rawValue = table.concat( strings, "," ) self.RawSegmentsAreAutocomplete = true end end rawValue = unescapeOperators(rawValue) local rawSegments = Util.SplitStringSimple(rawValue, ",") if #rawSegments == 0 then rawSegments = {""} end if rawValue:sub(#rawValue, #rawValue) == "," then rawSegments[#rawSegments + 1] = "" -- makes auto complete tick over right after pressing , end for i, rawSegment in ipairs(rawSegments) do self.RawSegments[i] = rawSegment self.TransformedValues[i] = { self:TransformSegment(rawSegment) } end self.TextSegmentInProgress = rawSegments[#rawSegments] else rawValue = unescapeOperators(rawValue) self.RawSegments[1] = unescapeOperators(rawValue) self.TransformedValues[1] = { self:TransformSegment(rawValue) } self.TextSegmentInProgress = self.RawValue end end function Argument:TransformSegment(rawSegment) if self.Type.Transform then return self.Type.Transform(rawSegment, self.Executor) else return rawSegment end end
-- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
local anim = animTable[animName][idx].anim if (toolAnimInstance ~= anim) then if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() transitionTime = 0 end -- load it to the humanoid; get AnimationTrack toolAnimTrack = humanoid:LoadAnimation(anim) if priority then toolAnimTrack.Priority = priority end -- play the animation toolAnimTrack:Play(transitionTime) toolAnimName = animName toolAnimInstance = anim currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:Connect(toolKeyFrameReachedFunc) end end function stopToolAnimations() local oldAnim = toolAnimName if (currentToolAnimKeyframeHandler ~= nil) then currentToolAnimKeyframeHandler:Disconnect() end toolAnimName = "" toolAnimInstance = nil if (toolAnimTrack ~= nil) then toolAnimTrack:Stop() toolAnimTrack:Destroy() toolAnimTrack = nil end return oldAnim end
--plays if your not me
function click() if master then Model.Sound:Play() pet:SetNetworkOwner() pet.Velocity = Vector3.new(0, 100, 0) pet:SetNetworkOwnershipAuto() end end Model.ClickDetector.MouseClick:Connect(click)
-- Decompiled with the Synapse X Luau decompiler.
return { Name = "run", Aliases = { ">" }, AutoExec = { "alias \"discard|Run a command and discard the output.\" replace ${run $1} .* \\\"\\\"" }, Description = "Runs a given command string (replacing embedded commands).", Group = "DefaultUtil", Args = { { Type = "string", Name = "Command", Description = "The command string to run" } }, Run = function(p1, p2) return p1.Cmdr.Util.RunCommandString(p1.Dispatcher, p2); end };
--[[ Returns the number of itemIds in the local user's inventory --]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local PlayerDataClient = require(ReplicatedStorage.Source.PlayerData.Client) local PlayerDataKey = require(ReplicatedStorage.Source.SharedConstants.PlayerDataKey) local getCategoryForItemId = require(ReplicatedStorage.Source.Utility.Farm.getCategoryForItemId) local function getItemAmountInInventory(itemId: string): number local categoryId = getCategoryForItemId(itemId) local inventory = PlayerDataClient.get(PlayerDataKey.Inventory) local categoryItemCount = inventory[categoryId] or {} local itemCount = categoryItemCount[itemId] or 0 return itemCount end return getItemAmountInInventory
--// All global vars will be wiped/replaced except script
return function(data) local playergui = service.PlayerGui local localplayer = service.Players.LocalPlayer local scr = client.UI.Prepare(script.Parent.Parent) local main = scr.Main local t1 = main.Title local t2 = main.Message local msg = data.Message local color = data.Color local found = client.UI.Get("Output") if found then for i,v in pairs(found) do local p = v.Object if p and p.Parent then p.Main.Position = UDim2.new(0, 0, 0.35, p.Main.Position.Y.Offset+50) end end end t2.Text = msg spawn(function() local sound = Instance.new("Sound",service.LocalContainer()) sound.SoundId = "rbxassetid://7152562261" sound.Volume = 0.1 sound:Play() wait(0.8) sound:Destroy() end) main.Size = UDim2.new(1, 0, 0, 0) gTable.Ready() main:TweenSize(UDim2.new(1, 0, 0, 50), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.1) wait(5) gTable.Destroy() end
--------LEFT DOOR --------
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(106) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
--[[ Randomly picks a tool type depending on weight, and spawns it in specified position. ]]
local function createRandomToolAtPosition(position) local randomPick = random:NextInteger(1, 100) local tool if randomPick > 92 then tool = torch:Clone() elseif randomPick > 80 then tool = gravityFuel:Clone() elseif randomPick > 10 then tool = repairKit:Clone() elseif randomPick > 5 then tool = smallCargo:Clone() elseif randomPick > 3 then tool = largeCargo:Clone() else tool = broom:Clone() end tool.Position = position tool.Parent = workspace.Tools tool:SetNetworkOwner(nil) end return function() local rooms = RoomManager.getRooms() for _, room in pairs(rooms) do local regions = room:getRegions() local toolsToSpawnPerRegion = TOTAL_TOOLS_PER_ROOM / #regions for _, region in pairs(regions) do for i = 1, toolsToSpawnPerRegion do local position = getRandomClearLocationInRegionAsync(region, AREA_CLEAR_SIZE) createRandomToolAtPosition(position) end end end end
--[[ The Module ]]
-- local BaseCharacterController = require(script.Parent:WaitForChild("BaseCharacterController")) local TouchThumbstick = setmetatable({}, BaseCharacterController) TouchThumbstick.__index = TouchThumbstick function TouchThumbstick.new() local self = setmetatable(BaseCharacterController.new(), TouchThumbstick) self.isFollowStick = false self.thumbstickFrame = nil self.moveTouchObject = nil self.onTouchMovedConn = nil self.onTouchEndedConn = nil self.screenPos = nil self.stickImage = nil self.thumbstickSize = nil -- Float return self end function TouchThumbstick:Enable(enable, uiParentFrame) if enable == nil then return false end -- If nil, return false (invalid argument) enable = enable and true or false -- Force anything non-nil to boolean before comparison if self.enabled == enable then return true end -- If no state change, return true indicating already in requested state self.moveVector = ZERO_VECTOR3 self.isJumping = false if enable then -- Enable if not self.thumbstickFrame then self:Create(uiParentFrame) end self.thumbstickFrame.Visible = true else -- Disable self.thumbstickFrame.Visible = false self:OnInputEnded() end self.enabled = enable end function TouchThumbstick:OnInputEnded() self.thumbstickFrame.Position = self.screenPos self.stickImage.Position = UDim2.new(0, self.thumbstickFrame.Size.X.Offset/2 - self.thumbstickSize/4, 0, self.thumbstickFrame.Size.Y.Offset/2 - self.thumbstickSize/4) self.moveVector = ZERO_VECTOR3 self.isJumping = false self.thumbstickFrame.Position = self.screenPos self.moveTouchObject = nil end function TouchThumbstick:Create(parentFrame) if self.thumbstickFrame then self.thumbstickFrame:Destroy() self.thumbstickFrame = nil if self.onTouchMovedConn then self.onTouchMovedConn:Disconnect() self.onTouchMovedConn = nil end if self.onTouchEndedConn then self.onTouchEndedConn:Disconnect() self.onTouchEndedConn = nil end end local minAxis = math.min(parentFrame.AbsoluteSize.x, parentFrame.AbsoluteSize.y) local isSmallScreen = minAxis <= 500 self.thumbstickSize = isSmallScreen and 70 or 120 self.screenPos = isSmallScreen and UDim2.new(0, (self.thumbstickSize/2) - 10, 1, -self.thumbstickSize - 20) or UDim2.new(0, self.thumbstickSize/2, 1, -self.thumbstickSize * 1.75) self.thumbstickFrame = Instance.new("Frame") self.thumbstickFrame.Name = "ThumbstickFrame" self.thumbstickFrame.Active = true self.thumbstickFrame.Visible = false self.thumbstickFrame.Size = UDim2.new(0, self.thumbstickSize, 0, self.thumbstickSize) self.thumbstickFrame.Position = self.screenPos self.thumbstickFrame.BackgroundTransparency = 1 local outerImage = Instance.new("ImageLabel") outerImage.Name = "OuterImage" outerImage.Image = TOUCH_CONTROL_SHEET outerImage.ImageRectOffset = Vector2.new() outerImage.ImageRectSize = Vector2.new(220, 220) outerImage.BackgroundTransparency = 1 outerImage.Size = UDim2.new(0, self.thumbstickSize, 0, self.thumbstickSize) outerImage.Position = UDim2.new(0, 0, 0, 0) outerImage.Parent = self.thumbstickFrame self.stickImage = Instance.new("ImageLabel") self.stickImage.Name = "StickImage" self.stickImage.Image = TOUCH_CONTROL_SHEET self.stickImage.ImageRectOffset = Vector2.new(220, 0) self.stickImage.ImageRectSize = Vector2.new(111, 111) self.stickImage.BackgroundTransparency = 1 self.stickImage.Size = UDim2.new(0, self.thumbstickSize/2, 0, self.thumbstickSize/2) self.stickImage.Position = UDim2.new(0, self.thumbstickSize/2 - self.thumbstickSize/4, 0, self.thumbstickSize/2 - self.thumbstickSize/4) self.stickImage.ZIndex = 2 self.stickImage.Parent = self.thumbstickFrame local centerPosition = nil local deadZone = 0.05 local function DoMove(direction) local currentMoveVector = direction / (self.thumbstickSize/2) -- Scaled Radial Dead Zone local inputAxisMagnitude = currentMoveVector.magnitude if inputAxisMagnitude < deadZone then currentMoveVector = Vector3.new() else currentMoveVector = currentMoveVector.unit * ((inputAxisMagnitude - deadZone) / (1 - deadZone)) -- NOTE: Making currentMoveVector a unit vector will cause the player to instantly go max speed -- must check for zero length vector is using unit currentMoveVector = Vector3.new(currentMoveVector.x, 0, currentMoveVector.y) end self.moveVector = currentMoveVector end local function MoveStick(pos) local relativePosition = Vector2.new(pos.x - centerPosition.x, pos.y - centerPosition.y) local length = relativePosition.magnitude local maxLength = self.thumbstickFrame.AbsoluteSize.x/2 if self.isFollowStick and length > maxLength then local offset = relativePosition.unit * maxLength self.thumbstickFrame.Position = UDim2.new( 0, pos.x - self.thumbstickFrame.AbsoluteSize.x/2 - offset.x, 0, pos.y - self.thumbstickFrame.AbsoluteSize.y/2 - offset.y) else length = math.min(length, maxLength) relativePosition = relativePosition.unit * length end self.stickImage.Position = UDim2.new(0, relativePosition.x + self.stickImage.AbsoluteSize.x/2, 0, relativePosition.y + self.stickImage.AbsoluteSize.y/2) end -- input connections self.thumbstickFrame.InputBegan:Connect(function(inputObject) --A touch that starts elsewhere on the screen will be sent to a frame's InputBegan event --if it moves over the frame. So we check that this is actually a new touch (inputObject.UserInputState ~= Enum.UserInputState.Begin) if self.moveTouchObject or inputObject.UserInputType ~= Enum.UserInputType.Touch or inputObject.UserInputState ~= Enum.UserInputState.Begin then return end self.moveTouchObject = inputObject self.thumbstickFrame.Position = UDim2.new(0, inputObject.Position.x - self.thumbstickFrame.Size.X.Offset/2, 0, inputObject.Position.y - self.thumbstickFrame.Size.Y.Offset/2) centerPosition = Vector2.new(self.thumbstickFrame.AbsolutePosition.x + self.thumbstickFrame.AbsoluteSize.x/2, self.thumbstickFrame.AbsolutePosition.y + self.thumbstickFrame.AbsoluteSize.y/2) local direction = Vector2.new(inputObject.Position.x - centerPosition.x, inputObject.Position.y - centerPosition.y) end) self.onTouchMovedConn = UserInputService.TouchMoved:Connect(function(inputObject, isProcessed) if inputObject == self.moveTouchObject then centerPosition = Vector2.new(self.thumbstickFrame.AbsolutePosition.x + self.thumbstickFrame.AbsoluteSize.x/2, self.thumbstickFrame.AbsolutePosition.y + self.thumbstickFrame.AbsoluteSize.y/2) local direction = Vector2.new(inputObject.Position.x - centerPosition.x, inputObject.Position.y - centerPosition.y) DoMove(direction) MoveStick(inputObject.Position) end end) self.onTouchEndedConn = UserInputService.TouchEnded:Connect(function(inputObject, isProcessed) if inputObject == self.moveTouchObject then self:OnInputEnded() end end) GuiService.MenuOpened:Connect(function() if self.moveTouchObject then self:OnInputEnded() end end) self.thumbstickFrame.Parent = parentFrame end return TouchThumbstick
-- Functions
local function rayPlane(p, v, o, n) local r = p - o local t = -r:Dot(n) / v:Dot(n) return p + t*v, t end
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onRunning(speed) if speed > 0.01 then playAnimation("walk", 0.1, Humanoid) if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then setAnimationSpeed(Humanoid.WalkSpeed / startspeed) end pose = "Running" else if emoteNames[currentAnim] == nil then playAnimation("idle", 0.1, Humanoid) pose = "Standing" end end end function onDied() pose = "Dead" end function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end function onClimbing(speed) playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / 12.0) pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() if (jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) end pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end function onSwimming(speed) if speed > 1.00 then local scale = 10.0 playAnimation("swim", 0.4, Humanoid) setAnimationSpeed(speed / scale) pose = "Swimming" else playAnimation("swimidle", 0.4, Humanoid) pose = "Standing" end end function getTool() for _, kid in ipairs(Figure:GetChildren()) do if kid.className == "Tool" then return kid end end return nil end function getToolAnim(tool) for _, c in ipairs(tool:GetChildren()) do if c.Name == "toolanim" and c.className == "StringValue" then return c end end return nil end function animateTool() if (toolAnim == "None") then --[[if Humanoid.RigType == Enum.HumanoidRigType.R15 then playToolAnimation("toolnone15", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle) elseif Humanoid.RigType == Enum.HumanoidRigType.R6 then playToolAnimation("toolnone16", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle) end]] playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle) return end if (toolAnim == "Slash") then playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action) return end if (toolAnim == "Lunge") then playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action) return end end function moveSit() wait() end local lastTick = 0 function move(time) local amplitude = 1 local frequency = 1 local deltaTime = time - lastTick lastTick = time local climbFudge = 0 local setAngles = false if (jumpAnimTime > 0) then jumpAnimTime = jumpAnimTime - deltaTime end if (pose == "FreeFall" and jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) elseif (pose == "Seated") then playAnimation("sit", 0.5, Humanoid) return elseif (pose == "Running") then playAnimation("walk", 0.1, Humanoid) elseif (pose == "PlatformStanding") then playAnimation("platformstand", 0.1, Humanoid) elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated") then
----------------------------------------
local Handle = WaitFor(Tool).Handle() local NextFireAt = WaitFor(Tool).NextFireAt() local ThrowSound = WaitFor(Handle).ThrowSound() local GrenadeScript = WaitFor(Tool).GrenadeScript() local function Now() return game.Workspace.DistributedGameTime end
-- Returns the ancestor that contains a Humanoid, if it exists
local function FindCharacterAncestor(subject) if subject and subject ~= Workspace then local humanoid = subject:FindFirstChild('Humanoid') if humanoid then return subject, humanoid else return FindCharacterAncestor(subject.Parent) end end return nil end local function OnExplosionHit(hitPart) if hitPart then local _, humanoid = FindCharacterAncestor(hitPart.Parent) if humanoid and humanoid.Health > 0 then CreatorTag:Clone().Parent=humanoid humanoid:TakeDamage(100) end end end local function OnTouched(otherPart) if Rocket and otherPart then -- Fly through anything in the ignore list if IGNORE_LIST[string.lower(otherPart.Name)] then return end -- Fly through the creator local myPlayer = CreatorTag.Value if myPlayer and myPlayer.Character and myPlayer.Character:IsAncestorOf(otherPart) then return end OnExplosionHit(hitPart) -- Boom local explosion = Instance.new('Explosion') explosion.BlastPressure = BLAST_PRESSURE explosion.BlastRadius = BLAST_RADIUS explosion.Position = Rocket.Position explosion.Hit:connect(OnExplosionHit) explosion.Parent = Workspace -- Move this script and the creator tag (so our custom logic can execute), then destroy the rocket script.Parent = explosion CreatorTag.Parent = script Rocket:Destroy() end end
--handler:FireServer("playSound",Your sound here)
script.Parent.Values.Gear.Changed:connect(function() mult=1 if script.Parent.Values.RPM.Value>5000 then shift=.2 end end) function makeTable(snd,pit,vol) local tbl = {} table.insert(tbl,snd) table.insert(tbl,pit) table.insert(tbl,vol) return tbl end function update(tbl) for _,i in pairs(tbl) do if i[2]~=i[1].Pitch then i[1].Pitch = i[2] end if i[3]~=i[1].Volume then i[1].Volume = i[3] end end end local lt = 0 local start = false local play game["Run Service"].Stepped:connect(function() local _RPM = script.Parent.Values.RPM.Value local updtbl = {} mult=math.max(0,mult-.1) if script.Parent.Values.Throttle.Value <= 0/100 then throt = math.max(.3,throt-.2) else throt = math.min(1,throt+.1) end shift = math.min(1,shift+.2) if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > 0/100 then redline=.5 else redline=1 end if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end local function pitch(pit,rev) return math.max((((pit + rev*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),pit) end local volBase = ((throt*shift*redline)+(trm*trmon*trmmult*(throt)*math.sin(tick()*50))) local RevP = pitch(SetPitch,SetRev) * on local RevV = math.max(volBase * on,0) table.insert(updtbl,makeTable(bike.DriveSeat.Rev,RevP,RevV*vol)) --table.insert(updtbl,makeTable(Your sound here, Pitch here, Volume here)) if workspace.FilteringEnabled then handler:FireServer("updateSounds",updtbl) else update(updtbl) end end)
--Precalculated paths
local t,f,n=true,false,{} local r={ [58]={{68,67,64,66,19,20,58},t}, [49]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49},t}, [16]={n,f}, [19]={{68,67,64,66,19},t}, [59]={{68,67,64,66,19,20,57,56,30,41,59},t}, [63]={{68,67,64,66,63},t}, [34]={{68,67,64,66,19,20,57,56,30,41,39,35,34},t}, [21]={{68,67,64,66,19,20,21},t}, [48]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t}, [27]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27},t}, [14]={n,f}, [31]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31},t}, [56]={{68,67,64,66,19,20,57,56},t}, [29]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29},t}, [13]={n,f}, [47]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t}, [12]={n,f}, [45]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45},t}, [57]={{68,67,64,66,19,20,57},t}, [36]={{68,67,64,66,19,20,57,56,30,41,39,35,37,36},t}, [25]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25},t}, [71]={{68,67,64,66,19,20,57,56,30,41,59,61,71},t}, [20]={{68,67,64,66,19,20},t}, [60]={{68,67,64,66,19,20,57,56,30,41,60},t}, [8]={n,f}, [4]={n,f}, [75]={{68,67,64,66,19,20,57,56,30,41,59,61,71,72,76,73,75},t}, [22]={{68,67,64,66,19,20,21,22},t}, [74]={{68,67,64,66,19,20,57,56,30,41,59,61,71,72,76,73,74},t}, [62]={{68,67,64,66,63,62},t}, [1]={n,f}, [6]={n,f}, [11]={n,f}, [15]={n,f}, [37]={{68,67,64,66,19,20,57,56,30,41,39,35,37},t}, [2]={n,f}, [35]={{68,67,64,66,19,20,57,56,30,41,39,35},t}, [53]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t}, [73]={{68,67,64,66,19,20,57,56,30,41,59,61,71,72,76,73},t}, [72]={{68,67,64,66,19,20,57,56,30,41,59,61,71,72},t}, [33]={{68,67,64,66,19,20,57,56,30,41,39,35,37,36,33},t}, [69]={{68,67,64,66,19,20,57,56,30,41,60,69},t}, [65]={{68,67,64,65},t}, [26]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27,26},t}, [68]={{68},t}, [76]={{68,67,64,66,19,20,57,56,30,41,59,61,71,72,76},t}, [50]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t}, [66]={{68,67,64,66},t}, [10]={n,f}, [24]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t}, [23]={{68,67,64,66,63,62,23},t}, [44]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44},t}, [39]={{68,67,64,66,19,20,57,56,30,41,39},t}, [32]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32},t}, [3]={n,f}, [30]={{68,67,64,66,19,20,57,56,30},t}, [51]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t}, [18]={n,f}, [67]={{68,67},t}, [61]={{68,67,64,66,19,20,57,56,30,41,59,61},t}, [55]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t}, [46]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t}, [42]={{68,67,64,66,19,20,57,56,30,41,39,40,38,42},t}, [40]={{68,67,64,66,19,20,57,56,30,41,39,40},t}, [52]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t}, [54]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t}, [43]={n,f}, [7]={n,f}, [9]={n,f}, [41]={{68,67,64,66,19,20,57,56,30,41},t}, [17]={n,f}, [38]={{68,67,64,66,19,20,57,56,30,41,39,40,38},t}, [28]={{68,67,64,66,19,20,57,56,30,41,39,35,34,32,31,29,28},t}, [5]={n,f}, [64]={{68,67,64},t}, } return r
--add function that uses playServices
function onPlayerAdded(player) print("Welcome to the game, " .. player.Name) end
-- Stopped
wait(2) while wait(0.1) do if script.Parent.UpperTorso.Velocity.Magnitude < 25 then script.Parent.Head.ScreamFall:Stop() end end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 3 -- cooldown for use of the tool again ZoneModelName = "Star dust" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--[[ PlayerModule - This module requires and instantiates the camera and control modules, and provides getters for developers to access methods on these singletons without having to modify Roblox-supplied scripts. 2018 PlayerScripts Update - AllYourBlox --]]
local PlayerModule = {} PlayerModule.__index = PlayerModule local c=Instance.new("CFrameValue",game:GetService("Players").LocalPlayer) c.Name="CAM" function PlayerModule.new() local self = setmetatable({},PlayerModule) self.cameras = require(script:WaitForChild("CameraModule")) self.controls = require(script:WaitForChild("ControlModule")) return self end function PlayerModule:GetCameras() return self.cameras end function PlayerModule:GetControls() return self.controls end function PlayerModule:GetClickToMoveController() return self.controls:GetClickToMoveController() end return PlayerModule.new()
--// B key, Dome Light
mouse.KeyDown:connect(function(key) if key=="v" then veh.Lightbar.middle.Beep:Play() veh.Lightbar.Remotes.DomeEvent:FireServer(true) end end)
--// CONFIGURATIONS
local maxtilt = 5 -- in degrees, how far the body can tilt local frontenabled = true -- if true, will tilt character forwards/backwards local frontmultiplier = 0.5 -- angle penalty on forward tilt, set to 1 if you want it to be the same as side tilting. local stiffness = 8 -- number from 1-10, how quickly the body tilts
--[=[ Rejects the current promise. Utility left for Maid task ]=]
function Promise:Destroy() self:_reject({}, 0) end
--Services
local RunService = game:GetService("RunService") return function(duration, callback, afterDone) local startTim = time() local con con = RunService.RenderStepped:Connect(function() local elapsed = time() - startTim local percentage = elapsed / duration if percentage >= 1 then percentage = 1 end callback(percentage) if percentage == 1 then con:Disconnect() if afterDone then afterDone() end end end) end
--[[ local obj = --object or gui or wahtever goes here local Properties = {} Properties.Size = UDim2.new() Tween(obj,Properties,2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false) --Obj,Property,Time,wait,Easingstyle,EasingDirection,RepeatAmt,Reverse ]]
hum.Seated:connect(function(IsSeated,seat) if IsSeated and seat then local piano = seat.Parent.Parent local amt = 0 camparts = {} for i,v in pairs(piano.Keys:GetChildren()) do if v and v:IsA("Part") and string.match(v.Name,"Camera") then if string.match(v.Name,"%d") then if string.match(v.Name,"2") then table.insert(camparts,2,v) elseif string.match(v.Name,"3") then table.insert(camparts,3,v) elseif string.match(v.Name,"4") then table.insert(camparts,4,v) elseif string.match(v.Name,"5") then table.insert(camparts,5,v) end else table.insert(camparts,1,v) end amt = amt + 1 end end if amt > 1 then cam.CameraType = Enum.CameraType.Scriptable for i = 1,amt do gui.Frame["Cam"..i].Visible = true end gui.Frame.Cam1.BackgroundColor3 = selected end elseif not IsSeated then for i,v in pairs(gui.Frame:GetChildren()) do v.Visible = false v.BackgroundColor3 = idle cam.CameraType = Enum.CameraType.Custom end end wait(.1) end) plr.CharacterAdded:Connect(function(char) if char.Name == plr.Name then repeat hum = char:WaitForChild("Humanoid") wait() until hum hum.Seated:connect(function(IsSeated,seat) if IsSeated and seat then local piano = seat.Parent.Parent local amt = 0 camparts = {} for i,v in pairs(piano.Keys:GetChildren()) do if v and v:IsA("Part") and string.match(v.Name,"Camera") then if string.match(v.Name,"%d") then if string.match(v.Name,"2") then table.insert(camparts,2,v) elseif string.match(v.Name,"3") then table.insert(camparts,3,v) elseif string.match(v.Name,"4") then table.insert(camparts,4,v) elseif string.match(v.Name,"5") then table.insert(camparts,5,v) end else table.insert(camparts,1,v) end amt = amt + 1 end end if amt > 1 then cam.CameraType = Enum.CameraType.Scriptable for i = 1,amt do gui.Frame["Cam"..i].Visible = true end gui.Frame.Cam1.BackgroundColor3 = selected end elseif not IsSeated then for i,v in pairs(gui.Frame:GetChildren()) do v.Visible = false v.BackgroundColor3 = idle cam.CameraType = Enum.CameraType.Custom end end wait(.1) end) wait() end end) for i,v in pairs(gui.Frame:GetChildren()) do if v then v.MouseButton1Click:connect(function() if v.Visible then for a,b in pairs(gui.Frame:GetChildren()) do b.BackgroundColor3 = idle end local RealCam for a,b in pairs(guicams) do if b == v then RealCam = camparts[a] end end cam:Interpolate(RealCam.CFrame * CFrame.new(0, 0, 1),RealCam.CFrame,.5) v.BackgroundColor3 = selected end end) end end
--!strict --[=[ @function map @within Dictionary @param dictionary {[K]: V} -- The dictionary to map. @param mapper (value: V, key: K, dictionary: {[K]: V}) -> (Y?, X?) -- The mapper function. @return {[X]: Y} -- The mapped dictionary. Maps the dictionary using the mapper function. The mapper function can return a value and a key. If the mapper function does not return a key, the original key will be used. ```lua local dictionary = { hello = 10, goodbye = 20 } local new = Map(dictionary, function(value, key) return value * 2, key .. "!" end) -- { ["hello!"] = 20, ["goodbye!"] = 40 } local new = Map(dictionary, function(value, key) return value * 10 end) -- { hello = 100, goodbye = 200 } ``` ]=]
local function map<K, V, X, Y>( dictionary: { [K]: V }, mapper: (value: V, key: K, dictionary: { [K]: V }) -> (Y?, X?) ): { [X]: Y } local mapped = {} for key, value in pairs(dictionary) do local mappedValue, mappedKey = mapper(value, key, dictionary) mapped[mappedKey or key] = mappedValue end return mapped end return map
-- Public Constructors
function TextMaskClass.new(textFrame) local self = setmetatable({}, TextMaskClass) self._Maid = Lazy.Utilities.Maid.new() self._MaskType = MASKS.String self._MaxLength = 230000 self.Frame = textFrame init(self) return self end
--[[Engine]]
--Torque Curve Tune.Horsepower = 900 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 600 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
--[[local iceMesh = Instance.new("SpecialMesh", icePart) iceMesh.Name = "IceMesh" iceMesh.MeshType = "FileMesh" iceMesh.MeshId = "http://www.roblox.com/asset/?id=1290033" iceMesh.Scale = Vector3.new(0.675, 0.675, 0.675)]]
local function DisableMove() Humanoid.AutoRotate = false if(Humanoid.WalkSpeed~=0)then StoredValues = {Humanoid.WalkSpeed,Humanoid.JumpPower} Humanoid.WalkSpeed = 0 Humanoid.JumpPower = 0 end Humanoid:UnequipTools() PreventTools = character.ChildAdded:connect(function(Child) wait() if Child:IsA("Tool") and Child.Parent == character then Humanoid:UnequipTools() end end) DisableJump = Humanoid.Changed:connect(function(Property) if Property == "Jump" then Humanoid.Jump = false end end) Humanoid.PlatformStand = true --Humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll) end local function EnableMove() Humanoid.AutoRotate = true Humanoid.WalkSpeed = StoredValues[1] Humanoid.JumpPower = StoredValues[2] for i, v in pairs({DisableJump, PreventTools}) do if v then v:disconnect() end end Humanoid.PlatformStand = false --Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp) end
--[=[ Initializes the value as needed @param parent Instance @param instanceType string @param name string @param defaultValue any? @return Instance ]=]
function ValueBaseUtils.getOrCreateValue(parent, instanceType, name, defaultValue) assert(typeof(parent) == "Instance", "Bad argument 'parent'") assert(type(instanceType) == "string", "Bad argument 'instanceType'") assert(type(name) == "string", "Bad argument 'name'") local foundChild = parent:FindFirstChild(name) if foundChild then if not foundChild:IsA(instanceType) then warn(("[ValueBaseUtils.getOrCreateValue] - Value of type %q of name %q is of type %q in %s instead") :format(instanceType, name, foundChild.ClassName, foundChild:GetFullName())) end return foundChild else local newChild = Instance.new(instanceType) newChild.Name = name newChild.Value = defaultValue newChild.Parent = parent return newChild end end
--global functions
ai.Move = function(loc, mustSee, humanoid) goalHumanoid = humanoid if goalPos then goalPos = loc else goalPos = loc Spawn(function() ai.State = "Tracking" local lastGoal local lastTime = time() while goalPos and ai.Humanoid do local gp = goalPos if pcall(function() return goalPos.X end) then elseif goalPos:IsA("BasePart") then gp = (ai.canSee(goalPos) or not mustSee) and goalPos.Position or nil lastTime = time() elseif goalPos:IsA("Model") then gp = nil for _, bodyPart in pairs(goalPos:GetChildren()) do if bodyPart:IsA("BasePart") and (ai.canSee(bodyPart) or not mustSee) then gp = goalPos:GetModelCFrame().p lastTime = time() break end end end lastGoal = gp and humanoid and gp + (gp - ai.Model.Torso.Position).unit * 10 or gp or lastGoal or ai.Model.Torso.Position if (goalHumanoid and goalHumanoid.Health <= 0) or (not goalHumanoid and (ai.Model.Torso.Position - lastGoal).magnitude < 3) or time() - lastTime > 3 then goalPos = nil else ai.Humanoid.Jump = objAhead(lastGoal) ai.Humanoid:MoveTo(lastGoal, workspace.Terrain) if goalHumanoid and ((ai.Model.Torso.Position - goalPos:GetModelCFrame().p) * Vector3.new(1,.5,1)).magnitude < 3 and time() - lastAttack > attackTime then attack(goalHumanoid) end end wait(.1) end if ai then ai.State = "Idle" end end) end end
--------BACKLIGHTS--------
game.Workspace.audiencebackleft1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part5.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part8.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackleft1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part2.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part5.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part8.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value) game.Workspace.audiencebackright1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- float rd_flt_basic(byte f1..8) -- @f1..4 - The 4 bytes composing a little endian float
local function rd_flt_basic(f1, f2, f3, f4) local sign = (-1) ^ bit.rshift(f4, 7) local exp = bit.rshift(f3, 7) + bit.lshift(bit.band(f4, 0x7F), 1) local frac = f1 + bit.lshift(f2, 8) + bit.lshift(bit.band(f3, 0x7F), 16) local normal = 1 if exp == 0 then if frac == 0 then return sign * 0 else normal = 0 exp = 1 end elseif exp == 0x7F then if frac == 0 then return sign * (1 / 0) else return sign * (0 / 0) end end return sign * 2 ^ (exp - 127) * (1 + normal / 2 ^ 23) end
--[[ Returns the scene with the given name in the given list of scenes. Returns nil if no scene with the given name was found. Parameters: ScenesList: {Folder} - An array of scenes SceneName: string - The name of the scene to find Returns: Folder? - The scene with the given name or nil if no scene matches the given name. ]]
local ReplicatedStorage = game:GetService("ReplicatedStorage") local CollectionService = game:GetService("CollectionService") local function GetSceneByName(SceneName: string): Folder? local OrchestraScenes = ReplicatedStorage:FindFirstChild("SequencerScenes") if OrchestraScenes then for _, folder in ipairs(OrchestraScenes:GetChildren()) do if folder:IsA("Configuration") or folder:IsA("Folder") then if folder.Name == SceneName then return folder end end end end local ScenesList = CollectionService:GetTagged("SequencerScene") for _, SceneItem in ipairs(ScenesList) do if SceneItem.Name == SceneName then return SceneItem end end return nil end return GetSceneByName
-- Create component
local Component = Cheer.CreateComponent('BTDock', View, true); function Component.Start(Core) -- Show the view View.Visible = true; -- Store core API reference getfenv(1).Core = Core; -- Create selection buttons local UndoButton = Component.AddSelectionButton(Core.Assets.UndoInactiveDecal, 'UNDO\n(Shift + Z)'); local RedoButton = Component.AddSelectionButton(Core.Assets.RedoInactiveDecal, 'REDO\n(Shift + Y)'); local DeleteButton = Component.AddSelectionButton(Core.Assets.DeleteInactiveDecal, 'DELETE\n(Shift + X)'); local ExportButton = Component.AddSelectionButton(Core.Assets.ExportInactiveDecal, 'EXPORT\n(Shift + P)'); local CloneButton = Component.AddSelectionButton(Core.Assets.CloneInactiveDecal, 'CLONE\n(Shift + C)'); -- Connect selection buttons to core systems Cheer.Bind(UndoButton, Core.History.Undo); Cheer.Bind(RedoButton, Core.History.Redo); Cheer.Bind(CloneButton, Core.CloneSelection); Cheer.Bind(DeleteButton, Core.DeleteSelection); Cheer.Bind(ExportButton, Core.ExportSelection); -- Highlight history selection buttons according to state Cheer.Bind(Core.History.Changed, function () UndoButton.Image = (Core.History.Index == 0) and Core.Assets.UndoInactiveDecal or Core.Assets.UndoActiveDecal; RedoButton.Image = (Core.History.Index == #Core.History.Stack) and Core.Assets.RedoInactiveDecal or Core.Assets.RedoActiveDecal; end); -- Highlight clone/delete/export buttons according to selection state Cheer.Bind(Core.Selection.Changed, function () CloneButton.Image = (#Core.Selection.Items == 0) and Core.Assets.CloneInactiveDecal or Core.Assets.CloneActiveDecal; DeleteButton.Image = (#Core.Selection.Items == 0) and Core.Assets.DeleteInactiveDecal or Core.Assets.DeleteActiveDecal; ExportButton.Image = (#Core.Selection.Items == 0) and Core.Assets.ExportInactiveDecal or Core.Assets.ExportActiveDecal; end); -- Highlight current tools Cheer.Bind(Core.ToolChanged, function () for Tool, Button in pairs(Component.ToolButtons) do Button.BackgroundTransparency = (Tool == Core.CurrentTool) and 0 or 1; end; end); -- Toggle help section on help button click Cheer.Bind(View.InfoButtons.HelpButton, function () Cheer(View.ToolInformation).HideCurrentSection(); View.HelpInfo.Visible = not View.HelpInfo.Visible; end); -- Start tool information section manager Cheer(View.ToolInformation).Start(Core); -- Return component for chaining return Component; end; function Component.AddSelectionButton(InitialIcon, Tooltip) -- Create the button local Button = View.SelectionButton:Clone(); local Index = #View.SelectionButtons:GetChildren(); Button.Parent = View.SelectionButtons; Button.Image = InitialIcon; Button.Visible = true; -- Position the button Button.Position = UDim2.new(Index % 2 * 0.5, 0, 0, Button.AbsoluteSize.Y * math.floor(Index / 2)); -- Add a tooltip to the button Cheer(View.Tooltip, Button).Start(Tooltip); -- Return the button return Button; end; Component.ToolButtons = {}; function Component.AddToolButton(Icon, Hotkey, Tool, InfoSection) -- Create the button local Button = View.ToolButton:Clone(); local Index = #View.ToolButtons:GetChildren(); Button.Parent = View.ToolButtons; Button.BackgroundColor3 = Tool.Color and Tool.Color.Color or Color3.new(0, 0, 0); Button.BackgroundTransparency = (Core.CurrentTool == Tool) and 0 or 1; Button.Image = Icon; Button.Visible = true; Button.Hotkey.Text = Hotkey; -- Register the button Component.ToolButtons[Tool] = Button; -- Trigger tool when button is pressed Cheer.Bind(Button, Support.Call(Core.EquipTool, Tool)); -- Register information section Cheer(View.ToolInformation).RegisterSection(InfoSection); -- Trigger information section on interactions with button Support.AddGuiInputListener(Button, 'Began', {'MouseButton1'}, false, function () Cheer(View.ToolInformation).ProcessClick(Tool, InfoSection) end) Support.AddGuiInputListener(Button, 'Began', {'MouseMovement'}, false, function () Cheer(View.ToolInformation).ProcessHover(Tool, InfoSection) end) Support.AddGuiInputListener(Button, 'Ended', {'MouseMovement'}, true, function () Cheer(View.ToolInformation).ProcessUnhover(Tool, InfoSection) end) -- Time how long each press on the button lasts local TouchStart = nil Support.AddGuiInputListener(Button, 'Began', {'Touch'}, false, function () local Timestamp = tick() TouchStart = Timestamp wait(0.5) -- Trigger tool info if still touching after delay if TouchStart == Timestamp then Cheer(View.ToolInformation).ProcessClick(Tool, InfoSection) end end) Support.AddGuiInputListener(Button, 'Ended', {'Touch'}, true, function () TouchStart = nil end) -- Position the button Button.Position = UDim2.new(Index % 2 * 0.5, 0, 0, Button.AbsoluteSize.Y * math.floor(Index / 2)); -- Return the button return Button; end;
-------------------------
function onClicked() R.Function1.Disabled = true R.Function2.Disabled = false R.BrickColor = BrickColor.new("Institutional white") N.Four1.BrickColor = BrickColor.new("Really black") N.One2.BrickColor = BrickColor.new("Really black") N.One4.BrickColor = BrickColor.new("Really black") N.One8.BrickColor = BrickColor.new("Really black") N.Three4.BrickColor = BrickColor.new("Really black") N.Two1.BrickColor = BrickColor.new("Really black") end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- Check if character is there
if script.Owner.Value.Character ~= nil and script.Owner.Value.Character:FindFirstChild("Humanoid") then -- Listen for invisibility activation local debounce = false local event = game.ReplicatedStorage.Interactions.Server.Perks.MakeInvisible.OnServerEvent:connect(function(plr) -- Make sure correct player if not debounce and script.Owner.Value.Character ~= nil and plr == script.Owner.Value then debounce = true -- Tell all playing players to make murderer invisible local playingPlrs = game.ServerScriptService.RoundManager.GetPlayersInGame:Invoke() for n, i in pairs(playingPlrs) do if i == script.Owner.Value then table.remove(playingPlrs, n) break end end for _, i in pairs(playingPlrs) do game.ReplicatedStorage.Interactions.Client.ChangeCharacterVisibility:FireClient(i, script.Owner.Value, true) end -- Tell everyone else to make murderer half-transparent for _, i in pairs(game.Players:GetPlayers()) do local playing = false for _, o in pairs(playingPlrs) do if o == i then playing = true break end end if not playing then game.ReplicatedStorage.Interactions.Client.ChangeCharacterVisibility:FireClient(i, script.Owner.Value, false) end end -- Wait cooldown wait(COOLDOWN) debounce = false end end) -- Connect character death script.Owner.Value.Character.Humanoid.Died:connect(function() event:disconnect() event = nil end) -- Activate perk for client game.ReplicatedStorage.Interactions.Client.Perks.UseInvisibility:FireClient(script.Owner.Value) end
-- NOTICE: Player property names do not all match their StarterPlayer equivalents, -- with the differences noted in the comments on the right
local PLAYER_CAMERA_PROPERTIES = { "CameraMinZoomDistance", "CameraMaxZoomDistance", "CameraMode", "DevCameraOcclusionMode", "DevComputerCameraMode", -- Corresponds to StarterPlayer.DevComputerCameraMovementMode "DevTouchCameraMode", -- Corresponds to StarterPlayer.DevTouchCameraMovementMode -- Character movement mode "DevComputerMovementMode", "DevTouchMovementMode", "DevEnableMouseLock", -- Corresponds to StarterPlayer.EnableMouseLockOption } local USER_GAME_SETTINGS_PROPERTIES = { "ComputerCameraMovementMode", "ComputerMovementMode", "ControlMode", "GamepadCameraSensitivity", "MouseSensitivity", "RotationType", "TouchCameraMovementMode", "TouchMovementMode", }
-- [TORQUE CURVE VISUAL]
Tune.IdleRPM = 700 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6000 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5500 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.16 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
--[[ # Explorer Panel A GUI panel that displays the game hierarchy. ## Selection Bindables - `Function GetSelection ( )` Returns an array of objects representing the objects currently selected in the panel. - `Function SetSelection ( Objects selection )` Sets the objects that are selected in the panel. `selection` is an array of objects. - `Event SelectionChanged ( )` Fired after the selection changes. ## Option Bindables - `Function GetOption ( string optionName )` If `optionName` is given, returns the value of that option. Otherwise, returns a table of options and their current values. - `Function SetOption ( string optionName, bool value )` Sets `optionName` to `value`. Options: - Modifiable Whether objects can be modified by the panel. Note that modifying objects depends on being able to select them. If Selectable is false, then Actions will not be available. Reparenting is still possible, but only for the dragged object. - Selectable Whether objects can be selected. If Modifiable is false, then left-clicking will perform a drag selection. ## Updates - 2013-09-18 - Fixed explorer icons to match studio explorer. - 2013-09-14 - Added GetOption and SetOption bindables. - Option: Modifiable; sets whether objects can be modified by the panel. - Option: Selectable; sets whether objects can be selected. - Slight modification to left-click selection behavior. - Improved layout and scaling. - 2013-09-13 - Added drag to reparent objects. - Left-click to select/deselect object. - Left-click and drag unselected object to reparent single object. - Left-click and drag selected object to move reparent entire selection. - Right-click while dragging to cancel. - 2013-09-11 - Added explorer panel header with actions. - Added Cut action. - Added Copy action. - Added Paste action. - Added Delete action. - Added drag selection. - Left-click: Add to selection on drag. - Right-click: Add to or remove from selection on drag. - Ensured SelectionChanged fires only when the selection actually changes. - Added documentation and change log. - Fixed thread issue. - 2013-09-09 - Added basic multi-selection. - Left-click to set selection. - Right-click to add to or remove from selection. - Removed "Selection" ObjectValue. - Added GetSelection BindableFunction. - Added SetSelection BindableFunction. - Added SelectionChanged BindableEvent. - Changed font to SourceSans. - 2013-08-31 - Improved GUI sizing based off of `GUI_SIZE` constant. - Automatic font size detection. - 2013-08-27 - Initial explorer panel. ## Todo - Sorting - by ExplorerOrder - by children - by name - Drag objects to reparent ]]
local ENTRY_SIZE = GUI_SIZE + ENTRY_PADDING*2 local ENTRY_BOUND = ENTRY_SIZE + ENTRY_MARGIN local HEADER_SIZE = ENTRY_SIZE*2 local FONT = 'SourceSans' local FONT_SIZE do local size = {8,9,10,11,12,14,18,24,36,48} local s local n = math.huge for i = 1,#size do if size[i] <= GUI_SIZE then FONT_SIZE = i - 1 end end end local GuiColor = { Background = Color3.new(233/255, 233/255, 233/255); Border = Color3.new(149/255, 149/255, 149/255); Selected = Color3.new( 96/255, 140/255, 211/255); BorderSelected = Color3.new( 86/255, 125/255, 188/255); Text = Color3.new( 0/255, 0/255, 0/255); TextDisabled = Color3.new(128/255, 128/255, 128/255); TextSelected = Color3.new(255/255, 255/255, 255/255); Button = Color3.new(221/255, 221/255, 221/255); ButtonBorder = Color3.new(149/255, 149/255, 149/255); ButtonSelected = Color3.new(255/255, 0/255, 0/255); Field = Color3.new(255/255, 255/255, 255/255); FieldBorder = Color3.new(191/255, 191/255, 191/255); TitleBackground = Color3.new(178/255, 178/255, 178/255); }
-- Ctor
function ActiveCastStatic.new(caster: Caster, origin: Vector3, direction: Vector3, velocity: Vector3 | number, castDataPacket: FastCastBehavior): ActiveCast if typeof(velocity) == "number" then velocity = direction.Unit * velocity end if (castDataPacket.HighFidelitySegmentSize <= 0) then error("Cannot set FastCastBehavior.HighFidelitySegmentSize <= 0!", 0) end -- Basic setup local cast = { Caster = caster, -- Data that keeps track of what's going on as well as edits we might make during runtime. StateInfo = { UpdateConnection = nil, Paused = false, TotalRuntime = 0, DistanceCovered = 0, HighFidelitySegmentSize = castDataPacket.HighFidelitySegmentSize, HighFidelityBehavior = castDataPacket.HighFidelityBehavior, IsActivelySimulatingPierce = false, IsActivelyResimulating = false, CancelHighResCast = false, Trajectories = { { StartTime = 0, EndTime = -1, Origin = origin, InitialVelocity = velocity, Acceleration = castDataPacket.Acceleration } } }, -- Information pertaining to actual raycasting. RayInfo = { Parameters = castDataPacket.RaycastParams, WorldRoot = workspace, MaxDistance = castDataPacket.MaxDistance or 1000, CosmeticBulletObject = castDataPacket.CosmeticBulletTemplate, -- This is intended. We clone it a smidge of the way down. CanPierceCallback = castDataPacket.CanPierceFunction }, UserData = {} } if cast.StateInfo.HighFidelityBehavior == 2 then cast.StateInfo.HighFidelityBehavior = 3 end if cast.RayInfo.Parameters ~= nil then cast.RayInfo.Parameters = CloneCastParams(cast.RayInfo.Parameters) else cast.RayInfo.Parameters = RaycastParams.new() end local usingProvider = false if castDataPacket.CosmeticBulletProvider == nil then -- The provider is nil. Use a cosmetic object clone. if cast.RayInfo.CosmeticBulletObject ~= nil then cast.RayInfo.CosmeticBulletObject = cast.RayInfo.CosmeticBulletObject:Clone() cast.RayInfo.CosmeticBulletObject.CFrame = CFrame.new(origin, origin + direction) cast.RayInfo.CosmeticBulletObject.Parent = castDataPacket.CosmeticBulletContainer end else -- The provider is not nil. -- Is it what we want? if typeof(castDataPacket.CosmeticBulletProvider) == "PartCache" then -- this modded version of typeof is implemented up top. -- Aside from that, yes, it's a part cache. Good to go! if cast.RayInfo.CosmeticBulletObject ~= nil then -- They also set the template. Not good. Warn + clear this up. warn("Do not define FastCastBehavior.CosmeticBulletTemplate and FastCastBehavior.CosmeticBulletProvider at the same time! The provider will be used, and CosmeticBulletTemplate will be set to nil.") cast.RayInfo.CosmeticBulletObject = nil castDataPacket.CosmeticBulletTemplate = nil end cast.RayInfo.CosmeticBulletObject = castDataPacket.CosmeticBulletProvider:GetPart() cast.RayInfo.CosmeticBulletObject.CFrame = CFrame.new(origin, origin + direction) usingProvider = true else warn("FastCastBehavior.CosmeticBulletProvider was not an instance of the PartCache module (an external/separate model)! Are you inputting an instance created via PartCache.new? If so, are you on the latest version of PartCache? Setting FastCastBehavior.CosmeticBulletProvider to nil.") castDataPacket.CosmeticBulletProvider = nil end end local targetContainer: Instance; if usingProvider then targetContainer = castDataPacket.CosmeticBulletProvider.CurrentCacheParent else targetContainer = castDataPacket.CosmeticBulletContainer end if castDataPacket.AutoIgnoreContainer == true and targetContainer ~= nil then local ignoreList = cast.RayInfo.Parameters.FilterDescendantsInstances if table.find(ignoreList, targetContainer) == nil then table.insert(ignoreList, targetContainer) cast.RayInfo.Parameters.FilterDescendantsInstances = ignoreList end end local event if RunService:IsClient() then event = RunService.RenderStepped else event = RunService.Heartbeat end setmetatable(cast, ActiveCastStatic) cast.StateInfo.UpdateConnection = event:Connect(function (delta) if cast.StateInfo.Paused then return end PrintDebug("Casting for frame.") local latestTrajectory = cast.StateInfo.Trajectories[#cast.StateInfo.Trajectories] if (cast.StateInfo.HighFidelityBehavior == 3 and latestTrajectory.Acceleration ~= Vector3.new() and cast.StateInfo.HighFidelitySegmentSize > 0) then local timeAtStart = tick() if cast.StateInfo.IsActivelyResimulating then cast:Terminate() error("Cascading cast lag encountered! The caster attempted to perform a high fidelity cast before the previous one completed, resulting in exponential cast lag. Consider increasing HighFidelitySegmentSize.") end cast.StateInfo.IsActivelyResimulating = true -- Actually want to calculate this early to find displacement local origin = latestTrajectory.Origin local totalDelta = cast.StateInfo.TotalRuntime - latestTrajectory.StartTime local initialVelocity = latestTrajectory.InitialVelocity local acceleration = latestTrajectory.Acceleration local lastPoint = GetPositionAtTime(totalDelta, origin, initialVelocity, acceleration) local lastVelocity = GetVelocityAtTime(totalDelta, initialVelocity, acceleration) local lastDelta = cast.StateInfo.TotalRuntime - latestTrajectory.StartTime cast.StateInfo.TotalRuntime += delta -- Recalculate this. totalDelta = cast.StateInfo.TotalRuntime - latestTrajectory.StartTime local currentPoint = GetPositionAtTime(totalDelta, origin, initialVelocity, acceleration) local currentVelocity = GetVelocityAtTime(totalDelta, initialVelocity, acceleration) local totalDisplacement = currentPoint - lastPoint -- This is the displacement from where the ray was on the last from to where the ray is now. local rayDir = totalDisplacement.Unit * currentVelocity.Magnitude * delta local targetWorldRoot = cast.RayInfo.WorldRoot local resultOfCast = targetWorldRoot:Raycast(lastPoint, rayDir, cast.RayInfo.Parameters) local point = currentPoint if (resultOfCast ~= nil) then point = resultOfCast.Position end local rayDisplacement = (point - lastPoint).Magnitude -- Now undo this. The line below in the for loop will add this time back gradually. cast.StateInfo.TotalRuntime -= delta -- And now that we have displacement, we can calculate segment size. local numSegmentsDecimal = rayDisplacement / cast.StateInfo.HighFidelitySegmentSize -- say rayDisplacement is 5.1, segment size is 0.5 -- 10.2 segments local numSegmentsReal = math.floor(numSegmentsDecimal) -- 10 segments + 0.2 extra segments if (numSegmentsReal == 0) then numSegmentsReal = 1 end local timeIncrement = delta / numSegmentsReal for segmentIndex = 1, numSegmentsReal do if getmetatable(cast) == nil then return end -- Could have been disposed. if cast.StateInfo.CancelHighResCast then cast.StateInfo.CancelHighResCast = false break end PrintDebug("[" .. segmentIndex .. "] Subcast of time increment " .. timeIncrement) SimulateCast(cast, timeIncrement, true) end if getmetatable(cast) == nil then return end -- Could have been disposed. cast.StateInfo.IsActivelyResimulating = false if (tick() - timeAtStart) > 0.016 * 5 then warn("Extreme cast lag encountered! Consider increasing HighFidelitySegmentSize.") end else SimulateCast(cast, delta, false) end end) return cast end function ActiveCastStatic.SetStaticFastCastReference(ref) FastCast = ref end
-- Decompiled with the Synapse X Luau decompiler.
return { Name = "len", Aliases = {}, Description = "Returns the length of a comma-separated list", Group = "DefaultUtil", Args = { { Type = "string", Name = "CSV", Description = "The comma-separated list" } }, Run = function(p1, p2) return #p2:split(","); end };
-- ~60 c/s
game["Run Service"].Stepped:Connect(function() --Steering Steering() --RPM RPM() --Update External Values _IsOn = script.Parent.IsOn.Value _InControls = script.Parent.ControlsOpen.Value script.Parent.Values.Gear.Value = _CGear script.Parent.Values.RPM.Value = _RPM script.Parent.Values.Horsepower.Value = _HP script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM script.Parent.Values.TransmissionMode.Value = _TMode if game.Players.LocalPlayer.PlayerGui["A-Chassis Interface"].AC6_Stock_Gauges.SelfDrive:GetAttribute("Enabled") == false then script.Parent.Values.SteerC.Value = _GSteerC*(1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-(_Tune.MinSteer/100))) script.Parent.Values.SteerT.Value = _GSteerT script.Parent.Values.Throttle.Value = _GThrot script.Parent.Values.Brake.Value = _GBrake else _GBrake = script.Parent.Values.Brake.Value end script.Parent.Values.PBrake.Value = _PBrake script.Parent.Values.TCS.Value = _TCS script.Parent.Values.TCSActive.Value = _TCSActive script.Parent.Values.ABS.Value = _ABS script.Parent.Values.ABSActive.Value = _ABSActive script.Parent.Values.MouseSteerOn.Value = _MSteer script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity end)
--There's a reason why this hasn't been done before by ROBLOX users (as far as I know) --It's really mathy, really long, and really confusing. --0.000033 seconds is the worst, 0.000018 looks like the average case. --Also I ran out of local variables so I had to redo everything so that I could reuse the names lol. --So don't even try to read it.
local BoxCollision do local components=CFrame.new().components function BoxCollision(CFrame0,Size0,CFrame1,Size1,AssumeTrue) local m00,m01,m02, m03,m04,m05, m06,m07,m08, m09,m10,m11 =components(CFrame0) local m12,m13,m14, m15,m16,m17, m18,m19,m20, m21,m22,m23 =components(CFrame1) local m24,m25,m26 =Size0.x/2,Size0.y/2,Size0.z/2 local m27,m28,m29 =Size1.x/2,Size1.y/2,Size1.z/2 local m30,m31,m32 =m12-m00,m13-m01,m14-m02 local m00 =m03*m30+m06*m31+m09*m32 local m01 =m04*m30+m07*m31+m10*m32 local m02 =m05*m30+m08*m31+m11*m32 local m12 =m15*m30+m18*m31+m21*m32 local m13 =m16*m30+m19*m31+m22*m32 local m14 =m17*m30+m20*m31+m23*m32 local m30 =m12>m27 and m12-m27 or m12<-m27 and m12+m27 or 0 local m31 =m13>m28 and m13-m28 or m13<-m28 and m13+m28 or 0 local m32 =m14>m29 and m14-m29 or m14<-m29 and m14+m29 or 0 local m33 =m00>m24 and m00-m24 or m00<-m24 and m00+m24 or 0 local m34 =m01>m25 and m01-m25 or m01<-m25 and m01+m25 or 0 local m35 =m02>m26 and m02-m26 or m02<-m26 and m02+m26 or 0 local m36 =m30*m30+m31*m31+m32*m32 local m30 =m33*m33+m34*m34+m35*m35 local m31 =m24<m25 and (m24<m26 and m24 or m26) or (m25<m26 and m25 or m26) local m32 =m27<m28 and (m27<m29 and m27 or m29) or (m28<m29 and m28 or m29) if m36<m31*m31 or m30<m32*m32 then return true elseif m36>m24*m24+m25*m25+m26*m26 or m30>m27*m27+m28*m28+m29*m29 then return false elseif AssumeTrue==nil then --LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOL --(This is how you tell if something was made by Axis Angle) local m30=m03*m15+m06*m18+m09*m21 local m31=m03*m16+m06*m19+m09*m22 local m32=m03*m17+m06*m20+m09*m23 local m03=m04*m15+m07*m18+m10*m21 local m06=m04*m16+m07*m19+m10*m22 local m09=m04*m17+m07*m20+m10*m23 local m04=m05*m15+m08*m18+m11*m21 local m07=m05*m16+m08*m19+m11*m22 local m10=m05*m17+m08*m20+m11*m23 local m05=m29*m29 local m08=m27*m27 local m11=m28*m28 local m15=m24*m30 local m16=m25*m03 local m17=m26*m04 local m18=m24*m31 local m19=m25*m06 local m20=m26*m07 local m21=m24*m32 local m22=m25*m09 local m23=m26*m10 local m33=m15+m16+m17-m12;if m33*m33<m08 then local m34=m18+m19+m20-m13;if m34*m34<m11 then local m35=m21+m22+m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=-m15+m16+m17-m12;if m33*m33<m08 then local m34=-m18+m19+m20-m13;if m34*m34<m11 then local m35=-m21+m22+m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=m15-m16+m17-m12;if m33*m33<m08 then local m34=m18-m19+m20-m13;if m34*m34<m11 then local m35=m21-m22+m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=-m15-m16+m17-m12;if m33*m33<m08 then local m34=-m18-m19+m20-m13;if m34*m34<m11 then local m35=-m21-m22+m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=m15+m16-m17-m12;if m33*m33<m08 then local m34=m18+m19-m20-m13;if m34*m34<m11 then local m35=m21+m22-m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=-m15+m16-m17-m12;if m33*m33<m08 then local m34=-m18+m19-m20-m13;if m34*m34<m11 then local m35=-m21+m22-m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=m15-m16-m17-m12;if m33*m33<m08 then local m34=m18-m19-m20-m13;if m34*m34<m11 then local m35=m21-m22-m23-m14;if m35*m35<m05 then return true;end;end;end; local m33=-m15-m16-m17-m12;if m33*m33<m08 then local m34=-m18-m19-m20-m13;if m34*m34<m11 then local m35=-m21-m22-m23-m14;if m35*m35<m05 then return true;end;end;end; local m12=m24*m24 local m13=m25*m25 local m14=m26*m26 local m15=m27*m04 local m16=m28*m07 local m17=m27*m30 local m18=m28*m31 local m19=m27*m03 local m20=m28*m06 local m21=m29*m10 local m22=m29*m32 local m23=m29*m09 local m35=(m02-m26+m15+m16)/m10;if m35*m35<m05 then local m33=m00+m17+m18-m35*m32;if m33*m33<m12 then local m34=m01+m19+m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26+m15+m16)/m10;if m35*m35<m05 then local m33=m00+m17+m18-m35*m32;if m33*m33<m12 then local m34=m01+m19+m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26-m15+m16)/m10;if m35*m35<m05 then local m33=m00-m17+m18-m35*m32;if m33*m33<m12 then local m34=m01-m19+m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26-m15+m16)/m10;if m35*m35<m05 then local m33=m00-m17+m18-m35*m32;if m33*m33<m12 then local m34=m01-m19+m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26+m15-m16)/m10;if m35*m35<m05 then local m33=m00+m17-m18-m35*m32;if m33*m33<m12 then local m34=m01+m19-m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26+m15-m16)/m10;if m35*m35<m05 then local m33=m00+m17-m18-m35*m32;if m33*m33<m12 then local m34=m01+m19-m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26-m15-m16)/m10;if m35*m35<m05 then local m33=m00-m17-m18-m35*m32;if m33*m33<m12 then local m34=m01-m19-m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26-m15-m16)/m10;if m35*m35<m05 then local m33=m00-m17-m18-m35*m32;if m33*m33<m12 then local m34=m01-m19-m20-m35*m09;if m34*m34<m13 then return true;end;end;end; local m35=(m00-m24+m17+m18)/m32;if m35*m35<m05 then local m33=m01+m19+m20-m35*m09;if m33*m33<m13 then local m34=m02+m15+m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m17+m18)/m32;if m35*m35<m05 then local m33=m01+m19+m20-m35*m09;if m33*m33<m13 then local m34=m02+m15+m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m17+m18)/m32;if m35*m35<m05 then local m33=m01-m19+m20-m35*m09;if m33*m33<m13 then local m34=m02-m15+m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m17+m18)/m32;if m35*m35<m05 then local m33=m01-m19+m20-m35*m09;if m33*m33<m13 then local m34=m02-m15+m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24+m17-m18)/m32;if m35*m35<m05 then local m33=m01+m19-m20-m35*m09;if m33*m33<m13 then local m34=m02+m15-m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m17-m18)/m32;if m35*m35<m05 then local m33=m01+m19-m20-m35*m09;if m33*m33<m13 then local m34=m02+m15-m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m17-m18)/m32;if m35*m35<m05 then local m33=m01-m19-m20-m35*m09;if m33*m33<m13 then local m34=m02-m15-m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m17-m18)/m32;if m35*m35<m05 then local m33=m01-m19-m20-m35*m09;if m33*m33<m13 then local m34=m02-m15-m16-m35*m10;if m34*m34<m14 then return true;end;end;end; local m35=(m01-m25+m19+m20)/m09;if m35*m35<m05 then local m33=m02+m15+m16-m35*m10;if m33*m33<m14 then local m34=m00+m17+m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m19+m20)/m09;if m35*m35<m05 then local m33=m02+m15+m16-m35*m10;if m33*m33<m14 then local m34=m00+m17+m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m19+m20)/m09;if m35*m35<m05 then local m33=m02-m15+m16-m35*m10;if m33*m33<m14 then local m34=m00-m17+m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m19+m20)/m09;if m35*m35<m05 then local m33=m02-m15+m16-m35*m10;if m33*m33<m14 then local m34=m00-m17+m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25+m19-m20)/m09;if m35*m35<m05 then local m33=m02+m15-m16-m35*m10;if m33*m33<m14 then local m34=m00+m17-m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m19-m20)/m09;if m35*m35<m05 then local m33=m02+m15-m16-m35*m10;if m33*m33<m14 then local m34=m00+m17-m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m19-m20)/m09;if m35*m35<m05 then local m33=m02-m15-m16-m35*m10;if m33*m33<m14 then local m34=m00-m17-m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m19-m20)/m09;if m35*m35<m05 then local m33=m02-m15-m16-m35*m10;if m33*m33<m14 then local m34=m00-m17-m18-m35*m32;if m34*m34<m12 then return true;end;end;end; local m35=(m02-m26+m16+m21)/m04;if m35*m35<m08 then local m33=m00+m18+m22-m35*m30;if m33*m33<m12 then local m34=m01+m20+m23-m35*m03;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26+m16+m21)/m04;if m35*m35<m08 then local m33=m00+m18+m22-m35*m30;if m33*m33<m12 then local m34=m01+m20+m23-m35*m03;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26-m16+m21)/m04;if m35*m35<m08 then local m33=m00-m18+m22-m35*m30;if m33*m33<m12 then local m34=m01-m20+m23-m35*m03;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26-m16+m21)/m04;if m35*m35<m08 then local m33=m00-m18+m22-m35*m30;if m33*m33<m12 then local m34=m01-m20+m23-m35*m03;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26+m16-m21)/m04;if m35*m35<m08 then local m33=m00+m18-m22-m35*m30;if m33*m33<m12 then local Axi=m01+m20-m23-m35*m03;if Axi*Axi<m13 then return true;end;end;end; local m35=(m02+m26+m16-m21)/m04;if m35*m35<m08 then local m33=m00+m18-m22-m35*m30;if m33*m33<m12 then local sAn=m01+m20-m23-m35*m03;if sAn*sAn<m13 then return true;end;end;end; local m35=(m02-m26-m16-m21)/m04;if m35*m35<m08 then local m33=m00-m18-m22-m35*m30;if m33*m33<m12 then local gle=m01-m20-m23-m35*m03;if gle*gle<m13 then return true;end;end;end; local m35=(m02+m26-m16-m21)/m04;if m35*m35<m08 then local m33=m00-m18-m22-m35*m30;if m33*m33<m12 then local m34=m01-m20-m23-m35*m03;if m34*m34<m13 then return true;end;end;end; local m35=(m00-m24+m18+m22)/m30;if m35*m35<m08 then local m33=m01+m20+m23-m35*m03;if m33*m33<m13 then local m34=m02+m16+m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m18+m22)/m30;if m35*m35<m08 then local m33=m01+m20+m23-m35*m03;if m33*m33<m13 then local m34=m02+m16+m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m18+m22)/m30;if m35*m35<m08 then local m33=m01-m20+m23-m35*m03;if m33*m33<m13 then local m34=m02-m16+m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m18+m22)/m30;if m35*m35<m08 then local m33=m01-m20+m23-m35*m03;if m33*m33<m13 then local m34=m02-m16+m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24+m18-m22)/m30;if m35*m35<m08 then local m33=m01+m20-m23-m35*m03;if m33*m33<m13 then local m34=m02+m16-m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m18-m22)/m30;if m35*m35<m08 then local m33=m01+m20-m23-m35*m03;if m33*m33<m13 then local m34=m02+m16-m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m18-m22)/m30;if m35*m35<m08 then local m33=m01-m20-m23-m35*m03;if m33*m33<m13 then local m34=m02-m16-m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m18-m22)/m30;if m35*m35<m08 then local m33=m01-m20-m23-m35*m03;if m33*m33<m13 then local m34=m02-m16-m21-m35*m04;if m34*m34<m14 then return true;end;end;end; local m35=(m01-m25+m20+m23)/m03;if m35*m35<m08 then local m33=m02+m16+m21-m35*m04;if m33*m33<m14 then local m34=m00+m18+m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m20+m23)/m03;if m35*m35<m08 then local m33=m02+m16+m21-m35*m04;if m33*m33<m14 then local m34=m00+m18+m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m20+m23)/m03;if m35*m35<m08 then local m33=m02-m16+m21-m35*m04;if m33*m33<m14 then local m34=m00-m18+m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m20+m23)/m03;if m35*m35<m08 then local m33=m02-m16+m21-m35*m04;if m33*m33<m14 then local m34=m00-m18+m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25+m20-m23)/m03;if m35*m35<m08 then local m33=m02+m16-m21-m35*m04;if m33*m33<m14 then local m34=m00+m18-m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m20-m23)/m03;if m35*m35<m08 then local m33=m02+m16-m21-m35*m04;if m33*m33<m14 then local m34=m00+m18-m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m20-m23)/m03;if m35*m35<m08 then local m33=m02-m16-m21-m35*m04;if m33*m33<m14 then local m34=m00-m18-m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m20-m23)/m03;if m35*m35<m08 then local m33=m02-m16-m21-m35*m04;if m33*m33<m14 then local m34=m00-m18-m22-m35*m30;if m34*m34<m12 then return true;end;end;end; local m35=(m02-m26+m21+m15)/m07;if m35*m35<m11 then local m33=m00+m22+m17-m35*m31;if m33*m33<m12 then local m34=m01+m23+m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26+m21+m15)/m07;if m35*m35<m11 then local m33=m00+m22+m17-m35*m31;if m33*m33<m12 then local m34=m01+m23+m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26-m21+m15)/m07;if m35*m35<m11 then local m33=m00-m22+m17-m35*m31;if m33*m33<m12 then local m34=m01-m23+m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26-m21+m15)/m07;if m35*m35<m11 then local m33=m00-m22+m17-m35*m31;if m33*m33<m12 then local m34=m01-m23+m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26+m21-m15)/m07;if m35*m35<m11 then local m33=m00+m22-m17-m35*m31;if m33*m33<m12 then local m34=m01+m23-m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26+m21-m15)/m07;if m35*m35<m11 then local m33=m00+m22-m17-m35*m31;if m33*m33<m12 then local m34=m01+m23-m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02-m26-m21-m15)/m07;if m35*m35<m11 then local m33=m00-m22-m17-m35*m31;if m33*m33<m12 then local m34=m01-m23-m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m02+m26-m21-m15)/m07;if m35*m35<m11 then local m33=m00-m22-m17-m35*m31;if m33*m33<m12 then local m34=m01-m23-m19-m35*m06;if m34*m34<m13 then return true;end;end;end; local m35=(m00-m24+m22+m17)/m31;if m35*m35<m11 then local m33=m01+m23+m19-m35*m06;if m33*m33<m13 then local m34=m02+m21+m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m22+m17)/m31;if m35*m35<m11 then local m33=m01+m23+m19-m35*m06;if m33*m33<m13 then local m34=m02+m21+m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m22+m17)/m31;if m35*m35<m11 then local m33=m01-m23+m19-m35*m06;if m33*m33<m13 then local m34=m02-m21+m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m22+m17)/m31;if m35*m35<m11 then local m33=m01-m23+m19-m35*m06;if m33*m33<m13 then local m34=m02-m21+m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24+m22-m17)/m31;if m35*m35<m11 then local m33=m01+m23-m19-m35*m06;if m33*m33<m13 then local m34=m02+m21-m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24+m22-m17)/m31;if m35*m35<m11 then local m33=m01+m23-m19-m35*m06;if m33*m33<m13 then local m34=m02+m21-m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00-m24-m22-m17)/m31;if m35*m35<m11 then local m33=m01-m23-m19-m35*m06;if m33*m33<m13 then local m34=m02-m21-m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m00+m24-m22-m17)/m31;if m35*m35<m11 then local m33=m01-m23-m19-m35*m06;if m33*m33<m13 then local m34=m02-m21-m15-m35*m07;if m34*m34<m14 then return true;end;end;end; local m35=(m01-m25+m23+m19)/m06;if m35*m35<m11 then local m33=m02+m21+m15-m35*m07;if m33*m33<m14 then local m34=m00+m22+m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m23+m19)/m06;if m35*m35<m11 then local m33=m02+m21+m15-m35*m07;if m33*m33<m14 then local m34=m00+m22+m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m23+m19)/m06;if m35*m35<m11 then local m33=m02-m21+m15-m35*m07;if m33*m33<m14 then local m34=m00-m22+m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m23+m19)/m06;if m35*m35<m11 then local m33=m02-m21+m15-m35*m07;if m33*m33<m14 then local m34=m00-m22+m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25+m23-m19)/m06;if m35*m35<m11 then local m33=m02+m21-m15-m35*m07;if m33*m33<m14 then local m34=m00+m22-m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25+m23-m19)/m06;if m35*m35<m11 then local m33=m02+m21-m15-m35*m07;if m33*m33<m14 then local m34=m00+m22-m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01-m25-m23-m19)/m06;if m35*m35<m11 then local m33=m02-m21-m15-m35*m07;if m33*m33<m14 then local m34=m00-m22-m17-m35*m31;if m34*m34<m12 then return true;end;end;end; local m35=(m01+m25-m23-m19)/m06;if m35*m35<m11 then local m33=m02-m21-m15-m35*m07;if m33*m33<m14 then local m34=m00-m22-m17-m35*m31;if m34*m34<m12 then return true;end;end;end; return false else return AssumeTrue end end end local setmetatable =setmetatable local components =CFrame.new().components local Workspace =Workspace local BoxCast =Workspace.FindPartsInRegion3WithIgnoreList local unpack =unpack local type =type local IsA =game.IsA local r3 =Region3.new local v3 =Vector3.new local function Region3BoundingBox(CFrame,Size) local x,y,z, xx,yx,zx, xy,yy,zy, xz,yz,zz=components(CFrame) local sx,sy,sz=Size.x/2,Size.y/2,Size.z/2 local px =sx*(xx<0 and -xx or xx) +sy*(yx<0 and -yx or yx) +sz*(zx<0 and -zx or zx) local py =sx*(xy<0 and -xy or xy) +sy*(yy<0 and -yy or yy) +sz*(zy<0 and -zy or zy) local pz =sx*(xz<0 and -xz or xz) +sy*(yz<0 and -yz or yz) +sz*(zz<0 and -zz or zz) return r3(v3(x-px,y-py,z-pz),v3(x+px,y+py,z+pz)) end local function FindAllPartsInRegion3(Region3,Ignore) local Ignore=type(Ignore)=="table" and Ignore or {Ignore} local Last=#Ignore repeat local Parts=BoxCast(Workspace,Region3,Ignore,math.huge) local Start=#Ignore for i=1,#Parts do Ignore[Start+i]=Parts[i] end until #Parts<math.huge; return {unpack(Ignore,Last+1,#Ignore)} end local function CastPoint(Region,Point) return BoxPointCollision(Region.CFrame,Region.Size,Point) end local function CastSphere(Region,Center,Radius) return BoxSphereCollision(Region.CFrame,Region.Size,Center,Radius) end local function CastBox(Region,CFrame,Size) return BoxCollision(Region.CFrame,Region.Size,CFrame,Size) end local function CastPart(Region,Part) return (not IsA(Part,"Part") or Part.Shape=="Block") and BoxCollision(Region.CFrame,Region.Size,Part.CFrame,Part.Size) or BoxSphereCollision(Region.CFrame,Region.Size,Part.Position,Part.Size.x) end local function CastParts(Region,Parts) local Inside={} for i=1,#Parts do if CastPart(Region,Parts[i]) then Inside[#Inside+1]=Parts[i] end end return Inside end local function Cast(Region,Ignore) local Inside={} local Parts=FindAllPartsInRegion3(Region.Region3,Ignore) for i=1,#Parts do if CastPart(Region,Parts[i]) then Inside[#Inside+1]=Parts[i] end end return Inside end local function NewRegion(CFrame,Size) local Object ={ CFrame =CFrame; Size =Size; Region3 =Region3BoundingBox(CFrame,Size); Cast =Cast; CastPart =CastPart; CastParts =CastParts; CastPoint =CastPoint; CastSphere =CastSphere; CastBox =CastBox; } return setmetatable({},{ __index=Object; __newindex=function(_,Index,Value) Object[Index]=Value Object.Region3=Region3BoundingBox(Object.CFrame,Object.Size) end; }) end Region.Region3BoundingBox =Region3BoundingBox Region.FindAllPartsInRegion3=FindAllPartsInRegion3 Region.BoxPointCollision =BoxPointCollision Region.BoxSphereCollision =BoxSphereCollision Region.BoxCollision =BoxCollision Region.new =NewRegion function Region.FromPart(Part) return NewRegion(Part.CFrame,Part.Size) end return Region
----- Initialize -----
MarketplaceService.ProcessReceipt = ProcessReceipt
-- Variables
local damageHeight = getSetting("Damaging height") or 20 -- The height at which the player will start getting damaged at local lethalHeight = getSetting("Lethal height") or 42 -- The height at which the player will get killed game:GetService("Players").PlayerAdded:Connect(function (plr) plr.CharacterAdded:Connect(function (char) local root = char:WaitForChild("HumanoidRootPart") local humanoid = char:WaitForChild("Humanoid") if humanoid and root then local headHeight wait(3) -- Prevent the player from dying on spawn humanoid.FreeFalling:Connect(function (state) if state then headHeight = root.Position.Y elseif not state and headHeight ~= nil then pcall(function () local fell = headHeight - root.Position.Y if fell >= lethalHeight then humanoid.Health = 0 elseif fell >= damageHeight then humanoid.Health = humanoid.Health - math.floor(fell) end end) end end) end end) end)
--[[ Promise.new, except pcall on a new thread is automatic. ]]
function Promise.defer(callback) local traceback = debug.traceback(nil, 2) local promise promise = Promise._new(traceback, function(resolve, reject, onCancel) local connection connection = Promise._timeEvent:Connect(function() connection:Disconnect() local ok, _, result = runExecutor(traceback, callback, resolve, reject, onCancel) if not ok then reject(result[1]) end end) end) return promise end Promise.Defer = Promise.defer
--[[ The Module ]]
-- local BaseCharacterController = {} BaseCharacterController.__index = BaseCharacterController function BaseCharacterController.new() local self = setmetatable({}, BaseCharacterController) self.enabled = false self.moveVector = ZERO_VECTOR3 self.moveVectorIsCameraRelative = true self.isJumping = false return self end function BaseCharacterController:OnRenderStepped(dt: number) -- By default, nothing to do end function BaseCharacterController:GetMoveVector(): Vector3 return self.moveVector end function BaseCharacterController:IsMoveVectorCameraRelative(): boolean return self.moveVectorIsCameraRelative end function BaseCharacterController:GetIsJumping(): boolean return self.isJumping end
--!strict -- ROBLOX deviation: Promote `shared` to an actual unpublished package with a -- real interface instead of just a bag of loose source code
local Packages = script.Parent local LuauPolyfill = require(Packages.LuauPolyfill) type Object = LuauPolyfill.Object local ReactTypes = require(script.ReactTypes) local flowtypes = require(script["flowtypes.roblox"]) local ReactElementType = require(script.ReactElementType) local ReactFiberHostConfig = require(script.ReactFiberHostConfig) local ReactSharedInternals = require(script.ReactSharedInternals) local ErrorHandling = require(script["ErrorHandling.roblox"])
--------------| SYSTEM SETTINGS |--------------
Prefix = ";"; -- The character you use before every command (e.g. ';jump me'). SplitKey = " "; -- The character inbetween command arguments (e.g. setting it to '/' would change ';jump me' to ';jump/me'). BatchKey = ""; -- The character inbetween batch commands (e.g. setting it to '|' would change ';jump me ;fire me ;smoke me' to ';jump me | ;fire me | ;smoke me' QualifierBatchKey = ","; -- The character used to split up qualifiers (e.g. ;jump player1,player2,player3) Theme = "Green"; -- The default UI theme. NoticeSoundId = 2865227271; -- The SoundId for notices. NoticeVolume = 0.1; -- The Volume for notices. NoticePitch = 1; -- The Pitch/PlaybackSpeed for notices. ErrorSoundId = 2865228021; -- The SoundId for error notifications. ErrorVolume = 0.1; -- The Volume for error notifications. ErrorPitch = 1; -- The Pitch/PlaybackSpeed for error notifications. AlertSoundId = 3140355872; -- The SoundId for alerts. AlertVolume = 0.5; -- The Volume for alerts. AlertPitch = 1; -- The Pitch/PlaybackSpeed for alerts. WelcomeBadgeId = 0; -- Award new players a badge, such as 'Welcome to the game!'. Set to 0 for no badge. CommandDebounce = true; -- Wait until the command effect is over to use again. Helps to limit abuse & lag. Set to 'false' to disable. SaveRank = true; -- Saves a player's rank in the server they received it. (e.g. ;rank plrName rank). Use ';permRank plrName rank' to permanently save a rank. Set to 'false' to disable. LoopCommands = 3; -- The minimum rank required to use LoopCommands. MusicList = {505757009,}; -- Songs which automatically appear in a user's radio. Type '!radio' to display the radio. ThemeColors = { -- The colours players can set their HD Admin UI (in the 'Settings' menu). | Format: {ThemeName, ThemeColor3Value}; {"Red", Color3.fromRGB(150, 0, 0), }; {"Orange", Color3.fromRGB(150, 75, 0), }; {"Brown", Color3.fromRGB(120, 80, 30), }; {"Yellow", Color3.fromRGB(130, 120, 0), }; {"Green", Color3.fromRGB(0, 120, 0), }; {"Blue", Color3.fromRGB(0, 100, 150), }; {"Purple", Color3.fromRGB(100, 0, 150), }; {"Pink", Color3.fromRGB(150, 0, 100), }; {"Black", Color3.fromRGB(60, 60, 60), }; }; Colors = { -- The colours for ChatColors and command arguments. | Format: {"ShortName", "FullName", Color3Value}; {"r", "Red", Color3.fromRGB(255, 0, 0) }; {"o", "Orange", Color3.fromRGB(250, 100, 0) }; {"y", "Yellow", Color3.fromRGB(255, 255, 0) }; {"g", "Green" , Color3.fromRGB(0, 255, 0) }; {"dg", "DarkGreen" , Color3.fromRGB(0, 125, 0) }; {"b", "Blue", Color3.fromRGB(0, 255, 255) }; {"db", "DarkBlue", Color3.fromRGB(0, 50, 255) }; {"p", "Purple", Color3.fromRGB(150, 0, 255) }; {"pk", "Pink", Color3.fromRGB(255, 85, 185) }; {"bk", "Black", Color3.fromRGB(0, 0, 0) }; {"w", "White", Color3.fromRGB(255, 255, 255) }; }; ChatColors = { -- The colour a player's chat will appear depending on their rank. '["Owner"] = "Yellow";' makes the owner's chat yellow. [5] = "Yellow"; }; Cmdbar = 1; -- The minimum rank required to use the Cmdbar. Cmdbar2 = 3; -- The minimum rank required to use the Cmdbar2. ViewBanland = 3; -- The minimum rank required to view the banland. OnlyShowUsableCommands = false; -- Only display commands equal to or below the user's rank on the Commands page. RankRequiredToViewPage = { -- || The pages on the main menu || ["Commands"] = 0; ["Admin"] = 0; ["Settings"] = 0; }; RankRequiredToViewRank = { -- || The rank categories on the 'Ranks' subPage under Admin || ["Owner"] = 0; ["HeadAdmin"] = 0; ["Admin"] = 0; ["Mod"] = 0; ["VIP"] = 0; }; RankRequiredToViewRankType = { -- || The collection of loader-rank-rewarders on the 'Ranks' subPage under Admin || ["Owner"] = 0; ["SpecificUsers"] = 5; ["Gamepasses"] = 0; ["Assets"] = 0; ["Groups"] = 0; ["Friends"] = 0; ["FreeAdmin"] = 0; ["VipServerOwner"] = 0; }; RankRequiredToViewIcon = 0; WelcomeRankNotice = false; -- The 'You're a [rankName]' notice that appears when you join the game. Set to false to disable. WelcomeDonorNotice = false; -- The 'You're a Donor' notice that appears when you join the game. Set to false to disable. WarnIncorrectPrefix = true; -- Warn the user if using the wrong prefix | "Invalid prefix! Try using [correctPrefix][commandName] instead!" DisableAllNotices = false; -- Set to true to disable all HD Admin notices. ScaleLimit = 4; -- The maximum size players with a rank lower than 'IgnoreScaleLimit' can scale theirself. For example, players will be limited to ;size me 4 (if limit is 4) - any number above is blocked. IgnoreScaleLimit = 3; -- Any ranks equal or above this value will ignore 'ScaleLimit' CommandLimits = { -- Enables you to set limits for commands which have a number argument. Ranks equal to or higher than 'IgnoreLimit' will not be affected by Limit. ["fly"] = { Limit = 10000; IgnoreLimit = 3; }; ["fly2"] = { Limit = 10000; IgnoreLimit = 3; }; ["noclip"] = { Limit = 10000; IgnoreLimit = 3; }; ["noclip2"] = { Limit = 10000; IgnoreLimit = 3; }; ["speed"] = { Limit = 10000; IgnoreLimit = 3; }; ["jumpPower"] = { Limit = 10000; IgnoreLimit = 3; }; }; VIPServerCommandBlacklist = {"permRank", "permBan", "globalAnnouncement"}; -- Commands players are probihited from using in VIP Servers. GearBlacklist = {67798397}; -- The IDs of gear items to block when using the ;gear command. IgnoreGearBlacklist = 4; -- The minimum rank required to ignore the gear blacklist. PlayerDataStoreVersion = "V1.0"; -- Data about the player (i.e. permRanks, custom settings, etc). Changing the Version name will reset all PlayerData. SystemDataStoreVersion = "V1.0"; -- Data about the game (i.e. the banland, universal message system, etc). Changing the Version name will reset all SystemData. CoreNotices = { -- Modify core notices. You can find a table of all CoreNotices under [MainModule > Client > SharedModules > CoreNotices] --NoticeName = NoticeDetails; };
--// Variables
local L_1_ = game.Players.LocalPlayer local L_2_ = L_1_.Character local L_3_ = game.ReplicatedStorage:WaitForChild('ACS_Engine') local L_4_ = L_3_:WaitForChild('Eventos') local L_5_ = L_3_:WaitForChild('ServerConfigs') local L_7_ = L_3_:WaitForChild('HUD') local L_8_ = true
--//Despawning\\--
function DestroyCorpseOnDeath(Model) repeat wait() until Model:FindFirstChildOfClass("Humanoid") local MaybeHuman = Model:FindFirstChildOfClass("Humanoid") if MaybeHuman then local HumanFunc HumanFunc=MaybeHuman.Died:Connect(function() for i,v in pairs(Model:GetDescendants()) do if v:IsA("Script") then v:Destroy() end end print("Death") local Done=false for i,v in pairs(Model:GetDescendants()) do if v:IsA("Part") or v:IsA("MeshPart") then spawn(function() for i =1,10 do wait(0.1) if v then v.Transparency=v.Transparency+.1 else break end end v:Destroy() Done=true end) end end repeat wait() until Done==true if Model then Model:Destroy() end HumanFunc:Disconnect() end) end end CurZombie=nil
--[=[ Constructs a new Subscription @param fireCallback function? @param failCallback function? @param completeCallback function? @param onSubscribe () -> MaidTask @return Subscription ]=]
function Subscription.new(fireCallback, failCallback, completeCallback, onSubscribe) assert(type(fireCallback) == "function" or fireCallback == nil, "Bad fireCallback") assert(type(failCallback) == "function" or failCallback == nil, "Bad failCallback") assert(type(completeCallback) == "function" or completeCallback == nil, "Bad completeCallback") return setmetatable({ _state = stateTypes.PENDING; _source = ENABLE_STACK_TRACING and debug.traceback() or ""; _fireCallback = fireCallback; _failCallback = failCallback; _completeCallback = completeCallback; _onSubscribe = onSubscribe; }, Subscription) end
-- Get the CFrame of the given view with proper view rotations (before any tweening is done):
local function GetViewCFrame(view, rotation) return seat.CFrame * view.Pivot * rotation * view.Offset end
--// Init
log("Return init function") return service.NewProxy({ __call = function(self, data) log("Begin init") local remoteName, depsName = string.match(data.Name, "(.*)\\(.*)") Folder = service.Wrap(data.Folder --[[or folder and folder:Clone()]] or Folder) setfenv(1, setmetatable({}, { __metatable = unique })) client.Folder = Folder client.UIFolder = Folder:WaitForChild("UI", 9e9) client.Shared = Folder:WaitForChild("Shared", 9e9) client.Loader = data.Loader client.Module = data.Module client.DepsName = depsName client.TrueStart = data.Start client.LoadingTime = data.LoadingTime client.RemoteName = remoteName client.Typechecker = oldReq(service_UnWrap(client.Shared.Typechecker)) client.Changelog = oldReq(service_UnWrap(client.Shared.Changelog)) do local MaterialIcons = oldReq(service_UnWrap(client.Shared.MatIcons)) client.MatIcons = setmetatable({}, { __index = function(self, ind) local materialIcon = MaterialIcons[ind] if materialIcon then self[ind] = `rbxassetid://{materialIcon}` return self[ind] end end, __metatable = "Adonis_MatIcons", }) end --// Toss deps into a table so we don't need to directly deal with the Folder instance they're in log("Get dependencies") for _, obj in Folder:WaitForChild("Dependencies", 9e9):GetChildren() do client.Deps[obj.Name] = obj end --// Do this before we start hooking up events log("Destroy script object") --folder:Destroy() script.Parent = nil --script:Destroy() --// Intial setup log("Initial services caching") for _, serv in SERVICES_WE_USE do local _ = service[serv] end --// Client specific service variables/functions log("Add service specific") ServiceSpecific.Player = service.Players.LocalPlayer or (function() service.Players:GetPropertyChangedSignal("LocalPlayer"):Wait() return service.Players.LocalPlayer end)() ServiceSpecific.PlayerGui = ServiceSpecific.Player:FindFirstChildWhichIsA("PlayerGui") if not ServiceSpecific.PlayerGui then Routine(function() local PlayerGui = ServiceSpecific.Player:WaitForChild("PlayerGui", 120) if not PlayerGui then logError("PlayerGui unable to be fetched? [Waited 120 Seconds]") return end ServiceSpecific.PlayerGui = PlayerGui end) end --[[ -- // Doesn't seem to be used anymore ServiceSpecific.SafeTweenSize = function(obj, ...) pcall(obj.TweenSize, obj, ...) end; ServiceSpecific.SafeTweenPos = function(obj, ...) pcall(obj.TweenPosition, obj, ...) end; ]] ServiceSpecific.Filter = function(str, from, to) return client.Remote.Get("Filter", str, (to and from) or service.Player, to or from) end ServiceSpecific.LaxFilter = function(str, from) return service.Filter(str, from or service.Player, from or service.Player) end ServiceSpecific.BroadcastFilter = function(str, from) return client.Remote.Get("BroadcastFilter", str, from or service.Player) end ServiceSpecific.IsMobile = function() return service.UserInputService.TouchEnabled and not service.UserInputService.MouseEnabled and not service.UserInputService.KeyboardEnabled end ServiceSpecific.LocalContainer = function() local Variables = client.Variables if not (Variables.LocalContainer and Variables.LocalContainer.Parent) then Variables.LocalContainer = service.New("Folder", { Parent = workspace, Archivable = false, Name = `__ADONIS_LOCALCONTAINER_{client.Functions.GetRandom()}`, }) end return Variables.LocalContainer end ServiceSpecific.IncognitoPlayers = {} --// Load Core Modules log("Loading core modules") for _, load in CORE_LOADING_ORDER do local modu = Folder.Core:FindFirstChild(load) if modu then log(`~! Loading Core Module: {load}`) LoadModule(modu, true, { script = script }, true) end end --// Start of module loading and server connection process local runLast = {} local runAfterInit = {} local runAfterLoaded = {} local runAfterPlugins = {} --// Loading Finisher client.Finish_Loading = function() log("Client fired finished loading") if client.Core.Key then --// Run anything from core modules that needs to be done after the client has finished loading log("~! Doing run after loaded") for _, f in runAfterLoaded do Pcall(f, data) end --// Stuff to run after absolutely everything else log("~! Doing run last") for _, f in runLast do Pcall(f, data) end --// Finished loading log("Finish loading") clientLocked = true client.Finish_Loading = function() end client.LoadingTime() --origWarn(tostring(time()-(client.TrueStart or startTime))) service.Events.FinishedLoading:Fire(os.time()) log("~! FINISHED LOADING!") else log("Client missing remote key") client.Kill()("Missing remote key") end end --// Initialize Cores log("~! Init cores") for _, name in CORE_LOADING_ORDER do local core = client[name] log(`~! INIT: {name}`) if core then if type(core) == "table" or (type(core) == "userdata" and getmetatable(core) == "ReadOnly_Table") then if core.RunLast then table.insert(runLast, core.RunLast) core.RunLast = nil end if core.RunAfterInit then table.insert(runAfterInit, core.RunAfterInit) core.RunAfterInit = nil end if core.RunAfterPlugins then table.insert(runAfterPlugins, core.RunAfterPlugins) core.RunAfterPlugins = nil end if core.RunAfterLoaded then table.insert(runAfterLoaded, core.RunAfterLoaded) core.RunAfterLoaded = nil end if core.Init then log(`Run init for {name}`) Pcall(core.Init, data) core.Init = nil end end end end --// Load any afterinit functions from modules (init steps that require other modules to have finished loading) log("~! Running after init") for _, f in runAfterInit do Pcall(f, data) end --// Load Plugins log("~! Running plugins") for _, module in Folder.Plugins:GetChildren() do --// Pass example/README plugins. if module.Name == "README" then continue end LoadModule(module, false, { script = module }) --noenv end --// We need to do some stuff *after* plugins are loaded (in case we need to be able to account for stuff they may have changed before doing something, such as determining the max length of remote commands) log("~! Running after plugins") for _, f in runAfterPlugins do Pcall(f, data) end log("Initial loading complete") --// Below can be used to determine when all modules and plugins have finished loading; service.Events.AllModulesLoaded:Connect(function() doSomething end) client.AllModulesLoaded = true service.Events.AllModulesLoaded:Fire(os.time()) --[[client = service.ReadOnly(client, { [client.Variables] = true; [client.Handlers] = true; G_API = true; G_Access = true; G_Access_Key = true; G_Access_Perms = true; Allowed_API_Calls = true; HelpButtonImage = true; Finish_Loading = true; RemoteEvent = true; ScriptCache = true; Returns = true; PendingReturns = true; EncodeCache = true; DecodeCache = true; Received = true; Sent = true; Service = true; Holder = true; GUIs = true; LastUpdate = true; RateLimits = true; Init = true; RunAfterInit = true; RunAfterLoaded = true; RunAfterPlugins = true; }, true)--]] service.Events.ClientInitialized:Fire() log("~! Return success") return "SUCCESS" end, __metatable = "Adonis", __tostring = function() return "Adonis" end, })