Roblox/luau_corpus huggingface dataset:
--[=[
	@return Promise
	Returns a promise that is resolved once Knit has started. This is useful
	for any code that needs to tie into Knit controllers but is not the script
	that called `Start`.
	```lua
	Knit.OnStart():andThen(function()
		local MyController = Knit.GetController("MyController")
		MyController:DoSomething()
	end):catch(warn)
	```
]=]
function KnitClient.OnStart()
	if startedComplete then
		return Promise.resolve()
	else
		return Promise.fromEvent(onStartedComplete.Event)
	end
end

return KnitClient
-- declarations

local head = script.Parent

function onTouched(part)
	local h = part.Parent:findFirstChild("Humanoid")
	if h~=nil then
sound:play()
if part.Parent:findFirstChild("Head"):findFirstChild("face").Texture == nil then return end
part.Parent:findFirstChild("Head"):findFirstChild("face").Texture="717dea9c5a1659640155f77c84892c "	end
end

script.Parent.Touched:connect(onTouched)
--This device is entirely open-source.

Base = script.Parent.Base
Button = script.Parent.Button
Host = script.Parent.Parent.Parent.Events.DoorOpen


function verify(identity)
	Host.BypassLevel.Value = true
	Host.AccessLevelProvided.Value = -1
	Host:Fire()
end
Button.ClickDetector.MouseClick:Connect(verify)
---
local  Paint = false
	
script.Parent.MouseButton1Click:connect(function()
	Paint = not Paint
	handler:FireServer("MSG",Paint)
end)
--Miscellaneous Settings:
HANDBRAKE_ANG	= 15	--Angle of handbrake when active in degrees
PADDLE_ANG		= 15	--Angle of paddle shifter
PADDLE_INVERTED	= false	--Sets right paddle to shift down and vice versa
PEDAL_ANGLE		= 55	--Angle of pedals when active in degrees
PED_INVERTED	= false	--Inverts the pedal angle (for top mounted pedals)
SHIFTER_TYPE	= "Seq"	--"H" for H-Pattern, "Seq" for sequential shifter
SEQ_INVERTED	= false	--Inverts the sequential shifter motion
SHIFT_TIME		= 0.25	--Time it takes to shift between all parts (Clutch pedal, Paddle shifter, Shifter
VERTICAL_ANG	= 8.5	--Vertical shifter movement angle in degrees
HORIZONTAL_ANG	= 10.0	--Horizontal shifter increments in degrees (H-Pattern only)
STEER_MULT		= 7.0	--Steering multiplier angle (Arbitrary)
--[[[Default Controls]]
	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)
		
		ControlLDZone			= 5			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 5			,	-- Controller steering R-deadzone (0 - 100%)
	}
	
	--Control Mapping
	Tune.Controls = {
		
	--Keyboard Controls
		--Mode Toggles
		--ToggleTCS				= Enum.KeyCode.T					,
		--ToggleABS				= Enum.KeyCode.Y					,
		--ToggleTransMode			= Enum.KeyCode.M					,
		--ToggleMouseDrive		= Enum.KeyCode.R					,
		
		--Primary Controls
		Throttle				= Enum.KeyCode.Up					,
		Brake					= Enum.KeyCode.Down					,
		SteerLeft				= Enum.KeyCode.Left					,
		SteerRight				= Enum.KeyCode.Right				,
		
		--Secondary Controls
		Throttle2				= Enum.KeyCode.W					,
		Brake2					= Enum.KeyCode.S					,
		SteerLeft2				= Enum.KeyCode.A					,
		SteerRight2				= Enum.KeyCode.D					,
		
		--Manual Transmission
		ShiftUp					= Enum.KeyCode.E					,
		ShiftDown				= Enum.KeyCode.Q					,
		Clutch					= Enum.KeyCode.LeftShift			,
		
		--Handbrake
		--PBrake					= Enum.KeyCode.P					,
		
	--Mouse Controls
		MouseThrottle			= Enum.UserInputType.MouseButton1	,
		MouseBrake				= Enum.UserInputType.MouseButton2	,
		MouseClutch				= Enum.KeyCode.W					,
		MouseShiftUp			= Enum.KeyCode.E					,
		MouseShiftDown			= Enum.KeyCode.Q					,
		MousePBrake				= Enum.KeyCode.LeftShift			,
		
	--Controller Mapping
		ContlrThrottle			= Enum.KeyCode.ButtonR2				,
		ContlrBrake				= Enum.KeyCode.ButtonL2				,
		ContlrSteer				= Enum.KeyCode.Thumbstick1			,
		ContlrShiftUp			= Enum.KeyCode.ButtonY				,
		ContlrShiftDown			= Enum.KeyCode.ButtonX				,
		ContlrClutch			= Enum.KeyCode.ButtonR1				,
		ContlrPBrake			= Enum.KeyCode.ButtonL1				,
		ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
		ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
		ContlrToggleABS			= Enum.KeyCode.DPadRight			,
	}
--tool = script.Parent.Pistol

function Die()
	--if tool ~= nil then tool:remove() end
	--game.workspace.Scripts.WaveScript.Dead_Zombies.Value = game.workspace.Scripts.WaveScript.Dead_Zombies.Value + 1
	wait(2.5)
	script.Parent:remove() 
end 

human.Died:connect(Die)
-- Handle command invocations from the clients.
Cmdr.RemoteFunction.OnServerInvoke = function (player, text, options)
	if #text > 100_000 then
		return "Input too long"
	end

	return Cmdr.Dispatcher:EvaluateAndRun(text, player, options)
end

return Cmdr
--- Invoke
Signal.Invoke = function(funcName, ...)
	funcName = string.lower(funcName)
	local func = GetFunc(funcName)
	
	if (not isServer) and funcName ~= "core signal fired" then
		Signal.Fire("CORE Signal Fired", funcName)
	end
	
	--
	return func:Invoke(...)
end
----- NO EDITING BELOW -----
local weldedParts = {}
table.insert(weldedParts,mainPart)

function Weld(x, y)
	weld = Instance.new("Weld") 
	weld.Part0 = x
	weld.Part1 = y
	local CJ = CFrame.new(x.Position) 
	weld.C0 = x.CFrame:inverse() * CJ  
	weld.C1 = y.CFrame:inverse() * CJ  
	weld.Parent = x	
	table.insert(weldedParts,y)
end

function WeldRec(instance)
	local childs = instance:GetDescendants()
	for _,v in pairs(childs) do
		if v:IsA("BasePart") then
			Weld(mainPart, v)
		end
		WeldRec(v)
	end	
end

WeldRec(P)
--[[
	Unpacks an animatable type into an array of numbers.
	If the type is not animatable, an empty array will be returned.

	FIXME: This function uses a lot of redefinitions to suppress false positives
	from the Luau typechecker - ideally these wouldn't be required

	FUTURE: When Luau supports singleton types, those could be used in
	conjunction with intersection types to make this function fully statically
	type checkable.
]]

local Package = script.Parent.Parent
local PubTypes = require(Package.PubTypes)
local Oklab = require(Package.Colour.Oklab)

local function unpackType(value: any, typeString: string): {number}
	if typeString == "number" then
		local value = value :: number
		return {value}

	elseif typeString == "CFrame" then
		-- FUTURE: is there a better way of doing this? doing distance
		-- calculations on `angle` may be incorrect
		local axis, angle = value:ToAxisAngle()
		return {value.X, value.Y, value.Z, axis.X, axis.Y, axis.Z, angle}

	elseif typeString == "Color3" then
		local lab = Oklab.to(value)
		return {lab.X, lab.Y, lab.Z}

	elseif typeString == "ColorSequenceKeypoint" then
		local lab = Oklab.to(value.Value)
		return {lab.X, lab.Y, lab.Z, value.Time}

	elseif typeString == "DateTime" then
		return {value.UnixTimestampMillis}

	elseif typeString == "NumberRange" then
		return {value.Min, value.Max}

	elseif typeString == "NumberSequenceKeypoint" then
		return {value.Value, value.Time, value.Envelope}

	elseif typeString == "PhysicalProperties" then
		return {value.Density, value.Friction, value.Elasticity, value.FrictionWeight, value.ElasticityWeight}

	elseif typeString == "Ray" then
		return {value.Origin.X, value.Origin.Y, value.Origin.Z, value.Direction.X, value.Direction.Y, value.Direction.Z}

	elseif typeString == "Rect" then
		return {value.Min.X, value.Min.Y, value.Max.X, value.Max.Y}

	elseif typeString == "Region3" then
		-- FUTURE: support rotated Region3s if/when they become constructable
		return {
			value.CFrame.X, value.CFrame.Y, value.CFrame.Z,
			value.Size.X, value.Size.Y, value.Size.Z
		}

	elseif typeString == "Region3int16" then
		return {value.Min.X, value.Min.Y, value.Min.Z, value.Max.X, value.Max.Y, value.Max.Z}

	elseif typeString == "UDim" then
		return {value.Scale, value.Offset}

	elseif typeString == "UDim2" then
		return {value.X.Scale, value.X.Offset, value.Y.Scale, value.Y.Offset}

	elseif typeString == "Vector2" then
		return {value.X, value.Y}

	elseif typeString == "Vector2int16" then
		return {value.X, value.Y}

	elseif typeString == "Vector3" then
		return {value.X, value.Y, value.Z}

	elseif typeString == "Vector3int16" then
		return {value.X, value.Y, value.Z}
	else
		return {}
	end
end

return unpackType
-- ROBLOX deviation: use `unknown` type until Luau starts to support it
type unknown = any

exports.default = function(globalToMutate: typeof(_G), key: string, value: unknown): ()
	-- @ts-expect-error: no index
	globalToMutate[key] = value
end

return exports
--!strict
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local GameSettings = UserSettings():GetService("UserGameSettings")

local LocalPlayer = Players.LocalPlayer
if not LocalPlayer then
	Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
	LocalPlayer = Players.LocalPlayer
end

local Mouse = LocalPlayer:GetMouse()

local Input = require(script.Parent:WaitForChild("CameraInput"))
local CameraUI = require(script.Parent:WaitForChild("CameraUI"))

local lastTogglePan = false
local lastTogglePanChange = tick()

local CROSS_MOUSE_ICON = "rbxasset://textures/Cursors/CrossMouseIcon.png"

local lockStateDirty = false
local wasTogglePanOnTheLastTimeYouWentIntoFirstPerson = false
local lastFirstPerson = false

CameraUI.setCameraModeToastEnabled(false)

return function(isFirstPerson: boolean)
	local togglePan = Input.getTogglePan()
	local toastTimeout = 3

	if isFirstPerson and togglePan ~= lastTogglePan then
		lockStateDirty = true
	end

	if lastTogglePan ~= togglePan or tick() - lastTogglePanChange > toastTimeout then
		local doShow = togglePan and tick() - lastTogglePanChange < toastTimeout

		CameraUI.setCameraModeToastOpen(doShow)

		if togglePan then
			lockStateDirty = false
		end
		lastTogglePanChange = tick()
		lastTogglePan = togglePan
	end

	if isFirstPerson ~= lastFirstPerson then
		if isFirstPerson then
			wasTogglePanOnTheLastTimeYouWentIntoFirstPerson = Input.getTogglePan()
			Input.setTogglePan(true)
		elseif not lockStateDirty then
			Input.setTogglePan(wasTogglePanOnTheLastTimeYouWentIntoFirstPerson)
		end
	end

	if isFirstPerson then
		if Input.getTogglePan() then
			Mouse.Icon = CROSS_MOUSE_ICON
			UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
			GameSettings.RotationType = Enum.RotationType.CameraRelative
		else
			Mouse.Icon = ""
			UserInputService.MouseBehavior = Enum.MouseBehavior.Default
			GameSettings.RotationType = Enum.RotationType.CameraRelative
		end

	elseif Input.getTogglePan() then
		Mouse.Icon = CROSS_MOUSE_ICON
		UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
		GameSettings.RotationType = Enum.RotationType.MovementRelative

	elseif Input.getHoldPan() then
		Mouse.Icon = ""
		UserInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
		GameSettings.RotationType = Enum.RotationType.MovementRelative

	else
		Mouse.Icon = ""
		UserInputService.MouseBehavior = Enum.MouseBehavior.Default
		GameSettings.RotationType = Enum.RotationType.MovementRelative
	end

	lastFirstPerson = isFirstPerson
end
--[ FUNCTIONS ]--

game.Players.PlayerAdded:Connect(function(player) -- When Player Join
	player.CharacterAdded:Connect(function(chr) -- Grabs Player Character
		player.Chatted:Connect(function(msg) -- When Player Chats

			-- IF start --

			if msg:sub(1, Command:len()):lower() == Command:lower() then -- if msg is /e headless then
				player.Character.Head.Transparency = 1 -- makes head transparent
				player.Character.Head.face.Transparency = 1 -- makes face transparent
			else
				if player.Character.Head.Transparency == 1 then -- if head is transparent
					if msg:sub(1, LeaveCommand:len()):lower() == LeaveCommand:lower() then -- and if msg is /e unheadless then
						player.Character.Head.Transparency = 0 -- makes head untransparent
						player.Character.Head.face.Transparency = 0 -- makes face untransparent
					end
				end
			end

			-- IF end --

		end)
	end)
end)
-- local NEWLINE = "\n"
local HEADING = "s*[^%.*]+s*"
--Main Control------------------------------------------------------------------------
Red = script.Parent.Red.Lamp.ImageLabel
Yellow = script.Parent.Yellow.Lamp.ImageLabel
Green = script.Parent.Green.Lamp.ImageLabel
DRed = script.Parent.Red.DynamicLight
DYellow = script.Parent.Yellow.DynamicLight
DGreen = script.Parent.Green.DynamicLight
function Active()
	if Signal.Value == 0 then
		repeat 
		Yellow.ImageTransparency = Yellow.ImageTransparency + 0.175
		Red.ImageTransparency = Red.ImageTransparency + 0.175
		Green.ImageTransparency = Green.ImageTransparency + 0.175
		DYellow.Brightness = DYellow.Brightness - 0.35
		DRed.Brightness = DRed.Brightness - 0.35
		DGreen.Brightness = DGreen.Brightness - 0.35
		wait()
		if Signal.Value ~= 0 then break end
		until 
		Red.ImageTransparency == 1
		and
		Yellow.ImageTransparency == 1
		and
		Green.ImageTransparency == 1
		and
		DYellow.Brightness <= 0
		and
		DGreen.Brightness <= 0
		and
		DRed.Brightness <= 0
	elseif Signal.Value == 1 then
		repeat 
		Yellow.ImageTransparency = Yellow.ImageTransparency + 0.175
		Red.ImageTransparency = Red.ImageTransparency + 0.175
		Green.ImageTransparency = Green.ImageTransparency - 0.125
		DYellow.Brightness = DYellow.Brightness - 0.35
		DRed.Brightness = DRed.Brightness - 0.35
		DGreen.Brightness = DGreen.Brightness + 0.25
		wait()
		if Signal.Value ~= 1 then break end
		until 
		Red.ImageTransparency == 1
		and
		Yellow.ImageTransparency == 1
		and
		Green.ImageTransparency == 0
		and
		DYellow.Brightness <= 0
		and
		DGreen.Brightness >= 2
		and
		DRed.Brightness == 0
	elseif Signal.Value == 2 then
		repeat 
		Yellow.ImageTransparency = Yellow.ImageTransparency - 0.125
		Red.ImageTransparency = Red.ImageTransparency + 0.175
		Green.ImageTransparency = Green.ImageTransparency + 0.175
		DYellow.Brightness = DYellow.Brightness + 0.25
		DRed.Brightness = DRed.Brightness - 0.35
		DGreen.Brightness = DGreen.Brightness - 0.35
		wait()
		if Signal.Value ~= 2 then break end
		until 
		Red.ImageTransparency == 1
		and
		Yellow.ImageTransparency == 0
		and
		Green.ImageTransparency == 1
		and
		DYellow.Brightness >= 2
		and
		DGreen.Brightness <= 0
		and
		DRed.Brightness <= 0
	elseif Signal.Value == 3 then
		repeat 
		Yellow.ImageTransparency = Yellow.ImageTransparency + 0.175
		Red.ImageTransparency = Red.ImageTransparency - 0.125
		Green.ImageTransparency = Green.ImageTransparency + 0.175
		DYellow.Brightness = DYellow.Brightness - 0.35
		DRed.Brightness = DRed.Brightness + 0.25
		DGreen.Brightness = DGreen.Brightness - 0.35
		wait()
		if Signal.Value ~= 3 then break end
		until 
		Red.ImageTransparency == 0
		and
		Yellow.ImageTransparency == 1
		and
		Green.ImageTransparency == 1
		and
		DYellow.Brightness <= 0
		and
		DGreen.Brightness <= 0
		and
		DRed.Brightness >= 2
	end
end
Signal.Changed:connect(Active)
-- Setup the waypoint controller and set the first waypoint
local controller = WaypointController.new(player)
-- Roblox NPC sound script

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local SOUND_DATA = {
	Climbing = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
	},
	Died = {
		SoundId = "rbxasset://sounds/uuhhh.mp3",
	},
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3",
		Looped = true,
	},
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3",
	},
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3",
	},
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3",
	},
	Running = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
		Pitch = 1.85,
	},
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3",
	},
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3",
		Looped = true,
		Pitch = 1.6,
	},
}
-- OFFSET HANDLERS
local alignmentDetails = {}
alignmentDetails["left"] = {
	startScale = 0,
	getOffset = function()
		local offset = 48 + IconController.leftOffset
		if checkTopbarEnabled() then
			local chatEnabled = starterGui:GetCoreGuiEnabled("Chat")
			if chatEnabled then
				offset += 12 + 32
			end
			if isVoiceChatEnabled and not isStudio then
				if chatEnabled then
					offset += 67
				else
					offset += 43
				end
			end
		end
		return offset
	end,
	getStartOffset = function()
		local alignmentGap = IconController["leftGap"]
		local startOffset = alignmentDetails.left.getOffset() + alignmentGap
		return startOffset
	end,
	records = {}
}
alignmentDetails["mid"] = {
	startScale = 0.5,
	getOffset = function()
		return 0
	end,
	getStartOffset = function(totalIconX) 
		local alignmentGap = IconController["midGap"]
		return -totalIconX/2 + (alignmentGap/2)
	end,
	records = {}
}
alignmentDetails["right"] = {
	startScale = 1,
	getOffset = function()
		local offset = IconController.rightOffset
		if checkTopbarEnabled() and (starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList) or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack) or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu)) then
			offset += 48
		end
		return offset
	end,
	getStartOffset = function(totalIconX)
		local startOffset = -totalIconX - alignmentDetails.right.getOffset()
		return startOffset
	end,
	records = {}
	--reverseSort = true
}
-- Roblox User Input Control Modules - each returns a new() constructor function used to create controllers as needed
local Keyboard = require(script:WaitForChild("Keyboard"))
local Gamepad = require(script:WaitForChild("Gamepad"))
local DynamicThumbstick = require(script:WaitForChild("DynamicThumbstick"))

local FFlagUserFlagEnableNewVRSystem do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFlagEnableNewVRSystem")
	end)
	FFlagUserFlagEnableNewVRSystem = success and result
end

local FFlagUserMakeThumbstickDynamic do
	local success, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserMakeThumbstickDynamic")
	end)
	FFlagUserMakeThumbstickDynamic = success and value
end

local TouchThumbstick = FFlagUserMakeThumbstickDynamic and DynamicThumbstick or require(script:WaitForChild("TouchThumbstick"))
-- Compiled with roblox-ts v1.3.3
local TS = _G[script]
local ServerEventV2 = TS.import(script, script.Parent, "ServerEvent").default
local function isMiddlewareArgument(args)
	local _condition = #args > 1
	if _condition then
		local _arg0 = args[1]
		_condition = type(_arg0) == "table"
	end
	return _condition
end
-- Fonction pour calculer la distance entre deux positions
local function calculateDistance(position1, position2)
	return (position1 - position2).Magnitude
end
---- UTILITY FUNCTIONS ---------------------------------------------------------

local RaycastParams = RaycastParams.new()
RaycastParams.FilterDescendantsInstances = {
	workspace:WaitForChild("Mobs"),
	workspace:WaitForChild("Characters")
}
RaycastParams.RespectCanCollide = true
RaycastParams.IgnoreWater = true

local function GetTableLength(t): number
	local n = 0
	for _ in t do
		n += 1
	end
	return n
end
--RL
rSprings[1].Thickness = Settings[1]
rSprings[1].MaxLength = Settings[2]
rSprings[1].MinLength = Settings[3]
rSprings[1].Damping = Settings[4]
rSprings[1].FreeLength = Settings[5]
rSprings[1].LimitsEnabled = Settings[6]
rSprings[1].MaxForce = Settings[7]
rSprings[1].Stiffness = Settings[8]
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,VRecoil = {3,6}				--- Vertical Recoil
	,HRecoil = {3,6}				--- Horizontal Recoil
	,AimRecover = .9				---- Between 0 & 1
	
	,RecoilPunch = .1
	,VPunchBase = 2					--- Vertical Punch
	,HPunchBase = 2					--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 5 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.2
	,MinRecoilPower = .5
	,MaxRecoilPower = 2.5
	,RecoilPowerStepAmount = .15
	
	,MinSpread = 4.5				--- Min bullet spread value | Studs
	,MaxSpread = 50					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 2
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	1					--- Max sway value based on player stamina | Studs
--Hello! Please put me inside of a R6 dummy
--this script loads the local players avatar

local Players = game:GetService("Players")

local function handlePlayerAdded(player)
	local id = player.UserId
	local success, result = pcall(function()
		return Players:GetCharacterAppearanceAsync(id)
	end)

	if success then
		local Models = result
		Models.Parent = script.Parent

		wait()

		for i, v in pairs(Models:GetChildren()) do
			print(v.Name)
			v.Parent = script.Parent
			wait()
		end
	else
		warn("Failed to get character appearance for player " .. player.Name)
	end
end
-- Constants
local RootModel = script:FindFirstAncestorOfClass("Model")
local EffectsToPlay = script.EffectsToPlay
local WeaponDefinition = WeaponDefinitionLoader.GetWeaponDefintionByName(RootModel:GetAttribute("WeaponName"))
local OwnerID = RootModel:GetAttribute("OwnerID")
local GrenadeFuseTime = WeaponDefinition:GetFuseTime()
local owningPlayer = PlayersService:GetPlayerByUserId(OwnerID)
--// Hash: 01509f4cfef0d92b23d78951ca55f7fca2f31845079a481643af7edeb9c1e0e98ce7977e4b7264043c35388d50a9956b
-- Decompiled with the Synapse X Luau decompiler.

local l__LocalPlayer__1 = game.Players.LocalPlayer;
local l__GuiService__2 = game:GetService("GuiService");
local l__UserInputService__1 = game:GetService("UserInputService");
local l__RunService__2 = game:GetService("RunService");
function module(p1)
	local v3 = "pc";
	if l__UserInputService__1.TouchEnabled then
		if not l__UserInputService__1.AccelerometerEnabled then
			if l__UserInputService__1.GyroscopeEnabled then
				v3 = "mobile";
			end;
		else
			v3 = "mobile";
		end;
	end;
	if l__UserInputService__1.GamepadEnabled then
		v3 = "console";
	end;
	if l__UserInputService__1.TouchEnabled then
		if l__RunService__2:IsStudio() then
			v3 = "mobile";
		end;
	end;
	return v3;
end;
return module;
---- ARITHMETIC ----

function ActiveCastStatic:AddVelocity(velocity: Vector3)
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("AddVelocity", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	
	self:SetVelocity(self:GetVelocity() + velocity)
end

function ActiveCastStatic:AddAcceleration(acceleration: Vector3)
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("AddAcceleration", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	
	self:SetAcceleration(self:GetAcceleration() + acceleration)
end

function ActiveCastStatic:AddPosition(position: Vector3)
	assert(getmetatable(self) == ActiveCastStatic, ERR_NOT_INSTANCE:format("AddPosition", "ActiveCast.new(...)"))
	assert(self.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	
	self:SetPosition(self:GetPosition() + position)
end
--	====================
--	SHOTGUN
--	Enable the gun to fire multiple bullet in one shot
--	====================

		ShotgunEnabled = true;
		BulletPerShot = 4;
		
		ShotgunReload = false; --Make user reloading like Shotgun, which user clipin shell one by one
		ShotgunClipinAnimationID = nil; --Set to "nil" if you don't want to animate
		ShotgunClipinAnimationSpeed = 1;
		ShellClipinSpeed = 0.5; --In second
--print(hit.Parent.Name)
	if hit.Parent:findFirstChild("Humanoid") ~= nil then
		local hum=hit.Parent:findFirstChild("Humanoid")
---
local  Paint = false
	
script.Parent.MouseButton1Click:connect(function()
	Paint = not Paint
	handler:FireServer("Wheat",Paint)
end)
--------------
CenterTween1 = TweenService:Create(centerWeld,tweenInfo,CenterWeldG1)
LeftTween1	= TweenService:Create(leftWeld,tweenInfo,leftWeldG1)
RightTween1	= TweenService:Create(rightWeld,tweenInfo,rightWeldG1)

CenterTween2 = TweenService:Create(centerWeld,tweenInfo,CenterWeldG2)
LeftTween2	= TweenService:Create(leftWeld,tweenInfo,leftWeldG2)
RightTween2	= TweenService:Create(rightWeld,tweenInfo,rightWeldG2)
while true do
    CenterTween1:play()
    LeftTween1:play()
    RightTween1:play()
    wait(.5)
    CenterTween2:play()
    LeftTween2:play()
    RightTween2:play()
    wait(.5)
end