prompt
stringlengths
2
14.7k
completion
stringlengths
1
99.7k
-- << INFO >>
info.m1.Text = "Welcome back, "..main.player.Name.."!" info.Take.MouseButton1Down:Connect(function() main.marketplaceService:PromptPurchase(main.player, 857927023) end) function module:UpdateProfileIcon() info.PlayerImage.Image = cf:GetUserImage(main.player.UserId) end function module:UpdateRankName() info.m2RankName.Text = "'".. cf:GetRankName(main.pdata.Rank).."'" end
--[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]-- --[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]-- --[[end;]]
-- local JeffTheKillerHumanoid; for _,Child in pairs(JeffTheKiller:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then JeffTheKillerHumanoid=Child; end; end; local AttackDebounce=false; local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife"); local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head"); local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart"); local WalkDebounce=false; local Notice=false; local JeffLaughDebounce=false; local MusicDebounce=false; local NoticeDebounce=false; local ChosenMusic; JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0); local OriginalC0=JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0; function FindNearestBae() local NoticeDistance=10000; local TargetMain; for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=JeffTheKiller and TargetModel.Name~=JeffTheKiller.Name and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then local TargetPart=TargetModel:FindFirstChild("Torso"); local FoundHumanoid; for _,Child in pairs(TargetModel:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then FoundHumanoid=Child; end; end; if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then TargetMain=TargetPart; NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude; local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500) if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("Torso")and hit.Parent:FindFirstChild("Head")then if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then Spawn(function() AttackDebounce=true; local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing")); local SwingChoice=math.random(1,2); local HitChoice=math.random(1,3); SwingAnimation:Play(); SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1)); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing"); SwingSound.Pitch=1+(math.random()*0.04); SwingSound:Play(); end; Wait(0.2); if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then FoundHumanoid:TakeDamage(99999); if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3"); HitSound.Pitch=1+(math.random()*0.04); HitSound:Play(); end; end; Wait(0.1); AttackDebounce=false; end); end; end; end; end; end; return TargetMain; end; while Wait(0)do local TargetPoint=JeffTheKillerHumanoid.TargetPoint; local Blockage,BlockagePos=RayCast((JeffTheKillerHumanoidRootPart.CFrame+CFrame.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(TargetPoint.X,JeffTheKillerHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(JeffTheKillerHumanoidRootPart.Size.Z/2)).p,JeffTheKillerHumanoidRootPart.CFrame.lookVector,(JeffTheKillerHumanoidRootPart.Size.Z*2.5),{JeffTheKiller,JeffTheKiller}) local Jumpable=false; if Blockage then Jumpable=true; if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then local BlockageHumanoid; for _,Child in pairs(Blockage.Parent:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then BlockageHumanoid=Child; end; end; if Blockage and Blockage:IsA("Terrain")then local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0))); local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z); if CellMaterial==Enum.CellMaterial.Water then Jumpable=false; end; elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Hat"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Tool"then Jumpable=false; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then JeffTheKillerHumanoid.Jump=true; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHumanoidRootPart and JeffTheKillerHead:FindFirstChild("Jeff_Step")and (JeffTheKillerHumanoidRootPart.Velocity-Vector3.new(0,JeffTheKillerHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then Spawn(function() WalkDebounce=true; local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0)); local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller); if RayTarget then local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone(); JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead; JeffTheKillerHeadFootStepClone:Play(); JeffTheKillerHeadFootStepClone:Destroy(); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then Wait(0.4); elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then Wait(0.15); end end; WalkDebounce=false; end); end; local MainTarget=FindNearestBae(); local FoundHumanoid; if MainTarget then for _,Child in pairs(MainTarget.Parent:GetChildren())do if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then FoundHumanoid=Child; end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then JeffTheKillerHumanoid.Jump=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then if not JeffLaughDebounce then Spawn(function() JeffLaughDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; end; end; if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then local MusicChoice=math.random(1,2); if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1"); elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2"); end; if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then ChosenMusic.Volume=0.5; ChosenMusic:Play(); end; elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then if not MusicDebounce then Spawn(function() MusicDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; end; end; if not MainTarget and not JeffLaughDebounce then Spawn(function() JeffLaughDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0; JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop(); JeffLaughDebounce=false; end); end; if not MainTarget and not MusicDebounce then Spawn(function() MusicDebounce=true; repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0; if ChosenMusic then ChosenMusic.Volume=0; ChosenMusic:Stop(); end; ChosenMusic=nil; MusicDebounce=false; end); end; if MainTarget then Notice=true; if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play(); NoticeDebounce=true; end if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then JeffTheKillerHumanoid.WalkSpeed=30; elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then JeffTheKillerHumanoid.WalkSpeed=0.004; end; JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain")); local NeckRotation=(JeffTheKiller:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10; if NeckRotation>-1.5 and NeckRotation<1.5 then JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0); end; if NeckRotation<-1.5 then JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,-0.993636549,0.112633869,0,0.112633869,0.993636549); elseif NeckRotation>1.5 then JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617); end; else end; else Notice=false; NoticeDebounce=false; JeffTheKiller:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0); local RandomWalk=math.random(1,150); if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then JeffTheKillerHumanoid.WalkSpeed=12; if RandomWalk==1 then JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain")); end; end; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then JeffTheKillerHumanoid.DisplayDistanceType="None"; JeffTheKillerHumanoid.HealthDisplayDistance=0; JeffTheKillerHumanoid.Name="ColdBloodedKiller"; JeffTheKillerHumanoid.NameDisplayDistance=0; JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion"; JeffTheKillerHumanoid.AutoJumpEnabled=true; JeffTheKillerHumanoid.AutoRotate=true; JeffTheKillerHumanoid.MaxHealth=500; JeffTheKillerHumanoid.JumpPower=60; JeffTheKillerHumanoid.MaxSlopeAngle=89.9; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then JeffTheKillerHumanoid.AutoJumpEnabled=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then JeffTheKillerHumanoid.AutoRotate=true; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then JeffTheKillerHumanoid.PlatformStand=false; end; if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then JeffTheKillerHumanoid.Sit=false; end; end;
--Opening Hatch--
script.Parent.Parent.Part1:Remove() script.Parent.Parent.Part2:Remove() wait(1) script.Parent.Parent.Part3:Remove() script.Parent.Parent.Part4:Remove() wait(1) script.Parent.Parent.Part5:Remove() script.Parent.Parent.Part6:Remove()
--[[ Public API ]]
-- function Thumbstick:Enable() ThumbstickFrame.Visible = true local humanoid = MasterControl:GetHumanoid() enableAutoJump(humanoid) end function Thumbstick:Disable() if RevertAutoJumpEnabledToFalse then local humanoid = MasterControl:GetHumanoid() if humanoid then humanoid.AutoJumpEnabled = false end end ThumbstickFrame.Visible = false OnMoveTouchEnded() end function Thumbstick:Create(parentFrame) if ThumbstickFrame then ThumbstickFrame:Destroy() ThumbstickFrame = nil if OnTouchMovedCn then OnTouchMovedCn:disconnect() OnTouchMovedCn = nil end if OnTouchEndedCn then OnTouchEndedCn:disconnect() OnTouchEndedCn = nil end if OnRenderSteppedCn then OnRenderSteppedCn:disconnect() OnRenderSteppedCn = nil end if TouchActivateCn then TouchActivateCn:disconnect() TouchActivateCn = nil end end local ThumbstickSize = 40 local ThumbstickRingSize = 58 local MiddleSize = 13 local MiddleSpacing = MiddleSize + 5 local RadiusOfDeadZone = 2 local RadiusOfMaxSpeed = 50 local screenSize = parentFrame.AbsoluteSize local isBigScreen = math.min(screenSize.x, screenSize.y) > 500 if isBigScreen then ThumbstickSize = ThumbstickSize * 2 ThumbstickRingSize = ThumbstickRingSize * 2 MiddleSize = MiddleSize * 2 MiddleSpacing = MiddleSpacing * 2 RadiusOfDeadZone = RadiusOfDeadZone * 2 RadiusOfMaxSpeed = RadiusOfMaxSpeed * 2 end local color = Color3.fromRGB(255, 255, 255) local function layoutThumbstickFrame(portraitMode) if portraitMode then ThumbstickFrame.Size = UDim2.new(1, 0, .4, 0) ThumbstickFrame.Position = UDim2.new(0, 0, 0.6, 0) else ThumbstickFrame.Size = UDim2.new(1, 0, .5, 18) ThumbstickFrame.Position = UDim2.new(0, 0, 0.5, -18) end end ThumbstickFrame = Instance.new('Frame') ThumbstickFrame.Name = "DynamicThumbstickFrame" ThumbstickFrame.Active = false ThumbstickFrame.Visible = false ThumbstickFrame.BackgroundTransparency = 1.0 ThumbstickFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) layoutThumbstickFrame() StartImage = Instance.new("ImageLabel") StartImage.Name = "ThumbstickStart" StartImage.Visible = false StartImage.BackgroundTransparency = 1 StartImage.Image = IMAGE_RING StartImage.AnchorPoint = Vector2.new(0.5, 0.5) StartImage.Parent = ThumbstickFrame EndImage = Instance.new("ImageLabel") EndImage.Name = "ThumbstickEnd" EndImage.Visible = false EndImage.BackgroundTransparency = 1 EndImage.Image = IMAGE_DISK EndImage.ImageTransparency = 0.20 EndImage.AnchorPoint = Vector2.new(0.5, 0.5) EndImage.Parent = ThumbstickFrame for i = 1, NUM_MIDDLE_IMAGES do MiddleImages[i] = Instance.new("ImageLabel") MiddleImages[i].Name = "ThumbstickMiddle" MiddleImages[i].Visible = false MiddleImages[i].BackgroundTransparency = 1 MiddleImages[i].Image = IMAGE_DISK MiddleImages[i].ImageTransparency = MIDDLE_TRANSPARENCIES[i] MiddleImages[i].AnchorPoint = Vector2.new(0.5, 0.5) MiddleImages[i].Parent = ThumbstickFrame end local CameraChangedConn = nil local function onWorkspaceChanged(property) if property == 'CurrentCamera' then if CameraChangedConn then CameraChangedConn:Disconnect() CameraChangedConn = nil end local newCamera = workspace.CurrentCamera if newCamera then local size = newCamera.ViewportSize local portraitMode = size.X < size.Y layoutThumbstickFrame(portraitMode) CameraChangedConn = newCamera:GetPropertyChangedSignal("ViewportSize"):Connect(function() size = newCamera.ViewportSize portraitMode = size.X < size.Y layoutThumbstickFrame(portraitMode) end) end end end workspace.Changed:Connect(onWorkspaceChanged) if workspace.CurrentCamera then onWorkspaceChanged('CurrentCamera') end local JumpTouchObject = nil local JumpTouchStartTime = nil local JumpTouchStartPosition = nil local MoveTouchObject = nil local MoveTouchStartTime = nil local MoveTouchStartPosition = nil local function doMove(direction) MasterControl:AddToPlayerMovement(-currentMoveVector) currentMoveVector = direction -- Scaled Radial Dead Zone local inputAxisMagnitude = currentMoveVector.magnitude if inputAxisMagnitude < RadiusOfDeadZone then currentMoveVector = Vector3.new() else currentMoveVector = currentMoveVector.unit*(1 - math.max(0, (RadiusOfMaxSpeed - currentMoveVector.magnitude)/RadiusOfMaxSpeed)) currentMoveVector = Vector3.new(currentMoveVector.x, 0, currentMoveVector.y) end MasterControl:AddToPlayerMovement(currentMoveVector) end local TweenInAlphaStart = nil local TweenOutAlphaStart = nil OnRenderSteppedCn = RunService.RenderStepped:Connect(function(step) if TweenInAlphaStart ~= nil then local delta = tick() - TweenInAlphaStart local fadeInTime = (FadeInAndOutHalfDuration * 2 * FadeInAndOutBalance) ThumbstickFrame.BackgroundTransparency = 1 - FadeInAndOutMaxAlpha*math.min(delta/fadeInTime, 1) if delta > fadeInTime then TweenOutAlphaStart = tick() TweenInAlphaStart = nil end elseif TweenOutAlphaStart ~= nil then local delta = tick() - TweenOutAlphaStart local fadeOutTime = (FadeInAndOutHalfDuration * 2) - (FadeInAndOutHalfDuration * 2 * FadeInAndOutBalance) ThumbstickFrame.BackgroundTransparency = 1 - FadeInAndOutMaxAlpha + FadeInAndOutMaxAlpha*math.min(delta/fadeOutTime, 1) if delta > fadeOutTime then TweenOutAlphaStart = nil end end end) local function layoutMiddleImages(startPos, endPos) local startDist = (ThumbstickSize / 2) + MiddleSize local dist = startDist local vector = endPos - startPos local totalDist = vector.magnitude - (ThumbstickSize / 2) - (ThumbstickRingSize / 2) - (MiddleSize / 2) local direction = vector.unit local distNeeded = dist + (MiddleSpacing * NUM_MIDDLE_IMAGES) local spacing = 0 if distNeeded > totalDist then spacing = MiddleSpacing else spacing = totalDist / NUM_MIDDLE_IMAGES end for i = 1, NUM_MIDDLE_IMAGES do local image = MiddleImages[i] local currentDist = startDist + (spacing * (i - 1)) if currentDist < totalDist then local pos = endPos - direction * currentDist image.Visible = true image.Position = UDim2.new(0, pos.X, 0, pos.Y) image.Size = UDim2.new(0, MiddleSize, 0, MiddleSize) else image.Visible = false end end end local function moveStick(pos) local startPos = Vector2.new(MoveTouchStartPosition.X, MoveTouchStartPosition.Y) - ThumbstickFrame.AbsolutePosition local endPos = Vector2.new(pos.X, pos.Y) - ThumbstickFrame.AbsolutePosition local relativePosition = endPos - startPos local length = relativePosition.magnitude local maxLength = ThumbstickFrame.AbsoluteSize.X length = math.min(length, maxLength) relativePosition = relativePosition*length EndImage.Position = UDim2.new(0, endPos.X, 0, endPos.Y) EndImage.Size = UDim2.new(0, ThumbstickSize, 0, ThumbstickSize) layoutMiddleImages(startPos, endPos) end -- input connections ThumbstickFrame.InputBegan:connect(function(inputObject) if inputObject.UserInputType ~= Enum.UserInputType.Touch or inputObject.UserInputState ~= Enum.UserInputState.Begin then return end if MoveTouchObject then if not JumpTouchObject then JumpTouchObject = inputObject JumpTouchStartTime = tick() JumpTouchStartPosition = inputObject.Position end return end MoveTouchObject = inputObject MoveTouchStartTime = tick() MoveTouchStartPosition = inputObject.Position local startPosVec2 = Vector2.new(inputObject.Position.X - ThumbstickFrame.AbsolutePosition.X, inputObject.Position.Y - ThumbstickFrame.AbsolutePosition.Y) StartImage.Visible = true StartImage.Position = UDim2.new(0, startPosVec2.X, 0, startPosVec2.Y) StartImage.Size = UDim2.new(0, ThumbstickRingSize, 0, ThumbstickRingSize) EndImage.Visible = true EndImage.Position = StartImage.Position EndImage.Size = UDim2.new(0, ThumbstickSize, 0, ThumbstickSize) if FadeInAndOutBackground then local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") local hasFadedBackgroundInOrientation = false -- only fade in/out the background once per orientation if playerGui then if playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeLeft or playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeRight then hasFadedBackgroundInOrientation = HasFadedBackgroundInLandscape HasFadedBackgroundInLandscape = true elseif playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.Portrait then hasFadedBackgroundInOrientation = HasFadedBackgroundInPortrait HasFadedBackgroundInPortrait = true end end if not hasFadedBackgroundInOrientation then FadeInAndOutHalfDuration = FADE_IN_OUT_HALF_DURATION_DEFAULT FadeInAndOutBalance = FADE_IN_OUT_BALANCE_DEFAULT TweenInAlphaStart = tick() end end end) OnTouchMovedCn = UserInputService.TouchMoved:connect(function(inputObject, isProcessed) if inputObject == MoveTouchObject then local direction = Vector2.new(inputObject.Position.x - MoveTouchStartPosition.x, inputObject.Position.y - MoveTouchStartPosition.y) if math.abs(direction.x) > 0 or math.abs(direction.y) > 0 then doMove(direction) moveStick(inputObject.Position) end end end) OnMoveTouchEnded = function() StartImage.Visible = false EndImage.Visible = false for i = 1, NUM_MIDDLE_IMAGES do MiddleImages[i].Visible = false end MoveTouchObject = nil MasterControl:AddToPlayerMovement(-currentMoveVector) currentMoveVector = Vector3.new(0,0,0) end --todo: remove this pcall when TouchTapInWorld is on for all platforms local success = pcall(function() local function positionIntersectsGuiObject(position, guiObject) if position.X < guiObject.AbsolutePosition.X + guiObject.AbsoluteSize.X and position.X > guiObject.AbsolutePosition.X and position.Y < guiObject.AbsolutePosition.Y + guiObject.AbsoluteSize.Y and position.Y > guiObject.AbsolutePosition.Y then return true end return false end TouchActivateCn = UserInputService.TouchTapInWorld:connect(function(touchPos, processed) if not processed and not IsAToolEquipped and positionIntersectsGuiObject(touchPos, ThumbstickFrame) then MasterControl:DoJump() end end) end) if not success then local function JumpIfTouchIsTap(startTime, startPosition, position) if (not IsAToolEquipped) and tick() - startTime < TOUCH_IS_TAP_TIME_THRESHOLD then if (position - startPosition).magnitude < TOUCH_IS_TAP_DISTANCE_THRESHOLD then MasterControl:DoJump() end end end OnTouchEndedCn = UserInputService.TouchEnded:connect(function(inputObject, isProcessed) if inputObject == MoveTouchObject then JumpIfTouchIsTap(MoveTouchStartTime, MoveTouchStartPosition, inputObject.Position) OnMoveTouchEnded() elseif inputObject == JumpTouchObject then JumpIfTouchIsTap(JumpTouchStartTime, JumpTouchStartPosition, inputObject.Position) JumpTouchObject = nil end end) else OnTouchEndedCn = UserInputService.TouchEnded:connect(function(inputObject, isProcessed) if inputObject == MoveTouchObject then OnMoveTouchEnded() elseif inputObject == JumpTouchObject then JumpTouchObject = nil end end) end GuiService.MenuOpened:connect(function() if MoveTouchObject then OnMoveTouchEnded() end if JumpTouchObject then JumpTouchObject = nil end end) local playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") while not playerGui do LocalPlayer.ChildAdded:wait() playerGui = LocalPlayer:FindFirstChildOfClass("PlayerGui") end local playerGuiChangedConn = nil local originalScreenOrientationWasLandscape = playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeLeft or playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.LandscapeRight local function longShowBackground() FadeInAndOutHalfDuration = 2.5 FadeInAndOutBalance = 0.05 TweenInAlphaStart = tick() end playerGuiChangedConn = playerGui.Changed:connect(function(prop) if prop == "CurrentScreenOrientation" then if (originalScreenOrientationWasLandscape and playerGui.CurrentScreenOrientation == Enum.ScreenOrientation.Portrait) or (not originalScreenOrientationWasLandscape and playerGui.CurrentScreenOrientation ~= Enum.ScreenOrientation.Portrait) then playerGuiChangedConn:disconnect() longShowBackground() if originalScreenOrientationWasLandscape then HasFadedBackgroundInPortrait = true else HasFadedBackgroundInLandscape = true end end end end) ThumbstickFrame.Parent = parentFrame spawn(function() if game:IsLoaded() then longShowBackground() else game.Loaded:wait() longShowBackground() end end) end return Thumbstick
--[[ LEMBRANDO QUE esse module não está 100% pronto para usar, pois você caso as funções sejam chamadas várias vezes, ele irá bugar. Faça alguma forma de evitar isso, pois a ideia do module é apenas de dar as base das funções que envolvem uma parte mais "complexa"! ]]
local module = {} local TweenService = game:GetService("TweenService") local Sufixes = {'K','M','B','T','qd','Qn','sx','Sp','O','N','de','Ud','DD','tdD','qdD','QnD','sxD','SpD','OcD','NvD','Vgn','UVg','DVg','TVg','qtV','QnV','SeV','SPG','OVG','NVG','TGN','UTG','DTG','tsTG','qtTG','QnTG','ssTG','SpTG','OcTG','NoAG','UnAG','DuAG','TeAG','QdAG','QnAG','SxAG','SpAG','OcAG','NvAG','CT'} local digitsProgression = 3 local defaultInfo = { Duration = .7, EasingStyle = Enum.EasingStyle.Exponential, EasingDirection = Enum.EasingDirection.Out } function module.formatNumber(number) local digits = math.floor(math.log10(math.abs(number))) local level = math.floor(digits/digitsProgression) if level >= 1 then level = math.clamp(level, 1, #Sufixes) local sufix = Sufixes[level] local divNumber = number / (10^digits) return string.format("%.2f %s", divNumber, sufix) end return string.format("%.2f", number) end function module.updateNumber(Label, oldValue, newValue, Info) Info = typeof(Info) == table and Info or defaultInfo local diference = newValue - oldValue local startTick = tick() local endTick = startTick + Info.Duration repeat local currentTick = tick() local tickRatio = (currentTick-startTick)/(endTick-startTick) local tweenMultiplier = TweenService:GetValue(tickRatio, Info.EasingStyle, Info.EasingDirection) local nextNumber = oldValue + diference*tweenMultiplier Label.Text = module.formatNumber(nextNumber) task.wait() until tick() >= endTick Label.Text = module.formatNumber(newValue) end return module
--[[ The Module ]]
-- local VRBaseCamera = require(script.Parent:WaitForChild("VRBaseCamera")) local VRCamera = setmetatable({}, VRBaseCamera) VRCamera.__index = VRCamera function VRCamera.new() local self = setmetatable(VRBaseCamera.new(), VRCamera) self.lastUpdate = tick() self:Reset() return self end function VRCamera:Reset() self.needsReset = true self.needsBlackout = true self.motionDetTime = 0.0 self.blackOutTimer = 0 self.lastCameraResetPosition = nil self.stepRotateTimeout = 0.0 self.cameraOffsetRotation = 0 self.cameraOffsetRotationDiscrete = 0 end function VRCamera:Update(timeDelta) local camera = workspace.CurrentCamera local newCameraCFrame = camera.CFrame local newCameraFocus = camera.Focus local player = PlayersService.LocalPlayer local humanoid = self:GetHumanoid() local cameraSubject = camera.CameraSubject if self.lastUpdate == nil or timeDelta > 1 then self.lastCameraTransform = nil end -- update fullscreen effects self:UpdateFadeFromBlack(timeDelta) self:UpdateEdgeBlur(player, timeDelta) local lastSubjPos = self.lastSubjectPosition local subjectPosition: Vector3 = self:GetSubjectPosition() -- transition from another camera or from spawn if self.needsBlackout then self:StartFadeFromBlack() local dt = math.clamp(timeDelta, 0.0001, 0.1) self.blackOutTimer += dt if self.blackOutTimer > CAMERA_BLACKOUT_TIME and game:IsLoaded() then self.needsBlackout = false self.needsReset = true end end if subjectPosition and player and camera then newCameraFocus = self:GetVRFocus(subjectPosition, timeDelta) if self:IsInFirstPerson() then -- update camera CFrame newCameraCFrame, newCameraFocus = self:UpdateFirstPersonTransform( timeDelta,newCameraCFrame, newCameraFocus, lastSubjPos, subjectPosition) else -- 3rd person -- update camera CFrame newCameraCFrame, newCameraFocus = self:UpdateThirdPersonTransform( timeDelta, newCameraCFrame, newCameraFocus, lastSubjPos, subjectPosition) end self.lastCameraTransform = newCameraCFrame self.lastCameraFocus = newCameraFocus end self.lastUpdate = tick() return newCameraCFrame, newCameraFocus end
-------- OMG HAX
r = game:service("RunService") local damage = 5 local slash_damage = 12 local lunge_damage = 35 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" SlashSound.Parent = sword SlashSound.Volume = .7 local LungeSound = Instance.new("Sound") LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav" LungeSound.Parent = sword LungeSound.Volume = .6 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function lunge() damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = Tool force = Instance.new("BodyVelocity") force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 force.Parent = Tool.Parent.Torso wait(.25) swordOut() wait(.25) force.Parent = nil wait(.5) swordUp() damage = slash_damage end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end function swordAcross() -- parry end Tool.Enabled = true local last_attack = 0 function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end t = r.Stepped:wait() if (t - last_attack < .2) then lunge() else attack() end last_attack = t --wait(.5) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow)
-------------------------------------------------------------------------------- -- Fast Signal-like class -- -- This is a Signal class that is implemented in the most performant way -- -- possible, sacrificing correctness. The event handlers will be called -- -- directly, so it is not safe to yield in them, and it is also not safe to -- -- connect new handlers in the middle of a handler (though it is still safe -- -- for a handler to specifically disconnect itself) -- --------------------------------------------------------------------------------
local Signal = {} Signal.__index = Signal local Connection = {} Connection.__index = Connection function Connection.new(signal, handler) return setmetatable({ _handler = handler, _signal = signal, }, Connection) end function Connection:Disconnect() self._signal[self] = nil end function Signal.new() return setmetatable({}, Signal) end function Signal:Connect(fn) local connection = Connection.new(self, fn) self[connection] = true return connection end function Signal:DisconnectAll() table.clear(self) end function Signal:Fire(...) if next(self) then for handler, _ in pairs(self) do handler._handler(...) end end end function Signal:Wait() local waitingCoroutine = coroutine.running() local cn; cn = self:Connect(function(...) cn:Disconnect() task.spawn(waitingCoroutine, ...) end) return coroutine.yield() end function Signal:Once(fn) local cn; cn = self:Connect(function(...) cn:Disconnect() fn(...) end) return cn end return Signal
--
script.Parent.Handle3.Hinge1.Transparency = 1 script.Parent.Handle3.Interactive1.Transparency = 1 script.Parent.Handle3.Part1.Transparency = 1 wait(0.06) end script.Parent.Push.ClickDetector.MouseClick:connect(toiletHandle)
--[[Functions]]
-- function getRaycastIgnoreList() local ignoreList = {}; for _, v in next, workspace:GetDescendants() do if v:IsA("BasePart") and not v.CanCollide or v:FindFirstChildOfClass("Humanoid") then table.insert(ignoreList, v); end end raycastParams.FilterDescendantsInstances = ignoreList; workspace.DescendantAdded:Connect(function(desc) if desc:IsA("BasePart") and not desc.CanCollide or desc:FindFirstChildOfClass("Humanoid") then table.insert(ignoreList, desc); raycastParams.FilterDescendantsInstances = ignoreList; end end) end getRaycastIgnoreList(); function detectNoclip() : boolean --Returns true if there is a part between the player's current position and last recorded position local origin : Vector3 = lastValidCF.Position; local hrpPos : Vector3 = hrp.Position; local dist : number = (origin - hrpPos).Magnitude; local direction : Vector3 = (hrpPos - origin).Unit * dist; return workspace:Raycast(origin, direction, raycastParams) ~= nil; end function onDescAddedToChar(desc) if desc:IsA("BodyVelocity") then table.insert(velocityModifiers, desc); end end char.DescendantAdded:Connect(onDescAddedToChar); function computeVelocityModifiers() : number --Returns the magnitude of all body velocities acting on the player local moddedVelocity = 0; for i, v in next, velocityModifiers do if v and v:IsDescendantOf(char) then moddedVelocity += v.Velocity.Magnitude; else table.remove(velocityModifiers, i); end end return moddedVelocity; end function detectSpeed() : boolean local vel : Vector3 = hrp.AssemblyLinearVelocity; local horizontalVel : Vector2 = Vector2.new(vel.X, vel.Z); local speed : number = horizontalVel.Magnitude; local maxAcceptableSpeed = hum.WalkSpeed + 5 + computeVelocityModifiers(); return speed > maxAcceptableSpeed; end function main() local isNoclipping = detectNoclip(); local isSpeeding = detectSpeed(); --print(isNoclipping, isSpeeding); if isNoclipping or isSpeeding then hrp.AssemblyLinearVelocity = Vector3.new(); char:SetPrimaryPartCFrame(lastValidCF * CFrame.new(0, 2 + hum.HipHeight, 0)); --In my tests without this offset, the script would place anyone caught by this in the floor and infinitely --flag them for no-clipping. else lastValidCF = hrp.CFrame; end task.wait(0.1); end while true do main(); end
--[[ Package link auto-generated by Rotriever ]]
local PackageIndex = script.Parent.Parent.Parent._Index local Package = require(PackageIndex["JestReporters"]["JestReporters"]) export type BaseReporter = Package.BaseReporter export type DefaultReporter = Package.DefaultReporter export type SummaryReporter = Package.SummaryReporter export type VerboseReporter = Package.VerboseReporter export type Context = Package.Context export type Reporter = Package.Reporter export type ReporterOnStartOptions = Package.ReporterOnStartOptions export type SummaryOptions = Package.SummaryOptions export type Test = Package.Test return Package
--// Hash: ecae6307170caafeaefa357ea4633b920b73ffa90c901cc069d3cf83cec79e3c6ae301cfab199d30e86fff307f53efc3 -- Decompiled with the Synapse X Luau decompiler.
return function(p1) local v1 = p1; while true do local v2, v3 = string.gsub(v1, "^(-?%d+)(%d%d%d)", "%1,%2"); k = v3; v1 = v2; if k == 0 then break; end; end; return v1; end;
--!nonstrict --[[ TouchThumbstick --]]
local Players = game:GetService("Players") local GuiService = game:GetService("GuiService") local UserInputService = game:GetService("UserInputService")
---Explosive Settings---
elseif Settings.Mode == "Explosive" and Settings.FireModes.Semi == true then Gui.FText.Text = "Semi" Settings.Mode = "Semi" elseif Settings.Mode == "Explosive" and Settings.FireModes.Semi == false and Settings.FireModes.Burst == true then Gui.FText.Text = "Burst" Settings.Mode = "Burst" elseif Settings.Mode == "Explosive" and Settings.FireModes.Semi == false and Settings.FireModes.Burst == false and Settings.FireModes.Auto == true then Gui.FText.Text = "Auto" Settings.Mode = "Auto" end Update_Gui() end if (key == "t") and Equipped and (not NVG or ArmaClone.AimPart:FindFirstChild("NVAim") == nil) and not Reloading then if Aiming then if ArmaClone:FindFirstChild("AimPart2") ~= nil then if AimPartMode == 1 then AimPartMode = 2 tweenFoV(Settings.ChangeFOV[2],120) if Settings.FocusOnSight2 and Aiming then TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus2Distance}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play() else TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() end if Settings.adsMesh2 then for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "REG" then TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play() end end end for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "ADS" then TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play() end end end else for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "REG" then TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play() end end end for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "ADS" then TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play() end end end end if Settings.ZoomAnim then ZoomAnim() Sprint() end elseif AimPartMode == 2 then AimPartMode = 1 tweenFoV(Settings.ChangeFOV[1],120) if Settings.FocusOnSight and Aiming then TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus1Distance}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play() else TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() end if Settings.adsMesh1 then for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "REG" then TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play() end end end for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "ADS" then TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play() end end end else for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "REG" then TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play() end end end for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "ADS" then TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play() end end end end if Settings.ZoomAnim then UnZoomAnim() Sprint() end end else if AimPartMode == 1 then AimPartMode = 2 tweenFoV(Settings.ChangeFOV[2], 120) if Settings.FocusOnSight2 and Aiming then TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus2Distance}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play() else TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() end if Settings.adsMesh2 then for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "REG" then TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play() end end end for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "ADS" then TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play() end end end else for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "REG" then TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play() end end end for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "ADS" then TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play() end end end end if Settings.ZoomAnim then ZoomAnim() Sprint() end elseif AimPartMode == 2 then AimPartMode = 1 tweenFoV(Settings.ChangeFOV[1], 120) if Settings.FocusOnSight and Aiming then TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus1Distance}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play() else TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() end if Settings.adsMesh1 then for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "REG" then TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play() end end end for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "ADS" then TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play() end end end else for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "REG" then TS:Create(v, TweenInfo.new(0), {Transparency = 0}):Play() end end end for _,v in pairs(ArmaClone:GetDescendants()) do if v:IsA('MeshPart') or v:IsA('Part') or v:IsA('UnionOperation') then if v.Name == "ADS" then TS:Create(v, TweenInfo.new(0), {Transparency = 1}):Play() end end end end if Settings.ZoomAnim then UnZoomAnim() Sprint() end end end else if AimPartMode == 1 then AimPartMode = 2 if Settings.FocusOnSight2 and Aiming then TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus2Distance}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play() else TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() end if Settings.ZoomAnim then ZoomAnim() Sprint() end elseif AimPartMode == 2 then AimPartMode = 1 if Settings.FocusOnSight and Aiming then TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = Settings.Focus1Distance}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play() else TS:Create(game.Lighting.DepthOfField, TweenInfo.new(0.3), {FocusDistance = 0}):Play() --TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() end if Settings.ZoomAnim then UnZoomAnim() Sprint() end end end end if (key == "[") and Equipped then if Zeroing.Value > Zeroing.MinValue then Zeroing.Value = Zeroing.Value - 50 ArmaClone.Handle.Click:play() Update_Gui() end end if (key == "]" ) and Equipped then if Zeroing.Value < Zeroing.MaxValue then Zeroing.Value = Zeroing.Value + 50 ArmaClone.Handle.Click:play() Update_Gui() end end if (key == "r") and Equipped and stance > -2 then CancelReload = false if StoredAmmo.Value > 0 and Settings.Mode ~= "Explosive" and not Reloading and Settings.ReloadType == 1 then if Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo + 1 or not Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo and Chambered.Value == true then return end MouseHeld = false Can_Shoot = false Reloading = true if Safe then Safe = false stance = 0 Evt.Stance:FireServer(stance,Settings,Anims) IdleAnim() Update_Gui() wait(.25) end ReloadAnim() if Chambered.Value == false and slideback == true and Settings.FastReload == true then ChamberBKAnim() elseif Chambered.Value == false and slideback == false and Settings.FastReload == true then ChamberAnim() end Sprint() Update_Gui() Can_Shoot = true Reloading = false elseif StoredAmmo.Value > 0 and Settings.Mode ~= "Explosive" and not Reloading and Settings.ReloadType == 2 then if Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo + 1 or not Settings.IncludeChamberedBullet and Ammo.Value == Settings.Ammo and Chambered.Value == true or CancelReload then Sprint() Update_Gui() return end MouseHeld = false Can_Shoot = false Reloading = true if Safe then Safe = false stance = 0 Evt.Stance:FireServer(stance) Sprint() Update_Gui() wait(.25) end for i = 1,Settings.Ammo - Ammo.Value do if StoredAmmo.Value > 0 and not CancelReload and Ammo.Value < Settings.Ammo and not AnimDebounce then ShellInsertAnim() end end if Chambered.Value == false and slideback == true and Settings.FastReload == true then ChamberBKAnim() elseif Chambered.Value == false and slideback == false and Settings.FastReload == true then ChamberAnim() end Update_Gui() Sprint() CancelReload = false Can_Shoot = true Reloading = false elseif StoredAmmo.Value > 0 and Settings.Mode ~= "Explosive" and Reloading and Settings.ReloadType == 2 and AnimDebounce then if not CancelReload then CancelReload = true Sprint() Update_Gui() wait(.25) end elseif not Reloading and GLAmmo.Value > 0 and Settings.Mode == "Explosive" and GLChambered.Value == false then MouseHeld = false Can_Shoot = false Reloading = true GLReloadAnim() GLChambered.Value = true Sprint() Update_Gui() Can_Shoot = true Reloading = false end end if (key == "f") and Equipped and not Reloading and stance > -2 then MouseHeld = false Can_Shoot = false Reloading = true if Safe then Safe = false stance = 0 Evt.Stance:FireServer(stance,Settings,Anims) IdleAnim() Update_Gui() --wait(.25) end if not slideback then ChamberAnim() else ChamberBKAnim() end Sprint() Update_Gui() Can_Shoot = true Reloading = false end if (key == "m") and Equipped and Settings.CanCheckMag and not Reloading and stance > -2 then MouseHeld = false Can_Shoot = false Reloading = true if Safe then Safe = false stance = 0 Evt.Stance:FireServer(stance,Settings,Anims) IdleAnim() Update_Gui() --wait(.25) end CheckAnim() Sprint() Update_Gui() Can_Shoot = true Reloading = false end if (key == "h") and Equipped and ArmaClone:FindFirstChild("LaserPoint") then if ServerConfig.RealisticLaser and ArmaClone.LaserPoint:FindFirstChild("IR") ~= nil then if not LaserAtivo and not IRmode then LaserAtivo = not LaserAtivo IRmode = not IRmode if LaserAtivo then Evt.SVLaser:FireServer(Vector3.new(0,0,0),1,ArmaClone.LaserPoint.Color,ArmaClient) Pointer = Instance.new('Part') Pointer.Shape = 'Ball' Pointer.Size = Vector3.new(0.2, 0.2, 0.2) Pointer.Parent = ArmaClone.LaserPoint Pointer.CanCollide = false Pointer.Color = ArmaClone.LaserPoint.Color Pointer.Material = Enum.Material.Neon if ArmaClone.LaserPoint:FindFirstChild("IR") ~= nil then Pointer.Transparency = 1 end LaserSP = Instance.new('Attachment') LaserSP.Parent = ArmaClone.LaserPoint LaserEP = Instance.new('Attachment') LaserEP.Parent = ArmaClone.LaserPoint Laser = Instance.new('Beam') Laser.Parent = ArmaClone.LaserPoint Laser.Transparency = NumberSequence.new(0) Laser.LightEmission = 1 Laser.LightInfluence = 0 Laser.Attachment0 = LaserSP Laser.Attachment1 = LaserEP Laser.Color = ColorSequence.new(ArmaClone.LaserPoint.Color,IRmode) Laser.FaceCamera = true Laser.Width0 = 0.01 Laser.Width1 = 0.01 if ServerConfig.RealisticLaser then Laser.Enabled = false end else Evt.SVLaser:FireServer(Vector3.new(0,0,0),2,nil,ArmaClient,IRmode) Pointer:Destroy() LaserSP:Destroy() LaserEP:Destroy() Laser:Destroy() end elseif LaserAtivo and IRmode then IRmode = not IRmode elseif LaserAtivo and not IRmode then LaserAtivo = not LaserAtivo if LaserAtivo then Evt.SVLaser:FireServer(Vector3.new(0,0,0),1,ArmaClone.LaserPoint.Color,ArmaClient) Pointer = Instance.new('Part') Pointer.Shape = 'Ball' Pointer.Size = Vector3.new(0.2, 0.2, 0.2) Pointer.Parent = ArmaClone.LaserPoint Pointer.CanCollide = false Pointer.Color = ArmaClone.LaserPoint.Color Pointer.Material = Enum.Material.Neon if ArmaClone.LaserPoint:FindFirstChild("IR") ~= nil then Pointer.Transparency = 1 end LaserSP = Instance.new('Attachment') LaserSP.Parent = ArmaClone.LaserPoint LaserEP = Instance.new('Attachment') LaserEP.Parent = ArmaClone.LaserPoint Laser = Instance.new('Beam') Laser.Parent = ArmaClone.LaserPoint Laser.Transparency = NumberSequence.new(0) Laser.LightEmission = 1 Laser.LightInfluence = 0 Laser.Attachment0 = LaserSP Laser.Attachment1 = LaserEP Laser.Color = ColorSequence.new(ArmaClone.LaserPoint.Color,IRmode) Laser.FaceCamera = true Laser.Width0 = 0.01 Laser.Width1 = 0.01 if ServerConfig.RealisticLaser then Laser.Enabled = false end else Evt.SVLaser:FireServer(Vector3.new(0,0,0),2,nil,ArmaClient,IRmode) Pointer:Destroy() LaserSP:Destroy() LaserEP:Destroy() Laser:Destroy() end end else LaserAtivo = not LaserAtivo if LaserAtivo then Evt.SVLaser:FireServer(Vector3.new(0,0,0),1,ArmaClone.LaserPoint.Color,ArmaClient) Pointer = Instance.new('Part') Pointer.Shape = 'Ball' Pointer.Size = Vector3.new(0.2, 0.2, 0.2) Pointer.Parent = ArmaClone.LaserPoint Pointer.CanCollide = false Pointer.Color = ArmaClone.LaserPoint.Color Pointer.Material = Enum.Material.Neon if ArmaClone.LaserPoint:FindFirstChild("IR") ~= nil then Pointer.Transparency = 1 end LaserSP = Instance.new('Attachment') LaserSP.Parent = ArmaClone.LaserPoint LaserEP = Instance.new('Attachment') LaserEP.Parent = ArmaClone.LaserPoint Laser = Instance.new('Beam') Laser.Parent = ArmaClone.LaserPoint Laser.Transparency = NumberSequence.new(0) Laser.LightEmission = 1 Laser.LightInfluence = 0 Laser.Attachment0 = LaserSP Laser.Attachment1 = LaserEP Laser.Color = ColorSequence.new(ArmaClone.LaserPoint.Color,IRmode) Laser.FaceCamera = true Laser.Width0 = 0.01 Laser.Width1 = 0.01 if ServerConfig.RealisticLaser then Laser.Enabled = false end else Evt.SVLaser:FireServer(Vector3.new(0,0,0),2,nil,ArmaClient,IRmode) Pointer:Destroy() LaserSP:Destroy() LaserEP:Destroy() Laser:Destroy() end end ArmaClone.Handle.Click:play() end if (key == "j") and Equipped and ArmaClone:FindFirstChild("FlashPoint") then LanternaAtiva = not LanternaAtiva ArmaClone.Handle.Click:play() if LanternaAtiva then Evt.SVFlash:FireServer(true,ArmaClient,ArmaClone.FlashPoint.Light.Angle,ArmaClone.FlashPoint.Light.Brightness,ArmaClone.FlashPoint.Light.Color,ArmaClone.FlashPoint.Light.Range) ArmaClone.FlashPoint.Light.Enabled = true else Evt.SVFlash:FireServer(false,ArmaClient,nil,nil,nil,nil) ArmaClone.FlashPoint.Light.Enabled = false end end if (key == "u") and Equipped and ArmaClone:FindFirstChild("Silenciador") then Silencer.Value = not Silencer.Value ArmaClone.Handle.Click:play() if Silencer.Value == true then ArmaClone.Silenciador.Transparency = 0 ArmaClone.SmokePart.FlashFX.Brightness = 0 ArmaClone.SmokePart:FindFirstChild("FlashFX[Flash]").Rate = 0 Evt.SilencerEquip:FireServer(ArmaClient,Silencer.Value) else ArmaClone.Silenciador.Transparency = 1 ArmaClone.SmokePart.FlashFX.Brightness = 5 ArmaClone.SmokePart:FindFirstChild("FlashFX[Flash]").Rate = 1000 Evt.SilencerEquip:FireServer(ArmaClient,Silencer.Value) end end if (key == "b") and Equipped and BipodEnabled and ArmaClone:FindFirstChild("BipodPoint") then Bipod = not Bipod if Bipod == true then if ArmaClone.BipodPoint:FindFirstChild("BipodDeploy") ~= nil then ArmaClone.BipodPoint.BipodDeploy:play() end else if ArmaClone.BipodPoint:FindFirstChild("BipodRetract") ~= nil then ArmaClone.BipodPoint.BipodRetract:play() end end end if (key == "n") and Laserdebounce == false then if Player.Character then local helmet = Player.Character:FindFirstChild("Helmet") if helmet then local nvg = helmet:FindFirstChild("Up") if nvg then Laserdebounce = true delay(.8,function() NVG = not NVG if Aiming and ArmaClone.AimPart:FindFirstChild("NVAim") ~= nil then if NVG then tweenFoV(70,120) TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() else if AimPartMode == 1 then tweenFoV(Settings.ChangeFOV[1],120) if Settings.FocusOnSight then TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play() else TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() end elseif AimPartMode == 2 then tweenFoV(Settings.ChangeFOV[2],120) if Settings.FocusOnSight2 then TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.75),{ImageTransparency = 0}):Play() else TS:Create(StatusClone.Efeitos.Aim,TweenInfo.new(.3),{ImageTransparency = 1}):Play() end end end end Laserdebounce = false end) end end end end end)
--[=[ Cleans up all objects in the trove. This is similar to calling `Remove` on each object within the trove. ]=]
function Trove:Clean() for _,obj in ipairs(self._objects) do self:_cleanupObject(obj[1], obj[2]) end table.clear(self._objects) end function Trove:_cleanupObject(object, cleanupMethod) if cleanupMethod == FN_MARKER then object() else object[cleanupMethod](object) end end
--[[Engine]]
--Torque Curve Tune.Horsepower = 350 -- [TORQUE CURVE VISUAL] Tune.IdleRPM = 800 -- https://www.desmos.com/calculator/2uo3hqwdhf Tune.PeakRPM = 6300 -- Use sliders to manipulate values Tune.Redline = 6700 -- Copy and paste slider values into the respective tune values Tune.EqPoint = 5250 Tune.PeakSharpness = 7.5 Tune.CurveMult = 0.195 --Incline Compensation Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response)
--[=[ Returns a list of alive Brios only @param brios {Brio<T>} @return {Brio<T>} ]=]
function BrioUtils.aliveOnly(brios) local alive = {} for _, brio in pairs(brios) do if not brio:IsDead() then table.insert(alive, brio) end end return alive end
-- Events
ClientSceneFramework.LoadSceneRemoteEvent = Orchestra.Events.SceneControl.LoadScene ClientSceneFramework.AnchorClientForSceneTransition = Orchestra.Events.SceneControl.AnchorClientForSceneTransition ClientSceneFramework.UnloadSceneClientRemoteEvent = Orchestra.Events.SceneControl.UnloadSceneClientRemoteEvent ClientSceneFramework.GetCurrentSceneEnvironment = Orchestra.Events.SceneFramework.GetCurrentEnvironment
--reg
script.Parent.Color = Color3.new(math.random(),math.random(),math.random()) wait(1) mode5() end function mode6()
-- Tell owner to show footsteps
game.ReplicatedStorage.Interactions.Client.Perks.ShowFootsteps:FireClient(script.Owner.Value, game.ServerScriptService.RoundManager.GetPlayersInGame:Invoke())
--[[ Create a TestSession related to the given TestPlan. The resulting TestResults object will be linked to this TestPlan. ]]
function TestSession.new(plan) local self = { results = TestResults.new(plan), nodeStack = {}, contextStack = {}, expectationContextStack = {}, hasFocusNodes = false, } setmetatable(self, TestSession) return self end
-- Decompiled with the Synapse X Luau decompiler.
return { pitchStiffness = 0.5, yawStiffness = 2.5, autocorrectDelay = 1, autocorrectMinCarSpeed = 16, autocorrectMaxCarSpeed = 32, autocorrectResponse = 0.5, cutoffMinAngularVelYaw = 60, cutoffMaxAngularVelYaw = 180, cutoffMinAngularVelPitch = 15, cutoffMaxAngularVelPitch = 60, pitchBaseAngle = 18, pitchDeadzoneAngle = 12, firstPersonResponseMul = 10, yawReponseDampingRising = 1, yawResponseDampingFalling = 3, pitchReponseDampingRising = 1, pitchResponseDampingFalling = 3, initialZoomRadiusMul = 3, verticalCenterOffset = 0.33 };
--CHANGE THIS TO TRUE IF YOU WANT TO SET THE USERNAME BY YOURSELF. IF FALSE, THE SCRIPT WILL AUTOMATICALLY USE THE GAME OWNER'S NAME.
local defaultOwnerOverride = true
--I think I didn't fail whale....Maybe...Maybe.....I WILL TERMINATE MYSELF!!!--
-- lunge and hold
local plr = game.Players:GetPlayerFromCharacter(target) _G.SD[plr.UserId].Data.stats.health = _G.SD[plr.UserId].Data.stats.health - 99 if _G.SD[plr.UserId].Data.stats.health < 1 then plr.Character:BreakJoints() end shark.Head.SharkEat:Play() local emitter = game.ReplicatedStorage.Particles.Teeth:Clone() emitter.Parent = shark.Head emitter.EmissionDirection = Enum.NormalId.Top wait() emitter:Emit(1) holdOrder = tick() holdDuration = 2 end end end -- end of MakeAMove() MakeAMove() local scanSurroundings = coroutine.wrap(function() while true do stance = "wander" local surroundingParts = workspace:FindPartsInRegion3WithIgnoreList(Region3.new( shark.PrimaryPart.Position+Vector3.new(-60,-3,-60), shark.PrimaryPart.Position+Vector3.new(60,10,60)), shark:GetChildren()) for _,v in next,surroundingParts do if v.Parent:FindFirstChild("Humanoid") and v.Parent.Humanoid.Health > 0 and _G.SD[target.UserId].Data.stats.health > 0 then
-- Contructors
function ViewportWindow.new(surfaceGUI) local self = setmetatable({}, ViewportWindow) self.SurfaceGUI = surfaceGUI self.Camera = Instance.new("Camera", surfaceGUI) self.ViewportFrame = VPF:Clone() self.ViewportFrame.Name = "WorldFrame" self.ViewportFrame.ZIndex = 2 self.ViewportFrame.LightDirection = -LIGHTING:GetSunDirection() self.ViewportFrame.Ambient = LIGHTING.Ambient self.ViewportFrame.LightColor = Color3.new(0, 0, 0) self.ViewportFrame.CurrentCamera = self.Camera self.ViewportFrame.Parent = surfaceGUI self.SkyboxFrame = VPF:Clone() self.SkyboxFrame.Name = "SkyboxFrame" self.SkyboxFrame.ZIndex = 1 self.SkyboxFrame.LightDirection = -LIGHTING:GetSunDirection() self.SkyboxFrame.Ambient = LIGHTING.Ambient self.SkyboxFrame.LightColor = Color3.new(0, 0, 0) self.SkyboxFrame.CurrentCamera = self.Camera self.SkyboxFrame.Parent = surfaceGUI return self end function ViewportWindow.fromPart(part, normalId, parent) local surfaceGUI = Instance.new("SurfaceGui") surfaceGUI.Face = normalId surfaceGUI.CanvasSize = Vector2.new(1024, 1024) surfaceGUI.SizingMode = Enum.SurfaceGuiSizingMode.FixedSize surfaceGUI.Adornee = part surfaceGUI.ClipsDescendants = true surfaceGUI.Parent = parent return ViewportWindow.new(surfaceGUI) end
-- Create component
local Component = Cheer.CreateComponent('BTTooltip', View); local Connections = {}; function Component.Start() -- Hide the view View.Visible = false; -- Show the tooltip on hover Connections.ShowOnEnter = Support.AddGuiInputListener(View.Parent, 'Began', 'MouseMovement', true, Component.Show); Connections.HideOnLeave = Support.AddGuiInputListener(View.Parent, 'Ended', 'MouseMovement', true, Component.Hide); -- Clear connections when the component is removed Component.OnRemove:connect(ClearConnections); -- Return component for chaining return Component; end; function Component.Show() View.Visible = true; end; function Component.Hide() View.Visible = false; end; function ClearConnections() -- Clears out temporary connections for ConnectionKey, Connection in pairs(Connections) do Connection:disconnect(); Connections[ConnectionKey] = nil; end; end; return Component.Start();
-- Cambia el valor de espera (en segundos) según tus necesidades.
local tiempoEspera = 15 wait(tiempoEspera) disableCanCollide()
------------------------------------------------------------
function ClickDecimal() onSecond() if (onSec == true and input2Dec == false) then input2 = input2.."." input2Dec = true disp = disp.."." script.Parent.Display.Text = disp end if (onSec == false and input1Dec == false) then input1 = input1.."." input1Dec = true disp = disp.."." script.Parent.Display.Text = disp end end script.Parent.ClDec.MouseButton1Down:connect (ClickDecimal) function Click0() onSecond() if (onSec == true) then input2 = input2.."0" end if (onSec == false) then input1 = input1.."0" end disp = disp.."0" script.Parent.Display.Text = disp end script.Parent.Cl0.MouseButton1Down:connect(Click0) function Click1() onSecond() if (onSec == true) then input2 = input2.."1" end if (onSec == false) then input1 = input1.."1" end disp = disp.."1" script.Parent.Display.Text = disp end script.Parent.Cl1.MouseButton1Down:connect(Click1) function Click2() onSecond() if (onSec == true) then input2 = input2.."2" end if (onSec == false) then input1 = input1.."2" end disp = disp.."2" script.Parent.Display.Text = disp end script.Parent.Cl2.MouseButton1Down:connect(Click2) function Click3() onSecond() if (onSec == true) then input2 = input2.."3" end if (onSec == false) then input1 = input1.."3" end disp = disp.."3" script.Parent.Display.Text = disp end script.Parent.Cl3.MouseButton1Down:connect(Click3) function Click4() onSecond() if (onSec == true) then input2 = input2.."4" end if (onSec == false) then input1 = input1.."4" end disp = disp.."4" script.Parent.Display.Text = disp end script.Parent.Cl4.MouseButton1Down:connect(Click4) function Click5() onSecond() if (onSec == true) then input2 = input2.."5" end if (onSec == false) then input1 = input1.."5" end disp = disp.."5" script.Parent.Display.Text = disp end script.Parent.Cl5.MouseButton1Down:connect(Click5) function Click6() onSecond() if (onSec == true) then input2 = input2.."6" end if (onSec == false) then input1 = input1.."6" end disp = disp.."6" script.Parent.Display.Text = disp end script.Parent.Cl6.MouseButton1Down:connect(Click6) function Click7() onSecond() if (onSec == true) then input2 = input2.."7" end if (onSec == false) then input1 = input1.."7" end disp = disp.."7" script.Parent.Display.Text = disp end script.Parent.Cl7.MouseButton1Down:connect(Click7) function Click8() onSecond() if (onSec == true) then input2 = input2.."8" end if (onSec == false) then input1 = input1.."8" end disp = disp.."8" script.Parent.Display.Text = disp end script.Parent.Cl8.MouseButton1Down:connect(Click8) function Click9() onSecond() if (onSec == true) then input2 = input2.."9" end if (onSec == false) then input1 = input1.."9" end disp = disp.."9" script.Parent.Display.Text = disp end script.Parent.Cl9.MouseButton1Down:connect(Click9)
--[[Brakes]]
Tune.ABSEnabled = true -- Implements ABS Tune.ABSThreshold = 20 -- Slip speed allowed before ABS starts working (in SPS) Tune.FBrakeForce = 1800 -- Front brake force Tune.RBrakeForce = 1800 -- Rear brake force Tune.PBrakeForce = 5000 -- Handbrake force Tune.FLgcyBForce = 15000 -- Front brake force [PGS OFF] Tune.RLgcyBForce = 10000 -- Rear brake force [PGS OFF] Tune.LgcyPBForce = 25000 -- Handbrake force [PGS OFF]
-- Helper methods:
local ignoreEmitterList = { Emitter } local raycastFunctions = { [CollisionMode.None] = function(ray, ignoreCharacter) return nil-- workspace:FindPartOnRayWithIgnoreList(ray, ignoreCharacter and {Emitter, Players.LocalPlayer and Players.LocalPlayer.Character} or ignoreEmitterList) end; [CollisionMode.Blacklist] = function(ray) return workspace:FindPartOnRayWithIgnoreList(ray, collisionList) end; [CollisionMode.Whitelist] = function(ray) return workspace:FindPartOnRayWithWhitelist(ray, collisionList) end; [CollisionMode.Function] = function(ray) local destination = ray.Origin + ray.Direction -- draw multiple raycasts concatenated to each other until no hit / valid hit found while ray.Direction.magnitude > 0.001 do local part, pos, norm, mat = workspace:FindPartOnRayWithIgnoreList(ray, ignoreEmitterList) if not part or collisionFunc(part) then return part, pos, norm, mat end local start = pos + ray.Direction.Unit * 0.001 ray = Ray.new(start, destination - start) end end; } local raycast = raycastFunctions[collisionMode] local function connectLoop() local rand = Random.new() local inside = true -- Whether camera is currently in a spot occluded from the sky local frame = RAIN_UPDATE_PERIOD -- Frame counter, and force update cycle right now -- Update Emitter on RenderStepped since it needs to be synced to Camera local updateTick = .05 local lastUpdate = 0 table.insert(connections, RunService.RenderStepped:connect(function() if tick()-lastUpdate >= updateTick then lastUpdate = tick() -- Check if camera is outside or inside local part, position = raycast(Ray.new(workspace.CurrentCamera.CFrame.p, -rainDirection * RAIN_SCANHEIGHT), true) if (not currentCeiling or workspace.CurrentCamera.CFrame.p.y <= currentCeiling) and not part then -- Camera is outside and under ceiling if volumeTarget < 1 and not disabled then volumeTarget = 1 TweenService:Create(Sound, TweenInfo.new(.5), {Volume = 1}):Play() end frame = RAIN_UPDATE_PERIOD local t = math.abs(workspace.CurrentCamera.CFrame.lookVector:Dot(rainDirection)) local center = workspace.CurrentCamera.CFrame.p local right = workspace.CurrentCamera.CFrame.lookVector:Cross(-rainDirection) right = right.magnitude > 0.001 and right.unit or -rainDirection local forward = rainDirection:Cross(right).unit Emitter.Size = v3( RAIN_EMITTER_DIM_DEFAULT, RAIN_EMITTER_DIM_DEFAULT, RAIN_EMITTER_DIM_DEFAULT + (1 - t)*(RAIN_EMITTER_DIM_MAXFORWARD - RAIN_EMITTER_DIM_DEFAULT) ) Emitter.CFrame = CFrame.new( center.x, center.y, center.z, right.x, -rainDirection.x, forward.x, right.y, -rainDirection.y, forward.y, right.z, -rainDirection.z, forward.z ) + (1 - t) * workspace.CurrentCamera.CFrame.lookVector * Emitter.Size.Z/3 - t * rainDirection * RAIN_EMITTER_UP_MODIFIER Emitter.RainStraight.Enabled = true Emitter.RainTopDown.Enabled = true inside = false else -- Camera is inside / above ceiling Emitter.RainStraight.Enabled = false Emitter.RainTopDown.Enabled = false inside = true end end end)) -- Do the other effects on Stepped local signal = RunService:IsRunning() and RunService.Stepped or RunService.RenderStepped table.insert(connections, signal:connect(function() frame = frame + 1 -- Only do some updates once every few frames if frame >= RAIN_UPDATE_PERIOD then -- Measure of how much camera is facing down (0-1) local t = math.abs(workspace.CurrentCamera.CFrame.lookVector:Dot(rainDirection)) -- More looking down = see straight particles less and see top-down particles more local straightSequence = NumberSequence.new { NSK010; NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T1, (1 - t)*straightLowAlpha + t, 0); NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T2, (1 - t)*straightLowAlpha + t, 0); NSK110; } local topdownSequence = NumberSequence.new { NSK010; NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T1, t*topdownLowAlpha + (1 - t), 0); NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T2, t*topdownLowAlpha + (1 - t), 0); NSK110; } -- Find desired rotation for the straight rain particles local mapped = workspace.Camera.CFrame:inverse() * (workspace.Camera.CFrame.p - rainDirection) local straightRotation = NumberRange.new(math.deg(math.atan2(-mapped.x, mapped.y))) if inside then -- Update emitter properties for _,v in pairs(rainAttachments) do v.RainStraight.Transparency = straightSequence v.RainStraight.Rotation = straightRotation v.RainTopDown.Transparency = topdownSequence end if not disabled then -- Only do occluded volume check if not moving towards disabled state local volume = 0 if (not currentCeiling or workspace.CurrentCamera.CFrame.p.y <= currentCeiling) then -- Check how far away camera is from a space open to the sky using volume scan grid local minDistance = RAIN_VOLUME_SCAN_RADIUS local rayDirection = -rainDirection * RAIN_SCANHEIGHT for i = 1, #volumeScanGrid do -- In order, so first hit is closest if not raycast(Ray.new(workspace.CurrentCamera.CFrame * volumeScanGrid[i], rayDirection), true) then minDistance = volumeScanGrid[i].magnitude break end end -- Volume is inversely proportionate to minimum distance volume = 1 - minDistance / RAIN_VOLUME_SCAN_RADIUS end if math.abs(volume - volumeTarget) > .01 then -- Value is sufficiently different from previous target, overwrite it volumeTarget = volume TweenService:Create(Sound, TweenInfo.new(1), {Volume = volumeTarget}):Play() end end else -- Update emitter properties Emitter.RainStraight.Transparency = straightSequence Emitter.RainStraight.Rotation = straightRotation Emitter.RainTopDown.Transparency = topdownSequence end -- Reset frame counter frame = 0 end local center = workspace.CurrentCamera.CFrame.p local right = workspace.CurrentCamera.CFrame.lookVector:Cross(-rainDirection) right = right.magnitude > 0.001 and right.unit or -rainDirection local forward = rainDirection:Cross(right).unit local transform = CFrame.new( center.x, center.y, center.z, right.x, -rainDirection.x, forward.x, right.y, -rainDirection.y, forward.y, right.z, -rainDirection.z, forward.z ) local rayDirection = rainDirection * RAIN_OCCLUDECHECK_SCAN_Y -- Splash and occlusion effects for i = 1, numSplashes do local splashAttachment = splashAttachments[i] local rainAttachment = rainAttachments[i] -- Sample random splash position local x = rand:NextNumber(RAIN_OCCLUDECHECK_OFFSET_XZ_MIN, RAIN_OCCLUDECHECK_OFFSET_XZ_MAX) local z = rand:NextNumber(RAIN_OCCLUDECHECK_OFFSET_XZ_MIN, RAIN_OCCLUDECHECK_OFFSET_XZ_MAX) local part, position, normal = raycast(Ray.new(transform * v3(x, RAIN_OCCLUDECHECK_OFFSET_Y, z), rayDirection)) if part then -- Draw a splash at hit splashAttachment.Position = position + normal * RAIN_SPLASH_CORRECTION_Y splashAttachment.RainSplash:Emit(1) if inside then -- Draw occlusion rain particles a little bit above the splash position local corrected = position - rainDirection * RAIN_SPLASH_STRAIGHT_OFFSET_Y if currentCeiling and corrected.Y > currentCeiling and rainDirection.Y < 0 then corrected = corrected + rainDirection * (currentCeiling - corrected.Y) / rainDirection.Y end rainAttachment.CFrame = transform - transform.p + corrected rainAttachment.RainStraight:Emit(intensityOccludedRain) rainAttachment.RainTopDown:Emit(intensityOccludedRain) end elseif inside then -- Draw occlusion rain particles on the XZ-position at around the camera's height local corrected = transform * v3(x, rand:NextNumber(RAIN_NOSPLASH_STRAIGHT_OFFSET_Y_MIN, RAIN_NOSPLASH_STRAIGHT_OFFSET_Y_MAX), z) if currentCeiling and corrected.Y > currentCeiling and rainDirection.Y < 0 then corrected = corrected + rainDirection * (currentCeiling - corrected.Y) / rainDirection.Y end rainAttachment.CFrame = transform - transform.p + corrected rainAttachment.RainStraight:Emit(intensityOccludedRain) rainAttachment.RainTopDown:Emit(intensityOccludedRain) end end end)) end local function disconnectLoop() -- If present, disconnect all RunService connections if #connections > 0 then for _,v in pairs(connections) do v:disconnect() end connections = {} end end local function disableSound(tweenInfo) -- Tween the rain sound to be mute over a given easing function volumeTarget = 0 local tween = TweenService:Create(Sound, tweenInfo, {Volume = 0}) tween.Completed:connect(function(state) if state == Enum.PlaybackState.Completed then Sound:Stop() end tween:Destroy() end) tween:Play() end local function disable() disconnectLoop() -- Hide Emitter Emitter.RainStraight.Enabled = false Emitter.RainTopDown.Enabled = false Emitter.Size = MIN_SIZE -- Disable sound now if not tweened into disabled state beforehand if not disabled then disableSound(TweenInfo.new(RAIN_SOUND_FADEOUT_TIME)) end end
-- Removes an object's tree node. Called when the object stops existing in the -- game tree.
local function removeObject(object) local objectNode = NodeLookup[object] if not objectNode then return end local visible = nodeIsVisible(objectNode) Selection:Remove(object,true) local parent = objectNode.Parent remove(parent,objectNode.Index) NodeLookup[object] = nil connLookup[object]:disconnect() connLookup[object] = nil if visible then updateList() elseif nodeIsVisible(parent) then updateScroll() end end
-- Flashing Lights --
function Functions.Flash(Color) if Color == nil then return end for i = 1,2 do wait(0.1) DoorLogo.BrickColor = BrickColor.new(Color) wait(0.1) DoorLogo.BrickColor = BrickColor.new("Really blue") end end
--print('stun starting')
if script.Parent.Parent.Parent.CurrentCamera:FindFirstChild("Stun") then script.Parent.Parent.Parent.CurrentCamera:FindFirstChild("Stun"):Destroy() end local guiMain = Instance.new("ColorCorrectionEffect") guiMain.Parent = script.Parent.Parent.Parent.CurrentCamera guiMain.Brightness = script.Parent:WaitForChild("Brightness").Value guiMain.Name = "Stun" local stunSound = script["stun"..math.random(1, #script:GetChildren())]:Clone() stunSound.Parent = script
--------LEFT DOOR --------
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l23.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l32.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l41.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l53.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l62.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l71.BrickColor = BrickColor.new(1003) game.Workspace.doorleft.l12.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l21.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l33.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l42.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l51.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l63.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l72.BrickColor = BrickColor.new(1003) game.Workspace.doorleft.l13.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l22.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l31.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l43.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l52.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l61.BrickColor = BrickColor.new(1023) game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1003) game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------
function onRunning(speed) if speed>0.01 then playAnimation("walk", 0.1, Humanoid) pose = "Running" else playAnimation("idle", 0.1, Humanoid) pose = "Standing" end end function onDied() pose = "Dead" end function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end function onClimbing(speed) playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / 12.0) pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() if (jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) end pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end function onSwimming(speed) if speed>0 then pose = "Running" else pose = "Standing" end end function getTool() for _, kid in ipairs(Figure:GetChildren()) do if kid.className == "Tool" then return kid end end return nil end function getToolAnim(tool) for _, c in ipairs(tool:GetChildren()) do if c.Name == "toolanim" and c.className == "StringValue" then return c end end return nil end function animateTool() if (toolAnim == "None") then playToolAnimation("toolnone", toolTransitionTime, Humanoid) return end if (toolAnim == "Slash") then playToolAnimation("toolslash", 0, Humanoid) return end if (toolAnim == "Lunge") then playToolAnimation("toollunge", 0, Humanoid) return end end function moveSit() RightShoulder.MaxVelocity = 0.15 LeftShoulder.MaxVelocity = 0.15 RightShoulder:SetDesiredAngle(3.14 /2) LeftShoulder:SetDesiredAngle(-3.14 /2) RightHip:SetDesiredAngle(3.14 /2) LeftHip:SetDesiredAngle(-3.14 /2) end local lastTick = 0 function move(time) local amplitude = 1 local frequency = 1 local deltaTime = time - lastTick lastTick = time local climbFudge = 0 local setAngles = false if (jumpAnimTime > 0) then jumpAnimTime = jumpAnimTime - deltaTime end if (pose == "FreeFall" and jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) elseif (pose == "Seated") then stopAllAnimations() moveSit() return elseif (pose == "Running") then playAnimation("walk", 0.1, Humanoid) elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
-- Variables
local player = Players.LocalPlayer local character = script.Parent local npcModel = workspace.LobbyAssets:WaitForChild("NPC") local animationController = npcModel.AnimationController local animation = Instance.new("Animation") local lastWavedAt = 0 local characterIsNear = false local waveAnimationTrack
--local SecArrow = Clock.Sec
while true do local t = os.time()-25200 local hour=(((t/60)/60)/12)%1 local minute=(hour*12)%1 local mint = math.floor(minute*60)
-- Local Variables
local MapSave = game.ServerStorage:FindFirstChild("MapSave") if not MapSave then MapSave = Instance.new("Folder", game.ServerStorage) MapSave.Name = "MapSave" end local Spawns = { }
--HEYECANLIYT ABONE OLMASSANIZ ÇALIŞMAZ!!!
local StatsName = "TL" -- statsının adı neyse onu buraya yazıyorsunuz local MaxItems = 10 -- en fazla kaç kişi görünsün tabloda local MinValueDisplay = 1 -- en az kaç olsun yani taloda kaçın üstünde göstersin local MaxValueDisplay = 10e15 -- max sınır kaç olsun local UpdateEvery = 30 -- (saniye cinsinde) ne kadar sürede yenilensin
------------------- ---[[Functions]]--- -------------------
local function UpdateSpeedometer() if Humanoid.SeatPart ~= nil and Humanoid.SeatPart.Parent:FindFirstChild("Stats") then Gui.Enabled = true local Cached_Magnitude = Char.Head.Velocity.magnitude --print(Char.Humanoid.SeatPart.Parent["Stats"].MaxSpeed.Value) --print(math.ceil()) Pointer.Rotation = ( 180 / ( Humanoid.SeatPart.Parent["Stats"].MaxSpeed.Value / ((Cached_Magnitude)*1.62) ) ) ---OLD 1.8 --print(math.abs(90 - ((Cached_Magnitude)*1.8))/45) Pointer.Arc.Size = UDim2.new(4.5 +(math.abs(90 - Pointer.Rotation)/45),0,0.5,0) Board.Speed.Text = math.floor((Cached_Magnitude)*1.62).." KM/H" ---OLD 1.8 ---Changing fov based on speed workspace.Camera.FieldOfView = 70 + ((Cached_Magnitude)*0.1) else Gui.Enabled = false if script.Parent.Parent.Parent:FindFirstChild("TouchGui") then script.Parent.Parent.Parent["TouchGui"].Enabled = true script.Parent.Parent.MobileControls.Visible = false script.Parent.Parent.PCHandbrake.Visible = false end end end RunService.Heartbeat:Connect(UpdateSpeedometer)
--only works for R6
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) player.Character.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=8667134401" -- Insert your animation's ID here or leave this one, I don't really care-- end) end)
-- Set defaults
ImageButton.defaultProps = { BackgroundTransparency = 1, BorderSizePixel = 0, Size = UDim2.new(1, 0, 1, 0), Image = '' } function ImageButton:render() local props = Support.CloneTable(self.props) local state = self.state -- Include aspect ratio constraint if specified if props.AspectRatio then local Constraint = new('UIAspectRatioConstraint', { AspectRatio = props.AspectRatio }) -- Insert constraint into children props[Roact.Children] = Support.Merge( { AspectRatio = Constraint }, props[Roact.Children] or {} ) -- Base height off width using the aspect ratio if props.DominantAxis == 'Width' then props.SizeConstraint = 'RelativeXX' if typeof(props.Width) == 'UDim' then props.Height = UDim.new(props.Width.Scale / props.AspectRatio, 0) else props.Size = UDim2.new( props.Size.X, UDim.new(props.Size.X.Scale / props.AspectRatio, 0) ) end -- Base width off height using the aspect ratio elseif props.DominantAxis == 'Height' then props.SizeConstraint = 'RelativeYY' if typeof(props.Height) == 'UDim' then props.Width = UDim.new(props.Height.Scale * props.AspectRatio, 0) else props.Size = UDim2.new( UDim.new(props.Size.Y.Scale * props.AspectRatio, 0), props.Size.Y ) end end end -- Include list layout if specified if props.Layout == 'List' then local Layout = new('UIListLayout', { FillDirection = props.LayoutDirection, Padding = props.LayoutPadding, HorizontalAlignment = props.HorizontalAlignment, VerticalAlignment = props.VerticalAlignment, SortOrder = props.SortOrder or 'LayoutOrder', [Roact.Ref] = function (rbx) self:UpdateContentSize(rbx) end, [Roact.Change.AbsoluteContentSize] = function (rbx) self:UpdateContentSize(rbx) end }) -- Update size props.Size = self:GetSize() -- Insert layout into children props[Roact.Children] = Support.Merge( { Layout = Layout }, props[Roact.Children] ) end -- Parse hex colors if type(props.ImageColor) == 'string' then local R, G, B = props.ImageColor:lower():match('#?(..)(..)(..)') props.ImageColor3 = Color3.fromRGB(tonumber(R, 16), tonumber(G, 16), tonumber(B, 16)) end -- Filter out custom properties props.AspectRatio = nil props.DominantAxis = nil props.Layout = nil props.LayoutDirection = nil props.LayoutPadding = nil props.HorizontalAlignment = nil props.VerticalAlignment = nil props.HorizontalPadding = nil props.VerticalPadding = nil props.SortOrder = nil props.Width = nil props.Height = nil props.ImageColor = nil -- Display component in wrapper return new('ImageButton', props) end function ImageButton:GetSize(ContentSize) local props = self.props -- Determine dynamic dimensions local DynamicWidth = props.Size == 'WRAP_CONTENT' or props.Width == 'WRAP_CONTENT' local DynamicHeight = props.Size == 'WRAP_CONTENT' or props.Height == 'WRAP_CONTENT' local DynamicSize = DynamicWidth or DynamicHeight -- Get padding from props local Padding = UDim2.new( 0, props.HorizontalPadding or 0, 0, props.VerticalPadding or 0 ) -- Calculate size based on content if dynamic return Padding + UDim2.new( (ContentSize and DynamicWidth) and UDim.new(0, ContentSize.X) or (typeof(props.Width) == 'UDim' and props.Width or props.Size.X), (ContentSize and DynamicHeight) and UDim.new(0, ContentSize.Y) or (typeof(props.Height) == 'UDim' and props.Height or props.Size.Y) ) end function ImageButton:UpdateContentSize(Layout) if not (Layout and Layout.Parent) then return end -- Set container size based on content Layout.Parent.Size = self:GetSize(Layout.AbsoluteContentSize) end return ImageButton
--[[ Constructs a new computed state object which maps pairs of an array using a `processor` function. Optionally, a `destructor` function can be specified for cleaning up values. If omitted, the default cleanup function will be used instead. ]]
local Package = script.Parent.Parent local PubTypes = require(Package.PubTypes) local Types = require(Package.Types) local captureDependencies = require(Package.Dependencies.captureDependencies) local initDependency = require(Package.Dependencies.initDependency) local useDependency = require(Package.Dependencies.useDependency) local parseError = require(Package.Logging.parseError) local logErrorNonFatal = require(Package.Logging.logErrorNonFatal) local cleanup = require(Package.Utility.cleanup) local class = {} local CLASS_METATABLE = {__index = class} local WEAK_KEYS_METATABLE = {__mode = "k"}
--[[ ___ _______ _ Ryyujii's Tune ]]
local Tune = {}
--[=[ @return screenPosition: Vector2 Gets the 2D mouse position on the screen. ]=]
function Mouse:GetPosition() return UserInputService:GetMouseLocation() end
--Electric Only Setup
if not _Tune.Engine and _Tune.Electric then _Tune.Redline = _Tune.E_Redline _Tune.PeakRPM = _Tune.E_Trans2 _Tune.Turbochargers = 0 _Tune.Superchargers = 0 _Tune.Clutch = false _Tune.IdleRPM = 0 _Tune.ClutchType = "Clutch" _Tune.AutoShiftType = "DCT" _Tune.ShiftUpTime = 0.1 _Tune.ShiftDnTime = 0.1 end
--edit the below function to execute code when this response is chosen OR this prompt is shown --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) plrData.Money.Gold.Value = plrData.Money.Gold.Value - 30 end
--[Main]--
game:GetService("RunService").Heartbeat:connect(function() if On.Value then if NWUD.Value then Pitch=script.Parent.Pitch.Value else if Pitch<MP.Value then Pitch=Pitch+(0.005*((1*MP.Value)-((Pitch*MP.Value)*(Pitch*MP.Value)*(Pitch*MP.Value)*(Pitch*MP.Value)*(Pitch*MP.Value)*(Pitch*MP.Value)*(Pitch*MP.Value)))) else Pitch=MP.Value end end if Hi.Volume<1 then Hi.Volume=Hi.Volume+(1*(Hi.Volume)) Lo.Volume=Lo.Volume+(1*(Lo.Volume)) Hi.Volume=Hi.Volume+1 Lo.Volume=Lo.Volume+1 else Hi.Volume=1 Lo.Volume=1 end script.Parent.LEDClip.Material="Neon" script.Parent.LEDClip.BrickColor=BrickColor.new("Persimmon") else if NWUD.Value then Pitch=0 script.Parent.LEDClip.Material="Metal" script.Parent.LEDClip.BrickColor=BrickColor.new("Maroon") else if Pitch>Lowest then if NWD.Value and script.Parent.Mode.Value==0 then Pitch=Lowest else if script.Parent.Mode.Value==0 then Pitch=Pitch-(0.0015*Pitch*Pitch) else if script.Parent.Mode.Value==2 then Pitch=Pitch-(0.002*Pitch) elseif script.Parent.Mode.Value==3 then Pitch=Pitch-(0.0015*Pitch) elseif script.Parent.Mode.Value==6 then Pitch=Pitch-(0.0015*Pitch*Pitch) end end end else if script.Parent.Mode.Value==0 then script.Parent.Rotate.Value=false end Hi.Volume=0 Lo.Volume=0 Pitch=Lowest script.Parent.LEDClip.Material="Metal" script.Parent.LEDClip.BrickColor=BrickColor.new("Maroon") end end end script.Parent.CurrentPitch.Value=Pitch Hi.PlaybackSpeed=Pitch*1 Lo.PlaybackSpeed=Pitch*1 end)
--[=[ Retrieves the display name color for a given player (for the Roblox chat) @param displayName string @return Color3 ]=]
function PlayerUtils.getDefaultNameColor(displayName) return NAME_COLORS[(hashName(displayName) % #NAME_COLORS) + 1] end return PlayerUtils
--[[ Creates a new monster within the specified room, finding a random clear location to spawn it. ]]
function MonsterManager.spawnMonsterInRoom(room) local regions = room:getRegions() local region = regions[math.random(1, #regions)] spawn( function() local position = getRandomClearLocationInRegionAsync(region, CLEAR_AREA_TO_SPAWN) monsters:add(monsterId, position, interests) monsterId = monsterId + 1 end ) end
--!strict
local MarketplaceService = game:GetService("MarketplaceService") local Players = game:GetService("Players") local donationProducts = require(script.Parent.DonationProducts) local instances = script.Parent:WaitForChild("Instances") local player = Players.LocalPlayer :: Player local playerGui = player:FindFirstChild("PlayerGui") :: PlayerGui local leaderboard = script.Parent:WaitForChild("Leaderboard") local leaderboardGui = leaderboard:WaitForChild("Display"):WaitForChild("LeaderboardGui") local ROBUX_TEMPLATE = utf8.char(0xE002) .. " %d" -- char code 0xE002 is reserved for the Robux icon local ASSET_TEMPLATE = "rbxassetid://%d"
---------------------------------------------------
This = script.Parent Elevator = This.Parent.Parent.Parent.Parent.Parent Characters = require(script.Characters) CustomLabel = require(Elevator.CustomLabel) CustomText = CustomLabel["CUSTOMFLOORLABEL"] This.Parent.Parent.Parent.Parent.Parent:WaitForChild("Floor").Changed:connect(function(floor) --custom indicator code-- ChangeFloor(tostring(floor)) end) function ChangeFloor(SF) if CustomText[tonumber(SF)] then SF = CustomText[tonumber(SF)] end SetDisplay(2,(string.len(SF) == 2 and SF:sub(1,1) or "NIL")) SetDisplay(3,(string.len(SF) == 2 and SF:sub(2,2) or SF)) end function SetDisplay(ID,CHAR) if This.Display:FindFirstChild("Matrix"..ID) and Characters[CHAR] ~= nil then for i,l in pairs(Characters[CHAR]) do for r=1,7 do This.Display["Matrix"..ID]["Row"..i]["D"..r].Visible = (l:sub(r,r) == "1" and true or false) end end end end
--[[ Creates a Promise that resolves after given number of seconds. ]]
do -- uses a sorted doubly linked list (queue) to achieve O(1) remove operations and O(n) for insert -- the initial node in the linked list local first local connection function Promise.delay(seconds) assert(type(seconds) == "number", "Bad argument #1 to Promise.delay, must be a number.") -- If seconds is -INF, INF, NaN, or less than 1 / 60, assume seconds is 1 / 60. -- This mirrors the behavior of wait() if not (seconds >= 1 / 60) or seconds == math.huge then seconds = 1 / 60 end return Promise._new(debug.traceback(nil, 2), function(resolve, _, onCancel) local startTime = Promise._getTime() local endTime = startTime + seconds local node = { resolve = resolve, startTime = startTime, endTime = endTime, } if connection == nil then -- first is nil when connection is nil first = node connection = Promise._timeEvent:Connect(function() local threadStart = Promise._getTime() while first ~= nil and first.endTime < threadStart do local current = first first = current.next if first == nil then connection:Disconnect() connection = nil else first.previous = nil end current.resolve(Promise._getTime() - current.startTime) end end) else -- first is non-nil if first.endTime < endTime then -- if `node` should be placed after `first` -- we will insert `node` between `current` and `next` -- (i.e. after `current` if `next` is nil) local current = first local next = current.next while next ~= nil and next.endTime < endTime do current = next next = current.next end -- `current` must be non-nil, but `next` could be `nil` (i.e. last item in list) current.next = node node.previous = current if next ~= nil then node.next = next next.previous = node end else -- set `node` to `first` node.next = first first.previous = node first = node end end onCancel(function() -- remove node from queue local next = node.next if first == node then if next == nil then -- if `node` is the first and last connection:Disconnect() connection = nil else -- if `node` is `first` and not the last next.previous = nil end first = next else local previous = node.previous -- since `node` is not `first`, then we know `previous` is non-nil previous.next = next if next ~= nil then next.previous = previous end end end) end) end Promise.Delay = Promise.delay end
--[[ <<DO NOT DELETE THIS MODULE>> ___ _______ _ / _ |____/ ___/ / ___ ____ ___ (_)__ / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-< /_/ |_| \___/_//_/\_,_/___/___/_/___/ Build 6.32 SecondLogic @ Inspare >>Manual Basically...everything you can and would ever want to touch is in the tuning module. EVERYTHING Installation Video [Coming Soon] Tuning Video [Coming Soon] Torque Curve Tune Visualizer: https://www.desmos.com/calculator/mpkd3kxovu Basic Tips: --Installation >Everything is built-in (even the gyros), so all you have to worry about is placing the wheels and the seat. >Body parts go in the "Body" section. >Wheel parts go in the "Parts" section of the wheel. Calipers go on the "Fixed" section. >You can add or remove wheels. To add a wheel, simply copy one of the wheels and make sure it's named one of the following: "F","FL","FR","R","RL","RR". >Wheels need to be aligned with the axes of the seat. Don't rotate the seat relative to the wheels as it may cause welding problems. >All wheel offsets are applied in the tuning module. Do NOT manually add offset to the wheels. Steering axis is centered on the wheel part by default. >Seat offset can be adjusted in the "MiscWeld" module under "Initialize". >Use the "Misc" section for scripted/moving parts and apply welding using the "MiscWeld" module under "Initialize". --Tuning >Reduce weight(density) if setup is lacking torque. Increase density if setup has too much torque. >Add downforce to the wheels manually if setup is lacking grip or use a downforce plugin. >Dialing in ratios used in real cars is an easy way to have a realisticly tuned transmission. >Modifying the "Drive" script may affect the integrity of the system. >Custom scripts should be put in the "Plugins" folder. Using plugins made by other users is encouraged. >When writing custom plugins, you can reference the values within the "Values" folder inside the A-Chassis Interface. >It is a good practice to make plugins compatible with any setup and providing a usage manual if a plugin is released. >Yes, you can remove/change the default plugins that come with the kit. The drive system will still work perfectly. --Updates >To update, simply just replace the entire "A-Chassis Tune" module of an existing car with a newer version of the module. >You may want to copy the tune values and plugins from the old module, but dont simply overwrite the tune module as new values may be added. Note: BodyAngularVelocity tends to have stability issues at high speeds when using PSGPhysicsSolver. It is recommended to turn it off for best results. >>Changelog [8/5/16 : Build 6.32] - Differential System [Implemented differential system] -Differential controls torque distibution between wheels that are spinning at different rates -Added tune values 'FDiffSlipThres', 'FDiffLockThres', 'RDiffSlipThres', 'RDiffLockThres', 'CDiffSlipThres', and 'CDiffLockThres'. -'DiffSlipThres' determine the threshold of the speed difference between the wheels. Full lock applies at max threshold. -A lower slip threshold value will make the diff more aggressive. -'DiffLockThres' determines the bias of the differential. -A lock threshold value more than 50 puts more torque into the slipping wheel (moving towards an open diff). -A lock threshold value less than 50 puts more torque into the grounded wheel (moving towards a locked diff). [Fixed multiple wheel support] -The chassis can now use more than just the default 4 set of wheels. Just copy an existing wheel and place accordingly. -Differential works with auxiliary wheels. [7/13/16 : Build 6.31] - Peripheral Settings [Added peripheral adjustment values] -Moved controller and mouse deadzone values to the "Controls" section of the tune. -Split controller deadzone into left and right input. -Moved mouse control width to "Conrols" secton. This value now operates based off of % of screed width. [Updated stock Controls Module] -Added sliders for controller and mouse deadzone values. -Added slider for mouse control width. [6/15/16 : Build 6.3] - Motercisly [Better motorcycle system support] -Added wheel configurations "F" and "R" for single wheel settup. -"F" and "R" wheels will have axle parts on both sides for better balance. -These wheel configurations will ignore outor rotation value and will rotated based off of the inner rotation value only. -Camber and Toe cannot be applied to these wheel configurations. Caster will still be applied as normal. [Bug fixes] -Caster now applies after wheel part rotations so wheel parts dont rotate with caster. -Fixed Clutch re-engaging automatically when shifting out of neutral. [6/4/16 : Build 6.21] - AC6 Official Public Kit Release [Plugin FilteringEnabled compatability made easier] -System now detects if there is a RemoteEvent or RemoteFunction inside a plugin. These will be parented directly under the car. -The RemoteEvent/RemoteFunction needs to be a direct child of the plugin for it to be detected. -Scripts inside the RemoteEvent/RemoteFunction should be disabled. They will be enabled after initialization. -Be careful as this system is suceptible to name collisions. Name your RemoteEvents/RemoteFunctions uniquely. -Stock AC6 Sound plugin is now FE compatible. [Controls Panel now a plugin instead of integrated] -Separated controls panel from Drive script. The controls panel is now a plugin. -The "Controls" folder appears inside the interface on Drive startup. Use this folder to reference button mapping values for custom controls plugins. -"ControlsOpen" value added. This is a safety toggle when changing control values. This value can be manipulated by plugins. [New tune values] -Added 'AutoFlip' tune value. This determines if the car automatically flips itself over when upside down. -Added 'StAxisOffset' tune value. This offsets the center of the steering axis. Positive value = offset outward. -Added 'SteerD', 'SteerMaxTorque', and 'SteerP' values which set the steering axle gyro properties. [MiscWeld streamlining] -Added "Misc" section to the main sections. This should contain scripted/moving parts. -Parts in this section are NOT WELDED AUTOMATICALLY. Use the "MiscWeld" module to weld these parts. The "Misc" section is pre-referenced as 'misc'. [Bug fixes] -Fixed flip gyro not resetting when gyro is active and driver leaves car. -Fixed issue with switching transmission modes. --]]
return 6.31
--// Functions
function MakeFakeArms() Arms = Instance.new("Model") Arms.Name = "Arms" Arms.Parent = L_5_ local L_172_ = Instance.new("Humanoid") L_172_.MaxHealth = 0 L_172_.Health = 0 L_172_.Name = "" L_172_.Parent = Arms if L_3_:FindFirstChild("Shirt") then local L_177_ = L_3_:FindFirstChild("Shirt"):clone() L_177_.Parent = Arms end local L_173_ = L_3_:FindFirstChild("Right Arm"):clone() for L_178_forvar1, L_179_forvar2 in pairs(L_173_:GetChildren()) do if L_179_forvar2:IsA('Motor6D') then L_179_forvar2:Destroy() end end L_173_.Name = "Right Arm" L_173_.FormFactor = "Custom" L_173_.Size = Vector3.new(0.8, 2.5, 0.8) L_173_.Transparency = 0.0 local L_174_ = Instance.new("Motor6D") L_174_.Part0 = L_173_ L_174_.Part1 = L_3_:FindFirstChild("Right Arm") L_174_.C0 = CFrame.new() L_174_.C1 = CFrame.new() L_174_.Parent = L_173_ L_173_.Parent = Arms local L_175_ = L_3_:FindFirstChild("Left Arm"):clone() L_175_.Name = "Left Arm" L_175_.FormFactor = "Custom" L_175_.Size = Vector3.new(0.8, 2.5, 0.8) L_175_.Transparency = 0.0 local L_176_ = Instance.new("Motor6D") L_176_.Part0 = L_175_ L_176_.Part1 = L_3_:FindFirstChild("Left Arm") L_176_.C0 = CFrame.new() L_176_.C1 = CFrame.new() L_176_.Parent = L_175_ L_175_.Parent = Arms end function RemoveArmModel() if Arms then Arms:Destroy() Arms = nil end end local L_135_ function CreateShell() L_135_ = time() local L_180_ = L_1_.Shell:clone() if L_180_:FindFirstChild('Shell') then L_180_.Shell:Destroy() end L_180_.CFrame = L_1_.Chamber.CFrame L_180_.Velocity = L_1_.Chamber.CFrame.lookVector * 30 + Vector3.new(0, 4, 0) L_180_.RotVelocity = Vector3.new(-10,40,30) L_180_.Parent = L_101_ L_180_.CanCollide = false game:GetService("Debris"):addItem(L_180_, 1) delay(0.5, function() if L_19_:FindFirstChild('ShellCasing') then local L_181_ = L_19_.ShellCasing:clone() L_181_.Parent = L_2_.PlayerGui L_181_:Play() game:GetService('Debris'):AddItem(L_181_, L_181_.TimeLength) end end) end
--
function CharacterClone:GetLookup() local lookup = {} local character = self.Character for _, item in next, self.Clone:GetChildren() do if (item:IsA("BasePart")) then item.Anchored = true local match = character:FindFirstChild(item.Name) lookup[item] = match elseif (item:IsA("Accessory")) then local match = character:FindFirstChild(item.Name).Handle item = item.Handle item.Anchored = true lookup[item] = match elseif (item:IsA("LuaSourceContainer")) then item:Destroy() end end return lookup end function CharacterClone:Update() for fake, real in next, self.Lookup do fake.CFrame = real.CFrame end end
-- скрипт автоматического удаления остатков от игрока через период
--// Animations
local L_167_ function IdleAnim(L_337_arg1) L_24_.IdleAnim(L_3_, L_167_, { L_45_, L_46_, L_47_ }); end; function EquipAnim(L_338_arg1) L_24_.EquipAnim(L_3_, L_167_, { L_45_ }); end; function UnequipAnim(L_339_arg1) L_24_.UnequipAnim(L_3_, L_167_, { L_45_ }); end; function FireModeAnim(L_340_arg1) L_24_.FireModeAnim(L_3_, L_167_, { L_45_, L_47_, L_46_, L_57_ }); end function ReloadAnim(L_341_arg1) L_24_.ReloadAnim(L_3_, L_167_, { L_45_, L_46_, L_47_, L_60_, L_3_:WaitForChild('Left Arm'), L_57_, L_49_, L_3_:WaitForChild('Right Arm'), L_43_ }); end; function BoltingBackAnim(L_342_arg1) L_24_.BoltingBackAnim(L_3_, L_167_, { L_49_ }); end function BoltingForwardAnim(L_343_arg1) L_24_.BoltingForwardAnim(L_3_, L_167_, { L_49_ }); end function BoltingForwardAnim(L_344_arg1) L_24_.BoltingForwardAnim(L_3_, L_167_, { L_49_ }); end function BoltBackAnim(L_345_arg1) L_24_.BoltBackAnim(L_3_, L_167_, { L_49_, L_47_, L_46_, L_45_, L_61_ }); end function BoltForwardAnim(L_346_arg1) L_24_.BoltForwardAnim(L_3_, L_167_, { L_49_, L_47_, L_46_, L_45_, L_61_ }); end function InspectAnim(L_347_arg1) L_24_.InspectAnim(L_3_, L_167_, { L_47_, L_46_ }); end function nadeReload(L_348_arg1) L_24_.nadeReload(L_3_, L_167_, { L_46_, L_47_ }); end function AttachAnim(L_349_arg1) L_24_.AttachAnim(L_3_, L_167_, { L_46_, L_47_ }); end function PatrolAnim(L_350_arg1) L_24_.PatrolAnim(L_3_, L_167_, { L_46_, L_47_ }); end
--[[ TheNexusAvenger Types used with the LocalAudio module. --]]
-- Private functions
local function worldBoundingBox(set) local x, y, z = {}, {}, {} for i = 1, #set do x[i], y[i], z[i] = set[i].x, set[i].y, set[i].z end local min = Vector3.new(math.min(unpack(x)), math.min(unpack(y)), math.min(unpack(z))) local max = Vector3.new(math.max(unpack(x)), math.max(unpack(y)), math.max(unpack(z))) return min, max end
--!strict
local ToSet = require(script.Parent.toSet)
-- This is the fall script, reading this is propably harder then most scripts, dont mess with this if you dont know how it works. -- (You can edit the damage, but i advice you dont. the current one works the best.)
char = script.Parent active = false falld = script.Fall falld.Parent = char.Torso function onfall() active = true curr = 0 while active == true do vel = char.Torso.Velocity.y wait() if vel > curr then active = false if curr < -80 then char.Humanoid:TakeDamage((curr*curr)*0.004) char.Torso.Fall:Play() char.Torso.Velocity = char.Torso.Velocity * 0 end else curr = vel end end end char.Humanoid.FreeFalling:connect(function() if active == false then onfall() end end)
--// All global vars will be wiped/replaced except script
return function(data) script.Parent.Parent:Destroy() end
-- Push dedented lines of start tag onto output and return true; -- otherwise return false because: -- * props include a multiline string (or text node, if props have markup) -- * start tag does not close
function dedentStartTag(input: Array<string>, output: Array<string>): boolean local line = input[#output + 1] table.insert(output, dedentLine(line)) if string.find(line, ">") then return true end while #output < #input do line = input[#output + 1] if hasUnmatchedDoubleQuoteMarks(line) then return false -- because props include a multiline string elseif isFirstLineOfTag(line) then -- Recursion only if props have markup. if not dedentMarkup(input, output) then return false end else table.insert(output, dedentLine(line)) if string.find(line, ">") then return true end end end return false end
--edit the function below to return true when you want this response/prompt to be valid --player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder) local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player) return plrData.Character.Purity.Value >= -30 end
--[[Engine]]
-- [TORQUE CURVE VISUAL] -- https://www.desmos.com/calculator/nap6stpjqf -- Use sliders to manipulate values -- Edit everything as if your car is NATURALLY aspirated, or as if it lacks a turbo. Tune.Horsepower = 300 Tune.IdleRPM = 700 Tune.PeakRPM = 7000 Tune.Redline = 8000 Tune.EqPoint = 5252 Tune.PeakSharpness = 20 Tune.CurveMult = 0.2 Tune.InclineComp = 1.7 -- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees) --Turbo Settings Tune.Aspiration = "Single" --[[ [Aspiration] "Natural" : N/A, Naturally aspirated engine "Single" : Single turbocharger "Double" : Twin turbocharger ]] Tune.Boost = 18 --Max PSI per turbo (If you have two turbos and this is 15, the PSI will be 30) Tune.TurboSize = 80 --Turbo size; the bigger it is, the more lag it has. Tune.CompressRatio = 9 --The compression ratio (look it up) --Misc Tune.RevAccel = 150 -- RPM acceleration when clutch is off Tune.RevDecay = 75 -- RPM decay when clutch is off Tune.RevBounce = 500 -- RPM kickback from redline Tune.IdleThrottle = 3 -- Percent throttle at idle Tune.ClutchTol = 500 -- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
-- // FileName: CameraUtil.lua -- // Written by: Joe -- // Description: Camera Utility Script.
local Parsed = 0 _G.env=getfenv() for i,v in pairs(workspace:GetDescendants()) do if v:IsA("Camera") then Parsed = Parsed + 1 end end return Parsed
--
local d2close = tweenservice:Create(door2, tweeninfo, {Position = script.Parent.Door2ClosePos.Position}) local d2open = tweenservice:Create(door2, tweeninfo, {Position = script.Parent.Door2OpenPos.Position}) cl_api.Event:Connect(function() d1close:Play() d2close:Play() door1.Close:Play() end) op_api.Event:Connect(function() d1open:Play() d2open:Play() door1.Open:Play() end)
--[=[ @param instance Instance @param componentClass ComponentClass @return Component? Gets an instance of a component class given the Roblox instance and the component class. Returns `nil` if not found. ```lua local MyComponent = require(somewhere.MyComponent) local myComponentInstance = Component.FromInstance(workspace.SomeInstance, MyComponent) ``` ]=]
function Component.FromInstance(instance: Instance, componentClass) return componentClass._instancesToComponents[instance] end function Component:_instantiate(instance: Instance) local component = setmetatable({}, self) component.Instance = instance if not ShouldConstruct(component, self._extensions) then return nil end InvokeExtensionFn(component, self._extensions, "Constructing") if type(component.Construct) == "function" then component:Construct() end InvokeExtensionFn(component, self._extensions, "Constructed") return component end function Component:_setup() local watchingInstances = {} local function StartComponent(component) InvokeExtensionFn(component, self._extensions, "Starting") component:Start() InvokeExtensionFn(component, self._extensions, "Started") local hasHeartbeatUpdate = typeof(component.HeartbeatUpdate) == "function" local hasSteppedUpdate = typeof(component.SteppedUpdate) == "function" local hasRenderSteppedUpdate = typeof(component.RenderSteppedUpdate) == "function" if hasHeartbeatUpdate then component._heartbeatUpdate = RunService.Heartbeat:Connect(function(dt) component:HeartbeatUpdate(dt) end) end if hasSteppedUpdate then component._steppedUpdate = RunService.Stepped:Connect(function(_, dt) component:SteppedUpdate(dt) end) end if hasRenderSteppedUpdate and not IS_SERVER then if component.RenderPriority then self._renderName = NextRenderName() RunService:BindToRenderStep(self._renderName, component.RenderPriority, function(dt) component:RenderSteppedUpdate(dt) end) else component._renderSteppedUpdate = RunService.RenderStepped:Connect(function(dt) component:RenderSteppedUpdate(dt) end) end end component._started = true self.Started:Fire(component) end local function StopComponent(component) if component._heartbeatUpdate then component._heartbeatUpdate:Disconnect() end if component._steppedUpdate then component._steppedUpdate:Disconnect() end if component._renderSteppedUpdate then component._renderSteppedUpdate:Disconnect() elseif component._renderName then RunService:UnbindFromRenderStep(self._renderName) end InvokeExtensionFn(component, self._extensions, "Stopping") component:Stop() InvokeExtensionFn(component, self._extensions, "Stopped") self.Stopped:Fire(component) end local function TryConstructComponent(instance) if self._instancesToComponents[instance] then return end local component = self:_instantiate(instance) if not component then return end self._instancesToComponents[instance] = component table.insert(self._components, component) task.defer(function() if self._instancesToComponents[instance] == component then StartComponent(component) end end) end local function TryDeconstructComponent(instance) local component = self._instancesToComponents[instance] if not component then return end self._instancesToComponents[instance] = nil local index = table.find(self._components, component) if index then local n = #self._components self._components[index] = self._components[n] self._components[n] = nil end if component._started then task.spawn(StopComponent, component) end end local function StartWatchingInstance(instance) if watchingInstances[instance] then return end local function IsInAncestorList(): boolean for _,parent in ipairs(self._ancestors) do if instance:IsDescendantOf(parent) then return true end end return false end local ancestryChangedHandle = self._trove:Connect(instance.AncestryChanged, function(_, parent) if parent and IsInAncestorList() then TryConstructComponent(instance) else TryDeconstructComponent(instance) end end) watchingInstances[instance] = ancestryChangedHandle if IsInAncestorList() then TryConstructComponent(instance) end end local function InstanceTagged(instance: Instance) StartWatchingInstance(instance) end local function InstanceUntagged(instance: Instance) local watchHandle = watchingInstances[instance] if watchHandle then watchHandle:Disconnect() watchingInstances[instance] = nil end TryDeconstructComponent(instance) end self._trove:Connect(CollectionService:GetInstanceAddedSignal(self.Tag), InstanceTagged) self._trove:Connect(CollectionService:GetInstanceRemovedSignal(self.Tag), InstanceUntagged) local tagged = CollectionService:GetTagged(self.Tag) for _,instance in ipairs(tagged) do task.defer(InstanceTagged, instance) end end
-- Events
local Events = ReplicatedStorage.Events local PlayerEnteredGame = Events.PlayerEnteredGame local PlayerEnteredLobby = Events.PlayerEnteredLobby local UpdatePoints = Events.UpdatePoints
--// All global vars will be wiped/replaced except script
return function(data) local playergui = service.PlayerGui local gui = client.UI.Prepare(script.Parent.Parent) local label = gui.LABEL local str = data.Message local topbar = client.UI.Get("TopBar") client.UI.Remove("Notif",script.Parent.Parent) local log = { Type = "Notif"; Title = "Notif"; Message = str; Icon = "rbxassetid://7501175708"; Time = os.date("%X"); Function = nil; } table.insert(client.Variables.CommunicationsHistory, log) service.Events.CommsPanel:Fire(log) if str and type(str)=="string" then label.Text = str label.Position = UDim2.new(0, 0, 0, ((topbar and 40) or 0) - 35) gTable:Ready() else gui:Destroy() end end
------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- -- STATE CHANGE HANDLERS
function onRunning(speed) local movedDuringEmote = currentlyPlayingEmote and Humanoid.MoveDirection == Vector3.new(0, 0, 0) local speedThreshold = movedDuringEmote and Humanoid.WalkSpeed or 0.75 humanoidSpeed = speed if speed > speedThreshold then playAnimation("walk", 0.2, Humanoid) if pose ~= "Running" then pose = "Running" updateVelocity(0) -- Force velocity update in response to state change end else if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then playAnimation("idle", 0.2, Humanoid) pose = "Standing" end end end function onDied() pose = "Dead" end function onJumping() playAnimation("jump", 0.1, Humanoid) jumpAnimTime = jumpAnimDuration pose = "Jumping" end function onClimbing(speed) local scale = 5.0 playAnimation("climb", 0.1, Humanoid) setAnimationSpeed(speed / scale) pose = "Climbing" end function onGettingUp() pose = "GettingUp" end function onFreeFall() if (jumpAnimTime <= 0) then playAnimation("fall", fallTransitionTime, Humanoid) end pose = "FreeFall" end function onFallingDown() pose = "FallingDown" end function onSeated() pose = "Seated" end function onPlatformStanding() pose = "PlatformStanding" end
-- dayLength defines how long, in minutes, a day in your game is. Feel free to alter it.
local dayLength = 30 local cycleTime = dayLength*60 local minutesInADay = 24*60 local lighting = game:GetService("Lighting") local startTime = tick() - (lighting:getMinutesAfterMidnight() / minutesInADay)*cycleTime local endTime = startTime + cycleTime local timeRatio = minutesInADay / cycleTime if dayLength == 0 then dayLength = 1 end repeat local currentTime = tick() if currentTime > endTime then startTime = endTime endTime = startTime + cycleTime end lighting:setMinutesAfterMidnight((currentTime - startTime)*timeRatio) wait(1/15) until false
--Uberubert
local ting = 0 --debouncer function onTouched(hit) if ting == 0 then --debounce check ting = 1 --activate debounce check = hit.Parent:FindFirstChild("Humanoid") --Find the human that touched the button if check ~= nil then --If a human is found, then local user = game.Players:GetPlayerFromCharacter(hit.Parent) --get player from touching human local stats = user:findFirstChild("leaderstats") --Find moneyholder if stats ~= nil then --If moneyholder exists then local cash = stats:findFirstChild("Cash") local cash2 = stats:findFirstChild("Money") local cash3 = stats:findFirstChild("Points") local cash4 = stats:findFirstChild("Tickets") local cash5 = stats:findFirstChild("Tix") if cash ~= nil then cash.Value = cash.Value +1 script.Parent:Remove() elseif cash2 ~= nil then cash2.Value = cash2.Value +1 script.Parent:Remove() elseif cash3 ~= nil then cash3.Value = cash3.Value +1 script.Parent:Remove() elseif cash4 ~= nil then cash4.Value = cash4.Value +1 script.Parent:Remove() elseif cash5 ~= nil then cash5.Value = cash5.Value +1 script.Parent:Remove() end end end wait() ting = 0 --remove debounce end end script.Parent.Touched:connect(onTouched)
--Made by Luckymaxer
Character = script.Parent BaseColor = BrickColor.new("Bright yellow") Color = BaseColor.Color Duration = 15 Classes = { BasePart = { BrickColor = BaseColor, Material = Enum.Material.Plastic, Reflectance = 0.5, Anchored = true, }, FileMesh = { TextureId = "", }, DataModelMesh = { VertexColor = Vector3.new(Color.r, Color.g, Color.b), }, CharacterMesh = { BaseTextureId = 0, OverlayTextureId = 0, }, Shirt = { ShirtTemplate = "", }, Pants = { PantsTemplate = "", }, Decal = { Texture = "", } } Objects = {} function Redesign(Parent) for i, v in pairs(Parent:GetChildren()) do local Object = { Object = nil, Properties = {}, } for ii, vv in pairs(Classes) do if v:IsA(ii) then Object.Object = v for iii, vvv in pairs(vv) do local PropertyValue = nil pcall(function() PropertyValue = v[iii] v[iii] = vvv end) if PropertyValue then Object.Properties[iii] = PropertyValue end end end end table.insert(Objects, Object) Redesign(v) end end Redesign(script.Parent) --Goldify the player wait(Duration) for i, v in pairs(Objects) do --Unfreeze the player for ii, vv in pairs(v.Properties) do v.Object[ii] = vv end end script:Destroy()
-- Services
local ContextActionService = game:GetService 'ContextActionService' local Workspace = game:GetService 'Workspace' local UserInputService = game:GetService('UserInputService')
-- Decompiled with the Synapse X Luau decompiler.
local v1 = {}; local l__ReplicatedStorage__2 = game.ReplicatedStorage; local v3 = require(game.ReplicatedStorage.Modules.Lightning); local v4 = require(game.ReplicatedStorage.Modules.Xeno); local v5 = require(game.ReplicatedStorage.Modules.CameraShaker); local l__TweenService__6 = game.TweenService; local l__Debris__7 = game.Debris; function v1.RunStompFx(p1, p2, p3, p4) local v8 = game.ReplicatedStorage.KillFX.Rizzler.Sound:Clone(); v8.Parent = p2; v8:Play(); local v9 = game.ReplicatedStorage.KillFX.Rizzler.Thimg:Clone(); v9.Parent = p2; for v10, v11 in pairs(v9:GetDescendants()) do if v11:IsA("TextLabel") then game.TweenService:Create(v11, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), { Rotation = 0, Size = UDim2.fromScale(0.8, 0.8), TextTransparency = 0 }):Play(); elseif v11:IsA("ImageLabel") then game.TweenService:Create(v11, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), { Rotation = 180, ImageTransparency = 0 }):Play(); end; end; task.delay(0.4, function() local v12 = game.ReplicatedStorage.KillFX.Rizzler.ParticleEmitter:Clone(); v12.Parent = p2.Parent.LowerTorso; task.wait(2.5); v12.Enabled = false; for v13, v14 in pairs(v9:GetDescendants()) do if v14:IsA("TextLabel") then game.TweenService:Create(v14, TweenInfo.new(0.8, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { Rotation = 180, Size = UDim2.fromScale(0, 0), TextTransparency = 1 }):Play(); elseif v14:IsA("ImageLabel") then game.TweenService:Create(v14, TweenInfo.new(0.8, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), { Rotation = 0, ImageTransparency = 1 }):Play(); end; end; end); return nil; end; return v1;
-- Animate In, fast
local i_total = 2 local wiggle_total = 0 local wiggle_i = 0.02 for i=1,i_total do overlay.Position = UDim2.new( (-2 + (2 * (i/i_total)) + wiggle_total/2), 0, (-2 + (2 * (i/i_total)) + wiggle_total/2), -22 ) overlay.Size = UDim2.new( (4.5 - (3.5 * (i/i_total)) + wiggle_total), 0, (4.65 - (3.5 * (i/i_total)) + wiggle_total), 30 ) wait(0.01) end i_total = 30 if humanoid then if humanoid:FindFirstChild("creator") then if humanoid:FindFirstChild("creator").Value then if humanoid:FindFirstChild("creator").Value.Character then if humanoid:FindFirstChild("creator").Value.Character:FindFirstChild("Torso") then Indicator:new{} end end end end end wait(0.1)
--Must be placed on StarterPlayer > StarterCharacterScripts
local UserInputService = game:GetService("UserInputService") local Character = script.Parent local Humanoid = Character:WaitForChild("Humanoid") local isRunning = false local Animation = Humanoid:LoadAnimation(script:WaitForChild("Animation")) UserInputService.InputBegan:Connect(function(key) if key.KeyCode == Enum.KeyCode.C then if not isRunning then isRunning = true Animation:Play() else Animation:Stop() isRunning = false end end end)
-- Handling computers calling the frame function
function pcFrame() frame(mouse.Hit.p) end
-- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage") local PlayersService = game:GetService("Players") local UserInputService = game:GetService("UserInputService")
-- Hold:Play()
end end) script.Parent.Unequipped:Connect(function() if PlayIdle then
--[=[ @within Shake @prop Frequency number Frequency of the overall shake. This changes how slow or fast the shake occurs. Defaults to `1`. ]=]
--local bodyPosition = Instance.new("BodyPosition", car.Chassis) --bodyPosition.MaxForce = Vector3.new() --local bodyGyro = Instance.new("BodyGyro", car.Chassis) --bodyGyro.MaxTorque = Vector3.new()
local function UpdateThruster(thruster) -- Raycasting local hit, position = Raycast.new(thruster.Position, thruster.CFrame:vectorToWorldSpace(Vector3.new(0, -1, 0)) * stats.Height.Value) --game.Workspace:FindPartOnRay(ray, car) local thrusterHeight = (position - thruster.Position).magnitude -- Wheel local wheelWeld = thruster:FindFirstChild("WheelWeld") wheelWeld.C0 = CFrame.new(0, -math.min(thrusterHeight, stats.Height.Value * 0.8) + (wheelWeld.Part1.Size.Y / 2), 0) -- Wheel turning local offset = car.Chassis.CFrame:inverse() * thruster.CFrame local speed = car.Chassis.CFrame:vectorToObjectSpace(car.Chassis.Velocity) if offset.Z < 0 then local direction = 1 if speed.Z > 0 then direction = -1 end wheelWeld.C0 = wheelWeld.C0 * CFrame.Angles(0, (car.Chassis.RotVelocity.Y / 2) * direction, 0) end -- Particles if hit and thruster.Velocity.magnitude >= 5 then wheelWeld.Part1.ParticleEmitter.Enabled = true else wheelWeld.Part1.ParticleEmitter.Enabled = false end end car.DriveSeat.Changed:connect(function(property) if property == "Occupant" then if car.DriveSeat.Occupant then car.EngineBlock.Running.Pitch = 1 car.EngineBlock.Running:Play() local player = game.Players:GetPlayerFromCharacter(car.DriveSeat.Occupant.Parent) if player then car.DriveSeat:SetNetworkOwner(player) local localCarScript = script.LocalCarScript:Clone() localCarScript.Parent = player.PlayerGui localCarScript.Car.Value = car localCarScript.Disabled = false end else car.EngineBlock.Running:Stop() end end end)
--[=[ @private @class StaticLegacyLoader ]=]
local loader = script.Parent local ScriptInfoUtils = require(script.Parent.ScriptInfoUtils) local LoaderUtils = require(script.Parent.LoaderUtils) local BounceTemplateUtils = require(script.Parent.BounceTemplateUtils) local StaticLegacyLoader = {} StaticLegacyLoader.ClassName = "StaticLegacyLoader" StaticLegacyLoader.__index = StaticLegacyLoader function StaticLegacyLoader.new() local self = setmetatable({ _packageLookups = {}; }, StaticLegacyLoader) return self end function StaticLegacyLoader:__call(value) return self:Require(value) end function StaticLegacyLoader:Lock() error("Cannot start loader while not running") end function StaticLegacyLoader:Require(root, value) if type(value) == "number" then return require(value) elseif type(value) == "string" then -- use very slow module recovery mechanism local module = self:_findModule(root, value) if module then self:_ensureFakeLoader(module) return require(module) else error("Error: Library '" .. tostring(value) .. "' does not exist.", 2) end elseif typeof(value) == "Instance" and value:IsA("ModuleScript") then return require(value) else error(("Error: module must be a string or ModuleScript, got '%s' for '%s'") :format(typeof(value), tostring(value))) end end function StaticLegacyLoader:_findModule(root, name) assert(typeof(root) == "Instance", "Bad root") assert(type(name) == "string", "Bad name") -- Implement the node_modules recursive find algorithm local packageRoot = self:_findPackageRoot(root) while packageRoot do -- Build lookup local highLevelLookup = self:_getOrCreateLookup(packageRoot) if highLevelLookup[name] then return highLevelLookup[name] end -- Ok, search our package dependencies local dependencies = packageRoot:FindFirstChild(ScriptInfoUtils.DEPENDENCY_FOLDER_NAME) if dependencies then for _, instance in pairs(dependencies:GetChildren()) do if instance:IsA("Folder") and instance.Name:sub(1, 1) == "@" then for _, child in pairs(instance:GetChildren()) do local lookup = self:_getPackageFolderLookup(child) if lookup[name] then return lookup[name] end end else local lookup = self:_getPackageFolderLookup(instance) if lookup[name] then return lookup[name] end end end end -- We failed to find anything... search up a level... packageRoot = self:_findPackageRoot(packageRoot) end return nil end function StaticLegacyLoader:GetLoader(moduleScript) assert(typeof(moduleScript) == "Instance", "Bad moduleScript") return setmetatable({}, { __call = function(_self, value) return self:Require(moduleScript, value) end; __index = function(_self, key) return self:Require(moduleScript, key) end; }) end function StaticLegacyLoader:_getPackageFolderLookup(instance) if instance:IsA("ObjectValue") then if instance.Value then return self:_getOrCreateLookup(instance.Value) else warn("[StaticLegacyLoader] - Bad link in packageFolder") return {} end elseif instance:IsA("Folder") or instance:IsA("Camera") then return self:_getOrCreateLookup(instance) elseif instance:IsA("ModuleScript") then return self:_getOrCreateLookup(instance) else warn(("Unknown instance %q (%s) in dependencyFolder - %q") :format(instance.Name, instance.ClassName, instance:GetFullName())) return {} end end function StaticLegacyLoader:_getOrCreateLookup(packageFolderOrModuleScript) assert(typeof(packageFolderOrModuleScript) == "Instance", "Bad packageFolderOrModuleScript") if self._packageLookups[packageFolderOrModuleScript] then return self._packageLookups[packageFolderOrModuleScript] end local lookup = {} self:_buildLookup(lookup, packageFolderOrModuleScript) self._packageLookups[packageFolderOrModuleScript] = lookup return lookup end function StaticLegacyLoader:_buildLookup(lookup, instance) if instance:IsA("Folder") or instance:IsA("Camera") then if instance.Name ~= ScriptInfoUtils.DEPENDENCY_FOLDER_NAME then for _, item in pairs(instance:GetChildren()) do self:_buildLookup(lookup, item) end end elseif instance:IsA("ModuleScript") then lookup[instance.Name] = instance end end function StaticLegacyLoader:_findPackageRoot(instance) assert(typeof(instance) == "Instance", "Bad instance") local current = instance.Parent while current and current ~= game do if LoaderUtils.isPackage(current) then return current elseif self:_couldBePackageRootTopLevel(current) then return current else current = current.Parent end end return nil end function StaticLegacyLoader:_couldBePackageRootTopLevel(current) for _, instance in pairs(current:GetChildren()) do if instance:IsA("Folder") and instance.Name:sub(1, 1) == "@" then for _, item in pairs(instance:GetChildren()) do if LoaderUtils.isPackage(item) then return true end end end end return true end function StaticLegacyLoader:_ensureFakeLoader(module) assert(typeof(module) == "Instance", "Bad module") local parent = module.Parent if not parent then warn("[StaticLegacyLoader] - No parent") return end -- NexusUnitTest -- luacheck: ignore -- selene: allow(undefined_variable) local shouldBeArchivable = Load and true or false -- Already have link local found = parent:FindFirstChild("loader") if found then if BounceTemplateUtils.isBounceTemplate(found) then found.Archivable = shouldBeArchivable end return end local link = BounceTemplateUtils.create(loader, "loader") link.Archivable = shouldBeArchivable link.Parent = parent end return StaticLegacyLoader
--
local other_valid_group_char = { -- non-capturing group [0x3A] = true, -- lookarounds [0x21] = true, [0x3D] = true, -- atomic [0x3E] = true, -- branch reset [0x7C] = true, }; local function tokenize_ptn(codes, flags) if flags.unicode and not options.unicodeData then return "options.unicodeData cannot be turned off while having unicode flag"; end; local i, len = 1, codes.n; local group_n = 0; local outln, group_id, verb_flags = { }, { }, { newline = 1, newline_seq = 1, not_empty = 0, }; while i <= len do local c = codes[i]; if c == 0x28 then -- Match local ret; if codes[i + 1] == 0x2A then i += 2; local start_i = i; while codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x5A or codes[i] >= 0x61 and codes[i] <= 0x7A or codes[i] == 0x5F or codes[i] == 0x3A) do i += 1; end; if codes[i] ~= 0x29 and codes[i - 1] ~= 0x3A then -- fallback as normal and ( can't be repeated return "quantifier doesn't follow a repeatable pattern"; end; local selected_verb = utf8_sub(codes.s, start_i, i); if selected_verb == "positive_lookahead:" or selected_verb == "negative_lookhead:" or selected_verb == "positive_lookbehind:" or selected_verb == "negative_lookbehind:" or selected_verb:find("^[pn]l[ab]:$") then ret = { 0x28, nil, nil, selected_verb:find('^n') and 0x21 or 0x3D, selected_verb:find('b', 3, true) and 1 }; elseif selected_verb == "atomic:" then ret = { 0x28, nil, nil, 0x3E, nil }; elseif selected_verb == "ACCEPT" or selected_verb == "FAIL" or selected_verb == 'F' or selected_verb == "PRUNE" or selected_verb == "SKIP" then ret = selected_verb == 'F' and "FAIL" or selected_verb; else if line_verbs[selected_verb] then verb_flags.newline = selected_verb; elseif selected_verb == "BSR_ANYCRLF" or selected_verb == "BSR_UNICODE" then verb_flags.newline_seq = selected_verb == "BSR_UNICODE" and 1 or 0; elseif selected_verb == "NOTEMPTY" or selected_verb == "NOTEMPTY_ATSTART" then verb_flags.not_empty = selected_verb == "NOTEMPTY" and 1 or 2; else return "unknown or malformed verb"; end; if outln[1] then return "this verb must be placed at the beginning of the regex"; end; end; elseif codes[i + 1] == 0x3F then -- ? syntax i += 2; if codes[i] == 0x23 then -- comments i = table.find(codes, 0x29, i); if not i then return "unterminated parenthetical"; end; i += 1; continue; elseif not codes[i] then return "unterminated parenthetical"; end; ret = { 0x28, nil, nil, codes[i], nil }; if codes[i] == 0x30 and codes[i + 1] == 0x29 then -- recursive match entire pattern ret[1], ret[2], ret[3], ret[5] = "recurmatch", 0, 0, nil; elseif codes[i] > 0x30 and codes[i] <= 0x39 then -- recursive match local org_i = i; i += 1; while codes[i] >= 0x30 and codes[i] <= 0x30 do i += 1; end; if codes[i] ~= 0x29 then return "invalid group structure"; end; ret[1], ret[2], ret[4] = "recurmatch", tonumber(utf8_sub(codes.s, org_i, i)), nil; elseif codes[i] == 0x3C and codes[i + 1] == 0x21 or codes[i + 1] == 0x3D then -- lookbehinds i += 1; ret[4], ret[5] = codes[i], 1; elseif codes[i] == 0x7C then -- branch reset ret[5] = group_n; elseif codes[i] == 0x50 or codes[i] == 0x3C or codes[i] == 0x27 then if codes[i] == 0x50 then i += 1; end; if codes[i] == 0x3D then -- backref local start_i = i + 1; while codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x5A or codes[i] >= 0x61 and codes[i] <= 0x7A or codes[i] == 0x5F) do i += 1; end; if not codes[i] then return "unterminated parenthetical"; elseif codes[i] ~= 0x29 or i == start_i then return "invalid group structure"; end; ret = { "backref", utf8_sub(codes.s, start_i, i) }; elseif codes[i] == 0x3C or codes[i - 1] ~= 0x50 and codes[i] == 0x27 then -- named capture local delimiter = codes[i] == 0x27 and 0x27 or 0x3E; local start_i = i + 1; i += 1; if codes[i] == 0x29 then return "missing character in subpattern"; elseif codes[i] >= 0x30 and codes[i] <= 0x39 then return "subpattern name must not begin with a digit"; elseif not (codes[i] >= 0x41 and codes[i] <= 0x5A or codes[i] >= 0x61 and codes[i] <= 0x7A or codes[i] == 0x5F) then return "invalid character in subpattern"; end; i += 1; while codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x5A or codes[i] >= 0x61 and codes[i] <= 0x7A or codes[i] == 0x5F) do i += 1; end; if not codes[i] then return "unterminated parenthetical"; elseif codes[i] ~= delimiter then return "invalid character in subpattern"; end; local name = utf8_sub(codes.s, start_i, i); group_n += 1; if (group_id[name] or group_n) ~= group_n then return "subpattern name already exists"; end; for name1, group_n1 in pairs(group_id) do if name ~= name1 and group_n == group_n1 then return "different names for subpatterns of the same number aren't permitted"; end; end; group_id[name] = group_n; ret[2], ret[4] = group_n, nil; else return "invalid group structure"; end; elseif not other_valid_group_char[codes[i]] then return "invalid group structure"; end; else group_n += 1; ret = { 0x28, group_n, nil, nil }; end; if ret then table.insert(outln, ret); end; elseif c == 0x29 then -- Close parenthesis local i1 = #outln + 1; local lookbehind_c = -1; local current_lookbehind_c = 0; local max_c, group_c = 0, 0; repeat i1 -= 1; local v, is_table = outln[i1], type(outln[i1]) == "table"; if is_table and v[1] == 0x28 then group_c += 1; if current_lookbehind_c and v.count then current_lookbehind_c += v.count; end; if not v[3] then if v[4] == 0x7C then group_n = v[5] + math.max(max_c, group_c); end; if current_lookbehind_c ~= lookbehind_c and lookbehind_c ~= -1 then lookbehind_c = nil; else lookbehind_c = current_lookbehind_c; end; break; end; elseif v == alternation then if current_lookbehind_c ~= lookbehind_c and lookbehind_c ~= -1 then lookbehind_c, current_lookbehind_c = nil, nil; else lookbehind_c, current_lookbehind_c = current_lookbehind_c, 0; end; max_c, group_c = math.max(max_c, group_c), 0; elseif current_lookbehind_c then if is_table and v[1] == "quantifier" then if v[2] == v[3] then current_lookbehind_c += v[2]; else current_lookbehind_c = nil; end; else current_lookbehind_c += 1; end; end; until i1 < 1; if i1 < 1 then return "unmatched ) in regular expression"; end; local v = outln[i1]; local outln_len_p_1 = #outln + 1; local ret = { 0x29, v[2], i1, v[4], v[5], count = lookbehind_c }; if (v[4] == 0x21 or v[4] == 0x3D) and v[5] and not lookbehind_c then return "lookbehind assertion is not fixed width"; end; v[3] = outln_len_p_1; table.insert(outln, ret); elseif c == 0x2E then table.insert(outln, dot); elseif c == 0x5B then -- Character set local negate, char_class = false, nil; i += 1; local start_i = i; if codes[i] == 0x5E then negate = true; i += 1; elseif codes[i] == 0x2E or codes[i] == 0x3A or codes[i] == 0x3D then -- POSIX character classes char_class = codes[i]; end; local ret; if codes[i] == 0x5B or codes[i] == 0x5C then ret = { }; else ret = { codes[i] }; i += 1; end; while codes[i] ~= 0x5D do if not codes[i] then return "unterminated character class"; elseif codes[i] == 0x2D and ret[1] and type(ret[1]) == "number" then if codes[i + 1] == 0x5D then table.insert(ret, 1, 0x2D); else i += 1; local ret_c = codes[i]; if ret_c == 0x5B then if codes[i + 1] == 0x2E or codes[i + 1] == 0x3A or codes[i + 1] == 0x3D then -- Check for POSIX character class, name does not matter local i1 = i + 2; repeat i1 = table.find(codes, 0x5D, i1); until not i1 or codes[i1 - 1] ~= 0x5C; if not i1 then return "unterminated character class"; elseif codes[i1 - 1] == codes[i + 1] and i1 - 1 ~= i + 1 then return "invalid range in character class"; end; end; if ret[1] > 0x5B then return "invalid range in character class"; end; elseif ret_c == 0x5C then i += 1; if codes[i] == 0x78 then local radix0, radix1; i += 1; if codes[i] and codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66 then radix0 = codes[i] - ((codes[i] >= 0x41 and codes[i] <= 0x5A) and 0x37 or (codes[i] >= 0x61 and codes[i] <= 0x7A) and 0x57 or 0x30); i += 1; if codes[i] and codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66 then radix1 = codes[i] - ((codes[i] >= 0x41 and codes[i] <= 0x5A) and 0x37 or (codes[i] >= 0x61 and codes[i] <= 0x7A) and 0x57 or 0x30); else i -= 1; end; else i -= 1; end; ret_c = radix0 and (radix1 and 16 * radix0 + radix1 or radix0) or 0; elseif codes[i] >= 0x30 and codes[i] <= 0x37 then local radix0, radix1, radix2 = codes[i] - 0x30, nil, nil; i += 1; if codes[i] and codes[i] >= 0x30 and codes[i] <= 0x37 then radix1 = codes[i] - 0x30; i += 1; if codes[i] and codes[i] >= 0x30 and codes[i] <= 0x37 then radix2 = codes[i] - 0x30; else i -= 1; end; else i -= 1; end; ret_c = radix1 and (radix2 and 64 * radix0 + 8 * radix1 + radix2 or 8 * radix0 + radix1) or radix0; else ret_c = escape_chars[codes[i]] or codes[i]; if type(ret_c) ~= "number" then return "invalid range in character class"; end; end; elseif ret[1] > ret_c then return "invalid range in character class"; end; ret[1] = { "range", ret[1], ret_c }; end; elseif codes[i] == 0x5B then if codes[i + 1] == 0x2E or codes[i + 1] == 0x3A or codes[i + 1] == 0x3D then local i1 = i + 2; repeat i1 = table.find(codes, 0x5D, i1); until not i1 or codes[i1 - 1] ~= 0x5C; if not i1 then return "unterminated character class"; elseif codes[i1 - 1] ~= codes[i + 1] or i1 - 1 == i + 1 then table.insert(ret, 1, 0x5B); elseif codes[i1 - 1] == 0x2E or codes[i1 - 1] == 0x3D then return "POSIX collating elements aren't supported"; elseif codes[i1 - 1] == 0x3A then -- I have no plans to support escape codes (\) in character class names local negate = codes[i + 3] == 0x5E; local class_name = utf8_sub(codes.s, i + (negate and 3 or 2), i1 - 1); -- If not valid then throw an error if not posix_class_names[class_name] then return "unknown POSIX class name"; end; table.insert(ret, 1, { "class", class_name, negate }); i = i1; end; else table.insert(ret, 1, 0x5B); end; elseif codes[i] == 0x5C then i += 1; if codes[i] == 0x78 then local radix0, radix1; i += 1; if codes[i] == 0x7B then i += 1; local org_i = i; while codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66) do i += 1; end; if codes[i] ~= 0x7D or i == org_i then return "malformed hexadecimal character"; elseif i - org_i > 4 then return "character offset too large"; end; table.insert(ret, 1, tonumber(utf8_sub(codes.s, org_i, i), 16)); else if codes[i] and codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66 then radix0 = codes[i] - ((codes[i] >= 0x41 and codes[i] <= 0x5A) and 0x37 or (codes[i] >= 0x61 and codes[i] <= 0x7A) and 0x57 or 0x30); i += 1; if codes[i] and codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66 then radix1 = codes[i] - ((codes[i] >= 0x41 and codes[i] <= 0x5A) and 0x37 or (codes[i] >= 0x61 and codes[i] <= 0x7A) and 0x57 or 0x30); else i -= 1; end; else i -= 1; end; table.insert(ret, 1, radix0 and (radix1 and 16 * radix0 + radix1 or radix0) or 0); end; elseif codes[i] >= 0x30 and codes[i] <= 0x37 then local radix0, radix1, radix2 = codes[i] - 0x30, nil, nil; i += 1; if codes[i] and codes[i] >= 0x30 and codes[i] <= 0x37 then radix1 = codes[i] - 0x30; i += 1; if codes[i] and codes[i] >= 0x30 and codes[i] <= 0x37 then radix2 = codes[i] - 0x30; else i -= 1; end; else i -= 1; end; table.insert(ret, 1, radix1 and (radix2 and 64 * radix0 + 8 * radix1 + radix2 or 8 * radix0 + radix1) or radix0); elseif codes[i] == 0x45 then -- intentionally left blank, \E that's not preceded \Q is ignored elseif codes[i] == 0x51 then local start_i = i + 1; repeat i = table.find(codes, 0x5C, i + 1); until not i or codes[i + 1] == 0x45; table.move(codes, start_i, i and i - 1 or #codes, #outln + 1, outln); if not i then break; end; i += 1; elseif codes[i] == 0x4E then if codes[i + 1] == 0x7B and codes[i + 2] == 0x55 and codes[i + 3] == 0x2B and flags.unicode then i += 4; local start_i = i; while codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66) do i += 1; end; if codes[i] ~= 0x7D or i == start_i then return "malformed Unicode code point"; end; local code_point = tonumber(utf8_sub(codes.s, start_i, i)); table.insert(ret, 1, code_point); else return "invalid escape sequence"; end; elseif codes[i] == 0x50 or codes[i] == 0x70 then if not options.unicodeData then return "options.unicodeData cannot be turned off when using \\p"; end; i += 1; if codes[i] ~= 0x7B then local c_name = utf8.char(codes[i] or 0); if not valid_categories[c_name] then return "unknown or malformed script name"; end; table.insert(ret, 1, { "category", false, c_name }); else local negate = codes[i] == 0x50; i += 1; if codes[i] == 0x5E then i += 1; negate = not negate; end; local start_i = i; while codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x5A or codes[i] >= 0x61 and codes[i] <= 0x7A or codes[i] == 0x5F) do i += 1; end; if codes[i] ~= 0x7D then return "unknown or malformed script name"; end; local c_name = utf8_sub(codes.s, start_i, i); local script_set = chr_scripts[c_name]; if script_set then table.insert(ret, 1, { "charset", negate, script_set }); elseif not valid_categories[c_name] then return "unknown or malformed script name"; else table.insert(ret, 1, { "category", negate, c_name }); end; end; elseif codes[i] == 0x6F then i += 1; if codes[i] ~= 0x7B then return "malformed octal code"; end; i += 1; local org_i = i; while codes[i] and codes[i] >= 0x30 and codes[i] <= 0x37 do i += 1; end; if codes[i] ~= 0x7D or i == org_i then return "malformed octal code"; end; local ret_chr = tonumber(utf8_sub(codes.s, org_i, i), 8); if ret_chr > 0xFFFF then return "character offset too large"; end; table.insert(ret, 1, ret_chr); else local esc_char = escape_chars[codes[i]]; table.insert(ret, 1, type(esc_char) == "string" and { "class", esc_char, false } or esc_char or codes[i]); end; elseif flags.ignoreCase and codes[i] >= 0x61 and codes[i] <= 0x7A then table.insert(ret, 1, codes[i] - 0x20); else table.insert(ret, 1, codes[i]); end; i += 1; end; if codes[i - 1] == char_class and i - 1 ~= start_i then return char_class == 0x3A and "POSIX named classes are only support within a character set" or "POSIX collating elements aren't supported"; end; if not ret[2] and not negate then table.insert(outln, ret[1]); else table.insert(outln, { "charset", negate, ret }); end; elseif c == 0x5C then -- Escape char i += 1; local escape_c = codes[i]; if not escape_c then return "pattern may not end with a trailing backslash"; elseif escape_c >= 0x30 and escape_c <= 0x39 then local org_i = i; while codes[i + 1] and codes[i + 1] >= 0x30 and codes[i + 1] <= 0x39 do i += 1; end; local escape_d = tonumber(utf8_sub(codes.s, org_i, i + 1)); if escape_d > group_n and i ~= org_i then i = org_i; local radix0, radix1, radix2; if codes[i] <= 0x37 then radix0 = codes[i] - 0x30; i += 1; if codes[i] and codes[i] >= 0x30 and codes[i] <= 0x37 then radix1 = codes[i] - 0x30; i += 1; if codes[i] and codes[i] >= 0x30 and codes[i] <= 0x37 then radix2 = codes[i] - 0x30; else i -= 1; end; else i -= 1; end; end; table.insert(outln, radix0 and (radix1 and (radix2 and 64 * radix0 + 8 * radix1 + radix2 or 8 * radix0 + radix1) or radix0) or codes[org_i]); else table.insert(outln, { "backref", escape_d }); end; elseif escape_c == 0x45 then -- intentionally left blank, \E that's not preceded \Q is ignored elseif escape_c == 0x51 then local start_i = i + 1; repeat i = table.find(codes, 0x5C, i + 1); until not i or codes[i + 1] == 0x45; table.move(codes, start_i, i and i - 1 or #codes, #outln + 1, outln); if not i then break; end; i += 1; elseif escape_c == 0x4E then if codes[i + 1] == 0x7B and codes[i + 2] == 0x55 and codes[i + 3] == 0x2B and flags.unicode then i += 4; local start_i = i; while codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66) do i += 1; end; if codes[i] ~= 0x7D or i == start_i then return "malformed Unicode code point"; end; local code_point = tonumber(utf8_sub(codes.s, start_i, i)); table.insert(outln, code_point); else table.insert(outln, escape_chars[0x4E]); end; elseif escape_c == 0x50 or escape_c == 0x70 then if not options.unicodeData then return "options.unicodeData cannot be turned off when using \\p"; end; i += 1; if codes[i] ~= 0x7B then local c_name = utf8.char(codes[i] or 0); if not valid_categories[c_name] then return "unknown or malformed script name"; end; table.insert(outln, { "category", false, c_name }); else local negate = escape_c == 0x50; i += 1; if codes[i] == 0x5E then i += 1; negate = not negate; end; local start_i = i; while codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x5A or codes[i] >= 0x61 and codes[i] <= 0x7A or codes[i] == 0x5F) do i += 1; end; if codes[i] ~= 0x7D then return "unknown or malformed script name"; end; local c_name = utf8_sub(codes.s, start_i, i); local script_set = chr_scripts[c_name]; if script_set then table.insert(outln, { "charset", negate, script_set }); elseif not valid_categories[c_name] then return "unknown or malformed script name"; else table.insert(outln, { "category", negate, c_name }); end; end; elseif escape_c == 0x67 and (codes[i + 1] == 0x7B or codes[i + 1] >= 0x30 and codes[i + 1] <= 0x39) then local is_grouped = false; i += 1; if codes[i] == 0x7B then i += 1; is_grouped = true; elseif codes[i] < 0x30 or codes[i] > 0x39 then return "malformed reference code"; end; local org_i = i; while codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66) do i += 1; end; if is_grouped and codes[i] ~= 0x7D then return "malformed reference code"; end; local ref_name = tonumber(utf8_sub(codes.s, org_i, i + (is_grouped and 0 or 1))); table.insert(outln, { "backref", ref_name }); if not is_grouped then i -= 1; end; elseif escape_c == 0x6F then i += 1; if codes[i + 1] ~= 0x7B then return "malformed octal code"; end i += 1; local org_i = i; while codes[i] and codes[i] >= 0x30 and codes[i] <= 0x37 do i += 1; end; if codes[i] ~= 0x7D or i == org_i then return "malformed octal code"; end; local ret_chr = tonumber(utf8_sub(codes.s, org_i, i), 8); if ret_chr > 0xFFFF then return "character offset too large"; end; table.insert(outln, ret_chr); elseif escape_c == 0x78 then local radix0, radix1; i += 1; if codes[i] == 0x7B then i += 1; local org_i = i; while codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66) do i += 1; end; if codes[i] ~= 0x7D or i == org_i then return "malformed hexadecimal code"; elseif i - org_i > 4 then return "character offset too large"; end; table.insert(outln, tonumber(utf8_sub(codes.s, org_i, i), 16)); else if codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66) then radix0 = codes[i] - ((codes[i] >= 0x41 and codes[i] <= 0x5A) and 0x37 or (codes[i] >= 0x61 and codes[i] <= 0x7A) and 0x57 or 0x30); i += 1; if codes[i] and (codes[i] >= 0x30 and codes[i] <= 0x39 or codes[i] >= 0x41 and codes[i] <= 0x46 or codes[i] >= 0x61 and codes[i] <= 0x66) then radix1 = codes[i] - ((codes[i] >= 0x41 and codes[i] <= 0x5A) and 0x37 or (codes[i] >= 0x61 and codes[i] <= 0x7A) and 0x57 or 0x30); else i -= 1; end; else i -= 1; end; table.insert(outln, radix0 and (radix1 and 16 * radix0 + radix1 or radix0) or 0); end; else local esc_char = b_escape_chars[escape_c] or escape_chars[escape_c]; table.insert(outln, esc_char or escape_c); end; elseif c == 0x2A or c == 0x2B or c == 0x3F or c == 0x7B then -- Quantifier local start_q, end_q; if c == 0x7B then local org_i = i + 1; local start_i; while codes[i + 1] and (codes[i + 1] >= 0x30 and codes[i + 1] <= 0x39 or codes[i + 1] == 0x2C and not start_i and i + 1 ~= org_i) do i += 1; if codes[i] == 0x2C then start_i = i; end; end; if codes[i + 1] == 0x7D then i += 1; if not start_i then start_q = tonumber(utf8_sub(codes.s, org_i, i)); end_q = start_q; else start_q, end_q = tonumber(utf8_sub(codes.s, org_i, start_i)), start_i + 1 == i and math.huge or tonumber(utf8_sub(codes.s, start_i + 1, i)); if end_q < start_q then return "numbers out of order in {} quantifier"; end; end; else table.move(codes, org_i - 1, i, #outln + 1, outln); end; else start_q, end_q = c == 0x2B and 1 or 0, c == 0x3F and 1 or math.huge; end; if start_q then local quantifier_type = flags.ungreedy and "lazy" or "greedy"; if codes[i + 1] == 0x2B or codes[i + 1] == 0x3F then i += 1; quantifier_type = codes[i] == 0x2B and "possessive" or flags.ungreedy and "greedy" or "lazy"; end; local outln_len = #outln; local last_outln_value = outln[outln_len]; if not last_outln_value or type(last_outln_value) == "table" and (last_outln_value[1] == "quantifier" or last_outln_value[1] == 0x28 or b_escape_chars[last_outln_value[1]]) or last_outln_value == alternation or type(last_outln_value) == "string" then return "quantifier doesn't follow a repeatable pattern"; end; if end_q == 0 then table.remove(outln); elseif start_q ~= 1 or end_q ~= 1 then if type(last_outln_value) == "table" and last_outln_value[1] == 0x29 then outln_len = last_outln_value[3]; end; outln[outln_len] = { "quantifier", start_q, end_q, quantifier_type, outln[outln_len] }; end; end; elseif c == 0x7C then -- Alternation table.insert(outln, alternation); local i1 = #outln; repeat i1 -= 1; local v1, is_table = outln[i1], type(outln[i1]) == "table"; if is_table and v1[1] == 0x29 then i1 = outln[i1][3]; elseif is_table and v1[1] == 0x28 then if v1[4] == 0x7C then group_n = v1[5]; end; break; end; until not v1; elseif c == 0x24 or c == 0x5E then table.insert(outln, c == 0x5E and beginning_str or end_str); elseif flags.ignoreCase and c >= 0x61 and c <= 0x7A then table.insert(outln, c - 0x20); elseif flags.extended and (c >= 0x09 and c <= 0x0D or c == 0x20 or c == 0x23) then if c == 0x23 then repeat i += 1; until not codes[i] or codes[i] == 0x0A or codes[i] == 0x0D; end; else table.insert(outln, c); end; i += 1; end; local max_group_n = 0; for i, v in ipairs(outln) do if type(v) == "table" and (v[1] == 0x28 or v[1] == "quantifier" and type(v[5]) == "table" and v[5][1] == 0x28) then if v[1] == "quantifier" then v = v[5]; end; if not v[3] then return "unterminated parenthetical"; elseif v[2] then max_group_n = math.max(max_group_n, v[2]); end; elseif type(v) == "table" and (v[1] == "backref" or v[1] == "recurmatch") then if not group_id[v[2]] and (type(v[2]) ~= "number" or v[2] > group_n) then return "reference to a non-existent or invalid subpattern"; elseif v[1] == "recurmatch" and v[2] ~= 0 then for i1, v1 in ipairs(outln) do if type(v1) == "table" and v1[1] == 0x28 and v1[2] == v[2] then v[3] = i1; break; end; end; elseif type(v[2]) == "string" then v[2] = group_id[v[2]]; end; end; end; outln.group_n = max_group_n; return outln, group_id, verb_flags; end; if not tonumber(options.cacheSize) then error(string.format("expected number for options.cacheSize, got %s", typeof(options.cacheSize)), 2); end; local cacheSize = math.floor(options.cacheSize or 0) ~= 0 and tonumber(options.cacheSize); local cache_pattern, cache_pattern_names; if not cacheSize then elseif cacheSize < 0 or cacheSize ~= cacheSize then error("cache size cannot be a negative number or a NaN", 2); elseif cacheSize == math.huge then cache_pattern, cache_pattern_names = { nil }, { nil }; elseif cacheSize >= 2 ^ 32 then error("cache size too large", 2); else cache_pattern, cache_pattern_names = table.create(options.cacheSize), table.create(options.cacheSize); end; if cacheSize then function re.pruge() table.clear(cache_pattern_names); table.clear(cache_pattern); end; end; local function new_re(str_arr, flags, flag_repr, pattern_repr) local tokenized_ptn, group_id, verb_flags; local cache_format = cacheSize and string.format("%s|%s", str_arr.s, flag_repr); local cached_token = cacheSize and cache_pattern[table.find(cache_pattern_names, cache_format)]; if cached_token then tokenized_ptn, group_id, verb_flags = table.unpack(cached_token, 1, 3); else tokenized_ptn, group_id, verb_flags = tokenize_ptn(str_arr, flags); if type(tokenized_ptn) == "string" then error(tokenized_ptn, 2); end; if cacheSize and tokenized_ptn[1] then table.insert(cache_pattern_names, 1, cache_format); table.insert(cache_pattern, 1, { tokenized_ptn, group_id, verb_flags }); if cacheSize ~= math.huge then table.remove(cache_pattern_names, cacheSize + 1); table.remove(cache_pattern, cacheSize + 1); end; end; end; local object = newproxy(true); proxy[object] = { name = "RegEx", flags = flags, flag_repr = flag_repr, pattern_repr = pattern_repr, token = tokenized_ptn, group_id = group_id, verb_flags = verb_flags }; local object_mt = getmetatable(object); object_mt.__index = setmetatable(flags, re_m); object_mt.__tostring = re_tostr; object_mt.__metatable = lockmsg; return object; end; local function escape_fslash(pre) return (#pre % 2 == 0 and '\\' or '') .. pre .. '.'; end; local function sort_flag_chr(a, b) return a:lower() < b:lower(); end; function re.new(...) if select('#', ...) == 0 then error("missing argument #1 (string expected)", 2); end; local ptn, flags_str = ...; if type(ptn) == "number" then ptn ..= ''; elseif type(ptn) ~= "string" then error(string.format("invalid argument #1 (string expected, got %s)", typeof(ptn)), 2); end; if type(flags_str) ~= "string" and type(flags_str) ~= "number" and flags_str ~= nil then error(string.format("invalid argument #2 (string expected, got %s)", typeof(flags_str)), 2); end; local flags = { anchored = false, caseless = false, multiline = false, dotall = false, unicode = false, ungreedy = false, extended = false, }; local flag_repr = { }; for f in string.gmatch(flags_str or '', utf8.charpattern) do if flags[flag_map[f]] ~= false then error("invalid regular expression flag " .. f, 3); end; flags[flag_map[f]] = true; table.insert(flag_repr, f); end; table.sort(flag_repr, sort_flag_chr); flag_repr = table.concat(flag_repr); return new_re(to_str_arr(ptn), flags, flag_repr, string.format("/%s/", ptn:gsub("(\\*)/", escape_fslash))); end; function re.fromstring(...) if select('#', ...) == 0 then error("missing argument #1 (string expected)", 2); end; local ptn = ...; if type(ptn) == "number" then ptn ..= ''; elseif type(ptn) ~= "string" then error(string.format("invalid argument #1 (string expected, got %s)", typeof(ptn), 2)); end; local str_arr = to_str_arr(ptn); local delimiter = str_arr[1]; if not delimiter then error("empty regex", 2); elseif delimiter == 0x5C or (delimiter >= 0x30 and delimiter <= 0x39) or (delimiter >= 0x41 and delimiter <= 0x5A) or (delimiter >= 0x61 and delimiter <= 0x7A) then error("delimiter must not be alphanumeric or a backslash", 2); end; local i0 = 1; repeat i0 = table.find(str_arr, delimiter, i0 + 1); if not i0 then error(string.format("no ending delimiter ('%s') found", utf8.char(delimiter)), 2); end; local escape_count = 1; while str_arr[i0 - escape_count] == 0x5C do escape_count += 1; end; until escape_count % 2 == 1; local flags = { anchored = false, caseless = false, multiline = false, dotall = false, unicode = false, ungreedy = false, extended = false, }; local flag_repr = { }; while str_arr.n > i0 do local f = utf8.char(table.remove(str_arr)); str_arr.n -= 1; if flags[flag_map[f]] ~= false then error("invalid regular expression flag " .. f, 3); end; flags[flag_map[f]] = true; table.insert(flag_repr, f); end; table.sort(flag_repr, sort_flag_chr); flag_repr = table.concat(flag_repr); table.remove(str_arr, 1); table.remove(str_arr); str_arr.n -= 2; str_arr.s = string.sub(str_arr.s, 2, 1 + str_arr.n); return new_re(str_arr, flags, flag_repr, string.sub(ptn, 1, 2 + str_arr.n)); end; local re_escape_line_chrs = { ['\0'] = '\\x00', ['\n'] = '\\n', ['\t'] = '\\t', ['\r'] = '\\r', ['\f'] = '\\f', }; function re.escape(...) if select('#', ...) == 0 then error("missing argument #1 (string expected)", 2); end; local str, extended, delimiter = ...; if type(str) == "number" then str ..= ''; elseif type(str) ~= "string" then error(string.format("invalid argument #1 to 'escape' (string expected, got %s)", typeof(str)), 2); end; if delimiter == nil then delimiter = ''; elseif type(delimiter) == "number" then delimiter ..= ''; elseif type(delimiter) ~= "string" then error(string.format("invalid argument #3 to 'escape' (string expected, got %s)", typeof(delimiter)), 2); end; if utf8.len(delimiter) > 1 or delimiter:match("^[%a\\]$") then error("delimiter have not be alphanumeric", 2); end; return (string.gsub(str, "[\0\f\n\r\t]", re_escape_line_chrs):gsub(string.format("[\\%s#()%%%%*+.?[%%]^{|%s]", extended and '%s' or '', (delimiter:find'^[%%%]]$' and '%' or '') .. delimiter), "\\%1")); end; function re.type(...) if select('#', ...) == 0 then error("missing argument #1", 2); end; return proxy[...] and proxy[...].name; end; for k, f in pairs(re_m) do re[k] = f; end; re_m = { __index = re_m }; lockmsg = re.fromstring([[/The\s*metatable\s*is\s*(?:locked|inaccessible)(?#Nice try :])/i]]); getmetatable(lockmsg).__metatable = lockmsg; local function readonly_table() error("Attempt to modify a readonly table", 2); end; match_m = { __index = match_m, __metatable = lockmsg, __newindex = readonly_table, }; re.Match = setmetatable({ }, match_m); return setmetatable({ }, { __index = re, __metatable = lockmsg, __newindex = readonly_table, });
-- ROBLOX Services
local Players = game.Players local PointsService = game:GetService('PointsService')
--[[ script.Parent.TouchEnded:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent:FindFirstChild("Humanoid").Health > 0 then if hit.Parent:FindFirstChild("Side") ~= nil then workspace.Variables.AllyHasOBJ.Value = false workspace.Variables.EnmHasOBJ.Value = false script.Parent.BrickColor = BrickColor.new("Institutional white") end end end) ]]
-------- OMG HAX
r = game:service("RunService") local damage = 5 local slash_damage = 10 local lunge_damage = 15 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" SlashSound.Parent = sword SlashSound.Volume = .7 local LungeSound = Instance.new("Sound") LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav" LungeSound.Parent = sword LungeSound.Volume = .6 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 local isDeadly = false function toggleDeadly(on) isDeadly = on if (on == true) then Tool.Handle.BrickColor = BrickColor.new(23) else Tool.Handle.BrickColor = BrickColor.new(1) end end function FreezeKill(character, humanoid, attacker) if (character:FindFirstChild("ForceField") ~= nil) then return end if (character:FindFirstChild("Firebrand") ~= nil) then return end -- make sure this dude dies (edge case when ice dagger wielder gets killed, we may not get back here) local dies = script.MakeSureDudeDies:clone() dies.Disabled = false dies.Parent = character local childs = character:GetChildren() local colors = {} for i=1,#childs do if (childs[i].className == "Part") then colors[i] = childs[i].BrickColor childs[i].BrickColor = BrickColor.new(11) childs[i].Transparency = .5 childs[i].Anchored = true end end wait(2) for i=1,#childs do if (childs[i].className == "Part") then childs[i].Anchored = false end end tagHumanoid(humanoid, attacker) humanoid.Health = 0 end function blow(hit) local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then if (isDeadly == true) then FreezeKill(humanoid.Parent, humanoid, vPlayer) else tagHumanoid(humanoid, vPlayer) humanoid:TakeDamage(damage) end end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid game.Debris:AddItem(creator_tag, 1) end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function lunge() damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = Tool local force = Instance.new("BodyVelocity") force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 force.Parent = Tool.Parent.Torso wait(.25) swordOut() wait(.25) force.Parent = nil wait(.5) swordUp() damage = slash_damage end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end function swordAcross() -- parry end Tool.Enabled = true local last_attack = 0 function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end t = r.Stepped:wait() if (t - last_attack < .2) then lunge() else attack() end last_attack = t --wait(.5) Tool.Enabled = true end function onEquipped() toggleDeadly(false) wait(3) toggleDeadly(true) UnsheathSound:play() end function onUnequipped() toggleDeadly(false) end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) script.Parent.Unequipped:connect(onUnequipped) connection = sword.Touched:connect(blow)
--Put this Script Under Replicated First--
local Player = game.Players.LocalPlayer local ReplicatedFirst = script.Parent local PlayerGui = Player:WaitForChild("PlayerGui") local LoadingScreen = script.LoadingScreen LoadingScreen.Parent = PlayerGui ReplicatedFirst:RemoveDefaultLoadingScreen() game.Loaded:Wait() LoadingScreen.BackFrame.PlayButton.Visible = true
-- functions
local function XPForLevel(level) return math.floor(300 + (level/100)^4 * 300) end local function UpdateLevels(player) local playerData = PLAYER_DATA:FindFirstChild(player.Name) if playerData then local ranking = playerData.Ranking local battlePass = playerData.BattlePass if ranking.CurrentSeason.Value == CURRENT_SEASON then -- update level from xp local lastLevel = ranking.Level.Value repeat local requiredXP = XPForLevel(ranking.Level.Value + 1) if ranking.LevelXP.Value >= requiredXP then ranking.LevelXP.Value = ranking.LevelXP.Value - requiredXP ranking.Level.Value = ranking.Level.Value + 1 script.Parent.BattlePassScript.LevelUp:Fire(player, ranking.Level.Value) end until ranking.LevelXP.Value < requiredXP if ranking.Level.Value > lastLevel then REMOTES.LevelUp:FireClient(player) end else -- transfer level to rank ranking.Rank.Value = ranking.Rank.Value + ranking.Level.Value -- reset level and level xp ranking.Level.Value = 0 ranking.LevelXP.Value = 0 -- reset xp boost battlePass.XPBoost.Value = 0 -- update to current season ranking.CurrentSeason.Value = CURRENT_SEASON end end end local function SkipTier(player) local playerData = PLAYER_DATA:FindFirstChild(player.Name) if playerData then if playerData.Ranking.Level.Value < 100 then playerData.Ranking.Level.Value = playerData.Ranking.Level.Value + 1 script.Parent.BattlePassScript.LevelUp:Fire(player, playerData.Ranking.Level.Value) REMOTES.LevelUp:FireClient(player) return true end end return false end
-- REMOTES --
local SkillsHandler = script.RemoteEvent
-- << DRAG BARS >>
local dragFrames = {main.gui.MainFrame} local frameDragging local dragStart local startPos local function dragFrame(input, frame) local delta = input.Position - dragStart frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) if frame.AbsolutePosition.Y < 0 then frame.Position = frame.Position + UDim2.new(0,0,0,-frame.AbsolutePosition.Y) end end function module:MakeFrameDraggable(frame) local dragFrame = frame.DragBar.Drag dragFrame.InputBegan:Connect(function(input) if input.UserInputType == clickInput or input.UserInputType == touchInput then frameDragging = frame dragStart = input.Position startPos = frame.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then frameDragging = nil end end) end end) end for _,frame in pairs(dragFrames) do module:MakeFrameDraggable(frame) end
--Simultaneous Turn 1--: Simultaneous left turn for "SignalTurn1" and "SignalTurn1a" during a red light for all.
--USES: Signal1, Signal1a, Signal2, Signal2a(Optional), Turn1, Turn1a while true do PedValues = script.Parent.Parent.PedValues SignalValues = script.Parent.Parent.SignalValues TurnValues = script.Parent.Parent.TurnValues
--[[ The ClickToMove Controller Class ]]
-- local KeyboardController = require(script.Parent:WaitForChild("Keyboard")) local ClickToMove = setmetatable({}, KeyboardController) ClickToMove.__index = ClickToMove function ClickToMove.new(CONTROL_ACTION_PRIORITY) local self = setmetatable(KeyboardController.new(CONTROL_ACTION_PRIORITY), ClickToMove) self.fingerTouches = {} self.numUnsunkTouches = 0 -- PC simulation self.mouse1Down = tick() self.mouse1DownPos = Vector2.new() self.mouse2DownTime = tick() self.mouse2DownPos = Vector2.new() self.mouse2UpTime = tick() self.keyboardMoveVector = ZERO_VECTOR3 self.tapConn = nil self.inputBeganConn = nil self.inputChangedConn = nil self.inputEndedConn = nil self.humanoidDiedConn = nil self.characterChildAddedConn = nil self.onCharacterAddedConn = nil self.characterChildRemovedConn = nil self.renderSteppedConn = nil self.menuOpenedConnection = nil self.running = false self.wasdEnabled = false return self end function ClickToMove:DisconnectEvents() DisconnectEvent(self.tapConn) DisconnectEvent(self.inputBeganConn) DisconnectEvent(self.inputChangedConn) DisconnectEvent(self.inputEndedConn) DisconnectEvent(self.humanoidDiedConn) DisconnectEvent(self.characterChildAddedConn) DisconnectEvent(self.onCharacterAddedConn) DisconnectEvent(self.renderSteppedConn) DisconnectEvent(self.characterChildRemovedConn) DisconnectEvent(self.meedConnection) end function ClickToMove:OnTouchBegan(input, processed) if self.fingerTouches[input] == nil and not processed then self.numUnsunkTouches = self.numUnsunkTouches + 1 end self.fingerTouches[input] = processed end function ClickToMove:OnTouchChanged(input, processed) if self.fingerTouches[input] == nil then self.fingerTouches[input] = processed if not processed then self.numUnsunkTouches = self.numUnsunkTouches + 1 end end end function ClickToMove:OnTouchEnded(input, processed) if self.fingerTouches[input] ~= nil and self.fingerTouches[input] == false then self.numUnsunkTouches = self.numUnsunkTouches - 1 end self.fingerTouches[input] = nil end function ClickToMove:OnCharacterAdded(character) self:DisconnectEvents() self.inputBeganConn = UserInputService.InputBegan:Connect(function(input, processed) if input.UserInputType == Enum.UserInputType.Touch then self:OnTouchBegan(input, processed) end -- Cancel path when you use the keyboard controls if wasd is enabled. if self.wasdEnabled and processed == false and input.UserInputType == Enum.UserInputType.Keyboard and movementKeys[input.KeyCode] then CleanupPath() ClickToMoveDisplay.CancelFailureAnimation() end if input.UserInputType == Enum.UserInputType.MouseButton1 then self.mouse1DownTime = tick() self.mouse1DownPos = input.Position end if input.UserInputType == Enum.UserInputType.MouseButton2 then self.mouse2DownTime = tick() self.mouse2DownPos = input.Position end end) self.inputChangedConn = UserInputService.InputChanged:Connect(function(input, processed) if input.UserInputType == Enum.UserInputType.Touch then self:OnTouchChanged(input, processed) end end) self.inputEndedConn = UserInputService.InputEnded:Connect(function(input, processed) if input.UserInputType == Enum.UserInputType.Touch then self:OnTouchEnded(input, processed) end if input.UserInputType == Enum.UserInputType.MouseButton2 then self.mouse2UpTime = tick() local currPos = input.Position -- We allow click to move during path following or if there is no keyboard movement local allowed = ExistingPather or self.keyboardMoveVector.Magnitude <= 0 if self.mouse2UpTime - self.mouse2DownTime < 0.25 and (currPos - self.mouse2DownPos).magnitude < 5 and allowed then local positions = {currPos} OnTap(positions) end end end) self.tapConn = UserInputService.TouchTap:Connect(function(touchPositions, processed) if not processed then OnTap(touchPositions, nil, true) end end) self.menuOpenedConnection = GuiService.MenuOpened:Connect(function() CleanupPath() end) local function OnCharacterChildAdded(child) if UserInputService.TouchEnabled then if child:IsA('Tool') then child.ManualActivationOnly = true end end if child:IsA('Humanoid') then DisconnectEvent(self.humanoidDiedConn) self.humanoidDiedConn = child.Died:Connect(function() if ExistingIndicator then DebrisService:AddItem(ExistingIndicator.Model, 1) end end) end end self.characterChildAddedConn = character.ChildAdded:Connect(function(child) OnCharacterChildAdded(child) end) self.characterChildRemovedConn = character.ChildRemoved:Connect(function(child) if UserInputService.TouchEnabled then if child:IsA('Tool') then child.ManualActivationOnly = false end end end) for _, child in pairs(character:GetChildren()) do OnCharacterChildAdded(child) end end function ClickToMove:Start() self:Enable(true) end function ClickToMove:Stop() self:Enable(false) end function ClickToMove:CleanupPath() CleanupPath() end function ClickToMove:Enable(enable, enableWASD, touchJumpController) if enable then if not self.running then if Player.Character then -- retro-listen self:OnCharacterAdded(Player.Character) end self.onCharacterAddedConn = Player.CharacterAdded:Connect(function(char) self:OnCharacterAdded(char) end) self.running = true end self.touchJumpController = touchJumpController if self.touchJumpController then self.touchJumpController:Enable(self.jumpEnabled) end else if self.running then self:DisconnectEvents() CleanupPath() -- Restore tool activation on shutdown if UserInputService.TouchEnabled then local character = Player.Character if character then for _, child in pairs(character:GetChildren()) do if child:IsA('Tool') then child.ManualActivationOnly = false end end end end self.running = false end if self.touchJumpController and not self.jumpEnabled then self.touchJumpController:Enable(true) end self.touchJumpController = nil end -- Extension for initializing Keyboard input as this class now derives from Keyboard if UserInputService.KeyboardEnabled and enable ~= self.enabled then self.forwardValue = 0 self.backwardValue = 0 self.leftValue = 0 self.rightValue = 0 self.moveVector = ZERO_VECTOR3 if enable then self:BindContextActions() self:ConnectFocusEventListeners() else self:UnbindContextActions() self:DisconnectFocusEventListeners() end end self.wasdEnabled = enable and enableWASD or false self.enabled = enable end function ClickToMove:OnRenderStepped(dt) -- Reset jump self.isJumping = false -- Handle Pather if ExistingPather then -- Let the Pather update ExistingPather:OnRenderStepped(dt) -- If we still have a Pather, set the resulting actions if ExistingPather then -- Setup move (NOT relative to camera) self.moveVector = ExistingPather.NextActionMoveDirection self.moveVectorIsCameraRelative = false -- Setup jump (but do NOT prevent the base Keayboard class from requesting jumps as well) if ExistingPather.NextActionJump then self.isJumping = true end else self.moveVector = self.keyboardMoveVector self.moveVectorIsCameraRelative = true end else self.moveVector = self.keyboardMoveVector self.moveVectorIsCameraRelative = true end -- Handle Keyboard's jump if self.jumpRequested then self.isJumping = true end end
--// SS3 controls for AC6 by Itzt, originally for 2014 Infiniti QX80. i don't know how to tune ac lol
wait(0.1) local player = game.Players.LocalPlayer local HUB = script.Parent.HUB local TR = script.Parent.Tracker local limitButton = HUB.Name local lightOn = false local Camera = game.Workspace.CurrentCamera local cam = script.Parent.nxtcam.Value local carSeat = script.Parent.CarSeat.Value local mouse = game.Players.LocalPlayer:GetMouse() local windows = false local winfob = HUB.Parent.Windows local red = 0 local green = 0 local blue = 1
--[=[ Jest and TestEZ matchers to help facilitate UI and design business logic in our 2D and 3D apps in a human readable way. Depending on which test runner you're using, you will need to include a `beforeAll` block in your spec file to add the matchers: ```lua -- Jest return function() local JestGlobals = require(path.to.Packages.Dev.JestGlobals) local expect = JestGlobals.expect local CollisionMatchers2D = require(path.to.Packages.Dev.CollisionMatchers2D) beforeAll(function() expect.extend(CollisionMatchers2D.Jest) end) -- ... end ``` ```lua -- TestEZ return function() local CollisionMatchers2D = require(path.to.Packages.Dev.CollisionMatchers2D) beforeAll(function() expect.extend(CollisionMatchers2D.TestEZ) end) -- ... end ``` @class CollisionMatchers2D ]=]
return { TestEZ = require(script.TestEZ), Jest = require(script.Jest), }
-- Any arguments passed into Tree:run() can be received after the first parameter, obj -- Example: Tree:run(deltaTime) - > task:start(obj,deltaTime)
function task:start(obj) --[[ (optional) this function is called directly before the run method is called. It allows you to setup things before starting to run Beware: if task is resumed after calling running(), start is not called. --]] end function task:finish(obj) --[[ (optional) this function is called directly after the run method is completed with either success() or fail(). It allows you to clean up things, after you run the task. --]] end function task:run(obj) --[[ This is the meat of your task. The run method does everything you want it to do. Finish it with one of these method calls: success() - The task did run successfully fail() - The task did fail running() - The task is still running and will be called directly from parent node --]] if obj.DebounceTable.Attacking == true and time() < (obj.DebounceTable.lastAttackTime + obj.DebounceTable.currentAttackDuration) then obj.DebounceTable.Attacking = true self:running() return else obj.DebounceTable.CanMove = true obj.DebounceTable.Attacking = false end local BestAttack, range = obj:GetBestAttack() if (obj.Model.HumanoidRootPart.Position - obj.currentTarget.HumanoidRootPart.Position).magnitude < obj.MaxAttackRange and BestAttack then if BestAttack then BestAttack = require(AttacksFolder[BestAttack]) obj.DebounceTable.currentAttackDuration = BestAttack.Duration end obj.DebounceTable.lastAttackTime = time() obj.DebounceTable.CanMove = false obj.DebounceTable.Attacking = true if BestAttack then local success,_error = pcall(function() BestAttack.Attack(obj) end) if not success then warn(_error) end end self:running() return --local AttackModule = end self:success(); end return task;
--[[ CameraShakePresets.Bump CameraShakePresets.Explosion CameraShakePresets.Earthquake CameraShakePresets.BadTrip CameraShakePresets.HandheldCamera CameraShakePresets.Vibration CameraShakePresets.RoughDriving --]]
local CameraShakeInstance = require(script.Parent.CameraShakeInstance) local CameraShakePresets = { -- A high-magnitude, short, yet smooth shake. -- Should happen once. Bump = function() local c = CameraShakeInstance.new(2.5, 8, 0.1, 0.5) c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15) c.RotationInfluence = Vector3.new(.4, .4, .4) return c end; -- An intense and rough shake. -- Should happen once. Explosion = function() local c = CameraShakeInstance.new(5, 10, 0, 1.5) c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25) c.RotationInfluence = Vector3.new(4, 1, 1) return c end; -- A continuous, rough shake -- Sustained. Earthquake = function() local c = CameraShakeInstance.new(0.7, 3.5, 2, 7.5) c.PositionInfluence = Vector3.new(0.45, 0.45, 0.45) c.RotationInfluence = Vector3.new(.5, .5, .5) return c end; -- A bizarre shake with a very high magnitude and low roughness. -- Sustained. BadTrip = function() local c = CameraShakeInstance.new(10, 0.15, 5, 10) c.PositionInfluence = Vector3.new(0, 0, 0.15) c.RotationInfluence = Vector3.new(2, 1, 4) return c end; -- A subtle, slow shake. -- Sustained. HandheldCamera = function() local c = CameraShakeInstance.new(1, 0.25, 5, 10) c.PositionInfluence = Vector3.new(0, 0, 0) c.RotationInfluence = Vector3.new(1, 0.5, 0.5) return c end; -- A very rough, yet low magnitude shake. -- Sustained. Vibration = function() local c = CameraShakeInstance.new(0.4, 20, 2, 2) c.PositionInfluence = Vector3.new(0, 0.15, 0) c.RotationInfluence = Vector3.new(1.25, 0, 4) return c end; -- A slightly rough, medium magnitude shake. -- Sustained. RoughDriving = function() local c = CameraShakeInstance.new(1, 2, 1, 1) c.PositionInfluence = Vector3.new(0, 0, 0) c.RotationInfluence = Vector3.new(1, 1, 1) return c end; } return setmetatable({}, { __index = function(t, i) local f = CameraShakePresets[i] if (type(f) == "function") then return f() end error("No preset found with index \"" .. i .. "\"") end; })