prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
--Springs--
frontstiffness = 1290 * StiffnessFront frontdamping = 40 * StiffnessFront /1.5 rearstiffness = 1290 * StiffnessRear reardamping = 40 * StiffnessRear /1.5 minLF = SuspensionTravelF minLR = SuspensionTravelR maxL = ((RideHeightRear + RideHeightFront)/2) + 4 ffl = RideHeightFront+2 rfl = RideHeightRear+2 local springFL = Instance.new("SpringConstraint", SFL) springFL.Attachment0 = SFL.Attachment springFL.Attachment1 = SSML.Attachment springFL.Damping = frontdamping springFL.FreeLength = ffl springFL.Stiffness = frontstiffness springFL.Visible = false springFL.LimitsEnabled = true springFL.MinLength = minLF springFL.MaxLength = maxL local springFR = Instance.new("SpringConstraint", SFR) springFR.Attachment0 = SFR.Attachment springFR.Attachment1 = SSMR.Attachment springFR.Damping = frontdamping springFR.FreeLength = ffl springFR.Stiffness = frontstiffness springFR.Visible = false springFR.LimitsEnabled = true springFR.MinLength = minLF springFR.MaxLength = maxL local springRL = Instance.new("SpringConstraint", SRL) springRL.Attachment0 = SRL.Attachment springRL.Attachment1 = BRL.Attachment springRL.Damping = reardamping springRL.FreeLength = rfl springRL.Stiffness = rearstiffness springRL.Visible = false springRL.LimitsEnabled = true springRL.MinLength = minLR springRL.MaxLength = maxL local springRR = Instance.new("SpringConstraint", SRR) springRR.Attachment0 = SRR.Attachment springRR.Attachment1 = BRR.Attachment springRR.Damping = reardamping springRR.FreeLength = rfl springRR.Stiffness = rearstiffness springRR.Visible = false springRR.LimitsEnabled = true springRR.MinLength = minLR springRR.MaxLength = maxL local XSteeringL = Instance.new("HingeConstraint", SSL) XSteeringL.Attachment0 = SSL.Attachment XSteeringL.Attachment1 = SSML.Attachment XSteeringL.ActuatorType = "Motor" XSteeringL.LimitsEnabled = true XSteeringL.LowerAngle = SteeringAngle*-1 XSteeringL.UpperAngle = SteeringAngle XSteeringL.MotorMaxTorque = 200000 local XSteeringR = Instance.new("HingeConstraint", SSR) XSteeringR.Attachment0 = SSR.Attachment XSteeringR.Attachment1 = SSMR.Attachment XSteeringR.ActuatorType = "Motor" XSteeringR.LimitsEnabled = true XSteeringR.LowerAngle = SteeringAngle*-1 XSteeringR.UpperAngle = SteeringAngle XSteeringR.MotorMaxTorque = 200000 local BGL = Instance.new("BodyGyro") BGL.Parent = xSSL BGL.Name = "Gyro" BGL.D = 180 BGL.MaxTorque = Vector3.new(900, 0, 900) BGL.P = 300 local BGR = Instance.new("BodyGyro") BGR.Parent = xSSR BGR.Name = "Gyro" BGR.D = 180 BGR.MaxTorque = Vector3.new(900, 0, 900) BGR.P = 300 local flip = Instance.new("BodyGyro", script.Parent) flip.Name = "Flip" flip.D = 1000 flip.MaxTorque = Vector3.new(0,0,0) flip.P = 30000
----- water handler -----
while true do if script.Parent.HotOn.Value == true and script.Parent.ColdOn.Value == true and script.Parent.Plugged.Value == true and water.Scale.Y <= 0.6 then -- if BOTH ON and PLUGGED water.Scale = water.Scale + Vector3.new(0, 0.01, 0) water.Offset = Vector3.new(0, water.Scale.Y/2, 0) hotWater = hotWater + 1 coldWater = coldWater + 1 drainSound:Stop() elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == true and water.Scale.Y <= 0.6 then -- if ON and PLUGGED water.Scale = water.Scale + Vector3.new(0, 0.01, 0) water.Offset = Vector3.new(0, water.Scale.Y/2, 0) if script.Parent.HotOn.Value == true then hotWater = hotWater + 1 else coldWater = coldWater + 1 end drainSound:Stop() elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == false and water.Scale.Y <= 0.6 then -- if ON and NOT PLUGGED if script.Parent.HotOn.Value == true then coldWater = coldWater - 1 else hotWater = hotWater - 1 end drainSound:Stop() elseif (script.Parent.HotOn.Value == false and script.Parent.ColdOn.Value == false) and script.Parent.Plugged.Value == false and water.Scale.Y > 0 then -- if NOT ON and NOT PLUGGED water.Scale = water.Scale + Vector3.new(0, -0.02, 0) water.Offset = Vector3.new(0, water.Scale.Y/2, 0) coldWater = coldWater - 1 hotWater = hotWater - 1 drainSound.TimePosition = 0 drainSound:Play() end if coldWater < 1 then coldWater = 1 end if hotWater < 1 then hotWater = 1 end waterTemp = hotWater/coldWater if waterTemp > 1 then water.Parent.SteamEmitter.Enabled = true else water.Parent.SteamEmitter.Enabled = false end wait(0.1) if script.Parent.ColdOn.Value == true or script.Parent.HotOn.Value == true then script.Parent.Splash.ParticleEmitter.Enabled = true else script.Parent.Splash.ParticleEmitter.Enabled = false end if water.Scale.Y <= 0 then drainSound:Stop() end end
-------------------------
function onClicked() R.Function1.Disabled = true R.Function2.Disabled = false R.BrickColor = BrickColor.new("Institutional white") g.DJM.MIX.BrickColor = BrickColor.new("Really black") g.DJM.REMIX.BrickColor = BrickColor.new("Really red") g.DJM.Screen.SurfaceGui.Menu.Visible = true end script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- Variables to store waypoints table and zombie's current waypoint
local waypoints local currentWaypointIndex local function followPath(destinationObject) -- Compute and check the path path:ComputeAsync(zombie.Position, destinationObject) -- Empty waypoints table after each new path computation waypoints = {} if path.Status == Enum.PathStatus.Success then -- Get the path waypoints and start zombie walking waypoints = path:GetWaypoints() -- Move to first waypoint currentWaypointIndex = 1 human:MoveTo(waypoints[currentWaypointIndex].Position) else -- Error (path not found); stop humanoid human:MoveTo(zombie.Position) end end local function onWaypointReached(reached) if reached and waypoints ~= nil and currentWaypointIndex ~= nil and currentWaypointIndex < #waypoints then currentWaypointIndex = currentWaypointIndex + 1 human:MoveTo(waypoints[currentWaypointIndex].Position) end end local function onPathBlocked(blockedWaypointIndex) -- Check if the obstacle is further down the path if blockedWaypointIndex > currentWaypointIndex then -- Call function to re-compute the path followPath(destination) end end
--[[** ensure value is an Instance and it's ClassName matches the given ClassName by an IsA comparison @param className The class name to check for @returns A function that will return true iff the condition is passed **--]]
function t.instanceIsA(className, childTable) assert(t.string(className)) local childrenCheck if childTable ~= nil then childrenCheck = t.children(childTable) end return function(value) local instanceSuccess, instanceErrMsg = t.Instance(value) if not instanceSuccess then return false, instanceErrMsg or "" end if not value:IsA(className) then return false, string.format("%s expected, got %s", className, value.ClassName) end if childrenCheck then local childrenSuccess, childrenErrMsg = childrenCheck(value) if not childrenSuccess then return false, childrenErrMsg end end return true end end
--[=[ Binds an update event to a signal until the update function stops returning a truthy value. @param signal Signal | RBXScriptSignal @param update () -> boolean -- should return true while it needs to update @return (...) -> () -- Connect function @return () -> () -- Disconnect function ]=]
function StepUtils.bindToSignal(signal, update) if typeof(signal) ~= "RBXScriptSignal" then error("signal must be of type RBXScriptSignal") end if type(update) ~= "function" then error(("update must be of type function, got %q"):format(type(update))) end local conn = nil local function disconnect() if conn then conn:Disconnect() conn = nil end end local function connect(...) -- Ignore if we have an existing connection if conn and conn.Connected then return end -- Check to see if we even need to bind an update if not update(...) then return end -- Avoid reentrance, if update() triggers another connection, we'll already be connected. if conn and conn.Connected then return end -- Usually contains just the self arg! local args = {...} -- Bind to render stepped conn = signal:Connect(function() if not update(unpack(args)) then disconnect() end end) end return connect, disconnect end
--Tuck in
R6TorsoTuckIn = .3 R6RightArmTuckIn = .1 R6LeftArmTuckIn = .1
-------------------LIGHTCONTROLS-------------------
if(key == "l") and (on == true) and (plane:findFirstChild("Lights") ~= nil) and(light == true) then local lm = plane.Lights local val = plane.Values.Light if(val.Value == false) then for i,v in pairs(lm:GetChildren()) do if(v.Name == "Posli") then v.Gui.Enabled = true elseif(v.Name == "Flali") then lm:findFirstChild("FlashScript").Disabled = false end end val.Value = true elseif(val.Value == true) then for i,v in pairs(lm:GetChildren()) do if(v.Name == "Posli") then v.Gui.Enabled = false elseif(v.Name == "Flali") then lm:findFirstChild("FlashScript").Disabled = true v.Gui.Enabled = false end end val.Value = false end end
--- Replace with true/false to force the chat type. Otherwise this will default to the setting on the website.
module.BubbleChatEnabled = true module.ClassicChatEnabled = PlayersService.ClassicChat
--!strict -- upstream: https://github.com/facebook/react/blob/92fcd46cc79bbf45df4ce86b0678dcef3b91078d/packages/react/src/ReactCurrentBatchConfig.js --[[* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow ]]
--[[ Classes.Dropdown This class creates a dropdown that the user can select a list of options from. Constructors: new(frame [instance], listFrame [instance]) > Create(list[] [string], max [integer]) > Creates a dropdown from the list with a max scrolling number. Properties: Frame [instance] > The container frame for the dropdown. Can be used for positioning and resizing. ListFrame [instance] > The contaienr frame for the dropdown list. Parented underneath the main container frame. Methods: :Set(option [instance]) [void] > option is a child of the ListFrame and you can set it as the selected option of the dropdown with this method :Get() [instance] > Returns the selected option frame (which is again, a child of the ListFrame) :Show(bool [boolean]) > Set whether the dropdown list is visible or not. :Destroy() [void] > Destroys the RadioButtonGroup and all the events, etc that were running it. Events: .Changed:Connect(function(option [instance]) > Fired when the user selects a new option from the dropdown list. --]]
-- Container for temporary connections (disconnected automatically)
local Connections = {}; function CollisionTool.Equip() -- Enables the tool's equipped functionality -- Start up our interface ShowUI(); BindShortcutKeys(); end; function CollisionTool.Unequip() -- Disables the tool's equipped functionality -- Clear unnecessary resources HideUI(); ClearConnections(); end; function ClearConnections() -- Clears out temporary connections for ConnectionKey, Connection in pairs(Connections) do Connection:Disconnect(); Connections[ConnectionKey] = nil; end; end; function ShowUI() -- Creates and reveals the UI -- Reveal UI if already created if UI then -- Reveal the UI UI.Visible = true; -- Update the UI every 0.1 seconds UIUpdater = Support.ScheduleRecurringTask(UpdateUI, 0.1); -- Skip UI creation return; end; -- Create the UI UI = Core.Tool.Interfaces.BTCollisionToolGUI:Clone(); UI.Parent = Core.UI; UI.Visible = true; -- References to UI elements local OnButton = UI.Status.On.Button; local OffButton = UI.Status.Off.Button; -- Enable the collision status switch OnButton.MouseButton1Click:Connect(function () SetProperty('CanCollide', true); end); OffButton.MouseButton1Click:Connect(function () SetProperty('CanCollide', false); end); -- Hook up manual triggering local SignatureButton = UI:WaitForChild('Title'):WaitForChild('Signature') ListenForManualWindowTrigger(CollisionTool.ManualText, CollisionTool.Color.Color, SignatureButton) -- Update the UI every 0.1 seconds UIUpdater = Support.ScheduleRecurringTask(UpdateUI, 0.1); end; function UpdateUI() -- Updates information on the UI -- Make sure the UI's on if not UI then return; end; -- Check the common collision status of selection local Collision = Support.IdentifyCommonProperty(Selection.Parts, 'CanCollide'); -- Update the collision option switch if Collision == true then Core.ToggleSwitch('On', UI.Status); -- If the selection has collision disabled elseif Collision == false then Core.ToggleSwitch('Off', UI.Status); -- If the collision status varies, don't select a current switch elseif Collision == nil then Core.ToggleSwitch(nil, UI.Status); end; end; function HideUI() -- Hides the tool UI -- Make sure there's a UI if not UI then return; end; -- Hide the UI UI.Visible = false; -- Stop updating the UI UIUpdater:Stop(); end; function SetProperty(Property, Value) -- Make sure the given value is valid if Value == nil then return; end; -- Start a history record TrackChange(); -- Go through each part for _, Part in pairs(Selection.Parts) do -- Store the state of the part before modification table.insert(HistoryRecord.Before, { Part = Part, [Property] = Part[Property] }); -- Create the change request for this part table.insert(HistoryRecord.After, { Part = Part, [Property] = Value }); end; -- Register the changes RegisterChange(); end; function BindShortcutKeys() -- Enables useful shortcut keys for this tool -- Track user input while this tool is equipped table.insert(Connections, UserInputService.InputBegan:Connect(function (InputInfo, GameProcessedEvent) -- Make sure this is an intentional event if GameProcessedEvent then return; end; -- Make sure this input is a key press if InputInfo.UserInputType ~= Enum.UserInputType.Keyboard then return; end; -- Make sure it wasn't pressed while typing if UserInputService:GetFocusedTextBox() then return; end; -- Check if the enter key was pressed if InputInfo.KeyCode == Enum.KeyCode.Return or InputInfo.KeyCode == Enum.KeyCode.KeypadEnter then -- Toggle the selection's collision status ToggleCollision(); end; end)); end; function ToggleCollision() -- Toggles the collision status of the selection -- Change the collision status to the opposite of the common collision status SetProperty('CanCollide', not Support.IdentifyCommonProperty(Selection.Parts, 'CanCollide')); end; function TrackChange() -- Start the record HistoryRecord = { Before = {}; After = {}; Selection = Selection.Items; Unapply = function (Record) -- Reverts this change -- Select the changed parts Selection.Replace(Record.Selection) -- Send the change request Core.SyncAPI:Invoke('SyncCollision', Record.Before); end; Apply = function (Record) -- Applies this change -- Select the changed parts Selection.Replace(Record.Selection) -- Send the change request Core.SyncAPI:Invoke('SyncCollision', Record.After); end; }; end; function RegisterChange() -- Finishes creating the history record and registers it -- Make sure there's an in-progress history record if not HistoryRecord then return; end; -- Send the change to the server Core.SyncAPI:Invoke('SyncCollision', HistoryRecord.After); -- Register the record and clear the staging Core.History.Add(HistoryRecord); HistoryRecord = nil; end;
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") Debris = game:GetService("Debris") RunService = game:GetService("RunService") local function Create_PrivImpl(objectType) if type(objectType) ~= 'string' then error("Argument of Create must be a string", 2) end --return the proxy function that gives us the nice Create'string'{data} syntax --The first function call is a function call using Lua's single-string-argument syntax --The second function call is using Lua's single-table-argument syntax --Both can be chained together for the nice effect. return function(dat) --default to nothing, to handle the no argument given case dat = dat or {} --make the object to mutate local obj = Instance.new(objectType) local parent = nil --stored constructor function to be called after other initialization local ctor = nil for k, v in pairs(dat) do --add property if type(k) == 'string' then if k == 'Parent' then -- Parent should always be set last, setting the Parent of a new object -- immediately makes performance worse for all subsequent property updates. parent = v else obj[k] = v end --add child elseif type(k) == 'number' then if type(v) ~= 'userdata' then error("Bad entry in Create body: Numeric keys must be paired with children, got a: "..type(v), 2) end v.Parent = obj --event connect elseif type(k) == 'table' and k.__eventname then if type(v) ~= 'function' then error("Bad entry in Create body: Key `[Create.E\'"..k.__eventname.."\']` must have a function value\ got: "..tostring(v), 2) end obj[k.__eventname]:connect(v) --define constructor function elseif k == t.Create then if type(v) ~= 'function' then error("Bad entry in Create body: Key `[Create]` should be paired with a constructor function, \ got: "..tostring(v), 2) elseif ctor then --ctor already exists, only one allowed error("Bad entry in Create body: Only one constructor function is allowed", 2) end ctor = v else error("Bad entry ("..tostring(k).." => "..tostring(v)..") in Create body", 2) end end --apply constructor function if it exists if ctor then ctor(obj) end if parent then obj.Parent = parent end --return the completed object return obj end end
--[[** ensures value is a number where min < value < max @param min The minimum to use @param max The maximum to use @returns A function that will return true iff the condition is passed **--]]
function t.numberConstrainedExclusive(min, max) assert(t.number(min)) assert(t.number(max)) local minCheck = t.numberMinExclusive(min) local maxCheck = t.numberMaxExclusive(max) return function(value) local minSuccess, minErrMsg = minCheck(value) if not minSuccess then return false, minErrMsg or "" end local maxSuccess, maxErrMsg = maxCheck(value) if not maxSuccess then return false, maxErrMsg or "" end return true end end
--Set up WeaponTypes lookup table
do local function onNewWeaponType(weaponTypeModule) if not weaponTypeModule:IsA("ModuleScript") then return end local weaponTypeName = weaponTypeModule.Name xpcall(function() coroutine.wrap(function() local weaponType = require(weaponTypeModule) assert(typeof(weaponType) == "table", string.format("WeaponType \"%s\" did not return a valid table", weaponTypeModule:GetFullName())) WEAPON_TYPES_LOOKUP[weaponTypeName] = weaponType end)() end, function(errMsg) warn(string.format("Error while loading %s: %s", weaponTypeModule:GetFullName(), errMsg)) warn(debug.traceback()) end) end for _, child in pairs(WeaponTypes:GetChildren()) do onNewWeaponType(child) end WeaponTypes.ChildAdded:Connect(onNewWeaponType) end local WeaponsSystem = {} WeaponsSystem.didSetup = false WeaponsSystem.knownWeapons = {} WeaponsSystem.connections = {} WeaponsSystem.networkFolder = nil WeaponsSystem.remoteEvents = {} WeaponsSystem.remoteFunctions = {} WeaponsSystem.currentWeapon = nil WeaponsSystem.aimRayCallback = nil WeaponsSystem.CurrentWeaponChanged = Instance.new("BindableEvent") local NetworkingCallbacks = require(WeaponsSystemFolder:WaitForChild("NetworkingCallbacks")) NetworkingCallbacks.WeaponsSystem = WeaponsSystem local _damageCallback = nil local _getTeamCallback = nil function WeaponsSystem.setDamageCallback(cb) _damageCallback = cb end function WeaponsSystem.setGetTeamCallback(cb) _getTeamCallback = cb end function WeaponsSystem.setup() if WeaponsSystem.didSetup then warn("Warning: trying to run WeaponsSystem setup twice on the same module.") return end print(script.Parent:GetFullName(), "is now active.") WeaponsSystem.doingSetup = true --Setup network routing if IsServer then local networkFolder = Instance.new("Folder") networkFolder.Name = "Network" for _, remoteEventName in pairs(REMOTE_EVENT_NAMES) do local remoteEvent = Instance.new("RemoteEvent") remoteEvent.Name = remoteEventName remoteEvent.Parent = networkFolder local callback = NetworkingCallbacks[remoteEventName] if not callback then --Connect a no-op function to ensure the queue doesn't pile up. warn("There is no server callback implemented for the WeaponsSystem RemoteEvent \"%s\"!") warn("A default no-op function will be implemented so that the queue cannot be abused.") callback = function() end end WeaponsSystem.connections[remoteEventName .. "Remote"] = remoteEvent.OnServerEvent:Connect(function(...) callback(...) end) WeaponsSystem.remoteEvents[remoteEventName] = remoteEvent end for _, remoteFuncName in pairs(REMOTE_FUNCTION_NAMES) do local remoteFunc = Instance.new("RemoteEvent") remoteFunc.Name = remoteFuncName remoteFunc.Parent = networkFolder local callback = NetworkingCallbacks[remoteFuncName] if not callback then --Connect a no-op function to ensure the queue doesn't pile up. warn("There is no server callback implemented for the WeaponsSystem RemoteFunction \"%s\"!") warn("A default no-op function will be implemented so that the queue cannot be abused.") callback = function() end end remoteFunc.OnServerInvoke = function(...) return callback(...) end WeaponsSystem.remoteFunctions[remoteFuncName] = remoteFunc end networkFolder.Parent = WeaponsSystemFolder WeaponsSystem.networkFolder = networkFolder else WeaponsSystem.StarterGui = game:GetService("StarterGui") WeaponsSystem.camera = ShoulderCamera.new(WeaponsSystem) WeaponsSystem.gui = WeaponsGui.new(WeaponsSystem) if ConfigurationValues.SprintEnabled.Value then WeaponsSystem.camera:setSprintEnabled(ConfigurationValues.SprintEnabled.Value) end if ConfigurationValues.SlowZoomWalkEnabled.Value then WeaponsSystem.camera:setSlowZoomWalkEnabled(ConfigurationValues.SlowZoomWalkEnabled.Value) end local networkFolder = WeaponsSystemFolder:WaitForChild("Network", math.huge) for _, remoteEventName in pairs(REMOTE_EVENT_NAMES) do coroutine.wrap(function() local remoteEvent = networkFolder:WaitForChild(remoteEventName, math.huge) local callback = NetworkingCallbacks[remoteEventName] if callback then WeaponsSystem.connections[remoteEventName .. "Remote"] = remoteEvent.OnClientEvent:Connect(function(...) callback(...) end) end WeaponsSystem.remoteEvents[remoteEventName] = remoteEvent end)() end for _, remoteFuncName in pairs(REMOTE_FUNCTION_NAMES) do coroutine.wrap(function() local remoteFunc = networkFolder:WaitForChild(remoteFuncName, math.huge) local callback = NetworkingCallbacks[remoteFuncName] if callback then remoteFunc.OnClientInvoke = function(...) return callback(...) end end WeaponsSystem.remoteFunctions[remoteFuncName] = remoteFunc end)() end Players.LocalPlayer.CharacterAdded:Connect(WeaponsSystem.onCharacterAdded) if Players.LocalPlayer.Character then WeaponsSystem.onCharacterAdded(Players.LocalPlayer.Character) end WeaponsSystem.networkFolder = networkFolder WeaponsSystem.camera:setEnabled(true) end --Setup weapon tools and listening WeaponsSystem.connections.weaponAdded = CollectionService:GetInstanceAddedSignal(WEAPON_TAG):Connect(WeaponsSystem.onWeaponAdded) WeaponsSystem.connections.weaponRemoved = CollectionService:GetInstanceRemovedSignal(WEAPON_TAG):Connect(WeaponsSystem.onWeaponRemoved) for _, instance in pairs(CollectionService:GetTagged(WEAPON_TAG)) do WeaponsSystem.onWeaponAdded(instance) end WeaponsSystem.doingSetup = false WeaponsSystem.didSetup = true end function WeaponsSystem.onCharacterAdded(character) -- Make it so players unequip weapons while seated, then reequip weapons when they become unseated local humanoid = character:WaitForChild("Humanoid") WeaponsSystem.connections.seated = humanoid.Seated:Connect(function(isSeated) if isSeated then WeaponsSystem.seatedWeapon = character:FindFirstChildOfClass("Tool") humanoid:UnequipTools() WeaponsSystem.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) else WeaponsSystem.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true) humanoid:EquipTool(WeaponsSystem.seatedWeapon) end end) end function WeaponsSystem.shutdown() if not WeaponsSystem.didSetup then return end for _, weapon in pairs(WeaponsSystem.knownWeapons) do weapon:onDestroyed() end WeaponsSystem.knownWeapons = {} if IsServer and WeaponsSystem.networkFolder then WeaponsSystem.networkFolder:Destroy() end WeaponsSystem.networkFolder = nil WeaponsSystem.remoteEvents = {} WeaponsSystem.remoteFunctions = {} for _, connection in pairs(WeaponsSystem.connections) do if typeof(connection) == "RBXScriptConnection" then connection:Disconnect() end end WeaponsSystem.connections = {} end function WeaponsSystem.getWeaponTypeFromTags(instance) for _, tag in pairs(CollectionService:GetTags(instance)) do local weaponTypeFound = WEAPON_TYPES_LOOKUP[tag] if weaponTypeFound then return weaponTypeFound end end return nil end function WeaponsSystem.createWeaponForInstance(weaponInstance) coroutine.wrap(function() local weaponType = WeaponsSystem.getWeaponTypeFromTags(weaponInstance) if not weaponType then local weaponTypeObj = weaponInstance:WaitForChild("WeaponType") if weaponTypeObj and weaponTypeObj:IsA("StringValue") then local weaponTypeName = weaponTypeObj.Value local weaponTypeFound = WEAPON_TYPES_LOOKUP[weaponTypeName] if not weaponTypeFound then warn(string.format("Cannot find the weapon type \"%s\" for the instance %s!", weaponTypeName, weaponInstance:GetFullName())) return end weaponType = weaponTypeFound else warn("Could not find a WeaponType tag or StringValue for the instance ", weaponInstance:GetFullName()) return end end -- Since we might have yielded while trying to get the WeaponType, we need to make sure not to continue -- making a new weapon if something else beat this iteration. if WeaponsSystem.getWeaponForInstance(weaponInstance) then warn("Already got ", weaponInstance:GetFullName()) warn(debug.traceback()) return end -- We should be pretty sure we got a valid weaponType by now assert(weaponType, "Got invalid weaponType") local weapon = weaponType.new(WeaponsSystem, weaponInstance) WeaponsSystem.knownWeapons[weaponInstance] = weapon end)() end function WeaponsSystem.getWeaponForInstance(weaponInstance) if not typeof(weaponInstance) == "Instance" then warn("WeaponsSystem.getWeaponForInstance(weaponInstance): 'weaponInstance' was not an instance.") return nil end return WeaponsSystem.knownWeapons[weaponInstance] end
-- PROBABLY WOULDNT TOUCH BELOW UNLESS YOU KNOW WHAT YOURE DOING
--[[ 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)(self._status) end self._queuedFinally = nil self._queuedReject = nil self._queuedResolve = nil -- Clear references to other Promises to allow gc if not Promise.TEST then self._parent = nil self._consumers = nil end end
-- Event Bindings
DisplayNotification.OnClientEvent:connect(OnDisplayNotification) DisplayVictory.OnClientEvent:connect(OnDisplayVictory) DisplayScore.OnClientEvent:connect(OnScoreChange) ResetMouseIcon.OnClientEvent:connect(OnResetMouseIcon) return NotificationManager
--[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]-- --[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]-- --[[end;]]
-- local JeffTheKillerHumanoid; for _,Child in pairs(JeffTheKiller:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then JeffTheKillerHumanoid=Child; end; end; local AttackDebounce=false; local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife"); local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head"); local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart"); local WalkDebounce=false; local Notice=false; local JeffLaughDebounce=false; local MusicDebounce=false; local NoticeDebounce=false; local ChosenMusic; function FindNearestBae() local NoticeDistance=100; local TargetMain; for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=JeffTheKiller and TargetModel.Name~=JeffTheKiller.Name and TargetModel:FindFirstChild("HumanoidRootPart")and TargetModel:FindFirstChild("Head")then local TargetPart=TargetModel:FindFirstChild("HumanoidRootPart"); local FoundHumanoid; for _,Child in pairs(TargetModel:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then FoundHumanoid=Child; end; end; if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then TargetMain=TargetPart; NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude; local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500) if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("HumanoidRootPart")and hit.Parent:FindFirstChild("Head")then if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then Spawn(function() AttackDebounce=true; local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing")); local SwingChoice=math.random(1,2); local HitChoice=math.random(1,3); SwingAnimation:Play(); SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1)); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing"); SwingSound.Pitch=1+(math.random()*0.04); SwingSound:Play(); end; Wait(0.3); if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then FoundHumanoid:TakeDamage(5000); if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); end; end; Wait(0.1); AttackDebounce=false; end); end; end; end; end; end; return TargetMain; end; while Wait(0)do local TargetPoint=JeffTheKillerHumanoid.TargetPoint; local Blockage,BlockagePos=RayCast((JeffTheKillerHumanoidRootPart.CFrame+CFrame.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(TargetPoint.X,JeffTheKillerHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(JeffTheKillerHumanoidRootPart.Size.Z/2)).p,JeffTheKillerHumanoidRootPart.CFrame.lookVector,(JeffTheKillerHumanoidRootPart.Size.Z*2.5),{JeffTheKiller,JeffTheKiller}) local Jumpable=false; if Blockage then Jumpable=true; if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then local BlockageHumanoid; for _,Child in pairs(Blockage.Parent:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then BlockageHumanoid=Child; end; end; if Blockage and Blockage:IsA("Terrain")then local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0))); local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z); if CellMaterial==Enum.CellMaterial.Water then Jumpable=false; end; elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Hat"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Tool"then Jumpable=false; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then JeffTheKillerHumanoid.Jump=true; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHumanoidRootPart and JeffTheKillerHead:FindFirstChild("Jeff_Step")and (JeffTheKillerHumanoidRootPart.Velocity-Vector3.new(0,JeffTheKillerHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then Spawn(function() WalkDebounce=true; local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0)); local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller); if RayTarget then local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone(); JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead; JeffTheKillerHeadFootStepClone:Play(); JeffTheKillerHeadFootStepClone:Destroy(); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then Wait(0.5); elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then Wait(0.2); end end; WalkDebounce=false; end); end; local MainTarget=FindNearestBae(); local FoundHumanoid; if MainTarget then for _,Child in pairs(MainTarget.Parent:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then FoundHumanoid=Child; end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then JeffTheKillerHumanoid.Jump=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then if not JeffLaughDebounce then Spawn(function() JeffLaughDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; end; end; if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then local MusicChoice=math.random(1,2); if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1"); elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2"); end; if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then ChosenMusic.Volume=0.5; ChosenMusic:Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then if not MusicDebounce then Spawn(function() MusicDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; end; end; if not MainTarget and not JeffLaughDebounce then Spawn(function() JeffLaughDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; if not MainTarget and not MusicDebounce then Spawn(function() MusicDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; if MainTarget then Notice=true; if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play(); NoticeDebounce=true; end if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then JeffTheKillerHumanoid.WalkSpeed=32; elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then JeffTheKillerHumanoid.WalkSpeed=0.004; end; JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain")); end; else Notice=false; NoticeDebounce=false; local RandomWalk=math.random(1,150); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then JeffTheKillerHumanoid.WalkSpeed=12; if RandomWalk==1 then JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain")); end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then JeffTheKillerHumanoid.DisplayDistanceType="None"; JeffTheKillerHumanoid.HealthDisplayDistance=0; JeffTheKillerHumanoid.Name="ColdBloodedKiller"; JeffTheKillerHumanoid.NameDisplayDistance=0; JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion"; JeffTheKillerHumanoid.AutoJumpEnabled=true; JeffTheKillerHumanoid.AutoRotate=true; JeffTheKillerHumanoid.MaxHealth=1300; JeffTheKillerHumanoid.JumpPower=60; JeffTheKillerHumanoid.MaxSlopeAngle=89.9; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then JeffTheKillerHumanoid.AutoJumpEnabled=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then JeffTheKillerHumanoid.AutoRotate=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then JeffTheKillerHumanoid.PlatformStand=false; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then JeffTheKillerHumanoid.Sit=false; end; end;
--[=[ Rounds down to the given precision @param number number @param precision number @return number ]=]
function Math.roundDown(number: number, precision: number): number return math.floor(number/precision) * precision end return Math
-- For Robloxyton, by Celestus
function OnClick() local p = script.Parent.Parent.Door for i=1, 30 do -- How many times it moves p.CFrame = p.CFrame + Vector3.new(0.1, 0, 0) -- How far it will move each time wait(.01) -- speed of each movement end
-- a modified version of nocollider's gore system
local RenderDistance = 400 local Workspace = game:GetService("Workspace") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local Debris = game:GetService("Debris") local Miscs = ReplicatedStorage:WaitForChild("Miscs") local Remotes = ReplicatedStorage:WaitForChild("Remotes") local Events = ReplicatedStorage:WaitForChild("Events") local Modules = ReplicatedStorage:WaitForChild("Modules") local Utilities = require(Modules.Utilities) local Thread = Utilities.Thread local Gibs = Miscs.Gibs local GibsR15 = Miscs.GibsR15 local Skeleton = Miscs.Skeleton local SkeletonR15 = Miscs.SkeletonR15 local Camera = Workspace.CurrentCamera local Gib = Events.gib local VisualizeGore = Remotes.VisualizeGore local Joints = {} local DamagedHeadParts = {"damaged.head.1", "damaged.head.2", "damaged.head.3"} local Gore = { ["Head"] = {"damaged.head.bone.1", "damaged.head.bone.2"}, ["Right Arm"] = {"damaged.right.arm.1", "damaged.right.arm.2", "damaged.right.arm.flesh.1", "damaged.right.arm.flesh.2"}, ["Left Arm"] = {"damaged.left.arm.1", "damaged.left.arm.2", "damaged.left.arm.flesh.1", "damaged.left.arm.flesh.2"}, ["Right Leg"] = {"damaged.right.leg.1", "damaged.right.leg.2", "damaged.right.leg.flesh.1", "damaged.right.leg.flesh.2"}, ["Left Leg"] = {"damaged.left.leg.1", "damaged.left.leg.2", "damaged.left.leg.flesh.1", "damaged.left.leg.flesh.2"}, ["Torso"] = {"damaged.torso", "damaged.torso.flesh", "damaged.torso.bone"}, } local GoreR15 = { ["Head"] = {"damaged.head.bone.1", "damaged.head.bone.2"}, ["RightUpperArm"] = {"damaged.right.upper.arm", "damaged.right.upper.arm.bone"}, ["RightLowerArm"] = {"damaged.right.lower.arm", "damaged.right.lower.arm.flesh"}, ["RightHand"] = {"damaged.right.hand"}, ["LeftUpperArm"] = {"damaged.left.upper.arm", "damaged.left.upper.arm.bone"}, ["LeftLowerArm"] = {"damaged.left.lower.arm", "damaged.left.lower.arm.flesh"}, ["LeftHand"] = {"damaged.left.hand"}, ["RightUpperLeg"] = {"damaged.right.upper.leg", "damaged.right.upper.leg.flesh"}, ["RightLowerLeg"] = {"damaged.right.lower.leg", "damaged.right.lower.leg.flesh"}, ["RightFoot"] = {"damaged.right.foot"}, ["LeftUpperLeg"] = {"damaged.left.upper.leg", "damaged.left.upper.leg.flesh"}, ["LeftLowerLeg"] = {"damaged.left.lower.leg", "damaged.left.lower.leg.flesh"}, ["LeftFoot"] = {"damaged.left.foot"}, ["UpperTorso"] = {"damaged.upper.torso", "damaged.upper.torso.bone"}, ["LowerTorso"] = {"damaged.lower.torso", "damaged.lower.torso.flesh"}, } local Bones = { ["Head"] = {"head"}, ["Right Arm"] = {"right.arm"}, ["Left Arm"] = {"left.arm"}, ["Right Leg"] = {"right.leg"}, ["Left Leg"] = {"left.leg"}, ["Torso"] = {"torso"}, } local BonesR15 = { ["Head"] = {"head"}, ["RightUpperArm"] = {"right.upper.arm"}, ["RightLowerArm"] = {"right.lower.arm"}, ["RightHand"] = {"right.hand"}, ["LeftUpperArm"] = {"left.upper.arm"}, ["LeftLowerArm"] = {"left.lower.arm"}, ["LeftHand"] = {"left.hand"}, ["RightUpperLeg"] = {"right.upper.leg"}, ["RightLowerLeg"] = {"right.lower.leg"}, ["RightFoot"] = {"right.foot"}, ["LeftUpperLeg"] = {"left.upper.leg"}, ["LeftLowerLeg"] = {"left.lower.leg"}, ["LeftFoot"] = {"left.foot"}, ["UpperTorso"] = {"upper.torso"}, ["LowerTorso"] = {"lower.torso"}, } function DoOdds(Chances) if Random.new():NextInteger(0, 100) <= Chances then return true end return false end local function FullR6Gib(Joint, Ragdoll, GoreData) if Ragdoll:FindFirstChild("Torso") and Joint.Transparency ~= 1 and not Ragdoll:FindFirstChild("gibbed") and (Joint.Position - Camera.CFrame.p).Magnitude <= RenderDistance then Joint.Transparency = 1 local Tag = Instance.new("StringValue", Ragdoll) Tag.Name = "gibbed" local Decal = Joint:FindFirstChildOfClass("Decal") if Decal then Decal:Destroy() end if Joint.Name == "Head" then local parts = Ragdoll:GetChildren() for i = 1, #parts do if parts[i]:IsA("Hat") or parts[i]:IsA("Accessory") then local handle = parts[i].Handle:Clone() local children = handle:GetChildren() for i = 1, #children do if children[i]:IsA("Weld") then children[i]:Destroy() end end handle.CFrame = parts[i].Handle.CFrame handle.CanCollide = true handle.RotVelocity = Vector3.new((math.random() - 0.5) * 25, (math.random() - 0.5) * 25, (math.random() - 0.5) * 25) handle.Velocity = Vector3.new( (math.random() - 0.5) * 25, math.random(25, 50), (math.random() - 0.5) * 25 ) handle.Parent = Ragdoll parts[i].Handle.Transparency = 1 end end end for _, Limb in pairs(Bones[Joint.Name]) do local limb = Skeleton[Limb]:Clone() limb.Anchored = true limb.CanCollide = false limb.Parent = Ragdoll local offset = Skeleton.rig[Joint.Name].CFrame:ToObjectSpace(limb.CFrame) Joints[limb] = function() return Joint.CFrame * offset end end local Attachment = Instance.new("Attachment") Attachment.CFrame = Joint.CFrame Attachment.Parent = workspace.Terrain local Sound = Instance.new("Sound",Attachment) Sound.SoundId = "rbxassetid://"..GoreData[2][math.random(1, #GoreData[2])] Sound.PlaybackSpeed = Random.new():NextNumber(GoreData[3], GoreData[4]) Sound.Volume = GoreData[5] local function spawner() local C = GoreData[6]:GetChildren() for i = 1, #C do if C[i].className == "ParticleEmitter" then local count = 1 local Particle = C[i]:Clone() Particle.Parent = Attachment if Particle:FindFirstChild("EmitCount") then count = Particle.EmitCount.Value end Thread:Delay(0.01, function() Particle:Emit(count) Debris:AddItem(Particle, Particle.Lifetime.Max) end) end end Sound:Play() end Thread:Spawn(spawner) Debris:AddItem(Attachment, 10) end end local function R6Gib(Joint, Ragdoll, GoreData) if Ragdoll:FindFirstChild("Torso") and Joint.Transparency ~= 1 and not Ragdoll:FindFirstChild("gibbed") and (Joint.Position - Camera.CFrame.p).Magnitude <= RenderDistance then Joint.Transparency = 1 local Tag = Instance.new("StringValue", Ragdoll) Tag.Name = "gibbed" local Decal = Joint:FindFirstChildOfClass("Decal") if Decal then Decal:Destroy() end if Joint.Name == "Head" then local parts = Ragdoll:GetChildren() for i = 1, #parts do if parts[i]:IsA("Hat") or parts[i]:IsA("Accessory") then local handle = parts[i].Handle:Clone() local children = handle:GetChildren() for i = 1, #children do if children[i]:IsA("Weld") then children[i]:Destroy() end end handle.CFrame = parts[i].Handle.CFrame handle.CanCollide = true handle.RotVelocity = Vector3.new((math.random() - 0.5) * 25, (math.random() - 0.5) * 25, (math.random() - 0.5) * 25) handle.Velocity = Vector3.new( (math.random() - 0.5) * 25, math.random(25, 50), (math.random() - 0.5) * 25 ) handle.Parent = Ragdoll parts[i].Handle.Transparency = 1 end end for _, headPart in pairs(DamagedHeadParts) do local part = Gibs[headPart]:Clone() part.Color = Joint.Color part.CFrame = Joint.CFrame part.RotVelocity = Vector3.new((math.random() - 0.5) * 25, (math.random() - 0.5) * 25, (math.random() - 0.5) * 25) part.Velocity = Vector3.new( (math.random() - 0.5) * 25, math.random(50, 100), (math.random() - 0.5) * 25 ) part.Parent = Ragdoll end end for _, Limb in pairs(Gore[Joint.Name]) do local limb = Gibs[Limb]:Clone() limb.Anchored = true limb.CanCollide = false if not (limb.Name:match("flesh") or limb.Name:match("bone")) then limb.Color = Joint.Color if not limb.Name:match("head") then if limb.Name:match("leg") or limb.Name:match("foot") then if Ragdoll:FindFirstChildOfClass("Pants") then limb.TextureID = Ragdoll:FindFirstChildOfClass("Pants").PantsTemplate end else if limb.Name:match("torso") then if Ragdoll:FindFirstChildOfClass("Shirt") then limb.TextureID = Ragdoll:FindFirstChildOfClass("Shirt").ShirtTemplate else if Ragdoll:FindFirstChildOfClass("Pants") then limb.TextureID = Ragdoll:FindFirstChildOfClass("Pants").PantsTemplate end end else if Ragdoll:FindFirstChildOfClass("Shirt") then limb.TextureID = Ragdoll:FindFirstChildOfClass("Shirt").ShirtTemplate end end end end end limb.Parent = Ragdoll local offset = Gibs.rig[Joint.Name].CFrame:ToObjectSpace(limb.CFrame) Joints[limb] = function() return Joint.CFrame * offset end end local Attachment = Instance.new("Attachment") Attachment.CFrame = Joint.CFrame Attachment.Parent = workspace.Terrain local Sound = Instance.new("Sound",Attachment) Sound.SoundId = "rbxassetid://"..GoreData[2][math.random(1, #GoreData[2])] Sound.PlaybackSpeed = Random.new():NextNumber(GoreData[3], GoreData[4]) Sound.Volume = GoreData[5] local function spawner() local C = GoreData[6]:GetChildren() for i = 1, #C do if C[i].className == "ParticleEmitter" then local count = 1 local Particle = C[i]:Clone() Particle.Parent = Attachment if Particle:FindFirstChild("EmitCount") then count = Particle.EmitCount.Value end Thread:Delay(0.01, function() Particle:Emit(count) Debris:AddItem(Particle, Particle.Lifetime.Max) end) end end Sound:Play() end Thread:Spawn(spawner) Debris:AddItem(Attachment, 10) end end local function FullR15Gib(Joint, Ragdoll, GoreData) if Ragdoll:FindFirstChild("UpperTorso") and Joint.Transparency ~= 1 and not Ragdoll:FindFirstChild("gibbed") and (Joint.Position - Camera.CFrame.p).Magnitude <= RenderDistance then Joint.Transparency = 1 local Tag = Instance.new("StringValue", Ragdoll) Tag.Name = "gibbed" local Decal = Joint:FindFirstChildOfClass("Decal") if Decal then Decal:Destroy() end if Joint.Name == "Head" then local parts = Ragdoll:GetChildren() for i = 1, #parts do if parts[i]:IsA("Hat") or parts[i]:IsA("Accessory") then local handle = parts[i].Handle:Clone() local children = handle:GetChildren() for i = 1, #children do if children[i]:IsA("Weld") then children[i]:Destroy() end end handle.CFrame = parts[i].Handle.CFrame handle.CanCollide = true handle.RotVelocity = Vector3.new((math.random() - 0.5) * 25, (math.random() - 0.5) * 25, (math.random() - 0.5) * 25) handle.Velocity = Vector3.new( (math.random() - 0.5) * 25, math.random(25, 50), (math.random() - 0.5) * 25 ) handle.Parent = Ragdoll parts[i].Handle.Transparency = 1 end end end for _, Limb in pairs(BonesR15[Joint.Name]) do local limb = SkeletonR15[Limb]:Clone() limb.Anchored = true limb.CanCollide = false limb.Parent = Ragdoll local offset = SkeletonR15.rig[Joint.Name].CFrame:ToObjectSpace(limb.CFrame) Joints[limb] = function() return Joint.CFrame * offset end end local Attachment = Instance.new("Attachment") Attachment.CFrame = Joint.CFrame Attachment.Parent = workspace.Terrain local Sound = Instance.new("Sound",Attachment) Sound.SoundId = "rbxassetid://"..GoreData[2][math.random(1, #GoreData[2])] Sound.PlaybackSpeed = Random.new():NextNumber(GoreData[3], GoreData[4]) Sound.Volume = GoreData[5] local function spawner() local C = GoreData[6]:GetChildren() for i = 1, #C do if C[i].className == "ParticleEmitter" then local count = 1 local Particle = C[i]:Clone() Particle.Parent = Attachment if Particle:FindFirstChild("EmitCount") then count = Particle.EmitCount.Value end Thread:Delay(0.01, function() Particle:Emit(count) Debris:AddItem(Particle, Particle.Lifetime.Max) end) end end Sound:Play() end Thread:Spawn(spawner) Debris:AddItem(Attachment, 10) end end local function R15Gib(Joint, Ragdoll, GoreData) if Ragdoll:FindFirstChild("UpperTorso") and Joint.Transparency ~= 1 and not Ragdoll:FindFirstChild("gibbed") and (Joint.Position - Camera.CFrame.p).Magnitude <= RenderDistance then Joint.Transparency = 1 local Tag = Instance.new("StringValue", Ragdoll) Tag.Name = "gibbed" local Decal = Joint:FindFirstChildOfClass("Decal") if Decal then Decal:Destroy() end if Joint.Name == "Head" then local parts = Ragdoll:GetChildren() for i = 1, #parts do if parts[i]:IsA("Hat") or parts[i]:IsA("Accessory") then local handle = parts[i].Handle:Clone() local children = handle:GetChildren() for i = 1, #children do if children[i]:IsA("Weld") then children[i]:Destroy() end end handle.CFrame = parts[i].Handle.CFrame handle.CanCollide = true handle.RotVelocity = Vector3.new((math.random() - 0.5) * 25, (math.random() - 0.5) * 25, (math.random() - 0.5) * 25) handle.Velocity = Vector3.new( (math.random() - 0.5) * 25, math.random(25, 50), (math.random() - 0.5) * 25 ) handle.Parent = Ragdoll parts[i].Handle.Transparency = 1 end end for _, headPart in pairs(DamagedHeadParts) do local part = Gibs[headPart]:Clone() part.Color = Joint.Color part.CFrame = Joint.CFrame part.RotVelocity = Vector3.new((math.random() - 0.5) * 25, (math.random() - 0.5) * 25, (math.random() - 0.5) * 25) part.Velocity = Vector3.new( (math.random() - 0.5) * 25, math.random(50, 100), (math.random() - 0.5) * 25 ) part.Parent = Ragdoll end end for _, Limb in pairs(GoreR15[Joint.Name]) do local limb = GibsR15[Limb]:Clone() limb.Anchored = true limb.CanCollide = false if not (limb.Name:match("flesh") or limb.Name:match("bone")) then limb.Color = Joint.Color if not limb.Name:match("head") then if limb.Name:match("leg") or limb.Name:match("foot") then if Ragdoll:FindFirstChildOfClass("Pants") then limb.TextureID = Ragdoll:FindFirstChildOfClass("Pants").PantsTemplate end else if limb.Name:match("torso") then if Ragdoll:FindFirstChildOfClass("Shirt") then limb.TextureID = Ragdoll:FindFirstChildOfClass("Shirt").ShirtTemplate else if Ragdoll:FindFirstChildOfClass("Pants") then limb.TextureID = Ragdoll:FindFirstChildOfClass("Pants").PantsTemplate end end else if Ragdoll:FindFirstChildOfClass("Shirt") then limb.TextureID = Ragdoll:FindFirstChildOfClass("Shirt").ShirtTemplate end end end end end limb.Parent = Ragdoll local offset = GibsR15.rig[Joint.Name].CFrame:ToObjectSpace(limb.CFrame) Joints[limb] = function() return Joint.CFrame * offset end end local Attachment = Instance.new("Attachment") Attachment.CFrame = Joint.CFrame Attachment.Parent = workspace.Terrain local Sound = Instance.new("Sound",Attachment) Sound.SoundId = "rbxassetid://"..GoreData[2][math.random(1,#GoreData[2])] Sound.PlaybackSpeed = Random.new():NextNumber(GoreData[3], GoreData[4]) Sound.Volume = GoreData[5] local function spawner() local C = GoreData[6]:GetChildren() for i = 1, #C do if C[i].className == "ParticleEmitter" then local count = 1 local Particle = C[i]:Clone() Particle.Parent = Attachment if Particle:FindFirstChild("EmitCount") then count = Particle.EmitCount.Value end Thread:Delay(0.01, function() Particle:Emit(count) Debris:AddItem(Particle, Particle.Lifetime.Max) end) end end Sound:Play() end Thread:Spawn(spawner) Debris:AddItem(Attachment, 10) end end local function GibJoint(Joint, Ragdoll, GoreData) if GoreData[1] then if Ragdoll:FindFirstChildOfClass("Humanoid") then if Ragdoll:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R6 then if DoOdds(GoreData[7]) then FullR6Gib(Joint, Ragdoll, GoreData) else R6Gib(Joint, Ragdoll, GoreData) end else if DoOdds(GoreData[7]) then FullR15Gib(Joint, Ragdoll, GoreData) else R15Gib(Joint, Ragdoll, GoreData) end end end end end Gib.Event:Connect(GibJoint) VisualizeGore.OnClientEvent:Connect(GibJoint) RunService.RenderStepped:Connect(function(dt) for part, cframe in next, Joints do part.CFrame = cframe() end end)
-- Ring3 descending
for l = 1,#lifts3 do if (lifts3[l].className == "Part") then lifts3[l].BodyPosition.position = Vector3.new((lifts3[l].BodyPosition.position.x),(lifts3[l].BodyPosition.position.y-4),(lifts3[l].BodyPosition.position.z)) end end wait(0.1) for p = 1,#parts3 do parts3[p].CanCollide = false end wait(0.1)
--Made by Luckymaxer
Tool = script.Parent Handle = Tool:WaitForChild("Handle") Players = game:GetService("Players") RunService = game:GetService("RunService") UserInputService = game:GetService("UserInputService") Animations = {} LocalObjects = {} ServerControl = Tool:WaitForChild("ServerControl") ClientControl = Tool:WaitForChild("ClientControl") InputCheck = Instance.new("ScreenGui") InputCheck.Name = "InputCheck" InputButton = Instance.new("ImageButton") InputButton.Name = "InputButton" InputButton.Image = "" InputButton.BackgroundTransparency = 1 InputButton.ImageTransparency = 1 InputButton.Size = UDim2.new(1, 0, 1, 0) InputButton.Parent = InputCheck Rate = (1 / 60) ToolEquipped = false function SetAnimation(mode, value) if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then for i, v in pairs(Animations) do if v.Animation == value.Animation then v.AnimationTrack:Stop() table.remove(Animations, i) end end local AnimationTrack = Humanoid:LoadAnimation(value.Animation) table.insert(Animations, {Animation = value.Animation, AnimationTrack = AnimationTrack}) AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed) elseif mode == "StopAnimation" and value then for i, v in pairs(Animations) do if v.Animation == value.Animation then v.AnimationTrack:Stop(value.FadeTime) table.remove(Animations, i) end end end end function CheckIfAlive() return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Player and Player.Parent) and true) or false) end function Equipped(Mouse) Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChild("Humanoid") ToolEquipped = true if not CheckIfAlive() then return end Spawn(function() PlayerMouse = Player:GetMouse() Mouse.Button1Down:connect(function() InvokeServer("Button1Click", {Down = true}) end) Mouse.Button1Up:connect(function() InvokeServer("Button1Click", {Down = false}) end) local PlayerGui = Player:FindFirstChild("PlayerGui") if PlayerGui then if UserInputService.TouchEnabled then InputCheckClone = InputCheck:Clone() InputCheckClone.InputButton.InputBegan:connect(function() InvokeServer("Button1Click", {Down = true}) end) InputCheckClone.InputButton.InputEnded:connect(function() InvokeServer("Button1Click", {Down = false}) end) InputCheckClone.Parent = PlayerGui end end end) end function Unequipped() LocalObjects = {} if InputCheckClone and InputCheckClone.Parent then InputCheckClone:Destroy() end for i, v in pairs(Animations) do if v and v.AnimationTrack then v.AnimationTrack:Stop() end end for i, v in pairs({ObjectLocalTransparencyModifier}) do if v then v:disconnect() end end Animations = {} ToolEquipped = false end function InvokeServer(mode, value) pcall(function() local ServerReturn = ServerControl:InvokeServer(mode, value) return ServerReturn end) end function OnClientInvoke(mode, value) if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then SetAnimation("PlayAnimation", value) elseif mode == "StopAnimation" and value then SetAnimation("StopAnimation", value) elseif mode == "PlaySound" and value then value:Play() elseif mode == "StopSound" and value then value:Stop() elseif mode == "MousePosition" then if not PlayerMouse and CheckIfAlive() then PlayerMouse = Player:GetMouse() end return {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target} elseif mode == "SetLocalTransparencyModifier" and value and ToolEquipped then pcall(function() local ObjectFound = false for i, v in pairs(LocalObjects) do if v == value then ObjectFound = true end end if not ObjectFound then table.insert(LocalObjects, value) if ObjectLocalTransparencyModifier then ObjectLocalTransparencyModifier:disconnect() end ObjectLocalTransparencyModifier = RunService.RenderStepped:connect(function() for i, v in pairs(LocalObjects) do if v.Object and v.Object.Parent then local CurrentTransparency = v.Object.LocalTransparencyModifier if ((not v.AutoUpdate and (CurrentTransparency == 1 or CurrentTransparency == 0)) or v.AutoUpdate) then v.Object.LocalTransparencyModifier = v.Transparency end else table.remove(LocalObjects, i) end end end) end end) end end ClientControl.OnClientInvoke = OnClientInvoke Tool.Equipped:connect(Equipped) Tool.Unequipped:connect(Unequipped)
--// H key, Man
mouse.KeyDown:connect(function(key) if key=="h" then veh.Lightbar.middle.Manual:Play() veh.Lightbar.middle.Wail.Volume = 0 veh.Lightbar.middle.Yelp.Volume = 0 veh.Lightbar.middle.Priority.Volume = 0 end end)
----[[ Color Settings ]]
module.BackGroundColor = Color3.new(0, 0, 0) module.DefaultMessageColor = Color3.new(1, 0.666667, 0) module.DefaultChatColor = Color3.fromRGB(255, 170, 0) module.DefaultNameColor = Color3.new(0.333333, 0.666667, 0.498039) module.ChatBarBackGroundColor = Color3.new(0, 0, 0) module.ChatBarBoxColor = Color3.new(1, 1, 1) module.ChatBarTextColor = Color3.new(0, 0, 0) module.ChannelsTabUnselectedColor = Color3.new(0, 0, 0) module.ChannelsTabSelectedColor = Color3.new(30/255, 30/255, 30/255) module.DefaultChannelNameColor = Color3.fromRGB(35, 76, 142) module.WhisperChannelNameColor = Color3.fromRGB(102, 14, 102) module.ErrorMessageTextColor = Color3.fromRGB(245, 50, 50) module.DefaultPrefix = "" module.DefaultPrefixColor = Color3.fromRGB(255,255,255)
--[[ Stores 'sensible default' properties to be applied to instances created by the New function. ]]
local ENABLE_SENSIBLE_DEFAULTS = true if ENABLE_SENSIBLE_DEFAULTS then return { ScreenGui = { ResetOnSpawn = false, ZIndexBehavior = "Sibling" }, BillboardGui = { ResetOnSpawn = false, ZIndexBehavior = "Sibling" }, SurfaceGui = { ResetOnSpawn = false, ZIndexBehavior = "Sibling", SizingMode = "PixelsPerStud", PixelsPerStud = 50 }, Frame = { BackgroundColor3 = Color3.new(1, 1, 1), BorderColor3 = Color3.new(0, 0, 0), BorderSizePixel = 0 }, ScrollingFrame = { BackgroundColor3 = Color3.new(1, 1, 1), BorderColor3 = Color3.new(0, 0, 0), BorderSizePixel = 0, ScrollBarImageColor3 = Color3.new(0, 0, 0) }, TextLabel = { BackgroundColor3 = Color3.new(1, 1, 1), BorderColor3 = Color3.new(0, 0, 0), BorderSizePixel = 0, Font = "SourceSans", Text = "", TextColor3 = Color3.new(0, 0, 0), TextSize = 14 }, TextButton = { BackgroundColor3 = Color3.new(1, 1, 1), BorderColor3 = Color3.new(0, 0, 0), BorderSizePixel = 0, AutoButtonColor = false, Font = "SourceSans", Text = "", TextColor3 = Color3.new(0, 0, 0), TextSize = 14 }, TextBox = { BackgroundColor3 = Color3.new(1, 1, 1), BorderColor3 = Color3.new(0, 0, 0), BorderSizePixel = 0, ClearTextOnFocus = false, Font = "SourceSans", Text = "", TextColor3 = Color3.new(0, 0, 0), TextSize = 14 }, ImageLabel = { BackgroundColor3 = Color3.new(1, 1, 1), BorderColor3 = Color3.new(0, 0, 0), BorderSizePixel = 0 }, ImageButton = { BackgroundColor3 = Color3.new(1, 1, 1), BorderColor3 = Color3.new(0, 0, 0), BorderSizePixel = 0, AutoButtonColor = false }, ViewportFrame = { BackgroundColor3 = Color3.new(1, 1, 1), BorderColor3 = Color3.new(0, 0, 0), BorderSizePixel = 0 }, VideoFrame = { BackgroundColor3 = Color3.new(1, 1, 1), BorderColor3 = Color3.new(0, 0, 0), BorderSizePixel = 0 } } else return {} end
--Don't worry about the rest of the code, except for line 25.
game.Players.PlayerAdded:connect(function(player) local leader = Instance.new("Folder",player) leader.Name = "leaderstats" local Joins = Instance.new("IntValue",leader) Joins.Name = stat Joins.Value = ds:GetAsync(player.UserId) or startamount ds:SetAsync(player.UserId, Joins.Value) Joins.Changed:connect(function() ds:SetAsync(player.UserId, Joins.Value) end) end) game.Players.PlayerRemoving:connect(function(player) ds:SetAsync(player.UserId, player.leaderstats.Joins.Value) --Change "Points" to the name of your leaderstat. end)
----- Script: -----
Button.Activated:Connect(function() ----- Script: ----- InformationData.Case.Value = CaseData.Case.Value InformationImage.Image = Image.Image InformationVariables.CommunPorcentage.Text = CaseData.CommunPorcentage.Value InformationVariables.UncommunPorcentage.Text = CaseData.UncommunPorcentage.Value InformationVariables.RarePorcentage.Text = CaseData.RarePorcentage.Value InformationVariables.LegendaryPorcentage.Text = CaseData.LegendaryPorcentage.Value end) local function UpdateQuantityText () Variables.QuantityText.Text = Package.Value if Package.Value == 0 then Button.Visible = false else Button.Visible = true end end Package.Changed:Connect(UpdateQuantityText) UpdateQuantityText()
-- Constants
local Local_Player = PlayersService.LocalPlayer
--TimedOut --* called when the player took too long to choose an option.
function Interface.TimedOut() end
--[=[ Observes percent visibility @param basicPane BasicPane @return Observable<number> ]=]
function BasicPaneUtils.observePercentVisible(basicPane) assert(BasicPane.isBasicPane(basicPane), "Bad BasicPane") return BasicPaneUtils.observeVisible(basicPane):Pipe({ Rx.map(function(visible) return visible and 1 or 0 end); Rx.startWith({0}); -- Ensure fade in every time. }) end
--------LEFT DOOR --------
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l23.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l32.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l41.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l53.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l62.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l71.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.l12.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l33.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l42.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l51.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l63.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.l13.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l43.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(106) game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1013) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- Types of joints to assume should be preserved
local ManualJointTypes = Support.FlipTable { 'Weld', 'ManualWeld', 'ManualGlue', 'Motor', 'Motor6D' }; function SearchJoints(Haystack, Part, Whitelist) -- Searches for and returns manual joints in `Haystack` involving `Part` and other parts in `Whitelist` local Joints = {}; -- Search the haystack for joints involving `Part` for _, Item in pairs(GetChildren(Haystack)) do -- Check if this item is a manual, intentional joint if ManualJointTypes[Item.ClassName] and (Whitelist[Item.Part0] and Whitelist[Item.Part1]) then -- Save joint and state if intentional Joints[Item] = Item.Parent; end; end; -- Return the found joints return Joints; end; function RestoreJoints(Joints) -- Restores the joints from the given `Joints` data -- Restore each joint for Joint, JointParent in pairs(Joints) do Joint.Parent = JointParent; end; end; function PreserveJoints(Part, Whitelist) -- Preserves and returns intentional joints of `Part` connecting parts in `Whitelist` -- Get the part's joints local Joints = GetPartJoints(Part, Whitelist); -- Save the joints from being broken for Joint in pairs(Joints) do Joint.Parent = nil; end; -- Return the joints return Joints; end; function CreatePart(PartType) -- Creates and returns new part based on `PartType` with sensible defaults local NewPart if PartType == 'Normal' then NewPart = Instance.new('Part') NewPart.Size = Vector3.new(4, 1, 2) elseif PartType == 'Truss' then NewPart = Instance.new('TrussPart') elseif PartType == 'Wedge' then NewPart = Instance.new('WedgePart') NewPart.Size = Vector3.new(4, 1, 2) elseif PartType == 'Corner' then NewPart = Instance.new('CornerWedgePart') elseif PartType == 'Cylinder' then NewPart = Instance.new('Part') NewPart.Shape = 'Cylinder' NewPart.Size = Vector3.new(2, 2, 2) elseif PartType == 'Ball' then NewPart = Instance.new('Part') NewPart.Shape = 'Ball' elseif PartType == 'Seat' then NewPart = Instance.new('Seat') NewPart.Size = Vector3.new(4, 1, 2) elseif PartType == 'Vehicle Seat' then NewPart = Instance.new('VehicleSeat') NewPart.Size = Vector3.new(4, 1, 2) elseif PartType == 'Spawn' then NewPart = Instance.new('SpawnLocation') NewPart.Size = Vector3.new(4, 1, 2) end -- Make part surfaces smooth NewPart.TopSurface = Enum.SurfaceType.Smooth; NewPart.BottomSurface = Enum.SurfaceType.Smooth; -- Make sure the part is anchored NewPart.Anchored = true return NewPart end
-- Services
local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local ServerStorage = game:GetService("ServerStorage") local PhysicsService = game:GetService("PhysicsService")
--------------------)
i = true script.Parent[ZoneModelName]:MoveTo(Vector3.new(0,10000,0)) script.Parent[ZoneModelName]:Clone().Parent = game.ServerStorage script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr,X,Y,Z) if i then i = false local zone = game.ServerStorage:WaitForChild(ZoneModelName):Clone() zone.Parent = game.Workspace zone.PrimaryPart = zone.Main zone:SetPrimaryPartCFrame(CFrame.new(Vector3.new(X,Y+1,Z))) zone.Main.Touched:Connect(function(hit) if hit.Parent:FindFirstChild(MobHumanoidName) then hit.Parent[MobHumanoidName].Health = hit.Parent[MobHumanoidName].Health-Damage end end) wait(Cooldown) i = true end end)
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
runService.RenderStepped:connect(function() if running then updatechar() CamPos = CamPos + (TargetCamPos - CamPos) *0.28 AngleX = AngleX + (TargetAngleX - AngleX) *0.35 local dist = TargetAngleY - AngleY dist = math.abs(dist) > 180 and dist - (dist / math.abs(dist)) * 360 or dist AngleY = (AngleY + dist *0.35) %360 cam.CameraType = Enum.CameraType.Scriptable cam.CoordinateFrame = CFrame.new(head.Position) * CFrame.Angles(0,math.rad(AngleY),0) * CFrame.Angles(math.rad(AngleX),0,0) * HeadOffset -- offset humanoidpart.CFrame=CFrame.new(humanoidpart.Position)*CFrame.Angles(0,math.rad(AngleY),0) else game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default end if (cam.Focus.p-cam.CoordinateFrame.p).magnitude < 1 then running = false else running = true if freemouse == true then game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default else game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter end end if not CanToggleMouse.allowed then freemouse = false end cam.FieldOfView = FieldOfView if walkspeeds.enabled then if w and s then return end if w and not lshift then FieldOfView = lerp(FieldOfView, defFOV,easingtime) human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.walkingspeed,easingtime) elseif w and a then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.diagonalspeed,easingtime) elseif w and d then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.diagonalspeed,easingtime) elseif s then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.backwardsspeed,easingtime) elseif s and a then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.backwardsspeed - (walkspeeds.diagonalspeed - walkspeeds.backwardsspeed),easingtime) elseif s and d then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.backwardsspeed - (walkspeeds.diagonalspeed - walkspeeds.backwardsspeed),easingtime) elseif d then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.sidewaysspeed,easingtime) elseif a then human.WalkSpeed = lerp(human.WalkSpeed,walkspeeds.sidewaysspeed,easingtime) end if lshift and w then FieldOfView = lerp(FieldOfView, walkspeeds.runningFOV,easingtime) human.WalkSpeed = lerp(human.WalkSpeed,human.WalkSpeed + (walkspeeds.runningspeed - human.WalkSpeed),easingtime) end end end)
--[[ [Whether rotation follows the camera or the mouse.] [Useful with tools if true, but camera tracking runs smoother.] --]]
local MseGuide = false
--// Extras
WalkAnimEnabled = true; -- Set to false to disable walking animation, true to enable SwayEnabled = true; -- Set to false to disable sway, true to enable TacticalModeEnabled = true; -- SET THIS TO TRUE TO TURN ON TACTICAL MODEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
--Required Modules
local modules = script.Parent local status = require(modules.Status) local core = require(modules.CoreModule) local marine = script.Parent.Parent.Parent local myHuman = marine.Humanoid local myRoot = marine.HumanoidRootPart local m4 = marine.M4 local reloadSound = m4.Reload local magazine = marine.Mag local myHead = marine.Head local myTorso = marine.Torso local neck = myTorso.Neck local lShoulder = myTorso["Left Shoulder"] local rShoulder = myTorso["Right Shoulder"] local lArmWeld = myTorso["Left Arm Weld"] local rArmWeld = myTorso["Right Arm Weld"] local lArm = marine["Left Arm"] local rArm = marine["Right Arm"] local m4Weld = m4["M4 Weld"]
-- tu dois assigner la bonne couleur
local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name local normalBorderColor = script.Parent.Border.ImageColor3 function Click(mouse) if game.Players[plr].TeamColor ~= game.Teams:FindFirstChild(script.Parent.Name).TeamColor then game.Players[plr].TeamColor = game.Teams:FindFirstChild(script.Parent.Name).TeamColor script.Parent.Border.ImageColor3 = Color3.new(0.333333, 1, 0) wait(.25) script.Parent.Border.ImageColor3 = normalBorderColor wait(.1) script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Character.Humanoid.Health = 0 else script.Parent.Border.ImageColor3 = Color3.new(1, 0, 0) wait(.25) script.Parent.Border.ImageColor3 = normalBorderColor wait(.1) end end script.Parent.MouseButton1Click:connect(Click)
--/////////// CONFIGURATIONS \\\\\\\\\\\\\\\\\
local sensitivity = 1 -- how quick/snappy the sway movements are. Don't go above 2 local swaysize = 1 -- how large/powerful the sway is. Don't go above 2 local includestrafe = true -- if true the fps arms will sway when the character is strafing local includewalksway = true -- if true, fps arms will sway when you are walking local includecamerasway = true -- if true, fps arms will sway when you move the camera local includejumpsway = true -- if true, jumping will have an effect on the viewmodel local headoffset = Vector3.new(0,0,0) -- the offset from the default camera position of the head. (0,1,0) will put the camera one stud above the head. local firstperson_arm_transparency = 0 -- the transparency of the arms in first person; set to 1 for invisible and set to 0 for fully visible. local firstperson_waist_movements_enabled = false -- if true, animations will affect the Uppertorso. If false, the uppertorso stays still while in first person (applies to R15 only)
-- CONNECTIONS
local iconCreationCount = 0 IconController.iconAdded:Connect(function(icon) topbarIcons[icon] = true if IconController.gameTheme then icon:setTheme(IconController.gameTheme) end icon.updated:Connect(function() IconController.updateTopbar() end) -- When this icon is selected, deselect other icons if necessary icon.selected:Connect(function() local allIcons = IconController.getIcons() for _, otherIcon in pairs(allIcons) do if icon.deselectWhenOtherIconSelected and otherIcon ~= icon and otherIcon.deselectWhenOtherIconSelected and otherIcon:getToggleState() == "selected" then otherIcon:deselect(icon) end end end) -- Order by creation if no order specified iconCreationCount = iconCreationCount + 1 icon:setOrder(iconCreationCount) -- Apply controller view if enabled if IconController.controllerModeEnabled then IconController._enableControllerModeForIcon(icon, true) end IconController:_updateSelectionGroup() IconController.updateTopbar() end) IconController.iconRemoved:Connect(function(icon) topbarIcons[icon] = nil icon:setEnabled(false) icon:deselect() icon.updated:Fire() IconController:_updateSelectionGroup() end) workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(bindCamera)
--// skeleton script for the actual health charger module --// i could make this even more modular but idk
local SSS = game:GetService("ServerScriptService") local HealthChargerMain = require(SSS.HealthCharger) local MainPart = script.Parent local ProxPrompt = MainPart.healthPrompt local Beam = MainPart.Beam local Particles = MainPart.BeamAttachment.Particles ProxPrompt.Triggered:Connect(function(player) HealthChargerMain.OnInteract(player, Beam, Particles) end) ProxPrompt.TriggerEnded:Connect(function(player) print(player) HealthChargerMain.OnEndedInteract(player) end)
--------- MODULE BEGIN ---------
local richText = {} local textService = game:GetService("TextService") local runService = game:GetService("RunService") local animationCount = 0 function getLayerCollector(frame) if not frame then return nil elseif frame:IsA("LayerCollector") then return frame elseif frame and frame.Parent then return getLayerCollector(frame.Parent) else return nil end end function shallowCopy(tab) local ret = {} for key, value in pairs(tab) do ret[key] = value end return ret end function getColorFromString(value) if colors[value] then return colors[value] else local r, g, b = value:match("(%d+),(%d+),(%d+)") return Color3.new(r / 255, g / 255, b / 255) end end function getVector2FromString(value) local x, y = value:match("(%d+),(%d+)") return Vector2.new(x, y) end function richText:New(frame, text, startingProperties) for _, v in pairs(frame:GetChildren()) do v:Destroy() end local properties = {} local defaultProperties = {} local lineFrames = {} local textFrames = {} local frameProperties = {} local linePosition = 0 local textLabel = Instance.new("TextLabel") local imageLabel = Instance.new("ImageLabel") local layerCollector = getLayerCollector(frame) local applyProperty, applyMarkup, formatLabel, printText, printImage, printSeries ----- Apply properties / markups ----- function applyMarkup(key, value) key = propertyShortcuts[key] or key if value == "/" then if defaultProperties[key] then value = defaultProperties[key] else warn("Attempt to default <"..key.."> to value with no default") end end if tonumber(value) then value = tonumber(value) elseif value == "false" or value == "true" then value = value == "true" end properties[key] = value if applyProperty(key, value) then -- Ok elseif defaults[key] then -- Ok elseif key == "Img" then printImage(value) else -- Unknown value return false end return true end function applyProperty(name, value, frame) local propertyType local ret = false for _, label in pairs(frame and {frame} or {textLabel, imageLabel}) do local isProperty = pcall(function() propertyType = typeof(label[name]) end) -- is there a better way to check if it's a property? if isProperty then if propertyType == "Color3" then label[name] = getColorFromString(value) elseif propertyType == "Vector2" then label[name] = getVector2FromString(value) else label[name] = value end ret = true end end return ret end ----- Set up default properties ----- for name, value in pairs(defaults) do applyMarkup(name, value) defaultProperties[propertyShortcuts[name] or name] = properties[propertyShortcuts[name] or name] end for name, value in pairs(startingProperties or {}) do applyMarkup(name, value) defaultProperties[propertyShortcuts[name] or name] = properties[propertyShortcuts[name] or name] end ----- Lines ----- local function newLine() local lineFrame = Instance.new("Frame") lineFrame.Name = string.format("Line%03d", #lineFrames + 1) lineFrame.Size = UDim2.new(0, 0, 0, 0) lineFrame.BackgroundTransparency = 1 local textContainer = Instance.new("Frame", lineFrame) textContainer.Name = "Container" textContainer.Size = UDim2.new(0, 0, 0, 0) textContainer.BackgroundTransparency = 1 if properties.ContainerHorizontalAlignment == "Left" then textContainer.AnchorPoint = Vector2.new(0, 0) textContainer.Position = UDim2.new(0, 0, 0, 0) elseif properties.ContainerHorizontalAlignment == "Center" then textContainer.AnchorPoint = Vector2.new(0.5, 0) textContainer.Position = UDim2.new(0.5, 0, 0, 0) elseif properties.ContainerHorizontalAlignment == "Right" then textContainer.AnchorPoint = Vector2.new(1, 0) textContainer.Position = UDim2.new(1, 0, 0, 0) end lineFrame.Parent = frame table.insert(lineFrames, lineFrame) textFrames[#lineFrames] = {} linePosition = 0 end newLine() ----- Get vertical size ----- local function getTextSize() if properties.TextScaled == true then local relativeHeight if properties.TextScaleRelativeTo == "Screen" then relativeHeight = layerCollector.AbsoluteSize.Y elseif properties.TextScaleRelativeTo == "Frame" then relativeHeight = frame.AbsoluteSize.Y end return math.min(properties.TextScale * relativeHeight, 100) else return properties.TextSize end end ----- Label printing ----- local function addFrameProperties(frame) frameProperties[frame] = shallowCopy(properties) frameProperties[frame].InitialSize = frame.Size frameProperties[frame].InitialPosition = frame.Position frameProperties[frame].InitialAnchorPoint = frame.AnchorPoint end function formatLabel(newLabel, labelHeight, labelWidth, endOfLineCallback) local lineFrame = lineFrames[#lineFrames] local verticalAlignment = tostring(properties.TextYAlignment) if verticalAlignment == "Top" then newLabel.Position = UDim2.new(0, linePosition, 0, 0) newLabel.AnchorPoint = Vector2.new(0, 0) elseif verticalAlignment == "Center" then newLabel.Position = UDim2.new(0, linePosition, 0.5, 0) newLabel.AnchorPoint = Vector2.new(0, 0.5) elseif verticalAlignment == "Bottom" then newLabel.Position = UDim2.new(0, linePosition, 1, 0) newLabel.AnchorPoint = Vector2.new(0, 1) end linePosition = linePosition + labelWidth if linePosition > frame.AbsoluteSize.X and not (linePosition == labelWidth) then -- Newline, get rid of label and redo on next line newLabel:Destroy() local lastLabel = textFrames[#lineFrames][#textFrames[#lineFrames]] if lastLabel:IsA("TextLabel") and lastLabel.Text == " " then -- get rid of trailing space lineFrame.Container.Size = UDim2.new(0, linePosition - labelWidth - lastLabel.Size.X.Offset, 1, 0) lastLabel:Destroy() table.remove(textFrames[#lineFrames]) end newLine() endOfLineCallback() else -- Label is ok newLabel.Size = UDim2.new(0, labelWidth, 0, labelHeight) lineFrame.Container.Size = UDim2.new(0, linePosition, 1, 0) lineFrame.Size = UDim2.new(1, 0, 0, math.max(lineFrame.Size.Y.Offset, labelHeight)) newLabel.Name = string.format("Group%03d", #textFrames[#lineFrames] + 1) newLabel.Parent = lineFrame.Container table.insert(textFrames[#lineFrames], newLabel) addFrameProperties(newLabel) properties.AnimateYield = 0 end end function printText(text) if text == "\n" then newLine() return elseif text == " " and linePosition == 0 then return end local textSize = getTextSize() local textWidth = textService:GetTextSize(text, textSize, textLabel.Font, Vector2.new(layerCollector.AbsoluteSize.X, textSize)).X local newTextLabel = textLabel:Clone() newTextLabel.TextScaled = false newTextLabel.TextSize = textSize newTextLabel.Text = text -- This text is never actually displayed. We just use it as a reference for knowing what the group string is. newTextLabel.TextTransparency = 1 newTextLabel.TextStrokeTransparency = 1 -- Keep the real text in individual frames per character: local charPos = 0 for i = 1, utf8.len(text), 1 do local character = string.sub(text, i, i) local characterWidth = textService:GetTextSize(character, textSize, textLabel.Font, Vector2.new(layerCollector.AbsoluteSize.X, textSize)).X local characterLabel = textLabel:Clone() characterLabel.Text = character characterLabel.TextScaled = false characterLabel.TextSize = textSize characterLabel.Position = UDim2.new(0, charPos, 0, 0) characterLabel.Size = UDim2.new(0, characterWidth, 0, textSize) characterLabel.Name = string.format("Char%03d", i) characterLabel.Parent = newTextLabel characterLabel.Visible = false addFrameProperties(characterLabel) charPos = charPos + characterWidth end formatLabel(newTextLabel, textSize, textWidth, function() printText(text) end) end function printImage(imageId) local imageHeight = getTextSize() local imageWidth = imageHeight -- Would be nice if we could get aspect ratio of image to get width properly. local newImageLabel = imageLabel:Clone() newImageLabel.Image = "rbxassetid://"..(images[imageId] or imageId) newImageLabel.Size = UDim2.new(0, imageHeight, 0, imageWidth) newImageLabel.Visible = false formatLabel(newImageLabel, imageHeight, imageWidth, function() printImage(imageId) end) end function printSeries(labelSeries) for _, t in pairs(labelSeries) do local markupKey, markupValue = string.match(t, "<(.+)=(.+)>") if markupKey and markupValue then if not applyMarkup(markupKey, markupValue) then warn("Could not apply markup: ", t) end else printText(t) end end end ----- Text traversal + parsing ----- local textPos = 1 local textLength = utf8.len(text) local labelSeries = {} while textPos and textPos <= textLength do local nextMarkupStart, nextMarkupEnd = string.find(text, "<.->", textPos) local nextSpaceStart, nextSpaceEnd = string.find(text, "[ \t\n]", textPos) local nextBreakStart, nextBreakEnd, breakIsWhitespace if nextMarkupStart and nextMarkupEnd and (not nextSpaceStart or nextMarkupStart < nextSpaceStart) then nextBreakStart, nextBreakEnd = nextMarkupStart, nextMarkupEnd else nextBreakStart, nextBreakEnd = nextSpaceStart or textLength + 1, nextSpaceEnd or textLength + 1 breakIsWhitespace = true end local nextWord = nextBreakStart > textPos and string.sub(text, textPos, nextBreakStart - 1) or nil local nextBreak = nextBreakStart <= textLength and string.sub(text, nextBreakStart, nextBreakEnd) or nil table.insert(labelSeries, nextWord) if breakIsWhitespace then printSeries(labelSeries) printSeries({nextBreak}) labelSeries = {} else table.insert(labelSeries, nextBreak) end textPos = nextBreakEnd + 1 --textPos = utf8.offset(text, 2, nextBreakEnd) end printSeries(labelSeries) ----- Alignment layout ----- local listLayout = Instance.new("UIListLayout") listLayout.HorizontalAlignment = properties.ContainerHorizontalAlignment listLayout.VerticalAlignment = properties.ContainerVerticalAlignment listLayout.Parent = frame ----- Calculate content size ----- local contentHeight = 0 local contentLeft = frame.AbsoluteSize.X local contentRight = 0 for _, lineFrame in pairs(lineFrames) do contentHeight = contentHeight + lineFrame.Size.Y.Offset local container = lineFrame.Container local left, right if container.AnchorPoint.X == 0 then left = container.Position.X.Offset right = container.Size.X.Offset elseif container.AnchorPoint.X == 0.5 then left = lineFrame.AbsoluteSize.X / 2 - container.Size.X.Offset / 2 right = lineFrame.AbsoluteSize.X / 2 + container.Size.X.Offset / 2 elseif container.AnchorPoint.X == 1 then left = lineFrame.AbsoluteSize.X - container.Size.X.Offset right = lineFrame.AbsoluteSize.X end contentLeft = math.min(contentLeft, left) contentRight = math.max(contentRight, right) end ----- Animation ----- animationCount = animationCount + 1 local animationDone = false local animationRenderstepBinding = "TextAnimation"..animationCount local animateQueue = {} local function updateAnimations() if animationDone then runService:UnbindFromRenderStep(animationRenderstepBinding) animateQueue = {} return end local t = tick() for i = #animateQueue, 1, -1 do local set = animateQueue[i] local properties = set.Settings local animateStyle = animationStyles[properties.AnimateStyle] if not animateStyle then warn("No animation style found for: ", properties.AnimateStyle, ", defaulting to Appear") animateStyle = animationStyles.Appear end local animateAlpha = math.min((t - set.Start) / properties.AnimateStyleTime, 1) animateStyle(set.Char, animateAlpha, properties) if animateAlpha >= 1 then table.remove(animateQueue, i) end end end local function setFrameToDefault(frame) frame.Position = frameProperties[frame].InitialPosition frame.Size = frameProperties[frame].InitialSize frame.AnchorPoint = frameProperties[frame].InitialAnchorPoint for name, value in pairs(frameProperties[frame]) do applyProperty(name, value, frame) end end local function setGroupVisible(frame, visible) frame.Visible = visible for _, v in pairs(frame:GetChildren()) do v.Visible = visible if visible then setFrameToDefault(v) end end if visible and frame:IsA("ImageLabel") then setFrameToDefault(frame) end end local function animate() animationDone = false runService:BindToRenderStep(animationRenderstepBinding, Enum.RenderPriority.Last.Value, updateAnimations) local stepGrouping local stepTime local stepFrequency local numAnimated -- Make everything invisible to start for lineNum, list in pairs(textFrames) do for _, frame in pairs(list) do setGroupVisible(frame, false) end end local function animateCharacter(char, properties) table.insert(animateQueue, {Char = char, Settings = properties, Start = tick()}) end local function yield() if numAnimated % stepFrequency == 0 and stepTime >= 0 then wait(stepTime > 0 and stepTime or nil) end end for lineNum, list in pairs(textFrames) do for _, frame in pairs(list) do local properties = frameProperties[frame] if not (properties.AnimateStepGrouping == stepGrouping) or not (properties.AnimateStepFrequency == stepFrequency) then numAnimated = 0 end stepGrouping = properties.AnimateStepGrouping stepTime = properties.AnimateStepTime stepFrequency = properties.AnimateStepFrequency if properties.AnimateYield > 0 then wait(properties.AnimateYield) end if stepGrouping == "Word" or stepGrouping == "All" then --if not (frame:IsA("TextLabel") and (frame.Text == " ")) then if frame:IsA("TextLabel") then frame.Visible = true for _, v in pairs(frame:GetChildren()) do animateCharacter(v, frameProperties[v]) end else animateCharacter(frame, properties) end if stepGrouping == "Word" then numAnimated = numAnimated + 1 yield() end --end elseif stepGrouping == "Letter" then if frame:IsA("TextLabel") --[[and not (frame.Text == " ") ]]then frame.Visible = true local text = frame.Text for i = 1, utf8.len(text), 1 do local v = frame[string.format("Char%03d", i)] animateCharacter(v, frameProperties[v]) numAnimated = numAnimated + 1 yield() if animationDone then return end end else animateCharacter(frame, properties) numAnimated = numAnimated + 1 yield() end else warn("Invalid step grouping: ", stepGrouping) end if animationDone then return end end end while #animateQueue > 0 do runService.RenderStepped:Wait() end animationDone = true end ----- Return object API ----- local textObject = {} textObject.ContentSize = Vector2.new(contentRight - contentLeft, contentHeight) function textObject:Animate(yield) if yield then animate() else coroutine.wrap(animate)() end end function textObject:Show() animationDone = true for lineNum, list in pairs(textFrames) do for _, frame in pairs(list) do setGroupVisible(frame, true) end end end function textObject:Hide() animationDone = true for lineNum, list in pairs(textFrames) do for _, frame in pairs(list) do setGroupVisible(frame, false) end end end return textObject end return richText
-- find player's head pos
local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local head = vCharacter:findFirstChild("Head") if head == nil then return end local launch = head.Position + 10 * v local missile = Pellet:clone() Tool.Handle.Mesh:clone().Parent = missile missile.Position = launch missile.Velocity = v * 80 local force = Instance.new("BodyForce") force.force = Vector3.new(0,40,0) force.Parent = missile missile.StarScript.Disabled = false local creator_tag = Instance.new("ObjectValue") creator_tag.Value = vCharacter creator_tag.Name = "creator" creator_tag.Parent = missile missile.Parent = game.Workspace end Tool.Enabled = true function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end if loaded==true then loaded=false local targetPos = humanoid.TargetPoint local lookAt = (targetPos - character.Head.Position).unit fire(lookAt) if (isTurbo(character) == true) then wait(.2) else wait(.3) end Tool.Enabled = true elseif loaded==false then Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.6 Tool.Parent.Torso["Right Shoulder"].DesiredAngle = -3.6 wait(.1) Tool.Handle.Transparency=0 wait(.1) loaded=true end Tool.Enabled = true end script.Parent.Activated:connect(onActivated)
--[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 3500 -- Front brake force Tune.RBrakeForce = 2800 -- Rear brake force Tune.PBrakeForce = 13000 -- Handbrake force Tune.FLgcyBForce = 41000 -- Front brake force [PGS OFF] Tune.RLgcyBForce = 36000 -- Rear brake force [PGS OFF] Tune.LgcyPBForce = 150000 -- Handbrake force [PGS OFF]
--------------------[ MOUSE FUNCTIONS ]-----------------------------------------------
function onMB1Down() MB1Down = true firstShot = true if fireFunction then fireFunction() end end function onMB1Up() MB1Down = false lowerSpread() end function onMB2Down() if S.aimSettings.holdToADS then if (not AimingIn) and (not Aimed) then AimingIn = true aimGun() AimingIn = false end else if Aimed then unAimGun() else aimGun() end end end function onMB2Up() if S.aimSettings.holdToADS then if (not AimingOut) and Aimed then AimingOut = true unAimGun() AimingOut = false end end end function onScrollUp() local newAimSensitivity = aimSensitivity + S.sensitivitySettings.Increment aimSensitivity = ( newAimSensitivity < S.sensitivitySettings.Min and S.sensitivitySettings.Min or newAimSensitivity > S.sensitivitySettings.Max and S.sensitivitySettings.Max or newAimSensitivity ) mouseSensitivity = (Aimed and aimSensitivity or mouseSensitivity) Sens.Text = "S: "..aimSensitivity if mainGUI:IsDescendantOf(game) then Sens.Visible = true local t0 = tick() lastSensUpdate = t0 wait(0.3) if lastSensUpdate <= t0 then Sens.Visible = false end end end function onScrollDown() local newAimSensitivity = aimSensitivity - S.sensitivitySettings.Increment aimSensitivity = ( newAimSensitivity < S.sensitivitySettings.Min and S.sensitivitySettings.Min or newAimSensitivity > S.sensitivitySettings.Max and S.sensitivitySettings.Max or newAimSensitivity ) mouseSensitivity = (Aimed and aimSensitivity or mouseSensitivity) Sens.Text = "S: "..aimSensitivity if mainGUI:IsDescendantOf(game) then Sens.Visible = true local t0 = tick() lastSensUpdate = t0 wait(0.3) if lastSensUpdate <= t0 then Sens.Visible = false end end end
--[=[ Utility functions involving sets, which are tables with the key as an index, and the value as a truthy value. @class Set ]=]
local Set = {}
--[[Transmission]]
Tune.TransModes = {"Auto", "Semi"} --[[ [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 ]] --Automatic Settings Tune.AutoShiftMode = "RPM" --[[ [Modes] "Speed" : Shifts based on wheel speed "RPM" : Shifts based on RPM ]] 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) --Gear Ratios Tune.FinalDrive = 4.7 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.15 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.94 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.20 , --[[ 3 ]] 1.41 , --[[ 4 ]] 0.98 , --[[ 5 ]] 0.82 , } Tune.FDMult = 1 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--Update Checker
if _Tune.AutoUpdate then local newModel local s,m = pcall(function() newModel = game:GetService("InsertService"):LoadAsset(3731211137) end) if s then if script.Parent["Interface"].Version.Value < newModel["NCT: M Beta"]["Tuner"]["Interface"].Version.Value then if newModel["NCT: M Beta"]["Tuner"]["Interface"].Version.FinalRelease.Value then print("[NCT: M Beta]: It's officially out!" .."\nNovena Constraint Type: Motorcycle has released." .."\nPlease upgrade your chassis to the official release." .."\nThank you so much for beta testing NCT: M!") elseif newModel["NCT: M Beta"]["Tuner"]["Interface"].Version.MajorRelease.Value then print("[NCT: M Beta]: Chassis update!" .."\nA major update to NCT: M's Beta has been found." .."\nThe changes cannot be ported due to the update." .."\nYou are advised to update your chassis ASAP.") else script.Parent["Interface"].Version.Value = newModel["NCT: M Beta"]["Tuner"]["Interface"].Version.Value print("[NCT: M Beta]: Drive script update!" .."\nAn update to NCT: M's Drive script has been found." .."\nThe updated script will take effect next time you get in." .."\nYou are advised to update your chassis soon.") script.Parent["Interface"].Drive:Destroy() newModel["NCT: M Beta"]["Tuner"]["Interface"].Drive.Parent = script.Parent["A-Chassis Interface"] end end newModel:Destroy() end end
--[[Weight and CG]]
Tune.Weight = 3029 -- 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 = .8 -- 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 = .1 -- Density of structural members
-- DONT TOUCH ANYTHING
function ChangeMe(hit) if hit.Parent == nil then return end if (hit.Parent:findFirstChild("Humanoid") == nil) then return end local human = hit.Parent:findFirstChild("Humanoid") local char = hit.Parent local player = game.Players:GetPlayerFromCharacter(hit.Parent) if (human ~= nil) and debounce == false then debounce = true originals = char:getChildren() for w = 1, #originals do if originals[w].className == "CharacterMesh" then originals[w]:remove() end end meshes = script:getChildren() for y = 1, #meshes do copy = meshes[y]:clone() copy.Parent = char end end wait(0) debounce = false end script.Parent.Touched:connect(ChangeMe)
-- Listeners
SpawnSegway.OnServerEvent:connect(function(Player,Color) Functions.SpawnSegway(Player,Color) end) ConfigTool.OnServerEvent:connect(function(Player,Transparency,ShouldColor,Color) Functions.ConfigTool(Transparency,ShouldColor,Color) end) DestroySegway.OnServerEvent:connect(function(Player) Functions.DestroySegway() end) PlaySound.OnServerEvent:connect(function(Player,Sound,Pitch,Volume) Functions.PlaySound(Sound,Pitch,Volume) end) StopSound.OnServerEvent:connect(function(Player,Sound,Volume) Functions.StopSound(Sound,Volume) end) UndoTags.OnServerEvent:connect(function(Player) Functions.UndoTags() end) UndoHasWelded.OnServerEvent:connect(function(Player,SeaterObject) Functions.UndoHasWelded(SeaterObject) end) function DeleteWelds.OnServerInvoke(Player,Part) Functions.DeleteWelds(Part) return true end function ConfigHumanoid.OnServerInvoke(Player,PlatformStand,Jump,AutoRotate) Functions.ConfigHumanoid(Player,PlatformStand,Jump,AutoRotate) end ConfigLights.OnServerEvent:connect(function(Player,Transparency,Color,Bool,Material,Lights,Notifiers) Functions.ConfigLights(Transparency,Color,Bool,Material,Lights,Notifiers) end)
--// Special Variables
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 local function Init() Functions = server.Functions Admin = server.Admin Anti = server.Anti Core = server.Core HTTP = server.HTTP Logs = server.Logs Remote = server.Remote Process = server.Process Variables = server.Variables Settings = server.Settings Variables.BanMessage = Settings.BanMessage Variables.LockMessage = Settings.LockMessage for _, v in Settings.MusicList or {} do table.insert(Variables.MusicList, v) end for _, v in Settings.InsertList or {} do table.insert(Variables.InsertList, v) end for _, v in Settings.CapeList or {} do table.insert(Variables.Capes, v) end Variables.Init = nil Logs:AddLog("Script", "Variables Module Initialized") end local function AfterInit(data) server.Variables.CodeName = server.Functions:GetRandom() Variables.RunAfterInit = nil Logs:AddLog("Script", "Finished Variables AfterInit") end local Lighting = service.Lighting server.Variables = { Init = Init, RunAfterInit = AfterInit, ZaWarudo = false, CodeName = math.random(), IsStudio = service.RunService:IsStudio(), -- Used to check if Adonis is running inside Roblox Studio as things like TeleportService and DataStores (if API Access is disabled) do not work in Studio AuthorizedToReply = {}, FrozenObjects = {}, ScriptBuilder = {}, CachedDonors = {}, BanMessage = "Banned", LockMessage = "Not Whitelisted", DonorPass = {1348327, 1990427, 1911740, 167686, 98593, "6878510605", 5212082, 5212081}, --// Strings are items; numbers are gamepasses WebPanel_Initiated = false, LightingSettings = { Ambient = Lighting.Ambient, OutdoorAmbient = Lighting.OutdoorAmbient, Brightness = Lighting.Brightness, TimeOfDay = Lighting.TimeOfDay, FogColor = Lighting.FogColor, FogEnd = Lighting.FogEnd, FogStart = Lighting.FogStart, GlobalShadows = Lighting.GlobalShadows, Outlines = Lighting.Outlines, ShadowColor = Lighting.ShadowColor, ColorShift_Bottom = Lighting.ColorShift_Bottom, ColorShift_Top = Lighting.ColorShift_Top, GeographicLatitude = Lighting.GeographicLatitude, Name = Lighting.Name, }, OriginalLightingSettings = { Ambient = Lighting.Ambient, OutdoorAmbient = Lighting.OutdoorAmbient, Brightness = Lighting.Brightness, TimeOfDay = Lighting.TimeOfDay, FogColor = Lighting.FogColor, FogEnd = Lighting.FogEnd, FogStart = Lighting.FogStart, GlobalShadows = Lighting.GlobalShadows, Outlines = Lighting.Outlines, ShadowColor = Lighting.ShadowColor, ColorShift_Bottom = Lighting.ColorShift_Bottom, ColorShift_Top = Lighting.ColorShift_Top, GeographicLatitude = Lighting.GeographicLatitude, Name = Lighting.Name, Sky = Lighting:FindFirstChildOfClass("Sky") and Lighting:FindFirstChildOfClass("Sky"):Clone(), }, PMtickets = {}; HelpRequests = {}; Objects = {}; InsertedObjects = {}; CommandLoops = {}; SavedTools = {}; Waypoints = {}; Cameras = {}; Jails = {}; LocalEffects = {}; SizedCharacters = {}; BundleCache = {}; TrackingTable = {}; DisguiseBindings = {}; IncognitoPlayers = {}; MusicList = { {Name = "crabrave", ID = 5410086218}, {Name = "shiawase", ID = 5409360995}, {Name = "unchartedwaters", ID = 7028907200}, {Name = "glow", ID = 7028856935}, {Name = "good4me", ID = 7029051434}, {Name = "bloom", ID = 7029024726}, {Name = "safe&sound", ID = 7024233823}, {Name = "shaku", ID = 7024332460}, {Name = "fromdust&ashes", ID = 7024254685}, {Name = "loveis", ID = 7029092469}, {Name = "playitcool", ID = 7029017448}, {Name = "still", ID = 7023771708}, {Name = "sleep", ID = 7023407320}, {Name = "whatareyouwaitingfor", ID = 7028977687}, {Name = "balace", ID = 7024183256}, {Name = "brokenglass", ID = 7028799370}, {Name = "thelanguageofangels", ID = 7029031068}, {Name = "imprints", ID = 7023704173}, {Name = "foundareason", ID = 7028919492}, {Name = "newhorizons", ID = 7028518546}, {Name = "whatsitlike", ID = 7028997537}, {Name = "destroyme", ID = 7023617400}, {Name = "consellations", ID = 7023733671}, {Name = "wish", ID = 7023670701}, {Name = "samemistake", ID = 7024101188}, {Name = "whereibelong", ID = 7028527348}, {Name = "rainingtacos", ID = 142376088}, }; InsertList = {}; Capes = { {Name = "crossota", Material = "Neon", Color = "Cyan", ID = 420260457}, {Name = "jamiejr99", Material = "Neon", Color = "Cashmere", ID = 429297485}, {Name = "new yeller", Material = "Fabric", Color = "New Yeller"}, {Name = "pastel blue", Material = "Fabric", Color = "Pastel Blue"}, {Name = "dusty rose", Material = "Fabric", Color = "Dusty Rose"}, {Name = "cga brown", Material = "Fabric", Color = "CGA brown"}, {Name = "random", Material = "Fabric", Color = (BrickColor.random()).Name}, {Name = "shiny", Material = "Plastic", Color = "Institutional white", Reflectance = 1}, {Name = "gold", Material = "Plastic", Color = "Bright yellow", Reflectance = 0.4}, {Name = "kohl", Material = "Fabric", Color = "Really black", ID = 108597653}, {Name = "script", Material = "Plastic", Color = "White", ID = 151359194}, {Name = "batman", Material = "Fabric", Color = "Institutional white", ID = 108597669}, {Name = "epix", Material = "Plastic", Color = "Really black", ID = 149442745}, {Name = "superman", Material = "Fabric", Color = "Bright blue", ID = 108597677}, {Name = "swag", Material = "Fabric", Color = "Pink", ID = 109301474}, {Name = "donor", Material = "Plastic", Color = "White", ID = 149009184}, {Name = "gomodern", Material = "Plastic", Color = "Really black", ID = 149438175}, {Name = "admin", Material = "Plastic", Color = "White", ID = 149092195}, {Name = "giovannis", Material = "Plastic", Color = "White", ID = 149808729}, {Name = "godofdonuts", Material = "Plastic", Color = "Institutional white", ID = 151034443}, {Name = "host", Material = "Plastic", Color = "Really black", ID = 152299000}, {Name = "cohost", Material = "Plastic", Color = "Really black", ID = 152298950}, {Name = "trainer", Material = "Plastic", Color = "Really black", ID = 152298976}, {Name = "ba", Material = "Plastic", Color = "White", ID = 172528001} }; Blacklist = { Enabled = (server.Settings.BlacklistEnabled ~= nil and server.Settings.BlacklistEnabled) or true, Lists = { Settings = server.Settings.Blacklist }, }; Whitelist = { Enabled = server.Settings.WhitelistEnabled, Lists = { Settings = server.Settings.Whitelist }, }; } end
-- Set both mobile touch gui and control
function UserInputController:setMobileTouchGuiEnabled(mobileTouchGuiEnabled: boolean) self.UserInputService.ModalEnabled = not mobileTouchGuiEnabled -- Update player controls since ModalEnabled doesn't update player control self:setPlayerControlsEnabled(mobileTouchGuiEnabled) end
--// All global vars will be wiped/replaced except script --// All guis are autonamed client.Variables.CodeName..gui.Name --// Be sure to update the console gui's code if you change stuff
return function(data, env) if env then setfenv(1, env) end local Title,Message = data.Title,data.Message if not Title or not Message then return end local gTable = data.gTable local baseClip = script.Parent.Parent.BaseClip local messageTemplate = baseClip.Frame local messageClone = messageTemplate messageClone.Size = UDim2.new(1,0,0,baseClip.AbsoluteSize.Y) messageClone.Position = UDim2.new(0,0,-1,0) messageClone.Parent = baseClip messageClone.Visible = true local closeButton = messageClone:WaitForChild('TextButton') local Top = messageClone:WaitForChild('Top') local Body = messageClone:WaitForChild('Body') local topTitle = Top:WaitForChild('Title') local bodyText = Body:WaitForChild('To Name Later') local Left = Top:WaitForChild('Left') local tim = data.Time topTitle.Text = Title bodyText.Text = Message local bodyBounds_Y = bodyText.TextBounds.Y if bodyBounds_Y < 30 then bodyBounds_Y = 30 else bodyBounds_Y = bodyBounds_Y + 15 end local titleSize_Y = Top.Size.Y.Offset messageClone.Size = UDim2.new(1,0,0,bodyBounds_Y+titleSize_Y) local function Resize() local toDisconnect local Success, Message = pcall(function() toDisconnect = gTable.BindEvent(baseClip.Changed, function(Prop) if Prop == "AbsoluteSize" then messageClone.Size = UDim2.new(1,0,0,baseClip.AbsoluteSize.Y) local bodyBounds_Y = bodyText.TextBounds.Y if bodyBounds_Y < 30 then bodyBounds_Y = 30 else bodyBounds_Y = bodyBounds_Y + 15 end local titleSize_Y = Top.Size.Y.Offset messageClone.Size = UDim2.new(1,0,0,bodyBounds_Y+titleSize_Y) if messageClone ~= nil and messageClone.Parent == baseClip then messageClone:TweenPosition(UDim2.new(0,0,0.5,-messageClone.Size.Y.Offset/2),'Out','Quint',0.5,true) else if toDisconnect then toDisconnect:Disconnect() end return end end end) end) if Message and toDisconnect then toDisconnect:Disconnect() return end end gTable.CustomDestroy = function() gTable.CustomDestroy = nil gTable.ClearEvents() pcall(function() messageClone:TweenPosition(UDim2.new(0,0,1,0),'Out','Quint',0.3,true,function(Done) if Done == Enum.TweenStatus.Completed and messageClone then messageClone:Destroy() elseif Done == Enum.TweenStatus.Canceled and messageClone then messageClone:Destroy() end end) wait(0.3) end) return gTable.Destroy() end gTable:Ready() messageClone:TweenPosition(UDim2.new(0,0,0.5,-messageClone.Size.Y.Offset/2),'Out','Quint',0.5,true,function(Status) if Status == Enum.TweenStatus.Completed then Resize() end end) gTable.BindEvent(closeButton.MouseButton1Click, function() pcall(function() messageClone:TweenPosition(UDim2.new(0,0,1,0),'Out','Quint',0.3,true,function(Done) if Done == Enum.TweenStatus.Completed and messageClone then messageClone:Destroy() gTable:Destroy() elseif Done == Enum.TweenStatus.Canceled and messageClone then messageClone:Destroy() gTable:Destroy() end end) end) end) local waitTime = tim or (#bodyText.Text*0.1)+1 local Position_1,Position_2 = string.find(waitTime,"%p") if Position_1 and Position_2 then local followingNumbers = tonumber(string.sub(waitTime,Position_1)) if followingNumbers >= 0.5 then waitTime = tonumber(string.sub(waitTime,1,Position_1))+1 else waitTime = tonumber(string.sub(waitTime,1,Position_1)) end end --[[if waitTime > 15 then waitTime = 15 elseif waitTime <= 1 then waitTime = 2 end]]-- Left.Text = waitTime..'.00' for i=waitTime,1,-1 do if not Left then break end Left.Text = i..'.00' wait(1) end Left.Text = "Closing.." wait(0.3) if messageClone then pcall(function() messageClone:TweenPosition(UDim2.new(0,0,1,0),'Out','Quint',0.3,true,function(Done) if Done == Enum.TweenStatus.Completed and messageClone then messageClone:Destroy() gTable:Destroy() elseif Done == Enum.TweenStatus.Canceled and messageClone then messageClone:Destroy() gTable:Destroy() end end) end) end end
-- JamieWallace_RBLX -- 19/05/2019
local Door = script.Parent.Parent.Door local Click = script.Parent.ClickDetector Click.MouseClick:Connect(function(Player) local PlayerTeam = Player.Team.Name if PlayerTeam == "Police" then Door.CanCollide = false Door.Transparency = 1 wait(2) Door.CanCollide = true Door.Transparency = 0 end end)
--[[ Evercyan @ March 2023 HumanoidAttributes One important thing about this kit, is that you should never set a player's MaxHealth, WalkSpeed, and JumpPower manually through Humanoid properties. The kit uses a feature known as Humanoid "Attributes", which is a Configuration under the Humanoid (Humanoid.Attributes). Under here is another Configuration for each value. These Configurations have Attributes (shown at the bottom of the Properties window) which can be added to increase the total health. The reason this is done is so that we can add other sources of health (Game passes, Armor, etc), and the game won't lose track, or be forced to set the health to (100 + n). ---------------------------------------------------------------------------- It may sound confusing, but essentially, you can add 250 health to the character by doing this: > Character.Humanoid.Attributes.Health:SetAttribute("Premium VIP", 250) There are now two sources of Health • "Default": 100 • "Premium VIP": 250 The total is automatically calculated (250+100 = 350), and set as the player's new MaxHealth for the character. You can remove health by setting an attribute to nil > Character.Humanoid.Attributes.Health:SetAttribute("Premium VIP", nil) • "Default": 100 The total is automatically calculated (100 = 100), and set as the player's new MaxHealth for the character. This can be done with other values as well. There are currently only three supported values: • Health (MaxHealth), • WalkSpeed, • JumpPower ]]
local HumanoidAttributes = {} HumanoidAttributes.__index = HumanoidAttributes local DefaultValues = { ["Health"] = 100, ["WalkSpeed"] = 16, ["JumpPower"] = 50 } export type HumanoidAttributes = { Instance: Configuration, Humanoid: Humanoid, Update: (self: HumanoidAttributes) -> () } function HumanoidAttributes.new(Humanoid: Humanoid): HumanoidAttributes local self = setmetatable({}, HumanoidAttributes) -- Looks complex, but all this does here is redirect an index to under HumanoidAttributes table if it doesn't exist in self. local Configuration = Instance.new("Configuration") Configuration.Name = "Attributes" for Name, DefaultValue in DefaultValues do local SubConfig = Instance.new("Configuration") SubConfig.Name = Name SubConfig.Parent = Configuration SubConfig:SetAttribute("Default", DefaultValue) SubConfig.AttributeChanged:Connect(function(AttributeName) self:Update() end) Humanoid.Destroying:Once(warn) end Configuration.Parent = Humanoid self.Instance = Configuration self.Humanoid = Humanoid self:Update() return self end function HumanoidAttributes:Update() for _, SubConfig in self.Instance:GetChildren() do if SubConfig:IsA("Configuration") then local n = 0 for Name, Value in SubConfig:GetAttributes() do if typeof(Value) == "number" then n += Value end end local PropertyName = (SubConfig.Name == "Health" and "MaxHealth") or SubConfig.Name local Percent = SubConfig.Name == "Health" and (self.Humanoid.Health/self.Humanoid.MaxHealth) self.Humanoid[PropertyName] = n if Percent == 1 then self.Humanoid.Health = self.Humanoid.MaxHealth end end end end return HumanoidAttributes
-- Called when character is added
function Poppercam:CharacterAdded(char, player) self.playerCharacters[player] = char end
-- This function keeps the held weapon from bouncing up and down too much when you move
function ShoulderCamera:applyRootJointFix() if self.rootJoint then local translationScale = self.zoomState and Vector3.new(0.25, 0.25, 0.25) or Vector3.new(0.5, 0.5, 0.5) local rotationScale = self.zoomState and 0.15 or 0.2 local rootRotation = self.rootJoint.Part0.CFrame - self.rootJoint.Part0.CFrame.Position local rotation = self.rootJoint.Transform - self.rootJoint.Transform.Position local yawRotation = CFrame.Angles(0, self.yaw, 0) local leadRotation = rootRotation:toObjectSpace(yawRotation) local rotationFix = self.rootRigAttach.CFrame if self:isHumanoidControllable() then rotationFix = self.rootJoint.Transform:inverse() * leadRotation * rotation:Lerp(CFrame.new(), 1 - rotationScale) + (self.rootJoint.Transform.Position * translationScale) end self.rootJoint.C0 = CFrame.new(self.rootJoint.C0.Position, self.rootJoint.C0.Position + rotationFix.LookVector.Unit) end end function ShoulderCamera:sprintFromTouchInput() local moveVector = nil local activeController = nil local activeControllerIsTouch = nil if self.controlModule then moveVector = self.controlModule:GetMoveVector() activeController = self.controlModule:GetActiveController() end if moveVector and activeController then activeControllerIsTouch = activeController.thumbstickFrame ~= nil or activeController.thumbpadFrame ~= nil end if activeControllerIsTouch then return (moveVector and moveVector.Magnitude >= 0.9) else return false end end function ShoulderCamera:sprintFromGamepadInput() return self.movementPan.Magnitude > 0.9 end function ShoulderCamera:onCurrentCharacterChanged(character) self.currentCharacter = character if self.currentCharacter then self.raycastIgnoreList[1] = self.currentCharacter self.currentHumanoid = character:WaitForChild("Humanoid") self.currentRootPart = character:WaitForChild("HumanoidRootPart") self.rootRigAttach = self.currentRootPart:WaitForChild("RootRigAttachment") self.rootJoint = character:WaitForChild("LowerTorso"):WaitForChild("Root") self.currentWaist = character:WaitForChild("UpperTorso"):WaitForChild("Waist") self.currentWrist = character:WaitForChild("RightHand"):WaitForChild("RightWrist") self.wristAttach0 = character:WaitForChild("RightLowerArm"):WaitForChild("RightWristRigAttachment") self.wristAttach1 = character:WaitForChild("RightHand"):WaitForChild("RightWristRigAttachment") self.rightGripAttachment = character:WaitForChild("RightHand"):WaitForChild("RightGripAttachment") self.currentTool = character:FindFirstChildOfClass("Tool") self.eventConnections.humanoidDied = self.currentHumanoid.Died:Connect(function() self.zoomedFromInput = false self:updateZoomState() end) self.eventConnections.characterChildAdded = character.ChildAdded:Connect(function(child) if child:IsA("Tool") then self.currentTool = child self:updateZoomState() end end) self.eventConnections.characterChildRemoved = character.ChildRemoved:Connect(function(child) if child:IsA("Tool") and self.currentTool == child then self.currentTool = character:FindFirstChildOfClass("Tool") self:updateZoomState() end end) if Players.LocalPlayer then local PlayerScripts = Players.LocalPlayer:FindFirstChild("PlayerScripts") if PlayerScripts then local PlayerModule = PlayerScripts:FindFirstChild("PlayerModule") if PlayerModule then self.controlModule = require(PlayerModule:FindFirstChild("ControlModule")) end end end else if self.eventConnections.humanoidDied then self.eventConnections.humanoidDied:Disconnect() self.eventConnections.humanoidDied = nil end if self.eventConnections.characterChildAdded then self.eventConnections.characterChildAdded:Disconnect() self.eventConnections.characterChildAdded = nil end if self.eventConnections.characterChildRemoved then self.eventConnections.characterChildRemoved:Disconnect() self.eventConnections.characterChildRemoved = nil end self.currentTool = nil self.currentHumanoid = nil self.currentRootPart = nil self.controlModule = nil end end function ShoulderCamera:onCurrentCameraChanged(camera) if self.currentCamera == camera then return end self.currentCamera = camera if self.currentCamera then self.raycastIgnoreList[2] = self.currentCamera if self.eventConnections.cameraTypeChanged then self.eventConnections.cameraTypeChanged:Disconnect() self.eventConnections.cameraTypeChanged = nil end self.eventConnections.cameraTypeChanged = self.currentCamera:GetPropertyChangedSignal("CameraType"):Connect(function() if self.enabled then self.currentCamera.CameraType = Enum.CameraType.Scriptable end end) end end function ShoulderCamera:isHumanoidControllable() if not self.currentHumanoid then return false end local humanoidState = self.currentHumanoid:GetState() return CONTROLLABLE_HUMANOID_STATES[humanoidState] == true end function ShoulderCamera:getCollisionRadius() if not self.currentCamera then return 0 end local viewportSize = self.currentCamera.ViewportSize local aspectRatio = viewportSize.X / viewportSize.Y local fovRads = math.rad(self.fieldOfView) local imageHeight = math.tan(fovRads) * math.abs(self.currentCamera.NearPlaneZ) local imageWidth = imageHeight * aspectRatio local cornerPos = Vector3.new(imageWidth, imageHeight, self.currentCamera.NearPlaneZ) return cornerPos.Magnitude end function ShoulderCamera:penetrateCast(ray, ignoreList) local tries = 0 local hitPart, hitPoint, hitNormal, hitMaterial = nil, ray.Origin + ray.Direction, Vector3.new(0, 1, 0), Enum.Material.Air while tries < 50 do tries = tries + 1 hitPart, hitPoint, hitNormal, hitMaterial = workspace:FindPartOnRayWithIgnoreList(ray, ignoreList, false, true) if hitPart and not hitPart.CanCollide then table.insert(ignoreList, hitPart) else break end end return hitPart, hitPoint, hitNormal, hitMaterial end function ShoulderCamera:getRelativePitch() if self.currentRootPart then local pitchRotation = CFrame.Angles(self.pitch, 0, 0) local relativeRotation = self.currentRootPart.CFrame:toObjectSpace(pitchRotation) local relativeLook = relativeRotation.lookVector local angle = math.asin(relativeLook.Y) return math.clamp(angle, self.minPitch, self.maxPitch) end return self.pitch end function ShoulderCamera:getCurrentFieldOfView() if self.zoomState then return self.zoomedFOV else return self.fieldOfView end end function ShoulderCamera:handlePartTransparencies() local partsLookup = {} local accoutrementsLookup = {} for _, child in pairs(self.currentCharacter:GetChildren()) do local hidden = false if child:IsA("BasePart") then hidden = partsLookup[child.Name] == true child.LocalTransparencyModifier = hidden and 1 or 0 elseif child:IsA("Accoutrement") then local descendants = child:GetDescendants() local accoutrementParts = {} for _, desc in pairs(descendants) do if desc:IsA("Attachment") and accoutrementsLookup[desc.Name] then hidden = true elseif desc:IsA("BasePart") then table.insert(accoutrementParts, desc) end end for _, part in pairs(accoutrementParts) do part.LocalTransparencyModifier = hidden and 1 or 0 end elseif child:IsA("Tool") then hidden = self.zoomState and (self.hasScope or self.hideToolWhileZoomed) for _, part in pairs(child:GetDescendants()) do if part:IsA("BasePart") then part.LocalTransparencyModifier = hidden and 1 or 0 end end end end end function ShoulderCamera:setSprintEnabled(enabled) self.sprintEnabled = enabled end function ShoulderCamera:setSlowZoomWalkEnabled(enabled) self.slowZoomWalkEnabled = enabled end function ShoulderCamera:setHasScope(hasScope) if self.hasScope == hasScope then return end self.hasScope = hasScope self:updateZoomState() end function ShoulderCamera:onSprintAction(actionName, inputState, inputObj) self.sprintingInputActivated = inputState == Enum.UserInputState.Begin end
--// # key, Traffic Director
mouse.KeyDown:connect(function(key) if key=="b" then veh.Lightbar.middle.Beep:Play() veh.Lightbar.Remotes.TDEvent:FireServer(true) end end)
---[[ Misc Settings ]]
module.WhisperCommandAutoCompletePlayerNames = true local ChangedEvent = Instance.new("BindableEvent") local proxyTable = setmetatable({}, { __index = function(tbl, index) return module[index] end, __newindex = function(tbl, index, value) module[index] = value ChangedEvent:Fire(index, value) end, }) rawset(proxyTable, "SettingsChanged", ChangedEvent.Event) return proxyTable
--[[** <description> Unmark the data store as a backup data store and tell :Get() and reset values to nil. </description> **--]]
function DataStore:ClearBackup() self.backup = nil self.haveValue = false self.value = nil end
--[[Weld functions]]
local JS = game:GetService("JointsService") local PGS_ON = workspace:PGSIsEnabled() function MakeWeld(x,y,type,s) if type==nil then type="Weld" end local W=Instance.new(type,JS) W.Part0=x W.Part1=y W.C0=x.CFrame:inverse()*x.CFrame W.C1=y.CFrame:inverse()*x.CFrame if type=="Motor" and s~=nil then W.MaxVelocity=s end return W end function ModelWeld(a,b) if a:IsA("BasePart") then MakeWeld(b,a,"Weld") elseif a:IsA("Model") then for i,v in pairs(a:GetChildren()) do ModelWeld(v,b) end end end function UnAnchor(a) if a:IsA("BasePart") then a.Anchored=false a.Archivable = false a.Locked=false end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end end
-- Services
local RunService = game:GetService('RunService') local TweenService = game:GetService('TweenService') local Debris = game:GetService('Debris')
---
local Paint = false script.Parent.MouseButton1Click:connect(function() Paint = not Paint handler:FireServer("Burlap",Paint) end)
-- When supplied, legacyCameraType is used and cameraMovementMode is ignored (should be nil anyways) -- Next, if userCameraCreator is passed in, that is used as the cameraCreator
function CameraModule:ActivateCameraController(cameraMovementMode, legacyCameraType) local newCameraCreator = nil if legacyCameraType~=nil then --[[ This function has been passed a CameraType enum value. Some of these map to the use of the LegacyCamera module, the value "Custom" will be translated to a movementMode enum value based on Dev and User settings, and "Scriptable" will disable the camera controller. --]] if legacyCameraType == Enum.CameraType.Scriptable then if self.activeCameraController then self.activeCameraController:Enable(false) self.activeCameraController = nil return end elseif legacyCameraType == Enum.CameraType.Custom then cameraMovementMode = self:GetCameraMovementModeFromSettings() elseif legacyCameraType == Enum.CameraType.Track then -- Note: The TrackCamera module was basically an older, less fully-featured -- version of ClassicCamera, no longer actively maintained, but it is re-implemented in -- case a game was dependent on its lack of ClassicCamera's extra functionality. cameraMovementMode = Enum.ComputerCameraMovementMode.Classic elseif legacyCameraType == Enum.CameraType.Follow then cameraMovementMode = Enum.ComputerCameraMovementMode.Follow elseif legacyCameraType == Enum.CameraType.Orbital then cameraMovementMode = Enum.ComputerCameraMovementMode.Orbital elseif legacyCameraType == Enum.CameraType.Attach or legacyCameraType == Enum.CameraType.Watch or legacyCameraType == Enum.CameraType.Fixed then newCameraCreator = LegacyCamera else warn("CameraScript encountered an unhandled Camera.CameraType value: ",legacyCameraType) end end if not newCameraCreator then if cameraMovementMode == Enum.ComputerCameraMovementMode.Classic or cameraMovementMode == Enum.ComputerCameraMovementMode.Follow or cameraMovementMode == Enum.ComputerCameraMovementMode.Default or (FFlagUserCameraToggle and cameraMovementMode == Enum.ComputerCameraMovementMode.CameraToggle) then newCameraCreator = ClassicCamera elseif cameraMovementMode == Enum.ComputerCameraMovementMode.Orbital then newCameraCreator = OrbitalCamera else warn("ActivateCameraController did not select a module.") return end end -- Create the camera control module we need if it does not already exist in instantiatedCameraControllers local newCameraController if not instantiatedCameraControllers[newCameraCreator] then newCameraController = newCameraCreator.new() instantiatedCameraControllers[newCameraCreator] = newCameraController else newCameraController = instantiatedCameraControllers[newCameraCreator] end -- If there is a controller active and it's not the one we need, disable it, -- if it is the one we need, make sure it's enabled if self.activeCameraController then if self.activeCameraController ~= newCameraController then self.activeCameraController:Enable(false) self.activeCameraController = newCameraController self.activeCameraController:Enable(true) elseif not self.activeCameraController:GetEnabled() then self.activeCameraController:Enable(true) end elseif newCameraController ~= nil then self.activeCameraController = newCameraController self.activeCameraController:Enable(true) end if self.activeCameraController then if cameraMovementMode~=nil then self.activeCameraController:SetCameraMovementMode(cameraMovementMode) elseif legacyCameraType~=nil then -- Note that this is only called when legacyCameraType is not a type that -- was convertible to a ComputerCameraMovementMode value, i.e. really only applies to LegacyCamera self.activeCameraController:SetCameraType(legacyCameraType) end end end
--local v1 = require(script.Parent);
local v2 = require(game.Players.LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule")):GetControls(); local v3 = game["Run Service"]; local l__UserInputService__4 = game:GetService("UserInputService"); local l__ProximityPromptService__5 = game:GetService("ProximityPromptService"); local l__TextService__6 = game:GetService("TextService"); local v7 = function() return l1 end local v8 = script.Main:Clone() v8.Parent = game:GetService("Players").LocalPlayer.PlayerGui v8.Name = "MainGUI" if v7() == "mobile" then v8.MainFrame:WaitForChild("MobileButtons").Visible = true; end; local l__PromptFrame__1 = v8:WaitForChild("MainFrame"):WaitForChild("PromptFrame"); local u2 = require(script:WaitForChild("MouseIcons")); local u3 = require(game:GetService("ReplicatedStorage"):WaitForChild("ClientModules"):WaitForChild("ButtonIcons")); local l__InteractButton__4 = v8.MainFrame:WaitForChild("MobileButtons"):WaitForChild("InteractButton"); local u5 = require(script:WaitForChild("Hint")); local l__TweenService__6 = game:GetService("TweenService"); local u7 = nil; local u8 = tick(); local l__Highlight__9 = script:WaitForChild("Highlight"); local u10 = Vector3.new(0, 0, 0); local u11 = nil; function update(p1, p2) task.spawn(function() l__PromptFrame__1.Title.Text = p1.ObjectText; l__PromptFrame__1.Desc.Text = p1.ActionText; l__PromptFrame__1.Key.Text = p1.KeyboardKeyCode.Name; l__PromptFrame__1.Bar.Bar.Size = UDim2.new(0, 0, 1, 0); l__PromptFrame__1.Bar.Bar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Sine", 0.1, true); l__PromptFrame__1.CenterImage.Image = u2.getIcon(p1.ActionText); if p1.ActionText == "Collect" then task.delay(0.2, function() p1:InputHoldBegin(); end); end; local v9 = UDim.new(0.925, 0); if v7() ~= "pc" then l__PromptFrame__1.Key.Visible = false; l__PromptFrame__1.UIScale.Scale = 1.5; if v7() == "console" then l__PromptFrame__1.KeyXbox.Image = u3[p1.GamepadKeyCode.Name]; l__PromptFrame__1.KeyXbox.Visible = true; elseif v7() == "mobile" then l__PromptFrame__1.KeyXbox.Visible = false; end; else l__PromptFrame__1.Key.Visible = true; l__PromptFrame__1.KeyXbox.Visible = false; end; l__InteractButton__4.Icon.Image = l__PromptFrame__1.CenterImage.Image; if p1.ObjectText == "Hint" then local v10 = UDim.new(0.85, 0); l__PromptFrame__1.Key.Text = u5[p1.ActionText]; l__PromptFrame__1.CenterImage.Image = u2.getIcon(p1.ObjectText); end; local v11 = { BackgroundColor3 = Color3.fromRGB(0, 0, 0) }; if p2 == true then l__PromptFrame__1.BackgroundColor3 = Color3.new(0.776471, 0.729412, 0.376471); l__TweenService__6:Create(l__PromptFrame__1, TweenInfo.new(0.15, Enum.EasingStyle.Quart, Enum.EasingDirection.In), v11):Play(); else l__PromptFrame__1.BackgroundColor3 = Color3.new(0.337255, 0.423529, 0.533333); l__TweenService__6:Create(l__PromptFrame__1, TweenInfo.new(0.4, Enum.EasingStyle.Sine, Enum.EasingDirection.In), v11):Play(); end; if 0 < p1.HoldDuration then l__PromptFrame__1.Bar.Visible = true; else l__PromptFrame__1.Bar.Visible = false; end; script.Holding:Stop(); local l__CurrentCamera__12 = workspace.CurrentCamera; local v13 = l__CurrentCamera__12.CFrame.Position; local l__Parent__14 = p1.Parent; local v15 = false; u8 = tick(); if l__Parent__14 then if not l__Parent__14:IsA("BasePart") then if l__Parent__14:IsA("Model") then v13 = l__Parent__14:GetPivot().Position; v15 = true; elseif l__Parent__14:IsA("Attachment") then v13 = l__Parent__14.WorldPosition; end; else v13 = l__Parent__14:GetPivot().Position; v15 = true; end; l__Highlight__9.Adornee = l__Parent__14; l__Highlight__9.Enabled = true; l__PromptFrame__1.Visible = true; l__PromptFrame__1.Position = UDim2.new(0.5, 0, 2, 0); v16 = u10; if v16 then if 7 <= (v16 - v13).Magnitude then v16 = nil; elseif v16 then end; elseif v16 then end; l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 0.9, OutlineTransparency = 0 }):Play(); local v17 = nil; local v18 = nil; if v7() == "mobile" then l__InteractButton__4.Visible = true; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 0.35 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 0 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 0 }):Play(); v17 = l__InteractButton__4.InputBegan:Connect(function() p1:InputHoldBegin(); end); v18 = l__InteractButton__4.InputEnded:Connect(function() p1:InputHoldEnd(); end); end; if not l__Parent__14:IsA("BasePart") then if not l__Parent__14:IsA("Model") then if l__Parent__14:IsA("Attachment") then local v19 = tick(); local v20 = 1 - 1; while true do if p1 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 == u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if l__PromptFrame__1.Visible then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if v15 then local v21 = l__Parent__14:GetPivot().Position; else v21 = l__Parent__14.WorldPosition; end; if v16 then if v16 ~= nil then v21 = v16:Lerp(v21, l__TweenService__6:GetValue((tick() - v19) * 4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out)); end; end; u10 = v13; local v22, v23 = l__CurrentCamera__12:WorldToScreenPoint(v13 - Vector3.new(0, 0.2, 0)); l__PromptFrame__1.Position = UDim2.new(0, math.clamp(v22.X, 80, v8.AbsoluteSize.X - 80), 0, math.clamp(v22.Y, 80, v8.AbsoluteSize.Y - 80)); l__Highlight__9.Adornee = l__Parent__14; l__Highlight__9.Enabled = true; task.wait(); if 0 <= 1 then if v20 < 100000000 then else break; end; elseif 100000000 < v20 then else break; end; v20 = v20 + 1; end; end; else v19 = tick(); v20 = 1 - 1; while true do if p1 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 == u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if l__PromptFrame__1.Visible then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if v15 then v21 = l__Parent__14:GetPivot().Position; else v21 = l__Parent__14.WorldPosition; end; if v16 then if v16 ~= nil then v21 = v16:Lerp(v21, l__TweenService__6:GetValue((tick() - v19) * 4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out)); end; end; u10 = v13; v22, v23 = l__CurrentCamera__12:WorldToScreenPoint(v13 - Vector3.new(0, 0.2, 0)); l__PromptFrame__1.Position = UDim2.new(0, math.clamp(v22.X, 80, v8.AbsoluteSize.X - 80), 0, math.clamp(v22.Y, 80, v8.AbsoluteSize.Y - 80)); l__Highlight__9.Adornee = l__Parent__14; l__Highlight__9.Enabled = true; task.wait(); if 0 <= 1 then if v20 < 100000000 then else break; end; elseif 100000000 < v20 then else break; end; v20 = v20 + 1; end; end; else v19 = tick(); v20 = 1 - 1; while true do if p1 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 == u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if u7 then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if l__PromptFrame__1.Visible then else pcall(function() if v17 then if v18 then v17:Disconnect(); v18:Disconnect(); end; end; end); if u7 == nil then l__TweenService__6:Create(l__Highlight__9, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { FillTransparency = 1, OutlineTransparency = 1 }):Play(); task.wait(0.2); if u7 == nil then if u8 == u8 then l__Highlight__9.Adornee = nil; l__Highlight__9.Enabled = false; l__PromptFrame__1.Visible = false; l__TweenService__6:Create(l__InteractButton__4, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.UIStroke, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { Transparency = 1 }):Play(); l__TweenService__6:Create(l__InteractButton__4.Icon, TweenInfo.new(0.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), { ImageTransparency = 1 }):Play(); end; end; elseif l__PromptFrame__1.Visible then u11 = v13; end; break; end; if v15 then v21 = l__Parent__14:GetPivot().Position; else v21 = l__Parent__14.WorldPosition; end; if v16 then if v16 ~= nil then v21 = v16:Lerp(v21, l__TweenService__6:GetValue((tick() - v19) * 4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out)); end; end; u10 = v13; v22, v23 = l__CurrentCamera__12:WorldToScreenPoint(v13 - Vector3.new(0, 0.2, 0)); l__PromptFrame__1.Position = UDim2.new(0, math.clamp(v22.X, 80, v8.AbsoluteSize.X - 80), 0, math.clamp(v22.Y, 80, v8.AbsoluteSize.Y - 80)); l__Highlight__9.Adornee = l__Parent__14; l__Highlight__9.Enabled = true; task.wait(); if 0 <= 1 then if v20 < 100000000 then else break; end; elseif 100000000 < v20 then else break; end; v20 = v20 + 1; end; end; end; end); end; local u12 = 0; l__ProximityPromptService__5.PromptShown:Connect(function(p3) if p3.Style == Enum.ProximityPromptStyle.Default then return end if p3.ObjectText ~= "Hint" then u7 = p3.Changed:Connect(function() update(p3); end); u12 = u12 + 1; update(p3); script.Notification:Play(); end; end); l__ProximityPromptService__5.PromptHidden:Connect(function(p4) if p4.Style == Enum.ProximityPromptStyle.Default then return end if p4.ObjectText ~= "Hint" then l__PromptFrame__1.Bar.Bar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Sine", 0.1, true); l__PromptFrame__1.Visible = false; pcall(function() u7:Disconnect(); end); u7 = nil; u12 = u12 - 1; end; end); l__ProximityPromptService__5.PromptTriggered:Connect(function(p5) if p5.Style == Enum.ProximityPromptStyle.Default then return end if p5.ObjectText ~= "Hint" then update(p5, true); l__PromptFrame__1.Bar.Bar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Sine", 0.1, true); script.Triggered:Play(); script.Holding:Stop(); l__PromptFrame__1.CenterImage.Position = UDim2.new(0.5, 0, 0.52, 0); l__TweenService__6:Create(l__PromptFrame__1.CenterImage, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0.5, 0), ImageTransparency = 0 }):Play(); end; end); l__ProximityPromptService__5.PromptButtonHoldBegan:Connect(function(p6) if p6.Style == Enum.ProximityPromptStyle.Default then return end if p6.ObjectText ~= "Hint" then update(p6); l__PromptFrame__1.Bar.Bar:TweenSize(UDim2.new(1, 0, 1, 0), "In", "Sine", p6.HoldDuration, true); script.Holding:Play(); l__TweenService__6:Create(l__PromptFrame__1.CenterImage, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0.52, 0), ImageTransparency = 0 }):Play(); end; end); l__ProximityPromptService__5.PromptButtonHoldEnded:Connect(function(p7) if p7.Style == Enum.ProximityPromptStyle.Default then return end if p7.ObjectText ~= "Hint" then update(p7); script.Holding:Stop(); l__TweenService__6:Create(l__PromptFrame__1.CenterImage, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0.5, 0), ImageTransparency = 0 }):Play(); end; end);
-- Creates the collision function to attach to the object
local function setupFallingObjectCollisions(object, damage) -- The collision function; must be declared in this scope as it needs reference to "object" and "damage" params local function onTouch(otherObject) local character = otherObject.Parent local humanoid = character:FindFirstChildWhichIsA("Humanoid") if humanoid then humanoid:TakeDamage(damage) object:Destroy() end end -- Attach the above function to the falling object attachCollisionFunction(object, onTouch) end
--[=[ Constructs a Trove object. ]=]
function Trove.new() local self = setmetatable({}, Trove) self._objects = {} return self end
----- NO EDITING BELOW -----
local weldedParts = {} table.insert(weldedParts,mainPart) function Weld(x, y) local weld = Instance.new("Weld") weld.Part0 = x weld.Part1 = y local CJ = CFrame.new(x.Position) weld.C0 = x.CFrame:inverse() * CJ weld.C1 = y.CFrame:inverse() * CJ weld.Parent = x table.insert(weldedParts,y) end function WeldRec(instance) local childs = instance:GetChildren() for _,v in pairs(childs) do if v:IsA("BasePart") then Weld(mainPart, v) end WeldRec(v) end end WeldRec(P)
-- functions
local function GetSquad(player) for _, squad in pairs(SQUADS:GetChildren()) do if squad.Players:FindFirstChild(player.Name) then return squad end end end
-- if EnabledCamera and EnabledCamera:GetShiftLock() and not EnabledCamera:IsInFirstPerson() then -- if EnabledCamera:GetCameraActualZoom() < 1 then -- local subjectPosition = EnabledCamera.lastSubjectPosition -- if subjectPosition then -- Camera.Focus = CFrame_new(subjectPosition) -- Camera.CFrame = CFrame_new(subjectPosition - MIN_CAMERA_ZOOM*EnabledCamera:GetCameraLook(), subjectPosition) -- end -- end -- end
return newCameraCFrame, desiredCameraFocus end -- Return unchanged values return desiredCameraCFrame, desiredCameraFocus end function Poppercam:OnCameraSubjectChanged(newSubject) self.vehicleParts = {} self.lastPopAmount = 0 if newSubject then -- Determine if we should be popping at all self.popperEnabled = false for _, subjectType in pairs(VALID_SUBJECTS) do if newSubject:IsA(subjectType) then self.popperEnabled = true break end end -- Get all parts of the vehicle the player is controlling if newSubject:IsA('VehicleSeat') then self.vehicleParts = newSubject:GetConnectedParts(true) end if FFlagUserPortraitPopperFix then if newSubject:IsA("BasePart") then self.subjectPart = newSubject elseif newSubject:IsA("Model") then if newSubject.PrimaryPart then self.subjectPart = newSubject.PrimaryPart else -- Model has no PrimaryPart set, just use first BasePart -- we can find as better-than-nothing solution (can still fail) for _, child in pairs(newSubject:GetChildren()) do if child:IsA("BasePart") then self.subjectPart = child break end end end elseif newSubject:IsA("Humanoid") then self.subjectPart = newSubject.RootPart end end end end return Poppercam
--[=[ Constructs a new Brio. ```lua local brio = Brio.new("a", "b") print(brio:GetValue()) --> a b ``` @param ... any -- Brio values @return Brio ]=]
function Brio.new(...) -- Wrap return setmetatable({ _values = table.pack(...); }, Brio) end
-- check if camera is zoomed into first person
local function checkfirstperson() if isfirstperson == false then -- not in first person if ((camera.focus.p - camera.CFrame.p).magnitude <= 1) and (not character:GetAttribute("Ragdoll")) then enableviewmodel() end elseif ((camera.focus.p - camera.CFrame.p).magnitude > 1.1) or character:GetAttribute("Ragdoll") then disableviewmodel() end end
--Kills users even if they have a shield
function module:ExecuteBehaviour(brickTouched, character) if character:FindFirstChild("Humanoid") ~= nil then if character.Humanoid.Health > 0 then character.Humanoid.Health = 0 character:BreakJoints() end end end return module
-------------------- --| Script Logic |-- --------------------
Tool.Equipped:connect(OnEquipped) Tool.Changed:connect(OnChanged) Tool.Unequipped:connect(OnUnequipped)
-- --if Health < ultimavida - configuracao.KODamage then -- -- ACS_Client:SetAttribute("Collapsed",true) -- --end
--// All global vars will be wiped/replaced except script --// All guis are autonamed client.Variables.CodeName..gui.Name
return function(data) local gui = script.Parent.Parent local playergui = service.PlayerGui local str = data.Message local time = data.Time or 15 local log = { Type = "Hint"; Title = "Hint"; Message = str; Icon = "rbxassetid://7501175708"; Time = os.date("%X"); Function = nil; } table.insert(client.Variables.CommunicationsHistory, log) service.Events.CommsPanel:Fire(log) --client.UI.Make("HintHolder") local container = client.UI.Get("HintHolder",nil,true) if not container then local holder = service.New("ScreenGui") local hTable = client.UI.Register(holder) local frame = service.New("ScrollingFrame", holder) client.UI.Prepare(holder) hTable.Name = "HintHolder" frame.Name = "Frame" frame.BackgroundTransparency = 1 frame.Size = UDim2.new(1, 0, 0,150) frame.CanvasSize = UDim2.new(0, 0, 0, 0) frame.ChildAdded:Connect(function(c) if #frame:GetChildren() == 0 then frame.Visible = false else frame.Visible = true end end) frame.ChildRemoved:Connect(function(c) if #frame:GetChildren() == 0 then frame.Visible = false else frame.Visible = true end end) container = hTable hTable:Ready() end container = container.Object.Frame --// First things first account for notif :) local notif = client.UI.Get("Notif") local topbar = client.UI.Get("TopBar") container.Position = UDim2.new(0,0,0,((notif and 30) or 0) + ((topbar and 40) or 0) - 35) local children = container:GetChildren() gui.Position = UDim2.new(0,0,0,-100) gui.Frame.msg.Text = str local bounds = gui.Frame.msg.TextBounds.X local function moveGuis(m,ignore) m = m or 0 local max = #container:GetChildren() for i,v in pairs(container:GetChildren()) do if v~=ignore then local y = (i+m)*28 v.Position = UDim2.new(0,0,0,y) if i~=max then v.Size = UDim2.new(1,0,0,28) end end end end local lom = -1 moveGuis(-1) gui.Parent = container if #container:GetChildren()>5 then lom = -2 end UDim2.new(0,0,0,(#container:GetChildren()+lom)*28) moveGuis(-1) --gui:TweenPosition(UDim2.new(0,0,0,(#container:GetChildren()+lom)*28),nil,nil,0.3,true,function() if gui and gui.Parent then moveGuis(-1) end end) if #container:GetChildren()>5 then local gui = container:GetChildren()[1] moveGuis(-2,gui) gui:Destroy() --gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end) end wait(data.Time or 5) if gui and gui.Parent then moveGuis(-2,gui) gui:Destroy() --gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end) end end
---------------------------------------------------------------------------------------------------- ------------------=[ Status UI ]=------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
,EnableStatusUI = true --- Don't disabled it... ,RunWalkSpeed = 22 ,NormalWalkSpeed = 16 ,SlowPaceWalkSpeed = 8 ,CrouchWalkSpeed = 8 ,ProneWalksSpeed = 4 ,EnableHunger = true --- Hunger and Thirst system ,HungerWaitTime = 25 ,CanDrown = true --- Welp.. That's it ,EnableStamina = true --- Weapon Sway based on stamina ,RunValue = 1 --- Stamina consumption ,StandRecover = .25 --- Stamina recovery while stading ,CrouchRecover = .5 --- Stamina recovery while crouching ,ProneRecover = 1 --- Stamina recovery while lying ,EnableGPS = true --- GPS shows your allies around you ,GPSdistance = 150 ,InteractionMenuKey = Enum.KeyCode.LeftControl
-- [[ SCRIPT ENUMS ]]
local BubbleColor = { WHITE = "dub", BLUE = "blu", GREEN = "gre", RED = "red" }
-- Keyboard controller is really keyboard and mouse controller
local computerInputTypeToModuleMap = { [Enum.UserInputType.Keyboard] = Keyboard, [Enum.UserInputType.MouseButton1] = Keyboard, [Enum.UserInputType.MouseButton2] = Keyboard, [Enum.UserInputType.MouseButton3] = Keyboard, [Enum.UserInputType.MouseWheel] = Keyboard, [Enum.UserInputType.MouseMovement] = Keyboard, [Enum.UserInputType.Gamepad1] = Gamepad, [Enum.UserInputType.Gamepad2] = Gamepad, [Enum.UserInputType.Gamepad3] = Gamepad, [Enum.UserInputType.Gamepad4] = Gamepad, } local lastInputType function ControlModule.new() local self = setmetatable({},ControlModule) -- The Modules above are used to construct controller instances as-needed, and this -- table is a map from Module to the instance created from it self.controllers = {} self.activeControlModule = nil -- Used to prevent unnecessarily expensive checks on each input event self.activeController = nil self.touchJumpController = nil self.moveFunction = Players.LocalPlayer.Move self.humanoid = nil self.lastInputType = Enum.UserInputType.None self.controlsEnabled = true -- For Roblox self.vehicleController self.humanoidSeatedConn = nil self.vehicleController = nil self.touchControlFrame = nil if FFlagUserHideControlsWhenMenuOpen then GuiService.MenuOpened:Connect(function() if self.touchControlFrame and self.touchControlFrame.Visible then self.touchControlFrame.Visible = false end end) GuiService.MenuClosed:Connect(function() if self.touchControlFrame then self.touchControlFrame.Visible = true end end) end self.vehicleController = VehicleController.new(CONTROL_ACTION_PRIORITY) Players.LocalPlayer.CharacterAdded:Connect(function(char) self:OnCharacterAdded(char) end) Players.LocalPlayer.CharacterRemoving:Connect(function(char) self:OnCharacterRemoving(char) end) if Players.LocalPlayer.Character then self:OnCharacterAdded(Players.LocalPlayer.Character) end RunService:BindToRenderStep("ControlScriptRenderstep", Enum.RenderPriority.Input.Value, function(dt) self:OnRenderStepped(dt) end) UserInputService.LastInputTypeChanged:Connect(function(newLastInputType) self:OnLastInputTypeChanged(newLastInputType) end) UserGameSettings:GetPropertyChangedSignal("TouchMovementMode"):Connect(function() self:OnTouchMovementModeChange() end) Players.LocalPlayer:GetPropertyChangedSignal("DevTouchMovementMode"):Connect(function() self:OnTouchMovementModeChange() end) UserGameSettings:GetPropertyChangedSignal("ComputerMovementMode"):Connect(function() self:OnComputerMovementModeChange() end) Players.LocalPlayer:GetPropertyChangedSignal("DevComputerMovementMode"):Connect(function() self:OnComputerMovementModeChange() end) --[[ Touch Device UI ]]-- self.playerGui = nil self.touchGui = nil self.playerGuiAddedConn = nil GuiService:GetPropertyChangedSignal("TouchControlsEnabled"):Connect(function() self:UpdateTouchGuiVisibility() self:UpdateActiveControlModuleEnabled() end) if UserInputService.TouchEnabled then self.playerGui = Players.LocalPlayer:FindFirstChildOfClass("PlayerGui") if self.playerGui then self:CreateTouchGuiContainer() self:OnLastInputTypeChanged(UserInputService:GetLastInputType()) else self.playerGuiAddedConn = Players.LocalPlayer.ChildAdded:Connect(function(child) if child:IsA("PlayerGui") then self.playerGui = child self:CreateTouchGuiContainer() self.playerGuiAddedConn:Disconnect() self.playerGuiAddedConn = nil self:OnLastInputTypeChanged(UserInputService:GetLastInputType()) end end) end else self:OnLastInputTypeChanged(UserInputService:GetLastInputType()) end return self end
--For Omega Rainbow Katana thumbnail to display a lot of particles.
for i, v in pairs(Handle:GetChildren()) do if v:IsA("ParticleEmitter") then v.Rate = 20 end end Tool.Grip = Grips.Up Tool.Enabled = true function IsTeamMate(Player1, Player2) return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor) end function TagHumanoid(humanoid, player) local Creator_Tag = Instance.new("ObjectValue") Creator_Tag.Name = "creator" Creator_Tag.Value = player Debris:AddItem(Creator_Tag, 2) Creator_Tag.Parent = humanoid end function UntagHumanoid(humanoid) for i, v in pairs(humanoid:GetChildren()) do if v:IsA("ObjectValue") and v.Name == "creator" then v:Destroy() end end end function Blow(Hit) if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then return end local RightArm = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand") if not RightArm then return end local RightGrip = RightArm:FindFirstChild("RightGrip") if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then return end local character = Hit.Parent if character == Character then return end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid or humanoid.Health == 0 then return end local player = Players:GetPlayerFromCharacter(character) if player and (player == Player or IsTeamMate(Player, player)) then return end UntagHumanoid(humanoid) TagHumanoid(humanoid, Player) humanoid:TakeDamage(Damage) end function Attack() Damage = DamageValues.SlashDamage Sounds.Slash:Play() if Humanoid then if Humanoid.RigType == Enum.HumanoidRigType.R6 then local Anim = Instance.new("StringValue") Anim.Name = "toolanim" Anim.Value = "Slash" Anim.Parent = Tool elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then local Anim = Tool:FindFirstChild("R15Slash") if Anim then local Track = Humanoid:LoadAnimation(Anim) Track:Play(0) end end end end function Lunge() Damage = DamageValues.LungeDamage Sounds.Lunge:Play() if Humanoid then if Humanoid.RigType == Enum.HumanoidRigType.R6 then local Anim = Instance.new("StringValue") Anim.Name = "toolanim" Anim.Value = "Lunge" Anim.Parent = Tool elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then local Anim = Tool:FindFirstChild("R15Lunge") if Anim then local Track = Humanoid:LoadAnimation(Anim) Track:Play(0) end end end --[[ if CheckIfAlive() then local Force = Instance.new("BodyVelocity") Force.velocity = Vector3.new(0, 10, 0) Force.maxForce = Vector3.new(0, 4000, 0) Debris:AddItem(Force, 0.4) Force.Parent = Torso end ]] wait(0.2) Tool.Grip = Grips.Out wait(0.6) Tool.Grip = Grips.Up Damage = DamageValues.SlashDamage end Tool.Enabled = true LastAttack = 0 function Activated() if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then return end Tool.Enabled = false local Tick = RunService.Stepped:wait() if (Tick - LastAttack < 0.2) then Lunge() else Attack() end LastAttack = Tick --wait(0.5) Damage = DamageValues.BaseDamage local SlashAnim = (Tool:FindFirstChild("R15Slash") or Create("Animation"){ Name = "R15Slash", AnimationId = BaseUrl .. Animations.R15Slash, Parent = Tool }) local LungeAnim = (Tool:FindFirstChild("R15Lunge") or Create("Animation"){ Name = "R15Lunge", AnimationId = BaseUrl .. Animations.R15Lunge, Parent = Tool }) Tool.Enabled = true end function CheckIfAlive() return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent) and true) or false) end function Equipped() Character = Tool.Parent Player = Players:GetPlayerFromCharacter(Character) Humanoid = Character:FindFirstChildOfClass("Humanoid") Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("HumanoidRootPart") if not CheckIfAlive() then return end ToolEquipped = true Sounds.Unsheath:Play() end function Unequipped() Tool.Grip = Grips.Up ToolEquipped = false end Tool.Activated:Connect(Activated) Tool.Equipped:Connect(Equipped) Tool.Unequipped:Connect(Unequipped) Connection = Handle.Touched:Connect(Blow)
---------------- --[[SETTINGS]]-- ----------------
local Color = Color3.new(0.9, 0.95, 1) -- Color of the rain. local DropWidth = 0.05 -- The width of the long shape used for the rain part local DropLength = 2.6 -- The length of the long shape used for the rain part. local EffectRadius = 50 -- Distance around the camera that rain spawns in. local Material = Enum.Material.Glass -- Material of the part that makes the local Rate = 35 -- Snow particles spawned per second local X_SPEED = 0 -- The speed on the world X axis. Use this to create a windy effect. local Z_SPEED = 0 -- Same as above, but for world Z.
-- The version of a package is controlled by a StringValue included as a child -- of the package. This constant controls the name of that StringValue. -- -- Initially we wanted to use Attributes for the version, however Rojo does not -- support syncing Attributes yet. As such, we've opted to go the old fashioned -- way of including a StringValue.
local PACKAGE_VERSION_NAME = "_Version" local PACKAGE_VERSION_OBJECT_MISSING = "%s is missing a %s StringValue at %s" local PACKAGE_VERSION_EMPTY = "%s cannot have an empty value for its version at %s" local ENABLED_SCRIPTS_ERROR = "All scripts included with a DevModule must be Disabled. Please disable the " .. "following script(s): %s" local function log(messageType: string, message: string) if DevModuleInstaller.EnableLogging then print(("[%s] %s"):format(messageType, message)) end end
-- Do not edit these values, they are not the developer-set limits, they are limits -- to the values the camera system equations can correctly handle
local MIN_ALLOWED_ELEVATION_DEG = -80 local MAX_ALLOWED_ELEVATION_DEG = 80 local externalProperties = {} externalProperties["InitialDistance"] = 25 externalProperties["MinDistance"] = 10 externalProperties["MaxDistance"] = 100 externalProperties["InitialElevation"] = 35 externalProperties["MinElevation"] = 35 externalProperties["MaxElevation"] = 35 externalProperties["ReferenceAzimuth"] = -45 -- Angle around the Y axis where the camera starts. -45 offsets the camera in the -X and +Z directions equally externalProperties["CWAzimuthTravel"] = 90 -- How many degrees the camera is allowed to rotate from the reference position, CW as seen from above externalProperties["CCWAzimuthTravel"] = 90 -- How many degrees the camera is allowed to rotate from the reference position, CCW as seen from above externalProperties["UseAzimuthLimits"] = false -- Full rotation around Y axis available by default local Util = require(script.Parent:WaitForChild("CameraUtils"))
--bp.Position = shelly.PrimaryPart.Position
if not shellyGood then bp.Parent,bg.Parent= nil,nil return end bp.Parent = nil wait(math.random(3,8)) end local soundBank = game.ReplicatedStorage.Sounds.NPC.Shelly:GetChildren() shelly.Health.Changed:connect(function() if shellyGood then bp.Parent,bg.Parent= nil,nil shelly.PrimaryPart.Transparency =1 shelly.PrimaryPart.CanCollide = false shelly.Shell.Transparency = 1 shelly.HitShell.Transparency = 0 shelly.HitShell.CanCollide = true shellyGood = false ostrich = tick() shelly:SetPrimaryPartCFrame(shelly.PrimaryPart.CFrame*CFrame.new(0,2,0)) local hitSound = soundBank[math.random(1,#soundBank)]:Clone() hitSound.PlayOnRemove = true hitSound.Parent = shelly.PrimaryPart wait() hitSound:Destroy() repeat wait() until tick()-ostrich > 10 shelly.PrimaryPart.Transparency = 0 shelly.PrimaryPart.CanCollide = true shelly.Shell.Transparency = 0 shelly.HitShell.Transparency = 1 shelly.HitShell.CanCollide = false bp.Parent,bg.Parent = shelly.PrimaryPart,shelly.PrimaryPart shellyGood = true end end) while true do if shellyGood then MoveShelly() else wait(1) end end
--- FUNCTIONS
Fire = function(Player, Key, Data, Client) local CharacterName = Player.Name if Client then Remote:FireClient(Client, CharacterName, Key, Data) else Remote:FireAllClients(CharacterName, Key, Data) end end PlayerAdded = function(Player) for _,GuiItem in pairs(StarterGui:GetChildren()) do GuiItem:Clone().Parent = Player.PlayerGui end Fire(Player, "Init") end PlayerRemoving = function(Player) Fire(Player, "Leaving") end
-- ================================================================================ -- VARIABLES -- ================================================================================ -- Services
local ServerScriptService = game:GetService("ServerScriptService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Checkpoint = require(script.Checkpoint) local Racer = require(script.Racer)
--[[* * Create the message for a syntax error ]]
local function syntaxError(type, char) return ('Missing %s: "%s" - use "\\%s" to match literal characters'):format(type, char, char) end
--Deadzone Adjust
local _PPH = _Tune.Peripherals for i,v in pairs(_PPH) do local a = Instance.new("IntValue",Controls) a.Name = i a.Value = v a.Changed:Connect(function() a.Value=math.min(100,math.max(0,a.Value)) _PPH[i] = a.Value end) end
--[[ script.Parent.Text = "Text" TweenService:Create(script.Parent, Info, {TextTransparency = 0}):Play() wait(5) TweenService:Create(script.Parent, Info, {TextTransparency = 1}):Play() wait(0.5) Use this to add more cycles. ]]
--[[ Enjin | Novena RikOne2 | Avxnturador Bike Chassis *We assume you know what you're doing if you're gonna change something here.* ]]
--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
local path local waypoint local chaseName = nil function GetTorso(part) local chars = game.Workspace:GetChildren() local chaseRoot = nil local chaseTorso = nil local chasePlr = nil local chaseHuman = nil local mag = SearchDistance for i = 1, #chars do chasePlr = chars[i] if chasePlr:IsA'Model' and chasePlr ~= zombie then chaseHuman = getHumanoid(chasePlr) chaseRoot = chasePlr:FindFirstChild'HumanoidRootPart' if chaseRoot ~= nil and chaseHuman ~= nil and chaseHuman.Health > 0 and chaseHuman.Name ~= "Zombie" then if (chaseRoot.Position - part).magnitude < mag then chaseName = chasePlr.Name chaseTorso = chaseRoot mag = (chaseRoot.Position - part).magnitude end end end end return chaseTorso end function GetPlayersBodyParts(t) local torso = t if torso then local figure = torso.Parent for _, v in pairs(figure:GetChildren())do if v:IsA'Part' then return v.Name end end else return "HumanoidRootPart" end end
--[[* * Constants ]]
local MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS = constants.MAX_LENGTH, constants.POSIX_REGEX_SOURCE, constants.REGEX_NON_SPECIAL_CHARS, constants.REGEX_SPECIAL_CHARS_BACKREF, constants.REPLACEMENTS
---------------------------------------------------------------------------------------------------- --------------------=[ OUTROS ]=-------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
,FastReload = true --- Automatically operates the bolt on reload if needed ,SlideLock = true ,MoveBolt = false ,BoltLock = false ,CanBreachDoor = false ,CanBreak = true --- Weapon can jam? ,JamChance = 1000 --- This old piece of brick doesn't work fine >;c ,IncludeChamberedBullet = true --- Include the chambered bullet on next reload ,Chambered = false --- Start with the gun chambered? ,LauncherReady = false --- Start with the GL ready? ,CanCheckMag = true --- You can check the magazine ,ArcadeMode = false --- You can see the bullets left in magazine ,RainbowMode = false --- Operation: Party Time xD ,ModoTreino = false --- Surrender enemies instead of killing them ,GunSize = 4 ,GunFOVReduction = 5 ,BoltExtend = Vector3.new(0, 0, 0.4) ,SlideExtend = Vector3.new(0, 0, 0.4)
-- Function to preload audio assets
AudioPlayer.preloadAudio = function(assetArray) ContentProvider:PreloadAsync(assetArray) end
---------------------------------------------------------------------------- -------- cleans up the opponent's stuff if the player leaves
game.Players.ChildRemoved:connect(function(p) if p == script.Challenger.Value then script.Cleanup.Value:remove() script:remove() end end)
-- This ones for 0celot.
on = 0 Tool = script.Parent welds = {} sh = {} arms = nil torso = nil f = nil function Crouch(ison) if arms == nil and torso == nil then arms = {Tool.Parent:FindFirstChild("Left Leg"), Tool.Parent:FindFirstChild("Right Leg")} torso = Tool.Parent:FindFirstChild("Torso") end if arms ~= nil and torso ~= nil then sh = {torso:FindFirstChild("Left Hip"), torso:FindFirstChild("Right Hip")} if sh ~= nil then local yes = true if yes then yes = false if ison == 1 then sh[1].Part1 = nil sh[2].Part1 = nil local weld1 = Instance.new("Weld") weld1.Part0 = torso weld1.Parent = torso weld1.Part1 = arms[1] weld1.C1 = CFrame.new(0.5, 1, -1) * CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0) --Left leg arms[1].Name = "LDave" arms[1].CanCollide = true welds[1] = weld1