Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
	Written by Eti the Spirit (18406183)
	
		The latest patch notes can be located here (and do note, the version at the top of this script might be outdated. I have a thing for forgetting to change it):
		>	https://etithespirit.github.io/FastCastAPIDocs/changelog
		
		*** If anything is broken, please don't hesitate to message me! ***
		
		YOU CAN FIND IMPORTANT USAGE INFORMATION HERE: https://etithespirit.github.io/FastCastAPIDocs
		YOU CAN FIND IMPORTANT USAGE INFORMATION HERE: https://etithespirit.github.io/FastCastAPIDocs
		YOU CAN FIND IMPORTANT USAGE INFORMATION HERE: https://etithespirit.github.io/FastCastAPIDocs
		
		YOU SHOULD ONLY CREATE ONE CASTER PER GUN.
		YOU SHOULD >>>NEVER<<< CREATE A NEW CASTER EVERY TIME THE GUN NEEDS TO BE FIRED.
		
		A caster (created with FastCast.new()) represents a "gun".
		When you consider a gun, you think of stats like accuracy, bullet speed, etc. This is the info a caster stores. 
	
	--
	
	This is a library used to create hitscan-based guns that simulate projectile physics.
	
	This means:
		- You don't have to worry about bullet lag / jittering
		- You don't have to worry about keeping bullets at a low speed due to physics being finnicky between clients
		- You don't have to worry about misfires in bullet's Touched event (e.g. where it may going so fast that it doesn't register)
		
	Hitscan-based guns are commonly seen in the form of laser beams, among other things. Hitscan simply raycasts out to a target
	and says whether it hit or not.
	
	Unfortunately, while reliable in terms of saying if something got hit or not, this method alone cannot be used if you wish
	to implement bullet travel time into a weapon. As a result of that, I made this library - an excellent remedy to this dilemma.
	
	FastCast is intended to be require()'d once in a script, as you can create as many casters as you need with FastCast.new()
	This is generally handy since you can store settings and information in these casters, and even send them out to other scripts via events
	for use.
	
	Remember -- A "Caster" represents an entire gun (or whatever is launching your projectiles), *NOT* the individual bullets.
	Make the caster once, then use the caster to fire your bullets. Do not make a caster for each bullet.
--]]
--[=[
	Gets or creates the global localization table. If the game isn't running (i.e. test mode), then
	we'll just not parent it.

	@return string -- The locale
]=]


function JsonToLocalizationTable.getOrCreateLocalizationTable()
	local localizationTable = LocalizationService:FindFirstChild(LOCALIZATION_TABLE_NAME)

	if not localizationTable then
		localizationTable = Instance.new("LocalizationTable")
		localizationTable.Name = LOCALIZATION_TABLE_NAME

		if RunService:IsRunning() then
			localizationTable.Parent = LocalizationService
		end
	end

	return localizationTable
end
--[[
	Render the child component so that ExternalEventConnections can be nested like so:

		Roact.createElement(ExternalEventConnection, {
			event = UserInputService.InputBegan,
			callback = inputBeganCallback,
		}, {
			Roact.createElement(ExternalEventConnection, {
				event = UserInputService.InputEnded,
				callback = inputChangedCallback,
			})
		})
]]


function ExternalEventConnection:render()
	return Roact.oneChild(self.props[Roact.Children])
end

function ExternalEventConnection:didMount()
	local event = self.props.event
	local callback = self.props.callback

	self.connection = event:Connect(callback)
end

function ExternalEventConnection:didUpdate(oldProps)
	if self.props.event ~= oldProps.event or self.props.callback ~= oldProps.callback then
		self.connection:Disconnect()

		self.connection = self.props.event:Connect(self.props.callback)
	end
end

function ExternalEventConnection:willUnmount()
	self.connection:Disconnect()

	self.connection = nil
end

return ExternalEventConnection
--[[Steering]]


	Tune.SteerInner		= 45		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 41		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .05		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .1		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 100000	-- Steering Aggressiveness
--[=[
	@param fn (...: any) -> any
	@return Connection
	Connects a function to the remote signal. The function will be
	called anytime the equivalent server-side RemoteSignal is
	fired at this specific client that created this client signal.
]=]


function ClientRemoteSignal:Connect(fn)
	if self._directConnect then
		return self._re.OnClientEvent:Connect(fn)
	else
		return self._signal:Connect(fn)
	end
end
--		print("Loading anims " .. name)


		table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
		local idx = 1
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject == nil) then
					animTable[name][idx].weight = 1
				else
					animTable[name][idx].weight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
	--			print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
				idx = idx + 1
			end
		end
	end

	-- fallback to defaults
	if (animTable[name].count <= 0) then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
--Miscellaneous Settings


FADE_TIME,FADE_TWNSTYLE,FADE_TWNDIRECTION 			= nil
IND_TICK_TIME 										= nil
L_BEAM_COLOR,L_BEAM_RANGE,L_BEAM_BRIGHTNESS 		= nil
H_BEAM_COLOR,H_BEAM_RANGE,H_BEAM_BRIGHTNESS			= nil
T_LIGHT_RANGE,T_LIGHT_BRIGHTNESS					= nil
B_LIGHT_RANGE,B_LIGHT_BRIGHTNESS,B_LIGHT_FADE_TIME	= nil
--[[
	Add a new describe node with the given method as a callback. Generates or
	reuses all the describe nodes along the path.
]]


function TestPlan:addRoot(path, method)
	local curNode = self
	for i = #path, 1, -1 do
		local nextNode = nil

		for _, child in ipairs(curNode.children) do
			if child.phrase == path[i] then
				nextNode = child
				break
			end
		end

		if nextNode == nil then
			nextNode = curNode:addChild(path[i], TestEnum.NodeType.Describe)
		end

		curNode = nextNode
	end

	curNode.callback = method
	curNode:expand()
end
--		print(animName .. " * " .. idx .. " [" .. origRoll .. "]")


		local anim = animTable[animName][idx].anim

		-- load it to the humanoid; get AnimationTrack
		toolOldAnimTrack = toolAnimTrack
		toolAnimTrack = humanoid:LoadAnimation(anim)
		 
		-- play the animation
		toolAnimTrack:Play(transitionTime)
		toolAnimName = animName

		currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
	end
end

function stopToolAnimations()
	local oldAnim = toolAnimName

	if (currentToolAnimKeyframeHandler ~= nil) then
		currentToolAnimKeyframeHandler:disconnect()
	end

	toolAnimName = ""
	if (toolAnimTrack ~= nil) then
		toolAnimTrack:Stop()
		toolAnimTrack:Destroy()
		toolAnimTrack = nil
	end


	return oldAnim
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 600		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--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)
--[=[
	@within TableUtil
	@function Truncate
	@param tbl table
	@param length number
	@return table

	Returns a new table truncated to the length of `length`. Any length
	equal or greater than the current length will simply return a
	shallow copy of the table.

	```lua
	local t = {10, 20, 30, 40, 50, 60, 70, 80}
	local tTruncated = TableUtil.Truncate(t, 3)
	print(tTruncated) --> {10, 20, 30}
	```
]=]


local function Truncate(tbl: Table, len: number): Table
	local n = #tbl
	len = math.clamp(len, 1, n)
	if len == n then
		return table.clone(tbl)
	end
	return table.move(tbl, 1, len, 1, table.create(len))
end
---Burst Settings---


			elseif Settings.Mode == "Burst" and Settings.FireModes.Auto == true then
				Gui.FText.Text = "Auto"
				Settings.Mode = "Auto"
			elseif Settings.Mode == "Burst" and Settings.FireModes.Explosive == true and Settings.FireModes.Auto == false then
				Gui.FText.Text = "Explosive"
				Settings.Mode = "Explosive"
			elseif Settings.Mode == "Burst" and Settings.FireModes.Semi == true and Settings.FireModes.Auto == false and Settings.FireModes.Explosive == false then
				Gui.FText.Text = "Semi"
				Settings.Mode = "Semi"
--------


function Handler:add(hitboxObject)
	assert(typeof(hitboxObject) ~= "Instance", "Make sure you are initializing from the Raycast module, not from this handler.")
	table.insert(ActiveHitboxes, hitboxObject)
end

function Handler:remove(object)
	for i in ipairs(ActiveHitboxes) do
		if ActiveHitboxes[i].object == object then
			ActiveHitboxes[i]:Destroy()
			setmetatable(ActiveHitboxes[i], nil)
			table.remove(ActiveHitboxes, i)
		end
	end
end

function Handler:check(object)
	for _, hitbox in ipairs(ActiveHitboxes) do
		if hitbox.object == object then
			return hitbox
		end
	end
end

function OnTagRemoved(object)
	Handler:remove(object)
end

CollectionService:GetInstanceRemovedSignal("RaycastModuleManaged"):Connect(OnTagRemoved)
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!


local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.Floral -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)
--[[
	Creates a new copy of the list with the given elements appended to it.
]]


function Immutable.Append(list, ...)
	local new = {}
	local len = #list

	for key = 1, len do
		new[key] = list[key]
	end

	for i = 1, select("#", ...) do
		new[len + i] = select(i, ...)
	end

	return new
end
-----------------------------------------------------------------------------------------------



local player=game.Players.LocalPlayer
local mouse=player:GetMouse()

local car = script.Parent.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])

local gauges = script.Parent
local values = script.Parent.Parent.Values
local isOn = script.Parent.Parent.IsOn

gauges:WaitForChild("Speedo")
gauges:WaitForChild("Tach")
gauges:WaitForChild("Boost")
gauges:WaitForChild("ln")
gauges:WaitForChild("bln")
gauges:WaitForChild("Gear")
gauges:WaitForChild("Speed")

car.DriveSeat.HeadsUpDisplay = false

local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline

if not _Tune.Engine and _Tune.Electric then _lRPM = _Tune.ElecRedline _pRPM = _Tune.ElecTransition2 end

local currentUnits = 1
local revEnd = math.ceil(_lRPM/1000)
-- (Hat Giver Script - Loaded.)



debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "2006 Visor"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(1, 1, 1) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0, 0.09, 0.18)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
-- Handle joining general channel first.


for i, channelData in pairs(initData.Channels) do
	if channelData[1] == ChatSettings.GeneralChannelName then
		HandleChannelJoined(channelData[1], channelData[2], channelData[3], channelData[4], true, false)
	end
end

for i, channelData in pairs(initData.Channels) do
	if channelData[1] ~= ChatSettings.GeneralChannelName then
		HandleChannelJoined(channelData[1], channelData[2], channelData[3], channelData[4], true, false)
	end
end

return moduleApiTable
--[[ CONSTRUCTOR ]]

--
function Path.new(agent, agentParameters, override)
	if not (agent and agent:IsA("Model") and agent.PrimaryPart) then
		output(error, "Pathfinding agent must be a valid Model Instance with a set PrimaryPart.")
	end

	local self = setmetatable({
		_settings = override or DEFAULT_SETTINGS;
		_events = {
			Reached = Instance.new("BindableEvent");
			WaypointReached = Instance.new("BindableEvent");
			Blocked = Instance.new("BindableEvent");
			Error = Instance.new("BindableEvent");
			Stopped = Instance.new("BindableEvent");
		};
		_agent = agent;
		_humanoid = agent:FindFirstChildOfClass("Humanoid");
		_path = PathfindingService:CreatePath(agentParameters);
		_status = "Idle";
		_t = 0;
		_position = {
			_last = Vector3.new();
			_count = 0;
		};
	}, Path)

	--Configure settings
	for setting, value in pairs(DEFAULT_SETTINGS) do
		self._settings[setting] = self._settings[setting] == nil and value or self._settings[setting]
	end

	--Path blocked connection
	self._path.Blocked:Connect(function(...)
		if (self._currentWaypoint <= ... and self._currentWaypoint + 1 >= ...) and self._humanoid then
			setJumpState(self)
			self._events.Blocked:Fire(self._agent, self._waypoints[...])
		end
	end)

	return self
end
--[=[
	Observes for the key
	@param key TKey
	@return Observable<TEmit>
]=]


function ObservableSubscriptionTable:Observe(key)
	assert(key ~= nil, "Bad key")

	return Observable.new(function(sub)
		if not self._subMap[key] then
			self._subMap[key] = { sub }
		else
			table.insert(self._subMap[key], sub)
		end

		return function()
			if not self._subMap[key] then
				return
			end

			local current = self._subMap[key]
			local index = table.find(current, sub)
			if not index then
				return
			end

			table.remove(current, index)
			if #current == 0 then
				self._subMap[key] = nil
			end

			-- Complete the subscription
			if sub:IsPending() then
				task.spawn(function()
					sub:Complete()
				end)
			end
		end
	end)
end
-- 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 FFlagUserTheMovementModeInquisition do
	local success, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserTheMovementModeInquisition")
	end)
	FFlagUserTheMovementModeInquisition = success and value
end

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

local TouchDPad = FFlagUserTheMovementModeInquisition and DynamicThumbstick or require(script:WaitForChild("TouchDPad"))
local TouchThumbpad = FFlagUserTheMovementModeInquisition and DynamicThumbstick or require(script:WaitForChild("TouchThumbpad"))
local TouchThumbstick = FFlagUserMakeThumbstickDynamic and DynamicThumbstick or require(script:WaitForChild("TouchThumbstick"))
-- Create a FormatByKey() function that uses a fallback translator if the first fails to load or return successfully



function TranslationHelper.translateByKey(key, arguments)
	local translation = ""
	local foundTranslation = false

	-- First tries to translate for the player's language (if a translator was found)
	if foundPlayerTranslator then
		foundTranslation = pcall(function()
			translation = playerTranslator:FormatByKey(key, arguments)
		end)
	end
	if foundFallbackTranslator and not foundTranslation then
		foundTranslation = pcall(function()
			translation = fallbackTranslator:FormatByKey(key, arguments)
		end)
	end
	if foundTranslation then
		return translation
	else
		return false
	end
end

return TranslationHelper
-- Unequip logic here


function OnUnequipped()
	LeftButtonDown = false
	Reloading = false
	MyCharacter = nil
	MyHumanoid = nil
	MyTorso = nil
	MyPlayer = nil
	if OnFireConnection then
		OnFireConnection:disconnect()
	end
	if OnReloadConnection then
		OnReloadConnection:disconnect()
	end
	if FlashHolder then
		FlashHolder = nil
	end
	if WeaponGui then
		WeaponGui.Parent = nil
		WeaponGui = nil
	end
	if EquipTrack then
		EquipTrack:Stop()
	end
	if PumpTrack then
		PumpTrack:Stop()
	end
end

Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)
------------------------------------------------------------------------
-- returns current 'pc' and marks it as a jump target (to avoid wrong
-- optimizations with consecutive instructions not in the same basic block).
-- * used in multiple locations
-- * fs.lasttarget tested only by luaK:_nil() when optimizing OP_LOADNIL
------------------------------------------------------------------------


function luaK:getlabel(fs)
  fs.lasttarget = fs.pc
  return fs.pc
end
--[[
    Creates a new controller associated with the specified vehicle.
]]


function VehicleLightsComponent.new(model)
	local component = {
		model = model,
		state = {
			headLights = false,
			brakeLights = false
		}
	}
	setmetatable(component, {__index = VehicleLightsComponent})

	component:setup()

	return component
end
-- Emits valid links in format Brio.new(link, linkValue)


function RxLinkUtils.observeValidLinksBrio(linkName, parent)
	assert(type(linkName) == "string", "linkName should be 'string'")
	assert(typeof(parent) == "Instance", "parent should be 'Instance'")

	return RxInstanceUtils.observeChildrenBrio(parent)
		:Pipe({
			Rx.flatMap(function(brio)
				local instance = brio:GetValue()
				if not instance:IsA("ObjectValue") then
					return Rx.EMPTY
				end

				return RxBrioUtils.completeOnDeath(brio, RxLinkUtils.observeValidityBrio(linkName, instance))
			end);
		})
end
---Buttons


for _,v in pairs(script.Parent.ShopFrame.ButtonsFrame:GetChildren()) do
	if v:IsA("TextButton") then
		v.MouseButton1Click:Connect(function()			
			v.Parent.Visible = false
			script.Parent.ShopFrame.Boxes.Weapon.Value = v.Name
			script.Parent.ShopFrame.Boxes.Visible = true
		end)
	end
end
--skip stage product id: 940704785 



MarketplaceService = Game:GetService("MarketplaceService")

MarketplaceService.ProcessReceipt = function(receiptInfo)
players = game.Players:GetPlayers()

currency = "Stage"

done = 0

for i=1,#players do
	if players[i].userId == receiptInfo.PlayerId then
		if receiptInfo.ProductId == 940704785 and done == 0 then
			done = 1
			players[i].leaderstats[currency].Value = players[i].leaderstats[currency].Value + 1
			players[i].Character.Humanoid.Health = 0
			done = 0
		end
	end
end
return Enum.ProductPurchaseDecision.PurchaseGranted	
end
--[[**
	<description>
	Increment the cached result by value.
	</description>

	<parameter name = "value">
	The value to increment by.
	</parameter>

	<parameter name = "defaultValue">
	If there is no cached result, set it to this before incrementing.
	</parameter>
**--]]


function DataStore:Increment(value, defaultValue)
	self:Set(self:Get(defaultValue) + value)
end
--[[ Input/Settings Changed Events ]]

--
local mouseLockSwitchFunc = function(actionName, inputState, inputObject)
	if IsShiftLockMode then
		onShiftLockToggled()
	end
end

local function disableShiftLock()
	if ScreenGui then ScreenGui.Parent = nil end
	IsShiftLockMode = false
	Mouse.Icon = ""
	if InputCn then
		InputCn:disconnect()
		InputCn = nil
	end
	IsActionBound = false
	ShiftLockController.OnShiftLockToggled:Fire()
end
-- Offsets for the volume visibility test


local SCAN_SAMPLE_OFFSETS = {
	Vector2.new( 0.4, 0.0),
	Vector2.new(-0.4, 0.0),
	Vector2.new( 0.0,-0.4),
	Vector2.new( 0.0, 0.4),
	Vector2.new( 0.0, 0.2),
}
--// Handling Settings		


	Firerate = 60 / 720; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 1; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
-- << MAIN >>
--Touch Pad


for a,b in pairs(script.Parent:GetChildren()) do
	local touchPart = b:FindFirstChild("TouchPart")
	if touchPart then
		local touchDe = {}
		local originalColor = touchPart.Color
		local particles = touchPart.Particles
		touchPart.Touched:Connect(function(hit)
			local character = hit.Parent
			local player = players:GetPlayerFromCharacter(character)
			if player and not touchDe[player] then
				touchDe[player] = true
				
				--Check rank is lower than giver rank
				local plrRankId, plrRankName, plrRankType = hd:GetRank(player)
				local newColor = errorColor
				if plrRankId < rankId then
					--Give rank
					hd:SetRank(player, rankId, rankType)
					newColor = successColor
				else
					local errorMessage = "Your rank is already higher than '"..rankName.."'!"
					if plrRankId == rankId then
						errorMessage = "You've already been ranked to '"..rankName.."'!"
					end
					hd:Error(player, errorMessage)
				end
				
				--Change pad color
				touchPart.Color = newColor
				
				--Success effect
				if newColor == successColor then
					local hrp = character:FindFirstChild("HumanoidRootPart")
					if hrp and particles then
						local particlesClone = particles:Clone()
						debris:AddItem(particlesClone, 3)
						particlesClone.Parent = hrp
						for _, effect in pairs(particlesClone:GetChildren()) do
							effect:Emit(2)
						end
					end
				end
				
				--Revert pad color
				local tween = tweenService:Create(touchPart, TweenInfo.new(2), {Color = originalColor})
				tween:Play()
				tween.Completed:Wait()
				
				touchDe[player] = false
			end
		end)
	end
end
--Stickmasterluke





sp=script.Parent

local bv=sp:WaitForChild("BodyVelocity")


wait(.5+math.random())
bv.velocity=bv.velocity*Vector3.new(1,0,1)
for _=1,100 do
	bv.velocity=bv.velocity+Vector3.new(math.random()-.5,math.random()-.5,math.random()-.5)*5
	wait(.5+math.random())
end

sp:Destroy()