Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
UserInputService = :()
TweenService = :()
Lighting = :()
SoundService = :()
player = Players.LocalPlayer
camera = .CurrentCamera
FOV =
LOOK_SPEED =
SMOOTHING =
JITTER_INTENSITY =
JITTER_SPEED =
yaw =
pitch =
smoothYaw =
smoothPitch =
lastYaw =
lastPitch =
bob =
rotatingTouch =
renderConnection
lastMoveState =
isDead =
deathCamCFrame =
inputBeganConnection
inputChangedConnection
inputEndedConnection
diedConnection
healthChangedConnection
toolConnection
WALK_SPEED =
SPRINT_SPEED =
MAX_STAMINA =
stamina = MAX_STAMINA
isSprinting =
staminaRechargeDelay =
DAY_SPEED =
Lighting.GlobalShadows =
Lighting.ShadowSoftness =
Lighting.EnvironmentSpecularScale =
Lighting.EnvironmentDiffuseScale =
blurEffect = Lighting:() .()
blurEffect.Name =
blurEffect.Size =
blurEffect.Parent = Lighting
bloomEffect = Lighting:() .()
bloomEffect.Name =
bloomEffect.Intensity =
bloomEffect.Size =
bloomEffect.Threshold =
bloomEffect.Parent = Lighting
colorCorrection = Lighting:() .()
colorCorrection.Name =
colorCorrection.Saturation =
colorCorrection.Parent = Lighting
(name, id, volume)
sound = SoundService:(name)
sound
sound = .()
sound.Name = name
sound.SoundId = .. id
sound.Volume = volume
sound.Parent = SoundService
sound
soundPunch = (, , )
soundGore = (, , )
soundStepGrass = (, , )
soundStepMetal = (, , )
soundStepDefault = (, , )
()
pGui = player:()
oldUI = pGui:()
oldUI oldUI:()
screenGui = .()
screenGui.Name =
screenGui.ResetOnSpawn =
screenGui.Parent = pGui
flashButton = .()
flashButton.Name =
flashButton.Size = .(, , , )
flashButton.Position = .(, , , )
flashButton.BackgroundColor3 = .(, , )
flashButton.TextColor3 = .(, , )
flashButton.Font = .Font.SourceSansBold
flashButton.TextSize =
flashButton.Text =
flashButton.Parent = screenGui
.(, flashButton).CornerRadius = .(, )
sprintButton = .()
sprintButton.Name =
sprintButton.Size = .(, , , )
sprintButton.Position = .(, -, , )
sprintButton.BackgroundColor3 = .(, , )
sprintButton.TextColor3 = .(, , )
sprintButton.Font = .Font.SourceSansBold
sprintButton.TextSize =
sprintButton.Text =
sprintButton.Parent = screenGui
.(, sprintButton).CornerRadius = .(, )
hudFrame = .()
hudFrame.Name =
hudFrame.Size = .(, , , )
hudFrame.Position = .(, , , -)
hudFrame.BackgroundTransparency =
hudFrame.Parent = screenGui
healthBg = .()
healthBg.Name =
healthBg.Size = .(, , , )
healthBg.Position = .(, , , )
healthBg.BackgroundColor3 = .(, , )
healthBg.Parent = hudFrame
.(, healthBg).CornerRadius = .(, )
healthBar = .()
healthBar.Name =
healthBar.Size = .(, , , )
healthBar.BackgroundColor3 = .(, , )
healthBar.Parent = healthBg
.(, healthBar).CornerRadius = .(, )
healthLabel = .()
healthLabel.Size = .(, , , )
healthLabel.BackgroundTransparency =
healthLabel.TextColor3 = .(, , )
healthLabel.Font = .Font.SourceSansBold
healthLabel.TextSize =
healthLabel.Text =
healthLabel.Parent = healthBg
staminaBg = .()
staminaBg.Name =
staminaBg.Size = .(, , , )
staminaBg.Position = .(, , , )
staminaBg.BackgroundColor3 = .(, , )
staminaBg.Parent = hudFrame
.(, staminaBg).CornerRadius = .(, )
staminaBar = .()
staminaBar.Name =
staminaBar.Size = .(, , , )
staminaBar.BackgroundColor3 = .(, , )
staminaBar.Parent = staminaBg
.(, staminaBar).CornerRadius = .(, )
staminaLabel = .()
staminaLabel.Size = .(, , , )
staminaLabel.BackgroundTransparency =
staminaLabel.TextColor3 = .(, , )
staminaLabel.Font = .Font.SourceSansBold
staminaLabel.TextSize =
staminaLabel.Text =
staminaLabel.Parent = staminaBg
screenGui
()
pGui = player:()
oldUI = pGui:()
oldUI oldUI:()
screenGui = .()
screenGui.Name =
screenGui.ResetOnSpawn =
background = .()
background.Size = .(, , , )
background.BackgroundColor3 = .(, , )
background.BackgroundTransparency =
background.Parent = screenGui
textLabel = .()
textLabel.Size = .(, , , )
textLabel.BackgroundTransparency =
textLabel.Text =
textLabel.TextColor3 = .(, , )
textLabel.Font = .Font.SourceSansBold
textLabel.TextSize =
textLabel.TextTransparency =
textLabel.Parent = screenGui
screenGui.Parent = pGui
screenGui, background, textLabel
(character)
.()
isDead =
deathCamCFrame =
colorCorrection.Saturation =
stamina = MAX_STAMINA
isSprinting =
inputBeganConnection inputBeganConnection:()
inputChangedConnection inputChangedConnection:()
inputEndedConnection inputEndedConnection:()
diedConnection diedConnection:()
healthChangedConnection healthChangedConnection:()
toolConnection toolConnection:()
humanoid = character:()
root = character:()
head = character:()
humanoid.WalkSpeed = WALK_SPEED
hudGui = ()
hudFrame = hudGui:()
healthBar = hudFrame.HealthBg.Bar
healthLabel = hudFrame.HealthBg.TextLabel
staminaBar = hudFrame.StaminaBg.Bar
staminaLabel = hudFrame.StaminaBg.TextLabel
flashButton = hudGui:()
sprintButton = hudGui:()
flashlightAttachment = .Terrain:() .()
flashlightAttachment.Name =
flashlightAttachment.Parent = .Terrain
flashlight = flashlightAttachment:() .()
flashlight.Name =
flashlight.Brightness =
flashlight.Range =
flashlight.Angle =
flashlight.Enabled =
flashlight.Parent = flashlightAttachment
flashButton.MouseButton1Click:(()
isDead
flashlight.Enabled = flashlight.Enabled
flashButton.Text = flashlight.Enabled
flashButton.BackgroundColor3 = flashlight.Enabled .(, , ) .(, , )
)
sprintButton.MouseButton1Down:(() isSprinting = )
sprintButton.MouseButton1Up:(() isSprinting = )
()
healthPercent = .(humanoid.Health / humanoid.MaxHealth, , )
TweenService:(healthBar, TweenInfo.(), {Size = .(healthPercent, , , )}):()
healthLabel.Text = .. .(healthPercent * ) ..
()
healthChangedConnection = humanoid:():(updateHealthHUD)
(tool)
tool:()
toolConnection = tool.Activated:(()
soundPunch:()
rayParam = RaycastParams.()
rayParam.FilterDescendantsInstances = {character}
rayParam.FilterType = .RaycastFilterType.Exclude
hitResult = :(head.Position, camera.CFrame.LookVector * , rayParam)
hitResult hitResult.Instance
enemyModel = hitResult.Instance:()
enemyModel
enemyHumanoid = enemyModel:()
enemyHumanoid enemyHumanoid.Health >
.(, ()
enemyHumanoid.Health <=
soundGore:()
)
)
character.ChildAdded:(trackCombatInteractions)
_, child (character:()) (child)
repairing =
.(, ()
character.Parent isDead
player.CameraMode = .CameraMode.LockFirstPerson
camera.CameraType = .CameraType.Scriptable
camera.FieldOfView = FOV
)
camera:():(()
repairing isDead
camera.CameraType ~= .CameraType.Scriptable
repairing =
.(, ()
character.Parent isDead
player.CameraMode = .CameraMode.LockFirstPerson
camera.CameraType = .CameraType.Scriptable
camera.FieldOfView = FOV
repairing =
)
)
player.CameraMode = .CameraMode.LockFirstPerson
camera.CameraType = .CameraType.Scriptable
camera.FieldOfView = FOV
humanoid.AutoRotate =
diedConnection = humanoid.Died:(()
isDead =
hudGui:()
flashlight.Enabled =
lastCamCFrame = camera.CFrame
deathCamCFrame = .(lastCamCFrame.Position - .(, , )) * .(, , .())
ui, bg, label = ()
TweenService:(colorCorrection, TweenInfo.(, .EasingStyle.Quad, .EasingDirection.Out), {Saturation = -}):()
TweenService:(blurEffect, TweenInfo.(), {Size = }):()
TweenService:(bg, TweenInfo.(), {BackgroundTransparency = }):()
TweenService:(label, TweenInfo.(, .EasingStyle.Sine, .EasingDirection.In), {TextTransparency = }):()
respawnConn
respawnConn = player.CharacterAdded:(()
TweenService:(colorCorrection, TweenInfo.(), {Saturation = }):()
TweenService:(blurEffect, TweenInfo.(), {Size = }):()
TweenService:(bg, TweenInfo.(), {BackgroundTransparency = }):()
TweenService:(label, TweenInfo.(), {TextTransparency = }):()
.(, () ui:() )
respawnConn:()
)
)
inputBeganConnection = UserInputService.InputBegan:((input, processed)
isDead
input.UserInputType == .UserInputType.Touch processed
input.Position.X > camera.ViewportSize.X *
rotatingTouch = input
input.KeyCode == .KeyCode.LeftShift
isSprinting =
)
inputChangedConnection = UserInputService.InputChanged:((input)
isDead
delta = .(input.Delta.X, input.Delta.Y)
input.UserInputType == .UserInputType.MouseMovement
yaw -= delta.X * LOOK_SPEED
pitch -= delta.Y * LOOK_SPEED
input.UserInputType == .UserInputType.Touch
input == rotatingTouch
yaw -= delta.X * LOOK_SPEED
pitch -= delta.Y * LOOK_SPEED
pitch = .(pitch, -, )
)
inputEndedConnection = UserInputService.InputEnded:((input)
input == rotatingTouch
rotatingTouch =
input.KeyCode == .KeyCode.LeftShift
isSprinting =
)
()
_, obj (character:())
isInTool = obj:() ~=
obj:()
n = obj.Name
visible =
n == n ==
n == n ==
n == n ==
n == n ==
n == n ==
n == n ==
n == n ==
n == n ==
n == n == n ==
obj.LocalTransparencyModifier = (isInTool visible)
head.LocalTransparencyModifier =
head:()
_, face (head:())
face:() face.Transparency =
renderConnection
renderConnection:()
lastSprintTime =
lastStepTime =
renderConnection = RunService.RenderStepped:((dt)
character.Parent
()
currentMinutes = Lighting:()
nextMinutes = currentMinutes + (dt * DAY_SPEED * )
Lighting:(nextMinutes)
timeInHours = nextMinutes /
timeInHours > timeInHours <
Lighting.Ambient = .(, , )
Lighting.OutdoorAmbient = .(, , )
Lighting.Brightness =
Lighting.Ambient = .(, , )
Lighting.OutdoorAmbient = .(, , )
Lighting.Brightness =
isDead deathCamCFrame
camera.CFrame = camera.CFrame:(deathCamCFrame, dt * )
camera.FieldOfView = FOV
isMoving = humanoid.MoveDirection.Magnitude >
isSprinting isMoving stamina >
stamina = .(stamina - dt, , MAX_STAMINA)
humanoid.WalkSpeed = SPRINT_SPEED
lastSprintTime = .()
humanoid.WalkSpeed = WALK_SPEED
.() - lastSprintTime >= staminaRechargeDelay
stamina = .(stamina + dt, , MAX_STAMINA)
staminaPercent = stamina / MAX_STAMINA
staminaBar.Size = .(staminaPercent, , , )
staminaLabel.Text = .. .(staminaPercent * ) ..
isMoving humanoid.FloorMaterial ~= .Material.Air
stepInterval = (humanoid.WalkSpeed == SPRINT_SPEED)
.() - lastStepTime >= stepInterval
lastStepTime = .()
floorMat = humanoid.FloorMaterial
floorMat == .Material.Grass floorMat == .Material.LeafyGrass
soundStepGrass:()
floorMat == .Material.Metal floorMat == .Material.CorrodedMetal floorMat == .Material.DiamondPlate
soundStepMetal:()
soundStepDefault:()
isMoving ~= lastMoveState
lastMoveState = isMoving
isMoving
UserInputService.MouseBehavior = .MouseBehavior.LockCenter
UserInputService.MouseBehavior = .MouseBehavior.Default
isMoving
_, cameraYaw, _ = camera.CFrame:()
root.CFrame = .(root.Position) * .(, cameraYaw, )
bobVelocity = (humanoid.WalkSpeed == SPRINT_SPEED)
bob += dt * bobVelocity
bob =
currentBobAmount = (humanoid.WalkSpeed == SPRINT_SPEED)
bobOffset = .(bob) * currentBobAmount
smoothYaw = smoothYaw + (yaw - smoothYaw) * SMOOTHING
smoothPitch = smoothPitch + (pitch - smoothPitch) * SMOOTHING
yawDelta = .(smoothYaw - lastYaw)
pitchDelta = .(smoothPitch - lastPitch)
totalDelta = (yawDelta + pitchDelta) / dt
blurEffect.Size = .(totalDelta * , , )
lastYaw = smoothYaw
lastPitch = smoothPitch
currentTime = .() * JITTER_SPEED
jitterX = .(currentTime, , ) * JITTER_INTENSITY
jitterY = .(, currentTime, ) * JITTER_INTENSITY
jitterZ = .(, , currentTime) * JITTER_INTENSITY
jitterCFrame = .(jitterX, jitterY, jitterZ)
camPos = head.Position + .(, bobOffset, )
camRot = .(, smoothYaw, ) * .(smoothPitch, , )
camera.CFrame = .(camPos) * camRot * jitterCFrame
camera.FieldOfView = FOV
flashlight.Enabled flashlightAttachment
flashlightAttachment.WorldCFrame = camera.CFrame
)
player.Character
(player.Character)
player.CharacterAdded:(setupCharacter)
Most op first person script

Universal