Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[ icon_controller:header
## Functions

#### setGameTheme
```lua
IconController.setGameTheme(theme)
```
Sets the default theme which is applied to all existing and future icons.

----
#### setDisplayOrder
```lua
IconController.setDisplayOrder(number)
```
Changes the DisplayOrder of the TopbarPlus ScreenGui to the given value.

----
#### setTopbarEnabled
```lua
IconController.setTopbarEnabled(bool)
```
When set to ``false``, hides all icons created with TopbarPlus. This can also be achieved by calling ``starterGui:SetCore("TopbarEnabled", false)``.

----
#### setGap
```lua
IconController.setGap(integer, alignment)
```
Defines the offset width (i.e. gap) between each icon for the given alignment, ``left``, ``mid``, ``right``, or all alignments if not specified. 

----
#### setLeftOffset
```lua
IconController.setLeftOffset(integer)
```
Defines the offset from the left side of the screen to the nearest left-set icon. 

----
#### setRightOffset
```lua
IconController.setRightOffset(integer)
```
Defines the offset from the right side of the screen to the nearest right-set icon. 

----
#### updateTopbar
```lua
IconController.updateTopbar()
```
Determines how icons should be positioned on the topbar and moves them accordingly.  

----
#### clearIconOnSpawn
```lua
IconController.clearIconOnSpawn(icon)
```
Calls destroy on the given icon when the player respawns. This is useful for scenarious where you wish to cleanup icons that are constructed within a Gui with ``ResetOnSpawn`` set to ``true``. For example:

```lua
-- Place at the bottom of your icon creator localscript
local icons = IconController.getIcons()
for _, icon in pairs(icons) do
	IconController.clearIconOnSpawn(icon)
end
```

----
#### getIcons
```lua
local arrayOfIcons = IconController.getIcons()
```
Returns all icons as an array.

----
#### getIcon
```lua
local icon = IconController.getIcon(name)
```
Returns the icon with the given name (or ``false`` if not found). If multiple icons have the same name, then one will be returned randomly.

----



## Properties
#### mimicCoreGui
```lua
local bool = IconController.mimicCoreGui --[default: 'true']
```
Set to ``false`` to have the topbar persist even when ``game:GetService("StarterGui"):SetCore("TopbarEnabled", false)`` is called.

----
#### controllerModeEnabled
{read-only}
```lua
local bool = IconController.controllerModeEnabled
```

----
#### leftGap
{read-only}
```lua
local gapNumber = IconController.leftGap --[default: '12']
```

----
#### midGap
{read-only}
```lua
local gapNumber = IconController.midGap --[default: '12']
```

----
#### rightGap
{read-only}
```lua
local gapNumber = IconController.rightGap --[default: '12']
```

----
#### leftOffset
{read-only}
```lua
local offset = IconController.leftGap --[default: '0']
```

----
#### rightOffset
{read-only}
```lua
local offset = IconController.rightGap --[default: '0']
```
--]]
--end)



task.spawn(function()
	while true do

		if Dead then
			break
		end

		AI()

		local n,mag,hum=near()
		if n and not Dead then
			n=n.p
			if not r then
				w=.14
				local dir=h.Position-n
				local tst ,_ =workspace:FindPartOnRay(Ray.new(t.Torso.Position,(n-t.Torso.Position).Unit*999),t)


				if tst and not Dead then

					local FoundHuman,VitimaHuman = CheckForHumanoid(tst)
					if FoundHuman == true and VitimaHuman.Health > 0 and game.Players:GetPlayerFromCharacter(VitimaHuman.Parent) and perception < 10 then
						perception = perception + Settings.Level.Value
						t.Humanoid.WalkSpeed = SearchingWalkspeed
						Memory = Settings.Level.Value * 100
						CanSee = true
					elseif perception > 0 then
						perception = perception - 1/Settings.Level.Value * 2
						t.Humanoid.WalkSpeed = SearchingWalkspeed
						CanSee = false
					elseif perception <= 0 then
						perception = 0
						t.Humanoid.WalkSpeed = RegularWalkspeed
						Memory = Memory - .25
					end
					--print(Memory)
				end
				task.wait(5)
			end
		end
	end
end)
-- Function to turn particles on or off


local function ConfigWater()
	for _,v in pairs(Emitters:GetChildren()) do
		if v and v:FindFirstChild("Emit1") then
			v:FindFirstChild("Emit1").Enabled = IsOn.Value
		end
		if v and v:FindFirstChild("Emit2") then
			v:FindFirstChild("Emit2").Enabled = IsOn.Value
		end
	end
	
	if ShouldEmitSound.Value and IsOn.Value then
		WaterLoop:Play()
		TweenVolume(WaterLoop.Volume,MaxVolume.Value,2.5,false)
	elseif not IsOn.Value or not ShouldEmitSound.Value then
		TweenVolume(MaxVolume.Value,0,2.9,true)
	end
end
--Made by Stickmasterluke




local sp=script.Parent

damage=40
cooldown=.30

debris=game:GetService("Debris")
check=true

function waitfor(parent,name)
	while true do
		local child=parent:FindFirstChild(name)
		if child~=nil then
			return child
		end
		wait()
	end
end

local handle=waitfor(sp,"Handle")
local debris=game:GetService("Debris")

function randomcolor()
	if handle then
		local m=handle:FindFirstChild("Mesh")
		if m~=nil then
			m.VertexColor=Vector3.new(math.random(1,2),math.random(1,2),math.random(1,2))*.5
		end
	end
end

function onButton1Down(mouse)
	if check then
		check=false
		mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
		local h=sp.Parent:FindFirstChild("Humanoid")
		local t=sp.Parent:FindFirstChild("Torso")
		local anim=sp:FindFirstChild("RightSlash")
		if anim and t and h then
			theanim=h:LoadAnimation(anim)
			theanim:Play(nil,nil,1.5)
			if theanim and h.Health>0 then
				local sound=sp.Handle:FindFirstChild("SlashSound")
				if sound then
					sound:Play()
				end
				wait(.25)
				handle.Transparency=1
				local p=handle:clone()
				p.Name="Effect"
				p.CanCollide=false
				p.Transparency=1
				p.Script.Disabled=false
				local tag=Instance.new("ObjectValue")
				tag.Name="creator"
				tag.Value=h
				tag.Parent=p
				p.RotVelocity=Vector3.new(0,0,0)
				p.Velocity=(mouse.Hit.p-p.Position).unit*400+Vector3.new(0,0,0)
				p.CFrame=CFrame.new(handle.Position,mouse.Hit.p)*CFrame.Angles(-math.pi/2,0,0)
				debris:AddItem(p,20+math.random()*5)
				p.Parent=game.Workspace
			end
		end
		wait(cooldown-.25)
		mouse.Icon="rbxasset://textures\\GunCursor.png"
		randomcolor()
		handle.Transparency=1
		check=true
	end
end

sp.Equipped:connect(function(mouse)
	if mouse==nil then
		print("Mouse not found")
		return 
	end
	equipped=true
	mouse.Icon="rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function()
		onButton1Down(mouse)
	end)
end)

sp.Unequipped:connect(function()
	equipped=false
	handle.Transparency=1
	randomcolor()
end)
-----------------------------------------ONLY EDIT THESE VALUES!!!!!-----------------------------------------
-----!Instructions!-----
--Make sure you have a part in the gun named Barrel, it is where the raycast will shoot from.--
--Just place this script into any gun and edit the values below.--
--Editting anything else will risk breaking it.--
------------------------


Damage = 18
SPS = 16 -- Shots Per Second, gives a limit of how fast the gun shoots.
Recoil = 6 -- [1-10] [1 = Minigun, 10 = Sniper]
WallShoot = false -- Shoots through walls.
GH = false -- [True = RB can't hurt RB.] [False = RB can hurt RB.]
BulletColor = "Cool yellow" -- Any Brickcolor will work.
Flash = true
--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 - 100
	plrData.Classes.Base.Smasher.Obtained.Value = true
	plrData.Classes.Base.Smasher.HammerShatterAbility.Value = true
end
--//Settings\-- 


local Save_Wait_Time = 60 
local Auto_Save = true 
local Save_On_Leave = true 

function onPlayerEntered(newPlayer) 
	local datafolder = Instance.new("Folder") 
	datafolder.Parent = DataFolder 
	datafolder.Name = newPlayer.UserId 
	local DataValue = DataFolder.Data:clone() 
	DataValue.Parent = DataFolder[newPlayer.UserId] 
	local Data = DataValue:GetChildren() 
	local DataTable = {} 
	for i=1,#Data do 
		local n = Data[i].Name 
		DataTable[n] = Data[i].Value 
	end 
	--GetData--
	local DataStore = DataStoreService:GetDataStore(newPlayer.userId) 
	if DataStore:GetAsync("Save") == nil then 
		local succeed, errormsg = pcall(function()
			DataStore:SetAsync("Save", DataTable) 
		end) 
		if succeed then 
			print("Data saved correctly") 
		else 
			print("Error: ".. errormsg) 
		end 
	end 

	local succeed, errormsg = pcall(function() 
		DataTable = DataStore:GetAsync("Save") 
	end) 
	if succeed then 
		print("Data received correctly") 
	else 
		print("Error: ".. errormsg) 
	end 
	--LoadData-- 
	local DataToLoad = DataValue:GetChildren() 
	for i=1,#DataToLoad do 
		local n = DataToLoad[i].Name 
		if DataTable[n] ~= nil then 
			DataToLoad[i].Value = DataTable[n] 
		end 
	end 
end 

game.Players.PlayerAdded:connect(onPlayerEntered) 

if Save_On_Leave then 
	game.Players.PlayerRemoving:connect(function(Player) 
		--SaveData-- 
		local DataStore = DataStoreService:GetDataStore(Player.userId) 
		local Data = DataFolder[Player.UserId].Data:GetChildren() 
		local DataTable = {} 
		for i=1,#Data do 
			local n = Data[i].Name 
			DataTable[n] = Data[i].Value 
		end 
		local succeed, errormsg = pcall(function() 
			DataStore:SetAsync("Save", DataTable) 
		end) 
		if succeed then 
			print("Data saved correctly") 
		else 
			print("Error: ".. errormsg) 
		end 
		DataFolder[Player.UserId]:Destroy() 
	end)
end 

local DataSaveTable = {} 

if Auto_Save == true then 
	while wait(1) do 
		for _, Player in pairs(game.Players:GetPlayers()) do
			if not DataSaveTable[Player] then 
				DataSaveTable[Player] = tick() 
			elseif tick() - DataSaveTable[Player] >= Save_Wait_Time then 
				print("Saved") 
				DataSaveTable[Player] = tick() 
				local DataStore = DataStoreService:GetDataStore(Player.userId) 
				local Data = DataFolder[Player.UserId].Data:GetChildren() 
				local DataTable = {} 
				for i=1,#Data do 
					local n = Data[i].Name 
					DataTable[n] = Data[i].Value 
				end 
				local succeed, errormsg = pcall(function() 
					DataStore:SetAsync("Save", DataTable) 
				end) 
				if succeed then 
					print("Data saved correctly") 
				else 
					print("Error: "..errormsg) 
				end 
			end 
		end 
	end 
end
--[[Steering]]



	function Steering(dt)
		local deltaTime = (60/(1/dt))
		--Mouse Steer
		if _MSteer then
			local msWidth = math.max(1,mouse.ViewSizeX*_Tune.Peripherals.MSteerWidth/200)
			local mdZone = _Tune.Peripherals.MSteerDZone/100
			local mST = ((mouse.X-mouse.ViewSizeX/2)/msWidth)
			if math.abs(mST)<=mdZone then
				_GSteerT = 0
			else
				_GSteerT = (math.max(math.min((math.abs(mST)-mdZone),(1-mdZone)),0)/(1-mdZone))^_Tune.MSteerExp * (mST / math.abs(mST))
			end
		end
		
		_GSteerC = (_GSteerC+((_GSteerT-_GSteerC)*(_Tune.LeanSpeed*deltaTime)))
		
		--Apply Steering
		bike.Body.bal.LeanGyro.cframe = CFrame.new(bike.Body.bal.CFrame.p,bike.Body.bal.CFrame.p+bike.Body.bal.CFrame.lookVector)*CFrame.Angles(0,0,((_GSteerC*_Tune.LeanProgressiveness)*(math.rad(_Tune.MaxLean)/(bike.DriveSeat.Velocity.Magnitude+_Tune.LeanProgressiveness))-(_GSteerC*math.rad(_Tune.MaxLean))))
		
		--Apply Low Speed Steering
		bike.FrontSection.TripleTreeHinge.SteeringGyro.CFrame=bike.Body.SteeringHinge.CFrame*CFrame.Angles(math.rad(_GSteerT*_Tune.SteerAngle),0,0)
		bike.FrontSection.TripleTreeHinge.SteeringGyro.MaxTorque = Vector3.new(_Tune.SteerMaxTorque*((math.max((_Tune.LowSpeedCut-bike.DriveSeat.Velocity.Magnitude)/_Tune.LowSpeedCut,0))^2),0,0)
	end
--[[
	TweenSequence Editor Animator
]]



local TweenSequenceUtils = script.Parent
local Track = require(TweenSequenceUtils.Track)

local Animator = {}

function Animator.new(tweens, root)
	local newAnimator = {}

	for _, tween in pairs(tweens:GetChildren()) do
		local tweenTable = require(tween)
		newAnimator[tween.Name] = Track.new(root, tweenTable, tween)
	end
	
	function newAnimator:SetOrigin(origin)
		for _, animation in pairs(newAnimator) do
			if type(animation) == "table" then
				animation:SetOrigin(origin)
			end
		end
	end

	function newAnimator.StopAll()
		for _, animation in pairs(newAnimator) do
			if type(animation) == "table" then
				animation:Stop()
			end
		end
	end

	return newAnimator
end

return Animator
--//Toggle event//--


script.Parent.Button1.ClickDetector.MouseClick:Connect(function()
	if DoorStatus == "Closed" and Debounce == false then
		Debounce = true
		Door.Button1.Click:Play()
		DoorMain.Sound:Play()
		Open()
		wait(1)
		DoorStatus = "Opened"
		Debounce = false
	elseif DoorStatus == "Opened" and Debounce == false then
		Debounce = true
		Door.Button1.Click:Play()
		DoorMain.Sound:Play()
		Close()
		wait(1)
		DoorStatus = "Closed"
		Debounce = false
	end
end)

script.Parent.Button2.ClickDetector.MouseClick:Connect(function()
	if DoorStatus == "Closed" and Debounce == false then
		Debounce = true
		Door.Button2.Click:Play()
		DoorMain.Sound:Play()
		Open()
		wait(1)
		DoorStatus = "Opened"
		Debounce = false
	elseif DoorStatus == "Opened" and Debounce == false then
		Debounce = true
		Door.Button2.Click:Play()
		DoorMain.Sound:Play()
		Close()
		wait(1)
		DoorStatus = "Closed"
		Debounce = false
	end
	end)
--[[ --------- ]]

--
function speed(run)
	if run then
		if not running then 
			running = true 
			script.Running.Value = true
			for i = 1, 8 do
				game.Workspace.CurrentCamera.FieldOfView = (90 + (i * 2))
				r.Stepped:wait()
			end
		end
	else
		if running then
			running = false
			script.Running.Value = false
			for i = 1, 8 do
				game.Workspace.CurrentCamera.FieldOfView = (90 - (i * 2))
				r.Stepped:wait()
			end
		end
	end
end
mouse.KeyDown:connect(function(key)
	if (string.byte(key:lower()) == 48)then
		script.Parent.LoadingBar.Stamina.Text = ("Stamina")
		speed(true)
		
		mouse.KeyUp:connect(function(key)
			if (string.byte(key:lower()) == 48)then
				speed(false)
			end
		end)
	end
end)

while true do
	r.Stepped:wait(0.10)
	if running then
		if not (Bar.Size == UDim2.new(0, 0, 0.9, 0)) then
			if not (Bar.Size.X.Scale - 0.01 <= 0) then
				Bar:TweenSize(UDim2.new((Bar.Size.X.Scale - 0.01), 0, Bar.Size.Y.Scale, 0), Out, "Sine", 0.10, true, nil)
			else
				Bar:TweenSize(UDim2.new(Bar.Size.X.Scale - (-(0-Bar.Size.X.Scale)), 0, Bar.Size.Y.Scale, 0),Out, "Sine", 0.10, true, nil)
			end
		else
			speed(false)
		end
		if Bar.Size.X.Scale < 0.05 then
			speed(false)
		end
	else
		if not (Bar.Size == UDim2.new(0.985, 0, 0.9, 0)) then
			if not (Bar.Size.X.Scale + 0.005 >= 0.985) then
				wait(0.15)
				Bar:TweenSize(UDim2.new((Bar.Size.X.Scale + 0.005), 0, Bar.Size.Y.Scale, 0), Out, "Sine", 0.10, true, nil)
			else
				wait(0.15)
				Bar:TweenSize(UDim2.new(Bar.Size.X.Scale + (0.985-Bar.Size.X.Scale), 0, 0.9, 0),Out, "Sine", 0.10, true, nil)
			end
		end
	end
end
--Heat Limit


if Heat <= 0 then
enabled = true
Heat = 0
end

if Heat >= 150 then
enabled = false
Heat = 150
end

rotvalueB1 = rotvalueB1 + Spin
rotvalueB2 = rotvalueB2 + Spin
rotvalueB3 = rotvalueB3 + Spin
rotvalueB4 = rotvalueB4 + Spin
rotvalueB5 = rotvalueB5 + Spin
rotvalueB6 = rotvalueB6 + Spin

Tool.B1.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB1)) * Dist, 0, math.cos(math.rad(rotvalueB1)) * Dist)
Tool.B2.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB2)) * Dist, 0, math.cos(math.rad(rotvalueB2)) * Dist)
Tool.B3.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB3)) * Dist, 0, math.cos(math.rad(rotvalueB3)) * Dist)
Tool.B4.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB4)) * Dist, 0, math.cos(math.rad(rotvalueB4)) * Dist)
Tool.B5.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB5)) * Dist, 0, math.cos(math.rad(rotvalueB5)) * Dist)
Tool.B6.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB6)) * Dist, 0, math.cos(math.rad(rotvalueB6)) * Dist)

game.Players.LocalPlayer.PlayerGui.OverheatBar.HeatRed.Size = UDim2.new(0, Heat, 0, 10)
wait()

end
end



Tool.Equipped:connect(onEquippedLocal)
Tool.Equipped:connect(onEquippedLocal2)
Tool.Equipped:connect(Equip)
Tool.Unequipped:connect(Unequip)
script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(equip1)
script.Parent.Unequipped:connect(unequip1)
-- New ProfileStore:



function ProfileService.GetProfileStore(profile_store_name, profile_template) --> [ProfileStore]
	if type(profile_store_name) ~= "string" then
		error("[ProfileService]: profile_store_name must be a string")
	elseif string.len(profile_store_name) == 0 then
		error("[ProfileService]: Invalid profile_store_name")
	end

	if type(profile_template) ~= "table" then
		error("[ProfileService]: Invalid profile_template")
	end

	local profile_store
	profile_store = {
		Mock = {
			LoadProfileAsync = function(_, profile_key, not_released_handler)
				return profile_store:LoadProfileAsync(profile_key, not_released_handler, UseMockTag)
			end,
			GlobalUpdateProfileAsync = function(_, profile_key, update_handler)
				return profile_store:GlobalUpdateProfileAsync(profile_key, update_handler, UseMockTag)
			end,
			ViewProfileAsync = function(_, profile_key)
				return profile_store:ViewProfileAsync(profile_key, UseMockTag)
			end,
			WipeProfileAsync = function(_, profile_key)
				return profile_store:WipeProfileAsync(profile_key, UseMockTag)
			end
		},

		_profile_store_name = profile_store_name,
		_profile_template = profile_template,
		_global_data_store = nil,
		_loaded_profiles = {},
		_profile_load_jobs = {},
		_mock_loaded_profiles = {},
		_mock_profile_load_jobs = {},
		_is_pending = false,
	}
	if IsLiveCheckActive == true then
		profile_store._is_pending = true
		coroutine.wrap(function()
			WaitForLiveAccessCheck()
			if UseMockDataStore == false then
				profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name)
			end
			profile_store._is_pending = false
		end)()
	else
		if UseMockDataStore == false then
			profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name)
		end
	end
	setmetatable(profile_store, ProfileStore)
	return profile_store
end
--Supercharger


local Whine_Pitch = 1.3		--max pitch of the whine (not exact so might have to mess with it)
local S_Loudness = 1.3 --volume of the supercharger(s) (not exact volume so you kinda have to experiment with it also)

script:WaitForChild("Whistle")
script:WaitForChild("Whine")
script:WaitForChild("BOV")

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		for i,v in pairs(car.DriveSeat:GetChildren()) do
			for _,a in pairs(script:GetChildren()) do
				if v.Name==a.Name then v:Stop() wait() v:Destroy() end
			end
		end
	end
end)

if not _Tune.Engine then return end
handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","Whine",car.DriveSeat,script.Whine.SoundId,0,script.Whine.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
handler:FireServer("playSound","Whine")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("Whine")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = _Tune.Turbochargers
local _SCount = _Tune.Superchargers

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/((_Tune.T_Boost*_TCount)+(_Tune.S_Boost*_SCount)))*2)
	local tpsi = (((script.Parent.Values.BoostTurbo.Value)/(_Tune.T_Boost*_TCount))*2)
	local spsi = ((script.Parent.Values.BoostSuper.Value)/(_Tune.S_Boost*_SCount))
	--(script.Parent.Values.RPM.Value/_Tune.Redline)
	local WP,WV,BP,BV,HP,HV = 0,0,0,0,0,0
	
	BOVact = math.floor(tpsi*20)
	if _TCount~=0 then
		WP = (tpsi)
		WV = (tpsi/4)*T_Loudness
		
		BP = (1-(-tpsi/20))*BOV_Pitch
		BV = (((-0.5+((tpsi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))
	
		if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
		if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
	else
		WP,WV,BP,BV=0,0,0,0
	end
	if _SCount~=0 then
		HP = (script.Parent.Values.RPM.Value/_Tune.Redline)*Whine_Pitch
		HV = (spsi/4)*S_Loudness
	else
		HP,HV = 0,0
	end

	handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
	handler:FireServer("updateSound","Whine",script.Whine.SoundId,HP,HV)
	handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)
	
	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(tpsi*20)
		ticc = tick()
	end
end
--This is my first time scripting something! :D
--It's good for horror games too!



local mouse = game.Players.LocalPlayer:GetMouse()
function Light()
    player = game.Players.LocalPlayer
    playerChar = player.Character
    playerLight = playerChar.Torso:FindFirstChild("Light")
    if playerLight then
        playerLight:Destroy()
    else
        light = Instance.new("SurfaceLight",playerChar:FindFirstChild("Torso"))
        light.Name = "Light"
        light.Range = 180 -- Change to distance ofthe Light.
        light.Brightness = 60 -- Change to how much.
        light.Shadows = true -- Change it to True/False.
    end
end
mouse.KeyDown:connect(function(key)
key = key:lower()
if key == "f" then -- Change this to any Keys but I reccomand leaving it as [F] key.
    Light()
end
end)