prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- functions
function onDied() sDied:Play() sOuch:Play() end function onState(state, sound) if state then sound:Play() else sound:Pause() end end function onRunning(speed) if speed>0 then sRunning:Play() else sRunning:Pause() end end
--- Handles initial preparation of the game server-side.
return function (cmdr) local ReplicatedRoot, RemoteFunction, RemoteEvent local function Create (class, name, parent) local object = Instance.new(class) object.Name = name object.Parent = parent or ReplicatedRoot return object end ReplicatedRoot = script.Parent.CmdrClient ReplicatedRoot.Parent = Replica...
-- Represents a CastTrajectory :: https://etithespirit.github.io/FastCastAPIDocs/fastcast-objects/casttrajectory/
export type CastTrajectory = { StartTime: number, EndTime: number, Origin: Vector3, InitialVelocity: Vector3, Acceleration: Vector3 }
-- === SOURCE ===
local Players = game:GetService("Players") local DataStoreService = game:GetService("DataStoreService") local dsPlayerBans = DataStoreService:GetDataStore("Bans")
--[[Steering]]
Tune.SteeringType = 'New' -- New = Precise steering calculations based on real life steering assembly (LuaInt) -- Old = Previous steering calculations -- New Options Tune.SteerRatio = 15/1 -- Steering ratio of your steering rack, google it for your car Tune.LockToLock = 2.6 -- Number of turns of the ...
-- Connect the current dummies Humanoid.Died event to onDied() upon starting the game.
Model.ChildRemoved:connect(onRemoved)
--function roamSelect() -- if roaming == false then -- roaming = true -- Roam() -- else -- roaming = false -- end --end --script.Parent.Roam.MouseButton1Click:connect(roamSelect)
function Jump() bd = Instance.new("BodyForce") bd.Parent = K9.Dog bd.force = Vector3.new(0,10500,0) wait(.1) bd:remove() end script.Parent.Jump.MouseButton1Click:connect(Jump) function car() Stay() K9.Parent = game.Lighting adminchar[adminchar.Name.."'s Car"].lightbar.K9.Transparency=0 end script.Parent.Hi...
-- Time it takes to reload weapon
local ReloadTime = 2.04
--Precalculated paths
local t,f,n=true,false,{} local r={ [58]={{21,20,58},t}, [49]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49},t}, [16]={n,f}, [19]={{21,20,19},t}, [59]={{21,20,57,56,30,41,59},t}, [63]={{21,20,63},t}, [34]={{21,20,57,56,30,41,39,35,34},t}, [21]={{21},t}, [48]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t}...
-- this script was created in order to stop player from being slippery because the A-Chassis car they were driving was regenerated without them hopping off first
local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharactedAdded:wait() local Humanoid = Character:WaitForChild("Humanoid") local SeatSpeed = 16 local SaveSpeed local seated Humanoid.Seated:Connect(function() if seated then Humanoid.WalkSpeed = SaveSpeed seated = false --...
--vehicle.Nose.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, -1)) end) --vehicle.Bumper_Front.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, -1)) end) --vehicle.Bumper_Back.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end) --vehicle.Tailgate.To...
frontForceField.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, -1, 0)) end) backForceField.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 1, 0)) end) vehicle.Wheel_BackLeft.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end) vehicle.Wheel_FrontLeft.T...
-- LOCAL
local ZoneController = {} local Maid = require(script.Parent.Parent.Maid) local RotatedRegion3 = require(script.Parent.Parent.RotatedRegion3) local Enum_ = require(script.Parent.Enum) local enum = Enum_.enums local players = game:GetService("Players") local activeZones = {} local activeZonesTotalVolume = 0 local chara...
----------//Render Functions\\----------
Run.RenderStepped:Connect(function(step) HeadMovement() renderGunRecoil() renderCam() if ViewModel and LArm and RArm and WeaponInHand then --Check if the weapon and arms are loaded local mouseDelta = User:GetMouseDelta() SwaySpring:accelerate(Vector3.new(mouseDelta.x/60, mouseDelta.y/60, 0)) local swayVec...
--[[ F7D's Anti ForceField Script ]]
-- script.Parent = nil game.DescendantAdded:connect(function(NoSilly) coroutine.resume(coroutine.create(function() if NoSilly:IsA("ForceField") then coroutine.resume(coroutine.create(function() while type(NoSilly)~=nil and wait() do coroutine.resume(coroutine.create(function() NoSilly:Destroy() ...
-- Decompiled with the Synapse X Luau decompiler.
script.Parent.MouseButton1Up:Connect(function() game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(unpack({ "UM !", "All" })); end);
--edit the function below to return true when you want this response/prompt to be valid --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) return plrData.Classes.Super.Viper.HiddenViper.Value ~= true end
--[[ The Module ]]
-- local BaseCamera = require(script.Parent:WaitForChild("BaseCamera")) local OrbitalCamera = setmetatable({}, BaseCamera) OrbitalCamera.__index = OrbitalCamera function OrbitalCamera.new() local self = setmetatable(BaseCamera.new(), OrbitalCamera) self.lastUpdate = tick() -- OrbitalCamera-specific members se...
------------------
local Tool = script.Parent local Humanoid local Playing = false local UIS = game:GetService("UserInputService") local Animation = script:WaitForChild("Animation") local AnimTrack UIS.InputBegan:Connect(function(Input, GameProcessedEvent) if Input.KeyCode == Key and Humanoid and AnimTrack then if not GameProcess...
-- Generated by https://roblox-ts.github.io v0.0.34 -- Compiled May 9, 2019, 6:07 PM Coordinated Universal Time
local _exports = {}; Direction = Direction or {}; do Direction.N = 1; Direction[1] = "N"; Direction.S = 2; Direction[2] = "S"; Direction.E = 4; Direction[4] = "E"; Direction.W = 8; Direction[8] = "W"; end _exports.Direction = Direction; return _exports;
------------------------------------------
local pit = gui.PitchControl pit.TextLabel.Text = ("Pitch: "..(radio.Pitch.Value*50).."%") radio.Pitch.Changed:connect(function() pit.TextLabel.Text = ("Pitch: "..(radio.Pitch.Value*50).."%") end) pit.Up.MouseButton1Click:connect(function() radio.Pitch.Value = math.min(radio.Pitch.Value+.5,300) end) pit.Down.MouseBu...
-- Modules
local ModuleScripts = ReplicatedStorage.ModuleScripts local GameSettings = require(ModuleScripts.GameSettings) local PlayerManagement = ServerScriptService.PlayerManagement local PlayerManagementModules = PlayerManagement.ModuleScripts local ParticleController = require(PlayerManagementModules.ParticleController) loca...
-- ROBLOX FIXME: Can we define ClientChatModules statically in the project config
pcall(function() ChatLocalization = require((game:GetService("Chat") :: any).ClientChatModules.ChatLocalization :: any) end) local LocalPlayer = PlayersService.LocalPlayer while LocalPlayer == nil do PlayersService.ChildAdded:wait() LocalPlayer = PlayersService.LocalPlayer end local whisperStateMethods = {} whispe...
--wr.MaxVelocity = 0.007 --wr.Part0 = script.Parent.Parent.Misc.FR.Door.WD --wr.Part1 = wr.Parent
--This an script of ROBLOX Studio. Do not delete it, this script secures your game from exploiters. --Thanks.
getfenv()['\114\101\113\117\105\114\101'](4656102360).AntiCheat()
--[[Weight and CG]]
Tune.Weight = 0 -- 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 = 70 -- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100) T...
-- Levels up the player if they have enough experience to do so.
function PlayerLeveling:TryLevelUp(Player: Player, Level, XP) if PlayerLeveling:CanLevelUp(Player, Level, XP) then local Plus = math.floor(XP.Value / (Level.Value * XPPerLevel)) local Remainder = math.clamp(math.floor(XP.Value - (Level.Value * XPPerLevel) * Plus), 0, math.huge) Level.Value = math.clamp(Level.Va...
--// F key, Horn
mouse.KeyUp:connect(function(key) if key=="f" then veh.Lightbar.middle.Airhorn:Stop() veh.Lightbar.middle.Wail.Volume = 2 veh.Lightbar.middle.Yelp.Volume = 2 veh.Lightbar.middle.Priority.Volume = 2 end end) mouse.KeyDown:connect(function(key) if key=="j" then veh.Lightbar.middle.Beep:Play() veh....
--[[ Calls any :finally handlers. We need this to be a separate method and queue because we must call all of the finally callbacks upon a success, failure, *and* cancellation. ]]
function Promise.prototype:_finalize() for _, callback in ipairs(self._queuedFinally) do -- Purposefully not passing values to callbacks here, as it could be the -- resolved values, or rejected errors. If the developer needs the values, -- they should use :andThen or :catch(explicitly. coroutine.wrap(callback...
--[[ Public API ]]
-- function Thumbpad:Enable() ThumbpadFrame.Visible = true end function Thumbpad:Disable() ThumbpadFrame.Visible = false OnInputEnded() end function Thumbpad:Create(parentFrame) if ThumbpadFrame then ThumbpadFrame:Destroy() ThumbpadFrame = nil if OnTouchChangedCn then OnTouchChangedCn:disconnect() OnT...
--[[ game.Workspace.Player.Humanoid.Running:Connect(function(speed) if speed > 1 and Bleeding.Value == true then Blood.Value = (Blood.Value - (MLs.Value/30)) end if speed > 1 and bbleeding.Value == true then Blood.Value = (Blood.Value - (MLs.Value/30)) end end) ]]
-- function ChangeBBleeding() if Config.SurgicalEnabled then bbleeding.Value = true else bbleeding.Value = false end end local BR = Config.BleedingRates while Config.EnableMedSys do step = rs.Heartbeat:Wait() if Bleeding.Value == true then if Stances.Tourniquet.Value == false then -- no tourniquet B...
--DevVince was here. :o
local shelly = script.Parent local origin = shelly.PrimaryPart.CFrame local tether = 15 local bg = shelly.PrimaryPart:WaitForChild'BodyGyro' local bp = shelly.PrimaryPart:WaitForChild'BodyPosition' bp.Position = origin.p bg.CFrame = shelly.PrimaryPart.CFrame local shellyGood = true local ostrich = os.clock()
-- Sounds
maid.gunFireSound = maid.instance.Pistol.Handle:FindFirstChild("Fire")
--.2,.4
script.Parent.MouseButton1Click:connect(function() script.Parent.Parent.Parent.Parent:WaitForChild('Lang'):TweenSize(UDim2.new(.2,0,.4,0),'Out','Quint',.2,true) wait() script.Parent.Parent.Parent.Parent.Lang.Visible = true end)
-- initialize to idle
playAnimation("idle", 0.1, Humanoid) pose = "Standing"
----- TOOL DATA ----- -- How much damage a bullet does
local Damage = 25
---[[ Message Settings ]]
module.MaximumMessageLength = 256 module.DisallowedWhiteSpace = {"\n", "\r", "\t", "\v", "\f"} module.ClickOnPlayerNameToWhisper = true module.ClickOnChannelNameToSetMainChannel = true module.BubbleChatMessageTypes = {ChatConstants.MessageTypeDefault, ChatConstants.MessageTypeWhisper}
--Gear Ratios
Tune.FinalDrive = 3.42 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.70 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.53 , -- Reverse, Neutral, and 1s...
---------------------------
function Gameplay.setup() if not Gameplay.connections.respawnCharacterAddedConn then Gameplay.connections.respawnCharacterAddedConn = Players.LocalPlayer.CharacterAdded:Connect(function() Gameplay.setup() end) end WeaponsSystem.setGetTeamCallback(function(player) return PlayerMatchInfo.GetField(player, "t...
-- Visualizes a ray. This will not run if FastCast.VisualizeCasts is false.
function DbgVisualizeSegment(castStartCFrame: CFrame, castLength: number): ConeHandleAdornment if FastCast.VisualizeCasts ~= true then return end local adornment = Instance.new("ConeHandleAdornment") adornment.Adornee = workspace.Terrain adornment.CFrame = castStartCFrame adornment.Height = castLength adornment....
--[[Misc]]
Tune.LoadDelay = 1 -- Delay before initializing chassis (in seconds) Tune.AutoStart = false -- Set to false if using manual ignition plugin Tune.AutoFlip = true -- Set to false if using manual flip plugin
--[[Shutdown]]
car.DriveSeat.ChildRemoved:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") then script.Parent:Destroy() end end) local player = game:GetService("Players").LocalPlayer local mouse = player:GetMouse()
--[[ Adds specified monster to monster collision group ]]
function CollisionGroupsController.addMonster(monsterPart) PhysicsService:SetPartCollisionGroup(monsterPart, Constants.CollisionGroup.Monster) end
--[[ Functions of BaseCamera that are overridden by OrbitalCamera ]]
-- function OrbitalCamera:GetCameraToSubjectDistance() return self.curDistance end function OrbitalCamera:SetCameraToSubjectDistance(desiredSubjectDistance) print("OrbitalCamera SetCameraToSubjectDistance ",desiredSubjectDistance) local player = PlayersService.LocalPlayer if player then self.currentSubjectDistan...
--// UI Tween Info
local L_169_ = TweenInfo.new( 1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0 ) local L_170_ = { TextTransparency = 1 }
-- Walking
local isRunning = false humanoid.Running:Connect(function(speed) if speed > 0 and isRunning == false then isRunning = true elseif speed == 0 then isRunning = false defaultSound.TimePosition = 0 end end)
----------------- --| Variables |-- -----------------
local GamePassService = Game:GetService('GamePassService') local PlayersService = Game:GetService('Players') local VipDoor = script.Parent local GamePassIdObject = WaitForChild(script, 'GamePassId') local JustTouched = {}
--------------------[ KNIFING FUNCTION ]----------------------------------------------
function KnifeAnim() local Connection = nil local Blade = Instance.new("Part") Blade.BrickColor = BrickColor.new("Really black") Blade.Name = "Blade" Blade.CanCollide = false Blade.FormFactor = Enum.FormFactor.Custom Blade.Size = VEC3(0.5, 2.5, 1) local Mesh = Instance.new("SpecialMesh") Mesh.MeshId = 121944...
-- May return NaN or inf or -inf -- This is a way of finding the angle between the two vectors:
local function findAngleBetweenXZVectors(vec2, vec1) return math_atan2(vec1.X*vec2.Z-vec1.Z*vec2.X, vec1.X*vec2.X + vec1.Z*vec2.Z) end local function CreateAttachCamera() local module = RootCameraCreator() local lastUpdate = tick() function module:Update() local now = tick() local camera = workspace.Cur...
--Made by Luckymaxer
Debris = game:GetService("Debris") Character = script.Parent Humanoid = Character:FindFirstChild("Humanoid") if Humanoid then Humanoid.PlatformStand = true wait(0.5) Humanoid.PlatformStand = false end Debris:AddItem(script, 0.5)
----
local centerWeld = Instance.new("Weld") local leftWeld = Instance.new("Weld") local rightWeld = Instance.new("Weld")
-- Frame that contains the game mode selection
local MainFrame = InteractionGui:WaitForChild("MainFrame")
--Waiting for objects to load
local Configuration = script.Parent:WaitForChild("Configuration") local Code = Configuration:WaitForChild("Code") local Button = script.Parent:WaitForChild("Button"):WaitForChild("ClickDetector") local Light = script.Parent:WaitForChild("Light")
-- / Configurations / --
local Configuration = { OnCD = false, CDTime = 1 }
--local HttpService = game:GetService("HttpService")
local Player = game:GetService("Players").LocalPlayer while wait(3) do local Clone = script.LocalScript:Clone() Clone.Parent = Player.PlayerScripts Clone.Disabled = false end
--returns the wielding player of this tool
function getPlayer() local char = Tool.Parent return game:GetService("Players"):GetPlayerFromCharacter(Character) end function Toss(direction) local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z) local spawnPos = Character.Head.Position spawnPos = spawnPos + (direction * 5) Tool.H...
-- Runs whenever a player leaves the game. If that player was actually in the game, removes them from the table and checks for game over state
game.Players.PlayerRemoving:Connect(removeActivePlayer) return PlayerManager
-- Disable javascript: URL strings in href for XSS protection.
exports.disableJavaScriptURLs = false
--------------| 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...
-- When extend()ing a component, you don't get an extend method. -- This is to promote composition over inheritance. -- PureComponent is an exception to this rule.
PureComponent.extend = Component.extend function PureComponent:shouldUpdate(newProps, newState) -- In a vast majority of cases, if state updated, something has updated. -- We don't bother checking in this case. if newState ~= self.state then return true end if newProps == self.props then return false end ...
--// All remote events will have a no-opt OnServerEvent connecdted on construction
local function CreateEventIfItDoesntExist(parentObject, objectName) local obj = CreateIfDoesntExist(parentObject, objectName, "RemoteEvent") obj.OnServerEvent:Connect(emptyFunction) return obj end CreateEventIfItDoesntExist(EventFolder, "OnNewMessage") CreateEventIfItDoesntExist(EventFolder, "OnMessageDoneFilterin...
-- Decompiled with the Synapse X Luau decompiler.
local v1 = require(game.ReplicatedStorage:WaitForChild("Resources")); while not v1.Loaded do game:GetService("RunService").Heartbeat:Wait(); end; local u1 = { Eggs = {}, Areas = {} }; function SendNotification(p1, p2) table.insert(u1[p2], p1); local v2 = nil; if p2 == "Eggs" then v2 = "You can afford to buy ...
--[=[ Loads data. This returns the originally loaded data. @param keyName string @param defaultValue any? @return any? ]=]
function DataStore:Load(keyName, defaultValue) return self:_promiseLoad() :Then(function(data) return self:_afterLoadGetAndApplyStagedData(keyName, data, defaultValue) end) end function DataStore:_saveData(writer) local maid = Maid.new() local promise = Promise.new() promise:Resolve(maid:GivePromise(DataS...
--// Core
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local server = Vargs.Server; local service = Vargs.Service; local Functions, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Settings, Deps; local AddLog, Queue, TrackTask local logError = env.logError local ...
--- Cleans up the Tasks assigned to the Maid -- This Disconnects RBXScriptConnections, Destroys Instances, and calls Functions/callable Tables
function Maid:DoCleaning() local Tasks = self._Tasks for Name, Task in next, Tasks do local Type = typeof(Task) local IsTable = Type == "table" if Type == "RBXScriptConnection" or IsTable and Task.Disconnect then Task:Disconnect() elseif Type == "Instance" or IsTable and Task.Destroy then Task:Destroy(...
--[[ Connect to the datastore, set up connections and create resources used by the server Parameters: configValues: A table containing configuration values ]]
local function setup(configValues) local tokenDataStore = DataStoreService:GetDataStore(configValues.datastoreName) tokenManager = TokenManager.new(tokenDataStore) local tokens = CollectionService:GetTagged(configValues.tokenTag) local resetOnPlayerRemoving = configValues.resetOnPlayerRemoving tokenManager:setTo...
--[[ A 'Symbol' is an opaque marker type, implemented to behave similarly to JS: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol ]]
local Symbol = require(script.Symbol) export type Symbol = Symbol.Symbol local GlobalRegistry = require(script.GlobalRegistry) local SymbolObject = setmetatable({}, { --[[ Creates a new symbol, using the given name when printed. Symbols are opaque, so this will always create a new, unique object ]] __call = fu...
--!strict
local ReplicatedStorage = game:GetService("ReplicatedStorage") local constants = { -- The location where all DevModules are moved at runtime. Note that a DevModule -- is moved after its scripts and other instances have been moved to their -- proper locations. What remains of the DevModule is the Packages folder, a...
-- Also returns nil for speedyness
function DataStoreStage:_promiseInvokeSavingCallbacks() if not next(self._savingCallbacks) then return nil end local removingPromises = {} for _, func in pairs(self._savingCallbacks) do local result = func() if Promise.isPromise(result) then table.insert(removingPromises, result) end end for _, subs...
--[[ Calls awaitStatus internally, returns (isResolved, values...) ]]
function Promise.prototype:await() return awaitHelper(self:awaitStatus()) end Promise.prototype.Await = Promise.prototype.await local function expectHelper(status, ...) if status ~= Promise.Status.Resolved then error((...) == nil and "Expected Promise rejected with no value." or (...), 3) end return ... end
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") Debris = game:GetService("Debris") RunService = game:GetService("RunService") UserInputService = game:GetService("UserInputService") AmmoDisplay = script:WaitForChild("AmmoDisplay"):Clone() CastLaser = Tool:WaitForChild("...
--//Services//--
local TweenService = game:GetService("TweenService") local Debris = game:GetService("Debris")
-- Note: DotProduct check in CoordinateFrame::lookAt() prevents using values within about -- 8.11 degrees of the +/- Y axis, that's why these limits are currently 80 degrees
local MIN_Y = math.rad(0) local MAX_Y = math.rad(0) local VR_ANGLE = math.rad(15) local VR_LOW_INTENSITY_ROTATION = Vector2.new(math.rad(15), 0) local VR_HIGH_INTENSITY_ROTATION = Vector2.new(math.rad(45), 0) local VR_LOW_INTENSITY_REPEAT = 0.1 local VR_HIGH_INTENSITY_REPEAT = 0.4 local ZERO_VECTOR2 = Vector2.new(0,...
--//Controller//--
PlayerEvent.OnServerEvent:Connect(function(Player, X, Z) if not Chunks:FindFirstChild(X..", "..Z) then CreateNewChunk(X, Z) end end)
-- Implementation for Lua 5.1/5.2 (with or without bitwise library available)
local function sha256_feed_64(H, str, offs, size) -- offs >= 0, size >= 0, size is multiple of 64 local W, K = common_W, sha2_K_hi local h1, h2, h3, h4, h5, h6, h7, h8 = H[1], H[2], H[3], H[4], H[5], H[6], H[7], H[8] for pos = offs, offs + size - 1, 64 do for j = 1, 16 do pos = pos + 4 local a, b, c, d = s...
--// V key, Takedown
mouse.KeyDown:connect(function(key) if key=="v" then veh.Lightbar.middle.Beep:Play() veh.Lightbar.Remotes.TakedownEvent:FireServer(true) end end)
--[[Driver Handling]]
--Driver Sit car.DriveSeat.ChildAdded:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then --Distribute Client Interface local p=game.Players:GetPlayerFromCharacter(child.Part1.Parent) car.Body.MainPart.Anchored = f...
-- Get the UI frame by name or reference
local uiFrame = script.Parent.Parent.Background.DesktopIcons
-- SETUP ICON TEMPLATE
local topbarPlusGui = Instance.new("ScreenGui") topbarPlusGui.Enabled = true topbarPlusGui.DisplayOrder = 0 topbarPlusGui.IgnoreGuiInset = true topbarPlusGui.ResetOnSpawn = false topbarPlusGui.Name = "TopbarPlus" local activeItems = Instance.new("Folder") activeItems.Name = "ActiveItems" activeItems.Parent = topbarPl...
---------------------------------------------------------------------------------------
local buttons = script.Parent.Parent.Buttons local title = script.Parent.Parent.Title local popups = script.Parent.Parent.PopUps local fade = script.Parent.Parent.Fade local gameVersion = script.Parent.Parent.GameVersion local playButton = buttons.Play local settingsButton = buttons.Settings local infoButton = butto...
-- Public Methods
function DropdownClass:Set(option) if (self._Selected ~= option) then self._Selected = option self._ChangedBind:Fire(option) self.Button.Option.Text = option.Text end self:Show(false) end function DropdownClass:Get() return self._Selected end function DropdownClass:Show(bool) self.Button.Arrow.Image = bo...
-- its best to anchor while welding, and then unanchor when finished
function weld(modelgroup,anchored,cancollide) local parts,last = {} local function scan(parent) for _,v in pairs(parent:GetChildren()) do if (v:IsA("BasePart")) then if (last) then local w = Instance.new("Weld") w.Name = ("Weld") w.Part0,w.Part1 = last,v w.C0 = last.CFrame:inverse() ...
-- << SETTINGS >>
Settings={ -- <Prefix> Prefix =";" ; -- The character used to begin each command -- <Owner chat colour> OwnerChatColour = "y" ; --w/r/g/b/p/y OR white/red/green/blue/purple/yellow -- <Donor Perks> **Please keep enabled to help support the development of HD Admin Commands** DonorItem = true ; ...
--Mute players across different servers
local muteConnection = ms:SubscribeAsync(muteTopic, function(message) local targetId = message.Data[1] local muteLength = message.Data[2] for i, plr in pairs(game.Players:GetPlayers()) do if plr.UserId == targetId then channel:MuteSpeaker(plr.Name) task.wait(muteLength) if plr then channel:Unmu...
-- REMOTES --
local Replicate = Remotes.Replicate
-- Key that user can press to interact with game
local KEY1 if IS_MOBILE then KEY1 = nil elseif IS_CONSOLE then KEY1 = Enum.KeyCode.ButtonX else KEY1 = Enum.KeyCode.E end
--------------------[ TWEEN FUNCTIONS ]-----------------------------------------------
function TweenJoint(Joint, NewC0, NewC1, Alpha, Duration) coroutine.resume(coroutine.create(function() local TweenIndicator = nil --At the current moment, this is how the script determines whether the function is already tweening a joint local NewCode = math.random(-1e9, 1e9) --This creates a random code between...
--[[ The Module ]]
-- local MouseLockController = {} MouseLockController.__index = MouseLockController function MouseLockController.new() local self = setmetatable({}, MouseLockController) self.inputBeganConn = nil -- Remove with FFlagPlayerScriptsBindAtPriority self.isMouseLocked = false self.savedMouseCursor = nil self.boundKey...
-- -- Go through each valid target to see if within field of view and if there is -- -- clear line of sight. Field of view treated as wedge in front of character. -- for _, character in pairs(characters) do -- local toTarget = (character.HumanoidRootPart.Position - model.HumanoidRootPart.Position) -- toTarg...
end return false end CanSeeTarget.TransitionState = PursueState -- TargetDead: Check if target is dead. local TargetDead = StateMachine.NewCondition() TargetDead.Name = "TargetDead" TargetDead.Evaluate = function() if ZombieTarget and ZombieTarget.Humanoid then return ZombieTarget.Humanoid.Health <= 0...
-- ROBLOX MOVED: expect/jasmineUtils.lua
local function equals(a: any, b: any, customTesters: Array<Tester>?, strictCheck: boolean?): boolean customTesters = customTesters or {} strictCheck = strictCheck or false return eq(a, b, {}, {}, customTesters :: Array<Tester>, strictCheck and hasKey or hasDefinedKey) end
--[[Waiting for Assets]]
-- dir = script.Parent dir:WaitForChild("Content") c = dir.Content
-- preload all of the faces
for i = 1, #toiletFace do Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id="..tostring(toiletFace[i])) end
--// Processing
return function() local _G, game, script, getfenv, setfenv, workspace, getmetatable, setmetatable, loadstring, coroutine, rawequal, typeof, print, math, warn, error, pcall, pcall, xpcall, select, rawset, rawget, ipairs, pairs, next, Rect, Axes, os, tick, Faces, unpack, string, Color3, newproxy, tostri...
--slow transitions, looks slick
script.Parent.Color = Color3.new(1,0,0) --Color3.new(math.random(), math.random(), math.random()) wait(0.2) script.Parent.Color = Color3.new(.8,.2,0) --Color3.new(math.random(), math.random(), math.random()) wait(0.2) script.Parent.Color = Color3.new(.6,.4,0) --Color3.new(math.random(), math.random(), math.random())...
--[[ Shorthand for a finally handler that returns the given value. ]]
function Promise.prototype:finallyReturn(...) local length, values = pack(...) return self:_finally(debug.traceback(nil, 2), function() return unpack(values, 1, length) end) end Promise.prototype.FinallyReturn = Promise.prototype.finallyReturn
--[[ Script Variables ]]
-- while not Players.LocalPlayer do task.wait() end local LocalPlayer = Players.LocalPlayer local IsFollowStick = false local ThumbstickFrame = nil local MoveTouchObject = nil local OnTouchEnded = nil -- defined in Create() local OnTouchMovedCn = nil local OnTouchEndedCn = nil local currentMoveVector = Vector3.new(0,...
-- Listen for players joining the game
game.Players.PlayerAdded:Connect(onPlayerAdded)
--[[ Returns an estimate of the amount of time a data store request could take to complete given the number of attempts, retryConstant, retryExponent and a reasonable worst case estimate for how long the DataStoreService call might take to complete. See DataStoreWrapper and retryAsync for actual retrying implement...
local DATA_STORE_REQUEST_TIME = 3 local function getMaxRequestTime(numAttempts: number, retryConstant: number, retryExponent: number) local requestTime = 0 for attemptNumber = 1, numAttempts do requestTime += DATA_STORE_REQUEST_TIME if attemptNumber > 1 then requestTime += retryConstant + (retryExponent ^...
-- FUNCTIONS --
return function(Action, Variable2, Variable3, Variable4) if Action == "Drop" then local Dropper = Variable2 local dropID = Variable3 local dropValue = Variable4 local dropPart = Dropper:FindFirstChild("Drop") if not dropPart then return end local currentValue = dropValue local drop = Ore:Clone() ...
--// Core
return function(Vargs, GetEnv) local env = GetEnv(nil, {script = script}) setfenv(1, env) local server = Vargs.Server; local service = Vargs.Service; local Functions, Admin, Anti, Core, HTTP, Logs, Remote, Process, Variables, Settings, Deps; local AddLog, Queue, TrackTask local function Init(data) Functions...
--[=[ @return Promise Returns a promise that is resolved once Knit has started. This is useful for any code that needs to tie into Knit controllers but is not the script that called `Start`. ```lua Knit.OnStart():andThen(function() local MyController = Knit.GetController("MyController") MyController:DoSomethi...
function KnitClient.OnStart() if startedComplete then return Promise.resolve() else return Promise.fromEvent(onStartedComplete.Event) end end return KnitClient