content
stringlengths 5
1.05M
|
|---|
multiselect = {}
function multiselect:enter(origin,list,title,closeAfter,advanceAfter)
self.list = list
self.title = title or "Select an Option"
self.closeAfter = closeAfter
self.advanceAfter = advanceAfter
self.cursorY = 0
self.scrollY = 0
local width, height = love.graphics:getWidth(),love.graphics:getHeight()
local uiScale = (prefs['uiScale'] or 1)
local boxW,boxH = 450,300
local padX,padY = 0,0
local descY = 0
local x,y=math.floor(width/2/uiScale-boxW/2),math.floor(height/2/uiScale-boxH/2)
local fontSize = prefs['fontSize']
self.x,self.y,self.boxW,self.boxH=x,y,boxW,boxH
if prefs['noImages'] == true then
padX,padY=5,5
else
padX,padY=20,20
end
self.padX,self.padY = padX,padY
self.yModPerc = 100
tween(0.2,self,{yModPerc=0})
output:sound('stoneslideshort',2)
local _,titleLines = fonts.textFont:getWrap(self.title,boxW-padX)
local startY = y+(#titleLines+2)*fontSize
for i,item in ipairs(self.list) do
local code = i+96
local letter = string.char(code)
local _,textLines = fonts.textFont:getWrap((code <=122 and letter .. ") " or "") .. item.text,boxW-padX)
item.y = (i == 1 and startY or self.list[i-1].maxY)
item.height = #textLines*fontSize
item.maxY = item.y+item.height
end
end
function multiselect:select(item)
if not item.disabled and item.selectFunction(unpack(item.selectArgs)) ~= false then
if self.closeAfter then self:switchBack() end
if self.advanceAfter then advance_turn() end
end
end
function multiselect:draw()
local uiScale = (prefs['uiScale'] or 1)
game:draw()
local width, height = love.graphics:getWidth(),love.graphics:getHeight()
love.graphics.push()
love.graphics.scale(uiScale,uiScale)
love.graphics.translate(0,height*(self.yModPerc/100))
local boxW,boxH = self.boxW,self.boxH
local padX,padY = self.padX,self.padY
local x,y=self.x,self.y
local fontSize = prefs.fontSize
output:draw_window(x,y,x+boxW,y+boxH)
love.graphics.setFont(fonts.textFont)
love.graphics.printf(self.title,x+padX,y+padY,boxW-16,"center")
love.graphics.push()
--Create a "stencil" that stops
local function stencilFunc()
love.graphics.rectangle("fill",x+padX,y+padY+fontSize,boxW-padX*2,boxH-padY)
end
love.graphics.stencil(stencilFunc,"replace",1)
love.graphics.setStencilTest("greater",0)
love.graphics.translate(0,-self.scrollY)
--Draw the highlight box:
if (self.list[self.cursorY] ~= nil) then
local printY = self.list[self.cursorY].y
setColor(100,100,100,255)
love.graphics.rectangle("fill",x+padX,printY,boxW-8,self.list[self.cursorY].height)
setColor(255,255,255,255)
end
for i, item in ipairs(self.list) do
if item.disabled then setColor(150,150,150,255) end
local code = i+96
local letter = string.char(code)
love.graphics.printf((code <=122 and letter .. ") " or "") .. item.text,x+padX,item.y,boxW-padX)
if item.disabled then setColor(255,255,255,255) end
end
local bottom = self.list[#self.list].maxY+fontSize
love.graphics.setStencilTest()
--Description:
if (self.list[self.cursorY] ~= nil) then
local oldFont = love.graphics.getFont()
love.graphics.setFont(fonts.descFont)
local descText = self.list[self.cursorY].description
local width, tlines = fonts.descFont:getWrap(descText,300)
local height = #tlines*(prefs['descFontSize']+3)+math.ceil(prefs['fontSize']/2)
x,y = round((x+boxW)/2),self.list[self.cursorY].y+round(self.list[self.cursorY].height/2)
if (y+20+height < love.graphics.getHeight()) then
setColor(255,255,255,185)
love.graphics.rectangle("line",x+22,y+20,302,height)
setColor(0,0,0,185)
love.graphics.rectangle("fill",x+23,y+21,301,height-1)
setColor(255,255,255,255)
love.graphics.printf(ucfirst(descText),x+24,y+22,300)
else
setColor(255,255,255,185)
love.graphics.rectangle("line",x+22,y+20-height,302,height)
setColor(0,0,0,185)
love.graphics.rectangle("fill",x+23,y+21-height,301,height-1)
setColor(255,255,255,255)
love.graphics.printf(ucfirst(descText),x+24,y+22-height,300)
end
love.graphics.setFont(oldFont)
end
love.graphics.pop()
--Scrollbars
if bottom > self.y+self.boxH then
self.scrollMax = bottom-(self.y+self.boxH)
local scrollAmt = self.scrollY/self.scrollMax
self.scrollPositions = output:scrollbar(self.x+self.boxW-padX,self.y+padY,self.y+self.boxH,scrollAmt,true)
end
self.closebutton = output:closebutton(self.x+(prefs['noImages'] and 8 or 20),self.y+(prefs['noImages'] and 8 or 20),nil,true)
love.graphics.pop()
end
function multiselect:keypressed(key)
key = input:parse_key(key)
if (key == "escape") then
self:switchBack()
elseif (key == "return") or key == "wait" then
if self.list[self.cursorY] then
self:select(self.list[self.cursorY])
end
elseif (key == "north") then
if (self.list[self.cursorY-1] ~= nil) then
self.cursorY = self.cursorY - 1
if self.list[self.cursorY].y-self.scrollY-prefs['fontSize'] < self.y+self.padY+prefs['fontSize'] then
self:scrollUp()
end
end
elseif (key == "south") then
if (self.list[self.cursorY+1] ~= nil) then
self.cursorY = self.cursorY + 1
if self.list[self.cursorY].maxY-self.scrollY+prefs['fontSize'] > self.y+prefs['fontSize']+self.boxH then
self:scrollDown()
end
end
else
local id = string.byte(key)-96
if (self.list[id] ~= nil) then
self:select(self.list[id])
end
end
end
function multiselect:mousepressed(x,y,button)
local uiScale = (prefs['uiScale'] or 1)
if (x/uiScale > self.x and x/uiScale < self.x+self.boxW and y/uiScale > self.y and y/uiScale < self.y+self.boxH) then
if button == 2 or (x/uiScale > self.closebutton.minX and x/uiScale < self.closebutton.maxX and y/uiScale > self.closebutton.minY and y/uiScale < self.closebutton.maxY) then self:switchBack() end
if (self.list[self.cursorY] ~= nil and (not self.scrollPositions or x/uiScale < self.x+self.boxW-self.padX)) then
self:select(self.list[self.cursorY])
end
else
self:switchBack()
end
end
function multiselect:wheelmoved(x,y)
if y > 0 then
self:scrollUp()
elseif y < 0 then
self:scrollDown()
end --end button type if
end
function multiselect:scrollUp()
if self.scrollY > 0 then
self.scrollY = self.scrollY - prefs.fontSize
if self.scrollY < prefs.fontSize then
self.scrollY = 0
end
end
end
function multiselect:scrollDown()
if self.scrollMax and self.scrollY < self.scrollMax then
self.scrollY = self.scrollY+prefs.fontSize
if self.scrollMax-self.scrollY < prefs.fontSize then
self.scrollY = self.scrollMax
end
end
end
function multiselect:update(dt)
if self.switchNow == true then
self.switchNow = nil
Gamestate.switch(game)
Gamestate.update(dt)
return
end
local x,y = love.mouse.getPosition()
local uiScale = (prefs['uiScale'] or 1)
x,y = x/uiScale, y/uiScale
if (x ~= output.mouseX or y ~= output.mouseY) then -- only do this if the mouse has moved
output.mouseX,output.mouseY = x,y
if (x > self.x and x < self.x+self.boxW-(not self.scrollPositions and 0 or self.padX) and y > self.y+prefs['fontSize']+self.padY and y < self.y+self.boxH) then --if inside item box
local line = nil
for i,coords in ipairs(self.list) do
if y > coords.y-self.scrollY and y < coords.maxY-self.scrollY then
line = i
break
end
end --end coordinate for
if (self.list[line] ~= nil) then
self.cursorY=line
else
self.cursorY=0
end
end
end
if (love.mouse.isDown(1)) and self.scrollPositions then
local x,y = love.mouse.getPosition()
local upArrow = self.scrollPositions.upArrow
local downArrow = self.scrollPositions.downArrow
local elevator = self.scrollPositions.elevator
if x>upArrow.startX and x<upArrow.endX and y>upArrow.startY and y<upArrow.endY then
self:scrollUp()
elseif x>downArrow.startX and x<downArrow.endX and y>downArrow.startY and y<downArrow.endY then
self:scrollDown()
elseif x>elevator.startX and x<elevator.endX and y>upArrow.endY and y<downArrow.startY then
if y<elevator.startY then self:scrollUp()
elseif y>elevator.endY then self:scrollDown() end
end --end clicking on arrow
end
end
function multiselect:switchBack()
tween(0.2,self,{yModPerc=100})
output:sound('stoneslideshortbackwards',2)
Timer.after(0.2,function() self.switchNow=true end)
end
|
bhamuka_all_consuming_god_tentacle_sweep = class({})
LinkLuaModifier( 'bhamuka_all_consuming_god_tentacle_sweep_modifier', 'encounters/bhamuka_all_consuming_god/bhamuka_all_consuming_god_tentacle_sweep_modifier', LUA_MODIFIER_MOTION_NONE )
function bhamuka_all_consuming_god_tentacle_sweep:OnSpellStart()
local victim = GetRandomHeroEntities(1)
if not victim then return end
victim = victim[1]
local victim_loc = victim:GetAbsOrigin()
--- Get Caster, Victim, Player, Point ---
local caster = self:GetCaster()
local caster_loc = caster:GetAbsOrigin()
local playerID = caster:GetPlayerOwnerID()
local player = PlayerResource:GetPlayer(playerID)
local team = caster:GetTeamNumber()
--- Get Special Values ---
local AoERadius = self:GetSpecialValueFor("AoERadius")
local damage = self:GetSpecialValueFor("damage")
local delay = self:GetSpecialValueFor("delay")
local duration = self:GetSpecialValueFor("duration")
-- Sound --
local sound = {"outworld_destroyer_odest_ability_imprison_04", "outworld_destroyer_odest_ability_imprison_05",
"outworld_destroyer_odest_ability_imprison_08", "outworld_destroyer_odest_ability_imprison_12"}
EmitAnnouncerSound( sound[RandomInt(1, #sound)] )
local timer = Timers:CreateTimer(delay, function()
-- Sound --
victim:EmitSound("Hero_Tidehunter.RavageDamage")
-- Particle --
local particle = ParticleManager:CreateParticle("particles/units/heroes/hero_tidehunter/tidehunter_spell_ravage_hit.vpcf", PATTACH_ABSORIGIN, victim)
ParticleManager:SetParticleControl( particle, 0, victim:GetAbsOrigin() )
ParticleManager:ReleaseParticleIndex( particle )
-- DOTA_UNIT_TARGET_TEAM_FRIENDLY; DOTA_UNIT_TARGET_TEAM_ENEMY; DOTA_UNIT_TARGET_TEAM_BOTH
local units = FindUnitsInRadius(team, victim_loc, nil, AoERadius, DOTA_UNIT_TARGET_TEAM_ENEMY, DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC, DOTA_UNIT_TARGET_FLAG_NONE, FIND_ANY_ORDER, false)
for _,victim in pairs(units) do
-- Modifier --
local modifier = victim:AddNewModifier(caster, self, "bhamuka_all_consuming_god_tentacle_sweep_modifier", {duration = duration})
PersistentModifier_Add(modifier)
-- Knockback --
local knockback =
{
knockback_duration = duration,
duration = duration,
knockback_distance = 200,
knockback_height = 350,
}
victim:RemoveModifierByName("modifier_knockback")
local modifier = victim:AddNewModifier(caster, self, "modifier_knockback", knockback)
PersistentModifier_Add(modifier)
-- Apply Damage --
EncounterApplyDamage(victim, caster, self, damage, DAMAGE_TYPE_PHYSICAL, DOTA_DAMAGE_FLAG_NONE)
end
end)
PersistentTimer_Add(timer)
end
function bhamuka_all_consuming_god_tentacle_sweep:OnAbilityPhaseStart()
local caster = self:GetCaster()
local playerID = caster:GetPlayerOwnerID()
local player = PlayerResource:GetPlayer(playerID)
return true
end
function bhamuka_all_consuming_god_tentacle_sweep:GetManaCost(abilitylevel)
return self.BaseClass.GetManaCost(self, abilitylevel)
end
function bhamuka_all_consuming_god_tentacle_sweep:GetCooldown(abilitylevel)
return self.BaseClass.GetCooldown(self, abilitylevel)
end
|
local t = require( "taptest" )
local unixpath = require( "unixpath" )
t( unixpath[[C:\a\b\c]], "C:/a/b/c" )
t()
|
function RK.LoadSavedSettings()
local defaultSettings = {
notifications = true,
}
-- Documentation: ZO_SavedVars:NewAccountWide(savedVariableName, settingsVersion, settingsNamespace, defaultSettings, settingsProfile)
RK.savedSettings = ZO_SavedVars:NewAccountWide("RK_SavedSettings", 1, "RK", RK.defaultSettings, "RK")
end
function RK.InitAddOnSettings()
local LAM2 = LibStub("LibAddonMenu-2.0")
local panelData = {
type = "panel",
name = RK.LONGNAME,
displayName = RK.COLORS.BLUE..RK.LONGNAME,
author = RK.AUTHOR,
version = RK.VERSION,
}
LAM2:RegisterAddonPanel(RK.SHORTNAME.."Options", panelData)
local optionsData = {
[1] = {
type = "description",
text = "Please set the QuickSlot keybindings via ESO's built-in Keybindings controller by selecting 'CONTROLS' in the Settings List.",
},
[2] = {
type = "description",
text = "Note: Keybindings are not Account-wide but the below settings are.",
},
[3] = {
type = "checkbox",
name = "Display QuickSlot Swap Notifications",
tooltip = "Recieve notification from "..RK.LONGNAME.." when QuickSlot is changed via Keybindings",
getFunc = function() return RK.getSavedSetting("notifications") end,
setFunc = function(state) RK.setSavedSetting("notifications", state) end,
},
}
LAM2:RegisterOptionControls(RK.SHORTNAME.."Options", optionsData)
end
function RK.getSavedSetting(setting)
return RK.savedSettings[setting]
end
function RK.setSavedSetting(setting, state)
RK.savedSettings[setting] = state
end
|
--=====================================================================
--
-- plugin.lua -
--
-- Created by liubang on 2021/12/08 18:58
-- Last Modified: 2021/12/08 18:58
--
--=====================================================================
local M = {}
function M.packer_notify(msg, level)
vim.notify(msg, level, { title = 'Packer' })
end
function M.conf(name)
return require(string.format('lb.plugin.%s', name))
end
function M.bootstrap_packer()
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
M.packer_notify 'Downloading packer.nvim...'
M.packer_notify(vim.fn.system {
'git',
'clone',
'--depth',
'1',
'https://github.com/wbthomason/packer.nvim',
install_path,
})
vim.cmd [[packadd packer.nvim]]
return true
else
return false
end
end
return M
|
--+----------------------------------------------------------------------+--
--| BM Altar Automation |--
--| |--
--| MIT License |--
--| Copyright (c) 2021 kobi32768 |--
--| https://github.com/kobi32768/BM-Altar-Automation/blob/master/LICENSE |--
--+----------------------------------------------------------------------+--
-- Variables
local altar = peripheral.wrap("front")
local inChest = peripheral.wrap("top")
local dropCount = 2
local droppedCount = 0
local toProcessCount = 0
local proceedCount = 0
local processingItemName = ""
local waitingLogDisplayed = false
-- Functions
function isExistItems(container)
if next(container.list()) then
return true
else
return false
end
end
function tick(t)
return t/20
end
function waitingLog()
term.setTextColor(colors.lightGray)
print("Waiting for Items...")
end
function importLog()
term.setTextColor(colors.blue)
term.write("Import")
term.setTextColor(colors.white)
term.write(" - ")
term.setTextColor(colors.lightGray)
print(turtle.getItemDetail(1)["count"].." "..turtle.getItemDetail(1)["name"])
end
function exportLog()
term.setTextColor(colors.orange)
term.write("Export")
term.setTextColor(colors.white)
term.write(" - ")
term.setTextColor(colors.lightGray)
print(turtle.getItemDetail(2)["count"].." "..turtle.getItemDetail(2)["name"])
end
-- Main
while true do
-- 素材待機
while (not isExistItems(inChest)) and (turtle.getItemDetail(1) == nil) do
if not waitingLogDisplayed then
waitingLog()
waitingLogDisplayed = true
end
os.sleep(2)
end
waitingLogDisplayed = false
-- 素材搬入
turtle.select(1)
if turtle.getItemDetail(1) == nil then
turtle.suckUp()
importLog()
processingItemName = turtle.getItemDetail(1)["name"]
toProcessCount = turtle.getItemDetail(1)["count"]
end
if turtle.getItemDetail(1)["count"] >= dropCount then
droppedCount = dropCount
else
droppedCount = turtle.getItemDetail(1)["count"]
end
turtle.drop(dropCount)
-- 成果物搬出
while true do
if altar.getItemDetail(1)["name"] ~= processingItemName then
turtle.select(2)
turtle.suck()
proceedCount = proceedCount + droppedCount
if proceedCount == toProcessCount then
turtle.turnRight()
exportLog()
turtle.drop()
turtle.turnLeft()
proceedCount = 0
end
break
end
os.sleep(tick(5))
end
end
|
local Emitter = require('core').Emitter
local childprocess = require('childprocess')
local fs = require('fs')
local setTimeout = require('timer').setTimeout
local Traceroute = require('../lib/traceroute').Traceroute
local utils = require('../lib/utils')
local exports = {}
-- Mock childprocess
function getEmitter(filePath, returnError)
local returnError = returnError or false
local data = fs.readFileSync(filePath)
function get()
local emitter = Emitter:extend()
local split = utils.split(data, '[^\n]+')
emitter.stdout = Emitter:new()
emitter.stderr = Emitter:new()
setTimeout(500, function()
for index, line in ipairs(split) do
if not returnError then
emitter.stdout:emit('data', line .. '\n')
else
emitter.stderr:emit('data', line .. '\n')
end
end
if not returnError then
emitter:emit('exit', 0)
else
emitter:emit('exit', 1)
end
end)
return emitter
end
return get
end
exports.getEmitter = getEmitter
exports['test_traceroute_route_1'] = function(test, asserts)
local hopCount = 0
local splitHops = {}
local hopNumber = 0
local tr = Traceroute:new('193.2.1.87', {})
Traceroute._spawn = exports.getEmitter('./tests/fixtures/output_without_hostnames.txt')
tr:traceroute()
tr:on('hop', function(hop)
hopCount = hopCount + 1
hopNumber = hop['number']
if not splitHops[hopNumber] then
splitHops[hopNumber] = 0
end
splitHops[hopNumber] = splitHops[hopNumber] + 1
if hopCount == 1 then
asserts.equals(hop['number'], 1)
asserts.equals(hop['ip'], '192.168.1.1')
asserts.dequals(hop['rtts'], {0.496, 0.925, 1.138})
elseif hopCount == 8 then
asserts.equals(hop['number'], 8)
asserts.equals(hop['ip'], '154.54.2.165')
asserts.dequals(hop['rtts'], {46.276})
elseif hopCount == 9 then
asserts.equals(hop['number'], 8)
asserts.equals(hop['ip'], '154.54.5.37')
asserts.dequals(hop['rtts'], {46.271})
elseif hopCount == 10 then
asserts.equals(hop['number'], 8)
asserts.equals(hop['ip'], '154.54.5.57')
asserts.dequals(hop['rtts'], {45.894})
elseif hopNumber == 21 then
if splitHops[hopNumber] == 1 then
asserts.equals(hop['number'], 21)
asserts.equals(hop['ip'], '*')
asserts.dequals(hop['rtts'], {})
elseif splitHops[hopNumber] == 2 then
asserts.equals(hop['number'], 21)
asserts.equals(hop['ip'], '88.200.7.249')
asserts.dequals(hop['rtts'], {210.282, 207.316})
end
elseif hopNumber == 22 then
asserts.equals(hop['number'], 22)
asserts.equals(hop['ip'], '88.200.7.249')
asserts.dequals(hop['rtts'], {196.908})
end
end)
tr:on('end', function()
asserts.equals(hopNumber, 22)
test.done()
end)
end
exports['test_traceroute_route_2'] = function(test, asserts)
local hopCount = 0
local splitHops = {}
local hopNumber = 0
local tr = Traceroute:new('184.106.74.174', {})
Traceroute._spawn = exports.getEmitter('./tests/fixtures/output_split_routes_2.txt')
tr:traceroute()
tr:on('hop', function(hop)
hopCount = hopCount + 1
hopNumber = hop['number']
if not splitHops[hopNumber] then
splitHops[hopNumber] = 0
end
splitHops[hopNumber] = splitHops[hopNumber] + 1
if hopCount == 1 then
asserts.equals(hop['number'], 1)
asserts.equals(hop['ip'], '50.56.142.130')
asserts.dequals(#hop['rtts'], 3)
elseif hopNumber == 3 then
if splitHops[hopNumber] == 1 then
asserts.equals(hop['number'], 3)
asserts.equals(hop['ip'], '174.143.123.87')
asserts.dequals(hop['rtts'], {1.115})
elseif splitHops[hopNumber] == 2 then
asserts.equals(hop['number'], 3)
asserts.equals(hop['ip'], '174.143.123.85')
asserts.dequals(hop['rtts'], {1.517, 1.527})
end
end
end)
tr:on('end', function()
asserts.equals(hopNumber, 7)
test.done()
end)
end
exports['test_traceroute_route_3'] = function(test, asserts)
local hopCount = 0
local splitHops = {}
local hopNumber = 0
local tr = Traceroute:new('94.236.68.69', {})
Traceroute._spawn = exports.getEmitter('./tests/fixtures/output_split_routes_3.txt')
tr:traceroute()
tr:on('hop', function(hop)
hopCount = hopCount + 1
hopNumber = hop['number']
if not splitHops[hopNumber] then
splitHops[hopNumber] = 0
end
splitHops[hopNumber] = splitHops[hopNumber] + 1
if hopNumber == 17 then
if splitHops[hopNumber] == 1 then
asserts.equals(hop['number'], 17)
asserts.equals(hop['ip'], '164.177.137.103')
asserts.dequals(hop['rtts'], {155.621})
elseif splitHops[hopNumber] == 2 then
asserts.equals(hop['number'], 17)
asserts.equals(hop['ip'], '164.177.137.101')
asserts.dequals(hop['rtts'], {155.285})
elseif splitHops[hopNumber] == 3 then
asserts.equals(hop['number'], 17)
asserts.equals(hop['ip'], '164.177.137.103')
asserts.dequals(hop['rtts'], {154.711})
end
end
end)
tr:on('end', function()
asserts.equals(hopNumber, 19)
test.done()
end)
end
exports['test_traceroute_error_invalid_hostname'] = function(test, asserts)
local hopCount = 0
local tr = Traceroute:new('arnes.si', {})
Traceroute._spawn = exports.getEmitter('./tests/fixtures/error_invalid_hostname.txt', true)
tr:traceroute()
tr:on('hop', function(hop)
hopCount = hopCount + 1
end)
tr:on('error', function(err)
asserts.equals(hopCount, 0)
asserts.ok(err.message:find('Name or service not known'))
test.done()
end)
end
exports['test_traceroute_ipv6'] = function(test, asserts)
local hopCount = 0
local splitHops = {}
local hopNumber = 0
local tr = Traceroute:new('2607:f8b0:4009:803::1000', {})
Traceroute._spawn = exports.getEmitter('./tests/fixtures/output_ipv6_split_routes.txt', false)
tr:traceroute()
tr:on('hop', function(hop)
hopCount = hopCount + 1
hopNumber = hop['number']
if not splitHops[hopNumber] then
splitHops[hopNumber] = 0
end
splitHops[hopNumber] = splitHops[hopNumber] + 1
if hopCount == 2 then
asserts.equals(hop['number'], 2)
asserts.equals(hop['ip'], '2001:4801:800:c3:601a:2::')
asserts.dequals(hop['rtts'], {0.974, 1.147, 1.150})
elseif hopNumber == 3 then
if splitHops[hopNumber] == 1 then
asserts.equals(hop['ip'], '2001:4801:800:cb:c3::')
asserts.dequals(hop['rtts'], {0.766})
elseif splitHops[hopNumber] == 2 then
asserts.equals(hop['ip'], '2001:4801:800:ca:c3::')
asserts.dequals(hop['rtts'], {0.773})
elseif splitHops[hopNumber] == 3 then
asserts.equals(hop['ip'], '2001:4801:800:cb:c3::')
asserts.dequals(hop['rtts'], {0.954})
end
end
end)
tr:on('end', function(err)
asserts.equals(hopNumber, 10)
test.done()
end)
end
return exports
|
includeFile("draft_schematic/dance_prop/prop_base.lua")
|
local function OnCreate(inst, scenariorunner)
if inst.components.burnable then
inst.components.burnable:Ignite()
end
end
--local function OnLoad(inst, scenariorunner)
--end
return {
OnCreate=OnCreate,
--OnLoad=OnLoad
}
|
-- units/units.csv and utils
function MeshNameExists (meshname) return true end -- todo : check
function GetPlanetUnitTypeIDFromTexture (texture)
local a,b,basename = string.find(texture,"([^/.]+)[^/]*$")
return (basename or texture).."__planets"
end
function GetUnitTypeForPlanetNode (planetnode)
return gUnitTypes[GetVegaXMLVar(planetnode,"unit") or GetPlanetUnitTypeIDFromTexture(GetVegaXMLVar(planetnode,"texture") or "???") or "???"]
end
function FindUnitTypeFromFileValue (file,factionhint)
if (not file) then return end
--~ file = string.gsub(file,"|.*","")
file = string.gsub(file,".*|","")
--~ print("FindUnitTypeFromFileValue",file,file.."__neutral",GetPlanetUnitTypeIDFromTexture(file))
return (factionhint and gUnitTypes[file.."__"..factionhint]) or gUnitTypes[file] or gUnitTypes[file.."__neutral"] or gUnitTypes[GetPlanetUnitTypeIDFromTexture(file)] or
(factionhint and gUnitTypesI[file.."__"..factionhint]) or gUnitTypesI[file] or gUnitTypesI[file.."__neutral"] -- ignore case, needed for Unit:factory,...
end
function GetPlanetTypeInGameName (id) return gPlanetTypeInGameNames[id] end
gPlanetTypeInGameNames = { -- units.csv -> ingame (universe:planet->file/texture->units.csv)
ocean__planets ="Oceanic",
tundra__planets ="Frozen_Ammonia",
Snow__planets ="Ice",
forest__planets ="Overgrown",
frigid_mud__planets ="Arid_Methane",
molten__planets ="Molten",
ocean_ammonia__planets ="Oceanic_Ammonia",
Lava__planets ="Volcanic",
Dirt__planets ="Trantor_Class",
k_class__planets ="Bio_Simple",
n_class__planets ="Aera_Trantor",
m_class__planets ="Bio_Diverse",
rock__planets ="Rocky",
desert__planets ="Arid",
red_rocky__planets ="Bio_Diverse_Methane",
toxic_disaster__planets ="Bio_Simple_Methane",
carribean__planets ="Tropical",
tkirsa__planets ="Rlaan_Trantor",
forest_methane__planets ="forest_methane",
university__planets ="University",
j_class__planets ="Aera_Ice",
--~ mars__planets ="",
--~ earth__planets ="",
--~ moon__planets ="",
--~ newdetroit__planets ="",
--~ industrial__planets ="",
}
function GetUnitTypeFromSectorXMLNode (node) return FindUnitTypeFromFileValue(node.file,node.faction) end
function GetJumpDestinationFromNode (node) return node and node.destination end
function GetHUDImageFromNode_Planet (node)
local t = GetUnitTypeFromSectorXMLNode(node)
--~ print("GetHUDImageFromNode_Planet",node.file,t and ((t.Hud_image == "") and "TYPE:EMPTYHUD" or t.Hud_image) or "TYPE:MISSING")
if (not t) then return end
local tex = t.Hud_image
if (tex == "") then return end
tex = string.gsub(tex,".*/","")
tex = string.gsub(tex,"%.sprite$",".dds") -- todo : sprite = config file...
return tex
end
function GetHUDImageFromNode_Unit (node)
local t = GetUnitTypeFromSectorXMLNode(node)
if (t) then -- t.Hud_image: MininBase2-hud.spr -> MininBase2-hud.png MininBase2-hud.png
local filename = FindFirstFileInDir(GetVegaDataDir().."units/"..(t.Directory or ""),"hud.*%.dds") -- todo : cache result
--~ print("GetHUDImageFromNode_Unit : ",t.Directory,filename)
if (filename) then return filename end
else
print("WARNING: GetHUDImageFromNode_Unit type not found",node and node.file)
end
-- node and GetHUDImageFromNode_Planet(node) or "planet-carribean-hud.dds"
return "Agricultural_Station_Agricultural_Station-hud.png.dds"
--[[
MiningBase,./installations/MiningBase,MiningBase,,Installation,BASE,WRITEME,MininBase2-hud.spr,0.4,,,,,{MiningBase.bfxm;;},,
MiningBase__aera,./factions/aera/MiningBase,MiningBase__aera,,Installation,BASE,Aera mining base,aera-mine-hud.spr,10,,,,,{miningbase.bfxm;;},
MiningBase__pirates,./factions/pirates/MiningBase,MiningBase,,Installation,BASE,WRITEME,MiningBase-hud.spr,300,,,,,{MiningBase.bfxm;;},
MiningBase__privateer,./factions/rlaan/MiningBase,MiningBase,,Installation,BASE,WRITEME,MiningBase3-hud.spr,3,,,,,{MiningBase.bfxm;;},,
MiningBase__rlaan,./installations/Rlaan_Mining_Base,MiningBase__rlaan,,Installation,BASE,Rlaan Mining Base,rlaan_mining_base-hud.sprite,170,,,,,{rlaan_mining_base.bfxm;;},,
Fighter_Barracks,./installations/Fighter_Barracks,Fighter Barracks,,Installation,BASE,WRITEME,fighter_barracks-hud.spr,3,,,,,{fighter_barracks.bfxm;;},,,,,,,
Fighter_Barracks__aera,./factions/aera/fighter_barracks,Fighter Barracks,,Installation,BASE,WRITEME,station-hud.spr,,,,,,{fighter_barracks.bfxm;;},,,,,,,
Fighter_Barracks__rlaan,./installations/Rlaan_Fighter_Barracks,Fighter_Barracks__rlaan,,Installation,BASE,Fighter Barracks,rlaan_fighter_barracks-hud.sprite,200,,,,,{rlaan_fighter_barracks.bfxm;;},,,,,,,
cat data/units/installations/MiningBase/MininBase2-hud.spr
MininBase2-hud.png MininBase2-hud.png
]]--
end
function GetUnitMeshNameFromNode (node)
local t = GetUnitTypeFromSectorXMLNode(node)
if (t) then
-- o.id,o.Directory,o.Name,o.STATUS,o.Object_Type,o.Combat_Role,o.Textual_Description,o.Hud_image,o.Unit_Scale, ... o.Mesh,o.Shield_Mesh
local meshname = string.gsub(string.gsub(t.Mesh or "","%.bfxm.*",".mesh"),"^%{","")
--~ print("GetUnitMeshNameFromNode",node.file,meshname)
if (string.find(meshname,"%.mesh") and MeshNameExists(meshname)) then return meshname end
else
print("WARNING: GetUnitMeshNameFromNode type not found",node and node.file)
end
return "MiningBase.mesh"
--~ return GetRandomArrayElement({"starfortress","factory","asteroidfighterbase","uln_asteroid_refinery","diplomatic_center","uln_commerce_center","relay",
--~ "rlaan_star_fortress","rlaan_medical","medical","outpost","agricultural_station","shaper_bio_adaptation","gasmine","MiningBase","Shipyard","rlaan_mining_base","commerce_center",
--~ "civilan_asteroid_shipyard","research","rlaan_fighter_barracks","uln_refinery","rlaan_commerce_center","relaysat","fighter_barracks","refinery",})
end
function LoadMasterPartList ()
gMasterPartList = {}
gMasterPartList_ByPath = {}
local filepath = GetVegaDataDir().."master_part_list.csv"
local iLineNum = 0
gMasterPartListFieldNames = explode(",","file,categoryname,price,mass,volume,description")
for line in io.lines(filepath) do
iLineNum = iLineNum + 1
local csv = ParseCSVLine(line)
if (iLineNum > 1 and csv[1] ~= "") then
local o = {}
for k,fieldname in ipairs(gMasterPartListFieldNames) do o[fieldname] = csv[k] end
local path = (o.categoryname or "???").."/"..(o.file or "???")
o.path = path
if (gMasterPartList_ByPath[path]) then print("WARNING: LoadMasterPartList: dublicate path '"..tostring(path).."'") end
table.insert(gMasterPartList,o)
gMasterPartList_ByPath[path] = o
end
end
end
function LoadUnitTypes ()
gUnitTypes = {}
gUnitTypesI = {} -- ignore case (lowercase)
local filepath = GetVegaDataDir().."units/units.csv"
local iLineNum = 0
gUnitTypeFieldNames = explode(",","id,Directory,Name,STATUS,Object_Type,Combat_Role,Textual_Description,Hud_image,Unit_Scale,"..
"Cockpit,CockpitX,CockpitY,CockpitZ,Mesh,Shield_Mesh,Rapid_Mesh,BSP_Mesh,Use_BSP,Use_Rapid,NoDamageParticles,"..
"Mass,Moment_Of_Inertia,Fuel_Capacity,Hull,"..
"Armor_Front_Top_Right,Armor_Front_Top_Left,Armor_Front_Bottom_Right,Armor_Front_Bottom_Left,Armor_Back_Top_Right,Armor_Back_Top_Left,Armor_Back_Bottom_Right,Armor_Back_Bottom_Left,"..
"Shield_Front_Top_Right,Shield_Back_Top_Left,Shield_Front_Bottom_Right,Shield_Front_Bottom_Left,Shield_Back_Top_Right,Shield_Front_Top_Left,Shield_Back_Bottom_Right,Shield_Back_Bottom_Left,"..
"Shield_Recharge,Shield_Leak,Warp_Capacitor,Primary_Capacitor,Reactor_Recharge,Jump_Drive_Present,Jump_Drive_Delay,Wormhole,"..
"Outsystem_Jump_Cost,Warp_Usage_Cost,Afterburner_Type,Afterburner_Usage_Cost,Maneuver_Yaw,Maneuver_Pitch,Maneuver_Roll,"..
"Yaw_Governor,Pitch_Governor,Roll_Governor,"..
"Afterburner_Accel,Forward_Accel,Retro_Accel,Left_Accel,Right_Accel,Top_Accel,Bottom_Accel,"..
"Afterburner_Speed_Governor,Default_Speed_Governor,ITTS,Radar_Color,Radar_Range,Tracking_Cone,Max_Cone,Lock_Cone,"..
"Hold_Volume,Can_Cloak,Cloak_Min,Cloak_Rate,Cloak_Energy,Cloak_Glass,Repair_Droid,ECM_Rating,ECM_Resist,Ecm_Drain,"..
"Hud_Functionality,Max_Hud_Functionality,Lifesupport_Functionality,Max_Lifesupport_Functionality,Comm_Functionality,Max_Comm_Functionality,"..
"FireControl_Functionality,Max_FireControl_Functionality,SPECDrive_Functionality,Max_SPECDrive_Functionality,Slide_Start,Slide_End,"..
"Activation_Accel,Activation_Speed,Upgrades,Prohibited_Upgrades,Sub_Units,Sound,Light,Mounts,Net_Comm,Dock,Cargo_Import,Cargo,"..
"Explosion,Num_Animation_Stages,Upgrade_Storage_Volume,Heat_Sink_Rating,Shield_Efficiency,Num_Chunks,Chunk_0,Collide_Subunits,Spec_Interdiction,Tractorability")
for line in io.lines(filepath) do
iLineNum = iLineNum + 1
local csv = ParseCSVLine(line)
if (iLineNum > 3) then
local o = {}
for k,fieldname in ipairs(gUnitTypeFieldNames) do o[fieldname] = csv[k] end
local id = o.id or "???"
assert(not gUnitTypes[id])
gUnitTypes[id] = o
gUnitTypesI[string.lower(id)] = o
--~ if (string.find(id,"__planets$") or (not o.id)) then
--~ if (string.find(id,"planet")) then
--~ if (not gMyFirstPlanet) then gMyFirstPlanet = true print("units.csv.planet:",pad("ID",30),pad("Directory",30),pad("Name",25),"TYPE","Hud_image") end
--~ print("units.csv.planet:",pad(o.id,30),pad(o.Directory,30),pad(o.Name,25),o.STATUS,o.Object_Type,o.Hud_image)
--~ for k,v in pairs(o) do print(o.id,k,v) end
--~ os.exit(0)
--~ end
end
end
LoadMasterPartList()
--[[
parse cargo import :
Dirt__planets Cargo_Import {Consumer_and_Commercial_Goods/Domestic;1;.1;2;2}
{Consumer_and_Commercial_Goods/Electronics;1;.1;;}....
{upgrades/Weapons/Mounted_Guns_Medium;1;.1;12;5}
]]--
end
|
local util = require("tlcli.util")
local lfs = require("lfs")
local fs = {}
do
local emptyref = setmetatable({}, {
__newindex = function()
error("Attempt to assign to emptyref, stop that", 2)
end,
__index = function()
error("Attempt to index into emptyref, stop that", 2)
end,
})
function fs.is_file(f)
return f == emptyref
end
function fs._get_emptyref()
return emptyref
end
end
local path_separator = package.config:sub(1, 1)
function fs.get_path_separator()
return path_separator
end
local function path_components_iter(pathname)
for component in util.split(pathname, path_separator) do
coroutine.yield(component)
end
end
function fs.path_components(pathname)
return util.wrap_with(path_components_iter, pathname)
end
function fs.get_path_components(pathname)
return util.generate(fs.path_components(pathname))
end
local function insert_comp(tab, comp)
if #comp > 0 and comp ~= "." then
table.insert(tab, comp)
end
end
function fs.path_concat(...)
local new_path = {}
for i = 1, select("#", ...) do
local c = select(i, ...)
if type(c) == "table" then
for _, v in ipairs(c) do
insert_comp(new_path, v)
end
else
insert_comp(new_path, c)
end
end
return table.concat(new_path, path_separator)
end
local HOME = os.getenv("HOME")
local XDG_CONFIG_HOME = os.getenv("XDG_CONFIG_HOME") or
fs.path_concat(HOME, ".config")
local CMD_PATH = fs.path_concat(XDG_CONFIG_HOME, "teal", "commands")
local GLOBAL_CONFIG_PATH = fs.path_concat(XDG_CONFIG_HOME, "config.lua")
local TYPES_PATH = fs.path_concat(XDG_CONFIG_HOME, "teal", "teal-types", "types")
function fs.HOME() return HOME end
function fs.XDG_CONFIG_HOME() return XDG_CONFIG_HOME end
function fs.CMD_PATH() return CMD_PATH end
function fs.GLOBAL_CONFIG_PATH() return GLOBAL_CONFIG_PATH end
function fs.TYPES_PATH() return TYPES_PATH end
local function trim(str)
return (str:gsub("^%s*(.-)%s*$", "%1"))
end
function fs.get_shared_library_ext()
if not package.cpath or trim(package.cpath) == "" then
return "so"
end
return package.cpath:match("%.(%w+)%s*$")
end
function fs.path_parents(pathname)
local current_path = ""
local comps = fs.get_path_components(pathname)
comps[#comps] = nil
return coroutine.wrap(function()
for _, dir in ipairs(comps) do
current_path = fs.path_concat(current_path, dir)
coroutine.yield(current_path)
end
end)
end
local function dir_iter(dirname)
for file in assert(lfs.dir(dirname)) do
if dirname == "." then
dirname = ""
end
if file:sub(1, 1) ~= "." then
if lfs.attributes(fs.path_concat(dirname, file), "mode") == "directory" then
dir_iter(fs.path_concat(dirname, file))
else
coroutine.yield(fs.path_concat(dirname, file))
end
end
end
end
function fs.dir(dirname)
return util.wrap_with(dir_iter, dirname)
end
local Matcher = {}
local function esc_str(s)
return (string.gsub(s, "[%^%$%(%)%%%.%[%]%*%+%-%?]", function(match)
if match == "*" then
return "[^" .. path_separator .. "]-"
end
return "%" .. match
end))
end
local function create_matcher(path_pattern)
local comps = {}
for chunk in util.split(path_pattern, "**" .. fs.get_path_separator()) do
if chunk == ".." then
error("Error in pattern \"" .. path_pattern .. "\" .." .. fs.get_path_separator() .. " is not allowed")
end
table.insert(comps, esc_str(chunk))
end
comps[1] = "^" .. comps[1]
comps[#comps] = comps[#comps] .. "$"
return function(s)
local idx = 1
local s_idx
for _, comp in ipairs(comps) do
s_idx, idx = string.find(s, comp, idx)
if not s_idx then
return false
end
end
return true
end
end
local function match_arr(patts, str)
for i, v in ipairs(patts) do
if v(str) then
return i
end
end
end
function fs.get_file_tree(dirname)
local dir = {}
for path in fs.dir(dirname) do
local current = dir
local components = fs.get_path_components(path)
for i, component in ipairs(components) do
if i == #components then
current[component] = fs._get_emptyref()
elseif not current[component] then
current[component] = {}
end
current = current[component]
end
end
return dir
end
function fs.get_file_paths(dirname)
return util.generate(fs.dir(dirname))
end
function fs.match(dirname, include, exclude)
local inc_matchers = {}
local exc_matchers = {}
for _, patt in ipairs(include or {}) do
table.insert(inc_matchers, create_matcher(patt))
end
for _, patt in ipairs(exclude or {}) do
table.insert(exc_matchers, create_matcher(patt))
end
return coroutine.wrap(function()
for fname in fs.dir(dirname) do
local is_included = true
if #inc_matchers > 0 and not match_arr(inc_matchers, fname) then
is_included = false
end
if #exc_matchers > 0 then
if is_included and match_arr(exc_matchers, fname) then
is_included = false
end
end
if is_included then
coroutine.yield(fname)
end
end
end)
end
function fs.add_to_path(dirname)
local path_str = dirname
if string.sub(path_str, -1) == path_separator then
path_str = path_str:sub(1, -2)
end
path_str = path_str .. path_separator
local lib_path_str = path_str .. "?." .. fs.get_shared_library_ext() .. ";"
local lua_path_str = path_str .. "?.lua" .. ";" ..
path_str .. "?" .. path_separator .. "init.lua;"
package.path = lua_path_str .. package.path
package.cpath = lib_path_str .. package.cpath
end
function fs.split_extension(filename)
local basename, extension = string.match(filename, "(.-)%.([^" .. fs.get_path_separator() .. "]*)$")
extension = extension and extension:lower()
return basename, extension
end
function fs.get_extension(filename)
local _, extension = fs.split_extension(filename)
return extension
end
function fs.get_basename(filename)
local basename = fs.split_extension(filename)
return basename
end
function fs.get_output_file_name(filename)
local ext = fs.get_extension(filename)
if ext == "lua" then
return filename:sub(1, -4) .. "out.lua"
elseif ext == "tl" then
return filename:sub(1, -3) .. "lua"
elseif ext == "d.tl" then
return filename:sub(1, -5) .. "out.d.tl"
elseif ext == "c" then
return filename:sub(1, -2) .. "o"
end
end
function fs.get_output_file_name_components(filename)
local comps = fs.get_path_components(filename)
comps[#comps] = fs.get_output_file_name(comps[#comps])
return comps
end
function fs.is_absolute(path)
return path:sub(1, 1) == "/"
end
function fs.is_in_dir(dir_name, file_name)
if not lfs.attributes(dir_name) then
return false
end
local dir_comps = fs.get_path_components(dir_name)
local file_comps = fs.get_path_components(file_name)
if #dir_comps >= #file_comps then
return false
end
while #dir_comps > 0 do
if file_comps[1] ~= dir_comps[1] then
return false
end
table.remove(file_comps, 1)
table.remove(dir_comps, 1)
end
file_name = fs.path_concat(file_comps)
for file in lfs.dir(dir_name) do
if file == file_name then
return true
end
end
end
function fs.get_tail(path)
return string.match(path, "[^" .. path_separator .. "]*$")
end
local root_file = "tlcconfig.lua"
function fs.ROOT_FILE() return root_file end
function fs.find_project_root()
local orig_dir = lfs.currentdir()
local dir_comps = fs.get_path_components(orig_dir)
while #dir_comps > 1 do
for file in lfs.dir("/" .. fs.path_concat(dir_comps)) do
if file == root_file then
return "/" .. fs.path_concat(dir_comps)
end
end
table.remove(dir_comps)
end
return orig_dir
end
function fs.do_in(dir_name, f)
local current_dir = lfs.currentdir()
assert(lfs.chdir(dir_name))
local res = f()
assert(lfs.chdir(current_dir))
return res
end
local file_content_cache = setmetatable({}, { __mode = "kv" })
function fs.read(filename)
if file_content_cache[filename] then
return file_content_cache[filename]
end
local fh, err = io.open(filename, "r")
if not fh then return nil, err end
file_content_cache[filename] = fh:read("*a")
fh:close()
return file_content_cache[filename]
end
return fs
|
dofile("app0:/input/InputModule.lua")
dofile("app0:/game_of_life/GameOfLifeModule.lua")
HUDDrawController = {}
local crossImage = Graphics.loadImage("app0:/assets/sprites/cross0.png")
local dpadImage = Graphics.loadImage("app0:/assets/sprites/dpad0.png")
local selectImage = Graphics.loadImage("app0:/assets/sprites/select0.png")
local startImage = Graphics.loadImage("app0:/assets/sprites/start0.png")
local rtriggerImage = Graphics.loadImage("app0:/assets/sprites/rtrigger0.png")
local ltriggerImage = Graphics.loadImage("app0:/assets/sprites/ltrigger0.png")
local BLACK = Color.new(0, 0, 0)
HUDDrawController = {}
function HUDDrawController.pipeline()
Graphics.drawImage(816, 64, crossImage)
Graphics.drawImage(816, 108, dpadImage)
Graphics.drawImage(816, 152, selectImage)
Graphics.drawImage(816, 196, startImage)
Graphics.drawImage(816, 240, rtriggerImage)
Graphics.drawImage(816, 284, ltriggerImage)
Graphics.debugPrint(816, 32, "- MENU -", BLACK)
Graphics.debugPrint(856, 64, "Switch", BLACK)
Graphics.debugPrint(856, 108, "Move", BLACK)
Graphics.debugPrint(856, 152, "FPS Limit", BLACK)
Graphics.debugPrint(856, 196, GameOfLifeModule.MODE, BLACK)
Graphics.debugPrint(856, 240, "Random", BLACK)
Graphics.debugPrint(856, 284, "Empty", BLACK)
end
|
collectibles =
{
{"qe_thunderheart", 1},
}
markers = {
{
map = "res/map/highland/highland.tmx",
position = {225, 1900},
step = 0
},
{
map = "res/map/gandriasewers/gandriasewers.tmx",
npc = "npc_vincent3",
position = {125, 175},
step = -1
}
}
|
local commands = {}
local key_delay = 80
local press_keys = function(keys, cb)
keys = keys:gsub('<bs>', '')
keys = vim.api.nvim_replace_termcodes(keys, true, true, true)
local iter = keys:gmatch"."
local press
press = function()
local c = iter()
print(c)
if not c then return cb() end
vim.fn.feedkeys(c)
vim.defer_fn(press, key_delay)
end
vim.defer_fn(press, key_delay)
end
local runner
local idx = 1
runner = function()
local cmd = commands[idx]
if not cmd then return end
idx = idx + 1
local action
if type(cmd) == 'number' then
vim.defer_fn(runner, cmd)
elseif type(cmd) == 'string' then
press_keys(cmd, runner)
else
assert(false)
end
end
function send(keys)
table.insert(commands,keys)
end
function wait(ms)
table.insert(commands,ms)
end
send(":NoteflowNew Introduction<CR>")
wait(300)
send("Note<CR>")
send("oWelcome to Noteflow demonstration!<cr><cr>")
wait(500)
send("To create new notes use command<cr>")
send(" :NoteflowNew <title><cr><bs>")
send("To edit tags<cr>")
send(" :NoteflowEditTags (or ,ne mapping )<cr><bs>")
send("To browse notes<cr>")
send(" :NoteflowFind (or ,nf mapping )<cr><bs>")
send("To insert wikilink<cr>")
send(" :NoteflowInsertLink (or ,nl mapping)<cr><bs><cr>")
send("Let's see them in action!<esc>")
send(":NoteflowEditTags<cr>")
send("basic<C-t><cr>")
send("Go<cr><bs>We just added 'basic' tag to this note<esc>:w<cr>")
send(":NoteflowNew Foo bar<CR>")
wait(200)
send("Note<CR>")
wait(200)
send("oFoobar is a placeholder name in [[computer programming]].<esc>hh")
send(":NoteflowFollowWikilink<cr>")
wait(200)
send("Note<cr>")
wait(200)
send("oThis is a new note about programming. Let's go back to the intro, though.<esc>bbb")
send(":NoteflowInsertLink<cr>")
send("#<C-x><C-o>b<C-n> <cr>")
wait(300)
send(":NoteflowFollowWikilink<cr>")
wait(500)
send(":qa!")
runner()
|
---@class EquipBreakPopup
local EquipBreakPopup = DClass("EquipBreakPopup", BaseWindow)
_G.EquipBreakPopup = EquipBreakPopup
function EquipBreakPopup:ctor(data)
---@type EquipMgr_EquipData
self.curEquipData = data[1]
---@type EquipMgr_EquipData
self.lastEquipData = data[2]
end
function EquipBreakPopup:onInit()
self.coverCallBack = self.close
self:onInitUI()
end
function EquipBreakPopup:onInitUI()
local tableCompare = {}
local dataCompare = {}
self.nodes.txtNextLv.text = self.curEquipData.lv
self.nodes.txtLastLv.text = self.lastEquipData.lv
self.configEquip = Config.Equip[self.curEquipData.cId]
local keyAttr = self.configEquip.star * 10 + self.configEquip.item_position
self.configAttr = Config.EquipAttr[keyAttr]
for index, value in ipairs(self.configAttr.show_attr) do
local data0 =
EquipManager:getEquipAttr(
self.configAttr,
self.configAttr.show_attr[index],
self.curEquipData.quality,
self.lastEquipData.lv)
local data1 =
EquipManager:getEquipAttr(self.configAttr, self.configAttr.show_attr[index], self.curEquipData.quality , self.curEquipData.lv)
dataCompare = {}
dataCompare.name = data0.name
dataCompare.current = data1.num
dataCompare.next = data0.num
table.insert(tableCompare, dataCompare)
end
self.nodes.contentBreak:InitPool(
#tableCompare,
function(index, obj)
local data = tableCompare[index]
local txtName = obj.transform:Find("txtTitle"):GetComponent(typeof(Text))
local txtFrom = obj.transform:Find("txtNextValue"):GetComponent(typeof(Text))
local txtTo = obj.transform:Find("txtLastValue"):GetComponent(typeof(Text))
txtName.text = data.name
txtFrom.text = data.current
txtTo.text = data.next
end
)
end
|
platform.apilevel = '2.0'
function on.paint(gc)
gc:setFont("sansserif", "r", 6)
local h = platform.window:height()
local w = platform.window:width()
--CHECK INPUT VARIABLES
if(var.recall("xend")<=var.recall("xstart")) then
gc:drawString("ERROR: xend has to be larger than xstart", 10, 20)
return
end
if(not(var.recall("xstart")>0)) then
gc:drawString("ERROR: xstart has to be positive (greater than 0)", 10, 40)
return
end
--VERTICAL LINES PROCESSING--------------------------
local offsetleft = 25
local offsetbottom = 15
local zerooffset = 0
local nodes = math.eval("ceiling(approx(log(xend,10)-log(xstart,10)))")
for i = 0, nodes, 1 do
gc:setPen("thin", "dashed")
gc:drawLine(((w-offsetleft)/nodes)*i+offsetleft, 0, ((w-offsetleft)/nodes)*i+offsetleft, h-offsetbottom)
gc:drawString(math.eval("approx(xstart*10^("..i.."))"), ((w-offsetleft)/nodes)*i+offsetleft-5, h-2, "bottom")
for j = 1, 9, 1 do
gc:setPen("thin", "dotted")
gc:drawLine((((w-offsetleft)/nodes)*i+offsetleft)+math.eval("approx(log("..j..",10))")*((w-offsetleft)/nodes), 0, (((w-offsetleft)/nodes)*i+offsetleft)+math.eval("approx(log("..j..",10))")*((w-offsetleft)/nodes), h-offsetbottom)
end
end
--HORIZONTAL GAIN LINES PROCESSING---------------------
var.store("ystartp", math.eval("floor(ystartp/10)*10")) -- round to 10
var.store("yendp", math.eval("ceiling(yendp/10)*10")) -- round to 10
local nodes2 = math.eval("ceiling(approx((yendp-ystartp)/10))")
for i = 0, nodes2, 1 do --draw horizintal lines
gc:drawLine(offsetleft, ((h-offsetbottom)/nodes2)*i, w, ((h-offsetbottom)/nodes2)*i)
gc:drawString((var.recall("yendp")-10*i).."°", 0, ((h-offsetbottom)/nodes2)*i+5)
if((var.recall("yendp"))-10*i==0) then --find zero line
zerooffset = ((h-offsetbottom)/nodes2)*i
end
end
if(var.recall("ystartp")>0)then--Fixes bug, if zeroline is below window wiew
zerooffset = ((h-offsetbottom)+(h-offsetbottom)/nodes2)*var.recall("ystartp")/10
end
if(var.recall("yendp")<0 )then--fixes bug, if zeroline is above window view
zerooffset = ((h-offsetbottom)/nodes2)*var.recall("yendp")/10
end
--PLOT PHASE--------------------------------------------
local plotstart = math.eval("approx(log(xstart,10))")
local plotend = math.eval("approx(log(xend,10))")
local step = var.recall("step")
local stepquant = math.ceil((plotend-plotstart)/step)
local pixelperstep = (w-offsetleft)/stepquant
gc:setPen("thin", "smooth")
local linepoints = {}
for i=0, stepquant, 1 do
local val = math.eval("angle(h(10^("..plotstart+step*i..")))*180/3.14195")
linepoints[2*i+1] = (pixelperstep*i)+offsetleft;
linepoints[2*i+2] = zerooffset-((h-offsetbottom)/(nodes2*10))*val;
end
gc:drawPolyLine(linepoints)
end
------------------------------------------------------------------------------------------
function on.activate()
platform.window:invalidate()
end
-------------------------------------------------------------------------------------------
function on.arrowUp()
var.store("yendp", var.recall("yendp")+10)
var.store("ystartp", var.recall("ystartp")+10)
platform.window:invalidate()
end
function on.arrowDown()
var.store("yendp", var.recall("yendp")-10)
var.store("ystartp", var.recall("ystartp")-10)
platform.window:invalidate()
end
function on.arrowLeft()
var.store("xstart", var.recall("xstart")/10)
var.store("xend", var.recall("xend")/10)
platform.window:invalidate()
end
function on.arrowRight()
var.store("xstart", var.recall("xstart")*10)
var.store("xend", var.recall("xend")*10)
platform.window:invalidate()
end
function on.charIn(ch)
if(ch == "*") then
var.store("xend", var.recall("xend")/10)
platform.window:invalidate()
end
if(ch == "/") then
var.store("xend", var.recall("xend")*10)
platform.window:invalidate()
end
if(ch == "+") then
var.store("yendp", var.recall("yendp")-10)
platform.window:invalidate()
end
if(ch == "-") then
var.store("yendp", var.recall("yendp")+10)
platform.window:invalidate()
end
|
--------------------------------
-- @module Slider
-- @extend Widget
-- @parent_module ccui
--------------------------------
-- Changes the progress direction of slider.<br>
-- param percent Percent value from 1 to 100.
-- @function [parent=#Slider] setPercent
-- @param self
-- @param #int percent
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- Query the maximum percent of Slider. The default value is 100.<br>
-- since v3.7<br>
-- return The maximum percent of the Slider.
-- @function [parent=#Slider] getMaxPercent
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- Load normal state texture for slider ball.<br>
-- param normal Normal state texture.<br>
-- param resType @see TextureResType .
-- @function [parent=#Slider] loadSlidBallTextureNormal
-- @param self
-- @param #string normal
-- @param #int resType
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- Load dark state texture for slider progress bar.<br>
-- param fileName File path of texture.<br>
-- param resType @see TextureResType .
-- @function [parent=#Slider] loadProgressBarTexture
-- @param self
-- @param #string fileName
-- @param #int resType
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
--
-- @function [parent=#Slider] getBallNormalFile
-- @param self
-- @return ResourceData#ResourceData ret (return value: cc.ResourceData)
--------------------------------
-- Sets if slider is using scale9 renderer.<br>
-- param able True that using scale9 renderer, false otherwise.
-- @function [parent=#Slider] setScale9Enabled
-- @param self
-- @param #bool able
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
--
-- @function [parent=#Slider] getBallPressedFile
-- @param self
-- @return ResourceData#ResourceData ret (return value: cc.ResourceData)
--------------------------------
-- brief Return a zoom scale<br>
-- since v3.3
-- @function [parent=#Slider] getZoomScale
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- Sets capinsets for progress bar slider, if slider is using scale9 renderer.<br>
-- param capInsets Capinsets for progress bar slider.<br>
-- js NA
-- @function [parent=#Slider] setCapInsetProgressBarRenderer
-- @param self
-- @param #rect_table capInsets
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- Load textures for slider ball.<br>
-- param normal Normal state texture.<br>
-- param pressed Pressed state texture.<br>
-- param disabled Disabled state texture.<br>
-- param texType @see TextureResType .
-- @function [parent=#Slider] loadSlidBallTextures
-- @param self
-- @param #string normal
-- @param #string pressed
-- @param #string disabled
-- @param #int texType
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- Add call back function called when slider's percent has changed to slider.<br>
-- param callback An given call back function called when slider's percent has changed to slider.
-- @function [parent=#Slider] addEventListener
-- @param self
-- @param #function callback
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- Set a large value could give more control to the precision.<br>
-- since v3.7<br>
-- param percent The max percent of Slider.
-- @function [parent=#Slider] setMaxPercent
-- @param self
-- @param #int percent
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- Load texture for slider bar.<br>
-- param fileName File name of texture.<br>
-- param resType @see TextureResType .
-- @function [parent=#Slider] loadBarTexture
-- @param self
-- @param #string fileName
-- @param #int resType
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
--
-- @function [parent=#Slider] getProgressBarFile
-- @param self
-- @return ResourceData#ResourceData ret (return value: cc.ResourceData)
--------------------------------
-- Gets capinsets for bar slider, if slider is using scale9 renderer.<br>
-- return capInsets Capinsets for bar slider.
-- @function [parent=#Slider] getCapInsetsBarRenderer
-- @param self
-- @return rect_table#rect_table ret (return value: rect_table)
--------------------------------
-- Gets capinsets for progress bar slider, if slider is using scale9 renderer.<br>
-- return Capinsets for progress bar slider.<br>
-- js NA
-- @function [parent=#Slider] getCapInsetsProgressBarRenderer
-- @param self
-- @return rect_table#rect_table ret (return value: rect_table)
--------------------------------
-- Load pressed state texture for slider ball.<br>
-- param pressed Pressed state texture.<br>
-- param resType @see TextureResType .
-- @function [parent=#Slider] loadSlidBallTexturePressed
-- @param self
-- @param #string pressed
-- @param #int resType
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
--
-- @function [parent=#Slider] getBackFile
-- @param self
-- @return ResourceData#ResourceData ret (return value: cc.ResourceData)
--------------------------------
-- Gets If slider is using scale9 renderer.<br>
-- return True that using scale9 renderer, false otherwise.
-- @function [parent=#Slider] isScale9Enabled
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#Slider] getBallDisabledFile
-- @param self
-- @return ResourceData#ResourceData ret (return value: cc.ResourceData)
--------------------------------
-- Sets capinsets for bar slider, if slider is using scale9 renderer.<br>
-- param capInsets Capinsets for bar slider.
-- @function [parent=#Slider] setCapInsetsBarRenderer
-- @param self
-- @param #rect_table capInsets
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- Gets the progress direction of slider.<br>
-- return percent Percent value from 1 to 100.
-- @function [parent=#Slider] getPercent
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- Sets capinsets for slider, if slider is using scale9 renderer.<br>
-- param capInsets Capinsets for slider.
-- @function [parent=#Slider] setCapInsets
-- @param self
-- @param #rect_table capInsets
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- Load disabled state texture for slider ball.<br>
-- param disabled Disabled state texture.<br>
-- param resType @see TextureResType .
-- @function [parent=#Slider] loadSlidBallTextureDisabled
-- @param self
-- @param #string disabled
-- @param #int resType
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- When user pressed the button, the button will zoom to a scale.<br>
-- The final scale of the button equals (button original scale + _zoomScale)<br>
-- since v3.3
-- @function [parent=#Slider] setZoomScale
-- @param self
-- @param #float scale
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- @overload self, string, string, int
-- @overload self
-- @function [parent=#Slider] create
-- @param self
-- @param #string barTextureName
-- @param #string normalBallTextureName
-- @param #int resType
-- @return Slider#Slider ret (return value: ccui.Slider)
--------------------------------
--
-- @function [parent=#Slider] createInstance
-- @param self
-- @return Ref#Ref ret (return value: cc.Ref)
--------------------------------
--
-- @function [parent=#Slider] getVirtualRenderer
-- @param self
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
--
-- @function [parent=#Slider] ignoreContentAdaptWithSize
-- @param self
-- @param #bool ignore
-- @return Slider#Slider self (return value: ccui.Slider)
--------------------------------
-- Returns the "class name" of widget.
-- @function [parent=#Slider] getDescription
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
--
-- @function [parent=#Slider] hitTest
-- @param self
-- @param #vec2_table pt
-- @param #cc.Camera camera
-- @param #vec3_table p
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#Slider] init
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
--
-- @function [parent=#Slider] getVirtualRendererSize
-- @param self
-- @return size_table#size_table ret (return value: size_table)
--------------------------------
-- Default constructor.<br>
-- js ctor<br>
-- lua new
-- @function [parent=#Slider] Slider
-- @param self
-- @return Slider#Slider self (return value: ccui.Slider)
return nil
|
local ModPathFinder = Class.create("ModPathFinder", Entity)
ModPathFinder.dependencies = {"ModActive","ModPhysics"}
function ModPathFinder:create()
self.wrapCheckFree = lume.fn(ModPathFinder.mCheckFree, self)
self.currDest = {x = 0, y = 0}
self.nodeList = {}
self.currTarget = {x=0,y=0}
self.nodeThreashold = 8 --self.width/2
self.threasholdFromGoal = self.threasholdFromGoal or 16
self.lastPos = {x = self.x, y = self.y}
self.goalPosition = {}
self.roomPaths = {}
end
function ModPathFinder:setGoal(goalPosition, roomName )
self.finalDestination = goalPosition
if not roomName or (roomName == self.currentRoom) then
self.goalPosition = goalPosition
else
self.roomPaths = Game.worldManager:pathToPoint(self.currentRoom, {x=self.x,y=self.y}, roomName)
local curPath = self.roomPaths[1]
self.goalPosition = curPath.pos
util.print_table(self.goalPosition)
lume.trace(self.x,self.y)
table.remove(self.roomPaths,1)
end
end
function ModPathFinder:moveToGoal()
-- self:moveToPoint(self.goalPosition.x,self.goalPosition.y,self.nodeThreashold)
-- lume.trace(self.goalPosition.x,self.goalPosition.y, self.x,self.y)
if self.goalPosition then
if not self.finalDestination and self:testProximity(self.goalPosition.x,self.goalPosition.y,self.threasholdFromGoal) then
self.goalPosition = nil
return true
end
if self:moveToPoint(self.goalPosition.x,self.goalPosition.y,self.nodeThreashold) then
self.goalPosition = nil
if #self.roomPaths > 0 then
self.goalPosition = self.roomPaths[1].pos
table.remove(self.roomPaths,1)
elseif self.finalDestination then
self.goalPosition = self.finalDestination
self.finalDestination = nil
else
lume.trace()
end
end
return false
else
lume.trace()
return true
end
end
function ModPathFinder:moveToPoint( destinationX,destinationY ,proximity)
self.numCasts = 0
if self:testProximity(destinationX,destinationY,proximity) then
return true
end
-- lume.trace(destinationX,destinationY,proximity)
if self:checkClear(self.x,self.y,destinationX,destinationY,16) then--proximity) then
self.nodeList = {}
self:directToPoint(destinationX,destinationY,proximity)
else
if xl.distance(destinationX,destinationY,self.currDest.x ,self.currDest.y) > 4 then
self.currDest.x = destinationX
self.currDest.y = destinationY
self:planPath(destinationX,destinationY,proximity)
end
if self.currTarget then
local i = #self.nodeList
local found = false
while (i > 1) do
if not found and self:checkClear(self.x,self.y,self.nodeList[i].x,self.nodeList[i].y,4) then
-- self:directToPoint(self.currTarget.x,self.currTarget.y,proximity)
self.currTarget = self.nodeList[i]
found = true
--lume.trace("hohoionfeowiohioh")
elseif found then
table.remove(self.nodeList,1)
end
i = i - 1
end
self:directToPoint(self.currTarget.x,self.currTarget.y,proximity)
if self:testProximity(self.currTarget.x,self.currTarget.y,self.nodeThreashold) then
self:nextNode()
end
if Game:getTicks()% 90 == 0 then
if self:testProximity(self.x,self.y,self.lastPos.x,self.lastPos.y,2) then
--lume.trace("Hoooooo")
self:planPath(destinationX,destinationY,proximity)
end
self.lastPos = {x = self.x,y = self.y}
end
else
self:planPath(destinationX,destinationY,proximity)
end
end
xl.DScreen.print("numCasts: ", "(%f)",self.numCasts)
return false
end
function ModPathFinder:nextNode()
table.remove(self.nodeList,1)
if #self.nodeList > 0 then
self.currTarget = self.nodeList[1]
else
self.currTarget = nil
end
end
function ModPathFinder:planPath(dX,dY,prox)
local foundPath = false
local i = 1
while (i <= #self.nodeList) do
local v = self.nodeList[i]
if self:checkClear(v.x,v.y,dX,dY,prox) then
foundPath = true
i = i + 1
end
if foundPath then
table.remove(self.nodeList,i)
else
i = i + 1
end
end
if foundPath then
return
end
local start = {x=self.x,y=self.y}
local goal = {x=dX ,y=dY }
self:newPath(start,goal,prox)
if #self.nodeList > 0 then
self.currTarget = {}
self.currTarget.x = self.nodeList[1].x
self.currTarget.y = self.nodeList[1].y
else
self.currTarget = nil
end
end
function ModPathFinder:getNeighbors( current, goal, proximity)
local newNeighbors = {}
-- lume.trace("CurrentPOs:")
-- util.print_table(current)
-- lume.trace("GoalPos: ")
-- util.print_table(goal)
self:checkClear(current.x,current.y,goal.x,goal.y,proximity)
local minDist = 9999999
local minPoint = nil
for i,v in ipairs(self.scanContacts) do
local vDist = v.distance
if vDist < minDist and vDist > 2 then
minDist = v.distance
minPoint = v
end
end
if minPoint then
-- lume.trace("advancingPos: ")
if minPoint.x > current.x then
minPoint.x = minPoint.x - 4
elseif minPoint.x < current.x then
minPoint.x = minPoint.x + 4
end
if minPoint.y > current.y then
minPoint.y = minPoint.y - 4
elseif minPoint.y < current.y then
minPoint.y = minPoint.y + 4
end
--util.print_table(minPoint)
table.insert(newNeighbors,minPoint)
end
if current.fixture then
local shape = current.fixture:getShape()
local sType = shape:getType()
--lume.trace(sType)
if sType == "circle" then
local point = shape:getPoint()
local radius = shape:getRadius()
elseif sType == "polygon" then
local points = util.pack(shape:getPoints())
local offX,offY = current.fixture:getBody():getPosition()
--lume.trace(offX,offY)
local i = 1
while (i < #points) do
local testX, testY
testX = points[i] + offX
testY = points[i+1] + offY
if xl.distance(current.x,current.y,testX,testY) > 3 then
if testX > current.x then
testX = testX - 3
elseif testX < current.x then
testX = testX + 3
end
if testY > current.y then
testY = testY - 3
elseif testY < current.y then
testY = testY + 3
end
--lume.trace("testX",testX,"testY",testY)
if self:checkClear(current.x,current.y,testX,testY,proximity) then
local newPos = {}
newPos.x = testX
newPos.y = testY
table.insert(newNeighbors,newPos)
end
end
i = i + 2
end
elseif sType == "chain" then
local points = util.pack(shape:getPoints())
self:getChainNeighbors(newNeighbors,current,points,proximity)
end
end
--util.print_table(newNeighbors)
return newNeighbors
end
function ModPathFinder:getChainNeighbors( neighborsTable, current,points,prox)
-- lume.trace("Wall Coordinates: ")
-- util.print_table(points)
local i = 1
local prevPoint = nil
local currPoint = {}
local nextPoint = nil
local currentDirection
while (i < #points) do
currPoint.x = points[i]
currPoint.y = points[i+1]
nextPoint = nil
local testX, testY
local xDiff = points[i] - current.x
local yDiff = points[i+1] - current.y
if xDiff > 0 then
testX = points[i] - 2
currentDirection = "left"
elseif xDiff < 0 then
testX = points[i] + 2
currentDirection = "right"
end
if yDiff > 0 then
testY = points[i+1] - 2
currentDirection = "up"
elseif yDiff < 0 then
testY = points[i+1] + 2
currentDirection = "down"
end
-- lume.trace("testX",testX,"testY",testY)
if self:checkClear(current.x,current.y,testX,testY,prox) then
if i + 2 <= #points then
nextPoint = {}
nextPoint.x = points[i+2]
nextPoint.y = points[i+3]
end
-- lume.trace("Before: " , testX,testY)
if not prevPoint then
-- lume.trace()
xDiff = nextPoint.x - testX
yDiff = nextPoint.y - testY
if math.abs(xDiff) > math.abs(yDiff) and self:checkClear(current.x,current.y,testX + util.sign(xDiff) * 16,testY) then
testX = testX + util.sign(xDiff) * 16
elseif math.abs(yDiff) > math.abs(xDiff) and self:checkClear(current.x,current.y,testX,testY + util.sign(yDiff) * 16) then
testY = testY - util.sign(yDiff) * 16
end
-- elseif not nextPoint then
-- xDiff = prevPoint.x - testX
-- yDiff = prevPoint.y - testY
-- if math.abs(xDiff) > math.abs(yDiff) and self:checkClear(current.x,current.y,testX + util.sign(xDiff) * 16,testY) then
-- testX = testX + util.sign(xDiff) * 16
-- elseif math.abs(yDiff) > math.abs(xDiff) and self:checkClear(current.x,current.y,testX,testY + util.sign(yDiff) * 16) then
-- testY = testY - util.sign(yDiff) * 16
-- end
elseif prevPoint then
xDiff = prevPoint.x - testX
yDiff = prevPoint.y - testY
local xPro = math.abs(xDiff) / (math.abs(xDiff) + math.abs(yDiff))
local yPro = math.abs(yDiff) / (math.abs(xDiff) + math.abs(yDiff))
if self:checkClear(current.x,current.y,testX + xPro * util.sign(xDiff) * 16,testY+ yPro * util.sign(yDiff) * 16) then
testX = testX + xPro * util.sign(xDiff) * 16
testY = testY + yPro * util.sign(yDiff) * 16
end
end
-- lume.trace("After: " , testX,testY)
-- lume.trace("inserting point")
local newPos = {x=testX,y=testY}
table.insert(neighborsTable,newPos)
end
prevPoint = {x= points[i],y=points[i+1]}
i = i + 2
end
end
function ModPathFinder:newPath(start,goal,prox, goCloseAsPossibleIfNoPath) --start, goal,map,width,height,noList,pathType)
-- lume.trace("initializing A star search")
prox = prox or 4
-- local start = {x=self.x,y=self.y}
-- The set of nodes already evaluated.
local closedSet = {}
local openSet = {}
local closestNode = {}
local closestToGoalDist = 99999
table.insert(openSet,start)
local cameFrom = {}
start.gScore = 0
start.fScore = xl.distance(start.x,start.y,goal.x,goal.y)
start.cameFrom = nil
local newIteration = 0
while (table.getn(openSet) > 0) do
local minI = 0
local minVal = 999999
for i,v in ipairs(openSet) do
local newScore = v.fScore
if newScore < minVal then
minI = i
minVal = newScore
end
end
local current = openSet[minI]
local distToGoal = xl.distance(current.x,current.y,goal.x,goal.y)
if distToGoal < prox * 2 then
-- lume.trace()
self.nodeList = xl.reconstructPath(current)
return self.nodeList
elseif distToGoal < closestToGoalDist then
closestToGoalDist = distToGoal
closestNode = current
end
table.remove(openSet,minI)
table.insert(closedSet,current)
local neighbors = self:getNeighbors(current,goal,prox)
for i,v in ipairs(neighbors) do
if not self:hasCoordinate(closedSet,v,prox) then
--The distance from start to a neighbor
local tentative_gScore = current.gScore + xl.distance(current.x,current.y, v.x,v.y)
if not self:hasCoordinate(openSet,v,prox) then -- Discover a new node
table.insert(openSet, v)
-- This path is the best until now. Record it!
v.cameFrom = current
local newValue = {}
v.gScore = tentative_gScore
v.fScore = v.gScore + xl.distance(v.x,v.y,goal.x,goal.y)
--elseif tentative_gScore >= gScore[v.x][v.y] then
end
end
end
newIteration = newIteration + 1
if newIteration > 500 then
lume.trace()
break
end
end
if goCloseAsPossibleIfNoPath then
lume.trace("no path, going the closest possible")
self.nodeList = xl.reconstructPath(closestNode)
return self.nodeList
end
return false
end
function ModPathFinder:hasCoordinate( list,point,prox )
for i,v in ipairs(list) do
if xl.distance(v.x,v.y,point.x,point.y) < prox then
return true
end
end
return false
end
function ModPathFinder:directToPoint(destinationX, destinationY, proximity)
local velX, velY = self.body:getLinearVelocity()
if proximity ~= nil and self:testProximity(destinationX,destinationY,proximity) then
return false
else
if self.y - destinationY > 2 then -- must move up
self.dir = 0
if velY < (self.maxSpeedY * self.speedModY) then
self.forceY = -self.acceleration * self.body:getMass()
end
self.isMovingY = true
elseif self.y - destinationY < -2 then -- must move down
self.dir = 2
if velY > -(self.maxSpeedY * self.speedModY) then
self.forceY = self.acceleration * self.body:getMass()
end
self.isMovingY = true
end
if self.x - destinationX < - 2 then
self.dir = 1
if velX < (self.maxSpeedX * self.speedModX) then
self.forceX = self.acceleration * self.body:getMass()
end
self.isMovingX = true
elseif self.x - destinationX > 2 then
self.dir = -1
if velX > -(self.maxSpeedX * self.speedModX) then
self.forceX = -self.acceleration * self.body:getMass()
end
self.isMovingX = true
end
self.isMoving = true
end
xl.DScreen.print("destPos,distance: ", "(%f,%f,%f,%f)",destinationX,destinationY,xl.distance(self.x,self.y,destinationX,destinationY),self.nodeThreashold)
-- xl.DScreen.print("selfpos: ", "(%f,%f)",self.x,self.y)
-- lume.trace(destinationX,destinationY)
-- lume.trace("FX: ",self.forceX,"FY: ",self.forceY)
return true
end
function ModPathFinder:checkClear(startX,startY,destX,destY,proximity)
self.numCasts = self.numCasts + 1
local checkGroundY = self.y + (self.charHeight or self.height) + 4
self.scanContacts = {}
self.startCastPoint = {x = startX, y = startY}
Game.world:rayCast(startX, startY,destX, destY, self.wrapCheckFree)
-- util.print_table(self.scanContacts)
for i,v in ipairs(self.scanContacts) do
local dist = xl.distance(v.x,v.y,destX,destY)
-- lume.trace(proximity, dist)
-- lume.trace(v.otherType,v.x,v.y)
-- if dist > proximity then
--if not v.fixture:getBody():getType() == "dynamic" or v.fixture:getBody():getMass() > 40 then
return false
--end
end
return true
end
function ModPathFinder:mCheckFree(fixture, x, y, xn, yn, fraction )
if fixture then
local other = fixture:getBody():getUserData()
local category = fixture:getCategory()
if fixture:isSensor() == false and other ~= nil and category ~= CL_INT and other ~= self then
local newEntry = {}
newEntry.x = x
newEntry.y = y
newEntry.distance = xl.distance(self.startCastPoint.x,self.startCastPoint.y,x,y)
--newEntry.object = other
newEntry.otherType = other.type
newEntry.fixture = fixture
table.insert(self.scanContacts, newEntry )
end
end
return 1
end
return ModPathFinder
|
minetest.register_craft(
{
type = "shaped",
output = "revival:dissection_table",
recipe = {
{"group:tree", "group:tree", "group:tree"},
{"default:steel_ingot", "group:wood", "bucket:bucket_empty"},
{"group:tree", "group:wood", "group:tree"}
}
}
)
minetest.register_craft(
{
type = "shaped",
output = "revival:crank",
recipe = {
{"default:stick", "default:steel_ingot", "default:stick"},
{"", "default:stick", ""}
}
}
)
minetest.register_craft(
{
type = "shaped",
output = "revival:manual_press",
recipe = {
{"group:tree", "revival:crank", "group:tree"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"group:tree", "group:tree", "group:tree"}
}
}
)
minetest.register_craft(
{
type = "shaped",
output = "revival:empty_syringe 2",
recipe = {
{"vessels:glass_bottle", ""},
{"", "default:steel_ingot"}
}
}
)
minetest.register_craft(
{
type = "shaped",
output = "revival:diamond_scalpel",
recipe = {
{"default:diamond"},
{"default:stick"}
}
}
)
minetest.register_craft(
{
type = "shaped",
output = "revival:steel_scalpel",
recipe = {
{"default:steel_ingot"},
{"default:stick"}
}
}
)
minetest.register_craft(
{
type = "shaped",
output = "revival:stone_scalpel",
recipe = {
{"default:cobble"},
{"default:stick"}
}
}
)
--[[
Press
]]
craft.register_craft(
{
type = "press",
required_turns = 5,
output = {"revival:apple_juice", "revival:fruit_mush"},
recipe = "default:apple"
}
)
|
-- Neovim
-- =========================================
lvim.format_on_save = true
lvim.leader = " "
lvim.colorscheme = "github_dark_default"
lvim.debug = false
vim.lsp.set_log_level "warn"
lvim.log.level = "warn"
require("user.neovim").config()
-- Customization
-- =========================================
lvim.builtin.project.show_hiddens = true
lvim.builtin.lastplace = { active = false } -- change to false if you are jumping to future
lvim.builtin.tabnine = { active = true } -- change to false if you don't like tabnine
lvim.builtin.persistence = { active = true } -- change to false if you don't want persistence
lvim.builtin.presence = { active = false } -- change to true if you want discord presence
lvim.builtin.orgmode = { active = false } -- change to true if you want orgmode.nvim
lvim.builtin.dap.active = false -- change this to enable/disable debugging
lvim.builtin.fancy_statusline = { active = true } -- enable/disable fancy statusline
lvim.builtin.fancy_bufferline = { active = true } -- enable/disable fancy bufferline
lvim.builtin.fancy_dashboard = { active = true } -- enable/disable fancy dashboard
lvim.builtin.fancy_wild_menu = { active = true } -- enable/disable use wilder.nvim
lvim.builtin.fancy_rename = { active = true } -- enable/disable custom rename
lvim.builtin.fancy_diff = { active = false } -- enable/disable fancier git diff
lvim.builtin.lua_dev = { active = true } -- change this to enable/disable folke/lua_dev
lvim.builtin.test_runner = { active = true } -- change this to enable/disable vim-test, ultest
lvim.builtin.cheat = { active = true } -- enable cheat.sh integration
lvim.builtin.sql_integration = { active = false } -- use sql integration
lvim.builtin.neoscroll = { active = true } -- smooth scrolling
lvim.lsp.diagnostics.virtual_text = true -- remove this line if you want to see inline errors
lvim.builtin.neoclip = { active = true, enable_persistant_history = false }
lvim.builtin.remote_dev = { active = true } -- enable/disable remote development
lvim.builtin.nonumber_unfocus = false -- diffrentiate between focused and non focused windows
lvim.builtin.harpoon = { active = true } -- use the harpoon plugin
lvim.builtin.nvim_web_devicons = { active = true }
lvim.builtin.global_status_line = { active = true } -- use the global status line
lvim.builtin.remote_dev = { active = false } -- enable/disable remote development
lvim.builtin.cursorline = { active = true } -- use a bit fancier cursorline
lvim.builtin.motion_provider = "hop" -- change this to use different motion providers ( hop or lightspeed )
lvim.builtin.hlslens = { active = false } -- enable/disable hlslens
lvim.builtin.csv_support = false -- enable/disable csv support
lvim.builtin.sidebar = { active = true } -- enable/disable sidebar
lvim.builtin.async_tasks = { active = true } -- enable/disable async tasks
lvim.builtin.metals = {
active = false, -- enable/disable nvim-metals for scala development
fallbackScalaVersion = "2.13.7",
serverVersion = "0.10.9+271-a8bb69f6-SNAPSHOT",
}
lvim.builtin.collaborative_editing = { active = false } -- enable/disable collaborative editing
local user = os.getenv "USER"
if user and user == "abz" then
lvim.builtin.nvim_web_devicons = { active = false }
lvim.builtin.sell_your_soul_to_devil = true
lvim.lsp.document_highlight = false
lvim.builtin.csv_support = true
lvim.builtin.async_tasks.active = true
lvim.builtin.dap.active = true
lvim.builtin.sql_integration.active = true
vim.g.instant_username = user
lvim.builtin.collaborative_editing.active = true
require("user.prose").config() -- setup prosemd-lsp for my local use
end
if user and user == "uzaaft" then
lvim.transparent_window = false
lvim.builtin.nvim_web_devicons = { active = false }
lvim.lsp.document_highlight = false
lvim.builtin.csv_support = true
lvim.builtin.async_tasks.active = true
lvim.builtin.sql_integration.active = true
lvim.builtin.async_tasks.active = true
lvim.builtin.dap.active = true
lvim.builtin.sell_your_soul_to_devil = true
require("user.prose").config() -- setup prosemd-lsp for my local use
end
lvim.builtin.notify.active = true
lvim.lsp.automatic_servers_installation = true
lvim.lsp.document_highlight = false
lvim.lsp.automatic_servers_installation = false
if lvim.builtin.cursorline.active then
lvim.lsp.document_highlight = false
end
lvim.lsp.code_lens_refresh = true
require("user.builtin").config()
-- StatusLine
-- =========================================
if lvim.builtin.fancy_statusline.active then
require("user.lualine").config()
end
-- Debugging
-- =========================================
if lvim.builtin.dap.active then
require("user.dap").config()
end
-- Language Specific
-- =========================================
vim.list_extend(
lvim.lsp.override,
{ "rust_analyzer", "tsserver", "dockerls", "texlab", "sumneko_lua", "gopls", "jsonls", "yamlls" }
)
require("user.null_ls").config()
-- Additional Plugins
-- =========================================
require("user.plugins").config()
-- Autocommands
-- =========================================
require("user.autocommands").config()
-- Additional keybindings
-- =========================================
require("user.keybindings").config()
require("lspconfig").julials.setup {}
require "user.sourcery"
|
GLib.Net.Layer2.SplitPacketType = GLib.Enum (
{
Start = 1,
Continuation = 2
}
)
|
#!/usr/bin/env lua
local regress = require "regress"
if (regress.openssl.OPENSSL_VERSION_NUMBER and regress.openssl.OPENSSL_VERSION_NUMBER < 0x10002000)
or (regress.openssl.LIBRESSL_VERSION_NUMBER and regress.openssl.LIBRESSL_VERSION_NUMBER < 0x20705000)
then
-- skipping test due to different behaviour in earlier OpenSSL versions
return
end
local params = regress.verify_param.new()
params:setDepth(0)
local ca_key, ca_crt = regress.genkey()
do -- should fail as no trust anchor
regress.check(not ca_crt:verify({params=params, chain=nil, store=nil}))
end
local store = regress.store.new()
store:add(ca_crt)
do -- should succeed as cert is in the store
regress.check(ca_crt:verify({params=params, chain=nil, store=store}))
end
local intermediate_key, intermediate_crt = regress.genkey(nil, ca_key, ca_crt)
do -- should succeed as ca cert is in the store
regress.check(intermediate_crt:verify({params=params, chain=nil, store=store}))
end
local _, crt = regress.genkey(nil, intermediate_key, intermediate_crt)
do -- should fail as intermediate cert is missing
regress.check(not crt:verify({params=params, chain=nil, store=store}))
end
local chain = regress.chain.new()
chain:add(intermediate_crt)
do -- should fail as max depth is too low
regress.check(not crt:verify({params=params, chain=chain, store=store}))
end
params:setDepth(1)
do -- should succeed
regress.check(crt:verify({params=params, chain=chain, store=store}))
end
regress.say "OK"
|
-- Converts a key code into a char character
function SettingsTool:ConvertKeyCodeToChar(keyCode)
local value = -1
for i = 1, #KeyCodeMap do
if(KeyCodeMap[i].keyCode == keyCode) then
return KeyCodeMap[i].char
end
end
return value
end
function SettingsTool:ConvertKeyToKeyCode(key)
local keyCode = -1
for i = 1, #KeyCodeMap do
if(KeyCodeMap[i].char == key) then
return KeyCodeMap[i].keyCode
end
end
return keyCode
end
function SettingsTool:ValidateInput(key, field, useKeys)
local key = self:OnCaptureKey()
-- Check to see if the key is not empty
if(key ~= "") then
-- Look for duplicate keys
if(self:CheckActionKeyDoups(key, useKeys) == true) then
editorUI:EditInputArea(field, false)
editorUI:ChangeInputField(field, field.previousValue, false)
-- TODO this used to show the key but it would require adding sprites to small font
pixelVisionOS:DisplayMessage("The key is already being used.", 2)
return ""
end
end
-- Return the new key to the input field
return key
end
function SettingsTool:OnCaptureKey()
-- Show blinking light for controller
-- if(blinkActive) then
-- self:DrawBlinkSprite()
-- end
local total = #KeyCodeMap
for i = 1, total do
-- TODO need to test to see if the keyCode is already assigned
local key = KeyCodeMap[i]
if(Key(key.keyCode)) then
return key.char
end
end
return ""
end
function SettingsTool:OnCaptureButton()
-- Show blinking light for controller
-- if(blinkActive) then
-- DrawBlinkSprite()
-- end
local total = #ButtonsCodes
for i = 1, total do
-- TODO need to test to see if the keyCode is already assigned
local button = ButtonsCodes[i]
if(Button(button.keyCode)) then
return button.char
end
end
return ""
end
function SettingsTool:ConvertButtonCodeToChar(keyCode)
local value = -1
for i = 1, #ButtonsCodes do
if(ButtonsCodes[i].keyCode == keyCode) then
return ButtonsCodes[i].char
end
end
return value
end
function SettingsTool:ConvertButtonToKeyCode(key)
local keyCode = -1
for i = 1, #ButtonsCodes do
if(ButtonsCodes[i].char == key) then
return ButtonsCodes[i].keyCode
end
end
return keyCode
end
function SettingsTool:CheckActionKeyDoups(key, keyMap)
local value = false
for k, v in pairs(keyMap) do
if(key == v) then
return true
end
end
return value
end
function SettingsTool:RemapKey(keyName, keyCode)
-- Make sure that the key code is valid
if (keyCode == -1) then
return false
end
print("Write Bios", keyName, tostring(keyCode))
-- Save the new mapped key to the bios
WriteBiosData(keyName, tostring(keyCode));
print("Read Bios", ReadBiosData(keyName), self:ConvertKeyCodeToChar(ReadBiosData(keyName)))
self.usedKeysInvalid = true
self:GetUsedKeys()
return true
end
|
local M = {}
---@alias HintDirection "require'hop.constants'.HintDirection.BEFORE_CURSOR"|"require'hop.constants'.HintDirection.AFTER_CURSOR"
M.HintDirection = {
BEFORE_CURSOR = 1,
AFTER_CURSOR = 2,
}
---@alias HintLineException "require'hop.constants'.HintLineException.EMPTY_LINE"|"require'hop.constants'.HintLineException.INVALID_LINE"
M.HintLineException = {
EMPTY_LINE = -1, -- Empty line: match hint pattern when col_offset = 0
INVALID_LINE = -2, -- Invalid line: no need to match hint pattern
}
-- Magic constants for highlight priorities;
--
-- Priorities are ranged on 16-bit integers; 0 is the least priority and 2^16 - 1 is the higher.
-- We want Hop to override everything so we use a very high priority for grey (2^16 - 3 = 65533); hint
-- priorities are one level above (2^16 - 2) and the virtual cursor one level higher (2^16 - 1), which
-- is the higher.
M.GREY_PRIO = 65533
M.HINT_PRIO = 65534
M.CURSOR_PRIO = 65535
return M
|
return {
whitelist_globals = {
['.'] = {
'_',
'req'
}
}
}
|
local conf = require 'config'
local log = require 'log'
box.once('access:v1', function()
box.schema.user.grant('guest', 'read,write,execute', 'universe')
-- Uncomment this to create user demo-app_user
-- box.schema.user.create('demo-app_user', { password = 'demo-app_pass' })
-- box.schema.user.grant('demo-app_user', 'read,write,execute', 'universe')
end)
local app = {
models = require 'models',
http = require 'http',
demo = require 'demo',
}
function app.init(config)
log.info('app "demo-app" init')
for k, mod in pairs(app) do if type(mod) == 'table' and mod.init ~= nil then mod.init(config) end end
end
function app.destroy()
log.info('app "demo-app" destroy')
for k, mod in pairs(app) do if type(mod) == 'table' and mod.destroy ~= nil then mod.destroy() end end
end
package.reload:register(app)
rawset(_G, 'app', app)
return app
|
-- crown, awesome3 theme, by by zhuravlik, based on Zenburn
--{{{ Main
local awful = require("awful")
awful.util = require("awful.util")
theme = {}
home = os.getenv("HOME")
config = awful.util.getdir("config")
shared = "/usr/share/awesome"
if not awful.util.file_readable(shared .. "/icons/awesome16.png") then
shared = "/usr/share/local/awesome"
end
sharedicons = shared .. "/icons"
sharedthemes = shared .. "/themes"
themes = config .. "/themes"
themename = "/crown"
if not awful.util.file_readable(themes .. themename .. "/theme.lua") then
themes = sharedthemes
end
themedir = themes .. themename
wallpaper1 = themedir .. "/background.jpg"
wallpaper2 = themedir .. "/background.png"
wallpaper3 = sharedthemes .. "/zenburn/zenburn-background.png"
wallpaper4 = sharedthemes .. "/default/background.png"
wpscript = home .. "/.wallpaper"
if awful.util.file_readable(wallpaper1) then
theme.wallpaper = wallpaper1
elseif awful.util.file_readable(wallpaper2) then
theme.wallpaper = wallpaper2
elseif awful.util.file_readable(wpscript) then
theme.wallpaper_cmd = { "sh " .. wpscript }
elseif awful.util.file_readable(wallpaper3) then
theme.wallpaper = wallpaper3
else
theme.wallpaper = wallpaper4
end
--}}}
-- {{{ Styles
theme.font = "Droid Sans 8"
-- {{{ Colors
--theme.bg_normal = "#343030"
--theme.bg_focus = "#b3885e"
theme.fg_normal = "#e2e6e2"
--theme.fg_focus = "#f1f3ec"
theme.fg_focus = "#e6ca99"
--theme.fg_urgent = "#CC9393"
theme.fg_urgent = "#FF0000"
theme.bg_normal = "#313031ee"
--theme.bg_focus = "#1E2320"
theme.taglist_bg_focus = "#b3885e"
--theme.bg_focus = "#b3885e"
theme.bg_focus = "#343030"
theme.bg_urgent = "#3F3F3F"
-- }}}
-- {{{ Borders
theme.border_width = "2"
--theme.border_normal = "#757372"
theme.border_normal = "#281207"
--theme.border_focus = "#786032"
theme.border_focus = "#b3885e"
theme.border_marked = "#CC9393"
-- }}}
-- {{{ Titlebars
theme.titlebar_bg_focus = "#3F3F3F"
theme.titlebar_bg_normal = "#3F3F3F"
-- }}}
-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
-- [taglist|tasklist]_[bg|fg]_[focus|urgent]
-- titlebar_[normal|focus]
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
-- Example:
--theme.taglist_bg_focus = "#CC9393"
-- }}}
-- {{{ Widgets
-- You can add as many variables as
-- you wish and access them by using
-- beautiful.variable in your rc.lua
--theme.fg_widget = "#AECF96"
--theme.fg_center_widget = "#88A175"
--theme.fg_end_widget = "#FF5656"
--theme.bg_widget = "#494B4F"
--theme.border_widget = "#3F3F3F"
-- }}}
-- {{{ Mouse finder
theme.mouse_finder_color = "#CC9393"
-- mouse_finder_[timeout|animate_timeout|radius|factor]
-- }}}
-- {{{ Menu
-- Variables set for theming the menu:
-- menu_[bg|fg]_[normal|focus]
-- menu_[border_color|border_width]
theme.menu_height = "15"
theme.menu_width = "100"
theme.menu_border_width = "0"
-- }}}
-- {{{ Icons
-- {{{ Taglist
theme.taglist_squares_sel = themedir .. "/taglist/squarefz.png"
theme.taglist_squares_unsel = themedir .. "/taglist/squarez.png"
--theme.taglist_squares_resize = "false"
-- }}}
-- {{{ Misc
theme.awesome_icon = themedir .. "/awesome-icon.png"
theme.menu_submenu_icon = sharedthemes .. "/default/submenu.png"
theme.tasklist_floating_icon = sharedthemes .. "/default/tasklist/floatingw.png"
-- }}}
-- {{{ Layout
theme.layout_tile = themedir .. "/layouts/tile.png"
theme.layout_tileleft = themedir .. "/layouts/tileleft.png"
theme.layout_tilebottom = themedir .. "/layouts/tilebottom.png"
theme.layout_tiletop = themedir .. "/layouts/tiletop.png"
theme.layout_fairv = themedir .. "/layouts/fairv.png"
theme.layout_fairh = themedir .. "/layouts/fairh.png"
theme.layout_spiral = themedir .. "/layouts/spiral.png"
theme.layout_dwindle = themedir .. "/layouts/dwindle.png"
theme.layout_max = themedir .. "/layouts/max.png"
theme.layout_fullscreen = themedir .. "/layouts/fullscreen.png"
theme.layout_magnifier = themedir .. "/layouts/magnifier.png"
theme.layout_floating = themedir .. "/layouts/floating.png"
-- }}}
-- {{{ Titlebar
theme.titlebar_close_button_focus = themedir .. "/titlebar/close_focus.png"
theme.titlebar_close_button_normal = themedir .. "/titlebar/close_normal.png"
theme.titlebar_ontop_button_focus_active = themedir .. "/titlebar/ontop_focus_active.png"
theme.titlebar_ontop_button_normal_active = themedir .. "/titlebar/ontop_normal_active.png"
theme.titlebar_ontop_button_focus_inactive = themedir .. "/titlebar/ontop_focus_inactive.png"
theme.titlebar_ontop_button_normal_inactive = themedir .. "/titlebar/ontop_normal_inactive.png"
theme.titlebar_sticky_button_focus_active = themedir .. "/titlebar/sticky_focus_active.png"
theme.titlebar_sticky_button_normal_active = themedir .. "/titlebar/sticky_normal_active.png"
theme.titlebar_sticky_button_focus_inactive = themedir .. "/titlebar/sticky_focus_inactive.png"
theme.titlebar_sticky_button_normal_inactive = themedir .. "/titlebar/sticky_normal_inactive.png"
theme.titlebar_floating_button_focus_active = themedir .. "/titlebar/floating_focus_active.png"
theme.titlebar_floating_button_normal_active = themedir .. "/titlebar/floating_normal_active.png"
theme.titlebar_floating_button_focus_inactive = themedir .. "/titlebar/floating_focus_inactive.png"
theme.titlebar_floating_button_normal_inactive = themedir .. "/titlebar/floating_normal_inactive.png"
theme.titlebar_maximized_button_focus_active = themedir .. "/titlebar/maximized_focus_active.png"
theme.titlebar_maximized_button_normal_active = themedir .. "/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_inactive = themedir .. "/titlebar/maximized_focus_inactive.png"
theme.titlebar_maximized_button_normal_inactive = themedir .. "/titlebar/maximized_normal_inactive.png"
-- }}}
-- }}}
return theme
|
require("firecast.lua");
local __o_rrpgObjs = require("rrpgObjs.lua");
require("rrpgGUI.lua");
require("rrpgDialogs.lua");
require("rrpgLFM.lua");
require("ndb.lua");
require("locale.lua");
local __o_Utils = require("utils.lua");
local function constructNew_frmTSC4_svg()
local obj = GUI.fromHandle(_obj_newObject("form"));
local self = obj;
local sheet = nil;
rawset(obj, "_oldSetNodeObjectFunction", rawget(obj, "setNodeObject"));
function obj:setNodeObject(nodeObject)
sheet = nodeObject;
self.sheet = nodeObject;
self:_oldSetNodeObjectFunction(nodeObject);
end;
function obj:setNodeDatabase(nodeObject)
self:setNodeObject(nodeObject);
end;
_gui_assignInitialParentForForm(obj.handle);
obj:beginUpdate();
obj:setName("frmTSC4_svg");
obj:setAlign("client");
obj:setTheme("light");
obj:setMargins({top=1});
obj.scrollBox1 = GUI.fromHandle(_obj_newObject("scrollBox"));
obj.scrollBox1:setParent(obj);
obj.scrollBox1:setAlign("client");
obj.scrollBox1:setName("scrollBox1");
obj.rectangle1 = GUI.fromHandle(_obj_newObject("rectangle"));
obj.rectangle1:setParent(obj.scrollBox1);
obj.rectangle1:setWidth(1049);
obj.rectangle1:setHeight(1488);
obj.rectangle1:setColor("white");
obj.rectangle1:setName("rectangle1");
obj.image1 = GUI.fromHandle(_obj_newObject("image"));
obj.image1:setParent(obj.rectangle1);
obj.image1:setLeft(0);
obj.image1:setTop(0);
obj.image1:setWidth(1049);
obj.image1:setHeight(1488);
obj.image1:setSRC("/TSC/images/n.png");
obj.image1:setStyle("stretch");
obj.image1:setOptimize(true);
obj.image1:setName("image1");
obj.layout1 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout1:setParent(obj.rectangle1);
obj.layout1:setLeft(79);
obj.layout1:setTop(104);
obj.layout1:setWidth(325);
obj.layout1:setHeight(54);
obj.layout1:setName("layout1");
obj.edit1 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit1:setParent(obj.layout1);
obj.edit1:setTransparent(true);
obj.edit1:setFontSize(20);
obj.edit1:setFontColor("#000000");
obj.edit1:setVertTextAlign("center");
obj.edit1:setLeft(0);
obj.edit1:setTop(0);
obj.edit1:setWidth(325);
obj.edit1:setHeight(55);
obj.edit1:setField("untitled199");
obj.edit1:setName("edit1");
obj.layout2 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout2:setParent(obj.rectangle1);
obj.layout2:setLeft(413);
obj.layout2:setTop(108);
obj.layout2:setWidth(272);
obj.layout2:setHeight(50);
obj.layout2:setName("layout2");
obj.edit2 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit2:setParent(obj.layout2);
obj.edit2:setTransparent(true);
obj.edit2:setFontSize(20);
obj.edit2:setFontColor("#000000");
obj.edit2:setVertTextAlign("center");
obj.edit2:setLeft(0);
obj.edit2:setTop(0);
obj.edit2:setWidth(272);
obj.edit2:setHeight(51);
obj.edit2:setField("untitled200");
obj.edit2:setName("edit2");
obj.layout3 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout3:setParent(obj.rectangle1);
obj.layout3:setLeft(77);
obj.layout3:setTop(184);
obj.layout3:setWidth(317);
obj.layout3:setHeight(45);
obj.layout3:setName("layout3");
obj.edit3 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit3:setParent(obj.layout3);
obj.edit3:setTransparent(true);
obj.edit3:setFontSize(20);
obj.edit3:setFontColor("#000000");
obj.edit3:setVertTextAlign("center");
obj.edit3:setLeft(0);
obj.edit3:setTop(0);
obj.edit3:setWidth(317);
obj.edit3:setHeight(46);
obj.edit3:setField("untitled201");
obj.edit3:setName("edit3");
obj.layout4 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout4:setParent(obj.rectangle1);
obj.layout4:setLeft(79);
obj.layout4:setTop(247);
obj.layout4:setWidth(310);
obj.layout4:setHeight(40);
obj.layout4:setName("layout4");
obj.edit4 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit4:setParent(obj.layout4);
obj.edit4:setTransparent(true);
obj.edit4:setFontSize(20);
obj.edit4:setFontColor("#000000");
obj.edit4:setVertTextAlign("center");
obj.edit4:setLeft(0);
obj.edit4:setTop(0);
obj.edit4:setWidth(310);
obj.edit4:setHeight(41);
obj.edit4:setField("untitled202");
obj.edit4:setName("edit4");
obj.layout5 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout5:setParent(obj.rectangle1);
obj.layout5:setLeft(79);
obj.layout5:setTop(306);
obj.layout5:setWidth(310);
obj.layout5:setHeight(38);
obj.layout5:setName("layout5");
obj.edit5 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit5:setParent(obj.layout5);
obj.edit5:setTransparent(true);
obj.edit5:setFontSize(20);
obj.edit5:setFontColor("#000000");
obj.edit5:setVertTextAlign("center");
obj.edit5:setLeft(0);
obj.edit5:setTop(0);
obj.edit5:setWidth(310);
obj.edit5:setHeight(39);
obj.edit5:setField("untitled203");
obj.edit5:setName("edit5");
obj.layout6 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout6:setParent(obj.rectangle1);
obj.layout6:setLeft(77);
obj.layout6:setTop(421);
obj.layout6:setWidth(326);
obj.layout6:setHeight(45);
obj.layout6:setName("layout6");
obj.edit6 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit6:setParent(obj.layout6);
obj.edit6:setTransparent(true);
obj.edit6:setFontSize(20);
obj.edit6:setFontColor("#000000");
obj.edit6:setVertTextAlign("center");
obj.edit6:setLeft(0);
obj.edit6:setTop(0);
obj.edit6:setWidth(326);
obj.edit6:setHeight(46);
obj.edit6:setField("untitled204");
obj.edit6:setName("edit6");
obj.layout7 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout7:setParent(obj.rectangle1);
obj.layout7:setLeft(439);
obj.layout7:setTop(335);
obj.layout7:setWidth(65);
obj.layout7:setHeight(67);
obj.layout7:setName("layout7");
obj.edit7 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit7:setParent(obj.layout7);
obj.edit7:setTransparent(true);
obj.edit7:setFontSize(20);
obj.edit7:setFontColor("#000000");
obj.edit7:setVertTextAlign("center");
obj.edit7:setLeft(0);
obj.edit7:setTop(0);
obj.edit7:setWidth(65);
obj.edit7:setHeight(68);
obj.edit7:setField("untitled205");
obj.edit7:setName("edit7");
obj.layout8 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout8:setParent(obj.rectangle1);
obj.layout8:setLeft(723);
obj.layout8:setTop(185);
obj.layout8:setWidth(244);
obj.layout8:setHeight(47);
obj.layout8:setName("layout8");
obj.edit8 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit8:setParent(obj.layout8);
obj.edit8:setTransparent(true);
obj.edit8:setFontSize(20);
obj.edit8:setFontColor("#000000");
obj.edit8:setVertTextAlign("center");
obj.edit8:setLeft(0);
obj.edit8:setTop(0);
obj.edit8:setWidth(244);
obj.edit8:setHeight(48);
obj.edit8:setField("untitled206");
obj.edit8:setName("edit8");
obj.layout9 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout9:setParent(obj.rectangle1);
obj.layout9:setLeft(808);
obj.layout9:setTop(250);
obj.layout9:setWidth(161);
obj.layout9:setHeight(58);
obj.layout9:setName("layout9");
obj.edit9 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit9:setParent(obj.layout9);
obj.edit9:setTransparent(true);
obj.edit9:setFontSize(20);
obj.edit9:setFontColor("#000000");
obj.edit9:setVertTextAlign("center");
obj.edit9:setLeft(0);
obj.edit9:setTop(0);
obj.edit9:setWidth(161);
obj.edit9:setHeight(59);
obj.edit9:setField("untitled207");
obj.edit9:setName("edit9");
obj.layout10 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout10:setParent(obj.rectangle1);
obj.layout10:setLeft(863);
obj.layout10:setTop(347);
obj.layout10:setWidth(109);
obj.layout10:setHeight(59);
obj.layout10:setName("layout10");
obj.edit10 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit10:setParent(obj.layout10);
obj.edit10:setTransparent(true);
obj.edit10:setFontSize(20);
obj.edit10:setFontColor("#000000");
obj.edit10:setVertTextAlign("center");
obj.edit10:setLeft(0);
obj.edit10:setTop(0);
obj.edit10:setWidth(109);
obj.edit10:setHeight(60);
obj.edit10:setField("untitled208");
obj.edit10:setName("edit10");
obj.layout11 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout11:setParent(obj.rectangle1);
obj.layout11:setLeft(77);
obj.layout11:setTop(513);
obj.layout11:setWidth(323);
obj.layout11:setHeight(45);
obj.layout11:setName("layout11");
obj.edit11 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit11:setParent(obj.layout11);
obj.edit11:setTransparent(true);
obj.edit11:setFontSize(20);
obj.edit11:setFontColor("#000000");
obj.edit11:setVertTextAlign("center");
obj.edit11:setLeft(0);
obj.edit11:setTop(0);
obj.edit11:setWidth(323);
obj.edit11:setHeight(46);
obj.edit11:setField("untitled209");
obj.edit11:setName("edit11");
obj.layout12 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout12:setParent(obj.rectangle1);
obj.layout12:setLeft(77);
obj.layout12:setTop(567);
obj.layout12:setWidth(325);
obj.layout12:setHeight(45);
obj.layout12:setName("layout12");
obj.edit12 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit12:setParent(obj.layout12);
obj.edit12:setTransparent(true);
obj.edit12:setFontSize(20);
obj.edit12:setFontColor("#000000");
obj.edit12:setVertTextAlign("center");
obj.edit12:setLeft(0);
obj.edit12:setTop(0);
obj.edit12:setWidth(325);
obj.edit12:setHeight(46);
obj.edit12:setField("untitled210");
obj.edit12:setName("edit12");
obj.layout13 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout13:setParent(obj.rectangle1);
obj.layout13:setLeft(79);
obj.layout13:setTop(628);
obj.layout13:setWidth(323);
obj.layout13:setHeight(38);
obj.layout13:setName("layout13");
obj.edit13 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit13:setParent(obj.layout13);
obj.edit13:setTransparent(true);
obj.edit13:setFontSize(20);
obj.edit13:setFontColor("#000000");
obj.edit13:setVertTextAlign("center");
obj.edit13:setLeft(0);
obj.edit13:setTop(0);
obj.edit13:setWidth(323);
obj.edit13:setHeight(39);
obj.edit13:setField("untitled211");
obj.edit13:setName("edit13");
obj.layout14 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout14:setParent(obj.rectangle1);
obj.layout14:setLeft(79);
obj.layout14:setTop(688);
obj.layout14:setWidth(321);
obj.layout14:setHeight(38);
obj.layout14:setName("layout14");
obj.edit14 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit14:setParent(obj.layout14);
obj.edit14:setTransparent(true);
obj.edit14:setFontSize(20);
obj.edit14:setFontColor("#000000");
obj.edit14:setVertTextAlign("center");
obj.edit14:setLeft(0);
obj.edit14:setTop(0);
obj.edit14:setWidth(321);
obj.edit14:setHeight(39);
obj.edit14:setField("untitled212");
obj.edit14:setName("edit14");
obj.layout15 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout15:setParent(obj.rectangle1);
obj.layout15:setLeft(79);
obj.layout15:setTop(745);
obj.layout15:setWidth(317);
obj.layout15:setHeight(40);
obj.layout15:setName("layout15");
obj.edit15 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit15:setParent(obj.layout15);
obj.edit15:setTransparent(true);
obj.edit15:setFontSize(20);
obj.edit15:setFontColor("#000000");
obj.edit15:setVertTextAlign("center");
obj.edit15:setLeft(0);
obj.edit15:setTop(0);
obj.edit15:setWidth(317);
obj.edit15:setHeight(41);
obj.edit15:setField("untitled213");
obj.edit15:setName("edit15");
obj.layout16 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout16:setParent(obj.rectangle1);
obj.layout16:setLeft(435);
obj.layout16:setTop(670);
obj.layout16:setWidth(64);
obj.layout16:setHeight(67);
obj.layout16:setName("layout16");
obj.edit16 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit16:setParent(obj.layout16);
obj.edit16:setTransparent(true);
obj.edit16:setFontSize(20);
obj.edit16:setFontColor("#000000");
obj.edit16:setVertTextAlign("center");
obj.edit16:setLeft(0);
obj.edit16:setTop(0);
obj.edit16:setWidth(64);
obj.edit16:setHeight(68);
obj.edit16:setField("untitled214");
obj.edit16:setName("edit16");
obj.layout17 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout17:setParent(obj.rectangle1);
obj.layout17:setLeft(529);
obj.layout17:setTop(670);
obj.layout17:setWidth(65);
obj.layout17:setHeight(68);
obj.layout17:setName("layout17");
obj.edit17 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit17:setParent(obj.layout17);
obj.edit17:setTransparent(true);
obj.edit17:setFontSize(20);
obj.edit17:setFontColor("#000000");
obj.edit17:setVertTextAlign("center");
obj.edit17:setLeft(0);
obj.edit17:setTop(0);
obj.edit17:setWidth(65);
obj.edit17:setHeight(69);
obj.edit17:setField("untitled215");
obj.edit17:setName("edit17");
obj.layout18 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout18:setParent(obj.rectangle1);
obj.layout18:setLeft(620);
obj.layout18:setTop(670);
obj.layout18:setWidth(107);
obj.layout18:setHeight(68);
obj.layout18:setName("layout18");
obj.edit18 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit18:setParent(obj.layout18);
obj.edit18:setTransparent(true);
obj.edit18:setFontSize(20);
obj.edit18:setFontColor("#000000");
obj.edit18:setVertTextAlign("center");
obj.edit18:setLeft(0);
obj.edit18:setTop(0);
obj.edit18:setWidth(107);
obj.edit18:setHeight(69);
obj.edit18:setField("untitled216");
obj.edit18:setName("edit18");
obj.layout19 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout19:setParent(obj.rectangle1);
obj.layout19:setLeft(741);
obj.layout19:setTop(670);
obj.layout19:setWidth(110);
obj.layout19:setHeight(70);
obj.layout19:setName("layout19");
obj.edit19 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit19:setParent(obj.layout19);
obj.edit19:setTransparent(true);
obj.edit19:setFontSize(20);
obj.edit19:setFontColor("#000000");
obj.edit19:setVertTextAlign("center");
obj.edit19:setLeft(0);
obj.edit19:setTop(0);
obj.edit19:setWidth(110);
obj.edit19:setHeight(71);
obj.edit19:setField("untitled217");
obj.edit19:setName("edit19");
obj.layout20 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout20:setParent(obj.rectangle1);
obj.layout20:setLeft(863);
obj.layout20:setTop(666);
obj.layout20:setWidth(110);
obj.layout20:setHeight(72);
obj.layout20:setName("layout20");
obj.edit20 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit20:setParent(obj.layout20);
obj.edit20:setTransparent(true);
obj.edit20:setFontSize(20);
obj.edit20:setFontColor("#000000");
obj.edit20:setVertTextAlign("center");
obj.edit20:setLeft(0);
obj.edit20:setTop(0);
obj.edit20:setWidth(110);
obj.edit20:setHeight(73);
obj.edit20:setField("untitled218");
obj.edit20:setName("edit20");
obj.layout21 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout21:setParent(obj.rectangle1);
obj.layout21:setLeft(77);
obj.layout21:setTop(857);
obj.layout21:setWidth(317);
obj.layout21:setHeight(45);
obj.layout21:setName("layout21");
obj.edit21 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit21:setParent(obj.layout21);
obj.edit21:setTransparent(true);
obj.edit21:setFontSize(20);
obj.edit21:setFontColor("#000000");
obj.edit21:setVertTextAlign("center");
obj.edit21:setLeft(0);
obj.edit21:setTop(0);
obj.edit21:setWidth(317);
obj.edit21:setHeight(46);
obj.edit21:setField("untitled219");
obj.edit21:setName("edit21");
obj.layout22 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout22:setParent(obj.rectangle1);
obj.layout22:setLeft(77);
obj.layout22:setTop(904);
obj.layout22:setWidth(317);
obj.layout22:setHeight(49);
obj.layout22:setName("layout22");
obj.edit22 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit22:setParent(obj.layout22);
obj.edit22:setTransparent(true);
obj.edit22:setFontSize(20);
obj.edit22:setFontColor("#000000");
obj.edit22:setVertTextAlign("center");
obj.edit22:setLeft(0);
obj.edit22:setTop(0);
obj.edit22:setWidth(317);
obj.edit22:setHeight(50);
obj.edit22:setField("untitled220");
obj.edit22:setName("edit22");
obj.layout23 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout23:setParent(obj.rectangle1);
obj.layout23:setLeft(75);
obj.layout23:setTop(1004);
obj.layout23:setWidth(319);
obj.layout23:setHeight(47);
obj.layout23:setName("layout23");
obj.edit23 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit23:setParent(obj.layout23);
obj.edit23:setTransparent(true);
obj.edit23:setFontSize(20);
obj.edit23:setFontColor("#000000");
obj.edit23:setVertTextAlign("center");
obj.edit23:setLeft(0);
obj.edit23:setTop(0);
obj.edit23:setWidth(319);
obj.edit23:setHeight(48);
obj.edit23:setField("untitled221");
obj.edit23:setName("edit23");
obj.layout24 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout24:setParent(obj.rectangle1);
obj.layout24:setLeft(79);
obj.layout24:setTop(1051);
obj.layout24:setWidth(314);
obj.layout24:setHeight(47);
obj.layout24:setName("layout24");
obj.edit24 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit24:setParent(obj.layout24);
obj.edit24:setTransparent(true);
obj.edit24:setFontSize(20);
obj.edit24:setFontColor("#000000");
obj.edit24:setVertTextAlign("center");
obj.edit24:setLeft(0);
obj.edit24:setTop(0);
obj.edit24:setWidth(314);
obj.edit24:setHeight(48);
obj.edit24:setField("untitled222");
obj.edit24:setName("edit24");
obj.layout25 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout25:setParent(obj.rectangle1);
obj.layout25:setLeft(77);
obj.layout25:setTop(1150);
obj.layout25:setWidth(323);
obj.layout25:setHeight(50);
obj.layout25:setName("layout25");
obj.edit25 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit25:setParent(obj.layout25);
obj.edit25:setTransparent(true);
obj.edit25:setFontSize(20);
obj.edit25:setFontColor("#000000");
obj.edit25:setVertTextAlign("center");
obj.edit25:setLeft(0);
obj.edit25:setTop(0);
obj.edit25:setWidth(323);
obj.edit25:setHeight(51);
obj.edit25:setField("untitled223");
obj.edit25:setName("edit25");
obj.layout26 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout26:setParent(obj.rectangle1);
obj.layout26:setLeft(77);
obj.layout26:setTop(1199);
obj.layout26:setWidth(323);
obj.layout26:setHeight(47);
obj.layout26:setName("layout26");
obj.edit26 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit26:setParent(obj.layout26);
obj.edit26:setTransparent(true);
obj.edit26:setFontSize(20);
obj.edit26:setFontColor("#000000");
obj.edit26:setVertTextAlign("center");
obj.edit26:setLeft(0);
obj.edit26:setTop(0);
obj.edit26:setWidth(323);
obj.edit26:setHeight(48);
obj.edit26:setField("untitled224");
obj.edit26:setName("edit26");
obj.layout27 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout27:setParent(obj.rectangle1);
obj.layout27:setLeft(77);
obj.layout27:setTop(1301);
obj.layout27:setWidth(321);
obj.layout27:setHeight(47);
obj.layout27:setName("layout27");
obj.edit27 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit27:setParent(obj.layout27);
obj.edit27:setTransparent(true);
obj.edit27:setFontSize(20);
obj.edit27:setFontColor("#000000");
obj.edit27:setVertTextAlign("center");
obj.edit27:setLeft(0);
obj.edit27:setTop(0);
obj.edit27:setWidth(321);
obj.edit27:setHeight(48);
obj.edit27:setField("untitled228");
obj.edit27:setName("edit27");
obj.layout28 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout28:setParent(obj.rectangle1);
obj.layout28:setLeft(77);
obj.layout28:setTop(1348);
obj.layout28:setWidth(319);
obj.layout28:setHeight(47);
obj.layout28:setName("layout28");
obj.edit28 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit28:setParent(obj.layout28);
obj.edit28:setTransparent(true);
obj.edit28:setFontSize(20);
obj.edit28:setFontColor("#000000");
obj.edit28:setVertTextAlign("center");
obj.edit28:setLeft(0);
obj.edit28:setTop(0);
obj.edit28:setWidth(319);
obj.edit28:setHeight(48);
obj.edit28:setField("untitled229");
obj.edit28:setName("edit28");
obj.layout29 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout29:setParent(obj.rectangle1);
obj.layout29:setLeft(431);
obj.layout29:setTop(839);
obj.layout29:setWidth(296);
obj.layout29:setHeight(32);
obj.layout29:setName("layout29");
obj.edit29 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit29:setParent(obj.layout29);
obj.edit29:setTransparent(true);
obj.edit29:setFontSize(20);
obj.edit29:setFontColor("#000000");
obj.edit29:setVertTextAlign("center");
obj.edit29:setLeft(0);
obj.edit29:setTop(0);
obj.edit29:setWidth(296);
obj.edit29:setHeight(33);
obj.edit29:setField("untitled225");
obj.edit29:setName("edit29");
obj.layout30 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout30:setParent(obj.rectangle1);
obj.layout30:setLeft(431);
obj.layout30:setTop(878);
obj.layout30:setWidth(296);
obj.layout30:setHeight(32);
obj.layout30:setName("layout30");
obj.edit30 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit30:setParent(obj.layout30);
obj.edit30:setTransparent(true);
obj.edit30:setFontSize(20);
obj.edit30:setFontColor("#000000");
obj.edit30:setVertTextAlign("center");
obj.edit30:setLeft(0);
obj.edit30:setTop(0);
obj.edit30:setWidth(296);
obj.edit30:setHeight(33);
obj.edit30:setField("canhão");
obj.edit30:setName("edit30");
obj.layout31 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout31:setParent(obj.rectangle1);
obj.layout31:setLeft(431);
obj.layout31:setTop(916);
obj.layout31:setWidth(296);
obj.layout31:setHeight(32);
obj.layout31:setName("layout31");
obj.edit31 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit31:setParent(obj.layout31);
obj.edit31:setTransparent(true);
obj.edit31:setFontSize(20);
obj.edit31:setFontColor("#000000");
obj.edit31:setVertTextAlign("center");
obj.edit31:setLeft(0);
obj.edit31:setTop(0);
obj.edit31:setWidth(296);
obj.edit31:setHeight(33);
obj.edit31:setField("untitled306");
obj.edit31:setName("edit31");
obj.layout32 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout32:setParent(obj.rectangle1);
obj.layout32:setLeft(431);
obj.layout32:setTop(954);
obj.layout32:setWidth(296);
obj.layout32:setHeight(32);
obj.layout32:setName("layout32");
obj.edit32 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit32:setParent(obj.layout32);
obj.edit32:setTransparent(true);
obj.edit32:setFontSize(20);
obj.edit32:setFontColor("#000000");
obj.edit32:setVertTextAlign("center");
obj.edit32:setLeft(0);
obj.edit32:setTop(0);
obj.edit32:setWidth(296);
obj.edit32:setHeight(33);
obj.edit32:setField("untitled307");
obj.edit32:setName("edit32");
obj.layout33 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout33:setParent(obj.rectangle1);
obj.layout33:setLeft(431);
obj.layout33:setTop(994);
obj.layout33:setWidth(296);
obj.layout33:setHeight(32);
obj.layout33:setName("layout33");
obj.edit33 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit33:setParent(obj.layout33);
obj.edit33:setTransparent(true);
obj.edit33:setFontSize(20);
obj.edit33:setFontColor("#000000");
obj.edit33:setVertTextAlign("center");
obj.edit33:setLeft(0);
obj.edit33:setTop(0);
obj.edit33:setWidth(296);
obj.edit33:setHeight(33);
obj.edit33:setField("untitled308");
obj.edit33:setName("edit33");
obj.layout34 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout34:setParent(obj.rectangle1);
obj.layout34:setLeft(435);
obj.layout34:setTop(1030);
obj.layout34:setWidth(296);
obj.layout34:setHeight(32);
obj.layout34:setName("layout34");
obj.edit34 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit34:setParent(obj.layout34);
obj.edit34:setTransparent(true);
obj.edit34:setFontSize(20);
obj.edit34:setFontColor("#000000");
obj.edit34:setVertTextAlign("center");
obj.edit34:setLeft(0);
obj.edit34:setTop(0);
obj.edit34:setWidth(296);
obj.edit34:setHeight(33);
obj.edit34:setField("untitled309");
obj.edit34:setName("edit34");
obj.layout35 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout35:setParent(obj.rectangle1);
obj.layout35:setLeft(435);
obj.layout35:setTop(1071);
obj.layout35:setWidth(296);
obj.layout35:setHeight(32);
obj.layout35:setName("layout35");
obj.edit35 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit35:setParent(obj.layout35);
obj.edit35:setTransparent(true);
obj.edit35:setFontSize(20);
obj.edit35:setFontColor("#000000");
obj.edit35:setVertTextAlign("center");
obj.edit35:setLeft(0);
obj.edit35:setTop(0);
obj.edit35:setWidth(296);
obj.edit35:setHeight(33);
obj.edit35:setField("untitled310");
obj.edit35:setName("edit35");
obj.layout36 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout36:setParent(obj.rectangle1);
obj.layout36:setLeft(435);
obj.layout36:setTop(1107);
obj.layout36:setWidth(296);
obj.layout36:setHeight(32);
obj.layout36:setName("layout36");
obj.edit36 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit36:setParent(obj.layout36);
obj.edit36:setTransparent(true);
obj.edit36:setFontSize(20);
obj.edit36:setFontColor("#000000");
obj.edit36:setVertTextAlign("center");
obj.edit36:setLeft(0);
obj.edit36:setTop(0);
obj.edit36:setWidth(296);
obj.edit36:setHeight(33);
obj.edit36:setField("untitled311");
obj.edit36:setName("edit36");
obj.layout37 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout37:setParent(obj.rectangle1);
obj.layout37:setLeft(741);
obj.layout37:setTop(835);
obj.layout37:setWidth(128);
obj.layout37:setHeight(40);
obj.layout37:setName("layout37");
obj.edit37 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit37:setParent(obj.layout37);
obj.edit37:setTransparent(true);
obj.edit37:setFontSize(20);
obj.edit37:setFontColor("#000000");
obj.edit37:setVertTextAlign("center");
obj.edit37:setLeft(0);
obj.edit37:setTop(0);
obj.edit37:setWidth(128);
obj.edit37:setHeight(41);
obj.edit37:setField("untitled226");
obj.edit37:setName("edit37");
obj.layout38 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout38:setParent(obj.rectangle1);
obj.layout38:setLeft(741);
obj.layout38:setTop(873);
obj.layout38:setWidth(128);
obj.layout38:setHeight(40);
obj.layout38:setName("layout38");
obj.edit38 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit38:setParent(obj.layout38);
obj.edit38:setTransparent(true);
obj.edit38:setFontSize(20);
obj.edit38:setFontColor("#000000");
obj.edit38:setVertTextAlign("center");
obj.edit38:setLeft(0);
obj.edit38:setTop(0);
obj.edit38:setWidth(128);
obj.edit38:setHeight(41);
obj.edit38:setField("untitled312");
obj.edit38:setName("edit38");
obj.layout39 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout39:setParent(obj.rectangle1);
obj.layout39:setLeft(741);
obj.layout39:setTop(911);
obj.layout39:setWidth(128);
obj.layout39:setHeight(40);
obj.layout39:setName("layout39");
obj.edit39 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit39:setParent(obj.layout39);
obj.edit39:setTransparent(true);
obj.edit39:setFontSize(20);
obj.edit39:setFontColor("#000000");
obj.edit39:setVertTextAlign("center");
obj.edit39:setLeft(0);
obj.edit39:setTop(0);
obj.edit39:setWidth(128);
obj.edit39:setHeight(41);
obj.edit39:setField("untitled313");
obj.edit39:setName("edit39");
obj.layout40 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout40:setParent(obj.rectangle1);
obj.layout40:setLeft(741);
obj.layout40:setTop(950);
obj.layout40:setWidth(128);
obj.layout40:setHeight(40);
obj.layout40:setName("layout40");
obj.edit40 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit40:setParent(obj.layout40);
obj.edit40:setTransparent(true);
obj.edit40:setFontSize(20);
obj.edit40:setFontColor("#000000");
obj.edit40:setVertTextAlign("center");
obj.edit40:setLeft(0);
obj.edit40:setTop(0);
obj.edit40:setWidth(128);
obj.edit40:setHeight(41);
obj.edit40:setField("untitled314");
obj.edit40:setName("edit40");
obj.layout41 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout41:setParent(obj.rectangle1);
obj.layout41:setLeft(741);
obj.layout41:setTop(988);
obj.layout41:setWidth(128);
obj.layout41:setHeight(40);
obj.layout41:setName("layout41");
obj.edit41 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit41:setParent(obj.layout41);
obj.edit41:setTransparent(true);
obj.edit41:setFontSize(20);
obj.edit41:setFontColor("#000000");
obj.edit41:setVertTextAlign("center");
obj.edit41:setLeft(0);
obj.edit41:setTop(0);
obj.edit41:setWidth(128);
obj.edit41:setHeight(41);
obj.edit41:setField("untitled315");
obj.edit41:setName("edit41");
obj.layout42 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout42:setParent(obj.rectangle1);
obj.layout42:setLeft(741);
obj.layout42:setTop(1028);
obj.layout42:setWidth(128);
obj.layout42:setHeight(40);
obj.layout42:setName("layout42");
obj.edit42 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit42:setParent(obj.layout42);
obj.edit42:setTransparent(true);
obj.edit42:setFontSize(20);
obj.edit42:setFontColor("#000000");
obj.edit42:setVertTextAlign("center");
obj.edit42:setLeft(0);
obj.edit42:setTop(0);
obj.edit42:setWidth(128);
obj.edit42:setHeight(41);
obj.edit42:setField("untitled316");
obj.edit42:setName("edit42");
obj.layout43 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout43:setParent(obj.rectangle1);
obj.layout43:setLeft(743);
obj.layout43:setTop(1064);
obj.layout43:setWidth(128);
obj.layout43:setHeight(40);
obj.layout43:setName("layout43");
obj.edit43 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit43:setParent(obj.layout43);
obj.edit43:setTransparent(true);
obj.edit43:setFontSize(20);
obj.edit43:setFontColor("#000000");
obj.edit43:setVertTextAlign("center");
obj.edit43:setLeft(0);
obj.edit43:setTop(0);
obj.edit43:setWidth(128);
obj.edit43:setHeight(41);
obj.edit43:setField("untitled317");
obj.edit43:setName("edit43");
obj.layout44 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout44:setParent(obj.rectangle1);
obj.layout44:setLeft(743);
obj.layout44:setTop(1103);
obj.layout44:setWidth(128);
obj.layout44:setHeight(40);
obj.layout44:setName("layout44");
obj.edit44 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit44:setParent(obj.layout44);
obj.edit44:setTransparent(true);
obj.edit44:setFontSize(20);
obj.edit44:setFontColor("#000000");
obj.edit44:setVertTextAlign("center");
obj.edit44:setLeft(0);
obj.edit44:setTop(0);
obj.edit44:setWidth(128);
obj.edit44:setHeight(41);
obj.edit44:setField("untitled318");
obj.edit44:setName("edit44");
obj.layout45 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout45:setParent(obj.rectangle1);
obj.layout45:setLeft(889);
obj.layout45:setTop(833);
obj.layout45:setWidth(83);
obj.layout45:setHeight(40);
obj.layout45:setName("layout45");
obj.edit45 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit45:setParent(obj.layout45);
obj.edit45:setTransparent(true);
obj.edit45:setFontSize(20);
obj.edit45:setFontColor("#000000");
obj.edit45:setVertTextAlign("center");
obj.edit45:setLeft(0);
obj.edit45:setTop(0);
obj.edit45:setWidth(83);
obj.edit45:setHeight(41);
obj.edit45:setField("untitled227");
obj.edit45:setName("edit45");
obj.layout46 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout46:setParent(obj.rectangle1);
obj.layout46:setLeft(890);
obj.layout46:setTop(875);
obj.layout46:setWidth(83);
obj.layout46:setHeight(40);
obj.layout46:setName("layout46");
obj.edit46 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit46:setParent(obj.layout46);
obj.edit46:setTransparent(true);
obj.edit46:setFontSize(20);
obj.edit46:setFontColor("#000000");
obj.edit46:setVertTextAlign("center");
obj.edit46:setLeft(0);
obj.edit46:setTop(0);
obj.edit46:setWidth(83);
obj.edit46:setHeight(41);
obj.edit46:setField("untitled319");
obj.edit46:setName("edit46");
obj.layout47 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout47:setParent(obj.rectangle1);
obj.layout47:setLeft(889);
obj.layout47:setTop(914);
obj.layout47:setWidth(83);
obj.layout47:setHeight(40);
obj.layout47:setName("layout47");
obj.edit47 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit47:setParent(obj.layout47);
obj.edit47:setTransparent(true);
obj.edit47:setFontSize(20);
obj.edit47:setFontColor("#000000");
obj.edit47:setVertTextAlign("center");
obj.edit47:setLeft(0);
obj.edit47:setTop(0);
obj.edit47:setWidth(83);
obj.edit47:setHeight(41);
obj.edit47:setField("untitled320");
obj.edit47:setName("edit47");
obj.layout48 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout48:setParent(obj.rectangle1);
obj.layout48:setLeft(889);
obj.layout48:setTop(950);
obj.layout48:setWidth(83);
obj.layout48:setHeight(40);
obj.layout48:setName("layout48");
obj.edit48 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit48:setParent(obj.layout48);
obj.edit48:setTransparent(true);
obj.edit48:setFontSize(20);
obj.edit48:setFontColor("#000000");
obj.edit48:setVertTextAlign("center");
obj.edit48:setLeft(0);
obj.edit48:setTop(0);
obj.edit48:setWidth(83);
obj.edit48:setHeight(41);
obj.edit48:setField("untitled321");
obj.edit48:setName("edit48");
obj.layout49 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout49:setParent(obj.rectangle1);
obj.layout49:setLeft(890);
obj.layout49:setTop(988);
obj.layout49:setWidth(83);
obj.layout49:setHeight(40);
obj.layout49:setName("layout49");
obj.edit49 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit49:setParent(obj.layout49);
obj.edit49:setTransparent(true);
obj.edit49:setFontSize(20);
obj.edit49:setFontColor("#000000");
obj.edit49:setVertTextAlign("center");
obj.edit49:setLeft(0);
obj.edit49:setTop(0);
obj.edit49:setWidth(83);
obj.edit49:setHeight(41);
obj.edit49:setField("untitled322");
obj.edit49:setName("edit49");
obj.layout50 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout50:setParent(obj.rectangle1);
obj.layout50:setLeft(890);
obj.layout50:setTop(1026);
obj.layout50:setWidth(83);
obj.layout50:setHeight(40);
obj.layout50:setName("layout50");
obj.edit50 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit50:setParent(obj.layout50);
obj.edit50:setTransparent(true);
obj.edit50:setFontSize(20);
obj.edit50:setFontColor("#000000");
obj.edit50:setVertTextAlign("center");
obj.edit50:setLeft(0);
obj.edit50:setTop(0);
obj.edit50:setWidth(83);
obj.edit50:setHeight(41);
obj.edit50:setField("untitled323");
obj.edit50:setName("edit50");
obj.layout51 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout51:setParent(obj.rectangle1);
obj.layout51:setLeft(890);
obj.layout51:setTop(1064);
obj.layout51:setWidth(83);
obj.layout51:setHeight(40);
obj.layout51:setName("layout51");
obj.edit51 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit51:setParent(obj.layout51);
obj.edit51:setTransparent(true);
obj.edit51:setFontSize(20);
obj.edit51:setFontColor("#000000");
obj.edit51:setVertTextAlign("center");
obj.edit51:setLeft(0);
obj.edit51:setTop(0);
obj.edit51:setWidth(83);
obj.edit51:setHeight(41);
obj.edit51:setField("untitled324");
obj.edit51:setName("edit51");
obj.layout52 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout52:setParent(obj.rectangle1);
obj.layout52:setLeft(890);
obj.layout52:setTop(1105);
obj.layout52:setWidth(83);
obj.layout52:setHeight(40);
obj.layout52:setName("layout52");
obj.edit52 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit52:setParent(obj.layout52);
obj.edit52:setTransparent(true);
obj.edit52:setFontSize(20);
obj.edit52:setFontColor("#000000");
obj.edit52:setVertTextAlign("center");
obj.edit52:setLeft(0);
obj.edit52:setTop(0);
obj.edit52:setWidth(83);
obj.edit52:setHeight(41);
obj.edit52:setField("untitled325");
obj.edit52:setName("edit52");
obj.layout53 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout53:setParent(obj.rectangle1);
obj.layout53:setLeft(433);
obj.layout53:setTop(1220);
obj.layout53:setWidth(260);
obj.layout53:setHeight(34);
obj.layout53:setName("layout53");
obj.edit53 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit53:setParent(obj.layout53);
obj.edit53:setTransparent(true);
obj.edit53:setFontSize(20);
obj.edit53:setFontColor("#000000");
obj.edit53:setVertTextAlign("center");
obj.edit53:setLeft(0);
obj.edit53:setTop(0);
obj.edit53:setWidth(260);
obj.edit53:setHeight(35);
obj.edit53:setField("untitled230");
obj.edit53:setName("edit53");
obj.layout54 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout54:setParent(obj.rectangle1);
obj.layout54:setLeft(431);
obj.layout54:setTop(1265);
obj.layout54:setWidth(260);
obj.layout54:setHeight(34);
obj.layout54:setName("layout54");
obj.edit54 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit54:setParent(obj.layout54);
obj.edit54:setTransparent(true);
obj.edit54:setFontSize(20);
obj.edit54:setFontColor("#000000");
obj.edit54:setVertTextAlign("center");
obj.edit54:setLeft(0);
obj.edit54:setTop(0);
obj.edit54:setWidth(260);
obj.edit54:setHeight(35);
obj.edit54:setField("untitled331");
obj.edit54:setName("edit54");
obj.layout55 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout55:setParent(obj.rectangle1);
obj.layout55:setLeft(431);
obj.layout55:setTop(1305);
obj.layout55:setWidth(260);
obj.layout55:setHeight(34);
obj.layout55:setName("layout55");
obj.edit55 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit55:setParent(obj.layout55);
obj.edit55:setTransparent(true);
obj.edit55:setFontSize(20);
obj.edit55:setFontColor("#000000");
obj.edit55:setVertTextAlign("center");
obj.edit55:setLeft(0);
obj.edit55:setTop(0);
obj.edit55:setWidth(260);
obj.edit55:setHeight(35);
obj.edit55:setField("untitled332");
obj.edit55:setName("edit55");
obj.layout56 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout56:setParent(obj.rectangle1);
obj.layout56:setLeft(433);
obj.layout56:setTop(1348);
obj.layout56:setWidth(260);
obj.layout56:setHeight(34);
obj.layout56:setName("layout56");
obj.edit56 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit56:setParent(obj.layout56);
obj.edit56:setTransparent(true);
obj.edit56:setFontSize(20);
obj.edit56:setFontColor("#000000");
obj.edit56:setVertTextAlign("center");
obj.edit56:setLeft(0);
obj.edit56:setTop(0);
obj.edit56:setWidth(260);
obj.edit56:setHeight(35);
obj.edit56:setField("untitled333");
obj.edit56:setName("edit56");
obj.layout57 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout57:setParent(obj.rectangle1);
obj.layout57:setLeft(709);
obj.layout57:setTop(1222);
obj.layout57:setWidth(265);
obj.layout57:setHeight(34);
obj.layout57:setName("layout57");
obj.edit57 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit57:setParent(obj.layout57);
obj.edit57:setTransparent(true);
obj.edit57:setFontSize(20);
obj.edit57:setFontColor("#000000");
obj.edit57:setVertTextAlign("center");
obj.edit57:setLeft(0);
obj.edit57:setTop(0);
obj.edit57:setWidth(265);
obj.edit57:setHeight(35);
obj.edit57:setField("untitled231");
obj.edit57:setName("edit57");
obj.layout58 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout58:setParent(obj.rectangle1);
obj.layout58:setLeft(707);
obj.layout58:setTop(1264);
obj.layout58:setWidth(265);
obj.layout58:setHeight(34);
obj.layout58:setName("layout58");
obj.edit58 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit58:setParent(obj.layout58);
obj.edit58:setTransparent(true);
obj.edit58:setFontSize(20);
obj.edit58:setFontColor("#000000");
obj.edit58:setVertTextAlign("center");
obj.edit58:setLeft(0);
obj.edit58:setTop(0);
obj.edit58:setWidth(265);
obj.edit58:setHeight(35);
obj.edit58:setField("untitled334");
obj.edit58:setName("edit58");
obj.layout59 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout59:setParent(obj.rectangle1);
obj.layout59:setLeft(707);
obj.layout59:setTop(1307);
obj.layout59:setWidth(265);
obj.layout59:setHeight(34);
obj.layout59:setName("layout59");
obj.edit59 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit59:setParent(obj.layout59);
obj.edit59:setTransparent(true);
obj.edit59:setFontSize(20);
obj.edit59:setFontColor("#000000");
obj.edit59:setVertTextAlign("center");
obj.edit59:setLeft(0);
obj.edit59:setTop(0);
obj.edit59:setWidth(265);
obj.edit59:setHeight(35);
obj.edit59:setField("untitled335");
obj.edit59:setName("edit59");
obj.layout60 = GUI.fromHandle(_obj_newObject("layout"));
obj.layout60:setParent(obj.rectangle1);
obj.layout60:setLeft(707);
obj.layout60:setTop(1348);
obj.layout60:setWidth(265);
obj.layout60:setHeight(34);
obj.layout60:setName("layout60");
obj.edit60 = GUI.fromHandle(_obj_newObject("edit"));
obj.edit60:setParent(obj.layout60);
obj.edit60:setTransparent(true);
obj.edit60:setFontSize(20);
obj.edit60:setFontColor("#000000");
obj.edit60:setVertTextAlign("center");
obj.edit60:setLeft(0);
obj.edit60:setTop(0);
obj.edit60:setWidth(265);
obj.edit60:setHeight(35);
obj.edit60:setField("untitled336");
obj.edit60:setName("edit60");
function obj:_releaseEvents()
end;
obj._oldLFMDestroy = obj.destroy;
function obj:destroy()
self:_releaseEvents();
if (self.handle ~= 0) and (self.setNodeDatabase ~= nil) then
self:setNodeDatabase(nil);
end;
if self.layout39 ~= nil then self.layout39:destroy(); self.layout39 = nil; end;
if self.layout43 ~= nil then self.layout43:destroy(); self.layout43 = nil; end;
if self.edit46 ~= nil then self.edit46:destroy(); self.edit46 = nil; end;
if self.layout15 ~= nil then self.layout15:destroy(); self.layout15 = nil; end;
if self.edit41 ~= nil then self.edit41:destroy(); self.edit41 = nil; end;
if self.layout10 ~= nil then self.layout10:destroy(); self.layout10 = nil; end;
if self.layout58 ~= nil then self.layout58:destroy(); self.layout58 = nil; end;
if self.edit36 ~= nil then self.edit36:destroy(); self.edit36 = nil; end;
if self.edit9 ~= nil then self.edit9:destroy(); self.edit9 = nil; end;
if self.edit33 ~= nil then self.edit33:destroy(); self.edit33 = nil; end;
if self.edit29 ~= nil then self.edit29:destroy(); self.edit29 = nil; end;
if self.layout30 ~= nil then self.layout30:destroy(); self.layout30 = nil; end;
if self.layout17 ~= nil then self.layout17:destroy(); self.layout17 = nil; end;
if self.edit7 ~= nil then self.edit7:destroy(); self.edit7 = nil; end;
if self.edit28 ~= nil then self.edit28:destroy(); self.edit28 = nil; end;
if self.layout57 ~= nil then self.layout57:destroy(); self.layout57 = nil; end;
if self.layout60 ~= nil then self.layout60:destroy(); self.layout60 = nil; end;
if self.edit12 ~= nil then self.edit12:destroy(); self.edit12 = nil; end;
if self.layout47 ~= nil then self.layout47:destroy(); self.layout47 = nil; end;
if self.layout59 ~= nil then self.layout59:destroy(); self.layout59 = nil; end;
if self.edit35 ~= nil then self.edit35:destroy(); self.edit35 = nil; end;
if self.layout41 ~= nil then self.layout41:destroy(); self.layout41 = nil; end;
if self.layout38 ~= nil then self.layout38:destroy(); self.layout38 = nil; end;
if self.layout24 ~= nil then self.layout24:destroy(); self.layout24 = nil; end;
if self.edit57 ~= nil then self.edit57:destroy(); self.edit57 = nil; end;
if self.layout13 ~= nil then self.layout13:destroy(); self.layout13 = nil; end;
if self.layout3 ~= nil then self.layout3:destroy(); self.layout3 = nil; end;
if self.edit54 ~= nil then self.edit54:destroy(); self.edit54 = nil; end;
if self.layout8 ~= nil then self.layout8:destroy(); self.layout8 = nil; end;
if self.layout1 ~= nil then self.layout1:destroy(); self.layout1 = nil; end;
if self.layout23 ~= nil then self.layout23:destroy(); self.layout23 = nil; end;
if self.rectangle1 ~= nil then self.rectangle1:destroy(); self.rectangle1 = nil; end;
if self.layout45 ~= nil then self.layout45:destroy(); self.layout45 = nil; end;
if self.edit47 ~= nil then self.edit47:destroy(); self.edit47 = nil; end;
if self.edit50 ~= nil then self.edit50:destroy(); self.edit50 = nil; end;
if self.edit24 ~= nil then self.edit24:destroy(); self.edit24 = nil; end;
if self.edit59 ~= nil then self.edit59:destroy(); self.edit59 = nil; end;
if self.layout12 ~= nil then self.layout12:destroy(); self.layout12 = nil; end;
if self.edit14 ~= nil then self.edit14:destroy(); self.edit14 = nil; end;
if self.layout46 ~= nil then self.layout46:destroy(); self.layout46 = nil; end;
if self.layout56 ~= nil then self.layout56:destroy(); self.layout56 = nil; end;
if self.edit4 ~= nil then self.edit4:destroy(); self.edit4 = nil; end;
if self.layout25 ~= nil then self.layout25:destroy(); self.layout25 = nil; end;
if self.edit26 ~= nil then self.edit26:destroy(); self.edit26 = nil; end;
if self.edit44 ~= nil then self.edit44:destroy(); self.edit44 = nil; end;
if self.edit34 ~= nil then self.edit34:destroy(); self.edit34 = nil; end;
if self.layout9 ~= nil then self.layout9:destroy(); self.layout9 = nil; end;
if self.edit11 ~= nil then self.edit11:destroy(); self.edit11 = nil; end;
if self.image1 ~= nil then self.image1:destroy(); self.image1 = nil; end;
if self.edit19 ~= nil then self.edit19:destroy(); self.edit19 = nil; end;
if self.edit5 ~= nil then self.edit5:destroy(); self.edit5 = nil; end;
if self.layout54 ~= nil then self.layout54:destroy(); self.layout54 = nil; end;
if self.layout50 ~= nil then self.layout50:destroy(); self.layout50 = nil; end;
if self.layout32 ~= nil then self.layout32:destroy(); self.layout32 = nil; end;
if self.layout37 ~= nil then self.layout37:destroy(); self.layout37 = nil; end;
if self.layout26 ~= nil then self.layout26:destroy(); self.layout26 = nil; end;
if self.edit45 ~= nil then self.edit45:destroy(); self.edit45 = nil; end;
if self.edit8 ~= nil then self.edit8:destroy(); self.edit8 = nil; end;
if self.layout27 ~= nil then self.layout27:destroy(); self.layout27 = nil; end;
if self.layout36 ~= nil then self.layout36:destroy(); self.layout36 = nil; end;
if self.edit53 ~= nil then self.edit53:destroy(); self.edit53 = nil; end;
if self.layout28 ~= nil then self.layout28:destroy(); self.layout28 = nil; end;
if self.layout44 ~= nil then self.layout44:destroy(); self.layout44 = nil; end;
if self.layout52 ~= nil then self.layout52:destroy(); self.layout52 = nil; end;
if self.layout19 ~= nil then self.layout19:destroy(); self.layout19 = nil; end;
if self.edit2 ~= nil then self.edit2:destroy(); self.edit2 = nil; end;
if self.edit10 ~= nil then self.edit10:destroy(); self.edit10 = nil; end;
if self.edit16 ~= nil then self.edit16:destroy(); self.edit16 = nil; end;
if self.edit31 ~= nil then self.edit31:destroy(); self.edit31 = nil; end;
if self.edit1 ~= nil then self.edit1:destroy(); self.edit1 = nil; end;
if self.edit30 ~= nil then self.edit30:destroy(); self.edit30 = nil; end;
if self.edit21 ~= nil then self.edit21:destroy(); self.edit21 = nil; end;
if self.layout34 ~= nil then self.layout34:destroy(); self.layout34 = nil; end;
if self.edit52 ~= nil then self.edit52:destroy(); self.edit52 = nil; end;
if self.edit56 ~= nil then self.edit56:destroy(); self.edit56 = nil; end;
if self.layout4 ~= nil then self.layout4:destroy(); self.layout4 = nil; end;
if self.edit55 ~= nil then self.edit55:destroy(); self.edit55 = nil; end;
if self.edit43 ~= nil then self.edit43:destroy(); self.edit43 = nil; end;
if self.layout42 ~= nil then self.layout42:destroy(); self.layout42 = nil; end;
if self.edit58 ~= nil then self.edit58:destroy(); self.edit58 = nil; end;
if self.layout53 ~= nil then self.layout53:destroy(); self.layout53 = nil; end;
if self.edit13 ~= nil then self.edit13:destroy(); self.edit13 = nil; end;
if self.edit39 ~= nil then self.edit39:destroy(); self.edit39 = nil; end;
if self.layout5 ~= nil then self.layout5:destroy(); self.layout5 = nil; end;
if self.layout20 ~= nil then self.layout20:destroy(); self.layout20 = nil; end;
if self.edit23 ~= nil then self.edit23:destroy(); self.edit23 = nil; end;
if self.layout55 ~= nil then self.layout55:destroy(); self.layout55 = nil; end;
if self.layout18 ~= nil then self.layout18:destroy(); self.layout18 = nil; end;
if self.edit37 ~= nil then self.edit37:destroy(); self.edit37 = nil; end;
if self.edit40 ~= nil then self.edit40:destroy(); self.edit40 = nil; end;
if self.layout31 ~= nil then self.layout31:destroy(); self.layout31 = nil; end;
if self.edit17 ~= nil then self.edit17:destroy(); self.edit17 = nil; end;
if self.edit51 ~= nil then self.edit51:destroy(); self.edit51 = nil; end;
if self.layout2 ~= nil then self.layout2:destroy(); self.layout2 = nil; end;
if self.edit38 ~= nil then self.edit38:destroy(); self.edit38 = nil; end;
if self.edit48 ~= nil then self.edit48:destroy(); self.edit48 = nil; end;
if self.layout49 ~= nil then self.layout49:destroy(); self.layout49 = nil; end;
if self.layout29 ~= nil then self.layout29:destroy(); self.layout29 = nil; end;
if self.layout35 ~= nil then self.layout35:destroy(); self.layout35 = nil; end;
if self.layout11 ~= nil then self.layout11:destroy(); self.layout11 = nil; end;
if self.edit15 ~= nil then self.edit15:destroy(); self.edit15 = nil; end;
if self.layout40 ~= nil then self.layout40:destroy(); self.layout40 = nil; end;
if self.edit6 ~= nil then self.edit6:destroy(); self.edit6 = nil; end;
if self.edit42 ~= nil then self.edit42:destroy(); self.edit42 = nil; end;
if self.edit22 ~= nil then self.edit22:destroy(); self.edit22 = nil; end;
if self.edit3 ~= nil then self.edit3:destroy(); self.edit3 = nil; end;
if self.layout33 ~= nil then self.layout33:destroy(); self.layout33 = nil; end;
if self.layout6 ~= nil then self.layout6:destroy(); self.layout6 = nil; end;
if self.edit49 ~= nil then self.edit49:destroy(); self.edit49 = nil; end;
if self.layout22 ~= nil then self.layout22:destroy(); self.layout22 = nil; end;
if self.layout48 ~= nil then self.layout48:destroy(); self.layout48 = nil; end;
if self.layout14 ~= nil then self.layout14:destroy(); self.layout14 = nil; end;
if self.edit27 ~= nil then self.edit27:destroy(); self.edit27 = nil; end;
if self.layout16 ~= nil then self.layout16:destroy(); self.layout16 = nil; end;
if self.layout21 ~= nil then self.layout21:destroy(); self.layout21 = nil; end;
if self.edit32 ~= nil then self.edit32:destroy(); self.edit32 = nil; end;
if self.layout51 ~= nil then self.layout51:destroy(); self.layout51 = nil; end;
if self.edit18 ~= nil then self.edit18:destroy(); self.edit18 = nil; end;
if self.edit25 ~= nil then self.edit25:destroy(); self.edit25 = nil; end;
if self.scrollBox1 ~= nil then self.scrollBox1:destroy(); self.scrollBox1 = nil; end;
if self.layout7 ~= nil then self.layout7:destroy(); self.layout7 = nil; end;
if self.edit60 ~= nil then self.edit60:destroy(); self.edit60 = nil; end;
if self.edit20 ~= nil then self.edit20:destroy(); self.edit20 = nil; end;
self:_oldLFMDestroy();
end;
obj:endUpdate();
return obj;
end;
function newfrmTSC4_svg()
local retObj = nil;
__o_rrpgObjs.beginObjectsLoading();
__o_Utils.tryFinally(
function()
retObj = constructNew_frmTSC4_svg();
end,
function()
__o_rrpgObjs.endObjectsLoading();
end);
assert(retObj ~= nil);
return retObj;
end;
local _frmTSC4_svg = {
newEditor = newfrmTSC4_svg,
new = newfrmTSC4_svg,
name = "frmTSC4_svg",
dataType = "",
formType = "undefined",
formComponentName = "form",
title = "",
description=""};
frmTSC4_svg = _frmTSC4_svg;
Firecast.registrarForm(_frmTSC4_svg);
return _frmTSC4_svg;
|
local lsp_status = require("lsp-status")
lsp_status.register_progress()
local capabilities = vim.lsp.protocol.make_client_capabilities()
local completionItem = capabilities.textDocument.completion.completionItem
capabilities.window = { workDoneProgress = true }
completionItem.snippetSupport = true
completionItem.preselectSupport = true
completionItem.insertReplaceSupport = true
completionItem.labelDetailsSupport = true
completionItem.deprecatedSupport = true
completionItem.commitCharactersSupport = true
completionItem.tagSupport = { valueSet = { 1 } }
completionItem.resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
},
}
local function on_attach(client)
-- turn off formatting for lsp if if null-ls already has one availiable
if NullLSGetAvail(vim.bo.filetype) ~= nil then
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
end
if client.resolved_capabilities.document_highlight then
vim.api.nvim_exec(
[[
augroup lsp_document_highlight
autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
]],
false
)
end
end
-- servers installed using lsp-installer will use this
-- if that server is installed it will try to setup it if it exists
local server_configs = {
clangd = {},
gdscript = {},
sumneko_lua = {
settings = {
Lua = {
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { "vim" },
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
},
},
},
}
local lsp_installer = require("nvim-lsp-installer")
lsp_installer.on_server_ready(function(server)
local config = server_configs[server.name] or {}
server_configs[server.name] = nil
config.capabilities = capabilities
config.on_attach = on_attach
server:setup(config)
vim.api.nvim_command("do User LspAttachBuffers")
end)
local lspconfig = require("lspconfig")
for name, config in pairs(server_configs) do
local cmd = config.cmd or lspconfig[name].document_config.default_config.cmd
if cmd and vim.fn.executable(cmd[1]) == 1 then
config.capabilities = capabilities
config.on_attach = on_attach
lspconfig[name].setup(config)
end
end
-- other configurations
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
vim.diagnostic.config({
update_in_insert = true,
underline = true,
severity_sort = true,
float = {
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
})
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
border = "rounded",
})
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
border = "rounded",
})
-- dumb hack to fix rust_analyzer content modified message thing being annyoing
local notify = vim.notify
vim.notify = function(msg, ...)
if msg ~= "rust_analyzer: -32801: content modified" then
notify(msg, ...)
end
end
|
local M = {}
local l = {}
function M.setup()
vim.cmd([[
hi! link LspCodeLens Comment
hi! link LspCodeLensSeparator Comment
]])
vim.cmd([[
augroup lsp-codelens
au!
au! BufEnter,CursorHold,InsertLeave <buffer> lua require('jg.lsp-codelens').on_refresh()
augroup END
]])
end
function M.on_refresh()
if l.anyClientSupports('textDocument/codeLens') then
vim.lsp.codelens.refresh()
end
end
function l.anyClientSupports(method)
local bufnr = vim.api.nvim_get_current_buf()
local supported = false
vim.lsp.for_each_buffer_client(bufnr, function(client)
if client.supports_method(method) then
supported = true
end
end)
return supported
end
return M
|
--[[
Copyright (C) 2018 Kubos Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
]]
local uv = require 'uv'
local getenv = require('os').getenv
local splitPath = require('pathjoin').splitPath
local port = getenv 'PORT'
if port then port = tonumber(port) end
if not port then port = 7000 end
local cbor_message_protocol = require 'cbor-message-protocol'
local file_protocol = require 'file-protocol'
local handle = uv.new_udp()
handle:bind('127.0.0.1', 0)
p(handle:getsockname())
local protocol
local function on_message(message, addr)
assert(addr.port == port)
coroutine.wrap(function ()
local success, error = xpcall(function ()
assert(type(message) == 'table' and #message > 0)
protocol.on_message(message)
end, debug.traceback)
if not success then
print(error)
end
end)()
end
local send_message = cbor_message_protocol(handle, on_message, true)
local function send(...)
send_message({...}, "127.0.0.1", port)
end
protocol = file_protocol(send, 'storage')
local function upload(source_path, target_path)
if not target_path then
local parts = splitPath(source_path)
target_path = parts[#parts]
end
print(string.format("Uploading local:%s to remote:%s", source_path, target_path))
local hash, num_chunks, mode = protocol.local_import(source_path)
protocol.send_sync(hash, num_chunks)
protocol.call_export(hash, target_path, mode)
print 'Upload Complete'
end
local function download(source_path, target_path)
if not target_path then
local parts = splitPath(source_path)
target_path = parts[#parts]
end
print(string.format("Downloading remote:%s to local:%s", source_path, target_path))
local hash, num_chunks, mode = protocol.call_import(source_path)
protocol.sync_and_send(hash, num_chunks)
protocol.local_export(hash, target_path, mode)
print 'Download Complete'
end
local usage = [[
Kubos File Client Utility Usage:
kubos-file-client upload path/to/local/file.txt [/remote/path/file.txt]
kubos-file-client download /remote/path/file.txt [local/path/file.txt]
]]
coroutine.wrap(function ()
local success, message = xpcall(function ()
local command = args[1]
if command == 'upload' and #args >= 2 then
upload(args[2], args[3])
elseif command == 'download' and #args >= 2 then
download(args[2], args[3])
else
print(usage)
end
handle:close()
end, debug.traceback)
if not success then
print(message)
end
end)()
uv.run()
|
dofile("test_setup.lua")
local file1 = [=[
return function()
log("> Hello, I'm the original version of the function, and I return 5!")
return 5
end
]=]
local file2 = [=[
return function()
log("> Hello, I'm a new version of the function, and I return 10!")
return 10
end
]=]
local func = DoFileString(file1)
local info = debug.getinfo(func, "S")
log("HELLO", info.short_src)
assert(func() == 5)
ReloadFileString(file2)
assert(func() == 10)
|
local function thread(pipe)
local uv = require "lluv"
local ut = require "lluv.utils"
uv.poll_zmq = require "lluv.poll_zmq"
uv.poll_zmq(pipe):start(function(handle, err, pipe)
if err then
print("Poll error:", err)
return handle:close()
end
print("Pipe recv:", pipe:recvx())
end)
uv.timer():start(1000, function()
print("LibUV timer")
end)
uv.run()
end
local zth = require "lzmq.threads"
local ztm = require "lzmq.timer"
local actor = zth.xactor(thread):start()
for i = 1, 5 do
actor:send("Hello #" .. i)
ztm.sleep(1000)
end
|
-- config: (lint (only var:set-global))
local z
x, y, z = 0, 0
|
festering_dung_mite_queen = Creature:new {
objectName = "@mob/creature_names:festering_dung_queen",
socialGroup = "mite",
faction = "",
level = 18,
chanceHit = 0.32,
damageMin = 160,
damageMax = 170,
baseXp = 1426,
baseHAM = 4500,
baseHAMmax = 5500,
armor = 0,
resists = {115,105,0,-1,-1,-1,0,-1,-1},
meatType = "meat_insect",
meatAmount = 13,
hideType = "",
hideAmount = 0,
boneType = "",
boneAmount = 0,
milkType = "milk_wild",
milk = 400,
tamingChance = 0.25,
ferocity = 0,
pvpBitmask = AGGRESSIVE + ATTACKABLE + ENEMY,
creatureBitmask = PACK + HERD + KILLER,
optionsBitmask = AIENABLED,
diet = CARNIVORE,
templates = {"object/mobile/dung_mite.iff"},
hues = { 0, 1, 2, 3, 4, 5, 6, 7 },
scale = 1.25,
lootGroups = {},
weapons = {},
conversationTemplate = "",
attacks = {
{"dizzyattack",""},
{"milddisease",""}
}
}
CreatureTemplates:addCreatureTemplate(festering_dung_mite_queen, "festering_dung_mite_queen")
|
local iokit = require("hs._asm.iokit")
local module = {}
module.bruteForceSearch = function(what, plane)
plane = plane or "IOService"
local answers = {}
local searchSpace = iokit.root():childrenInPlane(plane)
while (#searchSpace > 0) do
local item = table.remove(searchSpace, 1)
for _,v in ipairs(item:childrenInPlane(plane) or {}) do
table.insert(searchSpace, v)
end
local add = false
for _,v in pairs(item:properties() or {}) do
if type(v) == type(what) then
if type(v) == "string" then
add = v:match(what) and true or false
else
add = (v == what)
end
end
if add then
table.insert(answers, { item, item:name() })
break
end
end
end
return answers
end
return module
|
---------------------------------------------
-- Roth_UI - db
---------------------------------------------
-- Database (DB)
---------------------------------------------
--get the addon namespace
local addon, ns = ...
--object container
local db = CreateFrame("Frame")
ns.db = db
db.default = {}
db.list = {}
local wipe = wipe
local tinsert = tinsert
local tremove = tremove
local strlower = strlower
---------------------------------------------
--DEFAULTS
---------------------------------------------
--default orb setup
function db:GetOrbDefaults()
return {
--health
["HEALTH"] = {
--filling
filling = {
texture = "Interface\\AddOns\\Roth_UI\\media\\orb_filling16",
color = { r = .3, g = 0, b = 0, },
colorAuto = false, --automatic coloring based on class/powertype
},
--model
model = {
enable = true,
displayInfo = 33853,
camDistanceScale = 1.606,
pos_x = 0,
pos_y = 0.1,
rotation = 0,
portraitZoom = 0,
alpha = 0.277,
},
--galaxies
galaxies = {
alpha = 0,
},
--bubbles
bubbles = {
alpha = 1,
},
--spark
spark = {
alpha = 1,
},
--highlight
highlight = {
alpha = 1,
},
--value
value = {
hideOnEmpty = true,
hideOnFull = false,
alpha = 1,
top = {
color = { r = 1, g = 1, b = 1, },
tag = "topdef",
},
bottom = {
color = { r = 0.8, g = 0.8, b = 0.8, },
tag = "botdef",
},
},
},--health end
--power
["POWER"] = {
--filling
filling = {
texture = "Interface\\AddOns\\Roth_UI\\media\\orb_filling16",
color = { r = 0, g = .5, b = 1, },
colorAuto = true, --automatic coloring based on class/powertype
},
--model
model = {
enable = false,
displayInfo = 32368,
camDistanceScale = 0.95,
pos_x = 0,
pos_y = 0.1,
rotation = 0,
portraitZoom = 0,
alpha = 1,
},
--galaxies
galaxies = {
alpha = 1,
},
--bubbles
bubbles = {
alpha = 0.3,
},
--spark
spark = {
alpha = 1,
},
--highlight
highlight = {
alpha = 0.5,
},
--value
value = {
hideOnEmpty = true,
hideOnFull = false,
alpha = 1,
top = {
color = { r = 1, g = 1, b = 1, },
tag = "topdef",
},
bottom = {
color = { r = 0.8, g = 0.8, b = 0.8, },
tag = "botdef",
},
},
},--power end
} --default end
end
--load the default config on loadup so the rest can initialize, the view will get updated later once the saved variables are fetched
db.char = db:GetOrbDefaults()
--default template
function db:GetTemplateDefaults()
return {
["pearl"] = {
--filling
filling = {
texture = "Interface\\AddOns\\Roth_UI\\media\\orb_filling15",
color = { r = 0.8, g = 0.8, b = 1, },
colorAuto = false, --automatic coloring based on class/powertype
},
--model
model = {
enable = true,
displayInfo = 32368,
camDistanceScale = 0.95,
pos_x = 0,
pos_y = 0.1,
rotation = 0,
portraitZoom = 0,
alpha = 1,
},
--galaxies
galaxies = {
alpha = 0,
},
--bubbles
bubbles = {
alpha = 0,
},
--spark
spark = {
alpha = 0.9,
},
--highlight
highlight = {
alpha = 0.3,
},
--value
value = {
hideOnEmpty = true,
hideOnFull = false,
alpha = 1,
top = {
color = { r = 1, g = 1, b = 1, },
tag = "topdef",
},
bottom = {
color = { r = 0.8, g = 0.8, b = 0.8, },
tag = "botdef",
},
},
},
}
end
function db:GetTemplateListDefaults()
return {
{ value = "pearl", key = "pearl", notCheckable = true, keepShownOnClick = false, },
}
end
---------------------------------------------
--LOAD SAVED VARIABLES
---------------------------------------------
--db script on variables loaded
db:SetScript("OnEvent", function(self, event)
if Roth_UI_DB_GLOB and Roth_UI_DB_GLOB.reset then
Roth_UI_DB_GLOB.reset = nil
Roth_UI_DB_GLOB = db:GetTemplateDefaults()
Roth_UI_DB_GLOB.TEMPLATE_LIST = db:GetTemplateListDefaults()
end
--load global data
self.loadGlobalData()
--load character data
if not Roth_UI_DB_CHAR then
self.loadCharacterDataDefaults()
else
self.loadCharacterData()
end
self:UnregisterEvent("VARIABLES_LOADED")
end)
db:RegisterEvent("VARIABLES_LOADED")
---------------------------------------------
--DB RESET
---------------------------------------------
--full template reset
db.resetTemplates = function()
Roth_UI_DB_GLOB.reset = true
ReloadUI()
end
---------------------------------------------
--CHARACTER DATA
---------------------------------------------
--load character data defaults
db.loadCharacterDataDefaults = function(type)
local data = db:GetOrbDefaults()
if type then
if type == "HEALTH" then
Roth_UI_DB_CHAR[type] = data[type]
print(addon..": health orb reseted to default")
elseif type == "POWER" then
Roth_UI_DB_CHAR[type] = data[type]
print(addon..": power orb reseted to default")
end
else
Roth_UI_DB_CHAR = data
print(addon..": character data reset to default")
end
db.char = Roth_UI_DB_CHAR
--update the orb view
ns.panel.updateOrbView()
end
--load character data
db.loadCharacterData = function()
db.char = Roth_UI_DB_CHAR
if db.char.reload then
ns.panel:Show()
db.char.reload = false
end
--update the orb view
ns.panel.updateOrbView()
end
---------------------------------------------
--GLOBAL DATA
---------------------------------------------
--load global data defaults
db.loadGlobalDataDefaults = function()
print(addon..": global data defaults loaded")
Roth_UI_DB_GLOB = db:GetTemplateDefaults()
Roth_UI_DB_GLOB.TEMPLATE_LIST = db:GetTemplateListDefaults()
db.glob = Roth_UI_DB_GLOB
db.list.template = Roth_UI_DB_GLOB.TEMPLATE_LIST
end
--load global data
db.loadGlobalData = function()
Roth_UI_DB_GLOB = Roth_UI_DB_GLOB or db:GetTemplateDefaults()
Roth_UI_DB_GLOB.TEMPLATE_LIST = Roth_UI_DB_GLOB.TEMPLATE_LIST or db:GetTemplateListDefaults()
db.glob = Roth_UI_DB_GLOB
db.list.template = Roth_UI_DB_GLOB.TEMPLATE_LIST
end
---------------------------------------------
--TEMPLATES
---------------------------------------------
function db:CopyTable(source, target)
for key, value in pairs(source) do
if type(value) == "table" then
target[key] = {}
self:CopyTable(value, target[key])
else
target[key] = value
end
end
end
--load template func
--name: template name
--type: orb type
db.loadTemplate = function(name,type)
if not Roth_UI_DB_GLOB or not name then return end
if not Roth_UI_DB_GLOB[name] then
print(addon..": template |c003399FF"..name.."|r not found")
return
end
db:CopyTable(Roth_UI_DB_GLOB[name],Roth_UI_DB_CHAR[type])
print(addon..": template |c003399FF"..name.."|r loaded into "..strlower(type).." orb")
--update the orb view
ns.panel.updateOrbView()
end
--save template func
--name: template name
--type: orb type
db.saveTemplate = function(name,type)
if not Roth_UI_DB_GLOB or not name then return end
--adding template
if not Roth_UI_DB_GLOB[name] then
--create default entry first
local data = db:GetOrbDefaults()
Roth_UI_DB_GLOB[name] = data["HEALTH"]
end
db:CopyTable(db.char[type],Roth_UI_DB_GLOB[name])
--adding the template name to the key-value pair list
local nameFound = false
for i,v in ipairs(Roth_UI_DB_GLOB.TEMPLATE_LIST) do
if v.key == name then
nameFound = true
break
end
end
if not nameFound then
tinsert(Roth_UI_DB_GLOB.TEMPLATE_LIST, { key = name, value = name, notCheckable = true, keepShownOnClick = false, })
end
print(addon..": "..strlower(type).." orb data saved as template |c003399FF"..name.."|r")
--update the panel view
ns.panel.updatePanelView()
end
--delete template func
--name: template name
db.deleteTemplate = function(name)
if not Roth_UI_DB_GLOB or not name then return end
if not Roth_UI_DB_GLOB[name] then
print(addon..": template |c003399FF"..name.."|r not found")
return
end
--setting the template to nil
Roth_UI_DB_GLOB[name] = nil
print(addon..": template |c003399FF"..name.."|r deleted")
--removing the template name from the key-value pair list
local indexFound
for i,v in ipairs(Roth_UI_DB_GLOB.TEMPLATE_LIST) do
if v.key == name then
indexFound = i
break
end
end
if indexFound then
tremove(Roth_UI_DB_GLOB.TEMPLATE_LIST, indexFound)
end
--update the panel view
ns.panel.updatePanelView()
end
---------------------------------------------
--LIST / MODELS
---------------------------------------------
--mode list for dropdown
db.list.model = {
{
key = "orbtacular",
value = "orbtacular",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 48109, key = "purble flash orb", },
{ value = 48106, key = "blue flash orb", },
{ value = 32368, key = "pearl", },
{ value = 44652, key = "the planet", },
{ value = 47882, key = "red chocolate", },
{ value = 48254, key = "purple chocolate", },
{ value = 33853, key = "red magnet", },
{ value = 34404, key = "white magnet", },
{ value = 38699, key = "dwarf artifact", },
{ value = 20782, key = "water planet", },
{ value = 25392, key = "sahara", },
{ value = 37867, key = "cthun", },
{ value = 39108, key = "purple circus", },
{ value = 16111, key = "spore", },
{ value = 22707, key = "snow ball", },
{ value = 29308, key = "death ball", },
{ value = 25889, key = "sphere", },
{ value = 28741, key = "titan orb", },
{ value = 42486, key = "force sphere", },
{ value = 45414, key = "soulshard", },
{ value = 55036, key = "arcane orb", },
{ value = 55948, key = "purple orb", },
{ value = 56632, key = "brown chocolate", },
{ value = 60225, key = "rage orb", },
},
},
{
key = "fog",
value = "fog",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 17010, key = "red fog", },
{ value = 17054, key = "purple fog", },
{ value = 17055, key = "green fog", },
{ value = 17286, key = "yellow fog", },
{ value = 18075, key = "turquoise fog", },
{ value = 23343, key = "white fog", },
{ value = 58827, key = "orb fog", },
},
},
{
key = "portal",
value = "portal",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 23422, key = "red portal", },
{ value = 34319, key = "blue portal", },
{ value = 34645, key = "purple portal", },
{ value = 29074, key = "warlock portal", },
{ value = 40645, key = "soul harvest", },
{ value = 52396, key = "yellow portal", },
{ value = 58948, key = "blue portal 2", },
},
},
{
key = "swirly",
value = "swirly",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 27393, key = "blue rune swirly", },
{ value = 28460, key = "purple swirly", },
{ value = 29561, key = "blue swirly", },
{ value = 29286, key = "white swirly", },
{ value = 39581, key = "magic swirly", },
{ value = 23310, key = "swirly cloud", },
{ value = 55752, key = "white cloud", },
},
},
{
key = "fire",
value = "fire",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 27625, key = "green fire", },
{ value = 38327, key = "fire", },
{ value = 28639, key = "green vapor", },
{ value = 53026, key = "skull", },
},
},
{
key = "elemental",
value = "elemental",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 17065, key = "purple naaru", },
{ value = 17871, key = "white naaru", },
{ value = 1070, key = "fire elemental", },
{ value = 14252, key = "purple elemental", },
{ value = 19003, key = "white elemental", },
{ value = 15406, key = "light-green elemental", },
{ value = 17045, key = "red elemental", },
{ value = 9449, key = "green elemental", },
{ value = 4629, key = "shadow elemental", },
{ value = 22731, key = "glow elemental", },
{ value = 16635, key = "void walker", },
{ value = 16170, key = "green ghost", },
{ value = 24905, key = "fire guard", },
{ value = 31450, key = "flaming bone guard", },
{ value = 34942, key = "bound fire elemental", },
{ value = 36345, key = "bound water elemental", },
{ value = 53456, key = "wod fire elemental", },
{ value = 58534, key = "magma elemental", },
},
},
{
key = "crystal",
value = "crystal",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 17856, key = "blue crystal", },
{ value = 20900, key = "green crystal", },
{ value = 22506, key = "purple crystal", },
{ value = 26419, key = "health crystal", },
{ value = 26418, key = "power crystal", },
},
},
{
key = "aquarium",
value = "aquarium",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 4878, key = "fish", },
{ value = 7449, key = "deviat", },
},
},
{
key = "unique",
value = "unique",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 10992, key = "diablo", },
{ value = 38803, key = "murcablo", },
{ value = 5233, key = "blue angel", },
{ value = 6888, key = "alarm-o-bot", },
{ value = 11986, key = "molten giant", },
{ value = 38594, key = "magma giant", },
{ value = 28641, key = "algalon", },
{ value = 31094, key = "spectral bear", },
{ value = 28890, key = "mimiron head", },
{ value = 32913, key = "therazane", },
{ value = 38150, key = "fire kitten", },
{ value = 38187, key = "orange fire helldog", },
{ value = 38189, key = "blue fire helldog", },
{ value = 39354, key = "deathwing lava claw", },
{ value = 40924, key = "cranegod", },
{ value = 38548, key = "burning blob", },
{ value = 1824, key = "blue wisp", },
{ value = 49084, key = "robot", },
},
},
{
key = "sparkling",
value = "sparkling",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 26753, key = "spark", },
{ value = 27617, key = "yellow spark", },
{ value = 51486, key = "creme spark", },
{ value = 46920, key = "purple splash", },
{ value = 48210, key = "yellow plasma", },
{ value = 29612, key = "strobo", },
{ value = 41110, key = "strobo2", },
{ value = 44465, key = "strobo3", },
{ value = 30792, key = "hammer of wrath", },
{ value = 47891, key = "aqua spark", },
{ value = 57891, key = "orb spark", },
{ value = 60361, key = "yellow orb spark", },
},
},
{
key = "spirit",
value = "spirit",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 2421, key = "killrock eye", },
{ value = 46174, key = "darkmoon eye", },
{ value = 21485, key = "blue soul", },
{ value = 30150, key = "red soul", },
{ value = 39740, key = "red spirit", },
{ value = 39738, key = "blue spirit", },
{ value = 28089, key = "ghost skull", },
{ value = 51370, key = "red snake spirit", },
},
},
{
key = "environment",
value = "environment",
hasArrow = true,
notCheckable = true,
menuList = {
{ value = 35741, key = "fire flower", },
{ value = 36405, key = "oasis flower", },
{ value = 42785, key = "icethorn flower", },
{ value = 39014, key = "purple mushroom", },
{ value = 36901, key = "purple lantern", },
{ value = 36902, key = "turquoise lantern", },
{ value = 31905, key = "purple egg", },
{ value = 34010, key = "orange egg", },
{ value = 26506, key = "bubble torch", },
{ value = 41853, key = "onyx statue", },
{ value = 51406, key = "melting pot", },
{ value = 53769, key = "white flower", },
},
},
}
db.getListModel = function() return db.list.model end
---------------------------------------------
--LIST / FILLING TEXTURES
---------------------------------------------
--filling texture list for dropdown
db.list.filling_texture = {
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling1", key = "moon", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling2", key = "earth", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling3", key = "mars", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling4", key = "galaxy", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling5", key = "jupiter", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling6", key = "fraktal circle", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling7", key = "sun", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling8", key = "icecream", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling9", key = "marble", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling10", key = "gradient", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling11", key = "bubbles", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling12", key = "woodpepples", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling13", key = "golf", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling14", key = "darkstar", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling15", key = "diablo3", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling16", key = "fubble", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling17", key = "silver", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling18", key = "exile", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling19", key = "dominion", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling20", key = "runes", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_filling21", key = "sigil orb", },
{ value = "Interface\\AddOns\\Roth_UI\\media\\orb_transparent", key = "transparent", },
}
db.getListFillingTexture = function() return db.list.filling_texture end
---------------------------------------------
--LIST / TEMPLATEs
---------------------------------------------
db.list.template = {} --reference for later
db.getListTemplate = function() return db.list.template end
---------------------------------------------
--LIST / HEALTH TAGs
---------------------------------------------
--health tag list for dropdown
db.list.tag = {
{ value = "topdef", key = "Top default", },
{ value = "botdef", key = "Bottom default", },
{ value = "per", key = "Percentage", },
{ value = "perp", key = "Percentage + %", },
{ value = "cur", key = "Current value", },
{ value = "curs", key = "Current value short", },
{ value = "max", key = "Maximum value", },
{ value = "maxs", key = "Maximum value short", },
{ value = "cmax", key = "Current/Maximum value", },
{ value = "cmaxs", key = "Current/Maximum value short", },
{ value = "null", key = "Nothing", },
}
db.getListTag = function() return db.list.tag end
|
local cfg = require("modules/config") -- Configuration
local sha = require("modules/ext_mods/sha2") -- sha2
local args = ...
local sessionName = args[2]
if sessionName == nil then print("[!] Session Name Empty!") return nil end
if sessionName == "default" then print("[!] Cannot overwrite default configuration!") return nil end
if cfg.overwriteConfiguration(sessionName) ~= nil then
print("Session overwritten with current session info.")
else
print("Something went wrong during the process of overwriting.")
end
|
return {
element = {
death = {
elona = {
fire = {
active = "燃やし尽くした。",
passive = function(_1)
return ("%sは燃え尽きて灰になった。")
:format(name(_1))
end
},
cold = {
active = "氷の塊に変えた。",
passive = function(_1)
return ("%sは氷の彫像になった。")
:format(name(_1))
end
},
lightning = {
active = "焦げカスにした。",
passive = function(_1)
return ("%sは雷に打たれ死んだ。")
:format(name(_1))
end
},
darkness = {
active = "闇に飲み込んだ。",
passive = function(_1)
return ("%sは闇に蝕まれて死んだ。")
:format(name(_1))
end
},
mind = {
active = "再起不能にした。",
passive = function(_1)
return ("%sは発狂して死んだ。")
:format(name(_1))
end
},
poison = {
active = "毒殺した。",
passive = function(_1)
return ("%sは毒に蝕まれて死んだ。")
:format(name(_1))
end
},
nether = {
active = "冥界に墜とした。",
passive = function(_1)
return ("%sは冥界に墜ちた。")
:format(name(_1))
end
},
sound = {
active = "聴覚を破壊し殺した。",
passive = function(_1)
return ("%sは朦朧となって死んだ。")
:format(name(_1))
end
},
nerve = {
active = "神経を破壊した。",
passive = function(_1)
return ("%sは神経を蝕まれて死んだ。")
:format(name(_1))
end
},
chaos = {
active = "混沌の渦に吸い込んだ。",
passive = function(_1)
return ("%sは混沌の渦に吸収された。")
:format(name(_1))
end
},
cut = {
active = "千切りにした。",
passive = function(_1)
return ("%sは千切りになった。")
:format(name(_1))
end
},
acid = {
active = "ドロドロに溶かした。",
passive = function(_1)
return ("%sは酸に焼かれ溶けた。")
:format(name(_1))
end
},
default = {
active = "殺した。",
passive = function(_1)
return ("%sは死んだ。")
:format(name(_1))
end
}
}
},
damage = {
elona = {
fire = function(_1)
return ("%sは燃え上がった。")
:format(name(_1))
end,
cold = function(_1)
return ("%sは凍えた。")
:format(name(_1))
end,
lightning = function(_1)
return ("%sに電流が走った。")
:format(name(_1))
end,
darkness = function(_1)
return ("%sは闇の力で傷ついた。")
:format(name(_1))
end,
mind = function(_1)
return ("%sは狂気に襲われた。")
:format(name(_1))
end,
poison = function(_1)
return ("%sは吐き気を催した。")
:format(name(_1))
end,
nether = function(_1)
return ("%sは冥界の冷気で傷ついた。")
:format(name(_1))
end,
sound = function(_1)
return ("%sは轟音の衝撃を受けた。")
:format(name(_1))
end,
nerve = function(_1)
return ("%sの神経は傷ついた。")
:format(name(_1))
end,
chaos = function(_1)
return ("%sは混沌の渦で傷ついた。")
:format(name(_1))
end,
cut = function(_1)
return ("%sは切り傷を負った。")
:format(name(_1))
end,
acid = function(_1)
return ("%sは酸に焼かれた。")
:format(name(_1))
end,
default = "は傷ついた。"
},
name = {
elona = {
fire = "燃える",
cold = "冷たい",
lightning = "放電する",
darkness = "暗黒の",
mind = "霊的な",
poison = "毒の",
nether = "地獄の",
sound = "震える",
nerve = "痺れる",
chaos = "混沌の",
cut = "出血の",
ether = "エーテルの",
fearful = "恐ろしい",
rotten = "腐った",
silky = "柔らかい",
starving = "飢えた"
},
},
},
resist = {
gain = {
elona = {
fire = function(_1)
return ("%sの身体は急に火照りだした。")
:format(name(_1))
end,
cold = function(_1)
return ("%sの身体は急に冷たくなった。")
:format(name(_1))
end,
lightning = function(_1)
return ("%sの身体に電気が走った。")
:format(name(_1))
end,
darkness = function(_1)
return ("%sは急に暗闇が怖くなくなった。")
:format(name(_1))
end,
mind = function(_1)
return ("%sは急に明晰になった。")
:format(name(_1))
end,
poison = function(_1)
return ("%sの毒への耐性は強くなった。")
:format(name(_1))
end,
nether = function(_1)
return ("%sの魂は地獄に近づいた。")
:format(name(_1))
end,
sound = function(_1)
return ("%sは騒音を気にしなくなった。")
:format(name(_1))
end,
nerve = function(_1)
return ("%sは急に神経が図太くなった。")
:format(name(_1))
end,
chaos = function(_1)
return ("%sは騒音を気にしなくなった。")
:format(name(_1))
end,
magic = function(_1)
return ("%sの皮膚は魔力のオーラに包まれた。")
:format(name(_1))
end
}
},
lose = {
elona = {
fire = function(_1)
return ("%sは急に汗をかきだした。")
:format(name(_1))
end,
cold = function(_1)
return ("%sは急に寒気を感じた。")
:format(name(_1))
end,
lightning = function(_1)
return ("%sは急に電気に敏感になった。")
:format(name(_1))
end,
darkness = function(_1)
return ("%sは急に暗闇が怖くなった。")
:format(name(_1))
end,
mind = function(_1)
return ("%sは以前ほど明晰ではなくなった。")
:format(name(_1))
end,
poison = function(_1)
return ("%sの毒への耐性は薄れた。")
:format(name(_1))
end,
nether = function(_1)
return ("%sの魂は地獄から遠ざかった。")
:format(name(_1))
end,
sound = function(_1)
return ("%sは急に辺りをうるさく感じた。")
:format(name(_1))
end,
nerve = function(_1)
return ("%sの神経は急に萎縮した。")
:format(name(_1))
end,
chaos = function(_1)
return ("%sはカオスへの理解を失った。")
:format(name(_1))
end,
magic = function(_1)
return ("%sの皮膚から魔力のオーラが消えた。")
:format(name(_1))
end
}
}
}
}
}
|
-- ChapterEndScene.lua
-- Created by sddz_yuxiaohua@corp.netease.com
-- on 14-03-22
local gotoplayground = require("app.views.GoToPlayground")
local commonComponent = import("..views.common");
package.path = package.path .. ";?.lua"
local ChapterEndScene = class("ChapterEndScene", function()
return display.newScene("ChapterEndScene")
end)
function ChapterEndScene:ctor()
self.currentChapterID = app.currentChapterID
self.currentChapterIndex = 4
local m_bIsStudy = true
-- 继续、结束按钮的位置
positiontable = {
{x = display.cx - 172, y = 200, duration = 24},
{x = display.cx - 212, y = 240, duration = 16},
{x = display.cx, y = display.cy + 220, duration = 16},
{x = display.cx - 212, y = 260, duration = 13},
}
-- 资源路径
AssetsPath = string.format("ChapterMaterial/Ch_%d_%d/", self.currentChapterID, self.currentChapterIndex) .. "%s"
SoundPath = string.format(AssetsPath, "Sound/Story.MP3")
-- 自定义图层
self.layer = display.newLayer()
-- 背景图片
display.newSprite(string.format(AssetsPath, "Background.jpg"), display.cx, display.cy):addTo(self.layer)
-- 返回按钮
local button_return = ui.newImageMenuItem({
image = "ChapterMaterial/Universal/Button_Return.png",
x = display.left + 44,
y = display.top - 37,
listener = function(tag)
if m_bIsStudy then
gotoplayground:new():addTo(self.layer)
return
end
app:playStartScene()
end
})
-- 复读按钮
local button_rewind = ui.newImageMenuItem({
image = "ChapterMaterial/Universal/Button_Rewind.png",
x = display.right - 44,
y = display.top - 37,
listener = function(tag)
self:rewindStoryAudio()
end
})
-- 继续按钮
self.button_continue = ui.newImageMenuItem({
image = "ChapterMaterial/Universal/Button_Continue.png",
x = positiontable[self.currentChapterID]["x"],
y = positiontable[self.currentChapterID]["y"],
listener = function(tag)
if m_bIsStudy then
gotoplayground:new():addTo(self.layer)
return
end
app:playStartScene()
end
})
self.button_continue:setScale(0)
-- 结束按钮
self.button_over = ui.newImageMenuItem({
image = "ChapterMaterial/Universal/Button_Over.png",
x = positiontable[self.currentChapterID]["x"],
y = positiontable[self.currentChapterID]["y"],
listener = function(tag)
app:playStartScene()
end
})
self.button_over:setScale(0)
-- 是否显示结束按钮
local buttontable = self.currentChapterID == 4 and {button_return, button_rewind, self.button_over} or {button_return, button_rewind, self.button_continue}
-- UI图层
self.menu = ui.newMenu(buttontable)
self.menu:addTo(self.layer)
-- 自定义图层添加到根视图
self:addChild(self.layer)
end
-- 复读按钮事件
function ChapterEndScene:rewindStoryAudio()
if audio.isMusicPlaying() then return end
self.BackgroundMusic = audio.playMusic(SoundPath, false);
end
function ChapterEndScene:onEnter()
-- 延时1秒播放故事
self:performWithDelay(function()
self.BackgroundMusic = audio.playMusic(SoundPath, false);
end, 1)
-- 故事播放完毕后显示继续/结束按钮
self:performWithDelay(function()
if self.currentChapterID == 4 then
self.button_over:setScale(1)
else
self.button_continue:setScale(1)
end
end, positiontable[self.currentChapterID]["duration"])
end
function ChapterEndScene:onExit()
-- 退出场景时,停止播放故事语音并释放内存
audio.stopMusic(true)
end
return ChapterEndScene
|
--[[----------------------------------------------------------------------------
Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
------------------------------------------------------------------------------]]
local BatchProviderROI_StaticImg, parent = torch.class('fbcoco.BatchProviderROI_StaticImg', 'fbcoco.BatchProviderBase_StaticImg')
local utils = paths.dofile'utils.lua'
local tablex = require'pl.tablex'
function BatchProviderROI_StaticImg:__init(dataset, transformer, fg_threshold, bg_threshold, opt)
assert(transformer,'must provide transformer!')
self.dataset = dataset
self.batch_size = 128
self.fg_fraction = 0.25
self.fg_threshold = fg_threshold
self.bg_threshold = bg_threshold
self.imgs_per_batch = opt.images_per_batch
self.scale = opt.scale
self.max_size = opt.max_size
self.image_transformer = transformer
self.scale_jitter = opt.scale_jitter or 0 -- uniformly jitter the scale by this frac
self.aspect_jitter = opt.aspect_jitter or 0 -- uniformly jitter the scale by this frac
self.crop_likelihood = opt.crop_likelihood or 0 -- likelihood of doing a random crop (in each dimension, independently)
self.crop_attempts = 10 -- number of attempts to try to find a valid crop
self.crop_min_frac = 0.7 -- a crop must preserve at least this fraction of the iamge
if opt.brightness_var and opt.contrast_var and opt.saturation_var and opt.lighting_var then
self.color_jitter = fbcoco.ColorTransformer(opt.brightness_var,
opt.contrast_var, opt.saturation_var, opt.lighting_var)
else
self.color_jitter = nil
end
end
-- Prepare foreground / background rois for one image
-- there is a check if self.bboxes has a table prepared for this image already
-- because we prepare the rois during training to save time on loading
function BatchProviderROI_StaticImg:setupOne(i)
local rec = self.dataset:attachProposals(i)
local bf = rec.overlap:ge(self.fg_threshold):nonzero()
local bg = rec.overlap:ge(self.bg_threshold[1]):cmul(
rec.overlap:lt(self.bg_threshold[2])):nonzero()
return {
[0] = self.takeSubset(rec, bg, i, true),
[1] = self.takeSubset(rec, bf, i, false)
}
end
-- Calculate rois and supporting data for the first 1000 images
-- to compute mean/var for bbox regresion
function BatchProviderROI_StaticImg:setupData()
local regression_values = {}
local subset_size = math.min(self.dataset:size(), 1000)
for i = 1, subset_size do
local v = self:setupOne(i)[1]
if v then
table.insert(regression_values, utils.convertTo(v.rois, v.gtboxes))
end
end
regression_values = torch.FloatTensor():cat(regression_values,1)
self.bbox_regr = {
mean = regression_values:mean(1),
std = regression_values:std(1)
}
return self.bbox_regr
end
-- sample until find a valid combination of bg/fg boxes
function BatchProviderROI_StaticImg:permuteIdx()
local boxes, img_idx = {}, {}
for i=1,self.imgs_per_batch do
local curr_idx
local bboxes = {}
while not bboxes[0] or not bboxes[1] do
curr_idx = torch.random(self.dataset:size())
tablex.update(bboxes, self:setupOne(curr_idx))
end
table.insert(boxes, bboxes)
table.insert(img_idx, curr_idx)
end
local do_flip = torch.FloatTensor(self.imgs_per_batch):random(0,1)
return torch.IntTensor(img_idx), boxes, do_flip
end
function BatchProviderROI_StaticImg:selectBBoxes(boxes, im_scales, im_sizes, do_flip)
local rois = {}
local labels = {}
local gtboxes = {}
for im,v in ipairs(boxes) do
local flip = do_flip[im] == 1
local bg = self.selectBBoxesOne(v[0],self.bg_num_each,im_scales[im],im_sizes[im],flip)
local fg = self.selectBBoxesOne(v[1],self.fg_num_each,im_scales[im],im_sizes[im],flip)
local imrois = torch.FloatTensor():cat(bg.rois, fg.rois, 1)
imrois = torch.FloatTensor(imrois:size(1),1):fill(im):cat(imrois, 2)
local imgtboxes = torch.FloatTensor():cat(bg.gtboxes, fg.gtboxes, 1)
local imlabels = torch.IntTensor():cat(bg.labels, fg.labels, 1)
table.insert(rois, imrois)
table.insert(gtboxes, imgtboxes)
table.insert(labels, imlabels)
end
gtboxes = torch.FloatTensor():cat(gtboxes,1)
rois = torch.FloatTensor():cat(rois,1)
labels = torch.IntTensor():cat(labels,1)
return rois, labels, gtboxes
end
function BatchProviderROI_StaticImg:sample()
collectgarbage()
self.fg_num_each = self.fg_fraction * self.batch_size
self.bg_num_each = self.batch_size - self.fg_num_each
local img_idx, boxes, do_flip = self:permuteIdx()
local images, im_scales, im_sizes = self:getImages(img_idx, do_flip)
local rois, labels, gtboxes = self:selectBBoxes(boxes, im_scales, im_sizes, do_flip)
local bboxregr_vals = torch.FloatTensor(rois:size(1), 4*(self.dataset:getNumClasses() + 1)):zero()
for i,label in ipairs(labels:totable()) do
if label > 1 then
local out = bboxregr_vals[i]:narrow(1,(label-1)*4 + 1,4)
utils.convertTo(out, rois[i]:narrow(1,2,4), gtboxes[i])
out:add(-1,self.bbox_regr.mean):cdiv(self.bbox_regr.std)
end
end
-- DIAGONOZE DISPLAY
local DEBUG = false
if DEBUG then
self.cat_name_to_id = {}
self.cat_id_to_name = {}
local category_list = {'airplane', 'antelope', 'bear', 'bicycle', 'bird', 'bus', 'car', 'cattle',
'dog', 'domestic_cat', 'elephant', 'fox', 'giant_panda', 'hamster', 'horse', 'lion',
'lizard', 'monkey', 'motorcycle', 'rabbit', 'red_panda', 'sheep', 'snake', 'squirrel',
'tiger', 'train', 'turtle', 'watercraft', 'whale', 'zebra'
}
self.class_num = #category_list
for cat_id, cat_name in ipairs(category_list) do
self.cat_name_to_id[cat_name] = cat_id + 1 -- +1 because we leave 1 to background class
self.cat_id_to_name[cat_id + 1] = cat_name
end
local qtwidget = require 'qtwidget'
local win = qtwidget.newwindow(images:size(4), images:size(3))
local reg_win = qtwidget.newwindow(images:size(4), images:size(3))
for debug_idx = 1, rois:size(1) do
local debug_label = labels[debug_idx]
--if debug_label > 1 then
if true then
local debug_img_idx = rois[debug_idx][1]
-- raw box
local out = rois[{debug_idx, {2, 5}}]:clone()
local x1 = out[1]
local y1 = out[2]
local x2 = out[3]
local y2 = out[4]
image.display({image = images[{debug_img_idx, {}, {}, {}}], win = win})
win:fill()
win:rectangle(x1, y1, x2-x1+1, y2-y1+1)
win:stroke()
-- reg box
local reg_out = bboxregr_vals[debug_idx]:narrow(1,(debug_label-1)*4 + 1,4):clone()
reg_out:cmul(self.bbox_regr.std):add(1,self.bbox_regr.mean)
local raw_box = rois[{debug_idx, {2, 5}}]
utils.convertFrom(reg_out, raw_box, reg_out)
local x1 = reg_out[1]
local y1 = reg_out[2]
local x2 = reg_out[3]
local y2 = reg_out[4]
image.display({image = images[{debug_img_idx, {}, {}, {}}], win = reg_win})
reg_win:fill()
reg_win:rectangle(x1, y1, x2-x1+1, y2-y1+1)
reg_win:stroke()
print(string.format('cat:%s', self.cat_id_to_name[debug_label]))
print('-----')
end
end
end
local batches = {images, rois}
local targets = {labels, {labels, bboxregr_vals}, g_donkey_idx}
return batches, targets
end
|
---
--- UI界面的统一注册
---
local GUICollections = {
[ECEnumType.UIEnum.Login] = require("Modules.Login.Views.UILogin"),
[ECEnumType.UIEnum.Loading] = require("Modules.Common.Views.UILoading"),
[ECEnumType.UIEnum.DebugPanel] = require("Modules.Common.Views.UIDebugPanel"),
[ECEnumType.UIEnum.WorldDialog] = require("Modules.World.UIWorldDialog"),
[ECEnumType.UIEnum.UIModel] = require("Modules.Test.Views.UIModelPanel"),
}
return GUICollections
|
--Dx Functions
local dxDrawImage = dxDrawImageExt
local dxDrawText = dxDrawText
local dxDrawRectangle = dxDrawRectangle
local dxSetShaderValue = dxSetShaderValue
local dxSetRenderTarget = dxSetRenderTarget
local dxSetBlendMode = dxSetBlendMode
local _dxDrawImage = _dxDrawImage
--DGS Functions
local dgsSetType = dgsSetType
local dgsGetType = dgsGetType
local dgsSetParent = dgsSetParent
local dgsSetData = dgsSetData
local dgsAttachToTranslation = dgsAttachToTranslation
local dgsAttachToAutoDestroy = dgsAttachToAutoDestroy
local calculateGuiPositionSize = calculateGuiPositionSize
local dgsCreateTextureFromStyle = dgsCreateTextureFromStyle
--Utilities
local triggerEvent = triggerEvent
local addEventHandler = addEventHandler
local createElement = createElement
local lerp = math.lerp
local mathFloor = math.floor
local mathMin = math.min
local mathMax = math.max
local tableInsert = table.insert
local tableRemove = table.remove
local assert = assert
local type = type
local tonumber = tonumber
local tostring = tostring
local tocolor = tocolor
--[[
Item List Struct:
table = {
index: -3 -2 -1 0 1
ItemData textColor BackGround Image BackGround Color Text
{ dataTable, color, {def,hov,sel}, {def,hov,sel}, text },
{ dataTable, color, {def,hov,sel}, {def,hov,sel}, text },
{ dataTable, color, {def,hov,sel}, {def,hov,sel}, text },
{ ... },
}
]]
function dgsCreateComboBox(x,y,sx,sy,caption,relative,parent,itemheight,textColor,scalex,scaley,defimg,hovimg,cliimg,defcolor,hovcolor,clicolor)
local xCheck,yCheck,wCheck,hCheck = type (x) == "number",type(y) == "number",type(sx) == "number",type(sy) == "number"
if not xCheck then assert(false,"Bad argument @dgsCreateComboBox at argument 1, expect number got "..type(x)) end
if not yCheck then assert(false,"Bad argument @dgsCreateComboBox at argument 2, expect number got "..type(y)) end
if not wCheck then assert(false,"Bad argument @dgsCreateComboBox at argument 3, expect number got "..type(sx)) end
if not hCheck then assert(false,"Bad argument @dgsCreateComboBox at argument 4, expect number got "..type(sy)) end
local combobox = createElement("dgs-dxcombobox")
dgsSetType(combobox,"dgs-dxcombobox")
dgsSetParent(combobox,parent,true,true)
local style = styleSettings.combobox
local defcolor = defcolor or style.color[1]
local hovcolor = hovcolor or style.color[2]
local clicolor = clicolor or style.color[3]
local defimg = defimg or dgsCreateTextureFromStyle(style.image[1])
local hovimg = hovimg or dgsCreateTextureFromStyle(style.image[2])
local cliimg = cliimg or dgsCreateTextureFromStyle(style.image[3])
local idefcolor = style.itemColor[1]
local ihovcolor = style.itemColor[2]
local iclicolor = style.itemColor[3]
local idefimg = dgsCreateTextureFromStyle(style.itemImage[1])
local ihovimg = dgsCreateTextureFromStyle(style.itemImage[2])
local icliimage = dgsCreateTextureFromStyle(style.itemImage[3])
local textScaleX,textScaleY = tonumber(scalex),tonumber(scaley)
local scbThick = style.scrollBarThick
dgsElementData[combobox] = {
renderBuffer = {},
color = {defcolor,hovcolor,clicolor},
image = {defimg,hovimg,cliimg},
itemColor = {idefcolor,ihovcolor,iclicolor},
itemImage = {idefimg,ihovimg,icliimage},
textColor = textColor or style.textColor,
itemTextColor = textColor or style.itemTextColor,
textSize = {textScaleX or style.textSize[1],textScaleY or style.textSize[2]},
itemTextSize = {textScaleX or style.itemTextSize[1],textScaleY or style.itemTextSize[2]},
shadow = false,
font = style.font or systemFont,
bgColor = style.bgColor,
bgImage = dgsCreateTextureFromStyle(style.bgImage),
buttonLen = {1,true}, --1,isRelative
textBox = true,
select = -1,
clip = false,
wordbreak = false,
itemHeight = itemheight or style.itemHeight,
viewCount = false,
colorcoded = false,
listState = -1,
listStateAnim = -1,
autoHideAfterSelected = style.autoHideAfterSelected,
itemTextPadding = style.itemTextPadding,
textPadding = style.textPadding,
arrow = dgsCreateTextureFromStyle(style.arrow),
arrowColor = style.arrowColor,
arrowSettings = style.arrowSettings or {0.3,0.15,0.04},
arrowOutSideColor = style.arrowOutSideColor,
scrollBarThick = scbThick,
itemData = {},
alignment = {"left","center"},
itemAlignment = {"left","center"},
FromTo = {0,0},
moveHardness = {0.1,0.9},
itemMoveOffset = 0,
itemMoveOffsetTemp = 0,
scrollSize = 20, --60px pixels
scrollFloor = true,
captionEdit = false,
configNextFrame = false,
}
dgsAttachToTranslation(combobox,resourceTranslation[sourceResource or resource])
if type(caption) == "table" then
dgsElementData[combobox]._translationText = caption
dgsSetData(combobox,"caption",caption)
else
dgsSetData(combobox,"caption",tostring(caption))
end
calculateGuiPositionSize(combobox,x,y,relative or false,sx,sy,relative or false,true)
local box = dgsComboBoxCreateBox(0,1,1,3,true,combobox)
dgsElementData[combobox].myBox = box
dgsElementData[box].myCombo = combobox
local boxsiz = dgsElementData[box].absSize
local renderTarget,err = dxCreateRenderTarget(boxsiz[1],boxsiz[2],true,combobox)
if renderTarget ~= false then
dgsAttachToAutoDestroy(renderTarget,combobox,-1)
else
outputDebugString(err)
end
dgsElementData[combobox].renderTarget = renderTarget
local scrollbar = dgsCreateScrollBar(boxsiz[1]-scbThick,0,scbThick,boxsiz[2],false,false,box)
dgsSetData(scrollbar,"length",{0,true})
dgsSetData(scrollbar,"multiplier",{1,true})
dgsSetData(scrollbar,"myCombo",combobox)
dgsSetData(scrollbar,"minLength",10)
dgsSetVisible(scrollbar,false)
dgsSetVisible(box,false)
addEventHandler("onDgsElementScroll",scrollbar,checkCBScrollBar,false)
dgsElementData[combobox].scrollbar = scrollbar
addEventHandler("onDgsBlur",box,function(nextFocused)
local combobox = dgsElementData[source].myCombo
local scb = dgsElementData[combobox].scrollbar
if nextFocused ~= combobox and nextFocused ~= scb then
dgsComboBoxSetState(combobox,false)
end
end,false)
addEventHandler("onDgsBlur",scrollbar,function(nextFocused)
local combobox = dgsElementData[source].myCombo
local box = dgsElementData[combobox].myBox
if nextFocused ~= combobox and nextFocused ~= box then
dgsComboBoxSetState(combobox,false)
end
end,false)
addEventHandler("onDgsSizeChange",combobox,function()
local box = dgsElementData[combobox].myBox
if not dgsElementData[box].relative[2] then
local size = dgsElementData[source].absSize
local bsize = dgsElementData[box].absSize
dgsSetSize(box,size[1],bsize[2],false)
end
end,false)
addEventHandler("onDgsSizeChange",box,function()
local combobox = dgsElementData[source].myCombo
dgsSetData(combobox,"configNextFrame",true)
end,false)
triggerEvent("onDgsCreate",combobox,sourceResource)
dgsSetData(combobox,"hitoutofparent",true)
return combobox
end
function dgsComboBoxSetCaptionText(combobox,caption)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetDefaultText at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
return dgsSetData(combobox,"caption",caption)
end
function dgsComboBoxGetText(combobox)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetText at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
local captionEdit = dgsElementData[combobox].captionEdit
local selection = dgsElementData[combobox].select
local itemData = dgsElementData[combobox].itemData
local text = itemData[selection] and itemData[selection][1]
if captionEdit then
text = text or dgsGetText(captionEdit)
else
text = text or dgsElementData[combobox].caption
end
return text or false
end
function dgsComboBoxGetCaptionText(combobox)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetDefaultText at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
return dgsElementData[combobox].caption
end
function dgsComboBoxSetEditEnabled(combobox,enabled)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetEditEnabled at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
local captionEdit = dgsElementData[combobox].captionEdit
if enabled then
if not isElement(captionEdit) then
local size = dgsElementData[combobox].absSize
local w,h = size[1],size[2]
local buttonLen_t = dgsElementData[combobox].buttonLen
local buttonLen = 0
if dgsElementData[combobox].textBox then
buttonLen = w - (buttonLen_t[2] and buttonLen_t[1]*h or buttonLen_t[1])
end
local edit = dgsCreateEdit(0,0,buttonLen,h,dgsElementData[combobox].caption,false,combobox)
dgsSetData(edit,"bgColor",0)
dgsSetData(combobox,"captionEdit",edit)
dgsSetData(edit,"padding",dgsElementData[combobox].textPadding)
if not dgsElementData[combobox].textBox then
dgsSetVisible(edit,false)
end
end
elseif isElement(captionEdit) then
destroyElement(captionEdit)
dgsSetData(combobox,"captionEdit",false)
end
end
function dgsComboBoxGetEditEnabled(combobox)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetEditEnabled at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
return isElement(dgsElementData[combobox].captionEdit) and true or false
end
function dgsComboBoxSetBoxHeight(combobox,height,relative)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetBoxHeight at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(type(height) == "number","Bad argument @dgsComboBoxSetBoxHeight at argument 2, expect number got "..type(height))
relative = relative and true or false
local box = dgsElementData[combobox].myBox
dgsSetData(combobox,"configNextFrame",true)
if isElement(box) then
local size = relative and dgsElementData[box].rltSize or dgsElementData[box].absSize
return dgsSetSize(box,size[1],height,relative)
end
return false
end
function dgsComboBoxGetBoxHeight(combobox,relative)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetBoxHeight at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
relative = relative and true or false
local box = dgsElementData[combobox].myBox
if isElement(box) then
local size = relative and dgsElementData[box].rltSize or dgsElementData[box].absSize
return size[2]
end
return false
end
function dgsComboBoxAddItem(combobox,text)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxAddItem at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
local data = dgsElementData[combobox].itemData
local id = #data+1
local _text
if type(text) == "table" then
_text = text
text = dgsTranslate(combobox,text,sourceResource)
end
local tab = {
[-6] = nil, --built-in image {[1]=image,[2]=color,[3]=offsetX,[4]=offsetY,[5]=width,[6]=height,[7]=relative}
[-5] = dgsElementData[combobox].colorcoded, --use color code
[-4] = dgsElementData[combobox].font, --font
[-3] = dgsElementData[combobox].itemTextSize, --text size of item
[-2] = dgsElementData[combobox].itemTextColor, --text color of item
[-1] = dgsElementData[combobox].itemImage, --background image of item
[0] = dgsElementData[combobox].itemColor, --background color of item
tostring(text),
_translationText = _text
}
tableInsert(data,id,tab)
dgsSetData(combobox,"configNextFrame",true)
return id
end
function dgsComboBoxSetItemText(combobox,item,text)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetItemText at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(type(item) == "number","Bad argument @dgsComboBoxSetItemText at argument 2, expect number got "..type(item))
local data = dgsElementData[combobox].itemData
item = mathFloor(item)
if item >= 1 and item <= #data then
if type(text) == "table" then
data[item]._translationText = text
text = dgsTranslate(combobox,text,sourceResource)
else
data[item]._translationText = nil
end
data[item][1] = tostring(text)
return true
end
return false
end
function dgsComboBoxGetItemText(combobox,item)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetItemText at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(tonumber(item),"Bad argument @dgsComboBoxGetItemText at argument 2, expect number got "..type(item))
local data = dgsElementData[combobox].itemData
local item = tonumber(item)
local item = mathFloor(item)
if item >= 1 and item <= #data then
return data[item][1]
end
return false
end
function dgsComboBoxSetItemData(combobox,item,data,...)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetItemData at argument 1, expect dgs-dxgridlist got "..dgsGetType(combobox))
assert(type(item) == "number","Bad argument @dgsComboBoxSetItemData at argument 2, expect number got "..dgsGetType(item))
local itemData = dgsElementData[combobox].itemData
if item > 0 and item <= #itemData then
if select("#",...) == 0 then
itemData[item][-1] = data
return true
else
itemData[item][-2] = itemData[item][-2] or {}
itemData[item][-2][data] = ...
end
end
return false
end
function dgsComboBoxGetItemData(combobox,item,key)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsGridListGetItemData at argument 1, expect dgs-dxgridlist got "..dgsGetType(combobox))
assert(type(key) == "number","Bad argument @dgsGridListGetItemData at argument 2, expect number got "..dgsGetType(key))
local itemData = dgsElementData[combobox].itemData
if item > 0 and item <= #itemData then
if not key then
return itemData[item][-1]
else
return (itemData[item][-2] or {})[key] or false
end
end
return false
end
function dgsComboBoxGetItemCount(combobox)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetItemCount at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
return #dgsElementData[combobox].itemData
end
function dgsComboBoxSetItemColor(combobox,item,color)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetItemColor at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(type(item) == "number","Bad argument @dgsComboBoxSetItemColor at argument 2, expect number got "..type(item))
assert(type(color) == "number" or type(color) == "number","Bad argument @dgsComboBoxSetItemColor at argument 3, expect number/string got "..type(color))
local data = dgsElementData[combobox].itemData
item = mathFloor(item)
if item >= 1 and item <= #data then
data[item][-2] = color
return true
end
return false
end
function dgsComboBoxGetItemColor(combobox,item)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetItemColor at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(type(item) == "number","@dgsComboBoxGetItemColor argument 2,expect number got "..type(item))
local data = dgsElementData[combobox].itemData
item = mathFloor(item)
if item >= 1 and item <= #data then
return data[item][-2]
end
return false
end
function dgsComboBoxSetItemFont(combobox,item,font)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetItemFont at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(type(item) == "number","Bad argument @dgsComboBoxSetItemFont at argument 2, expect number got "..type(item))
assert(fontBuiltIn[font] or dgsGetType(font) == "dx-font","Bad argument @dgsComboBoxSetItemFont at argument 3, invaild font (Type:"..dgsGetType(font)..",Value:"..tostring(font)..")")
local data = dgsElementData[combobox].itemData
item = mathFloor(item)
if item >= 1 and item <= #data then
data[item][-4] = font
return true
end
return false
end
function dgsComboBoxGetItemFont(combobox,item)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetItemFont at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(type(item) == "number","@dgsComboBoxGetItemFont argument 2,expect number got "..type(item))
local data = dgsElementData[combobox].itemData
item = mathFloor(item)
if item >= 1 and item <= #data then
return data[item][-4]
end
return false
end
function dgsComboBoxSetItemImage(combobox,item,image,color,offx,offy,w,h,relative)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetItemImage at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(type(item) == "number","Bad argument @dgsComboBoxSetItemImage at argument 2, expect number got "..type(item))
local data = dgsElementData[combobox].itemData
item = mathFloor(item)
if item >= 1 and item <= #data then
local imageData = data[item][-6] or {}
imageData[1] = image or imageData[1]
imageData[2] = color or imageData[2] or white
imageData[3] = offx or imageData[3] or 0
imageData[4] = offy or imageData[4] or 0
imageData[5] = w or imageData[5] or relative and 1 or dgsGetSize(combobox)
imageData[6] = h or imageData[6] or relative and 1 or dgsElementData[combobox].itemHeight
imageData[7] = relative or false
data[item][-6] = imageData
return true
end
return false
end
function dgsComboBoxGetItemImage(combobox,item)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetItemImage at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(type(item) == "number","Bad argument @dgsComboBoxGetItemImage at argument 2, expect number got "..type(item))
local data = dgsElementData[combobox].itemData
item = mathFloor(item)
if item >= 1 and item <= #data then
return unpack(data[item][-6] or {})
end
return false
end
function dgsComboBoxRemoveItemImage(combobox,item)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxRemoveItemImage at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(type(item) == "number","Bad argument @dgsComboBoxRemoveItemImage at argument 2, expect number got "..type(item))
local data = dgsElementData[combobox].itemData
item = mathFloor(item)
if item >= 1 and item <= #data and data[item][-6] then
data[item][-6] = nil
return true
end
return false
end
function dgsComboBoxSetState(combobox,state)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetState at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
return dgsSetData(combobox,"listState",state and 1 or -1)
end
function dgsComboBoxGetState(combobox)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetState at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
return dgsElementData[combobox].listState == 1 and true or false
end
function dgsComboBoxRemoveItem(combobox,item)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxRemoveItem at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(tonumber(item),"Bad argument @dgsComboBoxRemoveItem at argument 2, expect number got "..type(item))
local data = dgsElementData[combobox].itemData
local item = tonumber(item)
local item = mathFloor(item)
if item >= 1 and item <= #data then
tableRemove(data,item)
dgsSetData(combobox,"configNextFrame",true)
return true
end
return false
end
function dgsComboBoxClear(combobox)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxClear at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
local data = dgsElementData[combobox].itemData
tableRemove(data)
dgsElementData[combobox].itemData = {}
dgsSetData(combobox,"configNextFrame",true)
return true
end
function dgsComboBoxCreateBox(x,y,sx,sy,relative,parent)
local xCheck,yCheck,wCheck,hCheck,pCheck = type (x) == "number",type(y) == "number",type(sx) == "number",type(sy) == "number",dgsGetType(parent) == "dgs-dxcombobox"
if not xCheck then assert(false,"Bad argument @dgsComboBoxCreateBox at argument 1, expect number got "..type(x)) end
if not yCheck then assert(false,"Bad argument @dgsComboBoxCreateBox at argument 2, expect number got "..type(y)) end
if not wCheck then assert(false,"Bad argument @dgsComboBoxCreateBox at argument 3, expect number got "..type(sx)) end
if not hCheck then assert(false,"Bad argument @dgsComboBoxCreateBox at argument 4, expect number got "..type(sy)) end
if not pCheck then assert(false,"Bad argument @dgsComboBoxCreateBox at argument 6, expect dgs-dxcombobox got "..dgsGetType(parent)) end
local box = createElement("dgs-dxcombobox-Box")
dgsSetType(box,"dgs-dxcombobox-Box")
dgsSetParent(box,parent,true,true)
insertResource(sourceResource,box)
calculateGuiPositionSize(box,x,y,relative or false,sx,sy,relative or false,true)
triggerEvent("onDgsCreate",box)
return box
end
function dgsComboBoxSetSelectedItem(combobox,id)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetSelectedItem at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(type(id) == "number","Bad argument @dgsComboBoxSetSelectedItem at argument 2, expect number got "..type(id))
local itemData = dgsElementData[combobox].itemData
local old = dgsElementData[combobox].select
if not id or id == -1 then
dgsSetData(combobox,"select",-1)
triggerEvent("onDgsComboBoxSelect",combobox,-1,old)
return true
elseif id >= 1 and id <= #itemData then
dgsSetData(combobox,"select",id)
triggerEvent("onDgsComboBoxSelect",combobox,id,old)
return true
end
return false
end
function dgsComboBoxGetSelectedItem(combobox)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetSelectedItem at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
local itemData = dgsElementData[combobox].itemData
local selected = dgsElementData[combobox].select
if selected < 1 and selected > #itemData then
return -1
else
return selected
end
end
function configComboBox(combobox,remainBox)
local box = dgsElementData[combobox].myBox
local size = dgsElementData[box].absSize
local itemData = dgsElementData[combobox].itemData
local scrollbar = dgsElementData[combobox].scrollbar
local itemHeight = dgsElementData[combobox].itemHeight
dgsSetVisible(scrollbar,#itemData*itemHeight > size[2])
if not remainBox then
local boxsiz = dgsElementData[box].absSize
local renderTarget = dgsElementData[combobox].renderTarget
if isElement(renderTarget) then destroyElement(renderTarget) end
local sbt = dgsElementData[combobox].scrollBarThick
local renderTarget,err = dxCreateRenderTarget(boxsiz[1],boxsiz[2],true,combobox)
if renderTarget ~= false then
dgsAttachToAutoDestroy(renderTarget,combobox,-1)
else
outputDebugString(err)
end
dgsSetData(combobox,"renderTarget",renderTarget)
dgsSetPosition(scrollbar,boxsiz[1]-sbt,0,false)
dgsSetSize(scrollbar,sbt,boxsiz[2],false)
local itemData = dgsElementData[combobox].itemData
local itemHeight = dgsElementData[combobox].itemHeight
local itemLength = itemHeight*#itemData
local higLen = 1-(itemLength-boxsiz[2])/itemLength
higLen = higLen >= 0.95 and 0.95 or higLen
dgsSetData(scrollbar,"length",{higLen,true})
local verticalScrollSize = dgsElementData[combobox].scrollSize/(itemLength-boxsiz[2])
dgsSetData(scrollbar,"multiplier",{verticalScrollSize,true})
dgsSetData(combobox,"configNextFrame",false)
end
---------------Caption edit
local edit = dgsElementData[combobox].captionEdit
if edit then
local size = dgsElementData[combobox].absSize
local w,h = size[1],size[2]
local buttonLen_t = dgsElementData[combobox].buttonLen
local buttonLen = 0
if dgsElementData[combobox].textBox then
buttonLen = w - (buttonLen_t[2] and buttonLen_t[1]*h or buttonLen_t[1])
end
dgsSetSize(edit,buttonLen,h,false)
dgsSetVisible(edit,dgsElementData[combobox].textBox)
end
end
function checkCBScrollBar(scb,new,old)
local parent = dgsGetParent(source)
if dgsGetType(parent) == "dgs-dxcombobox-Box" then
local combobox = dgsElementData[parent].myCombo
local scrollBar = dgsElementData[combobox].scrollbar
local sx,sy = dgsElementData[parent].absSize[1],dgsElementData[parent].absSize[2]
if source == scrollBar then
local itemLength = #dgsElementData[combobox].itemData*dgsElementData[combobox].itemHeight
local temp = -new*(itemLength-sy)/100
local temp = dgsElementData[combobox].scrollFloor and mathFloor(temp) or temp
dgsSetData(combobox,"itemMoveOffset",temp)
triggerEvent("onDgsElementScroll",combobox,source,new,old)
end
end
end
addEventHandler("onDgsComboBoxStateChange",resourceRoot,function(state)
if not wasEventCancelled() then
local box = dgsElementData[source].myBox
if state then
dgsSetVisible(box,true)
dgsFocus(box)
else
dgsSetVisible(box,false)
end
end
end)
function dgsComboBoxSetScrollPosition(combobox,vertical)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetScrollPosition at at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
assert(not vertical or (type(vertical) == "number" and vertical>= 0 and vertical <= 100),"Bad argument @dgsComboBoxSetScrollPosition at at argument 2, expect nil, none or number∈[0,100] got "..dgsGetType(vertical).."("..tostring(vertical)..")")
local scb = dgsElementData[combobox].scrollbar
if dgsElementData[scb].visible then
return dgsScrollBarSetScrollPosition(scb,vertical)
end
return true
end
function dgsComboBoxGetScrollPosition(combobox)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetScrollPosition at at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
local scb = dgsElementData[combobox].scrollbar
return dgsScrollBarGetScrollPosition(scb)
end
function dgsComboBoxSetViewCount(combobox,count)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxSetViewCount at at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
if type(count) == "number" then
dgsSetData(combobox,"viewCount",count,true)
return dgsComboBoxSetBoxHeight (combobox,count * dgsGetData(combobox,"itemHeight"))
else
return dgsSetData (combobox,"viewCount",false,true)
end
end
function dgsComboBoxGetViewCount(combobox,count)
assert(dgsGetType(combobox) == "dgs-dxcombobox","Bad argument @dgsComboBoxGetViewCount at at argument 1, expect dgs-dxcombobox got "..dgsGetType(combobox))
return dgsElementData[combobox].viewCount
end
----------------------------------------------------------------
--------------------------Renderer------------------------------
----------------------------------------------------------------
dgsRenderer["dgs-dxcombobox"] = function(source,x,y,w,h,mx,my,cx,cy,enabled,eleData,parentAlpha,isPostGUI,rndtgt)
if eleData.configNextFrame then
configComboBox(source)
end
local captionEdit = eleData.captionEdit
local colors,imgs = eleData.color,eleData.image
local selectState = 1
local textBox = eleData.textBox
local buttonLen = textBox and (eleData.buttonLen[2] and eleData.buttonLen[1]*h or eleData.buttonLen[1]) or w
if MouseData.enter == source then
selectState = 2
if eleData.clickType == 1 then
if MouseData.clickl == source then
selectState = 3
end
elseif eleData.clickType == 2 then
if MouseData.clickr == source then
selectState = 3
end
else
if MouseData.clickl == source or MouseData.clickr == source then
selectState = 3
end
end
end
local finalcolor
if not enabled[1] and not enabled[2] then
if type(eleData.disabledColor) == "number" then
finalcolor = applyColorAlpha(eleData.disabledColor,parentAlpha)
elseif eleData.disabledColor == true then
local r,g,b,a = fromcolor(colors[1],true)
local average = (r+g+b)/3*eleData.disabledColorPercent
finalcolor = tocolor(average,average,average,a*parentAlpha)
else
finalcolor = colors[selectState]
end
else
finalcolor = applyColorAlpha(colors[selectState],parentAlpha)
end
local bgColor = eleData.bgColor or finalcolor
local bgImage = eleData.bgImage
if imgs[selectState] then
dxDrawImage(x+w-buttonLen,y,buttonLen,h,imgs[selectState],0,0,0,finalcolor,isPostGUI,rndtgt)
else
dxDrawRectangle(x+w-buttonLen,y,buttonLen,h,finalcolor,isPostGUI)
end
local arrowColor = eleData.arrowColor
local arrowOutSideColor = eleData.arrowOutSideColor
local textBoxLen = w-buttonLen
if bgImage then
dxDrawImage(x,y,textBoxLen,h,bgImage,0,0,0,applyColorAlpha(bgColor,parentAlpha),isPostGUI,rndtgt)
else
dxDrawRectangle(x,y,textBoxLen,h,applyColorAlpha(bgColor,parentAlpha),isPostGUI)
end
local shader = eleData.arrow
local listState = eleData.listState
if eleData.listStateAnim ~= listState then
local stat = eleData.listStateAnim+eleData.listState*0.08
eleData.listStateAnim = listState == -1 and mathMax(stat,listState) or mathMin(stat,listState)
end
if eleData.arrowSettings then
dxSetShaderValue(shader,"width",eleData.arrowSettings[1])
dxSetShaderValue(shader,"height",eleData.arrowSettings[2]*eleData.listStateAnim)
dxSetShaderValue(shader,"linewidth",eleData.arrowSettings[3])
end
local r,g,b,a = fromcolor(arrowColor,true)
dxSetShaderValue(shader,"_color",{r/255,g/255,b/255,a/255*parentAlpha})
local r,g,b,a = fromcolor(arrowOutSideColor,true)
dxSetShaderValue(shader,"ocolor",{r/255,g/255,b/255,a/255*parentAlpha})
dxDrawImage(x+textBoxLen,y,buttonLen,h,shader,0,0,0,white,isPostGUI,rndtgt)
if textBox and not captionEdit then
local item = eleData.itemData[eleData.select] or {}
local itemTextPadding = dgsElementData[source].itemTextPadding
local font = item[-4] or eleData.font or systemFont
local textColor = item[-2] or eleData.textColor
local rb = eleData.alignment
local txtSizX,txtSizY = item[-3] and item[-3][1] or eleData.textSize[1],item[-3] and (item[-3][2] or item[-3][1]) or eleData.textSize[2] or eleData.textSize[1]
local colorcoded = item[-5] or eleData.colorcoded
local shadow = eleData.shadow
local wordbreak = eleData.wordbreak
local text = item[1] or eleData.caption
local image = item[-6]
if image then
local imagex = x+(image[7] and image[3]*textBoxLen or image[3])
local imagey = y+(image[7] and image[4]*h or image[4])
local imagew = image[7] and image[5]*textBoxLen or image[5]
local imageh = image[7] and image[6]*h or image[6]
if isElement(image[1]) then
dxDrawImage(imagex,imagey,imagew,imageh,image[1],0,0,0,applyColorAlpha(image[2],parentAlpha),isPostGUI,rndtgt)
else
dxDrawRectangle(imagex,imagey,imagew,imageh,applyColorAlpha(image[2],parentAlpha),isPostGUI)
end
end
local nx,ny,nw,nh = x+itemTextPadding[1],y,x+textBoxLen-itemTextPadding[2],y+h
if shadow then
dxDrawText(text:gsub("#%x%x%x%x%x%x",""),nx-shadow[1],ny-shadow[2],nw-shadow[1],nh-shadow[2],applyColorAlpha(shadow[3],parentAlpha),txtSizX,txtSizY,font,rb[1],rb[2],clip,wordbreak,isPostGUI)
end
dxDrawText(text,nx,ny,nw,nh,applyColorAlpha(textColor,parentAlpha),txtSizX,txtSizY,font,rb[1],rb[2],clip,wordbreak,isPostGUI,colorcoded)
end
return rndtgt
end
dgsRenderer["dgs-dxcombobox-Box"] = function(source,x,y,w,h,mx,my,cx,cy,enabled,eleData,parentAlpha,isPostGUI,rndtgt,position,OffsetX,OffsetY,visible)
local combo = eleData.myCombo
local DataTab = dgsElementData[combo]
local itemData = DataTab.itemData
local itemDataCount = #itemData
local scbThick = dgsElementData[combo].scrollBarThick
local itemHeight = DataTab.itemHeight
--Smooth Item
local _itemMoveOffset = DataTab.itemMoveOffset
local scrollbar = dgsElementData[combo].scrollbar
local itemMoveHardness = dgsElementData[scrollbar].moveType == "slow" and DataTab.moveHardness[1] or DataTab.moveHardness[2]
DataTab.itemMoveOffsetTemp = lerp(itemMoveHardness,DataTab.itemMoveOffsetTemp,_itemMoveOffset)
local itemMoveOffset = DataTab.itemMoveOffsetTemp-DataTab.itemMoveOffsetTemp%1
local whichRowToStart = -mathFloor((itemMoveOffset+itemHeight)/itemHeight)+1
local whichRowToEnd = whichRowToStart+mathFloor(h/itemHeight)+1
DataTab.FromTo = {whichRowToStart > 0 and whichRowToStart or 1,whichRowToEnd <= itemDataCount and whichRowToEnd or itemDataCount}
local renderTarget = dgsElementData[combo].renderTarget
if isElement(renderTarget) then
dxSetRenderTarget(renderTarget,true)
dxSetBlendMode("modulate_add")
local rb_l = dgsElementData[combo].itemAlignment
local scbcheck = dgsElementData[scrollbar].visible and scbThick or 0
if mx >= cx and mx <= cx+w-scbcheck and my >= cy and my <= cy+h and MouseData.enter == source then
local toffset = (whichRowToStart*itemHeight)+itemMoveOffset
sid = mathFloor((my+2-cy-toffset)/itemHeight)+whichRowToStart+1
if sid <= itemDataCount then
DataTab.preSelect = sid
MouseData.enterData = true
else
DataTab.preSelect = -1
end
else
DataTab.preSelect = -1
end
local preSelect = DataTab.preSelect
local Select = DataTab.select
local shadow = dgsElementData[combo].shadow
local wordbreak = eleData.wordbreak
local clip = eleData.clip
local itemTextPadding = dgsElementData[combo].itemTextPadding
for i=DataTab.FromTo[1],DataTab.FromTo[2] do
local item = itemData[i]
local textSize = item[-3]
local textColor = item[-2]
local image = item[-1]
local color = item[0]
local font = item[-4]
local colorcoded = item[-5]
local itemState = 1
itemState = i == preSelect and 2 or itemState
itemState = i == Select and 3 or itemState
local rowpos = (i-1)*itemHeight
if image[itemState] then
dxDrawImage(0,rowpos+itemMoveOffset,w,itemHeight,image[itemState],0,0,0,color[itemState],false,rndtgt)
else
dxDrawRectangle(0,rowpos+itemMoveOffset,w,itemHeight,color[itemState])
end
local rowImage = item[-6]
if rowImage then
local itemWidth = dgsElementData[scrollbar].visible and w-dgsElementData[scrollbar].absSize[1] or w
local imagex = rowImage[7] and rowImage[3]*itemWidth or rowImage[3]
local imagey = (rowpos+itemMoveOffset) + (rowImage[7] and rowImage[4]*itemHeight or rowImage[4])
local imagew = rowImage[7] and rowImage[5]*itemWidth or rowImage[5]
local imageh = rowImage[7] and rowImage[6]*itemHeight or rowImage[6]
if isElement(rowImage[1]) then
dxDrawImage(imagex,imagey,imagew,imageh,rowImage[1],0,0,0,rowImage[2],false,rndtgt)
else
dxDrawRectangle(imagex,imagey,imagew,imageh,rowImage[2])
end
end
local _y,_sx,_sy = rowpos+itemMoveOffset,sW-itemTextPadding[2],rowpos+itemHeight+itemMoveOffset
local text = itemData[i][1]
if shadow then
dxDrawText(text:gsub("#%x%x%x%x%x%x",""),itemTextPadding[1]-shadow[1],_y-shadow[2],_sx-shadow[1],_sy-shadow[2],shadow[3],textSize[1],textSize[2],font,rb_l[1],rb_l[2],clip,wordbreak)
end
dxDrawText(text,itemTextPadding[1],_y,_sx,_sy,textColor,textSize[1],textSize[2],font,rb_l[1],rb_l[2],clip,wordbreak,false,colorcoded)
end
dxSetRenderTarget(rndtgt)
dxSetBlendMode("add")
_dxDrawImage(x,y,w,h,renderTarget,0,0,0,tocolor(255,255,255,255*parentAlpha),isPostGUI)
dxSetBlendMode(rndtgt and "modulate_add" or "blend")
end
return rndtgt
end
|
if true then
return
end
local Ease3D = require(script:GetCustomProperty("Ease3D"))
local Duration = script:GetCustomProperty("Duration")
local Flag_Root = script:GetCustomProperty("Flag_Root"):WaitForObject()
local Flag_Root_Rot_Start = script:GetCustomProperty("Flag_Root_Rot_Start")
local Flag_Root_Rot_End = script:GetCustomProperty("Flag_Root_Rot_End")
local Flag_Mid = script:GetCustomProperty("Flag_Mid"):WaitForObject()
local Flag_Mid_Rot_Start = script:GetCustomProperty("Flag_Mid_Rot_Start")
local Flag_Mid_Rot_End = script:GetCustomProperty("Flag_Mid_Rot_End")
local Flag_Tip = script:GetCustomProperty("Flag_Tip"):WaitForObject()
local Flag_Tip_Rot_Start = script:GetCustomProperty("Flag_Tip_Rot_Start")
local Flag_Tip_Rot_End = script:GetCustomProperty("Flag_Tip_Rot_End")
local Delay = script:GetCustomProperty("Delay")
function Swing()
Ease3D.EaseRotation(Flag_Root, Flag_Root_Rot_Start, Duration*.4, Ease3D.EasingEquation.SINE, Ease3D.EasingDirection.INOUT)
Task.Wait(Duration*.25)
Ease3D.EaseRotation(Flag_Mid, Flag_Mid_Rot_End, Duration*.4, Ease3D.EasingEquation.CUBIC, Ease3D.EasingDirection.INOUT)
Ease3D.EaseRotation(Flag_Tip, Flag_Tip_Rot_Start, Duration*.4, Ease3D.EasingEquation.EXPONENTIAL, Ease3D.EasingDirection.INOUT)
Task.Wait(Duration*.25)
Ease3D.EaseRotation(Flag_Root, Flag_Root_Rot_End, Duration*.5, Ease3D.EasingEquation.SINE, Ease3D.EasingDirection.INOUT)
Task.Wait(Duration*.25)
Ease3D.EaseRotation(Flag_Mid, Flag_Mid_Rot_Start, Duration*.5, Ease3D.EasingEquation.CUBIC, Ease3D.EasingDirection.INOUT)
Ease3D.EaseRotation(Flag_Tip, Flag_Tip_Rot_End, Duration*.5, Ease3D.EasingEquation.EXPONENTIAL, Ease3D.EasingDirection.INOUT)
Task.Wait(Duration*.25)
end
Task.Wait(Delay)
function Tick()
--[[
Swing()
]]--
end
|
-- Gas turbines
ACF.RegisterEngineClass("GT", {
Name = "Gas Turbine",
Description = "These turbines are optimized for aero use due to them being powerful but suffering from poor throttle response and fuel consumption."
})
do -- Forward-facing Gas Turbines
ACF.RegisterEngine("Turbine-Small", "GT", {
Name = "Small Gas Turbine",
Description = "A small gas turbine, high power and a very wide powerband.",
Model = "models/engines/gasturbine_s.mdl",
Sound = "acf_base/engines/turbine_small.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Turbine",
Mass = 200,
Torque = 687,
FlywheelMass = 2.9,
IsElectric = true,
RPM = {
Idle = 1400,
PeakMin = 1000,
PeakMax = 1500,
Limit = 10000,
Override = 4167,
}
})
ACF.RegisterEngine("Turbine-Medium", "GT", {
Name = "Medium Gas Turbine",
Description = "A medium gas turbine, moderate power but a very wide powerband.",
Model = "models/engines/gasturbine_m.mdl",
Sound = "acf_base/engines/turbine_medium.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Turbine",
Mass = 400,
Torque = 1016,
FlywheelMass = 4.3,
IsElectric = true,
RPM = {
Idle = 1800,
PeakMin = 1200,
PeakMax = 1800,
Limit = 12000,
Override = 5000,
}
})
ACF.RegisterEngine("Turbine-Large", "GT", {
Name = "Large Gas Turbine",
Description = "A large gas turbine, powerful with a wide powerband.",
Model = "models/engines/gasturbine_l.mdl",
Sound = "acf_base/engines/turbine_large.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Turbine",
Mass = 1100,
Torque = 2487,
FlywheelMass = 10.5,
IsElectric = true,
RPM = {
Idle = 2000,
PeakMin = 1350,
PeakMax = 2025,
Limit = 13500,
Override = 5625,
}
})
end
do -- Transaxial Gas Turbines
ACF.RegisterEngine("Turbine-Small-Trans", "GT", {
Name = "Small Transaxial Gas Turbine",
Description = "A small gas turbine, high power and a very wide powerband. Outputs to the side instead of rear.",
Model = "models/engines/turbine_s.mdl",
Sound = "acf_base/engines/turbine_small.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Turbine",
Mass = 160,
Torque = 550,
FlywheelMass = 2.3,
IsElectric = true,
IsTrans = true,
RPM = {
Idle = 1400,
PeakMin = 1000,
PeakMax = 1500,
Limit = 10000,
Override = 4167,
}
})
ACF.RegisterEngine("Turbine-Medium-Trans", "GT", {
Name = "Medium Transaxial Gas Turbine",
Description = "A medium gas turbine, moderate power but a very wide powerband. Outputs to the side instead of rear.",
Model = "models/engines/turbine_m.mdl",
Sound = "acf_base/engines/turbine_medium.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Turbine",
Mass = 320,
Torque = 812,
FlywheelMass = 3.4,
IsElectric = true,
IsTrans = true,
RPM = {
Idle = 1800,
PeakMin = 1200,
PeakMax = 1800,
Limit = 12000,
Override = 5000,
}
})
ACF.RegisterEngine("Turbine-Large-Trans", "GT", {
Name = "Large Transaxial Gas Turbine",
Description = "A large gas turbine, powerful with a wide powerband. Outputs to the side instead of rear.",
Model = "models/engines/turbine_l.mdl",
Sound = "acf_base/engines/turbine_large.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Turbine",
Mass = 880,
Torque = 1990,
FlywheelMass = 8.4,
IsElectric = true,
IsTrans = true,
RPM = {
Idle = 2000,
PeakMin = 1350,
PeakMax = 2025,
Limit = 13500,
Override = 5625,
}
})
end
ACF.RegisterEngineClass("GGT", {
Name = "Ground Gas Turbine",
Description = "Ground-use turbines have excellent low-rev performance and are deceptively powerful. However, they have high gearbox demands, high fuel usage and low tolerance to damage."
})
do -- Forward-facing Ground Gas Turbines
ACF.RegisterEngine("Turbine-Ground-Small", "GGT", {
Name = "Small Ground Gas Turbine",
Description = "A small gas turbine, fitted with ground-use air filters and tuned for ground use.",
Model = "models/engines/gasturbine_s.mdl",
Sound = "acf_base/engines/turbine_small.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Radial",
Mass = 350,
Torque = 1000,
FlywheelMass = 14.3,
IsElectric = true,
RPM = {
Idle = 700,
PeakMin = 1000,
PeakMax = 1350,
Limit = 3000,
Override = 1667,
}
})
ACF.RegisterEngine("Turbine-Ground-Medium", "GGT", {
Name = "Medium Ground Gas Turbine",
Description = "A medium gas turbine, fitted with ground-use air filters and tuned for ground use.",
Model = "models/engines/gasturbine_m.mdl",
Sound = "acf_base/engines/turbine_medium.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Radial", --This is done to give proper fuel consumption and make the turbines not instant-torque from idle
Mass = 600,
Torque = 1500,
FlywheelMass = 29.6,
IsElectric = true,
Pitch = 1.15,
RPM = {
Idle = 600,
PeakMin = 1500,
PeakMax = 2000,
Limit = 3000,
Override = 1450,
}
})
ACF.RegisterEngine("Turbine-Ground-Large", "GGT", {
Name = "Large Ground Gas Turbine",
Description = "A large gas turbine, fitted with ground-use air filters and tuned for ground use.",
Model = "models/engines/gasturbine_l.mdl",
Sound = "acf_base/engines/turbine_large.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Radial",
Mass = 1650,
Torque = 5000,
FlywheelMass = 75,
IsElectric = true,
Pitch = 1.35,
RPM = {
Idle = 500,
PeakMin = 1000,
PeakMax = 1250,
Limit = 3000,
Override = 1250,
}
})
end
do -- Transaxial Ground Gas Turbines
ACF.RegisterEngine("Turbine-Small-Ground-Trans", "GGT", {
Name = "Small Transaxial Ground Gas Turbine",
Description = "A small gas turbine fitted with ground-use air filters and tuned for ground use. Outputs to the side instead of rear.",
Model = "models/engines/turbine_s.mdl",
Sound = "acf_base/engines/turbine_small.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Radial",
Mass = 280,
Torque = 750,
FlywheelMass = 11.4,
IsElectric = true,
IsTrans = true,
RPM = {
Idle = 700,
PeakMin = 1000,
PeakMax = 1350,
Limit = 3000,
Override = 1667,
}
})
ACF.RegisterEngine("Turbine-Medium-Ground-Trans", "GGT", {
Name = "Medium Transaxial Ground Gas Turbine",
Description = "A medium gas turbine fitted with ground-use air filters and tuned for ground use. Outputs to the side instead of rear.",
Model = "models/engines/turbine_m.mdl",
Sound = "acf_base/engines/turbine_medium.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Radial",
Mass = 480,
Torque = 1125,
FlywheelMass = 23.7,
IsElectric = true,
IsTrans = true,
Pitch = 1.15,
RPM = {
Idle = 600,
PeakMin = 1500,
PeakMax = 2000,
Limit = 3000,
Override = 1450,
}
})
ACF.RegisterEngine("Turbine-Large-Ground-Trans", "GGT", {
Name = "Large Transaxial Ground Gas Turbine",
Description = "A large gas turbine fitted with ground-use air filters and tuned for ground use. Outputs to the side instead of rear.",
Model = "models/engines/turbine_l.mdl",
Sound = "acf_base/engines/turbine_large.wav",
Fuel = { Petrol = true, Diesel = true },
Type = "Radial",
Mass = 1320,
Torque = 3750,
FlywheelMass = 60,
IsElectric = true,
IsTrans = true,
Pitch = 1.35,
RPM = {
Idle = 500,
PeakMin = 1000,
PeakMax = 1250,
Limit = 3000,
Override = 1250,
}
})
end
ACF.SetCustomAttachment("models/engines/turbine_l.mdl", "driveshaft", Vector(0, -15), Angle(0, -90))
ACF.SetCustomAttachment("models/engines/turbine_m.mdl", "driveshaft", Vector(0, -11.25), Angle(0, -90))
ACF.SetCustomAttachment("models/engines/turbine_s.mdl", "driveshaft", Vector(0, -7.5), Angle(0, -90))
ACF.SetCustomAttachment("models/engines/gasturbine_l.mdl", "driveshaft", Vector(-42), Angle(0, -180))
ACF.SetCustomAttachment("models/engines/gasturbine_m.mdl", "driveshaft", Vector(-31.5), Angle(0, -180))
ACF.SetCustomAttachment("models/engines/gasturbine_s.mdl", "driveshaft", Vector(-21), Angle(0, -180))
|
local file=nil
function prfile(d)
file:write("\n\n")
for i=1,string.len(d) do
file:write(string.format("%4s",string.sub(d,i,i)))
end
file:write("\n")
for i=1,string.len(d) do
file:write(string.format(" %3u",string.byte(d,i,i)))
end
file:flush()
end
table.insert(initCbCallbacks,function() io.close(file) end)
file=io.open("logsc.txt","w+")
table.insert(resetCbCallbacks,function() print"reset log";io.close(file) end)
|
-- This script demonstrates flocking behaviors for AI agents.
------------------------------------------------------------------------------
-- constants
------------------------------------------------------------------------------
SCREEN_WIDTH = 1920
SCREEN_HEIGHT = 1080
--[[
Ratio of Flock Size and MAX_FLOCK_PER_FRAME
1000:68
1250:58
1600:38
2000:28 (But at this point, almost nothing makes sense)
]]
FLOCK_SIZE = 1000
MAX_FLOCK_PER_FRAME = 68
MAX_ALIGNMENT_DISTANCE = 100
MAX_COHESION_DISTANCE = 600
MAX_SEPARATION_DISTANCE = 20 -- 20(around 1000 Flocks); 10(around 1600 Flocks); 5(around 2000 Flocks);
MAX_SPEED = 10.0
USER_BEHAVIOR_WEIGHT = 0.35
SEPARATION_WEIGHT = 0.33 -- 0.33(around 1000 Flocks); 0.3(around 1600 Flocks); 0.25(around 2000 Flocks);
ALIGNMENT_WEIGHT = 0.3
COHESION_WEIGHT = 0.15
boids = {}
boidStart = -1
boidStop = -1
flockTopLeft = {
x = SCREEN_WIDTH,
y = SCREEN_HEIGHT
}
flockBottomRight = {
x = 0,
y = 0
}
frameCounter = 0
frameExecInterval = 1
------------------------------------------------------------------------------
-- helper functions
------------------------------------------------------------------------------
function SpawnFlock()
mouseX, mouseY = GetMousePosition()
for i = 1, FLOCK_SIZE do
local x = math.random(0, SCREEN_WIDTH)
local y = math.random(0, SCREEN_HEIGHT)
local boid = CreateEntity(boidImage, x, y, 32, 16)
boid.drag = 0.95
boid.maxSpeed = MAX_SPEED
boid.acceleration.x, boid.acceleration.y = Normalize(VectorTo(boid.x, boid.y, mouseX, mouseY))
boid.targetAngle = 0
boids[#boids + 1] = boid
end
end
------------------------------------------------------------------------------
-- steering behaviors
--
-- functions related to movement of AI agents in a game.
-- each of these functions returns a normalized 2D vector that
-- represents a steering force.
--
------------------------------------------------------------------------------
function Seek(agent, targetX, targetY)
local x, y = VectorTo(agent.x, agent.y, targetX, targetY)
x, y = Normalize(x, y)
return x, y
end
function Flee(agent, targetX, targetY)
local x, y = VectorTo(targetX, targetY, agent.x, agent.y)
x, y = Normalize(x, y)
return x, y
end
function Separation(agent, neighbors, distFromNeighbors)
local vX, vY = 0, 0
for i = 1, numNeighbors do
local n = neighbors[i]
if (n ~= agent) and (distFromNeighbors[i] <= MAX_SEPARATION_DISTANCE) then
vX = vX + agent.x - n.x
vY = vY + agent.y - n.y
end
end
if vX ~= 0 or vY ~=0 then
return Normalize(vX, vY)
end
return 0, 0
end
function Alignment(agent, neighbors, distFromNeighbors)
local vX, vY = 0, 0
for i = 1, numNeighbors do
local n = neighbors[i]
if (n ~= agent) and (distFromNeighbors[i] <= MAX_ALIGNMENT_DISTANCE) then
vX = vX + n.velocity.x
vY = vY + n.velocity.y
end
end
if vX ~= 0 or vY ~=0 then
return Normalize(vX / numNeighbors, vY / numNeighbors)
end
return 0, 0
end
function Cohesion(agent, neighbors, distFromNeighbors)
local centerX, centerY = 0, 0
for i = 1, numNeighbors do
local n = neighbors[i]
if (n ~= agent) and (distFromNeighbors[i] <= MAX_COHESION_DISTANCE) then
centerX = centerX + n.x
centerY = centerY + n.y
end
end
centerX = centerX / numNeighbors
centerY = centerY / numNeighbors
-- centerX = (flockTopLeft.x + flockBottomRight.x)/2;
-- centerY = (flockTopLeft.y + flockBottomRight.y)/2;
return Normalize( VectorTo(agent.x, agent.y, centerX, centerY) )
end
------------------------------------------------------------------------------
-- required mote functions
------------------------------------------------------------------------------
-- called once, at the start of the game
function Start()
CreateWindow(SCREEN_WIDTH, SCREEN_HEIGHT)
SetWindowTitle("Mote Flocking Demo")
boidImage = LoadImage("images/gme/bullet.png")
SpawnFlock()
end
-- called at a fixed interval (16 ms) to update the state of the game world.
function Update()
mouseX, mouseY = GetMousePosition()
numNeighbors = #boids
if numNeighbors == 0 then
return
end
local bX, bY, aX, aY, cX, cY, sX, sY = 0, 0, 0, 0, 0, 0, 0, 0
if boidStart < 1 or boidStart > numNeighbors then
boidStart = 1
end
boidStop = boidStart + MAX_FLOCK_PER_FRAME
if boidStop > numNeighbors then
boidStop = numNeighbors
end
if frameCounter == 0 then
local distTemp = {}
for i = boidStart, boidStop do
local agent = boids[i]
distTemp[i] = {}
for j = 1, numNeighbors do
local n = boids[j]
if (n ~= agent) then
distTemp[i][j] = Distance(n.x, n.y, agent.x, agent.y)
end
end
end
for i = boidStart, boidStop do
local boid = boids[i]
bX, bY = Seek(boid, mouseX, mouseY)
aX, aY = Alignment(boid, boids, distTemp[i])
cX, cY = Cohesion(boid, boids, distTemp[i])
sX, sY = Separation(boid, boids, distTemp[i])
boid.acceleration.x = bX * USER_BEHAVIOR_WEIGHT + aX * ALIGNMENT_WEIGHT + cX * COHESION_WEIGHT + sX * SEPARATION_WEIGHT
boid.acceleration.y = bY * USER_BEHAVIOR_WEIGHT + aY * ALIGNMENT_WEIGHT + cY * COHESION_WEIGHT + sY * SEPARATION_WEIGHT
boid.acceleration.x, boid.acceleration.y = Normalize(boid.acceleration.x, boid.acceleration.y)
end
boidStart = boidStop + 1
for i = 1, numNeighbors do
local boid = boids[i];
TurnTo(boid, boid.velocity)
end
end
frameCounter = frameCounter + 1
if frameCounter>frameExecInterval then
frameCounter = 0
end
for i = 1, numNeighbors do
local boid = boids[i];
UpdateEntity(boid)
flockTopLeft.x = math.min(boid.x, flockTopLeft.x)
flockTopLeft.y = math.min(boid.y, flockTopLeft.y)
flockBottomRight.x = math.max(boid.x, flockBottomRight.x)
flockBottomRight.y = math.max(boid.y, flockBottomRight.y)
end
end
-- called for each new frame drawn to the screen.
function Draw()
ClearScreen(68, 136, 204)
for i = 1, #boids do
DrawEntity(boids[i])
end
end
|
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
local okHeader= "HTTP/1.1 200 OK\r\nAccess-Control-Allow-Origin:*\r\n\r\n"
local DataToGet = 0
local sending=false
function s_output(str)
if(conn~=nil) then
if(sending) then
conn:send(str)
else
sending=true
conn:send(okHeader..str)
end
end
end
node.output(s_output, 1)
conn:on("receive",function(conn,payload)
local pos=string.find(payload,"%c%-%-%-")
if pos==nil and fstart==nil then
print("ERR")
return
end
node.input(string.sub(payload,pos+4))
end)
conn:on("sent",function(conn)
sending=false
node.output(nil)
conn:close()
end)
end)
print("free:", node.heap())
|
--[=[
UTF8 utility functions
@class UTF8
]=]
local UTF8 = {}
--[=[
UTF8 uppercase
@param str string
@return string
]=]
function UTF8.upper(str)
local UPPER_MAP = UTF8.UPPER_MAP
str = str:upper()
local newStr = ""
for start, stop in utf8.graphemes(str) do
local chr = str:sub(start, stop)
if UPPER_MAP[chr] then
chr = UPPER_MAP[chr]
end
newStr = newStr .. chr
end
return newStr
end
--[=[
UTF8 lowercase
@param str string
@return string
]=]
function UTF8.lower(str)
local LOWER_MAP = UTF8.LOWER_MAP
str = str:lower()
local newStr = ""
for start, stop in utf8.graphemes(str) do
local chr = str:sub(start, stop)
if LOWER_MAP[chr] then
chr = LOWER_MAP[chr]
end
newStr = newStr .. chr
end
return newStr
end
--[=[
UTF8 lower to uppercase map
@prop UPPER_MAP { [string]: string }
@within UTF8
]=]
UTF8.UPPER_MAP = {
['à'] = 'À',
['á'] = 'Á',
['â'] = 'Â',
['ã'] = 'Ã',
['ä'] = 'Ä',
['å'] = 'Å',
['æ'] = 'Æ',
['ç'] = 'Ç',
['è'] = 'È',
['é'] = 'É',
['ê'] = 'Ê',
['ë'] = 'Ë',
['ì'] = 'Ì',
['í'] = 'Í',
['î'] = 'Î',
['ï'] = 'Ï',
['ð'] = 'Ð',
['ñ'] = 'Ñ',
['ò'] = 'Ò',
['ó'] = 'Ó',
['ô'] = 'Ô',
['õ'] = 'Õ',
['ö'] = 'Ö',
['ø'] = 'Ø',
['ù'] = 'Ù',
['ú'] = 'Ú',
['û'] = 'Û',
['ü'] = 'Ü',
['ý'] = 'Ý',
['þ'] = 'Þ',
['ā'] = 'Ā',
['ă'] = 'Ă',
['ą'] = 'Ą',
['ć'] = 'Ć',
['ĉ'] = 'Ĉ',
['ċ'] = 'Ċ',
['č'] = 'Č',
['ď'] = 'Ď',
['đ'] = 'Đ',
['ē'] = 'Ē',
['ĕ'] = 'Ĕ',
['ė'] = 'Ė',
['ę'] = 'Ę',
['ě'] = 'Ě',
['ĝ'] = 'Ĝ',
['ğ'] = 'Ğ',
['ġ'] = 'Ġ',
['ģ'] = 'Ģ',
['ĥ'] = 'Ĥ',
['ħ'] = 'Ħ',
['ĩ'] = 'Ĩ',
['ī'] = 'Ī',
['ĭ'] = 'Ĭ',
['į'] = 'Į',
['ı'] = 'İ',
['ij'] = 'IJ',
['ĵ'] = 'Ĵ',
['ķ'] = 'Ķ',
['ĺ'] = 'Ĺ',
['ļ'] = 'Ļ',
['ľ'] = 'Ľ',
['ŀ'] = 'Ŀ',
['ł'] = 'Ł',
['ń'] = 'Ń',
['ņ'] = 'Ņ',
['ň'] = 'Ň',
['ŋ'] = 'Ŋ',
['ō'] = 'Ō',
['ŏ'] = 'Ŏ',
['ő'] = 'Ő',
['œ'] = 'Œ',
['ŕ'] = 'Ŕ',
['ŗ'] = 'Ŗ',
['ř'] = 'Ř',
['ś'] = 'Ś',
['ŝ'] = 'Ŝ',
['ş'] = 'Ş',
['š'] = 'Š',
['ţ'] = 'Ţ',
['ť'] = 'Ť',
['ŧ'] = 'Ŧ',
['ũ'] = 'Ũ',
['ū'] = 'Ū',
['ŭ'] = 'Ŭ',
['ů'] = 'Ů',
['ű'] = 'Ű',
['ų'] = 'Ų',
['ŵ'] = 'Ŵ',
['ŷ'] = 'Ŷ',
['ÿ'] = 'Ÿ',
['ź'] = 'Ź',
['ż'] = 'Ż',
['ž'] = 'Ž',
['ſ'] = 'ſ',
['ƀ'] = 'Ɓ',
['ƃ'] = 'Ƃ',
['ƅ'] = 'Ƅ',
['ƈ'] = 'Ƈ',
['ƌ'] = 'Ƌ',
['ƒ'] = 'Ƒ',
['ƙ'] = 'Ƙ',
['ƣ'] = 'Ƣ',
['ơ'] = 'Ơ',
}
--[=[
UTF8 uppercase to lowercase map
@prop LOWER_MAP { [string]: string }
@within UTF8
]=]
UTF8.LOWER_MAP = {}
for key, val in pairs(UTF8.UPPER_MAP) do
UTF8.LOWER_MAP[val] = key
end
return UTF8
|
module(..., lunit.testcase, package.seeall)
local common = dofile("common.lua")
local net = require("luanode.net")
function test()
local tcpPort = common.PORT
local tcp
tcp = net.Server(function (self, s)
tcp:close()
console.log("tcp server connection")
local buf = "";
s:on('data', function (self, d)
buf = buf .. d
end)
s:on('end', function ()
assert_equal("foobar", buf)
console.log("tcp socket disconnect")
s:finish()
end)
s:on('error', function (self, e)
console.log("tcp server-side error: " .. e)
process:exit(1)
end)
end)
tcp:listen(common.PORT, function()
local socket = net.Socket()
console.log("Connecting to socket")
socket:connect(tcpPort, function()
console.log('socket connected')
connectHappened = true
end)
assert_equal("opening", socket:readyState())
local r = socket:write("foo", function()
fooWritten = true
assert_true(connectHappened)
console.error("foo written")
end)
assert_equal(false, r)
socket:finish("bar")
assert_equal("opening", socket:readyState())
end)
process:loop()
end
|
-- C#
return {
name = "C#",
lexer = 3,
extensions = "cs",
keywords = {
[0] = {
name = "Primary Keywords",
keywords =
[[abstract as base bool break byte case catch char checked
class const continue decimal default delegate do double
else enum event explicit extern false finally fixed float
for foreach goto if implicit in int interface internal
is lock long namespace new null object operator out
override params private protected public readonly ref
return sbyte sealed short sizeof stackalloc static string
struct switch this throw true try typeof uint ulong
unchecked unsafe ushort using virtual void while]]
},
[1] = {
name = "Secondary Keywords",
keywords = [[]]
},
[2] = {
name = "Doc Keywords",
keywords = [[]]
}
},
style = require "cxx_styles",
comment = {
line = "//"
}
}
|
Locales['en'] = {
['entrega_fallida'] = 'You ran out of time for the Delivery!',
['subir_vehiculo'] = 'Get in the Cart',
['carro_incorrecto'] = 'You are not in the right Cart',
['recompensa'] = 'You got $ %s ',
['and'] = ' Gold and ',
['punto_entrega'] = 'Look for the little white flag near %s',
['deliver'] = 'Press [X] to deliver goods',
['blip'] = 'Delivery Point',
}
|
function start (song)
print("Song: " .. song .. " @ " .. bpm .. " donwscroll: " .. downscroll)
setActorAlpha(0, 'dad1')
setActorAlpha(0, 'boyfriend1')
end
local defaultHudX = 0
local defaultHudY = 0
local defaultWindowX = 0
local defaultWindowY = 0
local lastStep = 0
function update (elapsed)
local currentBeat = (songPos / 1000)*(bpm/60)
end
function beatHit (beat)
end
function stepHit (step)
if curStep == 120 or curStep == 688 then
setDefaultCamZoom(1.25)
end
if curStep == 248 or curStep == 704 then
setDefaultCamZoom(1.05)
end
if curStep == 384 then
flashCam(255, 255, 255, 2)
playBGAnimation('halloweenBG', 'lightning', true, false)
playSound('thunder_1')
changeDadCharacter('opheebop', 100, 200)
end
if curStep == 512 then
flashCam(255, 255, 255, 2)
playBGAnimation('halloweenBG', 'lightning', true, false)
playSound('thunder_2')
changeBoyfriendCharacter('pumpkinpie', 920, 250)
end
if curStep == 640 then
flashCam(255, 255, 255, 2)
playBGAnimation('halloweenBG', 'lightning', true, false)
playSound('thunder_1')
changeDadCharacter('crazygf', 100, 350)
end
if curStep == 766 then
flashCam(255, 255, 255, 2)
playBGAnimation('halloweenBG', 'lightning', true, false)
playSound('thunder_2')
changeBoyfriendCharacter('drunk-annie', 770, 150)
characterZoom('boyfriend', 1.2)
followBFYOffset = -50
end
if curStep == 896 then
setDefaultCamZoom(0.9)
flashCam(255, 255, 255, 2)
playSound('thunder_2')
changeDad1Character('amor-ex', 500, 170)
characterZoom('dad1', 0.9)
end
if curStep == 896 then
newIcons = true
swapIcons = false
changeDadCharacter('crazygf', 100, 350)
changeDadIconNew('crazygf-amor')
followDadXOffset = 200
end
if curStep == 928 then
flashCam(255, 255, 255, 2)
followDadXOffset = 100
playBGAnimation('halloweenBG', 'lightning', true, false)
playSound('thunder_1')
end
if curStep == 928 then
changeDadCharacter('taki', 50, 100)
fixTrail('dadTrail')
fixTrail('dad1Trail')
changeDadIconNew('taki-amor')
end
if curStep == 1056 then
setActorAlpha(0, 'dad1')
changeBoyfriend1Character('amor-ex', 550, 170)
characterZoom('boyfriend1', 0.9)
end
if curStep == 1056 then
followBFXOffset = -200
followBFYOffset = 0
flashCam(255, 255, 255, 2)
playBGAnimation('halloweenBG', 'lightning', true, false)
playSound('thunder_2')
changeBoyfriendCharacter('piconjo', 870, 300)
changeBFIconNew('piconjo-amor')
changeDadIconNew('taki')
fixTrail('bfTrail')
fixTrail('bf1Trail')
resetTrail('dad1Trail')
end
if curStep == 1184 then
setActorAlpha(1, 'dad1')
setActorAlpha(0, 'boyfriend1')
setActorX(550, 'dad1')
playActorAnimation('dad1', 'drop', true, false, 11)
changeBFIconNew('piconjo')
resetTrail('bf1Trail')
end
if curStep >= 1184 then
resetTrail('dad1Trail')
end
end
|
vim.diagnostic.config({
virtual_text = false,
})
vim.api.nvim_set_keymap(
"n", "<Space>d", ":lua vim.diagnostic.open_float()<CR>",
{ noremap = true, silent = true }
)
|
-- Copyright (c) 2020 Kirazy
-- Part of Bob's Logistics Belt Reskin
--
-- See LICENSE.md in the project directory for license information.
-- Set mod directory
local modDir = "__boblogistics-belt-reskin__"
-- Create animation sets
basic_transport_belt_animation_set =
{
animation_set =
{
filename = modDir.."/graphics/entity/basic-transport-belt/basic-transport-belt.png",
priority = "extra-high",
width = 64,
height = 64,
frame_count = 16,
direction_count = 20,
hr_version =
{
filename = modDir.."/graphics/entity/basic-transport-belt/hr-basic-transport-belt.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
frame_count = 16,
direction_count = 20
}
}
}
turbo_transport_belt_animation_set =
{
animation_set =
{
filename = modDir.."/graphics/entity/turbo-transport-belt/turbo-transport-belt.png",
priority = "extra-high",
width = 64,
height = 64,
frame_count = 32,
direction_count = 20,
hr_version =
{
filename = modDir.."/graphics/entity/turbo-transport-belt/hr-turbo-transport-belt.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
frame_count = 32,
direction_count = 20
}
}
}
ultimate_transport_belt_animation_set =
{
animation_set =
{
filename = modDir.."/graphics/entity/ultimate-transport-belt/ultimate-transport-belt.png",
priority = "extra-high",
width = 64,
height = 64,
frame_count = 32,
direction_count = 20,
hr_version =
{
filename = modDir.."/graphics/entity/ultimate-transport-belt/hr-ultimate-transport-belt.png",
priority = "extra-high",
width = 128,
height = 128,
scale = 0.5,
frame_count = 32,
direction_count = 20
}
}
}
|
--[[
DESCRIPTION:
This script makes a pop-up when the function 'AskDropAmount' is called. When the client clicks continue,
the script will run the callback function in the format: callback ( TheAmount, args... )
VARIABLES - GLOBAL:
n/a
FUNCTIONS - GLOBAL:
AskDropAmount ( ) -> Create the pop up window | Args: ( MaxNumber, LabelText, CallBackFunction, args... )
]]
local sx, sy = guiGetScreenSize ( )
local amount = { funct = { } }
function AskDropAmount ( a, text, callback, ... )
if not a then return end
local id = 1
while ( amount [ id ] ) do id = id + 1 end
amount[id] = { }
amount[id].window = guiCreateWindow((sx/2-313/2), (sy/2-153/2), 313, 153, "How much?", false)
guiWindowSetSizable(amount[id].window, false)
amount[id].tmpLbl = guiCreateLabel(22, 32, 266, 31, text, false, amount[id].window)
amount[id].amnt = guiCreateEdit(22, 63, 266, 29, "", false, amount[id].window)
amount[id].confirm = guiCreateButton(22, 102, 77, 28, "Continue ", false, amount[id].window)
amount[id].cancel = guiCreateButton(123, 102, 77, 28, "Cancel", false, amount[id].window)
setElementData ( amount[id].window, "TempID", id )
setElementData ( amount[id].tmpLbl, "TempID", id )
setElementData ( amount[id].amnt, "TempID", id )
setElementData ( amount[id].confirm, "TempID", id )
setElementData ( amount[id].cancel, "TempID", id )
setElementData ( amount[id].cancel, "BtnType", "Cancel" )
setElementData ( amount[id].confirm, "BtnType", "Confirm" )
addEventHandler ( "onClientGUIClick", amount[id].confirm, amount.funct.onClick )
addEventHandler ( "onClientGUIClick", amount[id].cancel, amount.funct.onClick )
addEventHandler ( "onClientGUIChanged", amount[id].amnt, amount.funct.onClick )
amount[id].misc = { }
amount[id].misc.callBack = callback
amount[id].misc.args = { ... }
amount[id].misc.maxNum = a
guiBringToFront ( amount[id].window )
end
function amount.funct.onClick ( )
local id = getElementData ( source, "TempID" )
if not id then return end
if ( eventName == "onClientGUIClick" ) then
local t = getElementData ( source, "BtnType" )
if not t then return end
if ( source == amount[id].cancel ) then
amount.funct.closeWindowID ( id )
elseif ( source == amount[id].confirm ) then
amount.funct.confirmWindow ( id )
end
elseif ( eventName == "onClientGUIChanged" ) then
local t = guiGetText ( source )
local m = amount[id].misc.maxNum
if ( t == "" ) then return end
local t = t:gsub ( "%a", "" );
local t = t:gsub ( "%s", "" );
local t = t:gsub ( "%p", "" );
guiSetText ( source, t )
if ( t ~= "" ) then
local t = tonumber ( t )
if ( t > m ) then
guiSetText ( source, m )
end
end
end
end
function amount.funct.confirmWindow ( id )
local d = amount [ id ]
if ( guiGetText(d.amnt) == "" ) then return end
d.misc.callBack ( tonumber(guiGetText(d.amnt)), unpack ( d.misc.args ))
amount.funct.closeWindowID ( id )
end
function amount.funct.closeWindowID ( id )
if ( not amount [ id ] ) then
return
end
if ( isElement ( amount[id].confirm ) ) then
removeEventHandler ( "onClientGUIClick", amount[id].confirm, amount.funct.onClick )
end if ( isElement ( amount[id].cancel ) ) then
removeEventHandler ( "onClientGUIClick", amount[id].cancel, amount.funct.onClick )
end
for i, v in pairs ( amount[id] ) do
if ( v and isElement ( v ) and string.sub ( getElementType ( v ), 0, 4 ) == "gui-" ) then
destroyElement ( v )
end
end
amount [ id ] = nil
end
|
local strict = require(script.Parent.strict)
local Assets = {
Sprites = {},
Slices = {
RoundBox = {
asset = 'rbxassetid://2773204550',
offset = Vector2.new(0, 0),
size = Vector2.new(32, 32),
center = Rect.new(4, 4, 4, 4),
},
},
Images = {
Logo = 'rbxassetid://5747479619',
Icon = 'rbxassetid://5747497742',
},
}
local function guardForTypos(name, map)
strict(name, map)
for key, child in pairs(map) do
if type(child) == 'table' then
guardForTypos(('%s.%s'):format(name, key), child)
end
end
end
guardForTypos('Assets', Assets)
return Assets
|
function reloadConfig(files)
doReload = false
for _,file in pairs(files) do
if file:sub(-4) == ".lua" then
doReload = true
end
end
if doReload then
showNotification('Hammerspoon', 'Config reloaded')
hs.reload()
end
end
hs.pathwatcher.new(os.getenv("HOME") .. "/Projects/dotfiles/hammerspoon/", reloadConfig):start()
-- Display an alert on the screen
function showAlert(text)
hs.alert.show(text)
end
-- Display a notification
function showNotification(title, body)
hs.notify.new({title=title, informativeText=body}):send()
end
|
--
-- make_solution.lua
-- Generate a solution-level makefile.
-- Copyright (c) 2002-2012 Jason Perkins and the Premake project
--
local make = premake.make
local solution = premake.solution
local project = premake.project
--
-- Generate a GNU make "solution" makefile, with support for the new platforms API.
--
function make.generate_solution(sln)
make.header(sln)
make.configmap(sln)
make.projects(sln)
_p('.PHONY: all clean help $(PROJECTS)')
_p('')
_p('all: $(PROJECTS)')
_p('')
make.projectrules(sln)
make.cleanrules(sln)
make.helprule(sln)
end
--
-- Write out the solution's configuration map, which maps solution
-- level configurations to the project level equivalents.
--
function make.configmap(sln)
for cfg in solution.eachconfig(sln) do
_p('ifeq ($(config),%s)', cfg.shortname)
for prj in solution.eachproject(sln) do
local prjcfg = project.getconfig(prj, cfg.buildcfg, cfg.platform)
if prjcfg then
_p(' %s_config = %s', make.tovar(prj.name), prjcfg.shortname)
end
end
_p('endif')
end
_p('')
end
--
-- Write out the rules for the `make clean` action.
--
function make.cleanrules(sln)
_p('clean:')
for prj in solution.eachproject(sln) do
local prjpath = project.getfilename(prj, make.getmakefilename(prj, true))
local prjdir = path.getdirectory(path.getrelative(sln.location, prjpath))
local prjname = path.getname(prjpath)
_x(1,'@${MAKE} --no-print-directory -C %s -f %s clean', prjdir, prjname)
end
_p('')
end
--
-- Write out the make file help rule and configurations list.
--
function make.helprule(sln)
_p('help:')
_p(1,'@echo "Usage: make [config=name] [target]"')
_p(1,'@echo ""')
_p(1,'@echo "CONFIGURATIONS:"')
for cfg in solution.eachconfig(sln) do
_x(1, '@echo " %s"', cfg.shortname)
end
_p(1,'@echo ""')
_p(1,'@echo "TARGETS:"')
_p(1,'@echo " all (default)"')
_p(1,'@echo " clean"')
for prj in solution.eachproject(sln) do
_p(1,'@echo " %s"', prj.name)
end
_p(1,'@echo ""')
_p(1,'@echo "For more information, see http://industriousone.com/premake/quick-start"')
end
--
-- Write out the list of projects that comprise the solution.
--
function make.projects(sln)
_p('PROJECTS := %s', table.concat(premake.esc(table.extract(sln.projects, "name")), " "))
_p('')
end
--
-- Write out the rules to build each of the solution's projects.
--
function make.projectrules(sln)
for prj in solution.eachproject(sln) do
local deps = project.getdependencies(prj)
deps = table.extract(deps, "name")
_p('%s:%s', premake.esc(prj.name), make.list(deps))
local cfgvar = make.tovar(prj.name)
_p('ifneq (,$(%s_config))', cfgvar)
_p(1,'@echo "==== Building %s ($(%s_config)) ===="', prj.name, cfgvar)
local prjpath = project.getfilename(prj, make.getmakefilename(prj, true))
local prjdir = path.getdirectory(path.getrelative(sln.location, prjpath))
local prjname = path.getname(prjpath)
_x(1,'@${MAKE} --no-print-directory -C %s -f %s config=$(%s_config)', prjdir, prjname, cfgvar)
_p('endif')
_p('')
end
end
|
System.define("Slipe.MtaDefinitions.MtaElement", {
})
System.define("Slipe.MtaDefinitions.MtaAccount", {
})
System.define("Slipe.MtaDefinitions.MtaTimer", {
})
System.define("Slipe.MtaDefinitions.MtaAcl", {
})
System.define("Slipe.MtaDefinitions.MtaAclGroup", {
})
System.define("Slipe.MtaDefinitions.MtaBan", {
})
System.define("Slipe.MtaDefinitions.MtaResource", {
})
System.define("Slipe.MtaDefinitions.MtaShared", {
GetBlipVisibleDistance = function(...) local results = {getBlipVisibleDistance(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetBlipColor = function(...) return System.tuple(getBlipColor(...)) end,
GetBlipOrdering = function(...) local results = {getBlipOrdering(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetBlipIcon = function(...) local results = {getBlipIcon(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetBlipSize = function(...) local results = {getBlipSize(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetBlipIcon = setBlipIcon,
SetBlipSize = setBlipSize,
SetBlipColor = setBlipColor,
GetClothesByTypeIndex = function(...) return System.tuple(getClothesByTypeIndex(...)) end,
SetBlipOrdering = setBlipOrdering,
GetClothesTypeName = function(...) local results = {getClothesTypeName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetBodyPartName = function(...) local results = {getBodyPartName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetBlipVisibleDistance = setBlipVisibleDistance,
GetTypeIndexFromClothes = function(...) return System.tuple(getTypeIndexFromClothes(...)) end,
CreateColCircle = function(...) local results = {createColCircle(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
CreateColRectangle = function(...) local results = {createColRectangle(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
CreateColCuboid = function(...) local results = {createColCuboid(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetColShapeType = function(...) local results = {getColShapeType(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementColShape = function(...) local results = {getElementColShape(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
CreateColTube = function(...) local results = {createColTube(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementsWithinColShape = function(...) local results = {getElementsWithinColShape(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
CreateColSphere = function(...) local results = {createColSphere(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
IsElementWithinColShape = isElementWithinColShape,
IsInsideColShape = isInsideColShape,
AttachElements = attachElements,
CreateColPolygon = function(...) local results = {createColPolygon(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetAttachedElements = function(...) local results = {getAttachedElements(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementAlpha = function(...) local results = {getElementAlpha(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
DestroyElement = destroyElement,
GetElementAttachedOffsets = function(...) return System.tuple(getElementAttachedOffsets(...)) end,
DetachElements = detachElements,
GetElementByID = function(...) local results = {getElementByID(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementCollisionsEnabled = getElementCollisionsEnabled,
CreateElement = function(...) local results = {createElement(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementAttachedTo = function(...) local results = {getElementAttachedTo(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementChild = function(...) local results = {getElementChild(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementChildrenCount = function(...) local results = {getElementChildrenCount(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementChildren = function(...) local results = {getElementChildren(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementDimension = function(...) local results = {getElementDimension(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementID = function(...) local results = {getElementID(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementData = function(...) local results = {getElementData(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementInterior = function(...) local results = {getElementInterior(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementParent = function(...) local results = {getElementParent(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementPosition = function(...) return System.tuple(getElementPosition(...)) end,
GetElementHealth = function(...) local results = {getElementHealth(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementModel = function(...) local results = {getElementModel(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementRotation = function(...) return System.tuple(getElementRotation(...)) end,
GetElementMatrix = function(...) local results = {getElementMatrix(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementType = function(...) local results = {getElementType(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetElementVelocity = function(...) return System.tuple(getElementVelocity(...)) end,
GetLowLODElement = function(...) local results = {getLowLODElement(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
IsElementAttached = isElementAttached,
IsElementCallPropagationEnabled = isElementCallPropagationEnabled,
IsElement = isElement,
GetRootElement = function(...) local results = {getRootElement(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
IsElementDoubleSided = isElementDoubleSided,
IsElementFrozen = isElementFrozen,
IsElementInWater = isElementInWater,
IsElementWithinMarker = isElementWithinMarker,
IsElementLowLOD = isElementLowLOD,
SetElementAngularVelocity = setElementAngularVelocity,
SetElementAttachedOffsets = setElementAttachedOffsets,
SetElementDoubleSided = setElementDoubleSided,
SetElementFrozen = setElementFrozen,
SetElementCallPropagationEnabled = setElementCallPropagationEnabled,
GetElementAngularVelocity = getElementAngularVelocity,
SetElementHealth = setElementHealth,
SetElementID = setElementID,
SetElementCollisionsEnabled = setElementCollisionsEnabled,
SetElementData = setElementData,
SetElementAlpha = setElementAlpha,
SetElementDimension = setElementDimension,
SetElementModel = setElementModel,
SetElementVelocity = setElementVelocity,
SetLowLODElement = setLowLODElement,
SetElementRotation = setElementRotation,
SetElementPosition = setElementPosition,
SetElementInterior = setElementInterior,
GetEventHandlers = function(...) local results = {getEventHandlers(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
AddEvent = addEvent,
AddEventHandler = function(event, src, handlerName, propagate, priorty) local splits = split(handlerName, ".") local result = _G for _, split in ipairs(splits) do result = result[split] end addEventHandler(event, src, function(...) result(event, client or source, ...) end, propagate, priorty) end,
SetElementParent = setElementParent,
TriggerEvent = triggerEvent,
FileDelete = fileDelete,
WasEventCancelled = wasEventCancelled,
FileFlush = fileFlush,
FileGetPath = function(...) local results = {fileGetPath(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
FileCopy = fileCopy,
FileClose = fileClose,
FileExists = fileExists,
FileCreate = function(...) local results = {fileCreate(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
FileIsEOF = fileIsEOF,
FileGetPos = function(...) local results = {fileGetPos(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
RemoveEventHandler = removeEventHandler,
FileRead = function(...) local results = {fileRead(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
FileGetSize = function(...) local results = {fileGetSize(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
HttpClear = httpClear,
FileRename = fileRename,
FileSetPos = function(...) local results = {fileSetPos(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
HttpSetResponseHeader = httpSetResponseHeader,
HttpWrite = httpWrite,
HttpRequestLogin = httpRequestLogin,
HttpSetResponseCode = httpSetResponseCode,
FileOpen = function(...) local results = {fileOpen(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
FileWrite = function(...) local results = {fileWrite(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
HttpSetResponseCookie = httpSetResponseCookie,
GetCommandHandlers = function(...) local results = {getCommandHandlers(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
RemoveCommandHandler = removeCommandHandler,
-- Removed because of deprecation
-- SetControlState = setControlState,
GetMarkerCount = function(...) local results = {getMarkerCount(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetMarkerColor = function(...) return System.tuple(getMarkerColor(...)) end,
GetMarkerIcon = function(...) local results = {getMarkerIcon(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetMarkerTarget = function(...) return System.tuple(getMarkerTarget(...)) end,
SetMarkerIcon = setMarkerIcon,
GetMarkerType = function(...) local results = {getMarkerType(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetMarkerColor = setMarkerColor,
GetMarkerSize = function(...) local results = {getMarkerSize(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetMarkerType = setMarkerType,
SetMarkerSize = setMarkerSize,
SetMarkerTarget = setMarkerTarget,
CreateObject = function(...) local results = {createObject(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetObjectScale = function(...) return System.tuple(getObjectScale(...)) end,
StopObject = stopObject,
MoveObject = moveObject,
SetObjectScale = setObjectScale,
OutputDebugString = outputDebugString,
GetPedOccupiedVehicle = function(...) local results = {getPedOccupiedVehicle(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedContactElement = function(...) local results = {getPedContactElement(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedClothes = function(...) return System.tuple(getPedClothes(...)) end,
AddPedClothes = addPedClothes,
GetPedArmor = function(...) local results = {getPedArmor(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedFightingStyle = function(...) local results = {getPedFightingStyle(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedAmmoInClip = function(...) local results = {getPedAmmoInClip(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedOccupiedVehicleSeat = function(...) local results = {getPedOccupiedVehicleSeat(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedWeaponSlot = function(...) local results = {getPedWeaponSlot(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedTarget = function(...) local results = {getPedTarget(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedTotalAmmo = function(...) local results = {getPedTotalAmmo(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedWalkingStyle = function(...) local results = {getPedWalkingStyle(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedStat = function(...) local results = {getPedStat(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPedWeapon = function(...) local results = {getPedWeapon(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetValidPedModels = function(...) local results = {getValidPedModels(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
IsPedDead = isPedDead,
IsPedChoking = isPedChoking,
IsPedDoingGangDriveby = isPedDoingGangDriveby,
IsPedDucked = isPedDucked,
IsPedHeadless = isPedHeadless,
IsPedOnFire = isPedOnFire,
IsPedOnGround = isPedOnGround,
IsPedWearingJetpack = isPedWearingJetpack,
IsPedInVehicle = isPedInVehicle,
RemovePedFromVehicle = removePedFromVehicle,
KillPed = killPed,
RemovePedClothes = removePedClothes,
SetPedAnimation = setPedAnimation,
SetPedAnimationProgress = setPedAnimationProgress,
SetPedAnimationSpeed = setPedAnimationSpeed,
SetPedHeadless = setPedHeadless,
SetPedDoingGangDriveby = setPedDoingGangDriveby,
SetPedOnFire = setPedOnFire,
SetPedStat = setPedStat,
SetPedWeaponSlot = setPedWeaponSlot,
SetPedWalkingStyle = setPedWalkingStyle,
WarpPedIntoVehicle = warpPedIntoVehicle,
GetPickupAmmo = function(...) local results = {getPickupAmmo(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPickupWeapon = function(...) local results = {getPickupWeapon(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPickupAmount = function(...) local results = {getPickupAmount(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
CreatePickup = function(...) local results = {createPickup(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPickupType = function(...) local results = {getPickupType(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
UsePickup = usePickup,
SetPickupType = setPickupType,
GetPlayerFromName = function(...) local results = {getPlayerFromName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPlayerName = function(...) local results = {getPlayerName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPlayerNametagColor = function(...) return System.tuple(getPlayerNametagColor(...)) end,
GetPlayerNametagText = function(...) local results = {getPlayerNametagText(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPlayerTeam = function(...) local results = {getPlayerTeam(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
IsPlayerNametagShowing = isPlayerNametagShowing,
GetPlayerPing = function(...) local results = {getPlayerPing(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
IsVoiceEnabled = isVoiceEnabled,
SetPlayerNametagShowing = setPlayerNametagShowing,
SetPlayerNametagText = setPlayerNametagText,
SetPlayerNametagColor = setPlayerNametagColor,
CreateRadarArea = function(...) local results = {createRadarArea(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
IsRadarAreaFlashing = isRadarAreaFlashing,
GetRadarAreaColor = function(...) return System.tuple(getRadarAreaColor(...)) end,
GetRadarAreaSize = function(...) return System.tuple(getRadarAreaSize(...)) end,
SetRadarAreaSize = setRadarAreaSize,
SetRadarAreaColor = setRadarAreaColor,
SetRadarAreaFlashing = setRadarAreaFlashing,
IsInsideRadarArea = isInsideRadarArea,
Call = function(...) local results = {call(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetResourceDynamicElementRoot = function(...) local results = {getResourceDynamicElementRoot(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
FetchRemote = fetchRemote,
GetResourceExportedFunctions = function(...) local results = {getResourceExportedFunctions(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetResourceConfig = function(...) local results = {getResourceConfig(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetResourceFromName = function(...) local results = {getResourceFromName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetResourceState = function(...) local results = {getResourceState(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetResourceName = function(...) local results = {getResourceName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetResourceRootElement = function(...) local results = {getResourceRootElement(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetThisResource = function(...) local results = {getThisResource(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetFPSLimit = function(...) local results = {getFPSLimit(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVersion = function(...) local results = {getVersion(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetFPSLimit = setFPSLimit,
GetTeamName = function(...) local results = {getTeamName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetTeamFriendlyFire = getTeamFriendlyFire,
CountPlayersInTeam = function(...) local results = {countPlayersInTeam(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetTeamFromName = function(...) local results = {getTeamFromName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPlayersInTeam = function(...) local results = {getPlayersInTeam(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetTeamColor = function(...) return System.tuple(getTeamColor(...)) end,
BitNot = function(...) local results = {bitNot(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
BitAnd = function(...) local results = {bitAnd(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Base64Encode = function(...) local results = {base64Encode(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Base64Decode = function(...) local results = {base64Decode(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
AddDebugHook = addDebugHook,
BitXor = function(...) local results = {bitXor(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
BitTest = bitTest,
BitOr = function(...) local results = {bitOr(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
BitLRotate = function(...) local results = {bitLRotate(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
BitRRotate = function(...) local results = {bitRRotate(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
BitLShift = function(...) local results = {bitLShift(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
BitArShift = function(...) local results = {bitArShift(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
BitReplace = function(...) local results = {bitReplace(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
BitRShift = function(...) local results = {bitRShift(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
BitExtract = function(...) local results = {bitExtract(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
EncodeString = function(...) local results = {encodeString(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
DecodeString = function(...) local results = {decodeString(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetDistanceBetweenPoints2D = function(...) local results = {getDistanceBetweenPoints2D(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetColorFromString = function(...) return System.tuple(getColorFromString(...)) end,
FromJSON = function(...) local results = {fromJSON(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
DebugSleep = debugSleep,
GetDevelopmentMode = getDevelopmentMode,
GetEasingValue = function(...) local results = {getEasingValue(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetDistanceBetweenPoints3D = function(...) local results = {getDistanceBetweenPoints3D(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetNetworkUsageData = function(...) local results = {getNetworkUsageData(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetPerformanceStats = function(...) return System.tuple(getPerformanceStats(...)) end,
GetRealTime = function(...) local results = {getRealTime(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetTickCount = function(...) local results = {getTickCount(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetUserdataType = function(...) local results = {getUserdataType(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetTimerDetails = function(...) return System.tuple(getTimerDetails(...)) end,
Gettok = function(...) local results = {gettok(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Hash = function(...) local results = {hash(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Iprint = iprint,
IsOOPEnabled = isOOPEnabled,
GetTimers = function(...) local results = {getTimers(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Inspect = function(...) local results = {inspect(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
IsTimer = isTimer,
KillTimer = killTimer,
PasswordHash = function(...) local results = {passwordHash(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
PasswordVerify = passwordVerify,
Md5 = function(...) local results = {md5(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
InterpolateBetween = function(...) return System.tuple(interpolateBetween(...)) end,
PregFind = pregFind,
ResetTimer = resetTimer,
PregReplace = function(...) local results = {pregReplace(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
RemoveDebugHook = removeDebugHook,
PregMatch = function(...) local results = {pregMatch(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
TeaDecode = function(...) local results = {teaDecode(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetDevelopmentMode = setDevelopmentMode,
ToJSON = function(...) local results = {toJSON(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetTimer = function(...) local results = {setTimer(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
UtfChar = function(...) local results = {utfChar(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
UtfCode = function(...) local results = {utfCode(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Split = function(...) local results = {split(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
UtfLen = function(...) local results = {utfLen(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Tocolor = function(...) local results = {tocolor(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
UtfSub = function(...) local results = {utfSub(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_escape = function(...) local results = {utf8.escape(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Sha256 = function(...) local results = {sha256(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_char = function(...) local results = {utf8.char(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
TeaEncode = function(...) local results = {teaEncode(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
UtfSeek = function(...) local results = {utfSeek(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_find = function(...) local results = {utf8.find(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_match = function(...) local results = {utf8.match(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_gmatch = function(...) local results = {utf8.gmatch(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_charpos = function(...) return System.tuple(utf8.charpos(...)) end,
Utf8_byte = function(...) local results = {utf8.byte(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_ncasecmp = function(...) local results = {utf8.ncasecmp(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_fold = function(...) local results = {utf8.fold(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_gsub = function(...) local results = {utf8.gsub(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_len = function(...) local results = {utf8.len(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_insert = function(...) local results = {utf8.insert(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_next = function(...) return System.tuple(utf8.next(...)) end,
Utf8_reverse = function(...) local results = {utf8.reverse(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_remove = function(...) local results = {utf8.remove(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_title = function(...) local results = {utf8.title(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_width = function(...) local results = {utf8.width(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
Utf8_sub = function(...) local results = {utf8.sub(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
AttachTrailerToVehicle = attachTrailerToVehicle,
Utf8_widthindex = function(...) return System.tuple(utf8.widthindex(...)) end,
AddVehicleUpgrade = addVehicleUpgrade,
GetTrainPosition = function(...) local results = {getTrainPosition(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
FixVehicle = fixVehicle,
DetachTrailerFromVehicle = detachTrailerFromVehicle,
GetTrainDirection = getTrainDirection,
GetTrainSpeed = function(...) local results = {getTrainSpeed(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetTrainTrack = function(...) local results = {getTrainTrack(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetOriginalHandling = function(...) local results = {getOriginalHandling(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleController = function(...) local results = {getVehicleController(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleEngineState = getVehicleEngineState,
GetVehicleHeadLightColor = function(...) return System.tuple(getVehicleHeadLightColor(...)) end,
GetVehicleDoorState = function(...) local results = {getVehicleDoorState(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleDoorOpenRatio = function(...) local results = {getVehicleDoorOpenRatio(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleColor = function(...) return System.tuple(getVehicleColor(...)) end,
GetVehicleName = function(...) local results = {getVehicleName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleNameFromModel = function(...) local results = {getVehicleNameFromModel(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleCompatibleUpgrades = function(...) local results = {getVehicleCompatibleUpgrades(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleLandingGearDown = getVehicleLandingGearDown,
GetVehicleModelFromName = function(...) local results = {getVehicleModelFromName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleLightState = function(...) local results = {getVehicleLightState(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleHandling = function(...) local results = {getVehicleHandling(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehiclePaintjob = function(...) local results = {getVehiclePaintjob(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleOccupant = function(...) local results = {getVehicleOccupant(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleOverrideLights = function(...) local results = {getVehicleOverrideLights(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleMaxPassengers = function(...) local results = {getVehicleMaxPassengers(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehiclePanelState = function(...) local results = {getVehiclePanelState(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleSirensOn = getVehicleSirensOn,
GetVehicleOccupants = function(...) local results = {getVehicleOccupants(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleSirenParams = function(...) local results = {getVehicleSirenParams(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehiclePlateText = function(...) local results = {getVehiclePlateText(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleTowedByVehicle = function(...) local results = {getVehicleTowedByVehicle(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleSirens = function(...) local results = {getVehicleSirens(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleUpgradeSlotName = function(...) local results = {getVehicleUpgradeSlotName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleVariant = function(...) return System.tuple(getVehicleVariant(...)) end,
IsVehicleFuelTankExplodable = isVehicleFuelTankExplodable,
GetVehicleTurretPosition = function(...) return System.tuple(getVehicleTurretPosition(...)) end,
GetVehicleType = function(...) local results = {getVehicleType(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleTowingVehicle = function(...) local results = {getVehicleTowingVehicle(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
IsTrainDerailable = isTrainDerailable,
GetVehicleUpgrades = function(...) local results = {getVehicleUpgrades(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetVehicleUpgradeOnSlot = function(...) local results = {getVehicleUpgradeOnSlot(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
IsVehicleDamageProof = isVehicleDamageProof,
IsTrainDerailed = isTrainDerailed,
IsVehicleBlown = isVehicleBlown,
GetVehicleWheelStates = function(...) return System.tuple(getVehicleWheelStates(...)) end,
RemoveVehicleUpgrade = removeVehicleUpgrade,
SetTrainDerailable = setTrainDerailable,
IsVehicleTaxiLightOn = isVehicleTaxiLightOn,
SetTrainDirection = setTrainDirection,
IsVehicleOnGround = isVehicleOnGround,
IsVehicleLocked = isVehicleLocked,
SetTrainSpeed = setTrainSpeed,
SetTrainDerailed = setTrainDerailed,
SetVehicleHeadLightColor = setVehicleHeadLightColor,
SetVehicleDoorOpenRatio = setVehicleDoorOpenRatio,
SetVehicleColor = setVehicleColor,
SetTrainPosition = setTrainPosition,
SetTrainTrack = setTrainTrack,
SetVehicleDoorsUndamageable = setVehicleDoorsUndamageable,
SetVehicleFuelTankExplodable = setVehicleFuelTankExplodable,
SetVehicleDoorState = setVehicleDoorState,
SetVehicleEngineState = setVehicleEngineState,
SetVehicleLandingGearDown = setVehicleLandingGearDown,
ResetWaterLevel = resetWaterLevel,
SetVehicleLocked = setVehicleLocked,
SetVehiclePaintjob = setVehiclePaintjob,
GetWaterColor = function(...) return System.tuple(getWaterColor(...)) end,
ResetWaterColor = resetWaterColor,
SetVehicleTurretPosition = setVehicleTurretPosition,
GetWaveHeight = function(...) local results = {getWaveHeight(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetVehicleLightState = setVehicleLightState,
SetVehicleHandling = setVehicleHandling,
GetSlotFromWeapon = function(...) local results = {getSlotFromWeapon(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetWaterVertexPosition = function(...) return System.tuple(getWaterVertexPosition(...)) end,
SetVehicleTaxiLightOn = setVehicleTaxiLightOn,
SetWaterColor = setWaterColor,
SetVehiclePlateText = setVehiclePlateText,
CreateWater = function(...) local results = {createWater(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetVehiclePanelState = setVehiclePanelState,
GetWeaponIDFromName = function(...) local results = {getWeaponIDFromName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetVehicleWheelStates = setVehicleWheelStates,
GetGravity = function(...) local results = {getGravity(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetRainLevel = function(...) local results = {getRainLevel(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetVehicleSirens = setVehicleSirens,
GetWeaponNameFromID = function(...) local results = {getWeaponNameFromID(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetVehicleSirensOn = setVehicleSirensOn,
SetWaterVertexPosition = setWaterVertexPosition,
IsGarageOpen = isGarageOpen,
GetHeatHaze = function(...)
local args = {getHeatHaze(...)}
local primaryArguments = {}
local secondaryArguments = {}
for i = 1, 7 do
primaryArguments[i] = args[i]
end
for i = 8, #args do
secondaryArguments[i + 7] = args[i]
end
local secondaryTuple = System.Tuple(unpack(secondaryArguments))
primaryArguments[8] = secondaryTuple
return System.Tuple(unpack(primaryArguments))
end,
GetOcclusionsEnabled = getOcclusionsEnabled,
GetJetpackMaxHeight = function(...) local results = {getJetpackMaxHeight(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetOriginalWeaponProperty = function(...) local results = {getOriginalWeaponProperty(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetSkyGradient = function(...) return System.tuple(getSkyGradient(...)) end,
SetWaterLevel = setWaterLevel,
SetWeaponAmmo = setWeaponAmmo,
GetTrafficLightState = function(...) local results = {getTrafficLightState(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetGameSpeed = function(...) local results = {getGameSpeed(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetMinuteDuration = function(...) local results = {getMinuteDuration(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetWeather = function(...) return System.tuple(getWeather(...)) end,
ResetSunColor = resetSunColor,
GetSunSize = function(...) local results = {getSunSize(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetWaveHeight = setWaveHeight,
GetWeaponProperty = function(...) local results = {getWeaponProperty(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetFogDistance = function(...) local results = {getFogDistance(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetTime = function(...) return System.tuple(getTime(...)) end,
GetWindVelocity = function(...) return System.tuple(getWindVelocity(...)) end,
GetMoonSize = function(...) local results = {getMoonSize(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetSunColor = function(...) return System.tuple(getSunColor(...)) end,
SetVehicleDamageProof = setVehicleDamageProof,
RemoveWorldModel = removeWorldModel,
ResetSunSize = resetSunSize,
SetMinuteDuration = setMinuteDuration,
SetCloudsEnabled = setCloudsEnabled,
SetAircraftMaxVelocity = setAircraftMaxVelocity,
SetFogDistance = setFogDistance,
RestoreWorldModel = restoreWorldModel,
SetTrafficLightsLocked = setTrafficLightsLocked,
ResetFogDistance = resetFogDistance,
SetInteriorSoundsEnabled = setInteriorSoundsEnabled,
ResetFarClipDistance = resetFarClipDistance,
ResetHeatHaze = resetHeatHaze,
SetGameSpeed = setGameSpeed,
ResetWindVelocity = resetWindVelocity,
SetGarageOpen = setGarageOpen,
SetWeatherBlended = setWeatherBlended,
ResetSkyGradient = resetSkyGradient,
ResetRainLevel = resetRainLevel,
SetGravity = setGravity,
GetZoneName = function(...) local results = {getZoneName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetHeatHaze = setHeatHaze,
ResetMoonSize = resetMoonSize,
SetSkyGradient = setSkyGradient,
SetWeather = setWeather,
XmlNodeGetAttribute = function(...) local results = {xmlNodeGetAttribute(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetOcclusionsEnabled = setOcclusionsEnabled,
SetRainLevel = setRainLevel,
SetFarClipDistance = setFarClipDistance,
SetTrafficLightState = setTrafficLightState,
SetTime = setTime,
RestoreAllWorldModels = restoreAllWorldModels,
XmlDestroyNode = xmlDestroyNode,
XmlLoadFile = function(...) local results = {xmlLoadFile(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetWindVelocity = setWindVelocity,
SetVehicleOverrideLights = setVehicleOverrideLights,
SetMoonSize = setMoonSize,
XmlSaveFile = xmlSaveFile,
GetAircraftMaxVelocity = function(...) local results = {getAircraftMaxVelocity(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
XmlCreateChild = function(...) local results = {xmlCreateChild(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
XmlNodeGetValue = function(...) local results = {xmlNodeGetValue(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetSunSize = setSunSize,
XmlNodeGetAttributes = function(...) local results = {xmlNodeGetAttributes(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
XmlNodeGetChildren = function(...) local results = {xmlNodeGetChildren(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
XmlNodeGetName = function(...) local results = {xmlNodeGetName(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
XmlFindChild = function(...) local results = {xmlFindChild(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
GetFarClipDistance = function(...) local results = {getFarClipDistance(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
XmlUnloadFile = xmlUnloadFile,
XmlCreateFile = function(...) local results = {xmlCreateFile(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
XmlNodeSetAttribute = xmlNodeSetAttribute,
XmlNodeGetParent = function(...) local results = {xmlNodeGetParent(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
XmlNodeSetValue = xmlNodeSetValue,
XmlNodeSetName = xmlNodeSetName,
AreTrafficLightsLocked = areTrafficLightsLocked,
GetCloudsEnabled = getCloudsEnabled,
XmlCopyFile = function(...) local results = {xmlCopyFile(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetWeaponProperty = setWeaponProperty,
SetSunColor = setSunColor,
GetElementsWithinRange = function(...) local results = {getElementsWithinRange(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetVehicleDirtLevel = setVehicleDirtLevel,
GetAircraftMaxHeight = function(...) local results = {getAircraftMaxHeight(...)} if results[1] == false then System.throw(Slipe.MtaDefinitions.MtaException()) return end return unpack(results) end,
SetJetpackMaxHeight = setJetpackMaxHeight,
SetAircraftMaxHeight = setAircraftMaxHeight,
GetListFromTable = function(table, listType) return System.listFromTable(table, listType) end,
GetArrayFromTable = function(table, arrayType) return System.arrayFromTable(table, arrayType) end,
GetDictionaryFromTable = function(table, tKey, tValue) return System.dictionaryFromTable(table, tKey, tValue) end,
GetDateTimeFromSecondStamp = function(seconds)
local ts = getRealTime(seconds)
return System.DateTime(ts.year + 1900, ts.month + 1, ts.monthday, ts.hour, ts.minute, ts.second)
end,
})
System.define("Slipe.MtaDefinitions.MtaException", {
__tostring = function()
return "";
end,
__inherits__ = { System.Exception },
__ctor__ = function(this, message, innerException)
this.message = "MTA Has thrown an exception"
this.innerException = innerException
end
})
System.define("Slipe.MtaDefinitions.MtaPasswords", {
Hash = function(input, cost)
local options = {}
options.cost = cost
local task, callback = System.Task.Callback(function(...) return ... end)
passwordHash(input, "bcrypt", options, callback)
return task
end,
Verify = function(input, hash)
local task, callback = System.Task.Callback(function(...) return ... end)
passwordVerify(input, hash, {}, callback)
return task
end
})
|
return function(url)
if url == nil then
url = '/haproxy?monitor'
end
return function(req, res, continue)
if req.url == url then
res:send(200, nil, { })
else
continue()
end
return
end
end
|
c=10
r=10
w=5
neigh=0
land = {}
for i=1,c do
land[i] = {}
for j=1,r do
land[i][j] = 0
end
end
function print_land()
for i = 1, c+2 do
io.write('*')
end
print('')
for i = 1, c do
io.write('*')
for j = 1, r do
if land[i][j] == 0 then
io.write(' ')
end
if land[i][j] == 1 then
io.write('+')
end
if land[i][j] == 2 then
io.write('o')
end
end
print('*')
end
for i = 1, c+2 do
io.write('*')
end
print('')
end
math.randomseed(tostring(os.time()):reverse():sub(1,6))
for i=1,c do
for j=1,r do
local v = math.random(100)
-- print('v:'..v)
land[i][j] = v
if(v<66) then
land[i][j] = 0
elseif v<90 then
land[i][j] = 1
else
land[i][j] = 2
end
end
end
--next step
--land[2][2], land[2][3], land[2][4] = 1, 1, 1
-- land[2][2], land[3][2], land[4][2], land[5][1] = 1, 2, 1, 2
print_land()
function next_gen()
next = {}
for i=1,c do
next[i] = {}
for j=1,r do
next[i][j] = 0
end
end
for i = 1, c do
for j = 1, r do
local s = 0
local b = 0
local w = 0
local life_i_j = 0
if land[i][j] > 0 then
life_i_j = 1
-- if land[i][j] == 1 then
-- b = 1
-- end
-- if land[i][j] == 2 then
-- w = 1
-- end
end
for p = i-1,i+1 do
for q = j-1,j+1 do
if p > 0 and p <= c and q > 0 and q <= r then
if land[p][q] > 0 then
s = s + 1
end
if land[p][q] == 1 then
b = b + 1
end
if land[p][q] == 2 then
w = w + 1
end
end
end
end
s = s - life_i_j
-- print('i:'..i..'j:'..j)
-- print('s:'..s)
-- print('b:'..b)
-- print('w:'..w)
if s == 3 or (s+life_i_j) == 3 then
if life_i_j == 0 then
if b > w then
next[i][j] = 1
end
if w > b then
next[i][j] = 2
end
else
next[i][j] = land[i][j]
end
else
next[i][j] = 0
end
end
end
return next
end
for l=1,50 do
land = next_gen()
print_land()
end
|
Set = {}
Set.mt = {}
Set.new = function (t)
local set = {}
setmetatable(set, Set.mt)
for _, k in ipairs(t) do set[k] = true end
return set
end
Set.union = function (a, b)
local res = Set.new{}
for k in pairs(a) do res[k] = true end
for k in pairs(b) do res[k] = true end
return res
end
Set.intersection = function (a, b)
local res = Set.new{}
for k in pairs(a) do
res[k] = b[k]
end
return res
end
Set.tostring = function (set)
local s = "{"
local sep = ""
for e in pairs(set) do
s = s .. sep .. e
sep = ", "
end
return s .. "}"
end
Set.print = function (set)
print(Set.tostring(set))
end
Set.mt.__add = Set.union
Set.mt.__mul = Set.intersection
a = Set.new{1,2,3,4,5,6}
b = Set.new{1,3,5,7}
Set.print(a)
Set.print(b)
Set.print(a + b)
Set.print(a * b)
-- {1, 2, 3, 4, 5, 6}
-- {1, 7, 5, 3}
-- {1, 2, 3, 4, 5, 6, 7}
-- {1, 5, 3}
|
local ffi = require("ffi")
ffi.cdef[[
enum {
/* These describe the color_type field in png_info. */
/* color type masks */
PNG_COLOR_MASK_PALETTE =1,
PNG_COLOR_MASK_COLOR =2,
PNG_COLOR_MASK_ALPHA =4,
};
enum {
/* color types. Note that not all combinations are legal */
PNG_COLOR_TYPE_GRAY =0,
PNG_COLOR_TYPE_PALETTE =3,
PNG_COLOR_TYPE_RGB =2,
PNG_COLOR_TYPE_RGB_ALPHA =6,
PNG_COLOR_TYPE_GRAY_ALPHA =4,
/* aliases */
PNG_COLOR_TYPE_RGBA =6,
PNG_COLOR_TYPE_GA =6
};
/* This is for compression type. PNG 1.0-1.2 only define the single type. */
enum {
PNG_COMPRESSION_TYPE_BASE =0 ,/* Deflate method 8, 32K window */
PNG_COMPRESSION_TYPE_DEFAULT =0
};
/* This is for filter type. PNG 1.0-1.2 only define the single type. */
enum {
PNG_FILTER_TYPE_BASE =0, /* Single row per-byte filtering */
PNG_INTRAPIXEL_DIFFERENCING =64, /* Used only in MNG datastreams */
PNG_FILTER_TYPE_DEFAULT =0
};
/* These are for the interlacing type. These values should NOT be changed. */
enum {
PNG_INTERLACE_NONE =0, /* Non-interlaced image */
PNG_INTERLACE_ADAM7 =1, /* Adam7 interlacing */
PNG_INTERLACE_LAST =2 /* Not a valid value */
};
/* These are for the oFFs chunk. These values should NOT be changed. */
enum {
PNG_OFFSET_PIXEL =0, /* Offset in pixels */
PNG_OFFSET_MICROMETER =1, /* Offset in micrometers (1/10^6 meter) */
PNG_OFFSET_LAST =2 /* Not a valid value */
};
/* These are for the pCAL chunk. These values should NOT be changed. */
enum {
PNG_EQUATION_LINEAR =0, /* Linear transformation */
PNG_EQUATION_BASE_E =1, /* Exponential base e transform */
PNG_EQUATION_ARBITRARY =2, /* Arbitrary base exponential transform */
PNG_EQUATION_HYPERBOLIC =3, /* Hyperbolic sine transformation */
PNG_EQUATION_LAST =4 /* Not a valid value */\
};
/* These are for the sCAL chunk. These values should NOT be changed. */
enum{
PNG_SCALE_UNKNOWN =0, /* unknown unit (image scale) */
PNG_SCALE_METER =1, /* meters per pixel */
PNG_SCALE_RADIAN =2, /* radians per pixel */
PNG_SCALE_LAST =3 /* Not a valid value */
};
/* These are for the pHYs chunk. These values should NOT be changed. */
enum {
PNG_RESOLUTION_UNKNOWN =0, /* pixels/unknown unit (aspect ratio) */
PNG_RESOLUTION_METER =1, /* pixels/meter */
PNG_RESOLUTION_LAST =2 /* Not a valid value */
};
enum{
/* These are for the sRGB chunk. These values should NOT be changed. */
PNG_sRGB_INTENT_PERCEPTUAL =0,
PNG_sRGB_INTENT_RELATIVE =1,
PNG_sRGB_INTENT_SATURATION =2,
PNG_sRGB_INTENT_ABSOLUTE =3,
PNG_sRGB_INTENT_LAST =4, /* Not a valid value */
/* This is for text chunks */
PNG_KEYWORD_MAX_LENGTH =79,
/* Maximum number of entries in PLTE/sPLT/tRNS arrays */
PNG_MAX_PALETTE_LENGTH =256
};
enum {
PNG_INFO_gAMA =0x0001,
PNG_INFO_sBIT =0x0002,
PNG_INFO_cHRM =0x0004,
PNG_INFO_PLTE =0x0008,
PNG_INFO_tRNS =0x0010,
PNG_INFO_bKGD =0x0020,
PNG_INFO_hIST =0x0040,
PNG_INFO_pHYs =0x0080,
PNG_INFO_oFFs =0x0100,
PNG_INFO_tIME =0x0200,
PNG_INFO_pCAL =0x0400,
PNG_INFO_sRGB =0x0800, /* GR-P, 0.96a */
PNG_INFO_iCCP =0x1000, /* ESR, 1.0.6 */
PNG_INFO_sPLT =0x2000, /* ESR, 1.0.6 */
PNG_INFO_sCAL =0x4000, /* ESR, 1.0.6 */
PNG_INFO_IDAT =0x8000 /* ESR, 1.0.6 */
};
enum {
PNG_FILLER_BEFORE = 0,
PNG_FILLER_AFTER = 1
};
typedef int jmp_buf[(9 * 2) + 3 + 16];
typedef int FILE;
typedef unsigned int png_uint_32;
typedef int png_int_32;
typedef unsigned short png_uint_16;
typedef short png_int_16;
typedef unsigned char png_byte;
typedef size_t png_size_t;
typedef png_int_32 png_fixed_point;
typedef void * png_voidp;
typedef png_byte * png_bytep;
typedef png_uint_32 * png_uint_32p;
typedef png_int_32 * png_int_32p;
typedef png_uint_16 * png_uint_16p;
typedef png_int_16 * png_int_16p;
typedef const char * png_const_charp;
typedef char * png_charp;
typedef png_fixed_point * png_fixed_point_p;
typedef FILE * png_FILE_p;
typedef double * png_doublep;
typedef png_byte * * png_bytepp;
typedef png_uint_32 * * png_uint_32pp;
typedef png_int_32 * * png_int_32pp;
typedef png_uint_16 * * png_uint_16pp;
typedef png_int_16 * * png_int_16pp;
typedef const char * * png_const_charpp;
typedef char * * png_charpp;
typedef png_fixed_point * * png_fixed_point_pp;
typedef double * * png_doublepp;
typedef char * * * png_charppp;
typedef png_size_t png_alloc_size_t;
typedef struct png_color_struct {
uint8_t red;
uint8_t green;
uint8_t blue;
} png_color, *png_colorp, **png_colorpp;
typedef struct png_color_16_struct {
uint8_t index;
uint16_t red;
uint16_t green;
uint16_t blue;
uint16_t gray;
} png_color_16, *png_color_16p, *png_color_16pp;
typedef struct png_color_8_struct
{
png_byte red;
png_byte green;
png_byte blue;
png_byte gray;
png_byte alpha;
} png_color_8;
typedef png_color_8 * png_color_8p;
typedef png_color_8 * * png_color_8pp;
typedef struct png_sPLT_entry_struct
{
png_uint_16 red;
png_uint_16 green;
png_uint_16 blue;
png_uint_16 alpha;
png_uint_16 frequency;
} png_sPLT_entry;
typedef png_sPLT_entry * png_sPLT_entryp;
typedef png_sPLT_entry * * png_sPLT_entrypp;
typedef struct png_sPLT_struct
{
png_charp name;
png_byte depth;
png_sPLT_entryp entries;
png_int_32 nentries;
} png_sPLT_t;
typedef png_sPLT_t * png_sPLT_tp;
typedef png_sPLT_t * * png_sPLT_tpp;
typedef struct png_text_struct
{
int compression;
png_charp key;
png_charp text;
png_size_t text_length;
png_size_t itxt_length;
png_charp lang;
png_charp lang_key;
} png_text;
typedef png_text * png_textp;
typedef png_text * * png_textpp;
typedef struct png_time_struct
{
png_uint_16 year;
png_byte month;
png_byte day;
png_byte hour;
png_byte minute;
png_byte second;
} png_time;
typedef png_time * png_timep;
typedef png_time * * png_timepp;
typedef struct png_unknown_chunk_t
{
png_byte name[5];
png_byte *data;
png_size_t size;
png_byte location;
}
png_unknown_chunk;
typedef png_unknown_chunk * png_unknown_chunkp;
typedef png_unknown_chunk * * png_unknown_chunkpp;
typedef void * (*alloc_func) (void * opaque, unsigned int items, unsigned int size);
typedef void (*free_func) (void * opaque, void * address);
struct internal_state;
typedef struct z_stream_s {
unsigned char *next_in; /* next input byte */
unsigned int avail_in; /* number of bytes available at next_in */
unsigned long total_in; /* total nb of input bytes read so far */
unsigned char *next_out; /* next output byte should be put there */
unsigned int avail_out; /* remaining free space at next_out */
unsigned long total_out; /* total nb of bytes output so far */
char *msg; /* last error message, NULL if no error */
struct internal_state *state; /* not visible by applications */
alloc_func zalloc; /* used to allocate the internal state */
free_func zfree; /* used to free the internal state */
void * opaque; /* private data object passed to zalloc and zfree */
int data_type; /* best guess about the data type: ascii or binary */
unsigned long adler; /* adler32 value of the uncompressed data */
unsigned long reserved; /* reserved for future use */
} z_stream;
typedef struct png_info_struct
{
png_uint_32 width __attribute__((__deprecated__));
png_uint_32 height __attribute__((__deprecated__));
png_uint_32 valid __attribute__((__deprecated__));
png_size_t rowbytes __attribute__((__deprecated__));
png_colorp palette __attribute__((__deprecated__));
png_uint_16 num_palette __attribute__((__deprecated__));
png_uint_16 num_trans __attribute__((__deprecated__));
png_byte bit_depth __attribute__((__deprecated__));
png_byte color_type __attribute__((__deprecated__));
png_byte compression_type __attribute__((__deprecated__));
png_byte filter_type __attribute__((__deprecated__));
png_byte interlace_type __attribute__((__deprecated__));
png_byte channels __attribute__((__deprecated__));
png_byte pixel_depth __attribute__((__deprecated__));
png_byte spare_byte __attribute__((__deprecated__));
png_byte signature[8] __attribute__((__deprecated__));
float gamma __attribute__((__deprecated__));
png_byte srgb_intent __attribute__((__deprecated__));
int num_text __attribute__((__deprecated__));
int max_text __attribute__((__deprecated__));
png_textp text __attribute__((__deprecated__));
png_time mod_time __attribute__((__deprecated__));
png_color_8 sig_bit __attribute__((__deprecated__));
png_bytep trans_alpha __attribute__((__deprecated__));
png_color_16 trans_color __attribute__((__deprecated__));
png_color_16 background __attribute__((__deprecated__));
png_int_32 x_offset __attribute__((__deprecated__));
png_int_32 y_offset __attribute__((__deprecated__));
png_byte offset_unit_type __attribute__((__deprecated__));
png_uint_32 x_pixels_per_unit __attribute__((__deprecated__));
png_uint_32 y_pixels_per_unit __attribute__((__deprecated__));
png_byte phys_unit_type __attribute__((__deprecated__));
png_uint_16p hist __attribute__((__deprecated__));
float x_white __attribute__((__deprecated__));
float y_white __attribute__((__deprecated__));
float x_red __attribute__((__deprecated__));
float y_red __attribute__((__deprecated__));
float x_green __attribute__((__deprecated__));
float y_green __attribute__((__deprecated__));
float x_blue __attribute__((__deprecated__));
float y_blue __attribute__((__deprecated__));
png_charp pcal_purpose __attribute__((__deprecated__));
png_int_32 pcal_X0 __attribute__((__deprecated__));
png_int_32 pcal_X1 __attribute__((__deprecated__));
png_charp pcal_units __attribute__((__deprecated__));
png_charpp pcal_params __attribute__((__deprecated__));
png_byte pcal_type __attribute__((__deprecated__));
png_byte pcal_nparams __attribute__((__deprecated__));
png_uint_32 free_me __attribute__((__deprecated__));
png_unknown_chunkp unknown_chunks __attribute__((__deprecated__));
png_size_t unknown_chunks_num __attribute__((__deprecated__));
png_charp iccp_name __attribute__((__deprecated__));
png_charp iccp_profile __attribute__((__deprecated__));
png_uint_32 iccp_proflen __attribute__((__deprecated__));
png_byte iccp_compression __attribute__((__deprecated__));
png_sPLT_tp splt_palettes __attribute__((__deprecated__));
png_uint_32 splt_palettes_num __attribute__((__deprecated__));
png_byte scal_unit __attribute__((__deprecated__));
double scal_pixel_width __attribute__((__deprecated__));
double scal_pixel_height __attribute__((__deprecated__));
png_charp scal_s_width __attribute__((__deprecated__));
png_charp scal_s_height __attribute__((__deprecated__));
png_bytepp row_pointers __attribute__((__deprecated__));
png_fixed_point int_gamma __attribute__((__deprecated__));
png_fixed_point int_x_white __attribute__((__deprecated__));
png_fixed_point int_y_white __attribute__((__deprecated__));
png_fixed_point int_x_red __attribute__((__deprecated__));
png_fixed_point int_y_red __attribute__((__deprecated__));
png_fixed_point int_x_green __attribute__((__deprecated__));
png_fixed_point int_y_green __attribute__((__deprecated__));
png_fixed_point int_x_blue __attribute__((__deprecated__));
png_fixed_point int_y_blue __attribute__((__deprecated__));
} png_info;
typedef png_info * png_infop;
typedef const png_info * png_const_infop;
typedef png_info * * png_infopp;
typedef struct png_row_info_struct
{
png_uint_32 width;
png_size_t rowbytes;
png_byte color_type;
png_byte bit_depth;
png_byte channels;
png_byte pixel_depth;
} png_row_info;
typedef png_row_info * png_row_infop;
typedef png_row_info * * png_row_infopp;
typedef struct png_struct_def png_struct;
typedef png_struct * png_structp;
typedef const png_struct * png_const_structp;
typedef void ( *png_error_ptr) (png_structp, png_const_charp);
typedef void ( *png_rw_ptr) (png_structp, png_bytep, png_size_t);
typedef void ( *png_flush_ptr) (png_structp);
typedef void ( *png_read_status_ptr) (png_structp, png_uint_32, int);
typedef void ( *png_write_status_ptr) (png_structp, png_uint_32, int);
typedef void ( *png_progressive_info_ptr) (png_structp, png_infop);
typedef void ( *png_progressive_end_ptr) (png_structp, png_infop);
typedef void ( *png_progressive_row_ptr) (png_structp, png_bytep, png_uint_32, int);
typedef void ( *png_user_transform_ptr) (png_structp, png_row_infop, png_bytep);
typedef int ( *png_user_chunk_ptr) (png_structp, png_unknown_chunkp);
typedef void ( *png_unknown_chunk_ptr) (png_structp);
typedef void ( *png_longjmp_ptr) (jmp_buf, int);
typedef png_voidp (*png_malloc_ptr) (png_structp, png_alloc_size_t);
typedef void (*png_free_ptr) (png_structp, png_voidp);
struct png_struct_def
{
jmp_buf jmpbuf __attribute__((__deprecated__));
png_longjmp_ptr longjmp_fn __attribute__((__deprecated__));
png_error_ptr error_fn __attribute__((__deprecated__));
png_error_ptr warning_fn __attribute__((__deprecated__));
png_voidp error_ptr __attribute__((__deprecated__));
png_rw_ptr write_data_fn __attribute__((__deprecated__));
png_rw_ptr read_data_fn __attribute__((__deprecated__));
png_voidp io_ptr __attribute__((__deprecated__));
png_user_transform_ptr read_user_transform_fn __attribute__((__deprecated__));
png_user_transform_ptr write_user_transform_fn __attribute__((__deprecated__));
png_voidp user_transform_ptr __attribute__((__deprecated__));
png_byte user_transform_depth __attribute__((__deprecated__));
png_byte user_transform_channels __attribute__((__deprecated__));
png_uint_32 mode __attribute__((__deprecated__));
png_uint_32 flags __attribute__((__deprecated__));
png_uint_32 transformations __attribute__((__deprecated__));
z_stream zstream __attribute__((__deprecated__));
png_bytep zbuf __attribute__((__deprecated__));
png_size_t zbuf_size __attribute__((__deprecated__));
int zlib_level __attribute__((__deprecated__));
int zlib_method __attribute__((__deprecated__));
int zlib_window_bits __attribute__((__deprecated__));
int zlib_mem_level __attribute__((__deprecated__));
int zlib_strategy __attribute__((__deprecated__));
png_uint_32 width __attribute__((__deprecated__));
png_uint_32 height __attribute__((__deprecated__));
png_uint_32 num_rows __attribute__((__deprecated__));
png_uint_32 usr_width __attribute__((__deprecated__));
png_size_t rowbytes __attribute__((__deprecated__));
png_alloc_size_t user_chunk_malloc_max __attribute__((__deprecated__));
png_uint_32 iwidth __attribute__((__deprecated__));
png_uint_32 row_number __attribute__((__deprecated__));
png_bytep prev_row __attribute__((__deprecated__));
png_bytep row_buf __attribute__((__deprecated__));
png_bytep sub_row __attribute__((__deprecated__));
png_bytep up_row __attribute__((__deprecated__));
png_bytep avg_row __attribute__((__deprecated__));
png_bytep paeth_row __attribute__((__deprecated__));
png_row_info row_info __attribute__((__deprecated__));
png_uint_32 idat_size __attribute__((__deprecated__));
png_uint_32 crc __attribute__((__deprecated__));
png_colorp palette __attribute__((__deprecated__));
png_uint_16 num_palette __attribute__((__deprecated__));
png_uint_16 num_trans __attribute__((__deprecated__));
png_byte chunk_name[5] __attribute__((__deprecated__));
png_byte compression __attribute__((__deprecated__));
png_byte filter __attribute__((__deprecated__));
png_byte interlaced __attribute__((__deprecated__));
png_byte pass __attribute__((__deprecated__));
png_byte do_filter __attribute__((__deprecated__));
png_byte color_type __attribute__((__deprecated__));
png_byte bit_depth __attribute__((__deprecated__));
png_byte usr_bit_depth __attribute__((__deprecated__));
png_byte pixel_depth __attribute__((__deprecated__));
png_byte channels __attribute__((__deprecated__));
png_byte usr_channels __attribute__((__deprecated__));
png_byte sig_bytes __attribute__((__deprecated__));
png_uint_16 filler __attribute__((__deprecated__));
png_byte background_gamma_type __attribute__((__deprecated__));
float background_gamma __attribute__((__deprecated__));
png_color_16 background __attribute__((__deprecated__));
png_color_16 background_1 __attribute__((__deprecated__));
png_flush_ptr output_flush_fn __attribute__((__deprecated__));
png_uint_32 flush_dist __attribute__((__deprecated__));
png_uint_32 flush_rows __attribute__((__deprecated__));
int gamma_shift __attribute__((__deprecated__));
float gamma __attribute__((__deprecated__));
float screen_gamma __attribute__((__deprecated__));
png_bytep gamma_table __attribute__((__deprecated__));
png_bytep gamma_from_1 __attribute__((__deprecated__));
png_bytep gamma_to_1 __attribute__((__deprecated__));
png_uint_16pp gamma_16_table __attribute__((__deprecated__));
png_uint_16pp gamma_16_from_1 __attribute__((__deprecated__));
png_uint_16pp gamma_16_to_1 __attribute__((__deprecated__));
png_color_8 sig_bit __attribute__((__deprecated__));
png_color_8 shift __attribute__((__deprecated__));
png_bytep trans_alpha __attribute__((__deprecated__));
png_color_16 trans_color __attribute__((__deprecated__));
png_read_status_ptr read_row_fn __attribute__((__deprecated__));
png_write_status_ptr write_row_fn __attribute__((__deprecated__));
png_progressive_info_ptr info_fn __attribute__((__deprecated__));
png_progressive_row_ptr row_fn __attribute__((__deprecated__));
png_progressive_end_ptr end_fn __attribute__((__deprecated__));
png_bytep save_buffer_ptr __attribute__((__deprecated__));
png_bytep save_buffer __attribute__((__deprecated__));
png_bytep current_buffer_ptr __attribute__((__deprecated__));
png_bytep current_buffer __attribute__((__deprecated__));
png_uint_32 push_length __attribute__((__deprecated__));
png_uint_32 skip_length __attribute__((__deprecated__));
png_size_t save_buffer_size __attribute__((__deprecated__));
png_size_t save_buffer_max __attribute__((__deprecated__));
png_size_t buffer_size __attribute__((__deprecated__));
png_size_t current_buffer_size __attribute__((__deprecated__));
int process_mode __attribute__((__deprecated__));
int cur_palette __attribute__((__deprecated__));
png_size_t current_text_size __attribute__((__deprecated__));
png_size_t current_text_left __attribute__((__deprecated__));
png_charp current_text __attribute__((__deprecated__));
png_charp current_text_ptr __attribute__((__deprecated__));
png_bytep palette_lookup __attribute__((__deprecated__));
png_bytep quantize_index __attribute__((__deprecated__));
png_uint_16p hist __attribute__((__deprecated__));
png_byte heuristic_method __attribute__((__deprecated__));
png_byte num_prev_filters __attribute__((__deprecated__));
png_bytep prev_filters __attribute__((__deprecated__));
png_uint_16p filter_weights __attribute__((__deprecated__));
png_uint_16p inv_filter_weights __attribute__((__deprecated__));
png_uint_16p filter_costs __attribute__((__deprecated__));
png_uint_16p inv_filter_costs __attribute__((__deprecated__));
png_charp time_buffer __attribute__((__deprecated__));
png_uint_32 free_me __attribute__((__deprecated__));
png_voidp user_chunk_ptr __attribute__((__deprecated__));
png_user_chunk_ptr read_user_chunk_fn __attribute__((__deprecated__));
int num_chunk_list __attribute__((__deprecated__));
png_bytep chunk_list __attribute__((__deprecated__));
png_byte rgb_to_gray_status __attribute__((__deprecated__));
png_uint_16 rgb_to_gray_red_coeff __attribute__((__deprecated__));
png_uint_16 rgb_to_gray_green_coeff __attribute__((__deprecated__));
png_uint_16 rgb_to_gray_blue_coeff __attribute__((__deprecated__));
png_uint_32 mng_features_permitted __attribute__((__deprecated__));
png_fixed_point int_gamma __attribute__((__deprecated__));
png_byte filter_type __attribute__((__deprecated__));
png_voidp mem_ptr __attribute__((__deprecated__));
png_malloc_ptr malloc_fn __attribute__((__deprecated__));
png_free_ptr free_fn __attribute__((__deprecated__));
png_bytep big_row_buf __attribute__((__deprecated__));
png_bytep quantize_sort __attribute__((__deprecated__));
png_bytep index_to_palette __attribute__((__deprecated__));
png_bytep palette_to_index __attribute__((__deprecated__));
png_byte compression_type __attribute__((__deprecated__));
png_uint_32 user_width_max __attribute__((__deprecated__));
png_uint_32 user_height_max __attribute__((__deprecated__));
png_uint_32 user_chunk_cache_max __attribute__((__deprecated__));
png_unknown_chunk unknown_chunk __attribute__((__deprecated__));
png_uint_32 old_big_row_buf_size __attribute__((__deprecated__));
png_uint_32 old_prev_row_size __attribute__((__deprecated__));
png_charp chunkdata __attribute__((__deprecated__));
png_uint_32 io_state __attribute__((__deprecated__));
};
typedef png_structp version_1_4_9beta01;
typedef png_struct * * png_structpp;
png_uint_32 png_access_version_number (void);
png_infop png_create_info_struct(png_structp png_ptr);
png_structp png_create_read_struct
(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn);
png_structp png_create_write_struct
(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn);
void png_init_io (png_structp png_ptr, png_FILE_p fp);
void png_read_info (png_structp png_ptr, png_infop info_ptr);
png_uint_32 png_get_image_width (png_const_structp png_ptr, png_const_infop info_ptr);
png_uint_32 png_get_image_height (png_const_structp png_ptr, png_const_infop info_ptr);
png_byte png_get_bit_depth (png_const_structp png_ptr, png_const_infop info_ptr);
png_byte png_get_color_type (png_const_structp png_ptr, png_const_infop info_ptr);
void png_set_strip_16 (png_structp png_ptr);
void png_set_sig_bytes (png_structp png_ptr, int num_bytes);
int png_sig_cmp (png_bytep sig, png_size_t start, png_size_t num_to_check);
png_size_t png_get_compression_buffer_size(png_const_structp png_ptr);
void png_set_compression_buffer_size(png_structp png_ptr, png_size_t size);
int png_reset_zstream (png_structp png_ptr);
png_structp png_create_read_struct_2
(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn);
png_structp png_create_write_struct_2
(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn);
void png_write_sig (png_structp png_ptr);
void png_write_chunk (png_structp png_ptr, png_bytep chunk_name, png_bytep data, png_size_t length);
void png_write_chunk_start (png_structp png_ptr, png_bytep chunk_name, png_uint_32 length);
void png_write_chunk_data (png_structp png_ptr, png_bytep data, png_size_t length);
void png_write_chunk_end (png_structp png_ptr);
void png_info_init_3 (png_infopp info_ptr, png_size_t png_info_struct_size);
void png_write_info_before_PLTE (png_structp png_ptr, png_infop info_ptr);
void png_write_info (png_structp png_ptr, png_infop info_ptr);
png_charp png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime);
void png_convert_from_struct_tm (png_timep ptime, struct tm * ttime);
void png_convert_from_time_t (png_timep ptime, time_t ttime);
void png_set_expand (png_structp png_ptr);
void png_set_expand_gray_1_2_4_to_8 (png_structp png_ptr);
void png_set_palette_to_rgb (png_structp png_ptr);
void png_set_tRNS_to_alpha (png_structp png_ptr);
void png_set_bgr (png_structp png_ptr);
void png_set_gray_to_rgb (png_structp png_ptr);
void png_set_rgb_to_gray (png_structp png_ptr, int error_action, double red, double green );
void png_set_rgb_to_gray_fixed (png_structp png_ptr, int error_action, png_fixed_point red, png_fixed_point green )
;
png_byte png_get_rgb_to_gray_status (png_const_structp png_ptr);
void png_build_grayscale_palette (int bit_depth, png_colorp palette);
void png_set_strip_alpha (png_structp png_ptr);
void png_set_swap_alpha (png_structp png_ptr);
void png_set_invert_alpha (png_structp png_ptr);
void png_set_filler (png_structp png_ptr, png_uint_32 filler, int flags);
void png_set_add_alpha (png_structp png_ptr, png_uint_32 filler, int flags);
void png_set_swap (png_structp png_ptr);
void png_set_packing (png_structp png_ptr);
void png_set_packswap (png_structp png_ptr);
void png_set_shift (png_structp png_ptr, png_color_8p true_bits);
int png_set_interlace_handling (png_structp png_ptr);
void png_set_invert_mono (png_structp png_ptr);
void png_set_background (png_structp png_ptr, png_color_16p background_color, int background_gamma_code, int need_expand, double background_gamma);
void png_set_quantize (png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_uint_16p histogram, int full_quantize);
void png_set_gamma (png_structp png_ptr, double screen_gamma, double default_file_gamma);
void png_set_flush (png_structp png_ptr, int nrows);
void png_write_flush (png_structp png_ptr);
void png_start_read_image (png_structp png_ptr);
void png_read_update_info (png_structp png_ptr, png_infop info_ptr);
void png_read_rows (png_structp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows);
void png_read_row (png_structp png_ptr, png_bytep row, png_bytep display_row);
void png_read_image (png_structp png_ptr, png_bytepp image);
void png_write_row (png_structp png_ptr, png_bytep row);
void png_write_rows (png_structp png_ptr, png_bytepp row, png_uint_32 num_rows);
void png_write_image (png_structp png_ptr, png_bytepp image);
void png_write_end (png_structp png_ptr, png_infop info_ptr);
void png_read_end (png_structp png_ptr, png_infop info_ptr);
void png_destroy_info_struct (png_structp png_ptr, png_infopp info_ptr_ptr);
void png_destroy_read_struct (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr);
void png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr);
void png_set_crc_action (png_structp png_ptr, int crit_action, int ancil_action);
void png_set_filter (png_structp png_ptr, int method, int filters);
void png_set_filter_heuristics (png_structp png_ptr, int heuristic_method, int num_weights, png_doublep filter_weights, png_doublep filter_costs);
void png_set_compression_level (png_structp png_ptr, int level);
void png_set_compression_mem_level(png_structp png_ptr, int mem_level);
void png_set_compression_strategy(png_structp png_ptr, int strategy);
void png_set_compression_window_bits(png_structp png_ptr, int window_bits);
void png_set_compression_method (png_structp png_ptr, int method);
void png_set_error_fn (png_structp png_ptr, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn);
png_voidp png_get_error_ptr (png_const_structp png_ptr);
void png_set_write_fn (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn);
void png_set_read_fn (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn);
png_voidp png_get_io_ptr (png_structp png_ptr);
void png_set_read_status_fn (png_structp png_ptr, png_read_status_ptr read_row_fn);
void png_set_write_status_fn (png_structp png_ptr, png_write_status_ptr write_row_fn);
void png_set_mem_fn (png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn);
png_voidp png_get_mem_ptr (png_const_structp png_ptr);
void png_set_read_user_transform_fn (png_structp png_ptr, png_user_transform_ptr read_user_transform_fn);
void png_set_write_user_transform_fn (png_structp png_ptr, png_user_transform_ptr write_user_transform_fn);
void png_set_user_transform_info (png_structp png_ptr, png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels);
png_voidp png_get_user_transform_ptr(png_const_structp png_ptr);
void png_set_read_user_chunk_fn (png_structp png_ptr, png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn);
png_voidp png_get_user_chunk_ptr (png_const_structp png_ptr);
void png_set_progressive_read_fn (png_structp png_ptr, png_voidp progressive_ptr, png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn);
png_voidp png_get_progressive_ptr(png_const_structp png_ptr);
void png_process_data (png_structp png_ptr, png_infop info_ptr, png_bytep buffer, png_size_t buffer_size);
void png_progressive_combine_row (png_structp png_ptr, png_bytep old_row, png_bytep new_row);
png_voidp png_malloc (png_structp png_ptr, png_alloc_size_t size);
png_voidp png_calloc (png_structp png_ptr, png_alloc_size_t size);
png_voidp png_malloc_warn (png_structp png_ptr, png_alloc_size_t size);
void png_free (png_structp png_ptr, png_voidp ptr);
void png_free_data (png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num);
void png_data_freer (png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask);
png_voidp png_malloc_default (png_structp png_ptr, png_alloc_size_t size);
void png_free_default (png_structp png_ptr, png_voidp ptr);
void png_error (png_structp png_ptr, png_const_charp error_message);
void png_chunk_error (png_structp png_ptr, png_const_charp error_message);
void png_warning (png_structp png_ptr, png_const_charp warning_message);
void png_chunk_warning (png_structp png_ptr, png_const_charp warning_message);
png_uint_32 png_get_valid (png_const_structp png_ptr, png_const_infop info_ptr, png_uint_32 flag);
png_size_t png_get_rowbytes (png_const_structp png_ptr, png_const_infop info_ptr);
png_bytepp png_get_rows (png_const_structp png_ptr, png_const_infop info_ptr);
void png_set_rows (png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers);
png_byte png_get_channels (png_const_structp png_ptr, png_const_infop info_ptr);
png_byte png_get_filter_type (png_const_structp png_ptr, png_const_infop info_ptr);
png_byte png_get_interlace_type (png_const_structp png_ptr, png_const_infop info_ptr);
png_byte png_get_compression_type (png_const_structp png_ptr, png_const_infop info_ptr);
png_uint_32 png_get_pixels_per_meter (png_const_structp png_ptr, png_const_infop info_ptr);
png_uint_32 png_get_x_pixels_per_meter (png_const_structp png_ptr, png_const_infop info_ptr);
png_uint_32 png_get_y_pixels_per_meter (png_const_structp png_ptr, png_const_infop info_ptr);
float png_get_pixel_aspect_ratio (png_const_structp png_ptr, png_const_infop info_ptr);
png_int_32 png_get_x_offset_pixels (png_const_structp png_ptr, png_const_infop info_ptr);
png_int_32 png_get_y_offset_pixels (png_const_structp png_ptr, png_const_infop info_ptr);
png_int_32 png_get_x_offset_microns (png_const_structp png_ptr, png_const_infop info_ptr);
png_int_32 png_get_y_offset_microns (png_const_structp png_ptr, png_const_infop info_ptr);
png_bytep png_get_signature (png_const_structp png_ptr, png_infop info_ptr);
png_uint_32 png_get_bKGD (png_const_structp png_ptr, png_infop info_ptr, png_color_16p *background);
void png_set_invalid (png_structp png_ptr, png_infop info_ptr, int mask);
void png_read_png (png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params);
void png_write_png (png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params);
const char* png_get_copyright( png_const_structp png_ptr );
const char* png_get_header_ver( png_const_structp png_ptr );
const char* png_get_header_version( png_const_structp png_ptr );
const char* png_get_libpng_ver( png_const_structp png_ptr );
uint32_t png_permit_mng_features( png_structp png_ptr, uint32_t mng_features_permitted );
void png_set_user_limits( png_structp png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max );
uint32_t png_get_user_width_max( png_const_structp png_ptr );
uint32_t png_get_user_height_max( png_const_structp png_ptr );
void png_set_chunk_cache_max( png_structp png_ptr, uint32_t user_chunk_cache_max);
png_uint_32 png_get_chunk_cache_max(png_const_structp png_ptr);
void png_set_chunk_malloc_max (png_structp png_ptr, png_alloc_size_t user_chunk_cache_max);
png_alloc_size_t png_get_chunk_malloc_max(png_const_structp png_ptr);
png_uint_32 png_get_io_state (png_const_structp png_ptr);
png_bytep png_get_io_chunk_name(png_structp png_ptr);
uint32_t png_get_uint_31( png_structp png_ptr, void* buf );
void png_save_uint_32( void* buf, uint32_t i );
void png_save_int_32( void* buf, int32_t i );
void png_save_uint_16( void* buf, unsigned i );
]]
-- FIXME: this path could/should be absolute
local libpng = ffi.load("lib/x86_64-linux-gnu/libpng16.so.16")
return libpng
|
--- GENERATED CODE - DO NOT MODIFY
-- Amazon CloudSearch (cloudsearch-2013-01-01)
local M = {}
M.metadata = {
api_version = "2013-01-01",
json_version = "",
protocol = "query",
checksum_format = "",
endpoint_prefix = "cloudsearch",
service_abbreviation = "",
service_full_name = "Amazon CloudSearch",
signature_version = "v4",
target_prefix = "",
timestamp_format = "",
global_endpoint = "",
uid = "cloudsearch-2013-01-01",
}
local keys = {}
local asserts = {}
keys.ExpressionStatus = { ["Status"] = true, ["Options"] = true, nil }
function asserts.AssertExpressionStatus(struct)
assert(struct)
assert(type(struct) == "table", "Expected ExpressionStatus to be of type 'table'")
assert(struct["Options"], "Expected key Options to exist in table")
assert(struct["Status"], "Expected key Status to exist in table")
if struct["Status"] then asserts.AssertOptionStatus(struct["Status"]) end
if struct["Options"] then asserts.AssertExpression(struct["Options"]) end
for k,_ in pairs(struct) do
assert(keys.ExpressionStatus[k], "ExpressionStatus contains unknown key " .. tostring(k))
end
end
--- Create a structure of type ExpressionStatus
-- <p>The value of an <code>Expression</code> and its current status.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Status [OptionStatus]
-- * Options [Expression] <p>The expression that is evaluated for sorting while processing a search request.</p>
-- Required key: Options
-- Required key: Status
-- @return ExpressionStatus structure as a key-value pair table
function M.ExpressionStatus(args)
assert(args, "You must provide an argument table when creating ExpressionStatus")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Status"] = args["Status"],
["Options"] = args["Options"],
}
asserts.AssertExpressionStatus(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeAnalysisSchemesResponse = { ["AnalysisSchemes"] = true, nil }
function asserts.AssertDescribeAnalysisSchemesResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeAnalysisSchemesResponse to be of type 'table'")
assert(struct["AnalysisSchemes"], "Expected key AnalysisSchemes to exist in table")
if struct["AnalysisSchemes"] then asserts.AssertAnalysisSchemeStatusList(struct["AnalysisSchemes"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeAnalysisSchemesResponse[k], "DescribeAnalysisSchemesResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeAnalysisSchemesResponse
-- <p>The result of a <code>DescribeAnalysisSchemes</code> request. Contains the analysis schemes configured for the domain specified in the request.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AnalysisSchemes [AnalysisSchemeStatusList] <p>The analysis scheme descriptions.</p>
-- Required key: AnalysisSchemes
-- @return DescribeAnalysisSchemesResponse structure as a key-value pair table
function M.DescribeAnalysisSchemesResponse(args)
assert(args, "You must provide an argument table when creating DescribeAnalysisSchemesResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AnalysisSchemes"] = args["AnalysisSchemes"],
}
asserts.AssertDescribeAnalysisSchemesResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DeleteAnalysisSchemeRequest = { ["AnalysisSchemeName"] = true, ["DomainName"] = true, nil }
function asserts.AssertDeleteAnalysisSchemeRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DeleteAnalysisSchemeRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["AnalysisSchemeName"], "Expected key AnalysisSchemeName to exist in table")
if struct["AnalysisSchemeName"] then asserts.AssertStandardName(struct["AnalysisSchemeName"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DeleteAnalysisSchemeRequest[k], "DeleteAnalysisSchemeRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DeleteAnalysisSchemeRequest
-- <p>Container for the parameters to the <code><a>DeleteAnalysisScheme</a></code> operation. Specifies the name of the domain you want to update and the analysis scheme you want to delete. </p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AnalysisSchemeName [StandardName] <p>The name of the analysis scheme you want to delete.</p>
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: AnalysisSchemeName
-- @return DeleteAnalysisSchemeRequest structure as a key-value pair table
function M.DeleteAnalysisSchemeRequest(args)
assert(args, "You must provide an argument table when creating DeleteAnalysisSchemeRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AnalysisSchemeName"] = args["AnalysisSchemeName"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDeleteAnalysisSchemeRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.IndexDocumentsResponse = { ["FieldNames"] = true, nil }
function asserts.AssertIndexDocumentsResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected IndexDocumentsResponse to be of type 'table'")
if struct["FieldNames"] then asserts.AssertFieldNameList(struct["FieldNames"]) end
for k,_ in pairs(struct) do
assert(keys.IndexDocumentsResponse[k], "IndexDocumentsResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type IndexDocumentsResponse
-- <p>The result of an <code>IndexDocuments</code> request. Contains the status of the indexing operation, including the fields being indexed.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * FieldNames [FieldNameList] <p>The names of the fields that are currently being indexed.</p>
-- @return IndexDocumentsResponse structure as a key-value pair table
function M.IndexDocumentsResponse(args)
assert(args, "You must provide an argument table when creating IndexDocumentsResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["FieldNames"] = args["FieldNames"],
}
asserts.AssertIndexDocumentsResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.UpdateServiceAccessPoliciesRequest = { ["AccessPolicies"] = true, ["DomainName"] = true, nil }
function asserts.AssertUpdateServiceAccessPoliciesRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected UpdateServiceAccessPoliciesRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["AccessPolicies"], "Expected key AccessPolicies to exist in table")
if struct["AccessPolicies"] then asserts.AssertPolicyDocument(struct["AccessPolicies"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.UpdateServiceAccessPoliciesRequest[k], "UpdateServiceAccessPoliciesRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type UpdateServiceAccessPoliciesRequest
-- <p>Container for the parameters to the <code><a>UpdateServiceAccessPolicies</a></code> operation. Specifies the name of the domain you want to update and the access rules you want to configure.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AccessPolicies [PolicyDocument] <p>The access rules you want to configure. These rules replace any existing rules. </p>
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: AccessPolicies
-- @return UpdateServiceAccessPoliciesRequest structure as a key-value pair table
function M.UpdateServiceAccessPoliciesRequest(args)
assert(args, "You must provide an argument table when creating UpdateServiceAccessPoliciesRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AccessPolicies"] = args["AccessPolicies"],
["DomainName"] = args["DomainName"],
}
asserts.AssertUpdateServiceAccessPoliciesRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DeleteIndexFieldResponse = { ["IndexField"] = true, nil }
function asserts.AssertDeleteIndexFieldResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DeleteIndexFieldResponse to be of type 'table'")
assert(struct["IndexField"], "Expected key IndexField to exist in table")
if struct["IndexField"] then asserts.AssertIndexFieldStatus(struct["IndexField"]) end
for k,_ in pairs(struct) do
assert(keys.DeleteIndexFieldResponse[k], "DeleteIndexFieldResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DeleteIndexFieldResponse
-- <p>The result of a <code><a>DeleteIndexField</a></code> request.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * IndexField [IndexFieldStatus] <p>The status of the index field being deleted.</p>
-- Required key: IndexField
-- @return DeleteIndexFieldResponse structure as a key-value pair table
function M.DeleteIndexFieldResponse(args)
assert(args, "You must provide an argument table when creating DeleteIndexFieldResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["IndexField"] = args["IndexField"],
}
asserts.AssertDeleteIndexFieldResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DoubleOptions = { ["SourceField"] = true, ["DefaultValue"] = true, ["FacetEnabled"] = true, ["SearchEnabled"] = true, ["SortEnabled"] = true, ["ReturnEnabled"] = true, nil }
function asserts.AssertDoubleOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected DoubleOptions to be of type 'table'")
if struct["SourceField"] then asserts.AssertFieldName(struct["SourceField"]) end
if struct["DefaultValue"] then asserts.AssertDouble(struct["DefaultValue"]) end
if struct["FacetEnabled"] then asserts.AssertBoolean(struct["FacetEnabled"]) end
if struct["SearchEnabled"] then asserts.AssertBoolean(struct["SearchEnabled"]) end
if struct["SortEnabled"] then asserts.AssertBoolean(struct["SortEnabled"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
for k,_ in pairs(struct) do
assert(keys.DoubleOptions[k], "DoubleOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DoubleOptions
-- <p>Options for a double-precision 64-bit floating point field. Present if <code>IndexFieldType</code> specifies the field is of type <code>double</code>. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SourceField [FieldName] <p>The name of the source field to map to the field. </p>
-- * DefaultValue [Double] <p>A value to use for the field if the field isn't specified for a document. This can be important if you are using the field in an expression and that field is not present in every document.</p>
-- * FacetEnabled [Boolean] <p>Whether facet information can be returned for the field.</p>
-- * SearchEnabled [Boolean] <p>Whether the contents of the field are searchable.</p>
-- * SortEnabled [Boolean] <p>Whether the field can be used to sort the search results.</p>
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- @return DoubleOptions structure as a key-value pair table
function M.DoubleOptions(args)
assert(args, "You must provide an argument table when creating DoubleOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SourceField"] = args["SourceField"],
["DefaultValue"] = args["DefaultValue"],
["FacetEnabled"] = args["FacetEnabled"],
["SearchEnabled"] = args["SearchEnabled"],
["SortEnabled"] = args["SortEnabled"],
["ReturnEnabled"] = args["ReturnEnabled"],
}
asserts.AssertDoubleOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.ListDomainNamesResponse = { ["DomainNames"] = true, nil }
function asserts.AssertListDomainNamesResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected ListDomainNamesResponse to be of type 'table'")
if struct["DomainNames"] then asserts.AssertDomainNameMap(struct["DomainNames"]) end
for k,_ in pairs(struct) do
assert(keys.ListDomainNamesResponse[k], "ListDomainNamesResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type ListDomainNamesResponse
-- <p>The result of a <code>ListDomainNames</code> request. Contains a list of the domains owned by an account.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DomainNames [DomainNameMap] <p>The names of the search domains owned by an account.</p>
-- @return ListDomainNamesResponse structure as a key-value pair table
function M.ListDomainNamesResponse(args)
assert(args, "You must provide an argument table when creating ListDomainNamesResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DomainNames"] = args["DomainNames"],
}
asserts.AssertListDomainNamesResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.AnalysisSchemeStatus = { ["Status"] = true, ["Options"] = true, nil }
function asserts.AssertAnalysisSchemeStatus(struct)
assert(struct)
assert(type(struct) == "table", "Expected AnalysisSchemeStatus to be of type 'table'")
assert(struct["Options"], "Expected key Options to exist in table")
assert(struct["Status"], "Expected key Status to exist in table")
if struct["Status"] then asserts.AssertOptionStatus(struct["Status"]) end
if struct["Options"] then asserts.AssertAnalysisScheme(struct["Options"]) end
for k,_ in pairs(struct) do
assert(keys.AnalysisSchemeStatus[k], "AnalysisSchemeStatus contains unknown key " .. tostring(k))
end
end
--- Create a structure of type AnalysisSchemeStatus
-- <p>The status and configuration of an <code>AnalysisScheme</code>.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Status [OptionStatus]
-- * Options [AnalysisScheme]
-- Required key: Options
-- Required key: Status
-- @return AnalysisSchemeStatus structure as a key-value pair table
function M.AnalysisSchemeStatus(args)
assert(args, "You must provide an argument table when creating AnalysisSchemeStatus")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Status"] = args["Status"],
["Options"] = args["Options"],
}
asserts.AssertAnalysisSchemeStatus(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DateArrayOptions = { ["SourceFields"] = true, ["FacetEnabled"] = true, ["DefaultValue"] = true, ["ReturnEnabled"] = true, ["SearchEnabled"] = true, nil }
function asserts.AssertDateArrayOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected DateArrayOptions to be of type 'table'")
if struct["SourceFields"] then asserts.AssertFieldNameCommaList(struct["SourceFields"]) end
if struct["FacetEnabled"] then asserts.AssertBoolean(struct["FacetEnabled"]) end
if struct["DefaultValue"] then asserts.AssertFieldValue(struct["DefaultValue"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
if struct["SearchEnabled"] then asserts.AssertBoolean(struct["SearchEnabled"]) end
for k,_ in pairs(struct) do
assert(keys.DateArrayOptions[k], "DateArrayOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DateArrayOptions
-- <p>Options for a field that contains an array of dates. Present if <code>IndexFieldType</code> specifies the field is of type <code>date-array</code>. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SourceFields [FieldNameCommaList] <p>A list of source fields to map to the field. </p>
-- * FacetEnabled [Boolean] <p>Whether facet information can be returned for the field.</p>
-- * DefaultValue [FieldValue] A value to use for the field if the field isn't specified for a document.
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- * SearchEnabled [Boolean] <p>Whether the contents of the field are searchable.</p>
-- @return DateArrayOptions structure as a key-value pair table
function M.DateArrayOptions(args)
assert(args, "You must provide an argument table when creating DateArrayOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SourceFields"] = args["SourceFields"],
["FacetEnabled"] = args["FacetEnabled"],
["DefaultValue"] = args["DefaultValue"],
["ReturnEnabled"] = args["ReturnEnabled"],
["SearchEnabled"] = args["SearchEnabled"],
}
asserts.AssertDateArrayOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeDomainsResponse = { ["DomainStatusList"] = true, nil }
function asserts.AssertDescribeDomainsResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeDomainsResponse to be of type 'table'")
assert(struct["DomainStatusList"], "Expected key DomainStatusList to exist in table")
if struct["DomainStatusList"] then asserts.AssertDomainStatusList(struct["DomainStatusList"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeDomainsResponse[k], "DescribeDomainsResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeDomainsResponse
-- <p>The result of a <code>DescribeDomains</code> request. Contains the status of the domains specified in the request or all domains owned by the account.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DomainStatusList [DomainStatusList]
-- Required key: DomainStatusList
-- @return DescribeDomainsResponse structure as a key-value pair table
function M.DescribeDomainsResponse(args)
assert(args, "You must provide an argument table when creating DescribeDomainsResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DomainStatusList"] = args["DomainStatusList"],
}
asserts.AssertDescribeDomainsResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.AvailabilityOptionsStatus = { ["Status"] = true, ["Options"] = true, nil }
function asserts.AssertAvailabilityOptionsStatus(struct)
assert(struct)
assert(type(struct) == "table", "Expected AvailabilityOptionsStatus to be of type 'table'")
assert(struct["Options"], "Expected key Options to exist in table")
assert(struct["Status"], "Expected key Status to exist in table")
if struct["Status"] then asserts.AssertOptionStatus(struct["Status"]) end
if struct["Options"] then asserts.AssertMultiAZ(struct["Options"]) end
for k,_ in pairs(struct) do
assert(keys.AvailabilityOptionsStatus[k], "AvailabilityOptionsStatus contains unknown key " .. tostring(k))
end
end
--- Create a structure of type AvailabilityOptionsStatus
-- <p>The status and configuration of the domain's availability options.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Status [OptionStatus]
-- * Options [MultiAZ] <p>The availability options configured for the domain.</p>
-- Required key: Options
-- Required key: Status
-- @return AvailabilityOptionsStatus structure as a key-value pair table
function M.AvailabilityOptionsStatus(args)
assert(args, "You must provide an argument table when creating AvailabilityOptionsStatus")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Status"] = args["Status"],
["Options"] = args["Options"],
}
asserts.AssertAvailabilityOptionsStatus(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeServiceAccessPoliciesRequest = { ["Deployed"] = true, ["DomainName"] = true, nil }
function asserts.AssertDescribeServiceAccessPoliciesRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeServiceAccessPoliciesRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["Deployed"] then asserts.AssertBoolean(struct["Deployed"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeServiceAccessPoliciesRequest[k], "DescribeServiceAccessPoliciesRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeServiceAccessPoliciesRequest
-- <p>Container for the parameters to the <code><a>DescribeServiceAccessPolicies</a></code> operation. Specifies the name of the domain you want to describe. To show the active configuration and exclude any pending changes, set the <code>Deployed</code> option to <code>true</code>.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Deployed [Boolean] <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
-- * DomainName [DomainName] <p>The name of the domain you want to describe.</p>
-- Required key: DomainName
-- @return DescribeServiceAccessPoliciesRequest structure as a key-value pair table
function M.DescribeServiceAccessPoliciesRequest(args)
assert(args, "You must provide an argument table when creating DescribeServiceAccessPoliciesRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Deployed"] = args["Deployed"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDescribeServiceAccessPoliciesRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DefineExpressionRequest = { ["Expression"] = true, ["DomainName"] = true, nil }
function asserts.AssertDefineExpressionRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DefineExpressionRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["Expression"], "Expected key Expression to exist in table")
if struct["Expression"] then asserts.AssertExpression(struct["Expression"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DefineExpressionRequest[k], "DefineExpressionRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DefineExpressionRequest
-- <p>Container for the parameters to the <code><a>DefineExpression</a></code> operation. Specifies the name of the domain you want to update and the expression you want to configure.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Expression [Expression]
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: Expression
-- @return DefineExpressionRequest structure as a key-value pair table
function M.DefineExpressionRequest(args)
assert(args, "You must provide an argument table when creating DefineExpressionRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Expression"] = args["Expression"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDefineExpressionRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DeleteIndexFieldRequest = { ["IndexFieldName"] = true, ["DomainName"] = true, nil }
function asserts.AssertDeleteIndexFieldRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DeleteIndexFieldRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["IndexFieldName"], "Expected key IndexFieldName to exist in table")
if struct["IndexFieldName"] then asserts.AssertDynamicFieldName(struct["IndexFieldName"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DeleteIndexFieldRequest[k], "DeleteIndexFieldRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DeleteIndexFieldRequest
-- <p>Container for the parameters to the <code><a>DeleteIndexField</a></code> operation. Specifies the name of the domain you want to update and the name of the index field you want to delete.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * IndexFieldName [DynamicFieldName] <p>The name of the index field your want to remove from the domain's indexing options.</p>
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: IndexFieldName
-- @return DeleteIndexFieldRequest structure as a key-value pair table
function M.DeleteIndexFieldRequest(args)
assert(args, "You must provide an argument table when creating DeleteIndexFieldRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["IndexFieldName"] = args["IndexFieldName"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDeleteIndexFieldRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.LiteralArrayOptions = { ["SourceFields"] = true, ["FacetEnabled"] = true, ["DefaultValue"] = true, ["ReturnEnabled"] = true, ["SearchEnabled"] = true, nil }
function asserts.AssertLiteralArrayOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected LiteralArrayOptions to be of type 'table'")
if struct["SourceFields"] then asserts.AssertFieldNameCommaList(struct["SourceFields"]) end
if struct["FacetEnabled"] then asserts.AssertBoolean(struct["FacetEnabled"]) end
if struct["DefaultValue"] then asserts.AssertFieldValue(struct["DefaultValue"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
if struct["SearchEnabled"] then asserts.AssertBoolean(struct["SearchEnabled"]) end
for k,_ in pairs(struct) do
assert(keys.LiteralArrayOptions[k], "LiteralArrayOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type LiteralArrayOptions
-- <p>Options for a field that contains an array of literal strings. Present if <code>IndexFieldType</code> specifies the field is of type <code>literal-array</code>. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SourceFields [FieldNameCommaList] <p>A list of source fields to map to the field. </p>
-- * FacetEnabled [Boolean] <p>Whether facet information can be returned for the field.</p>
-- * DefaultValue [FieldValue] A value to use for the field if the field isn't specified for a document.
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- * SearchEnabled [Boolean] <p>Whether the contents of the field are searchable.</p>
-- @return LiteralArrayOptions structure as a key-value pair table
function M.LiteralArrayOptions(args)
assert(args, "You must provide an argument table when creating LiteralArrayOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SourceFields"] = args["SourceFields"],
["FacetEnabled"] = args["FacetEnabled"],
["DefaultValue"] = args["DefaultValue"],
["ReturnEnabled"] = args["ReturnEnabled"],
["SearchEnabled"] = args["SearchEnabled"],
}
asserts.AssertLiteralArrayOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.AccessPoliciesStatus = { ["Status"] = true, ["Options"] = true, nil }
function asserts.AssertAccessPoliciesStatus(struct)
assert(struct)
assert(type(struct) == "table", "Expected AccessPoliciesStatus to be of type 'table'")
assert(struct["Options"], "Expected key Options to exist in table")
assert(struct["Status"], "Expected key Status to exist in table")
if struct["Status"] then asserts.AssertOptionStatus(struct["Status"]) end
if struct["Options"] then asserts.AssertPolicyDocument(struct["Options"]) end
for k,_ in pairs(struct) do
assert(keys.AccessPoliciesStatus[k], "AccessPoliciesStatus contains unknown key " .. tostring(k))
end
end
--- Create a structure of type AccessPoliciesStatus
-- <p>The configured access rules for the domain's document and search endpoints, and the current status of those rules.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Status [OptionStatus]
-- * Options [PolicyDocument]
-- Required key: Options
-- Required key: Status
-- @return AccessPoliciesStatus structure as a key-value pair table
function M.AccessPoliciesStatus(args)
assert(args, "You must provide an argument table when creating AccessPoliciesStatus")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Status"] = args["Status"],
["Options"] = args["Options"],
}
asserts.AssertAccessPoliciesStatus(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.UpdateAvailabilityOptionsResponse = { ["AvailabilityOptions"] = true, nil }
function asserts.AssertUpdateAvailabilityOptionsResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected UpdateAvailabilityOptionsResponse to be of type 'table'")
if struct["AvailabilityOptions"] then asserts.AssertAvailabilityOptionsStatus(struct["AvailabilityOptions"]) end
for k,_ in pairs(struct) do
assert(keys.UpdateAvailabilityOptionsResponse[k], "UpdateAvailabilityOptionsResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type UpdateAvailabilityOptionsResponse
-- <p>The result of a <code>UpdateAvailabilityOptions</code> request. Contains the status of the domain's availability options. </p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AvailabilityOptions [AvailabilityOptionsStatus] <p>The newly-configured availability options. Indicates whether Multi-AZ is enabled for the domain. </p>
-- @return UpdateAvailabilityOptionsResponse structure as a key-value pair table
function M.UpdateAvailabilityOptionsResponse(args)
assert(args, "You must provide an argument table when creating UpdateAvailabilityOptionsResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AvailabilityOptions"] = args["AvailabilityOptions"],
}
asserts.AssertUpdateAvailabilityOptionsResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DefineExpressionResponse = { ["Expression"] = true, nil }
function asserts.AssertDefineExpressionResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DefineExpressionResponse to be of type 'table'")
assert(struct["Expression"], "Expected key Expression to exist in table")
if struct["Expression"] then asserts.AssertExpressionStatus(struct["Expression"]) end
for k,_ in pairs(struct) do
assert(keys.DefineExpressionResponse[k], "DefineExpressionResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DefineExpressionResponse
-- <p>The result of a <code>DefineExpression</code> request. Contains the status of the newly-configured expression.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Expression [ExpressionStatus]
-- Required key: Expression
-- @return DefineExpressionResponse structure as a key-value pair table
function M.DefineExpressionResponse(args)
assert(args, "You must provide an argument table when creating DefineExpressionResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Expression"] = args["Expression"],
}
asserts.AssertDefineExpressionResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DocumentSuggesterOptions = { ["SortExpression"] = true, ["FuzzyMatching"] = true, ["SourceField"] = true, nil }
function asserts.AssertDocumentSuggesterOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected DocumentSuggesterOptions to be of type 'table'")
assert(struct["SourceField"], "Expected key SourceField to exist in table")
if struct["SortExpression"] then asserts.AssertString(struct["SortExpression"]) end
if struct["FuzzyMatching"] then asserts.AssertSuggesterFuzzyMatching(struct["FuzzyMatching"]) end
if struct["SourceField"] then asserts.AssertFieldName(struct["SourceField"]) end
for k,_ in pairs(struct) do
assert(keys.DocumentSuggesterOptions[k], "DocumentSuggesterOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DocumentSuggesterOptions
-- <p>Options for a search suggester.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SortExpression [String] <p>An expression that computes a score for each suggestion to control how they are sorted. The scores are rounded to the nearest integer, with a floor of 0 and a ceiling of 2^31-1. A document's relevance score is not computed for suggestions, so sort expressions cannot reference the <code>_score</code> value. To sort suggestions using a numeric field or existing expression, simply specify the name of the field or expression. If no expression is configured for the suggester, the suggestions are sorted with the closest matches listed first.</p>
-- * FuzzyMatching [SuggesterFuzzyMatching] <p>The level of fuzziness allowed when suggesting matches for a string: <code>none</code>, <code>low</code>, or <code>high</code>. With none, the specified string is treated as an exact prefix. With low, suggestions must differ from the specified string by no more than one character. With high, suggestions can differ by up to two characters. The default is none. </p>
-- * SourceField [FieldName] <p>The name of the index field you want to use for suggestions. </p>
-- Required key: SourceField
-- @return DocumentSuggesterOptions structure as a key-value pair table
function M.DocumentSuggesterOptions(args)
assert(args, "You must provide an argument table when creating DocumentSuggesterOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SortExpression"] = args["SortExpression"],
["FuzzyMatching"] = args["FuzzyMatching"],
["SourceField"] = args["SourceField"],
}
asserts.AssertDocumentSuggesterOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DefineAnalysisSchemeResponse = { ["AnalysisScheme"] = true, nil }
function asserts.AssertDefineAnalysisSchemeResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DefineAnalysisSchemeResponse to be of type 'table'")
assert(struct["AnalysisScheme"], "Expected key AnalysisScheme to exist in table")
if struct["AnalysisScheme"] then asserts.AssertAnalysisSchemeStatus(struct["AnalysisScheme"]) end
for k,_ in pairs(struct) do
assert(keys.DefineAnalysisSchemeResponse[k], "DefineAnalysisSchemeResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DefineAnalysisSchemeResponse
-- <p>The result of a <code><a>DefineAnalysisScheme</a></code> request. Contains the status of the newly-configured analysis scheme.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AnalysisScheme [AnalysisSchemeStatus]
-- Required key: AnalysisScheme
-- @return DefineAnalysisSchemeResponse structure as a key-value pair table
function M.DefineAnalysisSchemeResponse(args)
assert(args, "You must provide an argument table when creating DefineAnalysisSchemeResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AnalysisScheme"] = args["AnalysisScheme"],
}
asserts.AssertDefineAnalysisSchemeResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DeleteDomainRequest = { ["DomainName"] = true, nil }
function asserts.AssertDeleteDomainRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DeleteDomainRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DeleteDomainRequest[k], "DeleteDomainRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DeleteDomainRequest
-- <p>Container for the parameters to the <code><a>DeleteDomain</a></code> operation. Specifies the name of the domain you want to delete.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DomainName [DomainName] <p>The name of the domain you want to permanently delete.</p>
-- Required key: DomainName
-- @return DeleteDomainRequest structure as a key-value pair table
function M.DeleteDomainRequest(args)
assert(args, "You must provide an argument table when creating DeleteDomainRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DomainName"] = args["DomainName"],
}
asserts.AssertDeleteDomainRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.UpdateScalingParametersResponse = { ["ScalingParameters"] = true, nil }
function asserts.AssertUpdateScalingParametersResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected UpdateScalingParametersResponse to be of type 'table'")
assert(struct["ScalingParameters"], "Expected key ScalingParameters to exist in table")
if struct["ScalingParameters"] then asserts.AssertScalingParametersStatus(struct["ScalingParameters"]) end
for k,_ in pairs(struct) do
assert(keys.UpdateScalingParametersResponse[k], "UpdateScalingParametersResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type UpdateScalingParametersResponse
-- <p>The result of a <code>UpdateScalingParameters</code> request. Contains the status of the newly-configured scaling parameters.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * ScalingParameters [ScalingParametersStatus]
-- Required key: ScalingParameters
-- @return UpdateScalingParametersResponse structure as a key-value pair table
function M.UpdateScalingParametersResponse(args)
assert(args, "You must provide an argument table when creating UpdateScalingParametersResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["ScalingParameters"] = args["ScalingParameters"],
}
asserts.AssertUpdateScalingParametersResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.SuggesterStatus = { ["Status"] = true, ["Options"] = true, nil }
function asserts.AssertSuggesterStatus(struct)
assert(struct)
assert(type(struct) == "table", "Expected SuggesterStatus to be of type 'table'")
assert(struct["Options"], "Expected key Options to exist in table")
assert(struct["Status"], "Expected key Status to exist in table")
if struct["Status"] then asserts.AssertOptionStatus(struct["Status"]) end
if struct["Options"] then asserts.AssertSuggester(struct["Options"]) end
for k,_ in pairs(struct) do
assert(keys.SuggesterStatus[k], "SuggesterStatus contains unknown key " .. tostring(k))
end
end
--- Create a structure of type SuggesterStatus
-- <p>The value of a <code>Suggester</code> and its current status.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Status [OptionStatus]
-- * Options [Suggester]
-- Required key: Options
-- Required key: Status
-- @return SuggesterStatus structure as a key-value pair table
function M.SuggesterStatus(args)
assert(args, "You must provide an argument table when creating SuggesterStatus")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Status"] = args["Status"],
["Options"] = args["Options"],
}
asserts.AssertSuggesterStatus(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeScalingParametersRequest = { ["DomainName"] = true, nil }
function asserts.AssertDescribeScalingParametersRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeScalingParametersRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeScalingParametersRequest[k], "DescribeScalingParametersRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeScalingParametersRequest
-- <p>Container for the parameters to the <code><a>DescribeScalingParameters</a></code> operation. Specifies the name of the domain you want to describe. </p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DomainName [DomainName]
-- Required key: DomainName
-- @return DescribeScalingParametersRequest structure as a key-value pair table
function M.DescribeScalingParametersRequest(args)
assert(args, "You must provide an argument table when creating DescribeScalingParametersRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DomainName"] = args["DomainName"],
}
asserts.AssertDescribeScalingParametersRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DeleteSuggesterResponse = { ["Suggester"] = true, nil }
function asserts.AssertDeleteSuggesterResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DeleteSuggesterResponse to be of type 'table'")
assert(struct["Suggester"], "Expected key Suggester to exist in table")
if struct["Suggester"] then asserts.AssertSuggesterStatus(struct["Suggester"]) end
for k,_ in pairs(struct) do
assert(keys.DeleteSuggesterResponse[k], "DeleteSuggesterResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DeleteSuggesterResponse
-- <p>The result of a <code>DeleteSuggester</code> request. Contains the status of the deleted suggester.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Suggester [SuggesterStatus] <p>The status of the suggester being deleted.</p>
-- Required key: Suggester
-- @return DeleteSuggesterResponse structure as a key-value pair table
function M.DeleteSuggesterResponse(args)
assert(args, "You must provide an argument table when creating DeleteSuggesterResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Suggester"] = args["Suggester"],
}
asserts.AssertDeleteSuggesterResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DeleteExpressionResponse = { ["Expression"] = true, nil }
function asserts.AssertDeleteExpressionResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DeleteExpressionResponse to be of type 'table'")
assert(struct["Expression"], "Expected key Expression to exist in table")
if struct["Expression"] then asserts.AssertExpressionStatus(struct["Expression"]) end
for k,_ in pairs(struct) do
assert(keys.DeleteExpressionResponse[k], "DeleteExpressionResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DeleteExpressionResponse
-- <p>The result of a <code><a>DeleteExpression</a></code> request. Specifies the expression being deleted.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Expression [ExpressionStatus] <p>The status of the expression being deleted.</p>
-- Required key: Expression
-- @return DeleteExpressionResponse structure as a key-value pair table
function M.DeleteExpressionResponse(args)
assert(args, "You must provide an argument table when creating DeleteExpressionResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Expression"] = args["Expression"],
}
asserts.AssertDeleteExpressionResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.ScalingParameters = { ["DesiredPartitionCount"] = true, ["DesiredInstanceType"] = true, ["DesiredReplicationCount"] = true, nil }
function asserts.AssertScalingParameters(struct)
assert(struct)
assert(type(struct) == "table", "Expected ScalingParameters to be of type 'table'")
if struct["DesiredPartitionCount"] then asserts.AssertUIntValue(struct["DesiredPartitionCount"]) end
if struct["DesiredInstanceType"] then asserts.AssertPartitionInstanceType(struct["DesiredInstanceType"]) end
if struct["DesiredReplicationCount"] then asserts.AssertUIntValue(struct["DesiredReplicationCount"]) end
for k,_ in pairs(struct) do
assert(keys.ScalingParameters[k], "ScalingParameters contains unknown key " .. tostring(k))
end
end
--- Create a structure of type ScalingParameters
-- <p>The desired instance type and desired number of replicas of each index partition.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DesiredPartitionCount [UIntValue] <p>The number of partitions you want to preconfigure for your domain. Only valid when you select <code>m2.2xlarge</code> as the desired instance type.</p>
-- * DesiredInstanceType [PartitionInstanceType] <p>The instance type that you want to preconfigure for your domain. For example, <code>search.m1.small</code>.</p>
-- * DesiredReplicationCount [UIntValue] <p>The number of replicas you want to preconfigure for each index partition.</p>
-- @return ScalingParameters structure as a key-value pair table
function M.ScalingParameters(args)
assert(args, "You must provide an argument table when creating ScalingParameters")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DesiredPartitionCount"] = args["DesiredPartitionCount"],
["DesiredInstanceType"] = args["DesiredInstanceType"],
["DesiredReplicationCount"] = args["DesiredReplicationCount"],
}
asserts.AssertScalingParameters(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DeleteAnalysisSchemeResponse = { ["AnalysisScheme"] = true, nil }
function asserts.AssertDeleteAnalysisSchemeResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DeleteAnalysisSchemeResponse to be of type 'table'")
assert(struct["AnalysisScheme"], "Expected key AnalysisScheme to exist in table")
if struct["AnalysisScheme"] then asserts.AssertAnalysisSchemeStatus(struct["AnalysisScheme"]) end
for k,_ in pairs(struct) do
assert(keys.DeleteAnalysisSchemeResponse[k], "DeleteAnalysisSchemeResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DeleteAnalysisSchemeResponse
-- <p>The result of a <code>DeleteAnalysisScheme</code> request. Contains the status of the deleted analysis scheme.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AnalysisScheme [AnalysisSchemeStatus] <p>The status of the analysis scheme being deleted.</p>
-- Required key: AnalysisScheme
-- @return DeleteAnalysisSchemeResponse structure as a key-value pair table
function M.DeleteAnalysisSchemeResponse(args)
assert(args, "You must provide an argument table when creating DeleteAnalysisSchemeResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AnalysisScheme"] = args["AnalysisScheme"],
}
asserts.AssertDeleteAnalysisSchemeResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DefineSuggesterRequest = { ["Suggester"] = true, ["DomainName"] = true, nil }
function asserts.AssertDefineSuggesterRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DefineSuggesterRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["Suggester"], "Expected key Suggester to exist in table")
if struct["Suggester"] then asserts.AssertSuggester(struct["Suggester"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DefineSuggesterRequest[k], "DefineSuggesterRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DefineSuggesterRequest
-- <p>Container for the parameters to the <code><a>DefineSuggester</a></code> operation. Specifies the name of the domain you want to update and the suggester configuration.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Suggester [Suggester]
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: Suggester
-- @return DefineSuggesterRequest structure as a key-value pair table
function M.DefineSuggesterRequest(args)
assert(args, "You must provide an argument table when creating DefineSuggesterRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Suggester"] = args["Suggester"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDefineSuggesterRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.LimitExceededException = { nil }
function asserts.AssertLimitExceededException(struct)
assert(struct)
assert(type(struct) == "table", "Expected LimitExceededException to be of type 'table'")
for k,_ in pairs(struct) do
assert(keys.LimitExceededException[k], "LimitExceededException contains unknown key " .. tostring(k))
end
end
--- Create a structure of type LimitExceededException
-- <p>The request was rejected because a resource limit has already been met.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- @return LimitExceededException structure as a key-value pair table
function M.LimitExceededException(args)
assert(args, "You must provide an argument table when creating LimitExceededException")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
}
asserts.AssertLimitExceededException(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.Suggester = { ["DocumentSuggesterOptions"] = true, ["SuggesterName"] = true, nil }
function asserts.AssertSuggester(struct)
assert(struct)
assert(type(struct) == "table", "Expected Suggester to be of type 'table'")
assert(struct["SuggesterName"], "Expected key SuggesterName to exist in table")
assert(struct["DocumentSuggesterOptions"], "Expected key DocumentSuggesterOptions to exist in table")
if struct["DocumentSuggesterOptions"] then asserts.AssertDocumentSuggesterOptions(struct["DocumentSuggesterOptions"]) end
if struct["SuggesterName"] then asserts.AssertStandardName(struct["SuggesterName"]) end
for k,_ in pairs(struct) do
assert(keys.Suggester[k], "Suggester contains unknown key " .. tostring(k))
end
end
--- Create a structure of type Suggester
-- <p>Configuration information for a search suggester. Each suggester has a unique name and specifies the text field you want to use for suggestions. The following options can be configured for a suggester: <code>FuzzyMatching</code>, <code>SortExpression</code>. </p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DocumentSuggesterOptions [DocumentSuggesterOptions]
-- * SuggesterName [StandardName]
-- Required key: SuggesterName
-- Required key: DocumentSuggesterOptions
-- @return Suggester structure as a key-value pair table
function M.Suggester(args)
assert(args, "You must provide an argument table when creating Suggester")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DocumentSuggesterOptions"] = args["DocumentSuggesterOptions"],
["SuggesterName"] = args["SuggesterName"],
}
asserts.AssertSuggester(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeExpressionsResponse = { ["Expressions"] = true, nil }
function asserts.AssertDescribeExpressionsResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeExpressionsResponse to be of type 'table'")
assert(struct["Expressions"], "Expected key Expressions to exist in table")
if struct["Expressions"] then asserts.AssertExpressionStatusList(struct["Expressions"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeExpressionsResponse[k], "DescribeExpressionsResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeExpressionsResponse
-- <p>The result of a <code>DescribeExpressions</code> request. Contains the expressions configured for the domain specified in the request.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Expressions [ExpressionStatusList] <p>The expressions configured for the domain.</p>
-- Required key: Expressions
-- @return DescribeExpressionsResponse structure as a key-value pair table
function M.DescribeExpressionsResponse(args)
assert(args, "You must provide an argument table when creating DescribeExpressionsResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Expressions"] = args["Expressions"],
}
asserts.AssertDescribeExpressionsResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.UpdateScalingParametersRequest = { ["ScalingParameters"] = true, ["DomainName"] = true, nil }
function asserts.AssertUpdateScalingParametersRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected UpdateScalingParametersRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["ScalingParameters"], "Expected key ScalingParameters to exist in table")
if struct["ScalingParameters"] then asserts.AssertScalingParameters(struct["ScalingParameters"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.UpdateScalingParametersRequest[k], "UpdateScalingParametersRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type UpdateScalingParametersRequest
-- <p>Container for the parameters to the <code><a>UpdateScalingParameters</a></code> operation. Specifies the name of the domain you want to update and the scaling parameters you want to configure.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * ScalingParameters [ScalingParameters]
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: ScalingParameters
-- @return UpdateScalingParametersRequest structure as a key-value pair table
function M.UpdateScalingParametersRequest(args)
assert(args, "You must provide an argument table when creating UpdateScalingParametersRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["ScalingParameters"] = args["ScalingParameters"],
["DomainName"] = args["DomainName"],
}
asserts.AssertUpdateScalingParametersRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.LiteralOptions = { ["SourceField"] = true, ["DefaultValue"] = true, ["FacetEnabled"] = true, ["SearchEnabled"] = true, ["SortEnabled"] = true, ["ReturnEnabled"] = true, nil }
function asserts.AssertLiteralOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected LiteralOptions to be of type 'table'")
if struct["SourceField"] then asserts.AssertFieldName(struct["SourceField"]) end
if struct["DefaultValue"] then asserts.AssertFieldValue(struct["DefaultValue"]) end
if struct["FacetEnabled"] then asserts.AssertBoolean(struct["FacetEnabled"]) end
if struct["SearchEnabled"] then asserts.AssertBoolean(struct["SearchEnabled"]) end
if struct["SortEnabled"] then asserts.AssertBoolean(struct["SortEnabled"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
for k,_ in pairs(struct) do
assert(keys.LiteralOptions[k], "LiteralOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type LiteralOptions
-- <p>Options for literal field. Present if <code>IndexFieldType</code> specifies the field is of type <code>literal</code>. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SourceField [FieldName]
-- * DefaultValue [FieldValue] A value to use for the field if the field isn't specified for a document.
-- * FacetEnabled [Boolean] <p>Whether facet information can be returned for the field.</p>
-- * SearchEnabled [Boolean] <p>Whether the contents of the field are searchable.</p>
-- * SortEnabled [Boolean] <p>Whether the field can be used to sort the search results.</p>
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- @return LiteralOptions structure as a key-value pair table
function M.LiteralOptions(args)
assert(args, "You must provide an argument table when creating LiteralOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SourceField"] = args["SourceField"],
["DefaultValue"] = args["DefaultValue"],
["FacetEnabled"] = args["FacetEnabled"],
["SearchEnabled"] = args["SearchEnabled"],
["SortEnabled"] = args["SortEnabled"],
["ReturnEnabled"] = args["ReturnEnabled"],
}
asserts.AssertLiteralOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.CreateDomainResponse = { ["DomainStatus"] = true, nil }
function asserts.AssertCreateDomainResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected CreateDomainResponse to be of type 'table'")
if struct["DomainStatus"] then asserts.AssertDomainStatus(struct["DomainStatus"]) end
for k,_ in pairs(struct) do
assert(keys.CreateDomainResponse[k], "CreateDomainResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type CreateDomainResponse
-- <p>The result of a <code>CreateDomainRequest</code>. Contains the status of a newly created domain.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DomainStatus [DomainStatus]
-- @return CreateDomainResponse structure as a key-value pair table
function M.CreateDomainResponse(args)
assert(args, "You must provide an argument table when creating CreateDomainResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DomainStatus"] = args["DomainStatus"],
}
asserts.AssertCreateDomainResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.ServiceEndpoint = { ["Endpoint"] = true, nil }
function asserts.AssertServiceEndpoint(struct)
assert(struct)
assert(type(struct) == "table", "Expected ServiceEndpoint to be of type 'table'")
if struct["Endpoint"] then asserts.AssertServiceUrl(struct["Endpoint"]) end
for k,_ in pairs(struct) do
assert(keys.ServiceEndpoint[k], "ServiceEndpoint contains unknown key " .. tostring(k))
end
end
--- Create a structure of type ServiceEndpoint
-- <p>The endpoint to which service requests can be submitted.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Endpoint [ServiceUrl]
-- @return ServiceEndpoint structure as a key-value pair table
function M.ServiceEndpoint(args)
assert(args, "You must provide an argument table when creating ServiceEndpoint")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Endpoint"] = args["Endpoint"],
}
asserts.AssertServiceEndpoint(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.BaseException = { ["Message"] = true, ["Code"] = true, nil }
function asserts.AssertBaseException(struct)
assert(struct)
assert(type(struct) == "table", "Expected BaseException to be of type 'table'")
if struct["Message"] then asserts.AssertErrorMessage(struct["Message"]) end
if struct["Code"] then asserts.AssertErrorCode(struct["Code"]) end
for k,_ in pairs(struct) do
assert(keys.BaseException[k], "BaseException contains unknown key " .. tostring(k))
end
end
--- Create a structure of type BaseException
-- <p>An error occurred while processing the request.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Message [ErrorMessage]
-- * Code [ErrorCode]
-- @return BaseException structure as a key-value pair table
function M.BaseException(args)
assert(args, "You must provide an argument table when creating BaseException")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Message"] = args["Message"],
["Code"] = args["Code"],
}
asserts.AssertBaseException(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DeleteSuggesterRequest = { ["SuggesterName"] = true, ["DomainName"] = true, nil }
function asserts.AssertDeleteSuggesterRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DeleteSuggesterRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["SuggesterName"], "Expected key SuggesterName to exist in table")
if struct["SuggesterName"] then asserts.AssertStandardName(struct["SuggesterName"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DeleteSuggesterRequest[k], "DeleteSuggesterRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DeleteSuggesterRequest
-- <p>Container for the parameters to the <code><a>DeleteSuggester</a></code> operation. Specifies the name of the domain you want to update and name of the suggester you want to delete.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SuggesterName [StandardName] <p>Specifies the name of the suggester you want to delete.</p>
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: SuggesterName
-- @return DeleteSuggesterRequest structure as a key-value pair table
function M.DeleteSuggesterRequest(args)
assert(args, "You must provide an argument table when creating DeleteSuggesterRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SuggesterName"] = args["SuggesterName"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDeleteSuggesterRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeExpressionsRequest = { ["ExpressionNames"] = true, ["Deployed"] = true, ["DomainName"] = true, nil }
function asserts.AssertDescribeExpressionsRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeExpressionsRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["ExpressionNames"] then asserts.AssertStandardNameList(struct["ExpressionNames"]) end
if struct["Deployed"] then asserts.AssertBoolean(struct["Deployed"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeExpressionsRequest[k], "DescribeExpressionsRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeExpressionsRequest
-- <p>Container for the parameters to the <code><a>DescribeDomains</a></code> operation. Specifies the name of the domain you want to describe. To restrict the response to particular expressions, specify the names of the expressions you want to describe. To show the active configuration and exclude any pending changes, set the <code>Deployed</code> option to <code>true</code>.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * ExpressionNames [StandardNameList] <p>Limits the <code><a>DescribeExpressions</a></code> response to the specified expressions. If not specified, all expressions are shown.</p>
-- * Deployed [Boolean] <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
-- * DomainName [DomainName] <p>The name of the domain you want to describe.</p>
-- Required key: DomainName
-- @return DescribeExpressionsRequest structure as a key-value pair table
function M.DescribeExpressionsRequest(args)
assert(args, "You must provide an argument table when creating DescribeExpressionsRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["ExpressionNames"] = args["ExpressionNames"],
["Deployed"] = args["Deployed"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDescribeExpressionsRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.LatLonOptions = { ["SourceField"] = true, ["DefaultValue"] = true, ["FacetEnabled"] = true, ["SearchEnabled"] = true, ["SortEnabled"] = true, ["ReturnEnabled"] = true, nil }
function asserts.AssertLatLonOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected LatLonOptions to be of type 'table'")
if struct["SourceField"] then asserts.AssertFieldName(struct["SourceField"]) end
if struct["DefaultValue"] then asserts.AssertFieldValue(struct["DefaultValue"]) end
if struct["FacetEnabled"] then asserts.AssertBoolean(struct["FacetEnabled"]) end
if struct["SearchEnabled"] then asserts.AssertBoolean(struct["SearchEnabled"]) end
if struct["SortEnabled"] then asserts.AssertBoolean(struct["SortEnabled"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
for k,_ in pairs(struct) do
assert(keys.LatLonOptions[k], "LatLonOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type LatLonOptions
-- <p>Options for a latlon field. A latlon field contains a location stored as a latitude and longitude value pair. Present if <code>IndexFieldType</code> specifies the field is of type <code>latlon</code>. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SourceField [FieldName]
-- * DefaultValue [FieldValue] A value to use for the field if the field isn't specified for a document.
-- * FacetEnabled [Boolean] <p>Whether facet information can be returned for the field.</p>
-- * SearchEnabled [Boolean] <p>Whether the contents of the field are searchable.</p>
-- * SortEnabled [Boolean] <p>Whether the field can be used to sort the search results.</p>
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- @return LatLonOptions structure as a key-value pair table
function M.LatLonOptions(args)
assert(args, "You must provide an argument table when creating LatLonOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SourceField"] = args["SourceField"],
["DefaultValue"] = args["DefaultValue"],
["FacetEnabled"] = args["FacetEnabled"],
["SearchEnabled"] = args["SearchEnabled"],
["SortEnabled"] = args["SortEnabled"],
["ReturnEnabled"] = args["ReturnEnabled"],
}
asserts.AssertLatLonOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DateOptions = { ["SourceField"] = true, ["DefaultValue"] = true, ["FacetEnabled"] = true, ["SearchEnabled"] = true, ["SortEnabled"] = true, ["ReturnEnabled"] = true, nil }
function asserts.AssertDateOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected DateOptions to be of type 'table'")
if struct["SourceField"] then asserts.AssertFieldName(struct["SourceField"]) end
if struct["DefaultValue"] then asserts.AssertFieldValue(struct["DefaultValue"]) end
if struct["FacetEnabled"] then asserts.AssertBoolean(struct["FacetEnabled"]) end
if struct["SearchEnabled"] then asserts.AssertBoolean(struct["SearchEnabled"]) end
if struct["SortEnabled"] then asserts.AssertBoolean(struct["SortEnabled"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
for k,_ in pairs(struct) do
assert(keys.DateOptions[k], "DateOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DateOptions
-- <p>Options for a date field. Dates and times are specified in UTC (Coordinated Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present if <code>IndexFieldType</code> specifies the field is of type <code>date</code>. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SourceField [FieldName]
-- * DefaultValue [FieldValue] A value to use for the field if the field isn't specified for a document.
-- * FacetEnabled [Boolean] <p>Whether facet information can be returned for the field.</p>
-- * SearchEnabled [Boolean] <p>Whether the contents of the field are searchable.</p>
-- * SortEnabled [Boolean] <p>Whether the field can be used to sort the search results.</p>
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- @return DateOptions structure as a key-value pair table
function M.DateOptions(args)
assert(args, "You must provide an argument table when creating DateOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SourceField"] = args["SourceField"],
["DefaultValue"] = args["DefaultValue"],
["FacetEnabled"] = args["FacetEnabled"],
["SearchEnabled"] = args["SearchEnabled"],
["SortEnabled"] = args["SortEnabled"],
["ReturnEnabled"] = args["ReturnEnabled"],
}
asserts.AssertDateOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DefineIndexFieldRequest = { ["IndexField"] = true, ["DomainName"] = true, nil }
function asserts.AssertDefineIndexFieldRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DefineIndexFieldRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["IndexField"], "Expected key IndexField to exist in table")
if struct["IndexField"] then asserts.AssertIndexField(struct["IndexField"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DefineIndexFieldRequest[k], "DefineIndexFieldRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DefineIndexFieldRequest
-- <p>Container for the parameters to the <code><a>DefineIndexField</a></code> operation. Specifies the name of the domain you want to update and the index field configuration.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * IndexField [IndexField] <p>The index field and field options you want to configure. </p>
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: IndexField
-- @return DefineIndexFieldRequest structure as a key-value pair table
function M.DefineIndexFieldRequest(args)
assert(args, "You must provide an argument table when creating DefineIndexFieldRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["IndexField"] = args["IndexField"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDefineIndexFieldRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeScalingParametersResponse = { ["ScalingParameters"] = true, nil }
function asserts.AssertDescribeScalingParametersResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeScalingParametersResponse to be of type 'table'")
assert(struct["ScalingParameters"], "Expected key ScalingParameters to exist in table")
if struct["ScalingParameters"] then asserts.AssertScalingParametersStatus(struct["ScalingParameters"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeScalingParametersResponse[k], "DescribeScalingParametersResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeScalingParametersResponse
-- <p>The result of a <code>DescribeScalingParameters</code> request. Contains the scaling parameters configured for the domain specified in the request.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * ScalingParameters [ScalingParametersStatus]
-- Required key: ScalingParameters
-- @return DescribeScalingParametersResponse structure as a key-value pair table
function M.DescribeScalingParametersResponse(args)
assert(args, "You must provide an argument table when creating DescribeScalingParametersResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["ScalingParameters"] = args["ScalingParameters"],
}
asserts.AssertDescribeScalingParametersResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.CreateDomainRequest = { ["DomainName"] = true, nil }
function asserts.AssertCreateDomainRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected CreateDomainRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.CreateDomainRequest[k], "CreateDomainRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type CreateDomainRequest
-- <p>Container for the parameters to the <code><a>CreateDomain</a></code> operation. Specifies a name for the new search domain.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DomainName [DomainName] <p>A name for the domain you are creating. Allowed characters are a-z (lower-case letters), 0-9, and hyphen (-). Domain names must start with a letter or number and be at least 3 and no more than 28 characters long.</p>
-- Required key: DomainName
-- @return CreateDomainRequest structure as a key-value pair table
function M.CreateDomainRequest(args)
assert(args, "You must provide an argument table when creating CreateDomainRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DomainName"] = args["DomainName"],
}
asserts.AssertCreateDomainRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.Limits = { ["MaximumReplicationCount"] = true, ["MaximumPartitionCount"] = true, nil }
function asserts.AssertLimits(struct)
assert(struct)
assert(type(struct) == "table", "Expected Limits to be of type 'table'")
assert(struct["MaximumReplicationCount"], "Expected key MaximumReplicationCount to exist in table")
assert(struct["MaximumPartitionCount"], "Expected key MaximumPartitionCount to exist in table")
if struct["MaximumReplicationCount"] then asserts.AssertMaximumReplicationCount(struct["MaximumReplicationCount"]) end
if struct["MaximumPartitionCount"] then asserts.AssertMaximumPartitionCount(struct["MaximumPartitionCount"]) end
for k,_ in pairs(struct) do
assert(keys.Limits[k], "Limits contains unknown key " .. tostring(k))
end
end
--- Create a structure of type Limits
--
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * MaximumReplicationCount [MaximumReplicationCount]
-- * MaximumPartitionCount [MaximumPartitionCount]
-- Required key: MaximumReplicationCount
-- Required key: MaximumPartitionCount
-- @return Limits structure as a key-value pair table
function M.Limits(args)
assert(args, "You must provide an argument table when creating Limits")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["MaximumReplicationCount"] = args["MaximumReplicationCount"],
["MaximumPartitionCount"] = args["MaximumPartitionCount"],
}
asserts.AssertLimits(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.InternalException = { nil }
function asserts.AssertInternalException(struct)
assert(struct)
assert(type(struct) == "table", "Expected InternalException to be of type 'table'")
for k,_ in pairs(struct) do
assert(keys.InternalException[k], "InternalException contains unknown key " .. tostring(k))
end
end
--- Create a structure of type InternalException
-- <p>An internal error occurred while processing the request. If this problem persists, report an issue from the <a href="http://status.aws.amazon.com/" target="_blank">Service Health Dashboard</a>.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- @return InternalException structure as a key-value pair table
function M.InternalException(args)
assert(args, "You must provide an argument table when creating InternalException")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
}
asserts.AssertInternalException(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DomainStatus = { ["SearchInstanceType"] = true, ["DomainId"] = true, ["Limits"] = true, ["Created"] = true, ["Deleted"] = true, ["SearchInstanceCount"] = true, ["DomainName"] = true, ["SearchService"] = true, ["RequiresIndexDocuments"] = true, ["Processing"] = true, ["DocService"] = true, ["ARN"] = true, ["SearchPartitionCount"] = true, nil }
function asserts.AssertDomainStatus(struct)
assert(struct)
assert(type(struct) == "table", "Expected DomainStatus to be of type 'table'")
assert(struct["DomainId"], "Expected key DomainId to exist in table")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["RequiresIndexDocuments"], "Expected key RequiresIndexDocuments to exist in table")
if struct["SearchInstanceType"] then asserts.AssertSearchInstanceType(struct["SearchInstanceType"]) end
if struct["DomainId"] then asserts.AssertDomainId(struct["DomainId"]) end
if struct["Limits"] then asserts.AssertLimits(struct["Limits"]) end
if struct["Created"] then asserts.AssertBoolean(struct["Created"]) end
if struct["Deleted"] then asserts.AssertBoolean(struct["Deleted"]) end
if struct["SearchInstanceCount"] then asserts.AssertInstanceCount(struct["SearchInstanceCount"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
if struct["SearchService"] then asserts.AssertServiceEndpoint(struct["SearchService"]) end
if struct["RequiresIndexDocuments"] then asserts.AssertBoolean(struct["RequiresIndexDocuments"]) end
if struct["Processing"] then asserts.AssertBoolean(struct["Processing"]) end
if struct["DocService"] then asserts.AssertServiceEndpoint(struct["DocService"]) end
if struct["ARN"] then asserts.AssertARN(struct["ARN"]) end
if struct["SearchPartitionCount"] then asserts.AssertPartitionCount(struct["SearchPartitionCount"]) end
for k,_ in pairs(struct) do
assert(keys.DomainStatus[k], "DomainStatus contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DomainStatus
-- <p>The current status of the search domain.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SearchInstanceType [SearchInstanceType] <p>The instance type that is being used to process search requests.</p>
-- * DomainId [DomainId]
-- * Limits [Limits]
-- * Created [Boolean] <p>True if the search domain is created. It can take several minutes to initialize a domain when <a>CreateDomain</a> is called. Newly created search domains are returned from <a>DescribeDomains</a> with a false value for Created until domain creation is complete.</p>
-- * Deleted [Boolean] <p>True if the search domain has been deleted. The system must clean up resources dedicated to the search domain when <a>DeleteDomain</a> is called. Newly deleted search domains are returned from <a>DescribeDomains</a> with a true value for IsDeleted for several minutes until resource cleanup is complete.</p>
-- * SearchInstanceCount [InstanceCount] <p>The number of search instances that are available to process search requests.</p>
-- * DomainName [DomainName]
-- * SearchService [ServiceEndpoint] <p>The service endpoint for requesting search results from a search domain.</p>
-- * RequiresIndexDocuments [Boolean] <p>True if <a>IndexDocuments</a> needs to be called to activate the current domain configuration.</p>
-- * Processing [Boolean] <p>True if processing is being done to activate the current domain configuration.</p>
-- * DocService [ServiceEndpoint] <p>The service endpoint for updating documents in a search domain.</p>
-- * ARN [ARN]
-- * SearchPartitionCount [PartitionCount] <p>The number of partitions across which the search index is spread.</p>
-- Required key: DomainId
-- Required key: DomainName
-- Required key: RequiresIndexDocuments
-- @return DomainStatus structure as a key-value pair table
function M.DomainStatus(args)
assert(args, "You must provide an argument table when creating DomainStatus")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SearchInstanceType"] = args["SearchInstanceType"],
["DomainId"] = args["DomainId"],
["Limits"] = args["Limits"],
["Created"] = args["Created"],
["Deleted"] = args["Deleted"],
["SearchInstanceCount"] = args["SearchInstanceCount"],
["DomainName"] = args["DomainName"],
["SearchService"] = args["SearchService"],
["RequiresIndexDocuments"] = args["RequiresIndexDocuments"],
["Processing"] = args["Processing"],
["DocService"] = args["DocService"],
["ARN"] = args["ARN"],
["SearchPartitionCount"] = args["SearchPartitionCount"],
}
asserts.AssertDomainStatus(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.UpdateServiceAccessPoliciesResponse = { ["AccessPolicies"] = true, nil }
function asserts.AssertUpdateServiceAccessPoliciesResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected UpdateServiceAccessPoliciesResponse to be of type 'table'")
assert(struct["AccessPolicies"], "Expected key AccessPolicies to exist in table")
if struct["AccessPolicies"] then asserts.AssertAccessPoliciesStatus(struct["AccessPolicies"]) end
for k,_ in pairs(struct) do
assert(keys.UpdateServiceAccessPoliciesResponse[k], "UpdateServiceAccessPoliciesResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type UpdateServiceAccessPoliciesResponse
-- <p>The result of an <code>UpdateServiceAccessPolicies</code> request. Contains the new access policies.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AccessPolicies [AccessPoliciesStatus] <p>The access rules configured for the domain.</p>
-- Required key: AccessPolicies
-- @return UpdateServiceAccessPoliciesResponse structure as a key-value pair table
function M.UpdateServiceAccessPoliciesResponse(args)
assert(args, "You must provide an argument table when creating UpdateServiceAccessPoliciesResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AccessPolicies"] = args["AccessPolicies"],
}
asserts.AssertUpdateServiceAccessPoliciesResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.Expression = { ["ExpressionName"] = true, ["ExpressionValue"] = true, nil }
function asserts.AssertExpression(struct)
assert(struct)
assert(type(struct) == "table", "Expected Expression to be of type 'table'")
assert(struct["ExpressionName"], "Expected key ExpressionName to exist in table")
assert(struct["ExpressionValue"], "Expected key ExpressionValue to exist in table")
if struct["ExpressionName"] then asserts.AssertStandardName(struct["ExpressionName"]) end
if struct["ExpressionValue"] then asserts.AssertExpressionValue(struct["ExpressionValue"]) end
for k,_ in pairs(struct) do
assert(keys.Expression[k], "Expression contains unknown key " .. tostring(k))
end
end
--- Create a structure of type Expression
-- <p>A named expression that can be evaluated at search time. Can be used to sort the search results, define other expressions, or return computed information in the search results. </p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * ExpressionName [StandardName]
-- * ExpressionValue [ExpressionValue]
-- Required key: ExpressionName
-- Required key: ExpressionValue
-- @return Expression structure as a key-value pair table
function M.Expression(args)
assert(args, "You must provide an argument table when creating Expression")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["ExpressionName"] = args["ExpressionName"],
["ExpressionValue"] = args["ExpressionValue"],
}
asserts.AssertExpression(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DefineSuggesterResponse = { ["Suggester"] = true, nil }
function asserts.AssertDefineSuggesterResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DefineSuggesterResponse to be of type 'table'")
assert(struct["Suggester"], "Expected key Suggester to exist in table")
if struct["Suggester"] then asserts.AssertSuggesterStatus(struct["Suggester"]) end
for k,_ in pairs(struct) do
assert(keys.DefineSuggesterResponse[k], "DefineSuggesterResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DefineSuggesterResponse
-- <p>The result of a <code>DefineSuggester</code> request. Contains the status of the newly-configured suggester.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Suggester [SuggesterStatus]
-- Required key: Suggester
-- @return DefineSuggesterResponse structure as a key-value pair table
function M.DefineSuggesterResponse(args)
assert(args, "You must provide an argument table when creating DefineSuggesterResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Suggester"] = args["Suggester"],
}
asserts.AssertDefineSuggesterResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.AnalysisScheme = { ["AnalysisSchemeLanguage"] = true, ["AnalysisSchemeName"] = true, ["AnalysisOptions"] = true, nil }
function asserts.AssertAnalysisScheme(struct)
assert(struct)
assert(type(struct) == "table", "Expected AnalysisScheme to be of type 'table'")
assert(struct["AnalysisSchemeName"], "Expected key AnalysisSchemeName to exist in table")
assert(struct["AnalysisSchemeLanguage"], "Expected key AnalysisSchemeLanguage to exist in table")
if struct["AnalysisSchemeLanguage"] then asserts.AssertAnalysisSchemeLanguage(struct["AnalysisSchemeLanguage"]) end
if struct["AnalysisSchemeName"] then asserts.AssertStandardName(struct["AnalysisSchemeName"]) end
if struct["AnalysisOptions"] then asserts.AssertAnalysisOptions(struct["AnalysisOptions"]) end
for k,_ in pairs(struct) do
assert(keys.AnalysisScheme[k], "AnalysisScheme contains unknown key " .. tostring(k))
end
end
--- Create a structure of type AnalysisScheme
-- <p>Configuration information for an analysis scheme. Each analysis scheme has a unique name and specifies the language of the text to be processed. The following options can be configured for an analysis scheme: <code>Synonyms</code>, <code>Stopwords</code>, <code>StemmingDictionary</code>, <code>JapaneseTokenizationDictionary</code> and <code>AlgorithmicStemming</code>.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AnalysisSchemeLanguage [AnalysisSchemeLanguage]
-- * AnalysisSchemeName [StandardName]
-- * AnalysisOptions [AnalysisOptions]
-- Required key: AnalysisSchemeName
-- Required key: AnalysisSchemeLanguage
-- @return AnalysisScheme structure as a key-value pair table
function M.AnalysisScheme(args)
assert(args, "You must provide an argument table when creating AnalysisScheme")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AnalysisSchemeLanguage"] = args["AnalysisSchemeLanguage"],
["AnalysisSchemeName"] = args["AnalysisSchemeName"],
["AnalysisOptions"] = args["AnalysisOptions"],
}
asserts.AssertAnalysisScheme(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.AnalysisOptions = { ["AlgorithmicStemming"] = true, ["Synonyms"] = true, ["StemmingDictionary"] = true, ["Stopwords"] = true, ["JapaneseTokenizationDictionary"] = true, nil }
function asserts.AssertAnalysisOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected AnalysisOptions to be of type 'table'")
if struct["AlgorithmicStemming"] then asserts.AssertAlgorithmicStemming(struct["AlgorithmicStemming"]) end
if struct["Synonyms"] then asserts.AssertString(struct["Synonyms"]) end
if struct["StemmingDictionary"] then asserts.AssertString(struct["StemmingDictionary"]) end
if struct["Stopwords"] then asserts.AssertString(struct["Stopwords"]) end
if struct["JapaneseTokenizationDictionary"] then asserts.AssertString(struct["JapaneseTokenizationDictionary"]) end
for k,_ in pairs(struct) do
assert(keys.AnalysisOptions[k], "AnalysisOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type AnalysisOptions
-- <p>Synonyms, stopwords, and stemming options for an analysis scheme. Includes tokenization dictionary for Japanese.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AlgorithmicStemming [AlgorithmicStemming] <p>The level of algorithmic stemming to perform: <code>none</code>, <code>minimal</code>, <code>light</code>, or <code>full</code>. The available levels vary depending on the language. For more information, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/text-processing.html#text-processing-settings" target="_blank">Language Specific Text Processing Settings</a> in the <i>Amazon CloudSearch Developer Guide</i> </p>
-- * Synonyms [String] <p>A JSON object that defines synonym groups and aliases. A synonym group is an array of arrays, where each sub-array is a group of terms where each term in the group is considered a synonym of every other term in the group. The aliases value is an object that contains a collection of string:value pairs where the string specifies a term and the array of values specifies each of the aliases for that term. An alias is considered a synonym of the specified term, but the term is not considered a synonym of the alias. For more information about specifying synonyms, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html#synonyms">Synonyms</a> in the <i>Amazon CloudSearch Developer Guide</i>.</p>
-- * StemmingDictionary [String] <p>A JSON object that contains a collection of string:value pairs that each map a term to its stem. For example, <code>{"term1": "stem1", "term2": "stem2", "term3": "stem3"}</code>. The stemming dictionary is applied in addition to any algorithmic stemming. This enables you to override the results of the algorithmic stemming to correct specific cases of overstemming or understemming. The maximum size of a stemming dictionary is 500 KB.</p>
-- * Stopwords [String] <p>A JSON array of terms to ignore during indexing and searching. For example, <code>["a", "an", "the", "of"]</code>. The stopwords dictionary must explicitly list each word you want to ignore. Wildcards and regular expressions are not supported. </p>
-- * JapaneseTokenizationDictionary [String] <p>A JSON array that contains a collection of terms, tokens, readings and part of speech for Japanese Tokenizaiton. The Japanese tokenization dictionary enables you to override the default tokenization for selected terms. This is only valid for Japanese language fields.</p>
-- @return AnalysisOptions structure as a key-value pair table
function M.AnalysisOptions(args)
assert(args, "You must provide an argument table when creating AnalysisOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AlgorithmicStemming"] = args["AlgorithmicStemming"],
["Synonyms"] = args["Synonyms"],
["StemmingDictionary"] = args["StemmingDictionary"],
["Stopwords"] = args["Stopwords"],
["JapaneseTokenizationDictionary"] = args["JapaneseTokenizationDictionary"],
}
asserts.AssertAnalysisOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DeleteDomainResponse = { ["DomainStatus"] = true, nil }
function asserts.AssertDeleteDomainResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DeleteDomainResponse to be of type 'table'")
if struct["DomainStatus"] then asserts.AssertDomainStatus(struct["DomainStatus"]) end
for k,_ in pairs(struct) do
assert(keys.DeleteDomainResponse[k], "DeleteDomainResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DeleteDomainResponse
-- <p>The result of a <code>DeleteDomain</code> request. Contains the status of a newly deleted domain, or no status if the domain has already been completely deleted.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DomainStatus [DomainStatus]
-- @return DeleteDomainResponse structure as a key-value pair table
function M.DeleteDomainResponse(args)
assert(args, "You must provide an argument table when creating DeleteDomainResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DomainStatus"] = args["DomainStatus"],
}
asserts.AssertDeleteDomainResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.ResourceNotFoundException = { nil }
function asserts.AssertResourceNotFoundException(struct)
assert(struct)
assert(type(struct) == "table", "Expected ResourceNotFoundException to be of type 'table'")
for k,_ in pairs(struct) do
assert(keys.ResourceNotFoundException[k], "ResourceNotFoundException contains unknown key " .. tostring(k))
end
end
--- Create a structure of type ResourceNotFoundException
-- <p>The request was rejected because it attempted to reference a resource that does not exist.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- @return ResourceNotFoundException structure as a key-value pair table
function M.ResourceNotFoundException(args)
assert(args, "You must provide an argument table when creating ResourceNotFoundException")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
}
asserts.AssertResourceNotFoundException(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeServiceAccessPoliciesResponse = { ["AccessPolicies"] = true, nil }
function asserts.AssertDescribeServiceAccessPoliciesResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeServiceAccessPoliciesResponse to be of type 'table'")
assert(struct["AccessPolicies"], "Expected key AccessPolicies to exist in table")
if struct["AccessPolicies"] then asserts.AssertAccessPoliciesStatus(struct["AccessPolicies"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeServiceAccessPoliciesResponse[k], "DescribeServiceAccessPoliciesResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeServiceAccessPoliciesResponse
-- <p>The result of a <code>DescribeServiceAccessPolicies</code> request.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AccessPolicies [AccessPoliciesStatus] <p>The access rules configured for the domain specified in the request.</p>
-- Required key: AccessPolicies
-- @return DescribeServiceAccessPoliciesResponse structure as a key-value pair table
function M.DescribeServiceAccessPoliciesResponse(args)
assert(args, "You must provide an argument table when creating DescribeServiceAccessPoliciesResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AccessPolicies"] = args["AccessPolicies"],
}
asserts.AssertDescribeServiceAccessPoliciesResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DisabledOperationException = { nil }
function asserts.AssertDisabledOperationException(struct)
assert(struct)
assert(type(struct) == "table", "Expected DisabledOperationException to be of type 'table'")
for k,_ in pairs(struct) do
assert(keys.DisabledOperationException[k], "DisabledOperationException contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DisabledOperationException
-- <p>The request was rejected because it attempted an operation which is not enabled.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- @return DisabledOperationException structure as a key-value pair table
function M.DisabledOperationException(args)
assert(args, "You must provide an argument table when creating DisabledOperationException")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
}
asserts.AssertDisabledOperationException(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.TextArrayOptions = { ["SourceFields"] = true, ["DefaultValue"] = true, ["HighlightEnabled"] = true, ["ReturnEnabled"] = true, ["AnalysisScheme"] = true, nil }
function asserts.AssertTextArrayOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected TextArrayOptions to be of type 'table'")
if struct["SourceFields"] then asserts.AssertFieldNameCommaList(struct["SourceFields"]) end
if struct["DefaultValue"] then asserts.AssertFieldValue(struct["DefaultValue"]) end
if struct["HighlightEnabled"] then asserts.AssertBoolean(struct["HighlightEnabled"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
if struct["AnalysisScheme"] then asserts.AssertWord(struct["AnalysisScheme"]) end
for k,_ in pairs(struct) do
assert(keys.TextArrayOptions[k], "TextArrayOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type TextArrayOptions
-- <p>Options for a field that contains an array of text strings. Present if <code>IndexFieldType</code> specifies the field is of type <code>text-array</code>. A <code>text-array</code> field is always searchable. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SourceFields [FieldNameCommaList] <p>A list of source fields to map to the field. </p>
-- * DefaultValue [FieldValue] A value to use for the field if the field isn't specified for a document.
-- * HighlightEnabled [Boolean] <p>Whether highlights can be returned for the field.</p>
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- * AnalysisScheme [Word] <p>The name of an analysis scheme for a <code>text-array</code> field.</p>
-- @return TextArrayOptions structure as a key-value pair table
function M.TextArrayOptions(args)
assert(args, "You must provide an argument table when creating TextArrayOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SourceFields"] = args["SourceFields"],
["DefaultValue"] = args["DefaultValue"],
["HighlightEnabled"] = args["HighlightEnabled"],
["ReturnEnabled"] = args["ReturnEnabled"],
["AnalysisScheme"] = args["AnalysisScheme"],
}
asserts.AssertTextArrayOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeAvailabilityOptionsResponse = { ["AvailabilityOptions"] = true, nil }
function asserts.AssertDescribeAvailabilityOptionsResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeAvailabilityOptionsResponse to be of type 'table'")
if struct["AvailabilityOptions"] then asserts.AssertAvailabilityOptionsStatus(struct["AvailabilityOptions"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeAvailabilityOptionsResponse[k], "DescribeAvailabilityOptionsResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeAvailabilityOptionsResponse
-- <p>The result of a <code>DescribeAvailabilityOptions</code> request. Indicates whether or not the Multi-AZ option is enabled for the domain specified in the request. </p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AvailabilityOptions [AvailabilityOptionsStatus] <p>The availability options configured for the domain. Indicates whether Multi-AZ is enabled for the domain. </p>
-- @return DescribeAvailabilityOptionsResponse structure as a key-value pair table
function M.DescribeAvailabilityOptionsResponse(args)
assert(args, "You must provide an argument table when creating DescribeAvailabilityOptionsResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AvailabilityOptions"] = args["AvailabilityOptions"],
}
asserts.AssertDescribeAvailabilityOptionsResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.IndexFieldStatus = { ["Status"] = true, ["Options"] = true, nil }
function asserts.AssertIndexFieldStatus(struct)
assert(struct)
assert(type(struct) == "table", "Expected IndexFieldStatus to be of type 'table'")
assert(struct["Options"], "Expected key Options to exist in table")
assert(struct["Status"], "Expected key Status to exist in table")
if struct["Status"] then asserts.AssertOptionStatus(struct["Status"]) end
if struct["Options"] then asserts.AssertIndexField(struct["Options"]) end
for k,_ in pairs(struct) do
assert(keys.IndexFieldStatus[k], "IndexFieldStatus contains unknown key " .. tostring(k))
end
end
--- Create a structure of type IndexFieldStatus
-- <p>The value of an <code>IndexField</code> and its current status.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Status [OptionStatus]
-- * Options [IndexField]
-- Required key: Options
-- Required key: Status
-- @return IndexFieldStatus structure as a key-value pair table
function M.IndexFieldStatus(args)
assert(args, "You must provide an argument table when creating IndexFieldStatus")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Status"] = args["Status"],
["Options"] = args["Options"],
}
asserts.AssertIndexFieldStatus(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeAnalysisSchemesRequest = { ["AnalysisSchemeNames"] = true, ["Deployed"] = true, ["DomainName"] = true, nil }
function asserts.AssertDescribeAnalysisSchemesRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeAnalysisSchemesRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["AnalysisSchemeNames"] then asserts.AssertStandardNameList(struct["AnalysisSchemeNames"]) end
if struct["Deployed"] then asserts.AssertBoolean(struct["Deployed"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeAnalysisSchemesRequest[k], "DescribeAnalysisSchemesRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeAnalysisSchemesRequest
-- <p>Container for the parameters to the <code><a>DescribeAnalysisSchemes</a></code> operation. Specifies the name of the domain you want to describe. To limit the response to particular analysis schemes, specify the names of the analysis schemes you want to describe. To show the active configuration and exclude any pending changes, set the <code>Deployed</code> option to <code>true</code>. </p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AnalysisSchemeNames [StandardNameList] <p>The analysis schemes you want to describe.</p>
-- * Deployed [Boolean] <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
-- * DomainName [DomainName] <p>The name of the domain you want to describe.</p>
-- Required key: DomainName
-- @return DescribeAnalysisSchemesRequest structure as a key-value pair table
function M.DescribeAnalysisSchemesRequest(args)
assert(args, "You must provide an argument table when creating DescribeAnalysisSchemesRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AnalysisSchemeNames"] = args["AnalysisSchemeNames"],
["Deployed"] = args["Deployed"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDescribeAnalysisSchemesRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DeleteExpressionRequest = { ["ExpressionName"] = true, ["DomainName"] = true, nil }
function asserts.AssertDeleteExpressionRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DeleteExpressionRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["ExpressionName"], "Expected key ExpressionName to exist in table")
if struct["ExpressionName"] then asserts.AssertStandardName(struct["ExpressionName"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DeleteExpressionRequest[k], "DeleteExpressionRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DeleteExpressionRequest
-- <p>Container for the parameters to the <code><a>DeleteExpression</a></code> operation. Specifies the name of the domain you want to update and the name of the expression you want to delete.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * ExpressionName [StandardName] <p>The name of the <code><a>Expression</a></code> to delete.</p>
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: ExpressionName
-- @return DeleteExpressionRequest structure as a key-value pair table
function M.DeleteExpressionRequest(args)
assert(args, "You must provide an argument table when creating DeleteExpressionRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["ExpressionName"] = args["ExpressionName"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDeleteExpressionRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.InvalidTypeException = { nil }
function asserts.AssertInvalidTypeException(struct)
assert(struct)
assert(type(struct) == "table", "Expected InvalidTypeException to be of type 'table'")
for k,_ in pairs(struct) do
assert(keys.InvalidTypeException[k], "InvalidTypeException contains unknown key " .. tostring(k))
end
end
--- Create a structure of type InvalidTypeException
-- <p>The request was rejected because it specified an invalid type definition.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- @return InvalidTypeException structure as a key-value pair table
function M.InvalidTypeException(args)
assert(args, "You must provide an argument table when creating InvalidTypeException")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
}
asserts.AssertInvalidTypeException(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.OptionStatus = { ["PendingDeletion"] = true, ["State"] = true, ["CreationDate"] = true, ["UpdateVersion"] = true, ["UpdateDate"] = true, nil }
function asserts.AssertOptionStatus(struct)
assert(struct)
assert(type(struct) == "table", "Expected OptionStatus to be of type 'table'")
assert(struct["CreationDate"], "Expected key CreationDate to exist in table")
assert(struct["UpdateDate"], "Expected key UpdateDate to exist in table")
assert(struct["State"], "Expected key State to exist in table")
if struct["PendingDeletion"] then asserts.AssertBoolean(struct["PendingDeletion"]) end
if struct["State"] then asserts.AssertOptionState(struct["State"]) end
if struct["CreationDate"] then asserts.AssertUpdateTimestamp(struct["CreationDate"]) end
if struct["UpdateVersion"] then asserts.AssertUIntValue(struct["UpdateVersion"]) end
if struct["UpdateDate"] then asserts.AssertUpdateTimestamp(struct["UpdateDate"]) end
for k,_ in pairs(struct) do
assert(keys.OptionStatus[k], "OptionStatus contains unknown key " .. tostring(k))
end
end
--- Create a structure of type OptionStatus
-- <p>The status of domain configuration option.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * PendingDeletion [Boolean] <p>Indicates that the option will be deleted once processing is complete.</p>
-- * State [OptionState] <p>The state of processing a change to an option. Possible values:</p> <ul> <li> <code>RequiresIndexDocuments</code>: the option's latest value will not be deployed until <a>IndexDocuments</a> has been called and indexing is complete.</li> <li> <code>Processing</code>: the option's latest value is in the process of being activated. </li> <li> <code>Active</code>: the option's latest value is completely deployed.</li> <li> <code>FailedToValidate</code>: the option value is not compatible with the domain's data and cannot be used to index the data. You must either modify the option value or update or remove the incompatible documents.</li> </ul>
-- * CreationDate [UpdateTimestamp] <p>A timestamp for when this option was created.</p>
-- * UpdateVersion [UIntValue] <p>A unique integer that indicates when this option was last updated.</p>
-- * UpdateDate [UpdateTimestamp] <p>A timestamp for when this option was last updated.</p>
-- Required key: CreationDate
-- Required key: UpdateDate
-- Required key: State
-- @return OptionStatus structure as a key-value pair table
function M.OptionStatus(args)
assert(args, "You must provide an argument table when creating OptionStatus")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["PendingDeletion"] = args["PendingDeletion"],
["State"] = args["State"],
["CreationDate"] = args["CreationDate"],
["UpdateVersion"] = args["UpdateVersion"],
["UpdateDate"] = args["UpdateDate"],
}
asserts.AssertOptionStatus(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.IndexField = { ["IntArrayOptions"] = true, ["LiteralArrayOptions"] = true, ["LiteralOptions"] = true, ["LatLonOptions"] = true, ["DateArrayOptions"] = true, ["DoubleArrayOptions"] = true, ["TextArrayOptions"] = true, ["IndexFieldName"] = true, ["DoubleOptions"] = true, ["DateOptions"] = true, ["IndexFieldType"] = true, ["IntOptions"] = true, ["TextOptions"] = true, nil }
function asserts.AssertIndexField(struct)
assert(struct)
assert(type(struct) == "table", "Expected IndexField to be of type 'table'")
assert(struct["IndexFieldName"], "Expected key IndexFieldName to exist in table")
assert(struct["IndexFieldType"], "Expected key IndexFieldType to exist in table")
if struct["IntArrayOptions"] then asserts.AssertIntArrayOptions(struct["IntArrayOptions"]) end
if struct["LiteralArrayOptions"] then asserts.AssertLiteralArrayOptions(struct["LiteralArrayOptions"]) end
if struct["LiteralOptions"] then asserts.AssertLiteralOptions(struct["LiteralOptions"]) end
if struct["LatLonOptions"] then asserts.AssertLatLonOptions(struct["LatLonOptions"]) end
if struct["DateArrayOptions"] then asserts.AssertDateArrayOptions(struct["DateArrayOptions"]) end
if struct["DoubleArrayOptions"] then asserts.AssertDoubleArrayOptions(struct["DoubleArrayOptions"]) end
if struct["TextArrayOptions"] then asserts.AssertTextArrayOptions(struct["TextArrayOptions"]) end
if struct["IndexFieldName"] then asserts.AssertDynamicFieldName(struct["IndexFieldName"]) end
if struct["DoubleOptions"] then asserts.AssertDoubleOptions(struct["DoubleOptions"]) end
if struct["DateOptions"] then asserts.AssertDateOptions(struct["DateOptions"]) end
if struct["IndexFieldType"] then asserts.AssertIndexFieldType(struct["IndexFieldType"]) end
if struct["IntOptions"] then asserts.AssertIntOptions(struct["IntOptions"]) end
if struct["TextOptions"] then asserts.AssertTextOptions(struct["TextOptions"]) end
for k,_ in pairs(struct) do
assert(keys.IndexField[k], "IndexField contains unknown key " .. tostring(k))
end
end
--- Create a structure of type IndexField
-- <p>Configuration information for a field in the index, including its name, type, and options. The supported options depend on the <code><a>IndexFieldType</a></code>.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * IntArrayOptions [IntArrayOptions]
-- * LiteralArrayOptions [LiteralArrayOptions]
-- * LiteralOptions [LiteralOptions]
-- * LatLonOptions [LatLonOptions]
-- * DateArrayOptions [DateArrayOptions]
-- * DoubleArrayOptions [DoubleArrayOptions]
-- * TextArrayOptions [TextArrayOptions]
-- * IndexFieldName [DynamicFieldName] <p>A string that represents the name of an index field. CloudSearch supports regular index fields as well as dynamic fields. A dynamic field's name defines a pattern that begins or ends with a wildcard. Any document fields that don't map to a regular index field but do match a dynamic field's pattern are configured with the dynamic field's indexing options. </p> <p>Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported. </p> <p>The name <code>score</code> is reserved and cannot be used as a field name. To reference a document's ID, you can use the name <code>_id</code>. </p>
-- * DoubleOptions [DoubleOptions]
-- * DateOptions [DateOptions]
-- * IndexFieldType [IndexFieldType]
-- * IntOptions [IntOptions]
-- * TextOptions [TextOptions]
-- Required key: IndexFieldName
-- Required key: IndexFieldType
-- @return IndexField structure as a key-value pair table
function M.IndexField(args)
assert(args, "You must provide an argument table when creating IndexField")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["IntArrayOptions"] = args["IntArrayOptions"],
["LiteralArrayOptions"] = args["LiteralArrayOptions"],
["LiteralOptions"] = args["LiteralOptions"],
["LatLonOptions"] = args["LatLonOptions"],
["DateArrayOptions"] = args["DateArrayOptions"],
["DoubleArrayOptions"] = args["DoubleArrayOptions"],
["TextArrayOptions"] = args["TextArrayOptions"],
["IndexFieldName"] = args["IndexFieldName"],
["DoubleOptions"] = args["DoubleOptions"],
["DateOptions"] = args["DateOptions"],
["IndexFieldType"] = args["IndexFieldType"],
["IntOptions"] = args["IntOptions"],
["TextOptions"] = args["TextOptions"],
}
asserts.AssertIndexField(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeSuggestersRequest = { ["SuggesterNames"] = true, ["Deployed"] = true, ["DomainName"] = true, nil }
function asserts.AssertDescribeSuggestersRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeSuggestersRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["SuggesterNames"] then asserts.AssertStandardNameList(struct["SuggesterNames"]) end
if struct["Deployed"] then asserts.AssertBoolean(struct["Deployed"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeSuggestersRequest[k], "DescribeSuggestersRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeSuggestersRequest
-- <p>Container for the parameters to the <code><a>DescribeSuggester</a></code> operation. Specifies the name of the domain you want to describe. To restrict the response to particular suggesters, specify the names of the suggesters you want to describe. To show the active configuration and exclude any pending changes, set the <code>Deployed</code> option to <code>true</code>.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SuggesterNames [StandardNameList] <p>The suggesters you want to describe.</p>
-- * Deployed [Boolean] <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
-- * DomainName [DomainName] <p>The name of the domain you want to describe.</p>
-- Required key: DomainName
-- @return DescribeSuggestersRequest structure as a key-value pair table
function M.DescribeSuggestersRequest(args)
assert(args, "You must provide an argument table when creating DescribeSuggestersRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SuggesterNames"] = args["SuggesterNames"],
["Deployed"] = args["Deployed"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDescribeSuggestersRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeIndexFieldsRequest = { ["Deployed"] = true, ["FieldNames"] = true, ["DomainName"] = true, nil }
function asserts.AssertDescribeIndexFieldsRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeIndexFieldsRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["Deployed"] then asserts.AssertBoolean(struct["Deployed"]) end
if struct["FieldNames"] then asserts.AssertDynamicFieldNameList(struct["FieldNames"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeIndexFieldsRequest[k], "DescribeIndexFieldsRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeIndexFieldsRequest
-- <p>Container for the parameters to the <code><a>DescribeIndexFields</a></code> operation. Specifies the name of the domain you want to describe. To restrict the response to particular index fields, specify the names of the index fields you want to describe. To show the active configuration and exclude any pending changes, set the <code>Deployed</code> option to <code>true</code>.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Deployed [Boolean] <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
-- * FieldNames [DynamicFieldNameList] <p>A list of the index fields you want to describe. If not specified, information is returned for all configured index fields.</p>
-- * DomainName [DomainName] <p>The name of the domain you want to describe.</p>
-- Required key: DomainName
-- @return DescribeIndexFieldsRequest structure as a key-value pair table
function M.DescribeIndexFieldsRequest(args)
assert(args, "You must provide an argument table when creating DescribeIndexFieldsRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Deployed"] = args["Deployed"],
["FieldNames"] = args["FieldNames"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDescribeIndexFieldsRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.ScalingParametersStatus = { ["Status"] = true, ["Options"] = true, nil }
function asserts.AssertScalingParametersStatus(struct)
assert(struct)
assert(type(struct) == "table", "Expected ScalingParametersStatus to be of type 'table'")
assert(struct["Options"], "Expected key Options to exist in table")
assert(struct["Status"], "Expected key Status to exist in table")
if struct["Status"] then asserts.AssertOptionStatus(struct["Status"]) end
if struct["Options"] then asserts.AssertScalingParameters(struct["Options"]) end
for k,_ in pairs(struct) do
assert(keys.ScalingParametersStatus[k], "ScalingParametersStatus contains unknown key " .. tostring(k))
end
end
--- Create a structure of type ScalingParametersStatus
-- <p>The status and configuration of a search domain's scaling parameters. </p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Status [OptionStatus]
-- * Options [ScalingParameters]
-- Required key: Options
-- Required key: Status
-- @return ScalingParametersStatus structure as a key-value pair table
function M.ScalingParametersStatus(args)
assert(args, "You must provide an argument table when creating ScalingParametersStatus")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Status"] = args["Status"],
["Options"] = args["Options"],
}
asserts.AssertScalingParametersStatus(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.BuildSuggestersRequest = { ["DomainName"] = true, nil }
function asserts.AssertBuildSuggestersRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected BuildSuggestersRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.BuildSuggestersRequest[k], "BuildSuggestersRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type BuildSuggestersRequest
-- <p>Container for the parameters to the <code><a>BuildSuggester</a></code> operation. Specifies the name of the domain you want to update.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DomainName [DomainName]
-- Required key: DomainName
-- @return BuildSuggestersRequest structure as a key-value pair table
function M.BuildSuggestersRequest(args)
assert(args, "You must provide an argument table when creating BuildSuggestersRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DomainName"] = args["DomainName"],
}
asserts.AssertBuildSuggestersRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DefineAnalysisSchemeRequest = { ["AnalysisScheme"] = true, ["DomainName"] = true, nil }
function asserts.AssertDefineAnalysisSchemeRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DefineAnalysisSchemeRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["AnalysisScheme"], "Expected key AnalysisScheme to exist in table")
if struct["AnalysisScheme"] then asserts.AssertAnalysisScheme(struct["AnalysisScheme"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DefineAnalysisSchemeRequest[k], "DefineAnalysisSchemeRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DefineAnalysisSchemeRequest
-- <p>Container for the parameters to the <code><a>DefineAnalysisScheme</a></code> operation. Specifies the name of the domain you want to update and the analysis scheme configuration.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AnalysisScheme [AnalysisScheme]
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: AnalysisScheme
-- @return DefineAnalysisSchemeRequest structure as a key-value pair table
function M.DefineAnalysisSchemeRequest(args)
assert(args, "You must provide an argument table when creating DefineAnalysisSchemeRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AnalysisScheme"] = args["AnalysisScheme"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDefineAnalysisSchemeRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.IntArrayOptions = { ["SourceFields"] = true, ["FacetEnabled"] = true, ["DefaultValue"] = true, ["ReturnEnabled"] = true, ["SearchEnabled"] = true, nil }
function asserts.AssertIntArrayOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected IntArrayOptions to be of type 'table'")
if struct["SourceFields"] then asserts.AssertFieldNameCommaList(struct["SourceFields"]) end
if struct["FacetEnabled"] then asserts.AssertBoolean(struct["FacetEnabled"]) end
if struct["DefaultValue"] then asserts.AssertLong(struct["DefaultValue"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
if struct["SearchEnabled"] then asserts.AssertBoolean(struct["SearchEnabled"]) end
for k,_ in pairs(struct) do
assert(keys.IntArrayOptions[k], "IntArrayOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type IntArrayOptions
-- <p>Options for a field that contains an array of 64-bit signed integers. Present if <code>IndexFieldType</code> specifies the field is of type <code>int-array</code>. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SourceFields [FieldNameCommaList] <p>A list of source fields to map to the field. </p>
-- * FacetEnabled [Boolean] <p>Whether facet information can be returned for the field.</p>
-- * DefaultValue [Long] A value to use for the field if the field isn't specified for a document.
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- * SearchEnabled [Boolean] <p>Whether the contents of the field are searchable.</p>
-- @return IntArrayOptions structure as a key-value pair table
function M.IntArrayOptions(args)
assert(args, "You must provide an argument table when creating IntArrayOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SourceFields"] = args["SourceFields"],
["FacetEnabled"] = args["FacetEnabled"],
["DefaultValue"] = args["DefaultValue"],
["ReturnEnabled"] = args["ReturnEnabled"],
["SearchEnabled"] = args["SearchEnabled"],
}
asserts.AssertIntArrayOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.TextOptions = { ["AnalysisScheme"] = true, ["SourceField"] = true, ["DefaultValue"] = true, ["HighlightEnabled"] = true, ["SortEnabled"] = true, ["ReturnEnabled"] = true, nil }
function asserts.AssertTextOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected TextOptions to be of type 'table'")
if struct["AnalysisScheme"] then asserts.AssertWord(struct["AnalysisScheme"]) end
if struct["SourceField"] then asserts.AssertFieldName(struct["SourceField"]) end
if struct["DefaultValue"] then asserts.AssertFieldValue(struct["DefaultValue"]) end
if struct["HighlightEnabled"] then asserts.AssertBoolean(struct["HighlightEnabled"]) end
if struct["SortEnabled"] then asserts.AssertBoolean(struct["SortEnabled"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
for k,_ in pairs(struct) do
assert(keys.TextOptions[k], "TextOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type TextOptions
-- <p>Options for text field. Present if <code>IndexFieldType</code> specifies the field is of type <code>text</code>. A <code>text</code> field is always searchable. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * AnalysisScheme [Word] <p>The name of an analysis scheme for a <code>text</code> field.</p>
-- * SourceField [FieldName]
-- * DefaultValue [FieldValue] A value to use for the field if the field isn't specified for a document.
-- * HighlightEnabled [Boolean] <p>Whether highlights can be returned for the field.</p>
-- * SortEnabled [Boolean] <p>Whether the field can be used to sort the search results.</p>
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- @return TextOptions structure as a key-value pair table
function M.TextOptions(args)
assert(args, "You must provide an argument table when creating TextOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["AnalysisScheme"] = args["AnalysisScheme"],
["SourceField"] = args["SourceField"],
["DefaultValue"] = args["DefaultValue"],
["HighlightEnabled"] = args["HighlightEnabled"],
["SortEnabled"] = args["SortEnabled"],
["ReturnEnabled"] = args["ReturnEnabled"],
}
asserts.AssertTextOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.IndexDocumentsRequest = { ["DomainName"] = true, nil }
function asserts.AssertIndexDocumentsRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected IndexDocumentsRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.IndexDocumentsRequest[k], "IndexDocumentsRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type IndexDocumentsRequest
-- <p>Container for the parameters to the <code><a>IndexDocuments</a></code> operation. Specifies the name of the domain you want to re-index.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DomainName [DomainName]
-- Required key: DomainName
-- @return IndexDocumentsRequest structure as a key-value pair table
function M.IndexDocumentsRequest(args)
assert(args, "You must provide an argument table when creating IndexDocumentsRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DomainName"] = args["DomainName"],
}
asserts.AssertIndexDocumentsRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeAvailabilityOptionsRequest = { ["Deployed"] = true, ["DomainName"] = true, nil }
function asserts.AssertDescribeAvailabilityOptionsRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeAvailabilityOptionsRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
if struct["Deployed"] then asserts.AssertBoolean(struct["Deployed"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeAvailabilityOptionsRequest[k], "DescribeAvailabilityOptionsRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeAvailabilityOptionsRequest
-- <p>Container for the parameters to the <code><a>DescribeAvailabilityOptions</a></code> operation. Specifies the name of the domain you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to <code>true</code>.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Deployed [Boolean] <p>Whether to display the deployed configuration (<code>true</code>) or include any pending changes (<code>false</code>). Defaults to <code>false</code>.</p>
-- * DomainName [DomainName] <p>The name of the domain you want to describe.</p>
-- Required key: DomainName
-- @return DescribeAvailabilityOptionsRequest structure as a key-value pair table
function M.DescribeAvailabilityOptionsRequest(args)
assert(args, "You must provide an argument table when creating DescribeAvailabilityOptionsRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Deployed"] = args["Deployed"],
["DomainName"] = args["DomainName"],
}
asserts.AssertDescribeAvailabilityOptionsRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DefineIndexFieldResponse = { ["IndexField"] = true, nil }
function asserts.AssertDefineIndexFieldResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DefineIndexFieldResponse to be of type 'table'")
assert(struct["IndexField"], "Expected key IndexField to exist in table")
if struct["IndexField"] then asserts.AssertIndexFieldStatus(struct["IndexField"]) end
for k,_ in pairs(struct) do
assert(keys.DefineIndexFieldResponse[k], "DefineIndexFieldResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DefineIndexFieldResponse
-- <p>The result of a <code><a>DefineIndexField</a></code> request. Contains the status of the newly-configured index field.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * IndexField [IndexFieldStatus]
-- Required key: IndexField
-- @return DefineIndexFieldResponse structure as a key-value pair table
function M.DefineIndexFieldResponse(args)
assert(args, "You must provide an argument table when creating DefineIndexFieldResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["IndexField"] = args["IndexField"],
}
asserts.AssertDefineIndexFieldResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeIndexFieldsResponse = { ["IndexFields"] = true, nil }
function asserts.AssertDescribeIndexFieldsResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeIndexFieldsResponse to be of type 'table'")
assert(struct["IndexFields"], "Expected key IndexFields to exist in table")
if struct["IndexFields"] then asserts.AssertIndexFieldStatusList(struct["IndexFields"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeIndexFieldsResponse[k], "DescribeIndexFieldsResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeIndexFieldsResponse
-- <p>The result of a <code>DescribeIndexFields</code> request. Contains the index fields configured for the domain specified in the request.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * IndexFields [IndexFieldStatusList] <p>The index fields configured for the domain.</p>
-- Required key: IndexFields
-- @return DescribeIndexFieldsResponse structure as a key-value pair table
function M.DescribeIndexFieldsResponse(args)
assert(args, "You must provide an argument table when creating DescribeIndexFieldsResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["IndexFields"] = args["IndexFields"],
}
asserts.AssertDescribeIndexFieldsResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DoubleArrayOptions = { ["SourceFields"] = true, ["FacetEnabled"] = true, ["DefaultValue"] = true, ["ReturnEnabled"] = true, ["SearchEnabled"] = true, nil }
function asserts.AssertDoubleArrayOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected DoubleArrayOptions to be of type 'table'")
if struct["SourceFields"] then asserts.AssertFieldNameCommaList(struct["SourceFields"]) end
if struct["FacetEnabled"] then asserts.AssertBoolean(struct["FacetEnabled"]) end
if struct["DefaultValue"] then asserts.AssertDouble(struct["DefaultValue"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
if struct["SearchEnabled"] then asserts.AssertBoolean(struct["SearchEnabled"]) end
for k,_ in pairs(struct) do
assert(keys.DoubleArrayOptions[k], "DoubleArrayOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DoubleArrayOptions
-- <p>Options for a field that contains an array of double-precision 64-bit floating point values. Present if <code>IndexFieldType</code> specifies the field is of type <code>double-array</code>. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SourceFields [FieldNameCommaList] <p>A list of source fields to map to the field. </p>
-- * FacetEnabled [Boolean] <p>Whether facet information can be returned for the field.</p>
-- * DefaultValue [Double] A value to use for the field if the field isn't specified for a document.
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- * SearchEnabled [Boolean] <p>Whether the contents of the field are searchable.</p>
-- @return DoubleArrayOptions structure as a key-value pair table
function M.DoubleArrayOptions(args)
assert(args, "You must provide an argument table when creating DoubleArrayOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SourceFields"] = args["SourceFields"],
["FacetEnabled"] = args["FacetEnabled"],
["DefaultValue"] = args["DefaultValue"],
["ReturnEnabled"] = args["ReturnEnabled"],
["SearchEnabled"] = args["SearchEnabled"],
}
asserts.AssertDoubleArrayOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeDomainsRequest = { ["DomainNames"] = true, nil }
function asserts.AssertDescribeDomainsRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeDomainsRequest to be of type 'table'")
if struct["DomainNames"] then asserts.AssertDomainNameList(struct["DomainNames"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeDomainsRequest[k], "DescribeDomainsRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeDomainsRequest
-- <p>Container for the parameters to the <code><a>DescribeDomains</a></code> operation. By default shows the status of all domains. To restrict the response to particular domains, specify the names of the domains you want to describe.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * DomainNames [DomainNameList] <p>The names of the domains you want to include in the response.</p>
-- @return DescribeDomainsRequest structure as a key-value pair table
function M.DescribeDomainsRequest(args)
assert(args, "You must provide an argument table when creating DescribeDomainsRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["DomainNames"] = args["DomainNames"],
}
asserts.AssertDescribeDomainsRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.UpdateAvailabilityOptionsRequest = { ["MultiAZ"] = true, ["DomainName"] = true, nil }
function asserts.AssertUpdateAvailabilityOptionsRequest(struct)
assert(struct)
assert(type(struct) == "table", "Expected UpdateAvailabilityOptionsRequest to be of type 'table'")
assert(struct["DomainName"], "Expected key DomainName to exist in table")
assert(struct["MultiAZ"], "Expected key MultiAZ to exist in table")
if struct["MultiAZ"] then asserts.AssertBoolean(struct["MultiAZ"]) end
if struct["DomainName"] then asserts.AssertDomainName(struct["DomainName"]) end
for k,_ in pairs(struct) do
assert(keys.UpdateAvailabilityOptionsRequest[k], "UpdateAvailabilityOptionsRequest contains unknown key " .. tostring(k))
end
end
--- Create a structure of type UpdateAvailabilityOptionsRequest
-- <p>Container for the parameters to the <code><a>UpdateAvailabilityOptions</a></code> operation. Specifies the name of the domain you want to update and the Multi-AZ availability option.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * MultiAZ [Boolean] <p>You expand an existing search domain to a second Availability Zone by setting the Multi-AZ option to true. Similarly, you can turn off the Multi-AZ option to downgrade the domain to a single Availability Zone by setting the Multi-AZ option to <code>false</code>. </p>
-- * DomainName [DomainName]
-- Required key: DomainName
-- Required key: MultiAZ
-- @return UpdateAvailabilityOptionsRequest structure as a key-value pair table
function M.UpdateAvailabilityOptionsRequest(args)
assert(args, "You must provide an argument table when creating UpdateAvailabilityOptionsRequest")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["MultiAZ"] = args["MultiAZ"],
["DomainName"] = args["DomainName"],
}
asserts.AssertUpdateAvailabilityOptionsRequest(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.BuildSuggestersResponse = { ["FieldNames"] = true, nil }
function asserts.AssertBuildSuggestersResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected BuildSuggestersResponse to be of type 'table'")
if struct["FieldNames"] then asserts.AssertFieldNameList(struct["FieldNames"]) end
for k,_ in pairs(struct) do
assert(keys.BuildSuggestersResponse[k], "BuildSuggestersResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type BuildSuggestersResponse
-- <p>The result of a <code>BuildSuggester</code> request. Contains a list of the fields used for suggestions.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * FieldNames [FieldNameList]
-- @return BuildSuggestersResponse structure as a key-value pair table
function M.BuildSuggestersResponse(args)
assert(args, "You must provide an argument table when creating BuildSuggestersResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["FieldNames"] = args["FieldNames"],
}
asserts.AssertBuildSuggestersResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.IntOptions = { ["SourceField"] = true, ["DefaultValue"] = true, ["FacetEnabled"] = true, ["SearchEnabled"] = true, ["SortEnabled"] = true, ["ReturnEnabled"] = true, nil }
function asserts.AssertIntOptions(struct)
assert(struct)
assert(type(struct) == "table", "Expected IntOptions to be of type 'table'")
if struct["SourceField"] then asserts.AssertFieldName(struct["SourceField"]) end
if struct["DefaultValue"] then asserts.AssertLong(struct["DefaultValue"]) end
if struct["FacetEnabled"] then asserts.AssertBoolean(struct["FacetEnabled"]) end
if struct["SearchEnabled"] then asserts.AssertBoolean(struct["SearchEnabled"]) end
if struct["SortEnabled"] then asserts.AssertBoolean(struct["SortEnabled"]) end
if struct["ReturnEnabled"] then asserts.AssertBoolean(struct["ReturnEnabled"]) end
for k,_ in pairs(struct) do
assert(keys.IntOptions[k], "IntOptions contains unknown key " .. tostring(k))
end
end
--- Create a structure of type IntOptions
-- <p>Options for a 64-bit signed integer field. Present if <code>IndexFieldType</code> specifies the field is of type <code>int</code>. All options are enabled by default.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * SourceField [FieldName] <p>The name of the source field to map to the field. </p>
-- * DefaultValue [Long] A value to use for the field if the field isn't specified for a document. This can be important if you are using the field in an expression and that field is not present in every document.
-- * FacetEnabled [Boolean] <p>Whether facet information can be returned for the field.</p>
-- * SearchEnabled [Boolean] <p>Whether the contents of the field are searchable.</p>
-- * SortEnabled [Boolean] <p>Whether the field can be used to sort the search results.</p>
-- * ReturnEnabled [Boolean] <p>Whether the contents of the field can be returned in the search results.</p>
-- @return IntOptions structure as a key-value pair table
function M.IntOptions(args)
assert(args, "You must provide an argument table when creating IntOptions")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["SourceField"] = args["SourceField"],
["DefaultValue"] = args["DefaultValue"],
["FacetEnabled"] = args["FacetEnabled"],
["SearchEnabled"] = args["SearchEnabled"],
["SortEnabled"] = args["SortEnabled"],
["ReturnEnabled"] = args["ReturnEnabled"],
}
asserts.AssertIntOptions(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
keys.DescribeSuggestersResponse = { ["Suggesters"] = true, nil }
function asserts.AssertDescribeSuggestersResponse(struct)
assert(struct)
assert(type(struct) == "table", "Expected DescribeSuggestersResponse to be of type 'table'")
assert(struct["Suggesters"], "Expected key Suggesters to exist in table")
if struct["Suggesters"] then asserts.AssertSuggesterStatusList(struct["Suggesters"]) end
for k,_ in pairs(struct) do
assert(keys.DescribeSuggestersResponse[k], "DescribeSuggestersResponse contains unknown key " .. tostring(k))
end
end
--- Create a structure of type DescribeSuggestersResponse
-- <p>The result of a <code>DescribeSuggesters</code> request.</p>
-- @param args Table with arguments in key-value form.
-- Valid keys:
-- * Suggesters [SuggesterStatusList] <p>The suggesters configured for the domain specified in the request.</p>
-- Required key: Suggesters
-- @return DescribeSuggestersResponse structure as a key-value pair table
function M.DescribeSuggestersResponse(args)
assert(args, "You must provide an argument table when creating DescribeSuggestersResponse")
local query_args = {
}
local uri_args = {
}
local header_args = {
}
local all_args = {
["Suggesters"] = args["Suggesters"],
}
asserts.AssertDescribeSuggestersResponse(all_args)
return {
all = all_args,
query = query_args,
uri = uri_args,
headers = header_args,
}
end
function asserts.AssertOptionState(str)
assert(str)
assert(type(str) == "string", "Expected OptionState to be of type 'string'")
end
-- <p>The state of processing a change to an option. One of:</p> <ul> <li>RequiresIndexDocuments: The option's latest value will not be deployed until <a>IndexDocuments</a> has been called and indexing is complete.</li> <li>Processing: The option's latest value is in the process of being activated.</li> <li>Active: The option's latest value is fully deployed. </li> <li>FailedToValidate: The option value is not compatible with the domain's data and cannot be used to index the data. You must either modify the option value or update or remove the incompatible documents.</li> </ul>
function M.OptionState(str)
asserts.AssertOptionState(str)
return str
end
function asserts.AssertPolicyDocument(str)
assert(str)
assert(type(str) == "string", "Expected PolicyDocument to be of type 'string'")
end
-- <p>Access rules for a domain's document or search service endpoints. For more information, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html" target="_blank">Configuring Access for a Search Domain</a> in the <i>Amazon CloudSearch Developer Guide</i>. The maximum size of a policy document is 100 KB.</p>
function M.PolicyDocument(str)
asserts.AssertPolicyDocument(str)
return str
end
function asserts.AssertFieldName(str)
assert(str)
assert(type(str) == "string", "Expected FieldName to be of type 'string'")
assert(#str <= 64, "Expected string to be max 64 characters")
assert(#str >= 1, "Expected string to be min 1 characters")
end
-- <p>A string that represents the name of an index field. CloudSearch supports regular index fields as well as dynamic fields. A dynamic field's name defines a pattern that begins or ends with a wildcard. Any document fields that don't map to a regular index field but do match a dynamic field's pattern are configured with the dynamic field's indexing options. </p> <p>Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported. </p> <p>The name <code>score</code> is reserved and cannot be used as a field name. To reference a document's ID, you can use the name <code>_id</code>. </p>
function M.FieldName(str)
asserts.AssertFieldName(str)
return str
end
function asserts.AssertAlgorithmicStemming(str)
assert(str)
assert(type(str) == "string", "Expected AlgorithmicStemming to be of type 'string'")
end
--
function M.AlgorithmicStemming(str)
asserts.AssertAlgorithmicStemming(str)
return str
end
function asserts.AssertSuggesterFuzzyMatching(str)
assert(str)
assert(type(str) == "string", "Expected SuggesterFuzzyMatching to be of type 'string'")
end
--
function M.SuggesterFuzzyMatching(str)
asserts.AssertSuggesterFuzzyMatching(str)
return str
end
function asserts.AssertDomainName(str)
assert(str)
assert(type(str) == "string", "Expected DomainName to be of type 'string'")
assert(#str <= 28, "Expected string to be max 28 characters")
assert(#str >= 3, "Expected string to be min 3 characters")
end
-- <p>A string that represents the name of a domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).</p>
function M.DomainName(str)
asserts.AssertDomainName(str)
return str
end
function asserts.AssertAPIVersion(str)
assert(str)
assert(type(str) == "string", "Expected APIVersion to be of type 'string'")
end
-- <p>The Amazon CloudSearch API version for a domain: 2011-02-01 or 2013-01-01.</p>
function M.APIVersion(str)
asserts.AssertAPIVersion(str)
return str
end
function asserts.AssertString(str)
assert(str)
assert(type(str) == "string", "Expected String to be of type 'string'")
end
--
function M.String(str)
asserts.AssertString(str)
return str
end
function asserts.AssertFieldNameCommaList(str)
assert(str)
assert(type(str) == "string", "Expected FieldNameCommaList to be of type 'string'")
end
--
function M.FieldNameCommaList(str)
asserts.AssertFieldNameCommaList(str)
return str
end
function asserts.AssertServiceUrl(str)
assert(str)
assert(type(str) == "string", "Expected ServiceUrl to be of type 'string'")
end
-- <p>The endpoint to which service requests can be submitted. For example, <code>search-imdb-movies-oopcnjfn6ugofer3zx5iadxxca.eu-west-1.cloudsearch.amazonaws.com</code> or <code>doc-imdb-movies-oopcnjfn6ugofer3zx5iadxxca.eu-west-1.cloudsearch.amazonaws.com</code>.</p>
function M.ServiceUrl(str)
asserts.AssertServiceUrl(str)
return str
end
function asserts.AssertErrorMessage(str)
assert(str)
assert(type(str) == "string", "Expected ErrorMessage to be of type 'string'")
end
-- <p>A human-readable string error or warning message.</p>
function M.ErrorMessage(str)
asserts.AssertErrorMessage(str)
return str
end
function asserts.AssertDomainId(str)
assert(str)
assert(type(str) == "string", "Expected DomainId to be of type 'string'")
assert(#str <= 64, "Expected string to be max 64 characters")
assert(#str >= 1, "Expected string to be min 1 characters")
end
-- <p>An internally generated unique identifier for a domain.</p>
function M.DomainId(str)
asserts.AssertDomainId(str)
return str
end
function asserts.AssertWord(str)
assert(str)
assert(type(str) == "string", "Expected Word to be of type 'string'")
end
--
function M.Word(str)
asserts.AssertWord(str)
return str
end
function asserts.AssertExpressionValue(str)
assert(str)
assert(type(str) == "string", "Expected ExpressionValue to be of type 'string'")
assert(#str <= 10240, "Expected string to be max 10240 characters")
assert(#str >= 1, "Expected string to be min 1 characters")
end
-- <p>The expression to evaluate for sorting while processing a search request. The <code>Expression</code> syntax is based on JavaScript expressions. For more information, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html" target="_blank">Configuring Expressions</a> in the <i>Amazon CloudSearch Developer Guide</i>.</p>
function M.ExpressionValue(str)
asserts.AssertExpressionValue(str)
return str
end
function asserts.AssertSearchInstanceType(str)
assert(str)
assert(type(str) == "string", "Expected SearchInstanceType to be of type 'string'")
end
-- <p>The instance type (such as <code>search.m1.small</code>) that is being used to process search requests.</p>
function M.SearchInstanceType(str)
asserts.AssertSearchInstanceType(str)
return str
end
function asserts.AssertErrorCode(str)
assert(str)
assert(type(str) == "string", "Expected ErrorCode to be of type 'string'")
end
-- <p>A machine-parsable string error or warning code.</p>
function M.ErrorCode(str)
asserts.AssertErrorCode(str)
return str
end
function asserts.AssertIndexFieldType(str)
assert(str)
assert(type(str) == "string", "Expected IndexFieldType to be of type 'string'")
end
-- <p>The type of field. The valid options for a field depend on the field type. For more information about the supported field types, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html" target="_blank">Configuring Index Fields</a> in the <i>Amazon CloudSearch Developer Guide</i>.</p>
function M.IndexFieldType(str)
asserts.AssertIndexFieldType(str)
return str
end
function asserts.AssertStandardName(str)
assert(str)
assert(type(str) == "string", "Expected StandardName to be of type 'string'")
assert(#str <= 64, "Expected string to be max 64 characters")
assert(#str >= 1, "Expected string to be min 1 characters")
end
-- <p>Names must begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore).</p>
function M.StandardName(str)
asserts.AssertStandardName(str)
return str
end
function asserts.AssertAnalysisSchemeLanguage(str)
assert(str)
assert(type(str) == "string", "Expected AnalysisSchemeLanguage to be of type 'string'")
end
-- <p>An <a href="http://tools.ietf.org/html/rfc4646" target="_blank">IETF RFC 4646</a> language code or <code>mul</code> for multiple languages.</p>
function M.AnalysisSchemeLanguage(str)
asserts.AssertAnalysisSchemeLanguage(str)
return str
end
function asserts.AssertFieldValue(str)
assert(str)
assert(type(str) == "string", "Expected FieldValue to be of type 'string'")
assert(#str <= 1024, "Expected string to be max 1024 characters")
end
-- <p>The value of a field attribute.</p>
function M.FieldValue(str)
asserts.AssertFieldValue(str)
return str
end
function asserts.AssertDynamicFieldName(str)
assert(str)
assert(type(str) == "string", "Expected DynamicFieldName to be of type 'string'")
assert(#str <= 64, "Expected string to be max 64 characters")
assert(#str >= 1, "Expected string to be min 1 characters")
end
--
function M.DynamicFieldName(str)
asserts.AssertDynamicFieldName(str)
return str
end
function asserts.AssertPartitionInstanceType(str)
assert(str)
assert(type(str) == "string", "Expected PartitionInstanceType to be of type 'string'")
end
-- <p>The instance type (such as <code>search.m1.small</code>) on which an index partition is hosted.</p>
function M.PartitionInstanceType(str)
asserts.AssertPartitionInstanceType(str)
return str
end
function asserts.AssertARN(str)
assert(str)
assert(type(str) == "string", "Expected ARN to be of type 'string'")
end
-- <p>The Amazon Resource Name (ARN) of the search domain. See <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?Using_Identifiers.html" target="_blank">Identifiers for IAM Entities</a> in <i>Using AWS Identity and Access Management</i> for more information.</p>
function M.ARN(str)
asserts.AssertARN(str)
return str
end
function asserts.AssertDouble(double)
assert(double)
assert(type(double) == "number", "Expected Double to be of type 'number'")
end
function M.Double(double)
asserts.AssertDouble(double)
return double
end
function asserts.AssertLong(long)
assert(long)
assert(type(long) == "number", "Expected Long to be of type 'number'")
assert(long % 1 == 0, "Expected a whole integer number")
end
function M.Long(long)
asserts.AssertLong(long)
return long
end
function asserts.AssertUIntValue(integer)
assert(integer)
assert(type(integer) == "number", "Expected UIntValue to be of type 'number'")
assert(integer % 1 == 0, "Expected a while integer number")
end
function M.UIntValue(integer)
asserts.AssertUIntValue(integer)
return integer
end
function asserts.AssertPartitionCount(integer)
assert(integer)
assert(type(integer) == "number", "Expected PartitionCount to be of type 'number'")
assert(integer % 1 == 0, "Expected a while integer number")
assert(integer >= 1, "Expected integer to be min 1")
end
function M.PartitionCount(integer)
asserts.AssertPartitionCount(integer)
return integer
end
function asserts.AssertMaximumReplicationCount(integer)
assert(integer)
assert(type(integer) == "number", "Expected MaximumReplicationCount to be of type 'number'")
assert(integer % 1 == 0, "Expected a while integer number")
assert(integer >= 1, "Expected integer to be min 1")
end
function M.MaximumReplicationCount(integer)
asserts.AssertMaximumReplicationCount(integer)
return integer
end
function asserts.AssertMaximumPartitionCount(integer)
assert(integer)
assert(type(integer) == "number", "Expected MaximumPartitionCount to be of type 'number'")
assert(integer % 1 == 0, "Expected a while integer number")
assert(integer >= 1, "Expected integer to be min 1")
end
function M.MaximumPartitionCount(integer)
asserts.AssertMaximumPartitionCount(integer)
return integer
end
function asserts.AssertInstanceCount(integer)
assert(integer)
assert(type(integer) == "number", "Expected InstanceCount to be of type 'number'")
assert(integer % 1 == 0, "Expected a while integer number")
assert(integer >= 1, "Expected integer to be min 1")
end
function M.InstanceCount(integer)
asserts.AssertInstanceCount(integer)
return integer
end
function asserts.AssertMultiAZ(boolean)
assert(boolean)
assert(type(boolean) == "boolean", "Expected MultiAZ to be of type 'boolean'")
end
function M.MultiAZ(boolean)
asserts.AssertMultiAZ(boolean)
return boolean
end
function asserts.AssertBoolean(boolean)
assert(boolean)
assert(type(boolean) == "boolean", "Expected Boolean to be of type 'boolean'")
end
function M.Boolean(boolean)
asserts.AssertBoolean(boolean)
return boolean
end
function asserts.AssertDomainNameMap(map)
assert(map)
assert(type(map) == "table", "Expected DomainNameMap to be of type 'table'")
for k,v in pairs(map) do
asserts.AssertDomainName(k)
asserts.AssertAPIVersion(v)
end
end
function M.DomainNameMap(map)
asserts.AssertDomainNameMap(map)
return map
end
function asserts.AssertUpdateTimestamp(timestamp)
assert(timestamp)
assert(type(timestamp) == "string", "Expected UpdateTimestamp to be of type 'string'")
end
function M.UpdateTimestamp(timestamp)
asserts.AssertUpdateTimestamp(timestamp)
return timestamp
end
function asserts.AssertAnalysisSchemeStatusList(list)
assert(list)
assert(type(list) == "table", "Expected AnalysisSchemeStatusList to be of type ''table")
for _,v in ipairs(list) do
asserts.AssertAnalysisSchemeStatus(v)
end
end
-- <p>A list of the analysis schemes configured for a domain.</p>
-- List of AnalysisSchemeStatus objects
function M.AnalysisSchemeStatusList(list)
asserts.AssertAnalysisSchemeStatusList(list)
return list
end
function asserts.AssertIndexFieldStatusList(list)
assert(list)
assert(type(list) == "table", "Expected IndexFieldStatusList to be of type ''table")
for _,v in ipairs(list) do
asserts.AssertIndexFieldStatus(v)
end
end
-- <p>Contains the status of multiple index fields.</p>
-- List of IndexFieldStatus objects
function M.IndexFieldStatusList(list)
asserts.AssertIndexFieldStatusList(list)
return list
end
function asserts.AssertDomainNameList(list)
assert(list)
assert(type(list) == "table", "Expected DomainNameList to be of type ''table")
for _,v in ipairs(list) do
asserts.AssertDomainName(v)
end
end
-- <p>A list of domain names.</p>
-- List of DomainName objects
function M.DomainNameList(list)
asserts.AssertDomainNameList(list)
return list
end
function asserts.AssertDomainStatusList(list)
assert(list)
assert(type(list) == "table", "Expected DomainStatusList to be of type ''table")
for _,v in ipairs(list) do
asserts.AssertDomainStatus(v)
end
end
-- <p>A list that contains the status of each requested domain.</p>
-- List of DomainStatus objects
function M.DomainStatusList(list)
asserts.AssertDomainStatusList(list)
return list
end
function asserts.AssertFieldNameList(list)
assert(list)
assert(type(list) == "table", "Expected FieldNameList to be of type ''table")
for _,v in ipairs(list) do
asserts.AssertFieldName(v)
end
end
-- <p>A list of field names.</p>
-- List of FieldName objects
function M.FieldNameList(list)
asserts.AssertFieldNameList(list)
return list
end
function asserts.AssertStandardNameList(list)
assert(list)
assert(type(list) == "table", "Expected StandardNameList to be of type ''table")
for _,v in ipairs(list) do
asserts.AssertStandardName(v)
end
end
--
-- List of StandardName objects
function M.StandardNameList(list)
asserts.AssertStandardNameList(list)
return list
end
function asserts.AssertDynamicFieldNameList(list)
assert(list)
assert(type(list) == "table", "Expected DynamicFieldNameList to be of type ''table")
for _,v in ipairs(list) do
asserts.AssertDynamicFieldName(v)
end
end
--
-- List of DynamicFieldName objects
function M.DynamicFieldNameList(list)
asserts.AssertDynamicFieldNameList(list)
return list
end
function asserts.AssertExpressionStatusList(list)
assert(list)
assert(type(list) == "table", "Expected ExpressionStatusList to be of type ''table")
for _,v in ipairs(list) do
asserts.AssertExpressionStatus(v)
end
end
-- <p>Contains the status of multiple expressions.</p>
-- List of ExpressionStatus objects
function M.ExpressionStatusList(list)
asserts.AssertExpressionStatusList(list)
return list
end
function asserts.AssertSuggesterStatusList(list)
assert(list)
assert(type(list) == "table", "Expected SuggesterStatusList to be of type ''table")
for _,v in ipairs(list) do
asserts.AssertSuggesterStatus(v)
end
end
-- <p>Contains the status of multiple suggesters.</p>
-- List of SuggesterStatus objects
function M.SuggesterStatusList(list)
asserts.AssertSuggesterStatusList(list)
return list
end
local content_type = require "aws-sdk.core.content_type"
local request_headers = require "aws-sdk.core.request_headers"
local request_handlers = require "aws-sdk.core.request_handlers"
local settings = {}
local function endpoint_for_region(region, use_dualstack)
if not use_dualstack then
if region == "us-east-1" then
return "cloudsearch.amazonaws.com"
end
end
local ss = { "cloudsearch" }
if use_dualstack then
ss[#ss + 1] = "dualstack"
end
ss[#ss + 1] = region
ss[#ss + 1] = "amazonaws.com"
if region == "cn-north-1" then
ss[#ss + 1] = "cn"
end
return table.concat(ss, ".")
end
function M.init(config)
assert(config, "You must provide a config table")
assert(config.region, "You must provide a region in the config table")
settings.service = M.metadata.endpoint_prefix
settings.protocol = M.metadata.protocol
settings.region = config.region
settings.endpoint = config.endpoint_override or endpoint_for_region(config.region, config.use_dualstack)
settings.signature_version = M.metadata.signature_version
settings.uri = (config.scheme or "https") .. "://" .. settings.endpoint
end
--
-- OPERATIONS
--
--- Call DescribeServiceAccessPolicies asynchronously, invoking a callback when done
-- @param DescribeServiceAccessPoliciesRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DescribeServiceAccessPoliciesAsync(DescribeServiceAccessPoliciesRequest, cb)
assert(DescribeServiceAccessPoliciesRequest, "You must provide a DescribeServiceAccessPoliciesRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DescribeServiceAccessPolicies",
}
for header,value in pairs(DescribeServiceAccessPoliciesRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DescribeServiceAccessPoliciesRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DescribeServiceAccessPolicies synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DescribeServiceAccessPoliciesRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DescribeServiceAccessPoliciesSync(DescribeServiceAccessPoliciesRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DescribeServiceAccessPoliciesAsync(DescribeServiceAccessPoliciesRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call UpdateScalingParameters asynchronously, invoking a callback when done
-- @param UpdateScalingParametersRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.UpdateScalingParametersAsync(UpdateScalingParametersRequest, cb)
assert(UpdateScalingParametersRequest, "You must provide a UpdateScalingParametersRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".UpdateScalingParameters",
}
for header,value in pairs(UpdateScalingParametersRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", UpdateScalingParametersRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call UpdateScalingParameters synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param UpdateScalingParametersRequest
-- @return response
-- @return error_type
-- @return error_message
function M.UpdateScalingParametersSync(UpdateScalingParametersRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.UpdateScalingParametersAsync(UpdateScalingParametersRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DescribeDomains asynchronously, invoking a callback when done
-- @param DescribeDomainsRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DescribeDomainsAsync(DescribeDomainsRequest, cb)
assert(DescribeDomainsRequest, "You must provide a DescribeDomainsRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DescribeDomains",
}
for header,value in pairs(DescribeDomainsRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DescribeDomainsRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DescribeDomains synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DescribeDomainsRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DescribeDomainsSync(DescribeDomainsRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DescribeDomainsAsync(DescribeDomainsRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DescribeScalingParameters asynchronously, invoking a callback when done
-- @param DescribeScalingParametersRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DescribeScalingParametersAsync(DescribeScalingParametersRequest, cb)
assert(DescribeScalingParametersRequest, "You must provide a DescribeScalingParametersRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DescribeScalingParameters",
}
for header,value in pairs(DescribeScalingParametersRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DescribeScalingParametersRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DescribeScalingParameters synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DescribeScalingParametersRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DescribeScalingParametersSync(DescribeScalingParametersRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DescribeScalingParametersAsync(DescribeScalingParametersRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DescribeExpressions asynchronously, invoking a callback when done
-- @param DescribeExpressionsRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DescribeExpressionsAsync(DescribeExpressionsRequest, cb)
assert(DescribeExpressionsRequest, "You must provide a DescribeExpressionsRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DescribeExpressions",
}
for header,value in pairs(DescribeExpressionsRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DescribeExpressionsRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DescribeExpressions synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DescribeExpressionsRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DescribeExpressionsSync(DescribeExpressionsRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DescribeExpressionsAsync(DescribeExpressionsRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DescribeIndexFields asynchronously, invoking a callback when done
-- @param DescribeIndexFieldsRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DescribeIndexFieldsAsync(DescribeIndexFieldsRequest, cb)
assert(DescribeIndexFieldsRequest, "You must provide a DescribeIndexFieldsRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DescribeIndexFields",
}
for header,value in pairs(DescribeIndexFieldsRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DescribeIndexFieldsRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DescribeIndexFields synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DescribeIndexFieldsRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DescribeIndexFieldsSync(DescribeIndexFieldsRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DescribeIndexFieldsAsync(DescribeIndexFieldsRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call ListDomainNames asynchronously, invoking a callback when done
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.ListDomainNamesAsync(cb)
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".ListDomainNames",
}
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", {}, headers, settings, cb)
else
cb(false, err)
end
end
--- Call ListDomainNames synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @return response
-- @return error_type
-- @return error_message
function M.ListDomainNamesSync(...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.ListDomainNamesAsync(function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DescribeAvailabilityOptions asynchronously, invoking a callback when done
-- @param DescribeAvailabilityOptionsRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DescribeAvailabilityOptionsAsync(DescribeAvailabilityOptionsRequest, cb)
assert(DescribeAvailabilityOptionsRequest, "You must provide a DescribeAvailabilityOptionsRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DescribeAvailabilityOptions",
}
for header,value in pairs(DescribeAvailabilityOptionsRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DescribeAvailabilityOptionsRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DescribeAvailabilityOptions synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DescribeAvailabilityOptionsRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DescribeAvailabilityOptionsSync(DescribeAvailabilityOptionsRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DescribeAvailabilityOptionsAsync(DescribeAvailabilityOptionsRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DefineIndexField asynchronously, invoking a callback when done
-- @param DefineIndexFieldRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DefineIndexFieldAsync(DefineIndexFieldRequest, cb)
assert(DefineIndexFieldRequest, "You must provide a DefineIndexFieldRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DefineIndexField",
}
for header,value in pairs(DefineIndexFieldRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DefineIndexFieldRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DefineIndexField synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DefineIndexFieldRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DefineIndexFieldSync(DefineIndexFieldRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DefineIndexFieldAsync(DefineIndexFieldRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DeleteAnalysisScheme asynchronously, invoking a callback when done
-- @param DeleteAnalysisSchemeRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DeleteAnalysisSchemeAsync(DeleteAnalysisSchemeRequest, cb)
assert(DeleteAnalysisSchemeRequest, "You must provide a DeleteAnalysisSchemeRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DeleteAnalysisScheme",
}
for header,value in pairs(DeleteAnalysisSchemeRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DeleteAnalysisSchemeRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DeleteAnalysisScheme synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DeleteAnalysisSchemeRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DeleteAnalysisSchemeSync(DeleteAnalysisSchemeRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DeleteAnalysisSchemeAsync(DeleteAnalysisSchemeRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call UpdateAvailabilityOptions asynchronously, invoking a callback when done
-- @param UpdateAvailabilityOptionsRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.UpdateAvailabilityOptionsAsync(UpdateAvailabilityOptionsRequest, cb)
assert(UpdateAvailabilityOptionsRequest, "You must provide a UpdateAvailabilityOptionsRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".UpdateAvailabilityOptions",
}
for header,value in pairs(UpdateAvailabilityOptionsRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", UpdateAvailabilityOptionsRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call UpdateAvailabilityOptions synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param UpdateAvailabilityOptionsRequest
-- @return response
-- @return error_type
-- @return error_message
function M.UpdateAvailabilityOptionsSync(UpdateAvailabilityOptionsRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.UpdateAvailabilityOptionsAsync(UpdateAvailabilityOptionsRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DeleteExpression asynchronously, invoking a callback when done
-- @param DeleteExpressionRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DeleteExpressionAsync(DeleteExpressionRequest, cb)
assert(DeleteExpressionRequest, "You must provide a DeleteExpressionRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DeleteExpression",
}
for header,value in pairs(DeleteExpressionRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DeleteExpressionRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DeleteExpression synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DeleteExpressionRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DeleteExpressionSync(DeleteExpressionRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DeleteExpressionAsync(DeleteExpressionRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DescribeAnalysisSchemes asynchronously, invoking a callback when done
-- @param DescribeAnalysisSchemesRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DescribeAnalysisSchemesAsync(DescribeAnalysisSchemesRequest, cb)
assert(DescribeAnalysisSchemesRequest, "You must provide a DescribeAnalysisSchemesRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DescribeAnalysisSchemes",
}
for header,value in pairs(DescribeAnalysisSchemesRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DescribeAnalysisSchemesRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DescribeAnalysisSchemes synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DescribeAnalysisSchemesRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DescribeAnalysisSchemesSync(DescribeAnalysisSchemesRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DescribeAnalysisSchemesAsync(DescribeAnalysisSchemesRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DefineSuggester asynchronously, invoking a callback when done
-- @param DefineSuggesterRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DefineSuggesterAsync(DefineSuggesterRequest, cb)
assert(DefineSuggesterRequest, "You must provide a DefineSuggesterRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DefineSuggester",
}
for header,value in pairs(DefineSuggesterRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DefineSuggesterRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DefineSuggester synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DefineSuggesterRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DefineSuggesterSync(DefineSuggesterRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DefineSuggesterAsync(DefineSuggesterRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call CreateDomain asynchronously, invoking a callback when done
-- @param CreateDomainRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.CreateDomainAsync(CreateDomainRequest, cb)
assert(CreateDomainRequest, "You must provide a CreateDomainRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".CreateDomain",
}
for header,value in pairs(CreateDomainRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", CreateDomainRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call CreateDomain synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param CreateDomainRequest
-- @return response
-- @return error_type
-- @return error_message
function M.CreateDomainSync(CreateDomainRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.CreateDomainAsync(CreateDomainRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call IndexDocuments asynchronously, invoking a callback when done
-- @param IndexDocumentsRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.IndexDocumentsAsync(IndexDocumentsRequest, cb)
assert(IndexDocumentsRequest, "You must provide a IndexDocumentsRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".IndexDocuments",
}
for header,value in pairs(IndexDocumentsRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", IndexDocumentsRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call IndexDocuments synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param IndexDocumentsRequest
-- @return response
-- @return error_type
-- @return error_message
function M.IndexDocumentsSync(IndexDocumentsRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.IndexDocumentsAsync(IndexDocumentsRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DescribeSuggesters asynchronously, invoking a callback when done
-- @param DescribeSuggestersRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DescribeSuggestersAsync(DescribeSuggestersRequest, cb)
assert(DescribeSuggestersRequest, "You must provide a DescribeSuggestersRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DescribeSuggesters",
}
for header,value in pairs(DescribeSuggestersRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DescribeSuggestersRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DescribeSuggesters synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DescribeSuggestersRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DescribeSuggestersSync(DescribeSuggestersRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DescribeSuggestersAsync(DescribeSuggestersRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call UpdateServiceAccessPolicies asynchronously, invoking a callback when done
-- @param UpdateServiceAccessPoliciesRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.UpdateServiceAccessPoliciesAsync(UpdateServiceAccessPoliciesRequest, cb)
assert(UpdateServiceAccessPoliciesRequest, "You must provide a UpdateServiceAccessPoliciesRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".UpdateServiceAccessPolicies",
}
for header,value in pairs(UpdateServiceAccessPoliciesRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", UpdateServiceAccessPoliciesRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call UpdateServiceAccessPolicies synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param UpdateServiceAccessPoliciesRequest
-- @return response
-- @return error_type
-- @return error_message
function M.UpdateServiceAccessPoliciesSync(UpdateServiceAccessPoliciesRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.UpdateServiceAccessPoliciesAsync(UpdateServiceAccessPoliciesRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DeleteIndexField asynchronously, invoking a callback when done
-- @param DeleteIndexFieldRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DeleteIndexFieldAsync(DeleteIndexFieldRequest, cb)
assert(DeleteIndexFieldRequest, "You must provide a DeleteIndexFieldRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DeleteIndexField",
}
for header,value in pairs(DeleteIndexFieldRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DeleteIndexFieldRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DeleteIndexField synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DeleteIndexFieldRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DeleteIndexFieldSync(DeleteIndexFieldRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DeleteIndexFieldAsync(DeleteIndexFieldRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DefineAnalysisScheme asynchronously, invoking a callback when done
-- @param DefineAnalysisSchemeRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DefineAnalysisSchemeAsync(DefineAnalysisSchemeRequest, cb)
assert(DefineAnalysisSchemeRequest, "You must provide a DefineAnalysisSchemeRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DefineAnalysisScheme",
}
for header,value in pairs(DefineAnalysisSchemeRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DefineAnalysisSchemeRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DefineAnalysisScheme synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DefineAnalysisSchemeRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DefineAnalysisSchemeSync(DefineAnalysisSchemeRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DefineAnalysisSchemeAsync(DefineAnalysisSchemeRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DefineExpression asynchronously, invoking a callback when done
-- @param DefineExpressionRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DefineExpressionAsync(DefineExpressionRequest, cb)
assert(DefineExpressionRequest, "You must provide a DefineExpressionRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DefineExpression",
}
for header,value in pairs(DefineExpressionRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DefineExpressionRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DefineExpression synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DefineExpressionRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DefineExpressionSync(DefineExpressionRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DefineExpressionAsync(DefineExpressionRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call BuildSuggesters asynchronously, invoking a callback when done
-- @param BuildSuggestersRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.BuildSuggestersAsync(BuildSuggestersRequest, cb)
assert(BuildSuggestersRequest, "You must provide a BuildSuggestersRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".BuildSuggesters",
}
for header,value in pairs(BuildSuggestersRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", BuildSuggestersRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call BuildSuggesters synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param BuildSuggestersRequest
-- @return response
-- @return error_type
-- @return error_message
function M.BuildSuggestersSync(BuildSuggestersRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.BuildSuggestersAsync(BuildSuggestersRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DeleteDomain asynchronously, invoking a callback when done
-- @param DeleteDomainRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DeleteDomainAsync(DeleteDomainRequest, cb)
assert(DeleteDomainRequest, "You must provide a DeleteDomainRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DeleteDomain",
}
for header,value in pairs(DeleteDomainRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DeleteDomainRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DeleteDomain synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DeleteDomainRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DeleteDomainSync(DeleteDomainRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DeleteDomainAsync(DeleteDomainRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
--- Call DeleteSuggester asynchronously, invoking a callback when done
-- @param DeleteSuggesterRequest
-- @param cb Callback function accepting three args: response, error_type, error_message
function M.DeleteSuggesterAsync(DeleteSuggesterRequest, cb)
assert(DeleteSuggesterRequest, "You must provide a DeleteSuggesterRequest")
local headers = {
[request_headers.CONTENT_TYPE_HEADER] = content_type.from_protocol(M.metadata.protocol, M.metadata.json_version),
[request_headers.AMZ_TARGET_HEADER] = ".DeleteSuggester",
}
for header,value in pairs(DeleteSuggesterRequest.headers) do
headers[header] = value
end
local request_handler, err = request_handlers.from_protocol_and_method("query", "POST")
if request_handler then
request_handler(settings.uri, "/", DeleteSuggesterRequest, headers, settings, cb)
else
cb(false, err)
end
end
--- Call DeleteSuggester synchronously, returning when done
-- This assumes that the function is called from within a coroutine
-- @param DeleteSuggesterRequest
-- @return response
-- @return error_type
-- @return error_message
function M.DeleteSuggesterSync(DeleteSuggesterRequest, ...)
local co = coroutine.running()
assert(co, "You must call this function from within a coroutine")
M.DeleteSuggesterAsync(DeleteSuggesterRequest, function(response, error_type, error_message)
assert(coroutine.resume(co, response, error_type, error_message))
end)
return coroutine.yield()
end
return M
|
io.stdout:setvbuf("no")
function love.conf(t)
t.title = "Luna"
t.window.vsync = 0
t.window.width = 640
t.window.height = 360
t.window.resizable = true
end
|
-- Copyright 2013 Arman Darini
local class = {}
class.new = function(o)
local GameClass = {
debug = false,
w = display.contentWidth,
h = display.contentHeight,
centerX = display.contentCenterX,
centerY = display.contentCenterY,
-- font = "AveriaLibre-Bold",
font = "Cabin-Regular",
fontBold = "Cabin-Bold",
fontItalic = "Cabin-Italic",
controlsBlocked = false,
level = 1,
levelCompleted = false,
}
----------------------------------------------------------
function GameClass:init(o)
return self
end
----------------------------------------------------------
function GameClass:removeSelf()
end
----------------------------------------------------------
GameClass:init(o)
return GameClass
end
return class
|
module(...,package.seeall)
local ffi = require("ffi")
local pcap = ffi.load("pcap")
ffi.cdef([[
typedef struct pcap pcap_t;
struct pcap_pkthdr {
uint64_t ts_sec; /* timestamp seconds */
uint64_t ts_usec; /* timestamp microseconds */
uint32_t cap_len; /* number of octets of packet saved in file */
uint32_t len; /* actual length of packet */
};
int printf(const char *format, ...);
pcap_t *pcap_open_offline(const char *fname, char *errbuf);
void pcap_close(pcap_t *p);
const uint8_t *pcap_next(pcap_t *p, struct pcap_pkthdr *h);
typedef struct pcap_dumper pcap_dumper_t;
pcap_t *pcap_open_dead(int linktype, int snaplen);
pcap_dumper_t *pcap_dump_open(pcap_t *p, const char *fname);
void pcap_dump(uint8_t *user, struct pcap_pkthdr *h, uint8_t *sp);
void pcap_dump_close(pcap_dumper_t *p);
]])
function open_offline(pcap_file)
local pcap_file = ffi.new("char[?]", #pcap_file, pcap_file)
local errbuf = ffi.new("char[?]", 512)
-- Read all packets in source
local handle = pcap.pcap_open_offline(pcap_file, errbuf);
if handle == nil then
print(("error reading pcap file: %s"):format(errbuf))
os.exit();
end
return handle
end
function read_packet (pcap_file)
local handle = open_offline(pcap_file)
local header = ffi.new("struct pcap_pkthdr")
local count = 0
local result, len
while true do
local packet = pcap.pcap_next(handle, header)
if packet == nil then break end
result = {data = ffi.cast("uint8_t*", packet), len = tonumber(header.len)}
count = count + 1
end
assert(count == 1, ("%s contains more than one packet"):format(pcap_file))
return result
end
function for_each_packet (handle, f)
local header = ffi.new("struct pcap_pkthdr")
while true do
local packet = pcap.pcap_next(handle, header)
if packet == nil then break end
f(packet)
end
pcap.pcap_close(handle)
end
function write_packet (pcap_file, p)
local DLT_EN10MB = 1
local errbuf = ffi.new("char[?]", 512)
local handle = pcap.pcap_open_dead(DLT_EN10MB, 2^16);
local dumper = pcap.pcap_dump_open(handle, pcap_file);
local pcap_hdr = ffi.new("struct pcap_pkthdr")
pcap_hdr.cap_len = p.len
pcap_hdr.len = p.len
pcap.pcap_dump(ffi.cast("uint8_t*", dumper), pcap_hdr,
ffi.cast("uint8_t*", p.data))
pcap.pcap_dump_close(dumper);
end
|
-- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
-- Licensed to the public under the Apache License 2.0.
module("luci.statistics.rrdtool.definitions.disk", package.seeall)
function item()
return luci.i18n.translate("Disk Usage")
end
function rrdargs( graph, plugin, plugin_instance, dtype )
return {
{
title = "%H: Disk I/O operations on %pi",
vlabel = "Operations/s",
number_format = "%5.1lf%sOp/s",
data = {
types = { "disk_ops" },
sources = {
disk_ops = { "read", "write" },
},
options = {
disk_ops__read = {
title = "Reads",
color = "00ff00",
flip = false
},
disk_ops__write = {
title = "Writes",
color = "ff0000",
flip = true
}
}
}
},
{
title = "%H: Disk I/O bandwidth on %pi",
vlabel = "Bytes/s",
number_format = "%5.1lf%sB/s",
detail = true,
data = {
types = { "disk_octets" },
sources = {
disk_octets = { "read", "write" }
},
options = {
disk_octets__read = {
title = "Read",
color = "00ff00",
flip = false
},
disk_octets__write = {
title = "Write",
color = "ff0000",
flip = true
}
}
}
}
}
end
|
function banTeleport()
if not exports.CSGstaff:isPlayerStaff(source) then
kickPlayer(source, "Teleport Hack")
outputDebugString("Teleport hack by "..getPlayerName(source))
end
end
addEvent("bantp",true)
addEventHandler("bantp",getRootElement(),banTeleport)
--[[function logged()
setTimer(function(source)
if exports.CSGstaff:isPlayerStaff(source) then
triggerClientEvent(source,"startANTItp",source,1)
else
triggerClientEvent(source,"startANTItp",source,2)
end
end,4000,1,source)
end
--addEventHandler("onPlayerLogin",getRootElement(),logged)
addEventHandler("onPlayerSpawn",getRootElement(),logged)
cols = {}
addEventHandler("onServerPlayerLogin",root,function()
local x,y,z = getElementPosition(source)
local playerCol = createColSphere(x,y,z,1.5)
cols[source] = playerCol
setElementData(source,"playerCol",playerCol)
attachElements ( playerCol, source, 0, 0, 0 )
end)
addEventHandler("onPlayerQuit",root,function()
if cols[source] then
if isElement(cols[source]) then
destroyElement(cols[source])
end
end
end)
addEventHandler("onResourceStart",resourceRoot,function()
setTimer(function()
for i, v in ipairs(getElementsByType("player")) do
if exports.server:getPlayerAccountName(v) == "neon.-" then
local x,y,z = getElementPosition(v)
local playerCol = createColSphere(x,y,z,1.5)
cols[v] = playerCol
setElementData(v,"playerCol",playerCol)
attachElements ( playerCol, v, 0, 0, 0 )
if exports.CSGstaff:isPlayerStaff(v) then
triggerClientEvent(v,"startANTItp",v,1)
else
triggerClientEvent(v,"startANTItp",v,2)
end
end
end
end,3000,1)
end)
]]
local lossCount = {}
local isLosingConnection = false
local pos ={}
function checkLoss()
for i, v in ipairs(getElementsByType("player")) do
if exports.server:isPlayerLoggedIn(v) then
if getElementDimension(v) ~= 0 then return false end
--if exports.server:getPlayerAccountName(v) == "neon.-" then
local loss = getNetworkStats(v)["packetlossLastSecond"]
if not lossCount[v] then
lossCount[v] = 0
end
if loss >= 5 then -- If we have packet loss then send message and add counter.
if not pos[v] or pos[v] == nil or pos[v] == {} then
local x,y,z = getElementPosition(v)
--setElementFrozen(v,true)
pos[v] = {x,y,z}
--outputDebugString("Got his place")
end
end
if loss >= 80 then -- If we have packet loss then send message and add counter.
if not isLosingConnection then
isLosingConnection = true
triggerClientEvent(v,"onPlayerIsLosingConnection",v,isLosingConnection)
--outputDebugString("Player "..string.gsub(getPlayerName(v), '#%x%x%x%x%x%x', '' ).." is losing connection")
if isLosingConnection then
--setElementFrozen(v,false)
if pos[v] then
local x,y,z = unpack(pos[v])
if x and y and z then
--setElementPosition(v,x,y,z)
pos[v] = {}
end
end
end
end
lossCount[v] = lossCount[v] + 1
if lossCount[v] >= 10 then -- If counter is equal to gameplayVariables["packetlossmax"] or higher then reset counter and kick player
lossCount[v] = nil
--outputDebugString("Kicked "..getPlayerName(v).." packet loss")
--kickPlayer(v, "Huge Packet Loss detected")
end
else -- If packet loss was corrected then reset counter
lossCount[v] = 0
isLosingConnection = false
triggerClientEvent(v,"onPlayerIsLosingConnection",v,isLosingConnection)
end
end
end
end
setTimer(checkLoss,1000,0) -- Set timer to check every two seconds
|
ac.weatherClouds = __bound_array(ffi.typeof('cloud*'), 'lj_set_clouds__impl')
ac.weatherCloudsCovers = __bound_array(ffi.typeof('cloudscover*'), 'lj_set_cloudscovers__impl')
ac.skyExtraGradients = __bound_array(ffi.typeof('extragradient*'), 'lj_set_gradients__impl')
ac.weatherColorCorrections = __bound_array(ffi.typeof('void*'), 'lj_set_corrections__impl')
ac.addWeatherCloud = function(cloud) return ac.weatherClouds:pushWhereFits(cloud) end
ac.addWeatherCloudCover = function(cloud) return ac.weatherCloudsCovers:pushWhereFits(cloud) end
ac.addSkyExtraGradient = function(gradient) return ac.skyExtraGradients:pushWhereFits(gradient) end
ac.addWeatherColorCorrection = function(cc) return ac.weatherColorCorrections:pushWhereFits(cc) end
ac.removeWeatherCloud = function(cloud) return ac.weatherClouds:erase(cloud) end
ac.removeWeatherCloudCover = function(cloud) return ac.weatherCloudsCovers:erase(cloud) end
ac.removeSkyExtraGradient = function(gradient) return ac.skyExtraGradients:erase(gradient) end
ac.removeWeatherColorCorrection = function(cc) return ac.weatherColorCorrections:erase(cc) end
|
-- Dashboard
local dashboard = require("alpha.themes.dashboard")
math.randomseed(os.time())
local function button(sc, txt, keybind, keybind_opts)
local b = dashboard.button(sc, txt, keybind, keybind_opts)
b.opts.hl = "Function"
b.opts.hl_shortcut = "Type"
return b
end
local function pick_color()
local colors = { "String", "Identifier", "Keyword", "Number" }
return colors[math.random(#colors)]
end
local function footer()
local total_plugins = #vim.tbl_keys(packer_plugins)
local datetime = os.date(" %d-%m-%Y %H:%M:%S")
return datetime
.. " "
.. total_plugins
.. " plugins"
.. " v"
.. vim.version().major
.. "."
.. vim.version().minor
.. "."
.. vim.version().patch
end
dashboard.section.header.val = {
-- https://manytools.org/hacker-tools/ascii-banner/
-- Georgi16 font
[[___ ___ ____ ___ ]],
[[`MM\ `M' `Mb( )d' 68b ]],
[[ MMM\ M YM. ,P Y89 ]],
[[ M\MM\ M ____ _____ `Mb d' ___ ___ __ __ ]],
[[ M \MM\ M 6MMMMb 6MMMMMb YM. ,P `MM `MM 6MMb 6MMb ]],
[[ M \MM\ M 6M' `Mb 6M' `Mb `Mb d' MM MM69 `MM69 `Mb ]],
[[ M \MM\ M MM MM MM MM YM. ,P MM MM' MM' MM ]],
[[ M \MM\M MMMMMMMM MM MM `Mb d' MM MM MM MM ]],
[[ M \MMM MM MM MM YM,P MM MM MM MM ]],
[[ M \MM YM d9 YM. ,M9 `MM' MM MM MM MM ]],
[[_M_ \M YMMMM9 YMMMMM9 YP _MM__MM_ _MM_ _MM_]],
}
dashboard.section.header.opts.hl = pick_color()
dashboard.section.buttons.val = {
button("<Leader>f", " File Explorer"),
button("<Leader>p", " Find file"),
button("<Leader>g", " Find word"),
button("<Leader>1", " Open session"),
button("<Leader>n", " New file"),
button("<Leader>v", " Config"),
button("<Leader>u", " Update plugins"),
button("q", " Quit", "<Cmd>qa<CR>"),
}
dashboard.section.footer.val = footer()
dashboard.section.footer.opts.hl = "Constant"
require("alpha").setup(dashboard.opts)
|
local fn = vim.fn
if fn["has"]("termguicolors") then
vim.o.termguicolors = true
end
vim.o.background = "dark"
vim.cmd("syntax on")
local has_nightfox, nightfox = pcall(require, "nightfox")
if has_nightfox and vim.g.hrnd_theme == "nightfox" then
vim.g.onedark_disable_terminal_colors = true
nightfox.load("nightfox")
end
local has_tokyonight, _ = pcall(require, "tokyonight")
if has_tokyonight and vim.g.hrnd_theme == "tokyonight" then
vim.g.tokyonight_style = "night"
vim.g.tokyonight_italic_functions = true
vim.g.tokyonight_sidebars = { "qf", "vista_kind", "terminal", "packer" }
-- Load the colorscheme
vim.cmd([[colorscheme tokyonight]])
end
-- neovim/neovim/issues/11335
--[[ if (fn['has']('termguicolors') and fn['has']('nvim-0.5.0') and vim.api.nvim_list_uis()[1]['ext_termcolors']) then
vim.g.terminal_color_0 = nil
vim.g.terminal_color_1 = nil
vim.g.terminal_color_2 = nil
vim.g.terminal_color_3 = nil
vim.g.terminal_color_4 = nil
vim.g.terminal_color_5 = nil
vim.g.terminal_color_6 = nil
vim.g.terminal_color_7 = nil
vim.g.terminal_color_8 = nil
vim.g.terminal_color_9 = nil
vim.g.terminal_color_10 = nil
vim.g.terminal_color_11 = nil
vim.g.terminal_color_12 = nil
vim.g.terminal_color_13 = nil
vim.g.terminal_color_14 = nil
vim.g.terminal_color_15 = nil
vim.g.terminal_color_background = nil
vim.g.terminal_color_foreground = nil
end ]]
--
|
-- treesitter highlights
local lush = require("lush")
local base = require("lush_jsx.base")
local styles = require("lush_jsx.settings").styles
local colors = require("lush_jsx.colors")
local table_concat = table.concat
local M = {}
M = lush(function()
return {
-- nvim-treesitter
TSNone {},
TSError {base.LushJSXError},
TSTitle {base.Title},
TSLiteral {base.String},
TSURI {base.Underlined},
TSVariable {base.LushJSXFg1},
TSPunctDelimiter {base.Delimiter},
TSPunctBracket {base.Delimiter},
TSPunctSpecial {base.Delimiter},
TSConstant {base.Constant},
TSConstBuiltin {base.Special},
TSConstMacro {base.Define},
TSString {base.String},
TSStringRegex {base.String},
TSStringEscape {base.SpecialChar},
TSCharacter {base.Character},
TSNumber {base.Number},
TSBoolean {base.Boolean},
TSFloat {base.Float},
TSFunction {base.Function},
TSFuncBuiltin {base.Special},
TSFuncMacro {base.Macro},
TSParameter {base.Identifier},
TSParameterReference {TSParameter},
TSMethod {base.Function},
TSField {base.Identifier},
TSProperty {base.Identifier},
TSConstructor {base.Special},
TSAnnotation {base.PreProc},
TSAttribute {base.PreProc},
TSNamespace {base.Include},
TSConditional {base.Conditional},
TSRepeat {base.Repeat},
TSLabel {base.Label},
TSOperator {base.Operator},
TSKeyword {base.Keyword},
TSKeywordFunction {base.Keyword},
TSKeywordOperator {TSOperator},
TSException {base.Exception},
TSType {base.Type},
TSTypeBuiltin {base.Type},
TSInclude {base.Include},
TSVariableBuiltin {base.Special},
TSText {TSNone},
TSStrong {gui = styles.bold},
TSEmphasis {gui = styles.italic_strings},
TSUnderline {gui = styles.underline},
TSComment {base.Comment},
TSStructure {base.LushJSXOrange},
TSTag {base.LushJSXOrange},
TSTagDelimiter {base.LushJSXGreen},
TSNote {base.Todo},
TSWarning {fg = colors.bright_yellow, gui = table_concat({styles.bold, styles.italicize_comments}, ",")},
TSDanger {fg = colors.bright_red , gui = table_concat({styles.bold, styles.italicize_comments}, ",")}
}
end)
return M
|
hello = "Hello from " .. _VERSION .. "!"
|
--[[
Pixel Vision 8 - DrawRect Example
Copyright (C) 2017, Pixel Vision 8 (http://pixelvision8.com)
Created by Jesse Freeman (@jessefreeman)
This project was designed to display some basic instructions when you create
a new game. Simply delete the following code and implement your own Init(),
Update() and Draw() logic.
Learn more about making Pixel Vision 8 games at
https://www.pixelvision8.com/getting-started
]]--
function Init()
-- Draw a 100 x 100 pixel rect to the display
DrawRect(16, 16, 100, 100, 5, DrawMode.TilemapCache)
end
function Draw()
-- Redraw the display
RedrawDisplay()
-- Draw a rect to the sprite layer
DrawRect(12, 12, 25, 25, 14, DrawMode.Sprite)
-- Draw a rect to the sprite below layer
DrawRect(100, 100, 25, 25, 15, DrawMode.SpriteBelow)
end
|
---------------------------------------|
while not game:IsLoaded() or not game:GetService("CoreGui") or not game:GetService("Players").LocalPlayer or not game:GetService("Players").LocalPlayer.PlayerGui do wait() end
-- Constraints: -----------------------|
local ver = "1.9.9d"
local cordCode = "https://discord.gg/r8gEZgh"
---------------------------------------|
Parents = {[1] = game:GetService("CoreGui"):FindFirstChild("RobloxGui"), [2] = game:GetService("CoreGui"), [3] = game:GetService("Players").LocalPlayer.PlayerGui}
if Parents[1] then
getParent = Parents[1]
else
getParent = Parents[2]
end
if PROTOSMASHER_LOADED and get_hidden_gui then getParent = get_hidden_gui() end
local IsExe = identifyexecutor and identifyexecutor() == "CmdX.exe"
local firetouchinterest = firetouchinterest or fake_touch or nil
for _, v in pairs(Parents[1]:GetDescendants()) do
if v.Name == "holder" then
v.Parent:Destroy()
end
end
for _, v in pairs(Parents[2]:GetDescendants()) do
if v.Name == "holder" then
v.Parent:Destroy()
end
end
if game:GetService("UserInputService").VREnabled then
getParent = Parents[3]
end
Unnamed = Instance.new("ScreenGui", getParent)
Unnamed.Name = "Unnamed"
Unnamed.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
Unnamed.ResetOnSpawn = false
Unnamed.DisplayOrder = 2147483647
if not syn then syn = {} end
if not is_sirhurt_closure and syn.protect_gui then syn.protect_gui(Unnamed) end
sgui = Instance.new("ScreenGui", Unnamed)
sgui.IgnoreGuiInset = true
local function Draw(positionsent, line, thickness)
local positions = {
[1] = positionsent and positionsent[1] and UDim2.new(0, positionsent[1].X, 0, positionsent[1].Y) or UDim2.new(0, 0, 0, 0),
[2] = positionsent and positionsent[2] and UDim2.new(0, positionsent[2].X, 0, positionsent[2].Y) or UDim2.new(0, 0, 0, 0)
}
local distances = {
X = positions[2].X.Offset - positions[1].X.Offset,
Y = positions[2].Y.Offset - positions[1].Y.Offset
}
local distance = (distances.X ^ 2 + distances.Y ^ 2) ^ .5
local angle = math.atan2(distances.Y, distances.X)
line.Size = UDim2.new(0, distance, 0, thickness)
local center = Vector2.new(
(positions[1].X.Offset + positions[2].X.Offset) / 2,
(positions[1].Y.Offset + positions[2].Y.Offset) / 2
)
line.Position = UDim2.new(0, center.X - distance / 2, 0, center.Y - thickness / 2)
line.Rotation = math.deg(angle)
line.BorderSizePixel = 0
return line
end
oldDrawing = Drawing
newDrawing = {new = function(DrawingType)
if DrawingType == "Line" then
local line = {}
local line_object = Instance.new("Frame", sgui)
line_object.ZIndex = 3000
return setmetatable({},{
__index = function(self,key)
if key == "Remove" then
line_object:Destroy()
return function() end
end
end,
__newindex = function(self,key,value)
local thickness = 1
if key == "Visible" then
line_object.Visible = value
elseif key == "From" or key == "To" then
line[key] = value
elseif key == "Thickness" then
thickness = value
end
Draw({line.From, line.To}, line_object, thickness * 2)
end
})
elseif DrawingType == "Circle" then
local circle = {}
local circle_object = Instance.new("Frame",Parent)
circle_object.BorderSizePixel = 0
circle_object.AnchorPoint = Vector2.new(0.5, 0.5)
Instance.new("UICorner",circle_object).CornerRadius = UDim.new(1,0)
return setmetatable({},{
__index = function(self,key)
if key == "Remove" then
return function() circle_object:Destroy() end
end
end,
__newindex = function(self,key,value)
if key == "Visible" then
circle_object.Visible = value
elseif key == "Color" then
circle_object.BackgroundColor3 = value
elseif key == "Position" then
circle_object.Position = UDim2.new(0, value.X, 0, value.Y)
elseif key == "Radius" then
circle_object.Size = UDim2.new(0, value * 2, 0, value * 2)
end
end
})
elseif DrawingType == "Text" then
local text = {}
local text_object = Instance.new("TextLabel",Parent)
text_object.BorderSizePixel = 0
text_object.AnchorPoint = Vector2.new(0.5, 0.5)
return setmetatable({},{
__index = function(self,key)
if key == "Remove" then
return function() text_object:Destroy() end
end
end,
__newindex = function(self,key,value)
if key == "Visible" then
text_object.Visible = value
elseif key == "Color" then
text_object.TextColor3 = value
elseif key == "Position" then
text_object.Position = UDim2.new(0,value.X,0,value.Y)
elseif key == "Size" then
text_object.TextSize = value
elseif key == "Text" then
text_object.Text = value
end
end
})
elseif DrawingType == "Square" then
local box = {}
local box_object = Instance.new("Frame",Parent)
box_object.BorderSizePixel = 0
box_object.AnchorPoint = Vector2.new(0.5, 0.5)
return setmetatable({},{
__index = function(self,key)
if key == "Remove" then
return function() box_object:Destroy() end
end
end,
__newindex = function(self,key,value)
if key == "Visible" then
box_object.Visible = value
elseif key == "Color" then
box_object.BackgroundColor3 = value
elseif key == "Position" then
box_object.Position = UDim2.new(0,value.X,0,value.Y)
elseif key == "Size" then
box_object.Size = UDim2.new(0,value.X,0,value.Y)
end
end
})
end
end}
Drawing = Drawing or newDrawing
if drawingtype == "new" then
if Drawing then
setreadonly(Drawing, false)
end
Drawing = newDrawing
setreadonly(Drawing, true)
end
local mt = getrawmetatable(game)
local oldindex = mt.__index
setreadonly(mt, false)
mt.__index = newcclosure(function(self,...)
local args = {...}
if not checkcaller() and self == getParent and args[1] == Unnamed.Name then
return nil
end
return oldindex(self,...)
end)
setreadonly(mt, true)
_G.Unnamed = Unnamed
_G.dontTween = false
_G.dragVars = {}
_G.connections = {}
function createDrag(object)
_G.dragVars[object] = {}
object.MouseEnter:Connect(function()
_G.dragVars[object].checkMouse = true
_G.dragVars[object].mdwn = object.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_G.dragVars[object].startpos = object.Position
_G.dragVars[object].startdrag = input.Position
_G.dragVars[object].mouseDown = true
_G.dragVars[object].mou = input
_G.dragVars[object].mloo = game:GetService("RunService").RenderStepped:Connect(function()
if _G.dragVars[object].mouseDown then
_G.dragVars[object].delta = _G.dragVars[object].mou.Position - _G.dragVars[object].startdrag
object.Position = UDim2.new(_G.dragVars[object].startpos.X.Scale, _G.dragVars[object].startpos.X.Offset + _G.dragVars[object].delta.X, _G.dragVars[object].startpos.Y.Scale, _G.dragVars[object].startpos.Y.Offset + _G.dragVars[object].delta.Y)
end
end)
end
end)
_G.dragVars[object].mmoved = object.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
_G.dragVars[object].mou = input
end
end)
object.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
_G.dragVars[object].mouseDown = false
_G.dragVars[object].mmoved:Disconnect()
if _G.dragVars[object].mloo then _G.dragVars[object].mloo:Disconnect() end
end
end)
end)
object.MouseLeave:Connect(function()
if _G.dragVars[object].mdwn then
_G.dragVars[object].mdwn:Disconnect()
end
end)
end
function Stand(Text1,Text2,Text3,Text4,Text5,Text6,Btn)
if game:GetService("UserInputService").VREnabled then
RunDude = true
return
end
RunDude = false
LoadingFrame = Instance.new("Frame", getParent)
RandomReason = Instance.new("TextLabel", getParent)
RunQuestion = Instance.new("TextLabel", getParent)
Executors = Instance.new("TextLabel", getParent)
Paid = Instance.new("TextLabel", getParent)
Free = Instance.new("TextLabel", getParent)
Help = Instance.new("TextLabel", getParent)
HmmButton = Instance.new("TextButton", getParent)
LoadingFrame.Name = "LoadingFrame"
LoadingFrame.Parent = Unnamed
LoadingFrame.BackgroundColor3 = Color3.fromRGB(59, 59, 59)
LoadingFrame.BackgroundTransparency = 0.100
LoadingFrame.Position = UDim2.new(-9.31322575e-10, 0, -0.101388887, 0)
LoadingFrame.Size = UDim2.new(1, 0, 1.20000005, 0)
RandomReason.Name = "Random/Reason"
RandomReason.Parent = LoadingFrame
RandomReason.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
RandomReason.BackgroundTransparency = 1.000
RandomReason.Position = UDim2.new(0.489562511, 0, 0.335111082, 0)
RandomReason.Size = UDim2.new(0.0199999996, 0, 0.0500000007, 0)
RandomReason.Font = Enum.Font.GothamBold
RandomReason.Text = Text1
RandomReason.TextColor3 = Color3.fromRGB(255, 255, 255)
RandomReason.TextSize = 50.000
RunQuestion.Name = "RunQuestion"
RunQuestion.Parent = LoadingFrame
RunQuestion.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
RunQuestion.BackgroundTransparency = 1.000
RunQuestion.Position = UDim2.new(0.489562511, 0, 0.383953691, 0)
RunQuestion.Size = UDim2.new(0.0199999996, 0, 0.0500000007, 0)
RunQuestion.Font = Enum.Font.GothamBold
RunQuestion.Text = Text2
RunQuestion.TextColor3 = Color3.fromRGB(255, 255, 255)
RunQuestion.TextSize = 25.000
Executors.Name = "Executors"
Executors.Parent = LoadingFrame
Executors.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Executors.BackgroundTransparency = 1.000
Executors.Position = UDim2.new(0.492968768, 0, 0.474129587, 0)
Executors.Size = UDim2.new(0.0130000003, 0, 0.0500000007, 0)
Executors.Font = Enum.Font.GothamBold
Executors.Text = Text3
Executors.TextColor3 = Color3.fromRGB(255, 255, 255)
Executors.TextSize = 20.000
Paid.Name = "Paid"
Paid.Parent = LoadingFrame
Paid.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Paid.BackgroundTransparency = 1.000
Paid.Position = UDim2.new(0.492968738, 0, 0.496083349, 0)
Paid.Size = UDim2.new(0.0130000003, 0, 0.0500000007, 0)
Paid.Font = Enum.Font.GothamBold
Paid.Text = Text4
Paid.TextColor3 = Color3.fromRGB(255, 255, 255)
Paid.TextSize = 17.000
Help.Name = "Help"
Help.Parent = LoadingFrame
Help.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Help.BackgroundTransparency = 1.000
Help.Position = UDim2.new(0.492968738, 0, 0.66259259, 0)
Help.Size = UDim2.new(0.0130000003, 0, 0.0500000007, 0)
Help.Font = Enum.Font.GothamBold
Help.Text = "Need help? "..cordCode
Help.TextColor3 = Color3.fromRGB(255, 255, 255)
Help.TextSize = 20.000
HmmButton.Name = "HmmButton"
HmmButton.Parent = LoadingFrame
HmmButton.BackgroundColor3 = Color3.fromRGB(93, 93, 93)
HmmButton.BackgroundTransparency = 0.700
HmmButton.BorderColor3 = Color3.fromRGB(53, 51, 51)
HmmButton.BorderSizePixel = 0
HmmButton.Position = UDim2.new(0.424718767, 0, 0.582555592, 0)
HmmButton.Size = UDim2.new(0.150000006, 0, 0.0500000007, 0)
HmmButton.Font = Enum.Font.GothamBold
HmmButton.Text = Text6
HmmButton.TextColor3 = Color3.fromRGB(255, 255, 255)
HmmButton.TextSize = 30.000
HmmButton.Visible = Btn
HmmButton.MouseButton1Down:Connect(function()
LoadingFrame:Destroy()
RunDude = true
end)
Free.Name = "Free"
Free.Parent = LoadingFrame
Free.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Free.BackgroundTransparency = 1.000
Free.Position = UDim2.new(0.492968738, 0, 0.514601827, 0)
Free.Size = UDim2.new(0.0130000003, 0, 0.0500000007, 0)
Free.Font = Enum.Font.GothamBold
Free.Text = Text5
Free.TextColor3 = Color3.fromRGB(255, 255, 255)
Free.TextSize = 17.000
end
local cmdp = game:GetService("Players")
local cmdlp = cmdp.LocalPlayer
--[[local cg = game:GetService("CoreGui")
for i,v in pairs(cg:GetChildren()) do
if v:IsA("Sound") and v.Volume == 2 and v.Name:sub(16, 16) == "4" then
v:Destroy()
Stand("Looks like Infinite Yield has something to say.","We have no problem with you using both products","", "We have deleted their text-to-speech message for your convenience","We don't know where such a message is coming from. Please don't show any disrespect to ZWolf or Edge, they had nothing to do with it to my knowledge. -fini","Continue", true)
while not RunDude do wait() end
end
end
local mt = getrawmetatable(game:GetService("CoreGui"))
local namecall = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(self, ...)
if checkcaller() and IY_LOADED and getnamecallmethod() == "Play" and string.sub(tostring(self), 16, 16) == "4" and typeof(self) == "Instance" then
Stand("Looks like Infinite Yield has something to say.","We have no problem with you using both products","", "We have deleted their text-to-speech message for your convenience","We don't know where such a message is coming from. Please don't show any disrespect to ZWolf or Edge, they had nothing to do with it to my knowledge. -fini","Continue", true)
return nil
end
return namecall(self, ...)
end)
setreadonly(mt, true)--]]
loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/Version",true))()
if Current and Current.Version ~= ver then
Stand("CMD-X is not up to par!","CMD-X cannot run.","","Your version: "..ver,"Current version: "..Current.Version,"Run Anyway",true)
while not RunDude do
wait()
end
end
if isfile then
if not isfile("CMD-X.lua") then
Stand("Looks like you're new here!","To view commands, use .commands","You can use different stuff like .hotkeys and .plugins for add-ons.","","Join the discord if you need any help using the script, false tickets will result in a ban.","Okay",true)
repeat wait() until RunDude == true
end
end
Stand("IMPORTANT","CMD-X's server is DEAD as FUCK. F","Join the new one to support us at:",cordCode,"","I joined!",true)
--repeat wait() until RunDude == true
-- Variables: ------------------------|
local player = cmdlp
local cmdl = game:GetService("Lighting")
local cmdrs = game:GetService("ReplicatedStorage")
local cmdrs2 = game:GetService("RunService")
local cmdts = game:GetService("TweenService")
local cmdvu = game:GetService("VirtualUser")
local cmduis = game:GetService("UserInputService")
local Mouses = cmdlp:GetMouse()
cmdm = Mouses
-- we dont have this many owners just alts
local Devs = {
["progamer421minus1"] = "Owner",
["octoberboy68plus1"] = "Owner",
["pigeoncult"] = "Owner",
["knifemarks"] = "Owner",
["CMD_X"] = "Owner",
["Curvn"] = "Dev",
["4444445678102"] = "Owner",
}
DevCords = {
"pigeon#8951";
"alx#6729";
"Adam~#2002";
}
local Donors = {
["8avu"] = "1",
["0ccoy"] = "1",
["Zuhqu"] = "1",
["NitoOV"] = "1",
["LtsDank"] = "1",
["614SHAD"] = "1",
["tyswrld"] = "1",
["teejay6x"] = "1",
["Yarhibol"] = "1",
["Schewpid"] = "1",
["goresyard"] = "1",
["HyperLink3"] = "1",
["OFFTheBatter"] = "1",
["DisturbedCult"] = "1",
["hellavzn"] = "1",
["DAMAGlNG"] = "1",
["Zukkoe"] = "1",
["Missingno74"] = "1",
["HelIaSketchers"] = "1",
["amazinggeorgedude"] = "1",
["TheBlankProdigy"] = "1",
["cxpoxxo"] = "1",
["reseiz"] = "1",
["M3tamophosis"] = "1",
["vurghen"] = "1",
["guest863325"] = "1",
["xuyed"] = "1",
["8dqt"] = "2",
["skrask"] = "2",
["xniped"] = "2",
["KinggSeaa"] = "2",
["ClydeGrant"] = "2",
["Fxalling_Love"] = "2",
["emovert"] = "2",
["shifde"] = "2",
["RusskiSlavv"] = "2",
["fusionwhy"] = "Custom1",
["InternetSpeeds"] = "Custom2",
["TheChosenOne123"] = "Custom3",
["Irritatory"] = "Custom4",
["DuBz_Bubby"] = "Custom5", -- top donor {$200}
["YanniLove"] = "Custom6",
["painteatr"] = "Custom7",
}
local Tier = {
["1"] = {
Tag = "Donor of CMD-X",
Color = Color3.fromRGB(255,70,70),
SCHAT = "DONOR"
},
["2"] = {
Tag = "Donor of CMD-X",
Color = Color3.fromRGB(255,215,100),
SCHAT = "DONOR"
},
["Custom1"] = {
Tag = "Administrator",
Color = Color3.fromRGB(209,156,240),
SCHAT = "ADMINISTRATOR"
},
["Custom2"] = {
Tag = "Infernal",
Color = Color3.fromRGB(170, 1, 20),
SCHAT = "INFERNAL"
},
["Custom3"] = {
Tag = "The Chosen",
Color = Color3.fromRGB(63, 0, 0),
SCHAT = "THE CHOSEN"
},
["Custom4"] = {
Tag = "Ex-Top Donor",
Color = Color3.fromRGB(255,0,255),
SCHAT = "EX-TOP"
},
["Custom5"] = {
Tag = "DuBz_Bubby",
Color = "RGBDev",
SCHAT = "TOP DONOR"
},
["Custom6"] = {
Tag = "Classy Cute",
Color = Color3.fromRGB(252,144,3),
SCHAT = "SUGAR DADDY"
},
["Custom7"] = {
Tag = "Duck",
Color = Color3.fromRGB(0,255,255),
SCHAT = "DUCK",
},
}
if isfolder and makefolder and isfile and writefile then
if not isfolder("CMD-X Plugins") then makefolder("CMD-X Plugins") end
if not isfile("CMD-X Plugins/template.lua") then writefile("CMD-X Plugins/template.lua","print('test')") end
end
function loaddefaults()
text2 = false
hotkeyopen = 'q'
hotkeyopx = 'u'
hotkeyfocus = ';'
hotkeyfly = ''
hotkeyxray = ''
hotkeyesp = ''
hotkeyaimbot = ''
prefix = '.'
prompt = 'CMD-X Prompt >'
enterCMD = {}
gotoPos = 0
gotoPosSide = 0
gotoPosHead = 0
WPs = {}
Plugins = {}
discordTag = ''
permfcspeed = 1
permflyspeed = 1
permwalkspeed = 50
permjumppower = 150
permhipheight = 20
permgravity = 50
permmaxsl = 89.99
Adm = {}
hkBinds = {}
dStyle = "rounded"
conFly = true
suggestions = true
CMDStats = {}
oldNum = 0
hotkeyctp = "LeftControl"
permspamspeed = 1
mentions = true
sDetect = true
SavedPos = {X = 800, Y = 300}
hotkeynoclip = ""
ChatBind = false
CMDTab = {"commands","credits","plugin","changestyle","hotkeys","entercmds","support","",""}
TabsOff = true
KeepCMDXOn = false
ifKickedAuto = false
whyIs = 0
combos = {}
drawingtype = "old"
end
function updatesaves()
local update = {
text2 = text2;
hotkeyopen = hotkeyopen;
hotkeyopx = hotkeyopx;
hotkeyfocus = hotkeyfocus;
hotkeyfly = hotkeyfly;
hotkeyxray = hotkeyxray;
hotkeyesp = hotkeyesp;
hotkeyaimbot = hotkeyaimbot;
prefix = prefix;
prompt = prompt;
enterCMD = enterCMD;
gotoPos = gotoPos;
gotoPosSide = gotoPosSide;
gotoPosHead = gotoPosHead;
WPs = WPs;
Plugins = Plugins;
discordTag = discordTag;
permfcspeed = permfcspeed;
permflyspeed = permflyspeed;
permwalkspeed = permwalkspeed;
permjumppower = permjumppower;
permhipheight = permhipheight;
permgravity = permgravity;
permmaxsl = permmaxsl;
Adm = Adm;
hkBinds = hkBinds;
dStyle = dStyle;
conFly = conFly;
suggestions = suggestions;
CMDStats = CMDStats;
oldNum = oldNum;
hotkeyctp = hotkeyctp;
permspamspeed = permspamspeed;
mentions = mentions;
sDetect = sDetect;
SavedPos = SavedPos;
hotkeynoclip = hotkeynoclip;
ChatBind = ChatBind;
CMDTab = CMDTab;
TabsOff = TabsOff;
KeepCMDXOn = KeepCMDXOn;
ifKickedAuto = ifKickedAuto;
whyIs = whyIs;
drawingtype = drawingtype;
}
writefile("CMD-X.lua", game:GetService("HttpService"):JSONEncode(update))
end
function loadsaves()
local success, errorsend = pcall(function()
saves = game:GetService("HttpService"):JSONDecode(readfile("CMD-X.lua"))
end)
if not success then
loaddefaults()
updatesaves()
return
end
text2 = saves.text2
hotkeyopen = saves.hotkeyopen
hotkeyopx = saves.hotkeyopx
hotkeyfocus = saves.hotkeyfocus
hotkeyfly = saves.hotkeyfly
hotkeyxray = saves.hotkeyxray
hotkeyesp = saves.hotkeyesp
hotkeyaimbot = saves.hotkeyaimbot
prefix = saves.prefix
prompt = saves.prompt
enterCMD = saves.enterCMD
gotoPos = saves.gotoPos
gotoPosSide = saves.gotoPosSide
gotoPosHead = saves.gotoPosHead
WPs = saves.WPs
Plugins = saves.Plugins
discordTag = saves.discordTag
permfcspeed = saves.permfcspeed
permflyspeed = saves.permflyspeed
permwalkspeed = saves.permwalkspeed
permjumppower = saves.permjumppower
permhipheight = saves.permhipheight
permgravity = saves.permgravity
permmaxsl = saves.permmaxsl
Adm = saves.Adm
hkBinds = saves.hkBinds
dStyle = saves.dStyle
conFly = saves.conFly
suggestions = saves.suggestions
CMDStats = saves.CMDStats
oldNum = saves.oldNum
hotkeyctp = saves.hotkeyctp
permspamspeed = saves.permspamspeed
mentions = saves.mentions
sDetect = saves.sDetect
SavedPos = saves.SavedPos
hotkeynoclip = saves.hotkeynoclip
ChatBind = saves.ChatBind
CMDTab = saves.CMDTab
TabsOff = saves.TabsOff
KeepCMDXOn = saves.KeepCMDXOn
ifKickedAuto = saves.ifKickedAuto
whyIs = saves.whyIs
combos = saves.combos
drawingtype = saves.drawingtype
end
if writefile and readfile then
loadsaves()
else
loaddefaults()
end
checkArg = {
[172667278.9] = "\85\115\105\110\103\32\98\111\116\115\32\116\111\32\39\97\116\116\101\109\112\116\39\32\116\111\32\114\97\105\100\32\67\77\68\45\88\32\115\101\114\118\101\114\46",
[117849776.6] = "\83\116\105\108\108\32\110\101\101\100\32\116\104\97\116\32\114\101\97\115\111\110\32\111\110\32\119\104\121\46",
[838753790.5] = "\100\117\110\110\111\32\119\104\121\32\121\111\117\114\32\98\108\39\101\100\32\98\117\116\32\103\111\110\110\97\32\107\101\101\112\32\117\32\115\105\110\99\101\32\117\114\32\112\114\111\102\105\108\101\32\103\97\121\46",
[3993039278.4] = "",
[628686490.5] = "\83\101\110\100\105\110\103\32\99\104\105\108\100\112\111\114\110\32\116\111\32\104\122\46",
[303591427.1] = "",
[6571024505.1] = "\110\105\99\101\32\116\114\121",
[54603839] = "",
}
local requirements = cmdlp["\85\115\101\114\73\100"]
function isDoneLoading(arg)
if checkArg[requirements * 290 / 100] then
whyIs = requirements
updatesaves()
return false
elseif checkArg[whyIs * 290 / 100] then
return false
else
whyIs = 0
updatesaves()
return true
end
end
if game:GetService("UserInputService").VREnabled then
SavedPos = {X = 147, Y = 324}
end
_G.hotkeyopx = hotkeyopx
AdmIG = {}
function commandsLoaded()
return isDoneLoading()
end
--[[for _,x in pairs(Adm) do
for _,v in pairs(cmdp:GetPlayers()) do
if x == v.Name then
table.insert(AdmIG,x)
end
end
end]]
Inputting = false
ChatBar = nil
Current = nil
if not commandsLoaded() then
Stand("\89\111\117\32\97\114\101\32\110\111\116\32\119\101\108\99\111\109\101\32\97\116\32\67\77\68\45\88\46","\67\77\68\45\88\32\119\105\108\108\32\110\111\116\32\114\117\110\46","","\82\101\97\115\111\110\58\32"..checkArg[whyIs * 290 / 100],"","",false)
repeat wait() until RunDude == true
end
function Check()
wait(.1)
Inputting = false
Disconnection:Disconnect()
end
function InputBegan()
if game:GetService("UserInputService"):GetFocusedTextBox() then
ChatBar = game:GetService("UserInputService"):GetFocusedTextBox()
Inputting = true
Current = ChatBar.FocusLost
Disconnection = Current:Connect(Check)
end
end
InputConnect = game:GetService("UserInputService").InputBegan:Connect(InputBegan)
AntiCheat = {
ScriptDetectOff = false;
TurboNameSpam = false;
HideParentInExploit = false;
HideParentInPG = false;
AutoAntiKick = false;
RemoveScripts = false;
IntroAudioOff = false;
DontJumbleNames = false;
OneTimeScramble = false;
PrintingOff = false;
NoGui = false;
Custom1 = false;
Attachment = "HairAttachment";
Warning1 = false;
CheckFocusBreak = false;
}
AntiCheat.Games = {
[176053469] = function()
AntiCheat.CheckFocusBreak = true
Unnamed.Parent = Parents[3]
end,
[4052062489] = function()
AntiCheat.AutoAntiKick = true
end,
[5278850819] = function()
workspace.FallenPartsDestroyHeight = 0/0
AntiCheat.Attachment = "Sf"
AntiCheat.Warning1 = true
for _,v in pairs(workspace.Structure.KillPart:GetChildren()) do
v:Destroy()
end
for _,v in pairs(workspace.Structure.Edges:GetChildren()) do
v:Destroy()
end
for _,c in pairs(getconnections(char.DescendantAdded)) do c:Disable() end
for _,c in pairs(getconnections(hrp:GetPropertyChangedSignal("Velocity"))) do c:Disable() end
for _,c in pairs(getconnections(hum:GetPropertyChangedSignal("WalkSpeed"))) do c:Disable() end
for _,c in pairs(getconnections(hum:GetPropertyChangedSignal("JumpPower"))) do c:Disable() end
for _,c in pairs(getconnections(game.ReplicatedStorage.Remotes.ChildRemoved)) do c:Disable() end
game.ReplicatedStorage.Remotes.event:Destroy()
end,
[2988554876] = function()
cmdrs.AC:Destroy()
cmdlp.PlayerScripts.AntiCheat:Destroy()
end
}
if AntiCheat.Games[game.PlaceId] then
pcall(function() AntiCheat.Games[game.PlaceId]() end)
end
if AntiCheat.Custom1 then
local old = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(self,...)
if self.Name == "TimeEvent" then
return
end
return old(self, ...)
end)
setreadonly(mt, true)
end
if AntiCheat.HideParentInPG then
getParent = cmdlp.PlayerGui
end
if AntiCheat.HideParentInExploit then
if syn.protect_gui then
getParent = syn.protect_gui
syn.protect_gui(Unnamed)
elseif get_hidden_gui then
getParet = get_hidden_gui
Unnamed.Parent = get_hidden_gui()
else
Stand("Your exploit does not support syn.protect_gui/get_hidden_gui!","CMD-X cannot run.","Explanation;","This game has an anti-cheat and our way of stopping it is through syn.protect_gui/get_hidden_gui.","","Run Anyway",true)
repeat wait() until RunDude == true
end
end
if AntiCheat.AutoAntiKick then
local oldcall = mt.__namecall
setreadonly(mt,false)
mt.__namecall = newcclosure(function(...)
local args = {...}
if getnamecallmethod() == "Kick" then
return nil
end
return oldcall(self,...)
end)
end
if AntiCheat.RemoveScripts then
for _,v in pairs(cmdp:GetDescendants()) do
if v:IsA("LocalScript") and v.Name ~= "Animate" and v.Parent ~= "Chat" then
v:Destroy()
end
end
Stand("CMD-X has to delete local scripts!","Your game may not work.","Explanation;","This game has an anticheat and our way of solving it is removing scripts.","","Run Anyway",true)
repeat wait() until RunDude == true
end
if AntiCheat.OneTimeScramble then
Unnamed.Name = math.random(1,100000)
end
local AudioIds = {5032588119}
if AntiCheat.IntroAudioOff == false then
local Sound2 = Instance.new("Sound", game:GetService("PolicyService"))
Sound2.SoundId = "http://www.roblox.com/asset/?id="..AudioIds[1]
Sound2:Play()
end
holder = Instance.new("Frame", getParent)
holder.Visible = false
output = Instance.new("Frame", getParent)
output1 = Instance.new("TextLabel", getParent)
output2 = Instance.new("TextLabel", getParent)
output3 = Instance.new("TextLabel", getParent)
output4 = Instance.new("TextLabel", getParent)
output5 = Instance.new("TextLabel", getParent)
output6 = Instance.new("TextLabel", getParent)
output7 = Instance.new("TextLabel", getParent)
output8 = Instance.new("TextLabel", getParent)
output9 = Instance.new("TextLabel", getParent)
entry = Instance.new("Frame", getParent)
user = Instance.new("TextLabel", getParent)
cmd = Instance.new("TextBox", getParent)
cmdsu = Instance.new("TextLabel", getParent)
output.Name = "output"
output.Parent = holder
output.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
output.BorderSizePixel = 0
output.Position = UDim2.new(0, -8, 0, 19)
output.Size = UDim2.new(0, 525, 0, 253)
output.Style = Enum.FrameStyle.RobloxRound
output.Visible = false
local Gui = {}
if not AntiCheat.HideParentInExploit and getParent ~= game then
for _,v in pairs(getParent:GetDescendants()) do
table.insert(Gui,v.Name)
table.insert(Gui,math.random(-2e9,2e9))
end
end
if getParent ~= game then
game:GetService("RunService").RenderStepped:Connect(function()
if AntiCheat.DontJumbleNames == false then
if AntiCheat.HideParentInExploit == false then
if AntiCheat.TurboNameSpam == false then
Unnamed.Name = Gui[math.random(#Gui)]
else
for _,v in pairs(Unnamed:GetDescendants()) do
v.Name = Gui[math.random(#Gui)]
end
end
else
if AntiCheat.TurboNameSpam == false then
Unnamed.Name = math.random(1000000)
else
for _,v in pairs(Unnamed:GetDescendants()) do
v.Name = math.random(1000000)
end
end
end
end
end)
end
function Confirm(Reason,Reason2)
Confirmation = false
HeyDestroyed = false
ConfirmationFrame = Instance.new("Frame", getParent)
Sure = Instance.new("TextLabel", getParent)
Not = Instance.new("TextLabel", getParent)
Help2 = Instance.new("TextLabel", getParent)
Yes = Instance.new("TextButton", getParent)
No = Instance.new("TextButton", getParent)
ConfirmationFrame.Name = "ConfirmationFrame"
ConfirmationFrame.Parent = Unnamed
ConfirmationFrame.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
ConfirmationFrame.BackgroundTransparency = 0
ConfirmationFrame.BorderSizePixel = 0
ConfirmationFrame.Position = UDim2.new(0.328281224, 0, 0.362222254, 0)
ConfirmationFrame.Size = UDim2.new(0.342812598, 0, 0.275277853, 0)
Sure.Name = "Sure"
Sure.Parent = ConfirmationFrame
Sure.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Sure.BackgroundTransparency = 1.000
Sure.Position = UDim2.new(0.489562482, 0, 0.113113157, 0)
Sure.Size = UDim2.new(0.0199999996, 0, 0.0500000007, 0)
Sure.Font = Enum.Font.GothamBold
Sure.Text = Reason
Sure.TextColor3 = Color3.fromRGB(255, 255, 255)
Sure.TextSize = 20.000
Not.Name = "Not"
Not.Parent = ConfirmationFrame
Not.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Not.BackgroundTransparency = 1.000
Not.Position = UDim2.new(0.459936291, 0, 0.222500637, 0)
Not.Size = UDim2.new(0.0692250952, 0, 0.10650862, 0)
Not.Font = Enum.Font.GothamBold
Not.Text = Reason2
Not.TextColor3 = Color3.fromRGB(255, 255, 255)
Not.TextSize = 20.000
if Reason == "Default" then
Sure.Text = "Are you sure you want to run this command?"
end
if Reason2 == "Default" then
Not.Text = "This may not work properly."
end
Help2.Name = "Help2"
Help2.Parent = ConfirmationFrame
Help2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Help2.BackgroundTransparency = 1.000
Help2.Position = UDim2.new(0.467900336, 0, 0.834136486, 0)
Help2.Size = UDim2.new(0.0622250475, 0, 0.118617564, 0)
Help2.Font = Enum.Font.GothamBold
Help2.Text = "Need help? "..cordCode
Help2.TextColor3 = Color3.fromRGB(255, 255, 255)
Help2.TextSize = 20.000
Yes.Name = "Yes"
Yes.Parent = ConfirmationFrame
Yes.BackgroundColor3 = Color3.fromRGB(93, 93, 93)
Yes.BackgroundTransparency = 0.700
Yes.BorderColor3 = Color3.fromRGB(53, 51, 51)
Yes.BorderSizePixel = 0
Yes.Position = UDim2.new(0.310771585, 0, 0.50248313, 0)
Yes.Size = UDim2.new(0.155925438, 0, 0.147881001, 0)
Yes.Font = Enum.Font.GothamBold
Yes.Text = "Yes"
Yes.TextColor3 = Color3.fromRGB(255, 255, 255)
Yes.TextSize = 30.000
Yes.MouseButton1Down:Connect(function()
ConfirmationFrame:Destroy()
Confirmation = true
HeyDestroyed = true
end)
No.Name = "No"
No.Parent = ConfirmationFrame
No.BackgroundColor3 = Color3.fromRGB(93, 93, 93)
No.BackgroundTransparency = 0.700
No.BorderColor3 = Color3.fromRGB(53, 51, 51)
No.BorderSizePixel = 0
No.Position = UDim2.new(0.545502543, 0, 0.50248313, 0)
No.Size = UDim2.new(0.155925438, 0, 0.147881001, 0)
No.Font = Enum.Font.GothamBold
No.Text = "No"
No.TextColor3 = Color3.fromRGB(255, 255, 255)
No.TextSize = 30.000
No.MouseButton1Down:Connect(function()
ConfirmationFrame:Destroy()
Confirmation = false
HeyDestroyed = true
end)
repeat wait(.01) until HeyDestroyed == true
end
holder.Name = "holder"
holder.Parent = Unnamed
holder.ZIndex = 2147483647
holder.BackgroundColor3 = Color3.new(1, 1, 1)
holder.BackgroundTransparency = 1
holder.Position = UDim2.new(0, SavedPos.X, 0, SavedPos.Y)
holder.Size = UDim2.new(0, 525, 0, 277)
holder.Active = false
local updatedebounce = tick()
holder.Changed:Connect(function()
if tick() - updatedebounce > 5 then
SavedPos = {X = holder.AbsolutePosition.X, Y = holder.AbsolutePosition.Y}
updatesaves()
updatedebounce = tick()
end
end)
HoldTab = Instance.new("Frame",getParent)
TnOT = Instance.new("TextLabel",getParent)
Splitz = Instance.new("Frame",getParent)
T1 = Instance.new("TextLabel",getParent)
XE = Instance.new("TextButton",getParent)
T2 = Instance.new("TextLabel",getParent)
XE_2 = Instance.new("TextButton",getParent)
T4 = Instance.new("TextLabel",getParent)
XE_3 = Instance.new("TextButton",getParent)
T3 = Instance.new("TextLabel",getParent)
XE_4 = Instance.new("TextButton",getParent)
T8 = Instance.new("TextLabel",getParent)
XE_5 = Instance.new("TextButton",getParent)
T6 = Instance.new("TextLabel",getParent)
XE_6 = Instance.new("TextButton",getParent)
T5 = Instance.new("TextLabel",getParent)
XE_7 = Instance.new("TextButton",getParent)
T7 = Instance.new("TextLabel",getParent)
XE_8 = Instance.new("TextButton",getParent)
T9 = Instance.new("TextLabel",getParent)
XE_9 = Instance.new("TextButton",getParent)
HoldTab.Name = "HoldTab"
HoldTab.Parent = Unnamed
HoldTab.Active = true
createDrag(HoldTab)
HoldTab.BackgroundColor3 = Color3.new(0.219608, 0.219608, 0.219608)
HoldTab.BorderSizePixel = 0
HoldTab.Position = UDim2.new(0.745833397, 0, 0.518735349, 0)
HoldTab.Size = UDim2.new(0, 148, 0, 306)
if TabsOff then HoldTab.Visible = false end
TnOT.Name = "TnOT"
TnOT.Parent = HoldTab
TnOT.BackgroundColor3 = Color3.new(1, 1, 1)
TnOT.BackgroundTransparency = 1
TnOT.BorderSizePixel = 0
TnOT.Position = UDim2.new(-0.00416688668, 0, -0.000872443721, 0)
TnOT.Size = UDim2.new(0, 148, 0, 23)
TnOT.Font = Enum.Font.GothamBold
TnOT.Text = "CMD TABS"
TnOT.TextColor3 = Color3.new(1, 1, 1)
TnOT.TextSize = 20
Splitz.Name = "Splitz"
Splitz.Parent = HoldTab
Splitz.BackgroundColor3 = Color3.new(1, 1, 1)
Splitz.BorderSizePixel = 0
Splitz.Position = UDim2.new(-0.00416660309, 0, 0.074290961, 0)
Splitz.Size = UDim2.new(0, 148, 0, 1)
entry.Name = "entry"
entry.Parent = holder
entry.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
entry.BorderSizePixel = 0
entry.Position = UDim2.new(-0.0152380951, 0, 0.965582669, 0)
entry.Size = UDim2.new(0, 525, 0, 38)
user.Name = "user"
user.Parent = entry
user.BackgroundColor3 = Color3.new(1, 1, 1)
user.BackgroundTransparency = 1
user.Position = UDim2.new(-0.0152380941, 0, 0, 0)
user.Size = UDim2.new(0, 137, 0, 36)
user.Font = Enum.Font.Code
user.Text = prompt
user.TextColor3 = Color3.new(1, 0.333333, 0)
user.TextSize = 16
user.TextXAlignment = Enum.TextXAlignment.Right
cmd.Name = "cmd"
cmd.Parent = cmdsu
cmd.BackgroundColor3 = Color3.new(1, 1, 1)
cmd.BackgroundTransparency = 1
cmd.BorderSizePixel = 0
cmd.Position = UDim2.new(-0, 0, 0, 0)
cmd.Size = UDim2.new(0, 341, 0, 35)
cmd.Font = Enum.Font.Code
cmd.PlaceholderText = "Enter CMD here"
cmd.Text = ""
cmd.TextWrapped = true
cmd.TextColor3 = Color3.fromRGB(255,255,255)
cmd.PlaceholderColor3 = Color3.fromRGB(255,255,255)
cmd.TextSize = 14
cmd.TextXAlignment = Enum.TextXAlignment.Left
cmd.ClearTextOnFocus = false
cmdsu.Name = "cmdsu"
cmdsu.Parent = entry
cmdsu.BackgroundColor3 = Color3.new(1, 1, 1)
cmdsu.BackgroundTransparency = 1
cmdsu.BorderSizePixel = 0
cmdsu.Position = UDim2.new(0.274285644, 0, 0, 0)
cmdsu.Size = UDim2.new(0, 341, 0, 35)
cmdsu.Font = Enum.Font.Code
cmdsu.Text = ""
cmdsu.TextWrapped = true
cmdsu.TextColor3 = Color3.fromRGB(100,100,100)
cmdsu.TextSize = 14
cmdsu.TextXAlignment = Enum.TextXAlignment.Left
output1.Name = "output1"
output1.Parent = output
output1.BackgroundColor3 = Color3.new(1, 1, 1)
output1.BackgroundTransparency = 1
output1.Position = UDim2.new(0.0157605428, 0, 0.849240005, 0)
output1.Size = UDim2.new(0, 500, 0, 27)
output1.Font = Enum.Font.Code
output1.Text = "Need help? "..cordCode
output1.TextColor3 = Color3.new(0.698039, 0.698039, 0.698039)
output1.TextSize = 16
output1.TextXAlignment = Enum.TextXAlignment.Left
output1.TextWrapped = true
output1.TextTruncate = Enum.TextTruncate.AtEnd
output2.Name = "output2"
output2.Parent = output
output2.BackgroundColor3 = Color3.new(1, 1, 1)
output2.BackgroundTransparency = 1
output2.Position = UDim2.new(0.0157605428, 0, 0.74252063, 0)
output2.Size = UDim2.new(0, 500, 0, 27)
output2.Font = Enum.Font.Code
output2.Text = "Current version: "..ver
output2.TextColor3 = Color3.new(0.698039, 0.698039, 0.698039)
output2.TextSize = 16
output2.TextXAlignment = Enum.TextXAlignment.Left
output2.TextWrapped = true
output2.TextTruncate = Enum.TextTruncate.AtEnd
output3.Name = "output3"
output3.Parent = output
output3.BackgroundColor3 = Color3.new(1, 1, 1)
output3.BackgroundTransparency = 1
output3.Position = UDim2.new(0.0157605428, 0, 0.639753819, 0)
output3.Size = UDim2.new(0, 500, 0, 27)
output3.Font = Enum.Font.Code
output3.Text = "Made by "..DevCords[1].." and "..DevCords[2]
output3.TextColor3 = Color3.new(0.698039, 0.698039, 0.698039)
output3.TextSize = 16
output3.TextXAlignment = Enum.TextXAlignment.Left
output3.TextWrapped = true
output3.TextTruncate = Enum.TextTruncate.AtEnd
output4.Name = "output4"
output4.Parent = output
output4.BackgroundColor3 = Color3.new(1, 1, 1)
output4.BackgroundTransparency = 1
output4.Position = UDim2.new(0.0157605428, 0, 0.533034444, 0)
output4.Size = UDim2.new(0, 500, 0, 27)
output4.Font = Enum.Font.Code
output4.TextColor3 = Color3.new(0.698039, 0.698039, 0.698039)
output4.TextSize = 16
output4.TextXAlignment = Enum.TextXAlignment.Left
output4.TextWrapped = true
output4.TextTruncate = Enum.TextTruncate.AtEnd
local Hints = {"Did you know you can execute multiple commands with ';;'?","Did you know you can create a wait using timedcmd in loops?","You can find commands using 'cmds'.","You can change your prefix by doing 'prefixnew (key)'","Did you know CMD-X was created in October 2019?"}
output4.Text = Hints[math.random(1,#Hints)]
output5.Name = "output5"
output5.Parent = output
output5.BackgroundColor3 = Color3.new(1, 1, 1)
output5.BackgroundTransparency = 1
output5.Position = UDim2.new(0.0157605428, 0, 0.430267632, 0)
output5.Size = UDim2.new(0, 500, 0, 27)
output5.Font = Enum.Font.Code
output5.Text = ""
output5.TextColor3 = Color3.new(0.698039, 0.698039, 0.698039)
output5.TextSize = 16
output5.TextXAlignment = Enum.TextXAlignment.Left
output5.TextWrapped = true
output5.TextTruncate = Enum.TextTruncate.AtEnd
output6.Name = "output6"
output6.Parent = output
output6.BackgroundColor3 = Color3.new(1, 1, 1)
output6.BackgroundTransparency = 1
output6.Position = UDim2.new(0.0157605428, 0, 0.323548257, 0)
output6.Size = UDim2.new(0, 500, 0, 27)
output6.Font = Enum.Font.Code
output6.Text = ""
output6.TextColor3 = Color3.new(0.698039, 0.698039, 0.698039)
output6.TextSize = 16
output6.TextXAlignment = Enum.TextXAlignment.Left
output6.TextWrapped = true
output6.TextTruncate = Enum.TextTruncate.AtEnd
output7.Name = "output7"
output7.Parent = output
output7.BackgroundColor3 = Color3.new(1, 1, 1)
output7.BackgroundTransparency = 1
output7.Position = UDim2.new(0.0157605428, 0, 0.22078146, 0)
output7.Size = UDim2.new(0, 500, 0, 27)
output7.Font = Enum.Font.Code
output7.Text = ""
output7.TextColor3 = Color3.new(0.698039, 0.698039, 0.698039)
output7.TextSize = 16
output7.TextXAlignment = Enum.TextXAlignment.Left
output7.TextWrapped = true
output7.TextTruncate = Enum.TextTruncate.AtEnd
output8.Name = "output8"
output8.Parent = output
output8.BackgroundColor3 = Color3.new(1, 1, 1)
output8.BackgroundTransparency = 1
output8.Position = UDim2.new(0.0157605428, 0, 0.114062086, 0)
output8.Size = UDim2.new(0, 500, 0, 27)
output8.Font = Enum.Font.Code
output8.Text = ""
output8.TextColor3 = Color3.new(0.698039, 0.698039, 0.698039)
output8.TextSize = 16
output8.TextXAlignment = Enum.TextXAlignment.Left
output8.TextWrapped = true
output8.TextTruncate = Enum.TextTruncate.AtEnd
output9.Name = "output9"
output9.Parent = output
output9.BackgroundColor3 = Color3.new(1, 1, 1)
output9.BackgroundTransparency = 1
output9.Position = UDim2.new(0.0157605428, 0, 0.0112952888, 0)
output9.Size = UDim2.new(0, 500, 0, 27)
output9.Font = Enum.Font.Code
output9.Text = ""
output9.TextColor3 = Color3.new(0.698039, 0.698039, 0.698039)
output9.TextSize = 16
output9.TextXAlignment = Enum.TextXAlignment.Left
output9.TextWrapped = true
output9.TextTruncate = Enum.TextTruncate.AtEnd
function sFLY(vfly)
FLYING = false
speedofthefly = 1
speedofthevfly = 1
while not cmdlp or not cmdlp.Character or not cmdlp.Character:FindFirstChild('HumanoidRootPart') or not cmdlp.Character:FindFirstChild('Humanoid') or not cmdm do
wait()
end
local T = cmdlp.Character.HumanoidRootPart
local CONTROL = {F = 0, B = 0, L = 0, R = 0, Q = 0, E = 0}
local lCONTROL = {F = 0, B = 0, L = 0, R = 0, Q = 0, E = 0}
local SPEED = 0
local function FLY()
FLYING = true
local BG = Instance.new('BodyGyro', T)
local BV = Instance.new('BodyVelocity', T)
BG.P = 9e4
BG.maxTorque = Vector3.new(9e9, 9e9, 9e9)
BG.cframe = T.CFrame
BV.velocity = Vector3.new(0, 0, 0)
BV.maxForce = Vector3.new(9e9, 9e9, 9e9)
spawn(function()
while FLYING do
if not vfly then
cmdlp.Character:FindFirstChild("Humanoid").PlatformStand = true
end
if CONTROL.L + CONTROL.R ~= 0 or CONTROL.F + CONTROL.B ~= 0 or CONTROL.Q + CONTROL.E ~= 0 then
SPEED = 50
elseif not (CONTROL.L + CONTROL.R ~= 0 or CONTROL.F + CONTROL.B ~= 0 or CONTROL.Q + CONTROL.E ~= 0) and SPEED ~= 0 then
SPEED = 0
end
if (CONTROL.L + CONTROL.R) ~= 0 or (CONTROL.F + CONTROL.B) ~= 0 or (CONTROL.Q + CONTROL.E) ~= 0 then
BV.velocity = ((workspace.CurrentCamera.CoordinateFrame.lookVector * (CONTROL.F + CONTROL.B)) + ((workspace.CurrentCamera.CoordinateFrame * CFrame.new(CONTROL.L + CONTROL.R, (CONTROL.F + CONTROL.B + CONTROL.Q + CONTROL.E) * 0.2, 0).p) - workspace.CurrentCamera.CoordinateFrame.p)) * SPEED
lCONTROL = {F = CONTROL.F, B = CONTROL.B, L = CONTROL.L, R = CONTROL.R}
elseif (CONTROL.L + CONTROL.R) == 0 and (CONTROL.F + CONTROL.B) == 0 and (CONTROL.Q + CONTROL.E) == 0 and SPEED ~= 0 then
BV.velocity = ((workspace.CurrentCamera.CoordinateFrame.lookVector * (lCONTROL.F + lCONTROL.B)) + ((workspace.CurrentCamera.CoordinateFrame * CFrame.new(lCONTROL.L + lCONTROL.R, (lCONTROL.F + lCONTROL.B + CONTROL.Q + CONTROL.E) * 0.2, 0).p) - workspace.CurrentCamera.CoordinateFrame.p)) * SPEED
else
BV.velocity = Vector3.new(0, 0, 0)
end
BG.cframe = workspace.CurrentCamera.CoordinateFrame
wait()
end
CONTROL = {F = 0, B = 0, L = 0, R = 0, Q = 0, E = 0}
lCONTROL = {F = 0, B = 0, L = 0, R = 0, Q = 0, E = 0}
SPEED = 0
BG:destroy()
BV:destroy()
cmdlp.Character.Humanoid.PlatformStand = false
end)
end
cmdm.KeyDown:connect(function(KEY)
if KEY:lower() == 'w' then
if vfly then
CONTROL.F = speedofthevfly
else
CONTROL.F = speedofthefly
end
elseif KEY:lower() == 's' then
if vfly then
CONTROL.B = - speedofthevfly
else
CONTROL.B = - speedofthefly
end
elseif KEY:lower() == 'a' then
if vfly then
CONTROL.L = - speedofthevfly
else
CONTROL.L = - speedofthefly
end
elseif KEY:lower() == 'd' then
if vfly then
CONTROL.R = speedofthevfly
else
CONTROL.R = speedofthefly
end
elseif KEY:lower() == 'y' then
if vfly then
CONTROL.Q = speedofthevfly*2
else
CONTROL.Q = speedofthefly*2
end
elseif KEY:lower() == 't' then
if vfly then
CONTROL.E = -speedofthevfly*2
else
CONTROL.E = -speedofthefly*2
end
end
end)
cmdm.KeyUp:connect(function(KEY)
if KEY:lower() == 'w' then
CONTROL.F = 0
elseif KEY:lower() == 's' then
CONTROL.B = 0
elseif KEY:lower() == 'a' then
CONTROL.L = 0
elseif KEY:lower() == 'd' then
CONTROL.R = 0
elseif KEY:lower() == 'y' then
CONTROL.Q = 0
elseif KEY:lower() == 't' then
CONTROL.E = 0
end
end)
FLY()
end
opxholder = Instance.new("Frame", getParent)
opxviewertitle = Instance.new("TextLabel", getParent)
xoutofopx = Instance.new("TextButton", getParent)
opxscrollholder = Instance.new("Frame", getParent)
opxreferer = Instance.new("TextLabel", getParent)
opxsplitting = Instance.new("Frame", getParent)
opxScrolling = Instance.new("TextLabel", getParent)
opxholder.Name = "opxholder"
opxholder.Parent = Unnamed
opxholder.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
opxholder.BorderSizePixel = 0
opxholder.Position = UDim2.new(0.217357904, 0, 0.208845213, 0)
opxholder.Size = UDim2.new(0, 424, 0, 294)
opxholder.Visible = false
opxholder.Active = true
createDrag(opxholder)
opxviewertitle.Name = "opxviewertitle"
opxviewertitle.Parent = opxholder
opxviewertitle.BackgroundColor3 = Color3.new(1, 1, 1)
opxviewertitle.BackgroundTransparency = 1
opxviewertitle.Position = UDim2.new(0.264150947, 0, 0, 0)
opxviewertitle.Size = UDim2.new(0, 200, 0, 22)
opxviewertitle.Font = Enum.Font.GothamBold
opxviewertitle.Text = "CMD-X OUTPUT-LONGER"
opxviewertitle.TextColor3 = Color3.new(1, 1, 1)
opxviewertitle.TextSize = 14
xoutofopx.Name = "xoutofopx"
xoutofopx.Parent = opxholder
xoutofopx.BackgroundColor3 = Color3.new(1, 1, 1)
xoutofopx.BackgroundTransparency = 1
xoutofopx.Position = UDim2.new(0.948113203, 0, 0, 0)
xoutofopx.Size = UDim2.new(0, 22, 0, 22)
xoutofopx.Font = Enum.Font.GothamBold
xoutofopx.Text = "X"
xoutofopx.TextColor3 = Color3.new(1, 1, 1)
xoutofopx.TextSize = 20
xoutofopx.MouseButton1Down:Connect(function()
opxholder.Visible = false
end)
opxscrollholder.Name = "opxscrollholder"
opxscrollholder.Parent = opxholder
opxscrollholder.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
opxscrollholder.BorderSizePixel = 0
opxscrollholder.Position = UDim2.new(0.0306603778, 0, 0.0748299286, 0)
opxscrollholder.Size = UDim2.new(0, 397, 0, 232)
opxreferer.Name = "opxreferer"
opxreferer.Parent = opxscrollholder
opxreferer.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
opxreferer.BorderSizePixel = 0
opxreferer.Size = UDim2.new(0, 397, 0, 20)
opxreferer.Font = Enum.Font.Gotham
opxreferer.Text = " Output-Longer"
opxreferer.TextColor3 = Color3.new(1, 1, 1)
opxreferer.TextSize = 14
opxreferer.TextXAlignment = Enum.TextXAlignment.Left
opxsplitting.Name = "splitting"
opxsplitting.Parent = opxscrollholder
opxsplitting.BackgroundColor3 = Color3.new(1, 1, 1)
opxsplitting.BorderColor3 = Color3.new(1, 1, 1)
opxsplitting.Position = UDim2.new(0.0100755664, 0, 0.0892857313, 0)
opxsplitting.Size = UDim2.new(0, 389, 0, 0)
opxScrolling.Name = "opxScrolling"
opxScrolling.Parent = opxscrollholder
opxScrolling.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
opxScrolling.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
opxScrolling.BorderSizePixel = 0
opxScrolling.Position = UDim2.new(0.00986763742, 0, 0.102678575, 0)
opxScrolling.Size = UDim2.new(0, 389, 0, 204)
opxScrolling.TextColor3 = Color3.new(1, 1, 1)
opxScrolling.TextSize = 12
opxScrolling.Font = Enum.Font.Code
opxScrolling.TextXAlignment = Enum.TextXAlignment.Left
opxScrolling.TextYAlignment = Enum.TextYAlignment.Top
opxScrolling.TextWrapped = true
opxScrolling.TextScaled = true
function opxL(title,text)
opxreferer.Text = " "..title
opxScrolling.Text = text
opxholder.Visible = true
end
if _G.sCheck then _G.sCheck:Disconnect() end
if sDetect then
while not cmdlp.Character do
cmdrs2.RenderStepped:Wait()
end
local check1 = cmdlp.Character:FindFirstChild("Head")
if check1 then
local check2 = check1:FindFirstChild(AntiCheat.Attachment)
if check2 then
check2:Destroy()
end
end
_G.sCheck = cmdlp.CharacterAdded:Connect(function()
if sDetect then
wait(1)
local check1 = cmdlp.Character:FindFirstChild("Head")
if check1 then
local check2 = check1:FindFirstChild(AntiCheat.Attachment)
if check2 then
check2:Destroy()
end
end
end
end)
end
local statholder = Instance.new("Frame", getParent)
local statviewertitle = Instance.new("TextLabel", getParent)
local xoutofstats = Instance.new("TextButton", getParent)
local statscrollholder = Instance.new("Frame", getParent)
local referer = Instance.new("TextLabel", getParent)
local splitting = Instance.new("Frame", getParent)
local Scrollingstats = Instance.new("ScrollingFrame", getParent)
local Save = Instance.new("TextButton", getParent)
statholder.Name = "statholder"
statholder.Parent = Unnamed
statholder.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
statholder.BorderSizePixel = 0
statholder.Position = UDim2.new(0.217357904, 0, 0.208845213, 0)
statholder.Size = UDim2.new(0, 424, 0, 294)
statholder.Visible = false
statholder.Active = true
createDrag(statholder)
statviewertitle.Name = "statviewertitle"
statviewertitle.Parent = statholder
statviewertitle.BackgroundColor3 = Color3.new(1, 1, 1)
statviewertitle.BackgroundTransparency = 1
statviewertitle.Position = UDim2.new(0.264150947, 0, 0, 0)
statviewertitle.Size = UDim2.new(0, 200, 0, 22)
statviewertitle.Font = Enum.Font.GothamBold
statviewertitle.Text = "CMD-X STATISTICS VIEWER"
statviewertitle.TextColor3 = Color3.new(1, 1, 1)
statviewertitle.TextSize = 14
xoutofstats.Name = "xoutofstats"
xoutofstats.Parent = statholder
xoutofstats.BackgroundColor3 = Color3.new(1, 1, 1)
xoutofstats.BackgroundTransparency = 1
xoutofstats.Position = UDim2.new(0.948113203, 0, 0, 0)
xoutofstats.Size = UDim2.new(0, 22, 0, 22)
xoutofstats.Font = Enum.Font.GothamBold
xoutofstats.Text = "X"
xoutofstats.TextColor3 = Color3.new(1, 1, 1)
xoutofstats.TextSize = 20
xoutofstats.MouseButton1Down:Connect(function()
statholder.Visible = false
end)
statscrollholder.Name = "statscrollholder"
statscrollholder.Parent = statholder
statscrollholder.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
statscrollholder.BorderSizePixel = 0
statscrollholder.Position = UDim2.new(0.0306603778, 0, 0.0748299286, 0)
statscrollholder.Size = UDim2.new(0, 397, 0, 232)
referer.Name = "referer"
referer.Parent = statscrollholder
referer.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
referer.BorderSizePixel = 0
referer.Size = UDim2.new(0, 397, 0, 20)
referer.Font = Enum.Font.Gotham
referer.Text = " Name | All time"
referer.TextColor3 = Color3.new(1, 1, 1)
referer.TextSize = 14
referer.TextXAlignment = Enum.TextXAlignment.Left
splitting.Name = "splitting"
splitting.Parent = statscrollholder
splitting.BackgroundColor3 = Color3.new(1, 1, 1)
splitting.BorderColor3 = Color3.new(1, 1, 1)
splitting.Position = UDim2.new(0.0100755664, 0, 0.0892857313, 0)
splitting.Size = UDim2.new(0, 389, 0, 0)
Scrollingstats.Name = "Scrollingstats"
Scrollingstats.Parent = statscrollholder
Scrollingstats.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
Scrollingstats.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
Scrollingstats.BorderSizePixel = 0
Scrollingstats.Position = UDim2.new(0.00986763742, 0, 0.102678575, 0)
Scrollingstats.Size = UDim2.new(0, 389, 0, 204)
Scrollingstats.ScrollBarThickness = 10
Save.Name = "Save"
Save.Parent = statholder
Save.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
Save.BorderSizePixel = 0
Save.Position = UDim2.new(0.275943398, 0, 0.887755096, 0)
Save.Size = UDim2.new(0, 188, 0, 26)
Save.Font = Enum.Font.GothamBold
Save.Text = "Save as .txt"
Save.TextColor3 = Color3.new(1, 1, 1)
Save.TextSize = 14
Save.MouseButton1Down:Connect(function()
writestats = ""
for _,v in pairs(CMDStats) do
if v.T ~= 0 then
writestats = writestats.."\n".._.." "..v.T
end
end
writefile("CMD-X Stats "..math.random(1000)..".txt",tostring(writestats))
end)
function CreateStatLabel(cmd,times,today)
local sf2 = Scrollingstats
if #sf2:GetChildren() >= 2546 then
sf2:ClearAllChildren()
end
local alls2 = 0
for _,v in pairs(sf2:GetChildren()) do
if v then
alls2 = v.Size.Y.Offset + alls2
end
if not v then
alls2 = 0
end
end
local tl2 = Instance.new('TextLabel', sf2)
local il2 = Instance.new('Frame', tl2)
tl2.Name = cmd
tl2.ZIndex = 6
tl2.Text = cmd.." | "..times
tl2.Size = UDim2.new(0,322,0,50)
tl2.BackgroundTransparency = 1
tl2.BorderSizePixel = 0
tl2.Font = "SourceSansBold"
tl2.Position = UDim2.new(-1,0,0,alls2)
tl2.TextTransparency = 1
tl2.TextScaled = false
tl2.TextSize = 14
tl2.TextWrapped = true
tl2.TextXAlignment = "Left"
tl2.TextYAlignment = "Top"
il2.BackgroundTransparency = 1
il2.BorderSizePixel = 0
il2.Size = UDim2.new(0,12,1,0)
il2.Position = UDim2.new(0,316,0,0)
tl2.TextColor3 = Color3.fromRGB(255,255,255)
tl2.Size = UDim2.new(0,322,0,tl2.TextBounds.Y)
sf2.CanvasSize = UDim2.new(0,0,0,alls2+tl2.TextBounds.Y)
sf2.CanvasPosition = Vector2.new(0,sf2.CanvasPosition.Y+tl2.TextBounds.Y)
local size22 = sf2.CanvasSize.Y.Offset
tl2:TweenPosition(UDim2.new(0,3,0,alls2), 'In', 'Quint', 0.5)
tl2.TextTransparency = 0
end
---------------------------------------|
-- Functions: -------------------------|
function findplr(args)
if args == "me" then
return cmdlp
elseif args == "random" then
return cmdp:GetPlayers()[math.random(1,#cmdp:GetPlayers())]
elseif args == "new" then
local vAges = {}
for _,v in pairs(cmdp:GetPlayers()) do
if v.AccountAge < 30 and v ~= cmdlp then
vAges[#vAges+1] = v
end
end
return vAges[math.random(1,#vAges)]
elseif args == "old" then
local vAges = {}
for _,v in pairs(cmdp:GetPlayers()) do
if v.AccountAge > 30 and v ~= cmdlp then
vAges[#vAges+1] = v
end
end
return vAges[math.random(1,#vAges)]
elseif args == "bacon" then
local vAges = {}
for _,v in pairs(cmdp:GetPlayers()) do
if v.Character:FindFirstChild("Pal Hair") or v.Character:FindFirstChild("Kate Hair") and v ~= cmdlp then
vAges[#vAges+1] = v
end
end
return vAges[math.random(1,#vAges)]
elseif args == "friend" then
local vAges = {}
for _,v in pairs(cmdp:GetPlayers()) do
if v:IsFriendsWith(cmdlp.UserId) and v ~= cmdlp then
vAges[#vAges+1] = v
end
end
return vAges[math.random(1,#vAges)]
elseif args == "notfriend" then
local vAges = {}
for _,v in pairs(cmdp:GetPlayers()) do
if not v:IsFriendsWith(cmdlp.UserId) and v ~= cmdlp then
vAges[#vAges+1] = v
end
end
return vAges[math.random(1,#vAges)]
elseif args == "ally" then
local vAges = {}
for _,v in pairs(cmdp:GetPlayers()) do
if v.Team == cmdlp.Team and v ~= cmdlp then
vAges[#vAges+1] = v
end
end
return vAges[math.random(1,#vAges)]
elseif args == "enemy" then
local vAges = {}
for _,v in pairs(cmdp:GetPlayers()) do
if v.Team ~= cmdlp.Team then
vAges[#vAges+1] = v
end
end
return vAges[math.random(1,#vAges)]
elseif args == "near" then
local vAges = {}
for _,v in pairs(cmdp:GetPlayers()) do
if v ~= cmdlp then
local math = (v.Character:FindFirstChild("HumanoidRootPart").Position - cmdlp.Character.HumanoidRootPart.Position).magnitude
if math < 30 then
vAges[#vAges+1] = v
end
end
end
return vAges[math.random(1,#vAges)]
elseif args == "far" then
local vAges = {}
for _,v in pairs(cmdp:GetPlayers()) do
if v ~= cmdlp then
local math = (v.Character:FindFirstChild("HumanoidRootPart").Position - cmdlp.Character.HumanoidRootPart.Position).magnitude
if math > 30 then
vAges[#vAges+1] = v
end
end
end
return vAges[math.random(1,#vAges)]
else
for _,v in pairs(cmdp:GetPlayers()) do
if string.find(string.lower(v.Name),string.lower(args)) then
return v
end
end
end
end
function cmdnum(str)
return tonumber(str) ~= nil
end
function cmd15(plr)
if plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
return true
end
end
function cmd6(plr)
if plr.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
return true
end
end
function x(v)
if v then
for _,i in pairs(workspace:GetDescendants()) do
if i:IsA("BasePart") and not i.Parent:FindFirstChild("Humanoid") and not i.Parent.Parent:FindFirstChild("Humanoid") then
i.LocalTransparencyModifier = 0.5
end
end
else
for _,i in pairs(workspace:GetDescendants()) do
if i:IsA("BasePart") and not i.Parent:FindFirstChild("Humanoid") and not i.Parent.Parent:FindFirstChild("Humanoid") then
i.LocalTransparencyModifier = 0
end
end
end
end
logsholding2 = Instance.new("Frame", getParent)
xoutoflogs2 = Instance.new("TextButton", getParent)
logsscrollholder2 = Instance.new("Frame", getParent)
refereral2 = Instance.new("TextLabel", getParent)
splittinger2 = Instance.new("Frame", getParent)
Scrollinglogs2 = Instance.new("ScrollingFrame", getParent)
Save22 = Instance.new("TextBox", getParent)
logsholding2.Name = "logsholding2"
logsholding2.Parent = Unnamed
logsholding2.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
logsholding2.BorderSizePixel = 0
logsholding2.Position = UDim2.new(0.217357904, 0, 0.208845213, 0)
logsholding2.Size = UDim2.new(0, 424, 0, 294)
logsholding2.Visible = false
createDrag(logsholding2)
logsholding2.Active = true
xoutoflogs2.Name = "xoutoflogs2"
xoutoflogs2.Parent = logsholding2
xoutoflogs2.BackgroundColor3 = Color3.new(1, 1, 1)
xoutoflogs2.BackgroundTransparency = 1
xoutoflogs2.Position = UDim2.new(0.948113203, 0, 0, 0)
xoutoflogs2.Size = UDim2.new(0, 22, 0, 22)
xoutoflogs2.Font = Enum.Font.GothamBold
xoutoflogs2.Text = "X"
xoutoflogs2.TextColor3 = Color3.new(1, 1, 1)
xoutoflogs2.TextSize = 20
xoutoflogs2.MouseButton1Down:Connect(function()
logsholding2.Visible = false
end)
logsscrollholder2.Name = "logsscrollholder2"
logsscrollholder2.Parent = logsholding2
logsscrollholder2.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
logsscrollholder2.BorderSizePixel = 0
logsscrollholder2.Position = UDim2.new(0.0306603778, 0, 0.0748299286, 0)
logsscrollholder2.Size = UDim2.new(0, 397, 0, 232)
refereral2.Name = "refereral2"
refereral2.Parent = logsscrollholder2
refereral2.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
refereral2.BorderSizePixel = 0
refereral2.Size = UDim2.new(0, 397, 0, 20)
refereral2.Font = Enum.Font.Gotham
refereral2.Text = " Username | Message"
refereral2.TextColor3 = Color3.new(1, 1, 1)
refereral2.TextSize = 14
refereral2.TextXAlignment = Enum.TextXAlignment.Left
splittinger2.Name = "splittinger2"
splittinger2.Parent = logsscrollholder2
splittinger2.BackgroundColor3 = Color3.new(1, 1, 1)
splittinger2.BorderColor3 = Color3.new(1, 1, 1)
splittinger2.Position = UDim2.new(0.0100755664, 0, 0.0892857313, 0)
splittinger2.Size = UDim2.new(0, 389, 0, 0)
Scrollinglogs2.Name = "Scrollinglogs2"
Scrollinglogs2.Parent = logsscrollholder2
Scrollinglogs2.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
Scrollinglogs2.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
Scrollinglogs2.BorderSizePixel = 0
Scrollinglogs2.Position = UDim2.new(0.00986763742, 0, 0.102678575, 0)
Scrollinglogs2.Size = UDim2.new(0, 389, 0, 204)
Scrollinglogs2.ScrollBarThickness = 10
Save22.Name = "Save2"
Save22.Parent = logsholding2
Save22.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
Save22.BorderSizePixel = 0
Save22.Position = UDim2.new(0.275943398, 0, 0.887755096, 0)
Save22.Size = UDim2.new(0, 188, 0, 26)
Save22.Font = Enum.Font.GothamBold
Save22.TextScaled = true
Save22.Text = ""
Save22.TextColor3 = Color3.new(1, 1, 1)
Save22.TextSize = 14
Save22.TextScaled = true
Save22.PlaceholderText = "Type here..."
Save22.FocusLost:Connect(function()
require(cmdlp.PlayerScripts.ChatScript.ChatMain).MessagePosted:fire("SCHAT/console/type/"..Save22.Text)
end)
function CreateSCLabel(Prefix, Text)
local plr = cmdp:GetChildren()
local sf = Scrollinglogs2
if #sf:GetChildren() >= 2546 then
sf:ClearAllChildren()
end
local alls = 0
for _,v in pairs(sf:GetChildren()) do
if v then
alls = v.Size.Y.Offset + alls
end
if not v then
alls = 0
end
end
local tl = Instance.new('TextLabel', sf)
local il = Instance.new('Frame', tl)
tl.Name = Prefix
tl.ZIndex = 6
tl.Text = "["..Prefix.."] "..Text
tl.Size = UDim2.new(0,322,0,60)
tl.BackgroundTransparency = 1
tl.BorderSizePixel = 0
tl.Font = "SourceSansBold"
tl.Position = UDim2.new(-1,0,0,alls)
tl.TextTransparency = 1
tl.TextScaled = false
tl.TextSize = 14
tl.TextWrapped = true
tl.TextXAlignment = "Left"
tl.TextYAlignment = "Top"
il.BackgroundTransparency = 1
il.BorderSizePixel = 0
il.Size = UDim2.new(0,12,1,0)
il.Position = UDim2.new(0,316,0,0)
tl.TextColor3 = Color3.fromRGB(255,255,255)
tl.Size = UDim2.new(0,322,0,tl.TextBounds.Y)
sf.CanvasSize = UDim2.new(0,0,0,alls+tl.TextBounds.Y)
sf.CanvasPosition = Vector2.new(0,sf.CanvasPosition.Y+tl.TextBounds.Y)
local size2 = sf.CanvasSize.Y.Offset
game:GetService("TweenService"):Create(tl, TweenInfo.new(.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {Position = UDim2.new(0,3,0,alls)}):Play()
for i = 0,50 do
game:GetService("RunService").Heartbeat:Wait()
tl.TextTransparency = tl.TextTransparency - 0.05
end
tl.TextTransparency = 0
end
logsholding = Instance.new("Frame", getParent)
logsviewertitle = Instance.new("TextLabel", getParent)
xoutoflogs = Instance.new("TextButton", getParent)
logsscrollholder = Instance.new("Frame", getParent)
refereral = Instance.new("TextLabel", getParent)
splittinger = Instance.new("Frame", getParent)
Scrollinglogs = Instance.new("ScrollingFrame", getParent)
Save2 = Instance.new("TextButton", getParent)
logsholding.Name = "logsholding"
logsholding.Parent = Unnamed
logsholding.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
logsholding.BorderSizePixel = 0
logsholding.Position = UDim2.new(0.217357904, 0, 0.208845213, 0)
logsholding.Size = UDim2.new(0, 424, 0, 294)
logsholding.Visible = false
createDrag(logsholding)
logsholding.Active = true
logsviewertitle.Name = "logsviewertitle"
logsviewertitle.Parent = logsholding
logsviewertitle.BackgroundColor3 = Color3.new(1, 1, 1)
logsviewertitle.BackgroundTransparency = 1
logsviewertitle.Position = UDim2.new(0.264150947, 0, 0, 0)
logsviewertitle.Size = UDim2.new(0, 200, 0, 22)
logsviewertitle.Font = Enum.Font.GothamBold
logsviewertitle.Text = "CMD-X LOGS VIEWER"
logsviewertitle.TextColor3 = Color3.new(1, 1, 1)
logsviewertitle.TextSize = 14
xoutoflogs.Name = "xoutoflogs"
xoutoflogs.Parent = logsholding
xoutoflogs.BackgroundColor3 = Color3.new(1, 1, 1)
xoutoflogs.BackgroundTransparency = 1
xoutoflogs.Position = UDim2.new(0.948113203, 0, 0, 0)
xoutoflogs.Size = UDim2.new(0, 22, 0, 22)
xoutoflogs.Font = Enum.Font.GothamBold
xoutoflogs.Text = "X"
xoutoflogs.TextColor3 = Color3.new(1, 1, 1)
xoutoflogs.TextSize = 20
xoutoflogs.MouseButton1Down:Connect(function()
logsholding.Visible = false
end)
logsscrollholder.Name = "logsscrollholder"
logsscrollholder.Parent = logsholding
logsscrollholder.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
logsscrollholder.BorderSizePixel = 0
logsscrollholder.Position = UDim2.new(0.0306603778, 0, 0.0748299286, 0)
logsscrollholder.Size = UDim2.new(0, 397, 0, 232)
refereral.Name = "refereral"
refereral.Parent = logsscrollholder
refereral.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
refereral.BorderSizePixel = 0
refereral.Size = UDim2.new(0, 397, 0, 20)
refereral.Font = Enum.Font.Gotham
refereral.Text = " Username | Message"
refereral.TextColor3 = Color3.new(1, 1, 1)
refereral.TextSize = 14
refereral.TextXAlignment = Enum.TextXAlignment.Left
splittinger.Name = "splittinger"
splittinger.Parent = logsscrollholder
splittinger.BackgroundColor3 = Color3.new(1, 1, 1)
splittinger.BorderColor3 = Color3.new(1, 1, 1)
splittinger.Position = UDim2.new(0.0100755664, 0, 0.0892857313, 0)
splittinger.Size = UDim2.new(0, 389, 0, 0)
Scrollinglogs.Name = "Scrollinglogs"
Scrollinglogs.Parent = logsscrollholder
Scrollinglogs.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
Scrollinglogs.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
Scrollinglogs.BorderSizePixel = 0
Scrollinglogs.Position = UDim2.new(0.00986763742, 0, 0.102678575, 0)
Scrollinglogs.Size = UDim2.new(0, 389, 0, 204)
Scrollinglogs.ScrollBarThickness = 10
Save2.Name = "Save"
Save2.Parent = logsholding
Save2.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
Save2.BorderSizePixel = 0
Save2.Position = UDim2.new(0.275943398, 0, 0.887755096, 0)
Save2.Size = UDim2.new(0, 188, 0, 26)
Save2.Font = Enum.Font.GothamBold
Save2.Text = "Save as .txt"
Save2.TextColor3 = Color3.new(1, 1, 1)
Save2.TextSize = 14
Save2.MouseButton1Down:Connect(function()
writestats2 = "\n"
for _,v in pairs(Scrollinglogs:GetChildren()) do
writestats2 = writestats2.."\n"..v.Text
end
writefile("CMD-X Logs "..math.random(1000)..".txt",tostring(writestats2))
end)
function CreateLabel(Name, Text)
local plr = cmdp:GetChildren()
local sf = Scrollinglogs
if #sf:GetChildren() >= 2546 then
sf:ClearAllChildren()
end
local alls = 0
for _,v in pairs(sf:GetChildren()) do
if v then
alls = v.Size.Y.Offset + alls
end
if not v then
alls = 0
end
end
local tl = Instance.new('TextLabel', sf)
local il = Instance.new('Frame', tl)
tl.Name = Name
tl.ZIndex = 6
tl.Text = "["..Name.."] | "..Text
tl.Size = UDim2.new(0,322,0,60)
tl.BackgroundTransparency = 1
tl.BorderSizePixel = 0
tl.Font = "SourceSansBold"
tl.Position = UDim2.new(-1,0,0,alls)
tl.TextTransparency = 1
tl.TextScaled = false
tl.TextSize = 14
tl.TextWrapped = true
tl.TextXAlignment = "Left"
tl.TextYAlignment = "Top"
il.BackgroundTransparency = 1
il.BorderSizePixel = 0
il.Size = UDim2.new(0,12,1,0)
il.Position = UDim2.new(0,316,0,0)
tl.TextColor3 = Color3.fromRGB(255,255,255)
tl.Size = UDim2.new(0,322,0,tl.TextBounds.Y)
sf.CanvasSize = UDim2.new(0,0,0,alls+tl.TextBounds.Y)
sf.CanvasPosition = Vector2.new(0,sf.CanvasPosition.Y+tl.TextBounds.Y)
local size2 = sf.CanvasSize.Y.Offset
tl:TweenPosition(UDim2.new(0,3,0,alls), 'In', 'Quint', 0.5)
for i = 0,50 do
wait(0.05)
tl.TextTransparency = tl.TextTransparency - 0.05
end
tl.TextTransparency = 0
end
function CreateADLabel(name,rank)
local sf3 = Scrollingad
if #sf3:GetChildren() >= 2546 then
sf3:ClearAllChildren()
end
local alls3 = 0
for _,v in pairs(sf3:GetChildren()) do
if v then
alls3 = v.Size.Y.Offset + alls3
end
if not v then
alls3 = 0
end
end
local tl3 = Instance.new('TextLabel', sf3)
local il3 = Instance.new('Frame', tl3)
tl3.Name = name
tl3.ZIndex = 6
tl3.Text = name.." | "..rank
tl3.Size = UDim2.new(0,322,0,50)
tl3.BackgroundTransparency = 1
tl3.BorderSizePixel = 0
tl3.Font = "SourceSansBold"
tl3.Position = UDim2.new(-1,0,0,alls3)
tl3.TextTransparency = 1
tl3.TextScaled = false
tl3.TextSize = 14
tl3.TextWrapped = true
tl3.TextXAlignment = "Left"
tl3.TextYAlignment = "Top"
il3.BackgroundTransparency = 1
il3.BorderSizePixel = 0
il3.Size = UDim2.new(0,12,1,0)
il3.Position = UDim2.new(0,316,0,0)
tl3.TextColor3 = Color3.fromRGB(255,255,255)
tl3.Size = UDim2.new(0,322,0,tl3.TextBounds.Y)
sf3.CanvasSize = UDim2.new(0,0,0,alls3+tl3.TextBounds.Y)
sf3.CanvasPosition = Vector2.new(0,sf3.CanvasPosition.Y+tl3.TextBounds.Y)
local size33 = sf3.CanvasSize.Y.Offset
tl3:TweenPosition(UDim2.new(0,3,0,alls3), 'In', 'Quint', 0.5)
tl3.TextTransparency = 0
end
local CMDS = {}
CMDS.commands = {
["prefix"] = "Shows you the chat prefix.",
["promptnew"] = "Changes your prompt text to something else.",
["prefixnew"] = "Changes chat prefix.",
["hotkeyopen"] = "Changes your hotkey for opening the GUI.",
["hotkeyoutput"] = "Changes your hotkey for opening the output GUI.",
["hotkeyfocus"] = "Changes your hotkey for focusing on the cmdbar.",
["entercmdnew"] = "Adds a new command which runs when you first execute CMD-X.",
["entercmds"] = "Allows you to add entercmds.",
["entercmddel"] = "Deletes a command in the entercmds list.",
["entercmdsclr"] = "Clears the entercmds.",
["eightballpu"] = "Ask 8Ball a question publicly.",
["eightballpr"] = "Ask 8Ball a question privately.",
["friendjoin"] = "Joins your friends game.",
["support"] = "If you need support while using CMD-X use this command!",
["commands"] = "Shows this page.",
["advertise"] = "Help spread CMD-X by doing this cmd in game! (<3)",
["unadvertise"] = "()",
["version"] = "Shows version.",
["walkspeed"] = "Sets your characters walkspeed.",
["defaultwalkspeed"] = "()",
["jumppower"] = "Sets your characters jumppower.",
["defaultjumppower"] = "()",
["hipheight"] = "Sets your characters hipheight.",
["defaulthipheight"] = "()",
["gravity"] = "Sets your characters gravity.",
["defaultgravity"] = "()",
["bodypositionwalkspeed"] = "Modifies your characters bodyposition walkspeed.",
["halve"] = "Splits your character into two.",
["removehands"] = "Removes your characters hands.",
["removefeet"] = "Removes your characters feet.",
["removeleftleg"] = "Removes your left leg.",
["removerightleg"] = "Removes your right leg.",
["removeleftarm"] = "Removes your left arm.",
["removerightarm"] = "Removes your right arm.",
["removearms"] = "Removes your characters arms.",
["removelegs"] = "Removes your characters legs.",
["removelimbs"] = "Removes your characters limbs.",
["removeanim"] = "Removes your characters animations.",
["restoreanim"] = "Restores your characters animations.",
["resizehead"] = "Resizes your characters head.",
--["removeshirt"] = "Removes your characters shirt.",
--["removetshirt"] = "Removes your characters tshirt",
--["removepants"] = "Removes your characters pants.",
--["removeclothes"] = "Removes your character clothes.",
["removehatsmesh"] = "Removes your characters hat meshes.",
["removegearmesh"] = "Removes your current characters gear mesh.",
--["drophats"] = "Drops your characters hats on the map.",
["dropgears"] = "Drops your characters gears on the map.",
--["hatspam"] = "Spams your hats onto the map.",
--["unhatspam"] = "()",
["removeface"] = "Removes your characters face.",
["removehats"] = "Removes your characters hats.",
["rheadmesh"] = "Removes the mesh of your characters head.",
["equip"] = "Equips all gears in your characters backpack.",
["banlands"] = "Teleports player to banlands (NEED A HAT AND TOOL).",
["flip"] = "Allows your character to flip.",
["unflip"] = "Stops flip.",
["doubleflip"] = "Allows your character to double flip.",
["undoubleflip"] = "Stops doubleflip.",
["glue"] = "Sticks your character to the target.",
["unglue"] = "Unsticks your character from the target.",
["nugget"] = "Makes your character look like a nugget.",
["cartwheel"] = "Makes your character do a cartwheel.",
["uncartwheel"] = "Stops your character's cartwheel",
["seizure"] = "Makes your character have a seizure.",
["unseizure"] = "Stops your character's seizure.",
["fling"] = "Flings player.",
["invisiblefling"] = "Invisibly flings players.",
["freefling"] = "Flings players.",
["unfling"] = "Stops flinging.",
["cleanfling"] = "Flings players in an undetected way. (COLLISION ONLY)",
["lag"] = "Appears like your character is stuttering or lagging.",
["unlag"] = "()",
["annoy"] = "Annoys the player.",
["unannoy"] = "()",
["weaken"] = "Weakens your character.",
["strengthen"] = "Strengthens your character.",
["noresult"] = "Saved CMD NUM",
["unweak"] = "()",
["plague"] = "Starts a plague.",
["parts"] = "Lists parts.",
["bringunanchored"] = "Brings unachored parts (works best with .loop).",
["listunanchored"] = "Lists unanchored parts.",
["credits"] = "Lists credits for CMD-X.",
["animation"] = "Plays the AnimationID you state in num1 and speeds it up in num2. (R6 ONLY)",
["unanimation"] = "Stops all animations.",
["uninsane"] = "()",
["monstermash"] = "Monster mashes your character. (R6 ONLY)",
["ragdoll"] = "Stuns your character.",
["unragdoll"] = "()",
["animpack"] = "Loads the animation you state; toy/ pirate/ knight/ astronaut/ vampire/ robot/ levitation/ bubbly/ werewolf/ stylish/ mage/ cartoony/ zombie/ superhero/ ninja/ elder/ old. (R15 ONLY)",
["spin"] = "Spins your character around like a beyblade.",
["unspin"] = "()",
["hatspin"] = "Spins your characters hats around your head.",
["unhatspin"] = "()",
["facefuck"] = "Sits your character in front of their face to create the illusion of facefucking.",
["unfacefuck"] = "()",
["facefuckanim"] = "Places your character in front of their face with an animation to create the illusion of facefucking.",
["unfacefuckanim"] = "()",
["piggyback"] = "Sits your character behind their head to create the illusion of a piggy back.",
["unpiggyback"] = "()",
["fuck"] = "Rapes player you stated using an animation.",
["unfuck"] = "()",
["follow"] = "Follows player you stated at a safe distance.",
["unfollow"] = "()",
["oldroblox"] = "Makes your game look like old roblox.",
["savegame"] = "Saves the current game instance to your workspace folder. (SYNAPSE ONLY)",
["btools"] = "Gives you building tools. (CLIENT SIDED)",
["fex"] = "Gives you advanced building tools. (CLIENT SIDED) (GUI)",
["remotespy"] = "Opens remote spy. (GUI)",
["badger"] = "Opens badger V2. (GUI) (<3)",
["explorer"] = "Spies workspace. (GUI)",
["removeeffects"] = "Removes all effects in the game. (CLIENT SIDED)",
["removeseats"] = "Removes all seats in game. (CLIENT SIDED)",
["removelocalscripts"] = "Removes all local scripts",
["xray"] = "Changes all items to 0.5 Transparency.",
["unxray"] = "()",
["lockws"] = "Locks all of workspace.",
["unlockws"] = "Unlocks all of workspace.",
["day"] = "Turns the skybox time to day (18:00). (CLIENT SIDED)",
["night"] = "Turns the skybox time to night (00:00). (CLIENT SIDED)",
["removesky"] = "Removes the games skybox. (CLIENT SIDED)",
["restorelighting"] = "Restores games lighting. (CLIENT SIDED)",
["restorecamera"] = "Restores your characters camera.",
["unscramble"] = "Unscrambles games variable names.",
["removeinviswalls"] = "Removes invisible walls in game. (CLIENT SIDED)",
["math"] = "-",
["hidechat"] = "Turns off chat.",
["showchat"] = "Turns on chat.",
["switchteam"] = "Switches your team to str if it exists.",
["ping"] = "Shows your ping.",
["toolfps"] = "Shows your FPS in a tooltip.",
["untoolfps"] = "()",
["fuckoff"] = "Closes the GUI.",
["messagebox"] = "Makes a message box appear containing the string you entered. (SYNAPSE ONLY)",
["filtering"] = "Checks if a game is filtered or not.",
["gameid"] = "Lets you know the GameID of the game you are in.",
["output"] = "Tests output.",
["enableshiftlock"] = "If the developer of the game your playing on has disabled Shift Lock this will enable it for your character.",
["maxcamunlock"] = "Unlocks your characters max zooming distance.",
["position"] = "Sets your characters position to output.",
["audiolog"] = "Logs what a user is playing.",
["cambobble"] = "Bobbles camera when you walk.",
["uncambobble"] = "()",
["grapple"] = "Grapples to your mouse.",
["ungrapple"] = "()",
["remind"] = "Reminds you of str when num is done counting.",
["step"] = "Allows you to teleport up a building.",
["unstep"] = "()",
["antiafk"] = "Prevents you from idling.",
["nosit"] = "Stops your character from being sat down.",
["yessit"] = "()",
["nostun"] = "Stops your character from being PlatformStood.",
["yesstun"] = "()",
["badges"] = "Gets all badges if there are any named (Default: BadgeAwarder).",
["bunnyhop"] = "Bunny hops your character.",
["unbunnyhop"] = "()",
["invisible"] = "Makes your character invisible.",
["sit"] = "Sits your character.",
["sitwalk"] = "Sits your character but allows your character to move around.",
["freeze"] = "Freezes your character.",
["thaw"] = "()",
["goto"] = "Teleports your character to the player.",
["walkto"] = "Walks your character to the player.",
["unwalkto"] = "()",
["walktopos"] = "Walks your character to the position.",
["walktopart"] = "Walks your character to the part.",
["walktoclass"] = "Walks your character to the class.",
["refresh"] = "Respawns your character on the location of entering this command.",
["reset"] = "Resets your character.",
["savepos"] = "Saves your characters position.",
["loadpos"] = "()",
["platform"] = "Allows your character to walk on an invisible platform.",
["unplatform"] = "()",
["clicktp"] = "Press CTRL to teleport your character to your cursor.",
["infjump"] = "Allows you to infinitely go higher by pressing space.",
["uninfjump"] = "()",
["fly"] = "Allows your character to fly.",
["vehiclefly"] = "Allows your character to fly around in vehicles.",
["unfly"] = "()",
["flyspeed"] = "Changes fly speed.",
["rejoin"] = "Rejoins the game.",
["game"] = "Joins the GameID you stated in num.",
["reach"] = "Edits your tools size value.",
["boxreach"] = "Edits your tools size value in a box formation.",
["unreach"] = "()",
["noclip"] = "Allows your character to walk through anything",
["light"] = "Gives your character a light. (CLIENT SIDED)",
["unlight"] = "()",
["esp"] = "Shows where all the players are on your screen.",
["unesp"] = "()",
["aimbot"] = "Aims at the closest player to you (Left Ctrl to toggle).",
["unaimbot"] = "()",
["spectate"] = "Switches your camera view to the player you stated.",
["unspectate"] = "()",
["resetsaves"] = "Removes your current saves.",
["savesaves"] = "Saves a backup of your current saves.",
["ageprivate"] = "Says stated users Account Age privately.",
["agepublic"] = "Says stated users Account Age publicly.",
["idprivate"] = "Says stated users ID privately.",
["idpublic"] = "Says stated users ID publicly.",
["vrprivate"] = "Says stated users Virtual Reality System privately.",
["vrpublic"] = "Says stated users Virtual Reality System publicly.",
["nazispam"] = "Spams nazi signs in the chat.",
["unnazispam"] = "()",
["spam"] = "Spams the text you entered.",
["unspam"] = "()",
["pmspam"] = "Spams the text you entered in someones PM.",
["unpmspam"] = "()",
["spamspeed"] = "Changes the speed of the spam.",
["dicepublic"] = "Rolls a dice publicly.",
["diceprivate"] = "Rolls a dice privately.",
["numberpublic"] = "Calls a random number you stated between 2 numbers publicly.",
["numberprivate"] = "Calls a random number you stated between 2 numbers privately.",
["loadcustoms"] = "Lists custom scripts.",
["plugin"] = "Loads plugin that you stated.",
["find"] = "Locates where your stated user is using the ESP command.",
["unfind"] = "()",
["clickdelete"] = "Deletes any part you click on.",
["unclickdelete"] = "()",
["logs"] = "Logs all chats including whispers in a GUI.",
["test"] = "Old ESP test. (WARNING: Will literally lag your game please don't use this lol)",
["testa"] = "DHBaby morph remover.",
["time"] = "Lists the current time of this timezone.",
["removeforces"] = "Removes forces from your character.",
["audiologger"] = "Logs all audios it finds from players in a loop.",
["audiologgersave"] = "Saves all logged audios from audiologger.",
["antilag"] = "Attempts to minimize lag as much as possible best works with Graphics set to 1.",
["clear"] = "Deletes all hats and gears dropped into the workspace.",
["removeterrain"] = "Removes all terrain.",
["outputlarger"] = "Makes an output-larger.",
["compliment"] = "Compliments player",
["roast"] = "Roasts player",
["singinfo"] = "Lists how to make your own song compatible with sing command.",
["sing"] = "Makes your character sing a song (Presets: genocide/animethighs/evilfantasy/$harkattack/introversion/lucy/tyler/methhead/superfuntime/haha/diamonds)",
["deletepos"] = "Deletes specified waypoint.",
["clearpos"] = "Clears all waypoints.",
["gotopos"] = "Modifies how and where you tp to the character.",
["autokey"] = "Auto key presses the key you enter (SYNAPSE ONLY).",
["unautokey"] = "()",
["swimwalk"] = "Allows you to swim on land.",
["instances"] = "Shows you how many instances are in the game.",
["plugins"] = "Shows plugin GUI so you can add plugins to CMD-X.",
["loadcustomsclr"] = "Clears all loadcustoms.",
["iq"] = "Shows players IQ (RANDOM).",
["players"] = "Lists players in your game.",
["freereach"] = "Allows you to control reach freely.",
["jobid"] = "Shows the JobID of your current game useful for rejoining later on.",
["massage"] = "Shows all players ages.",
["gearhat"] = "Makes your gears into hats.",
["bypass"] = "Enables in-chat bypass",
["unbypass"] = "Disables in-chat bypass",
["emote"] = "Plays the emote you enter by name (R15 ONLY).",
["spotify"] = "Loads spotify presence.",
["chatframe"] = "Forces player to chat something so you can frame them (CLIENT SIDED).",
["forcebubblechat"] = "Forces bubble chat to appear for players chatting (CLIENT SIDED).",
["unforcebubblechat"] = "()",
["itemesp"] = "Creates ESP's for in-game items as best as possible.",
["unitemesp"] = "()",
["setdiscord"] = "Put your discord name in here for use of the command saydiscord.",
["saydiscord"] = "Says your discord name in chat.",
["removecustombodyparts"] = "Removes custom body parts set by games.",
["insane"] = "Makes your character spas out. (R6 ONLY)",
["hotkeyaimbot"] = "Changes your hotkey for activating aimbot.",
["hotkeyesp"] = "Changes your hotkey for activating ESP.",
["admindetect"] = "Detects admins in the game (If the game has HDAdmin do ;admins before running the command)(SUPPORTS: HD/KOHLS)",
["streamermode"] = "Hides all names in games (Suitable for streamers or people showcasing CMD-X <3).",
["permflyspeed"] = "Fly speed is set to this every time you fly.",
["loopgoto"] = "Loop teleports to the player.",
["unloopgoto"] = "()",
["dupegears"] = "Dupes tools until it reaches the set amount.",
["permwalkspeed"] = "Walk speed is set to this every time you use walkspeed.",
["permjumppower"] = "Jump power is set to this every time you use jumppower.",
["permhipheight"] = "Hip height is set to this every time you use hipheight.",
["permgravity"] = "Gravity is set to this every time you use gravity.",
["gotobp"] = "Teleports to a player while bypassing any anti-teleport.",
["mute"] = "Mutes players sounds in a loop including radios.",
["unmute"] = "()",
["vgoto"] = "Teleports to a player while in a vehicle.",
["admin"] = "Allows a player to run commands on you (RE-EXECUTE AFTER RUNNING).",
["unadmin"] = "() (RE-EXECUTE AFTER RUNNING)",
["admins"] = "Lists all admins.",
["adminclr"] = "Removes all admins (RE-EXECUTE AFTER RUNNING).",
["hotkeynew"] = "Adds a new hotkey to the list of hotkeys that are activated when you press the keybind.",
["hotkeys"] = "Allows you to add hotkeys.",
["hotkeydel"] = "Deletes a hotkey in the hotkeys list.",
["hotkeysclr"] = "Clears the hotkeys.",
["changestyle"] = "Changes the style of your CMD-X refer to csinfo for more info on this command.",
["csinfo"] = "Lists info about changestyle/cs.",
["chat"] = "Forces you to chat whatever you put in str (Bypasses any mute).",
["curvetools"] = "Curves your tools.",
["spiraltools"] = "Spirals your tools.",
["toggleconfly"] = "Toggles if your fly starts again after a reset.",
["lagchat"] = "Lags chat using _'s.",
["trollchat"] = "Picks a random trolly/ annoying chat.",
["unbodypositionwalkspeed"] = "()bpws",
["removegears"] = "Removes all your tools.",
["unclicktp"] = "()",
["unswimwalk"] = "()",
["unlagchat"] = "()",
["playerstalker"] = "Loads PlayerStalker GUI.",
["clip"] = "()noclip",
["orbit"] = "Orbits a player.",
["closeorbit"] = "Close orbits a player.",
["unorbit"] = "()",
["suggestions"] = "Turns CMD suggestions on or off.",
["clientbring"] = "Brings user to you (CLIENT SIDED).",
["unclientbring"] = "()",
["bring"] = "Brings the player to you (NEED A HAT AND TOOL).",
["kill"] = "Kills the player (NEED A HAT AND TOOL).",
["give"] = "Gives the player your tool.",
["using"] = "Specifies that you are using CMD-X. <3",
["playercases"] = "Lists player cases you can use in your second argument.",
["coronavirus"] = "Provides information about coronavirus using an API.",
["joindateprivate"] = "Shows players join date privately.",
["autoobby"] = "Allows you to complete an obby without pressing spacebar.",
["unautoobby"] = "()",
["joindatepublic"] = "Shows players join date publicly.",
["ppsize"] = "Shows players PP size. (RANDOM)",
["gaysize"] = "Shows how gay a player is. (RANDOM)",
["matchmake"] = "Shows how much of a match 2 players are. (RANDOM)",
["height"] = "Shows how tall a player is. (RANDOM)",
["randomchat"] = "Chats a randomly generated message.",
["grabtools"] = "Grabs tools that enter workspace.",
["ungrabtools"] = "()",
["earrape"] = "Plays all sounds in workspace.",
["respectfiltering"] = "Checks if respect filtering is enabled or disabled.",
["removefog"] = "Removes fog.",
["clientfreeze"] = "Freezes player on client.",
["unclientfreeze"] = "()",
["refreshdead"] = "Refreshes your character when death occurs.",
["unrefreshdead"] = "()",
["god"] = "Gods your character (wont work on games that use :LoadCharacter()).",
["avatar"] = "Shows UserId's avatar.",
["statistics"] = "Shows your most used commands.",
["grabip"] = "Grabs a fake IP designed to scare the player (RANDOM).",
["enablereset"] = "Force enables the reset button incase a game has disabled it.",
["disablereset"] = "Disables the reset button.",
["massjoindate"] = "Shows all players joindates.",
["loop"] = "Loops command with arguments.",
["unloop"] = "()",
["savetools"] = "Saves tools.",
["loadtools"] = "Loads tools.",
["hotkeyfly"] = "Saves a toggle for fly.",
["hotkeyxray"] = "Saves a toggle for x-ray",
["ungod"] = "()",
["animsync"] = "Syncs anim with player if caller is /e or .e",
["unanimsync"] = "()",
["clicktphotkey"] = "Changes the hotkey for clicktp.",
["permspamspeed"] = "Changes the perm spam speed.",
["massid"] = "Shows all players IDs.",
["fps"] = "Shows your FPS.",
["whisperlogs"] = "Logs any whispers specifically.",
["playerlogs"] = "Logs messages by player specifically.",
["rejoindiff"] = "Rejoins but takes you to a differnt server (Server Hopper).",
["antikick"] = "Stops you from being kicked.",
["servers"] = "Lists servers.",
["streamsnipe"] = "Streamsnipes a user.",
["listentercmds"] = "Lists enter cmds.",
["listhotkeys"] = "Lists hotkeys.",
["gametime"] = "Shows your current elapsed time in game.",
["hotkeynoclip"] = "Adds a hotkey for noclip.",
["enabledrops"] = "Enables tools dropping features.",
["disabledrops"] = "Disables tools dropping features.",
["novoid"] = "Stops you from being voided.",
["yesvoid"] = "()",
["sentinelexplorer"] = "Opens sentinel dex.",
["truesight"] = "Shows invisible objects.",
["untruesight"] = "()",
["disableplayer"] = "Removes a player from your client.",
["enableplayer"] = "Brings back a player on your client.",
["gotopart"] = "Teleports your character to the part.",
["clientbringpart"] = "Brings part to you.",
["clientdeletepart"] = "Deletes part.",
["copyoutput"] = "Copies output.",
["copypath"] = "Copies parts path.",
["outputbind"] = "Changes output bind.",
["boobsize"] = "Tells you the size of players boobs.",
["clearoutput"] = "Cleared output.",
["gotospawn"] = "Teleports you to a spawn point.",
["clearwaves"] = "Clears waves on your client.",
["calmwaves"] = "Calms waves on your client.",
["fov"] = "Changes FOV.",
["mousesensitivity"] = "Changes mouse sensitivity.",
["volume"] = "Changes Master Volume.",
["graphics"] = "Changes Master Graphics.",
["freecam"] = "Activates freecam.",
["unfreecam"] = "()",
["reload"] = "Reloads CMD-X.",
["backpack"] = "Lists tools in players backpack.",
["partesp"] = "Shows all items that have the name or the class of what you enter.",
["unpartesp"] = "()",
["console"] = "Prints to console.",
["animspeed"] = "Speeds up animations (works best with .loop).",
["noprompt"] = "Stops games from pushing purchase prompts.",
["yesprompt"] = "()",
["rappu"] = "Shows players RAP publicly.",
["rappr"] = "Shows players RAP privately.",
["removeunanchored"] = "Destroys unanchored parts (works best with .loop).",
["retard"] = ".juicewrld but better",
["unretard"] = "()",
["nocommands"] = "Disables all commands.",
["yescommands"] = "()",
["backpackplay"] = "Backpack plays your sound.",
["unbackpackplay"] = "()",
["weed"] = "420.",
["noguis"] = "Disables player GUIs.",
["yesguis"] = "()",
["guitruesight"] = "Shows you hidden GUIs.",
["unguitruesight"] = "()",
["freecamspeed"] = "Changes speed of freecam.",
["permfreecamspeed"] = "Changes perm speed of freecam.",
["nobillboardguis"] = "Deletes all billboard guis.",
["yesbillboardguis"] = "()",
["grippos"] = "Changes tools grip.",
["shiftwalkspeed"] = "If pressing shift your walkspeed will change.",
["unshiftwalkspeed"] = "()",
["animationsteal"] = "Copies a players animations.",
["unanimationsteal"] = "()",
["nohurtoverlay"] = "Turns off hurt overlay/animation.",
["yeshurtoverlay"] = "()",
["gotofreecam"] = "Teleports your character to freecams current position.",
["compilecommand"] = "Compiles a command in table form.",
["restorelocalscripts"] = "Restores local scripts.",
["newaudios"] = "Lists newest audio IDs uploaded to roblox.",
["removecustomnametag"] = "Removes custom nametag if the game gives it to you.",
["stubby"] = "Makes you stubby.",
["timedcmd"] = "Runs a command after the given amount of time.",
["depth"] = "Changes your depth of field.",
["undepth"] = "()",
["cinematic"] = "Enables cinematic mode.",
["uncinematic"] = "()",
["atmosphere"] = "Changes atmosphere of your game.",
["unatmosphere"] = "()",
["removefx"] = "Removes all FX.",
["chaos"] = "Executes a random command every 5 seconds.",
["unchaos"] = "()",
["funfact"] = "Grabs a funfact from an API.",
["antifling"] = "Nocollides other players to avoid being flung in any way.",
["cmdinfo"] = "Lists command info seperately.",
["simulationradius"] = "Changes simulation radius (MAY BREAK SCHAT AND SUSERS).",
["grabunanchored"] = "Updates unanchored parts.",
["clearunanchored"] = "()",
["spinunanchored"] = "Spins unanchored parts around your character.",
["unspinunanchored"] = "()",
["randomcmd"] = "Executes a random command.",
["replayintro"] = "Replays intro.",
["masscmd"] = "Executes multiple commands at once.",
["mass"] = "Loops player arguments on command.",
["touchinterests"] = "Fires touch interests.",
["singletouchinterest"] = "Fires touch interest.",
["clickdetectors"] = "Fires click detectors.",
["singleclickdetector"] = "Fires click detector.",
["gotoclass"] = "Teleports player to a part in that class.",
["playingaudios"] = "Tells you the currently playing audios.",
["testaudio"] = "Tests audio out for you.",
["stopdupegears"] = "()",
["stopsing"] = "()",
["tracers"] = "Traces players using Drawing API.",
["untracers"] = "()",
["directjoin"] = "Directly joins the GUID in question.",
["irltime"] = "Sets the game time to your irl time.",
["tabs"] = "Turns tabs on or off.",
["changetab"] = "Changes a tab from 1-9.",
["debugging"] = "Allows error showing on commands.",
["runafter"] = "Makes CMD-X automatically re-execute on rejoin.",
["removeinchar"] = "Removes whatever you state from character.",
["unsitwalk"] = "()",
["setbackunanchored"] = "Sets back all unanchored parts to original positions.",
["cutmuteloop"] = "Cuts your mute loops.",
["supermute"] = "Mutes everyone and the game.",
["unsupermute"] = "()",
["robloxqtversion"] = "Shows Roblox Studios current version.",
["teleportstring"] = "Sends a formatted version of your current teleport info.",
["copyoutputlarger"] = "Copies current output larger.",
["friend"] = "Sends friend request to player in your lobby.",
["autorejoin"] = "Turns auto rejoin on or off.",
["onjoin"] = "Runs a command on player join.",
["unonjoin"] = "()",
["onleave"] = "Runs a command on player leave.",
["unonleave"] = "()",
["freegotobp"] = "Freely bypass teleports to the set position.",
["gotobppart"] = "Bypass telports to part.",
["gotobpspawn"] = "Bypass telports to spawn.",
["freegoto"] = "Freely teleports to the set position.",
["billboardmaxdistance"] = "Sets all billboards distance to the max.",
["unbillboardmaxdistance"] = "()",
["billboardtruesight"] = "Turns on billboard truesight.",
["unbillboardtruesight"] = "()",
["surfaceguitruesight"] = "Turns on surface gui truesight.",
["unsurfaceguitruesight"] = "()",
["clickdetectormaxdistance"] = "Sets clickdetector distance to the max.",
["unclickdetectormaxdistance"] = "()",
["gotobpclass"] = "Bypass teleports to class.",
--["hatgiverspam"] = "Spams hat givers and drops hats if there are any.",
["fakelag"] = "Simulates fake network lag.",
["unfakelag"] = "()",
["hitboxes"] = "Shows you all hitboxes.",
["unhitboxes"] = "()",
["animdata"] = "Shows you information about your current animations.",
["unanimdata"] = "()",
["anticheat"] = "Sets anticheat variables on or off.",
["anticheats"] = "Lists anticheat variables.",
["unfriend"] = "()",
["cutforceplayloop"] = "Cuts forceplay loops that are running.",
["freecamgoto"] = "Teleports freecam to a player.",
["vnoclip"] = "Turns on vehicle noclip.",
["vclip"] = "()",
["freecamfreegoto"] = "Teleports freecam to pos.",
["freecamgotopart"] = "Teleports freecam to part.",
["audiotp"] = "Teleports audio pos to num.",
["memory"] = "Shows you your current memory usage.",
["uncleanfling"] = "()",
["loadbpppos"] = "Bypass teleports to waypoint.",
["notoolanim"] = "Removes tool animations.",
["play"] = "Plays audios in all boomboxes.",
["attachmenttruesight"] = "Shows all attachments.",
["unattachmenttruesight"] = "()",
["autoplatform"] = "Automatically creates a platform when you walk off a part.",
["unautoplatform"] = "()",
["quickexit"] = "Quickly leaves the game.",
["vfreegoto"] = "Teleports vehicle freely.",
["vgotopart"] = "Teleports vehicle to part.",
["vgotoclass"] = "Teleports vehicle to class.",
["vloadpos"] = "Teleports vehicle to waypoint.",
["robloxversion"] = "Shows you the version of Roblox you are on.",
["freecamloadpos"] = "Teleports freecam to waypoint.",
["rejoinrefresh"] = "Rejoins and places you back at the spot you were at.",
["forceplay"] = "Loop plays plrs audio to stop muting.",
["unforceplay"] = "()",
["migratesaves"] = "Migrates save files/backups to CMD-X.lua.",
["resetguipos"] = "Resets GUI position.",
["properties"] = "Lists all properties of class in Roblox using an API.",
["classes"] = "Lists all classes in Roblox using an API.",
["loopfling"] = "Loop flings player.",
["unloopfling"] = "()",
["nomouse"] = "Disables mouse icon.",
["yesmouse"] = "()",
["futurelighting"] = "Changes lighting to future.",
["unfuturelighting"] = "()",
["removelefthand"] = "Removes left hand.",
["removerighthand"] = "Removes right hand.",
["removeleftfoot"] = "Removes left foot.",
["removerightfoot"] = "Removes right floor.",
["removerightlowerarm"] = "Removes right lower arm.",
["removeleftlowerarm"] = "Removes left lower arm.",
["removerightlowerleg"] = "Removes right lower leg.",
["removeleftlowerleg"] = "Removes left lower leg.",
["nonick"] = "Blocks nicknames and shows real names.",
["yesnick"] = "()",
["appearanceidpublic"] = "Publicly shows the character appearance id of player.",
["appearanceidprivate"] = "Privately shows the character appearance id of player.",
["nilgoto"] = "Teleports to player while in nil.",
["nilfreegoto"] = "Freely teleports to position while in nil.",
["nilgotopart"] = "Teleports to part while in nil.",
["nilgotoclass"] = "Teleports to class while in nil.",
["removeinworkspace"] = "Removes part in workspace.",
["listnil"] = "Lists nil instances.",
["removeinnil"] = "Removes part in nil instances.",
["noclaim"] = "Stops you from being network claimed.",
["yesclaim"] = "()",
["destroyheight"] = "Sets fallen parts destroy height.",
["nameesp"] = "Runs ESP with only names.",
["unnameesp"] = "()",
["spectatepart"] = "Views part.",
["rejoinexecute"] = "Rejoins and re-executes CMD-X once.",
["multispam"] = "Spams strings seperated by commas.",
["logspam"] = "Spams any chat loggers without showing in chat.",
["unlogspam"] = "()",
["logchat"] = "Sends message to any chat loggers without showing in chat.",
["removeroot"] = "Removes characters HumanoidRootPart.",
["rejoinrefreshexecute"] = "Rejoins and places your character in the original spot and executes.",
["nofall"] = "Prevents you from ragdolling.",
["yesfall"] = "()",
["nofallbp"] = "Prevents you from ragdolling.",
["yesfallbp"] = "()",
["fixbubblechat"] = "Fixes the bubblechat being cut off.",
["unfixbubblechat"] = "()",
["darkbubbles"] = "Makes bubblechat dark themed.",
["undarkbubbles"] = "()",
["combo"] = "Runs a chain of commands together.",
["combos"] = "Lists combos.",
["combonew"] = "Creates a new combo.",
["combodel"] = "Removes a combo.",
["combosclr"] = "Clears all combos.",
["hd"] = "HD Admin hook.",
["clearchat"] = "Clears chat using a long string.",
["colourbubbles"] = "Gives you coloured chat bubbles to your custom.",
["uncolourbubbles"] = "()",
["kohls"] = "Kohls Admin hook.",
["creatoridpublic"] = "Publicly shows the creatorid of the game.",
["creatoridprivate"] = "Privately showws the creatorid of the game.",
["creatorid"] = "Sets your ID's to the creators.",
["transparentbubbles"] = "Gives you transparent chat bubbles.",
["untransparentbubbles"] = "()",
["disableshiftlock"] = "()",
["robloxfromdiscordid"] = "Gets roblox account from discord id.",
["nilchatcmds"] = "Makes CMD-X chat commands not appear on chat.",
["unnilchatcmds"] = "()",
["thirdperson"] = "Sets your camera to third person.",
["firstperson"] = "Sets your camera to first person.",
["xraycamera"] = "Allows your camera to look through walls.",
["unxraycamera"] = "()",
["randomizechat"] = "Randomizes your chat on message posting.",
["unrandomizechat"] = "()",
["retardchat"] = "Retards your chat on message posting.",
["unretardchat"] = "()",
["scriptusers"] = "Shows people currently using CMD-X.",
["noshow"] = "Allows you to appear off .scriptusers.",
["reverse"] = "Allows you to reverse your HumanoidRootParts CFrame.",
["maxslopeangle"] = "Changes your MaxSlopeAngle.",
["permmaxslopeangle"] = "Permanently changes your MaxSlopeAngle.",
["defaultmaxslopeangle"] = "Sets your MaxSlopeAngle to default.",
["notouch"] = "Stops touch interests from being fired.",
["yestouch"] = "()",
["badgesnipe"] = "Snipes a users game by badges earnt.",
["viewserver"] = "Allows you to see players in another server.",
["chatprivacypublic"] = "Says a users chat privacy mode publicly.",
["chatprivacyprivate"] = "Says a users chat privacy mode privately.",
["chatprivacy"] = "Sets your chat privacy.",
["masschatprivacy"] = "Says everyones chat privacy.",
["hotkeyplatformflytoggle"] = "Hotkey for pfly toggle.",
["hotkeyplatformflyhold"] = "Hotkey for pfly hold.",
["hotkeysitflytoggle"] = "Hotkey for sfly toggle.",
["hotkeysitflyhold"] = "Hotkey for sfly hold.",
["unplatformfly"] = "()",
["platformfly"] = "Allows you to fly with a platform.",
["unsitfly"] = "()",
["sitfly"] = "Allows you to fly while sitting.",
["hotkeyflyhold"] = "Fly, but only when held.",
["cameraoffset"] = "Changes the offset of your camera.",
["norotate"] = "Stops rotation of the body.",
["yesrotate"] = "()",
["outofbody"] = "Allows you to walk around like a normal character, out of body.",
["drawingnew"] = "Uses a lua drawing library instead of your exploits.",
["drawingold"] = "Uses your exploits drawing api if it has one.",
["nomessages"] = "Stops messages from being sent (HD,Instances).",
["yesmessages"] = "()",
["removecmd"] = "Removes command from your CMD-X temporarily.",
["spoofgrouprole"] = "Spoofs group role (only works on client scripts).",
["unspoofgrouprole"] = "()",
["nogameteleport"] = "Stops you from teleporting to other games (only works on client scripts).",
["yesgameteleport"] = "()",
["parttracers"] = "Enables tracers on parts.",
["unparttracers"] = "()",
["lookat"] = "Makes your character stare at player.",
["unlookat"] = "()",
["spoofclientid"] = "Spoofs your clientid to whatever you want.",
["randomspoofclientid"] = "Spoofs your clientid to a random set.",
["unspoofclientid"] = "()",
["cleanhats"] = "Cleans up all hats in workspace.",
["smartchat"] = "Punctuates your chat messages.",
["unsmartchat"] = "()",
["xboxtagpublic"] = "Shows you the users xbox gamertag if they are using xbox publicly.",
["xboxtagprivate"] = "Shows you the users xbox gamertag if they are using xbox privately.",
["massxboxtag"] = "Shows everyones xbox gamertag if they are using xbox.",
["followedintopublic"] = "Shows if user followed someone into game publicly.",
["followedintoprivate"] = "Shows if user followed someone into game privately.",
["massfollowedinto"] = "Shows everyones user that followed someone into game.",
["notifyfollowed"] = "Notifies you if someone follows you into game through your profile.",
["unnotifyfollowed"] = "()",
["replicateanim"] = "Replicates animation id and plays it. (CREDIT: RIPTXDE)",
["replicateanimspeed"] = "Changes speed of replicated animation.",
["spooffps"] = "Spoofs your fps to whatever you want.",
["spoofping"] = "Spoofs your ping to whatever you want.",
["spoofmemory"] = "Spoofs your memory to whatever you want.",
["antiwindowafk"] = "Stops the game from AFKing you when you unfocus your window.",
["unantiwindowafk"] = "()",
["clearcharacter"] = "Clears your character appearance.",
}
CMDS.usage = {
["promptnew"] = "(str/name)",
["prefixnew"] = "(str)",
["hotkeyopen"] = "(str)",
["hotkeyoutput"] = "(str)",
["hotkeyfocus"] = "(str)",
["entercmdnew"] = "(str)",
["entercmddel"] = "(str)",
["eightballpu"] = "(str)",
["eightballpr"] = "(str)",
["friendjoin"] = "(full plr name)",
["support"] = "(CB / COPY)",
["walkspeed"] = "(num)",
["jumppower"] = "(num)",
["hipheight"] = "(num)",
["gravity"] = "(num)",
["bodypositionwalkspeed"] = "(num)",
["banlands"] = "(plr)",
["glue"] = "(plr)",
["fling"] = "(plr)",
["annoy"] = "(plr)",
["plague"] = "(name)",
["parts"] = "(name)",
["animation"] = "(num1) (num2)",
["animpack"] = "(animation)",
["spin"] = "(num)",
["facefuck"] = "(plr)",
["facefuckanim"] = "(plr)",
["piggyback"] = "(plr)",
["fuck"] = "(plr)",
["follow"] = "(plr)",
["math"] = "(num) (+ / - / / / *) (num)",
["switchteam"] = "(str)",
["messagebox"] = "(str)",
["output"] = "(str)",
["position"] = "(CB / COPY)",
["audiolog"] = "(plr) (CB / COPY)",
["remind"] = "(num) (h / m / s) (str)",
["goto"] = "(plr)",
["walkto"] = "(plr)",
["walktopos"] = "(x | y | z)",
["walktopart"] = "(part)",
["walktoclass"] = "(class)",
["savepos"] = "(str)",
["loadpos"] = "(str)",
["flyspeed"] = "(num)",
["game"] = "(num)",
["reach"] = "(num)",
["boxreach"] = "(num)",
["light"] = "(num)",
["aimbot"] = "(Team / FFA)",
["whitelist"] = "(plr)",
["unwhitelist"] = "(plr)",
["spectate"] = "(plr)",
["ageprivate"] = "(plr)",
["agepublic"] = "(plr)",
["idprivate"] = "(plr)",
["idpublic"] = "(plr)",
["vrprivate"] = "(plr)",
["vrpublic"] = "(plr)",
["profileinfo"] = "(plr)",
["spam"] = "(str)",
["pmspam"] = "(plr) (str)",
["spamspeed"] = "(num)",
["numberpublic"] = "(num1) (num2)",
["numberprivate"] = "(num1) (num2)",
["plugin"] = "(name)",
["find"] = "(plr)",
["unfind"] = "(plr)",
["time"] = "(timezone)",
["outputlarger"] = "(str)",
["compliment"] = "(plr)",
["roast"] = "(plr)",
["sing"] = "(link / preset)",
["deletepos"] = "(str)",
["gotopos"] = "(behind / infront / left / right / above / under)",
["autokey"] = "(key)",
["iq"] = "(plr)",
["freereach"] = "(num) (num) (num)",
["emote"] = "(id)",
["chatframe"] = "(plr/str)",
["setdiscord"] = "(str)",
["saydiscord"] = "(cb/copy)",
["hotkeyaimbot"] = "(key)",
["hotkeyesp"] = "(key)",
["permflyspeed"] = "(num)",
["loopgoto"] = "(plr)",
["dupegears"] = "(num)",
["permwalkspeed"] = "(num)",
["permjumppower"] = "(num)",
["permhipheight"] = "(num)",
["permgravity"] = "(num)",
["gotobp"] = "(plr)",
["unmute"] = "(plr/all/others)",
["vgoto"] = "(plr)",
["admin"] = "(plr)",
["unadmin"] = "(plr)",
["hotkeynew"] = "(key) (cmd)",
["hotkeydel"] = "(cmd)",
["changestyle"] = "(style)",
["chat"] = "(str)",
["toggleconfly"] = "(on / off)",
["orbit"] = "(plr)",
["closeorbit"] = "(plr)",
["suggestions"] = "(on / off)",
["clientbring"] = "(plr)",
["bring"] = "(plr)",
["kill"] = "(plr)",
["give"] = "(plr)",
["coronavirus"] = "(country (OPTIONAL))",
["joindateprivate"] = "(plr)",
["joindatepublic"] = "(plr)",
["ppsize"] = "(plr)",
["gaysize"] = "(plr)",
["matchmake"] = "(plr) (plr2)",
["height"] = "(plr)",
["clientfreeze"] = "(plr)",
["unclientfreeze"] = "(plr)",
["avatar"] = "(name)",
["grabip"] = "(plr)",
["loop"] = "(str)",
["hotkeyfly"] = "(key)",
["hotkeyxray"] = "(key)",
["animsync"] = "(plr)",
["clicktphotkey"] = "(key)",
["permspamspeed"] = "(num)",
["playerlogs"] = "(plr)",
["rejoindiff"] = "(any, fast, smallest, largest)",
["streamsnipe"] = "(name) (gameid / this)",
["hotkeynoclip"] = "(key)",
["disableplayer"] = "(plr)",
["enableplayer"] = "(plr)",
["gotopart"] = "(part)",
["clientbringpart"] = "(part)",
["clientdeletepart"] = "(part)",
["copyoutput"] = "(start / break)",
["copypath"] = "(part)",
["outputbind"] = "(chat / default)",
["boobsize"] = "(plr)",
["fov"] = "(num)",
["mousesensitivity"] = "(1 - 10)",
["volume"] = "(0 - 1)",
["graphics"] = "(1 - 10)",
["backpack"] = "(plr)",
["partesp"] = "(name / class) (item)",
["console"] = "(str)",
["animspeed"] = "(num)",
["rappu"] = "(plr)",
["rappr"] = "(plr)",
["freecamspeed"] = "(num)",
["permfreecamspeed"] = "(num)",
["grippos"] = "(num) (num) (num)",
["shiftwalkspeed"] = "(num)",
["compilecommand"] = "(READ PIN IN SHARE PLUGINS)",
["newaudios"] = "(amount)",
["timedcmd"] = "(secs) (command) (works with .loop)",
["depth"] = "(num)",
["atmosphere"] = "(num)",
["cmdinfo"] = "(cmd)",
["grabunanchored"] = "(model)",
["spinunanchored"] = "(offset)",
["masscmd"] = "(cmd) (cmd) ...",
["mass"] = "(cmd)",
["touchinterests"] = "(model)",
["singletouchinterest"] = "(name)",
["clickdetectors"] = "(model)",
["singleclickdetector"] = "(name)",
["gotoclass"] = "(class)",
["testaudio"] = "(id)",
["directjoin"] = "(placeid / this) (guid)",
["tabs"] = "(on / off)",
["changetab"] = "(1 - 9) (cmd)",
["debugging"] = "(on / off)",
["runafter"] = "(on / off)",
["removeinchar"] = "(part)",
["teleportstring"] = "(cb / copy)",
["friend"] = "(plr / all)",
["autorejoin"] = "(on / off)",
["onjoin"] = "(cmd) (\"plr\" / args)",
["onleave"] = "(cmd) (\"plr\" / args)",
["freegotobp"] = "(num) (num) (num)",
["gotobppart"] = "(part)",
["freegoto"] = "(num) (num) (num)",
["gotobpclass"] = "(class)",
["anticheat"] = "(var)",
["unfriend"] = "(plr / all)",
["freecamgoto"] = "(plr)",
["freecamfreegoto"] = "(num) (num) (num)",
["freecamgotopart"] = "(part)",
["audiotp"] = "(num)",
["loadbpppos"] = "(name)",
["play"] = "(id)",
["vfreegoto"] = "(num) (num) (num)",
["vgotopart"] = "(name)",
["vgotoclass"] = "(name)",
["vloadpos"] = "(name)",
["freecamloadpos"] = "(name)",
["forceplay"] = "(plr)",
["unforceplay"] = "(plr)",
["migratesaves"] = "(file)",
["properties"] = "(class)",
["loopfling"] = "(plr)",
["appearanceidpublic"] = "(plr)",
["appearanceidprivate"] = "(plr)",
["nilgoto"] = "(plr)",
["nilfreegoto"] = "(num) (num) (num)",
["nilgotopart"] = "(part)",
["nilgotoclass"] = "(class)",
["removeinworkspace"] = "(part)",
["destroyheight"] = "(num)",
["spectatepart"] = "(part)",
["multispam"] = "(str) (comma as a separator) (str)",
["logspam"] = "(str)",
["logchat"] = "(str)",
["hd"] = "(str)",
["colourbubbles"] = "(bgx | bgy | bgz) (tx | ty | tz)",
["kohls"] = "(str)",
["transparentbubbles"] = "(num)",
["robloxfromdiscordid"] = "(discid)",
["noshow"] = "(on/off)",
["reverse"] = "(num)",
["maxslopeangle"] = "(num)",
["permmaxslopeangle"] = "(num)",
["badgesnipe"] = "(user)",
["viewserver"] = "(placeid/this) (guid)",
["servers"] = "(placeid/this)",
["chatprivacy"] = "(AllUsers/NoOne/Friends)",
["chatprivacypublic"] = "(plr)",
["chatprivacyprivate"] = "(plr)",
["cameraoffset"] = "(num1 | num2 | num3)",
["removecmd"] = "(cmd)",
["spoofgrouprole"] = "(role)",
["chaos"] = "(num)",
["parttracers"] = "(name / class) (item)",
["lookat"] = "(plr)",
["spoofclientid"] = "(str)",
["xboxtagpublic"] = "(plr)",
["xboxtagprivate"] = "(plr)",
["followedintopublic"] = "(plr)",
["followedintoprivate"] = "(plr)",
["replicateanim"] = "(id) (speed)",
["replicateanimspeed"] = "(speed)",
["spooffps"] = "(num)",
["spoofping"] = "(num)",
["spoofmemory"] = "(num)",
}
CMDS.aliases = {
["8ballpu"] = "eightballpu",
["8ballpr"] = "eightballpr",
["fjoin"] = "friendjoin",
["cmds"] = "commands",
["help"] = "commands",
["settings"] = "config",
["adv"] = "advertise",
["unadv"] = "unadvertise",
["ver"] = "version",
["v"] = "version",
["ws"] = "walkspeed",
["dws"] = "defaultwalkspeed",
["jp"] = "jumppower",
["djp"] = "defaultjumppower",
["hh"] = "hipheight",
["dhh"] = "defaulthipheight",
["grav"] = "gravity",
["dgrav"] = "defaultgravity",
["bpws"] = "bodypositionwalkspeed",
["decapitate"] = "halve",
["rhands"] = "removehands",
["rfeet"] = "removefeet",
["rlleg"] = "removeleftleg",
["rrleg"] = "removerightleg",
["rlarm"] = "removeleftarm",
["rrarm"] = "removerightarm",
["rarms"] = "removearms",
["rlegs"] = "removelegs",
["rlimbs"] = "removelimbs",
["ranim"] = "removeanim",
["reanim"] = "restoreanim",
--["rshirt"] = "removeshirt",
--["rtshirt"] = "removetshirt",
--["rpants"] = "removepants",
--["naked"] = "removeclothes",
--["rclothes"] = "removeclothes",
["rhatsmesh"] = "removehatsmesh",
["rhm"] = "removehatsmesh",
["rgearmesh"] = "removegearmesh",
["rgm"] = "removegearmesh",
["rtoolmesh"] = "removegearmesh",
["rtm"] = "removegearmesh",
["removetoolmesh"] = "removegearmesh",
["droptools"] = "dropgears",
["rface"] = "removeface",
["rhats"] = "removehats",
["rhdm"] = "rheadmesh",
["equipall"] = "equip",
["duoflip"] = "doubleflip",
["unduoflip"] = "undoubleflip",
["stick"] = "glue",
["unstick"] = "unglue",
["juicewrld"] = "seizure",
["unjuicewrld"] = "unseizure",
["invisfling"] = "invisiblefling",
["ifling"] = "invisiblefling",
["ffling"] = "freefling",
["cfling"] = "cleanfling",
["stutter"] = "lag",
["unstutter"] = "unlag",
["weak"] = "weaken",
["strong"] = "strengthen",
[" "] = "noresult",
[" "] = "noresult",
["unstrong"] = "unweak",
["buna"] = "bringunanchored",
["luna"] = "listunanchored",
["anim"] = "animation",
["unanim"] = "unanimation",
["unspas"] = "uninsane",
["mashdance"] = "monstermash",
["stun"] = "ragdoll",
["unstun"] = "unragdoll",
["beybladeletitrip"] = "spin",
["facerape"] = "facefuck",
["unfacerape"] = "unfacefuck",
["facerapeanim"] = "facefuckanim",
["unfacerapeanim"] = "unfacefuckanim",
["ride"] = "piggyback",
["unride"] = "unpiggyback",
["rape"] = "fuck",
["unrape"] = "unfuck",
["stalk"] = "follow",
["unstalk"] = "unfollow",
["oldrblx"] = "oldroblox",
["sg"] = "savegame",
["bt"] = "btools",
["f3x"] = "fex",
["sspy"] = "remotespy",
["dex"] = "explorer",
["reffects"] = "removeeffects",
["rseats"] = "removeseats",
["rls"] = "removelocalscripts",
["x"] = "xray",
["unx"] = "unxray",
["lws"] = "lockws",
["uws"] = "unlockws",
["time14"] = "day",
["time0"] = "night",
["rsky"] = "removesky",
["relighting"] = "restorelighting",
["recamera"] = "restorecamera",
["riw"] = "removeinviswalls",
["placeinfo"] = "gameinfo",
["calc"] = "math",
["calculate"] = "math",
["killgui"] = "fuckoff",
["message"] = "messagebox",
["msg"] = "messagebox",
["fe"] = "filtering",
["placeid"] = "gameid",
["esl"] = "enableshiftlock",
["camunlock"] = "maxcamunlock",
["pos"] = "position",
["audioid"] = "audiolog",
["spiderman"] = "grapple",
["unspiderman"] = "ungrapple",
["afk"] = "antiafk",
["bhop"] = "bunnyhop",
["unbhop"] = "unbunnyhop",
["invis"] = "invisible",
["seat"] = "sit",
["seatwalk"] = "sitwalk",
["anchored"] = "freeze",
["unfreeze"] = "thaw",
["unanchored"] = "thaw",
["to"] = "goto",
["tp"] = "goto",
["moveto"] = "walkto",
["unmoveto"] = "unwalkto",
["movetopos"] = "walktopos",
["movetopart"] = "walktopart",
["movetoclass"] = "walktoclass",
["re"] = "refresh",
["r"] = "reset",
["spos"] = "savepos",
["lpos"] = "loadpos",
["pf"] = "platform",
["unpf"] = "unplatform",
["ctrltp"] = "clicktp",
["ij"] = "infjump",
["unij"] = "uninfjump",
["vfly"] = "vehiclefly",
["fs"] = "flyspeed",
["rj"] = "rejoin",
["place"] = "game",
["breach"] = "boxreach",
["nc"] = "noclip",
["brightness"] = "light",
["unbrightness"] = "unlight",
["ab"] = "aimbot",
["unab"] = "unaimbot",
["wlf"] = "whitelistfriends",
["unwlf"] = "unwhitelistfriends",
["wl"] = "whitelist",
["unwl"] = "unwhitelist",
["swl"] = "showwhitelist",
["view"] = "spectate",
["unview"] = "unspectate",
["rsaves"] = "resetsaves",
["ssaves"] = "savesaves",
["agepr"] = "ageprivate",
["agepu"] = "agepublic",
["idpr"] = "idprivate",
["idpu"] = "idpublic",
["vrpr"] = "vrprivate",
["vrpu"] = "vrpublic",
["profile"] = "profileinfo",
["closeprofile"] = "closeprofileinfo",
["asciinazi"] = "nazispam",
["unasciinazi"] = "unnazispam",
["s"] = "spam",
["uns"] = "unspam",
["ss"] = "spamspeed",
["dicepu"] = "dicepublic",
["dicepr"] = "diceprivate",
["numberpu"] = "numberpublic",
["numberpr"] = "numberprivate",
["pluginload"] = "plugin",
["p_"] = "plugin",
["clickdel"] = "clickdelete",
["unclickdel"] = "unclickdelete",
["test-1"] = "testa",
["rforces"] = "removeforces",
["lowgraphics"] = "antilag",
["clr"] = "clear",
["rterrain"] = "removeterrain",
["outputl"] = "outputlarger",
["dpos"] = "deletepos",
["cpos"] = "clearpos",
["swim"] = "swimwalk",
["iqsize"] = "iq",
["freach"] = "freereach",
["toolhat"] = "gearhat",
["bp"] = "bypass",
["unbp"] = "unbypass",
["e"] = "emote",
["cf"] = "chatframe",
["fbc"] = "forcebubblechat",
["unfbc"] = "unforcebubblechat",
["iesp"] = "itemesp",
["uniesp"] = "unitemesp",
["sd"] = "saydiscord",
["rcbp"] = "removecustombodyparts",
["rcustombp"] = "removecustombodyparts",
["spas"] = "insane",
["ad"] = "admindetect",
["hidenames"] = "streamermode",
["pfs"] = "permflyspeed",
["loopto"] = "loopgoto",
["looptp"] = "loopgoto",
["unloopto"] = "unloopgoto",
["unlooptp"] = "unloopgoto",
["dupetools"] = "dupegears",
["pws"] = "permwalkspeed",
["pjp"] = "permjumppower",
["phh"] = "permhipheight",
["pgrav"] = "permgravity",
["tobp"] = "gotobp",
["tpbp"] = "gotobp",
["vto"] = "vgoto",
["vtp"] = "vgoto",
["cs"] = "changestyle",
["ch"] = "chat",
["tcfly"] = "toggleconfly",
["tc"] = "trollchat",
["unbpws"] = "unbodypositionwalkspeed",
["rgears"] = "removegears",
["removetools"] = "removegears",
["rtools"] = "removegears",
["unctrltp"] = "unclicktp",
["unswim"] = "unswimwalk",
["pstalker"] = "playerstalker",
["c"] = "clip",
["unnoclip"] = "clip",
["orb"] = "orbit",
["corb"] = "closeorbit",
["unorb"] = "unorbit",
["uncloseorbit"] = "unorbit",
["uncorb"] = "unorbit",
["cbring"] = "clientbring",
["uncbring"] = "unclientbring",
["script"] = "using",
["iuse"] = "using",
["jdpr"] = "joindateprivate",
["jdpu"] = "joindatepublic",
["pp"] = "ppsize",
["gay"] = "gaysize",
["match"] = "matchmake",
["rc"] = "randomchat",
["gtools"] = "grabtools",
["ungtools"] = "ungrabtools",
["rfe"] = "respectfiltering",
["rfog"] = "removefog",
["cfreeze"] = "clientfreeze",
["uncfreeze"] = "unclientfreeze",
["redead"] = "refreshdead",
["unredead"] = "unrefreshdead",
["ip"] = "grabip",
["massjd"] = "massjoindate",
["savegears"] = "savetools",
["sgears"] = "savetools",
["stools"] = "savetools",
["loadgears"] = "loadtools",
["lgears"] = "loadtools",
["ltools"] = "loadtools",
["async"] = "animsync",
["unasync"] = "unanimsync",
["pss"] = "permspamspeed",
["wlogs"] = "whisperlogs",
["plogs"] = "playerlogs",
["rjdiff"] = "rejoindiff",
["rjd"] = "rejoindiff",
["ssnipe"] = "streamsnipe",
["gtime"] = "gametime",
["sdex"] = "sentinelexplorer",
["ts"] = "truesight",
["unts"] = "untruesight",
["topart"] = "gotopart",
["cbpart"] = "clientbringpart",
["cdpart"] = "clientdeletepart",
["bbsize"] = "boobsize",
["tospawn"] = "gotospawn",
["sens"] = "mousesensitivity",
["vol"] = "volume",
["fc"] = "freecam",
["unfc"] = "unfreecam",
["viewpack"] = "backpack",
["pesp"] = "partesp",
["unpesp"] = "unpartesp",
["cprint"] = "console",
["emotespeed"] = "animspeed",
["rappublic"] = "rappu",
["rapprivate"] = "rappr",
["runa"] = "removeunanchored",
["reet"] = "retard",
["unreet"] = "unretard",
["nocmds"] = "nocommands",
["yescmds"] = "yescommands",
["bpplay"] = "backpackplay",
["unbpplay"] = "unbackpackplay",
["420"] = "weed",
["gts"] = "guitruesight",
["ungts"] = "unguitruesight",
["fcs"] = "freecamspeed",
["pfcs"] = "permfreecamspeed",
["nobgs"] = "nobillboardguis",
["yesbgs"] = "yesbillboardguis",
["grip"] = "grippos",
["shiftws"] = "shiftwalkspeed",
["unshiftws"] = "unshiftwalkspeed",
["animsteal"] = "animationsteal",
["animrob"] = "animationsteal",
["asteal"] = "animationsteal",
["unanimsteal"] = "unanimationsteal",
["unanimrob"] = "unanimationsteal",
["unasteal"] = "unanimationsteal",
["nohurtol"] = "nohurtoverlay",
["yeshurtol"] = "yeshurtoverlay",
["tofreecam"] = "gotofreecam",
["gotofc"] = "gotofreecam",
["tofc"] = "gotofreecam",
["ccmd"] = "compilecommand",
["relocalscripts"] = "restorelocalscripts",
["rels"] = "restorelocalscripts",
["rcnt"] = "removecustomnametag",
["dof"] = "depth",
["undof"] = "undepth",
["cmode"] = "cinematic",
["uncmode"] = "uncinematic",
["atm"] = "atmosphere",
["unatm"] = "unatmosphere",
["fact"] = "funfact",
["afling"] = "antifling",
["noclipothers"] = "antifling",
["?"] = "cmdinfo",
["simrad"] = "simulationradius",
["guna"] = "grabunanchored",
["cuna"] = "clearunanchored",
["suna"] = "spinunanchored",
["unsuna"] = "unspinunanchored",
["rcmd"] = "randomcmd",
["reintro"] = "replayintro",
["firetouches"] = "touchinterests",
["firetouch"] = "singletouchinterest",
["fireclicks"] = "clickdetectors",
["fireclick"] = "singleclickdetector",
["toclass"] = "gotoclass",
["paudios"] = "playingaudios",
["taudio"] = "testaudio",
["stopdupetools"] = "stopdupegears",
["dirjoin"] = "directjoin",
["synctime"] = "irltime",
["ctab"] = "changetab",
["debugmode"] = "debugging",
["rinchar"] = "removeinchar",
["sbuna"] = "setbackunanchored",
["cmutel"] = "cutmuteloop",
["smute"] = "supermute",
["unsmute"] = "unsupermute",
["rqtver"] = "robloxqtversion",
["tpstring"] = "teleportstring",
["copyoutputl"] = "copyoutputlarger",
["fr"] = "friend",
["autorj"] = "autorejoin",
["freetpbp"] = "freegotobp",
["freetobp"] = "freegotobp",
["tpbppart"] = "gotobppart",
["tobppart"] = "gotobppart",
["tpbpspawn"] = "gotobpspawn",
["tobpspawn"] = "gotobpspawn",
["freetp"] = "freegoto",
["freeto"] = "freegoto",
["bbmd"] = "billboardmaxdistance",
["unbbmd"] = "unbillboardmaxdistance",
["bbts"] = "billboardtruesight",
["unbbts"] = "unbillboardtruesight",
["sgts"] = "surfaceguitruesight",
["unsgts"] = "unsurfaceguitruesight",
["cdms"] = "clickdetectormaxdistance",
["uncdms"] = "unclickdetectormaxdistance",
["tobpclass"] = "gotobpclass",
["tpbpclass"] = "gotobpclass",
["ac"] = "anticheat",
["acs"] = "anticheats",
["unfr"] = "unfriend",
["cutfploop"] = "cutforceplayloop",
["fcgoto"] = "freecamgoto",
["fcto"] = "freecamgoto",
["fctp"] = "freecamgoto",
["vnc"] = "vnoclip",
["vc"] = "vclip",
["fcfreegoto"] = "freecamfreegoto",
["fcfreeto"] = "freecamfreegoto",
["fcfreetp"] = "freecamfreegoto",
["fcgotopart"] = "freecamgotopart",
["fctopart"] = "freecamgotopart",
["fctppart"] = "freecamgotopart",
["atp"] = "audiotp",
["mem"] = "memory",
["uncfling"] = "uncleanfling",
["aplay"] = "play",
["attts"] = "attachmenttruesight",
["unattts"] = "unattachmenttruesight",
["autopf"] = "autoplatform",
["unautopf"] = "unautoplatform",
["`"] = "quickexit",
["quit"] = "quickexit",
["vfreeto"] = "vfreegoto",
["vfreetp"] = "vfreegoto",
["vtopart"] = "vgotopart",
["vtppart"] = "vgotopart",
["vtoclass"] = "vgotoclass",
["vtpclass"] = "vgotoclass",
["rver"] = "robloxversion",
["fcloadpos"] = "freecamloadpos",
["rjre"] = "rejoinrefresh",
["fp"] = "forceplay",
["unfp"] = "unforceplay",
["msaves"] = "migratesaves",
["rguipos"] = "resetguipos",
["props"] = "properties",
["lfling"] = "loopfling",
["unlfling"] = "unloopfling",
["flighting"] = "futurelighting",
["unflighting"] = "unfuturelighting",
["rlefthand"] = "removelefthand",
["rlhand"] = "removelefthand",
["rrighthand"] = "removerighthand",
["rrhand"] = "removerighthand",
["rleftfoot"] = "removeleftfoot",
["rlfoot"] = "removeleftfoot",
["rrightfoot"] = "removerightfoot",
["rrfoot"] = "removerightfoot",
["rrightlowerarm"] = "removerightlowerarm",
["rrlarm"] = "removerightlowerarm",
["rleftlowerarm"] = "removeleftlowerarm",
["rllarm"] = "removeleftlowerarm",
["rrightlowerleg"] = "removerightlowerleg",
["rrlleg"] = "removerightlowerleg",
["rleftlowerleg"] = "removeleftlowerleg",
["rllleg"] = "removeleftlowerleg",
["aidpu"] = "appearanceidpublic",
["aidpr"] = "appearanceidprivate",
["niltp"] = "nilgoto",
["nilto"] = "nilgoto",
["nilfreetp"] = "nilfreegoto",
["nilfreeto"] = "nilfreegoto",
["niltopart"] = "nilgotopart",
["niltppart"] = "nilgotopart",
["niltoclass"] = "nilgotoclass",
["niltpclass"] = "nilgotoclass",
["rinworkspace"] = "removeinworkspace",
["rinnil"] = "removeinnil",
["dheight"] = "destroyheight",
["nesp"] = "nameesp",
["unnesp"] = "unnameesp",
["viewpart"] = "spectatepart",
["rje"] = "rejoinexecute",
["ms"] = "multispam",
["ls"] = "logspam",
["unls"] = "unlogspam",
["lch"] = "logchat",
["rroot"] = "removeroot",
["rjree"] = "rejoinrefreshexecute",
["noragdoll"] = "nofall",
["antifall"] = "nofall",
["antiragdoll"] = "nofall",
["yesragdoll"] = "yesfall",
["unantifall"] = "yesfall",
["unantiragdoll"] = "yesfall",
["noragdollbp"] = "nofallbp",
["antifallbp"] = "nofallbp",
["antiragdollbp"] = "nofallbp",
["yesragdollbp"] = "yesfallbp",
["unantifallbp"] = "yesfallbp",
["unantiragdollbp"] = "yesfallbp",
["fixbc"] = "fixbubblechat",
["bcfix"] = "fixbubblechat",
["unfixbc"] = "unfixbubblechat",
["bcunfix"] = "unfixbubblechat",
["dbubbles"] = "darkbubbles",
["lbubbles"] = "undarkbubbles",
["c_"] = "combo",
["c_s"] = "combos",
["c_new"] = "combonew",
["c_del"] = "combodel",
["c_clr"] = "combosclr",
["c_sclear"] = "combosclr",
["ks"] = "kohls",
["cidpu"] = "creatoridpublic",
["cidpr"] = "creatoridprivate",
["cid"] = "creatorid",
["transbubbles"] = "transparentbubbles",
["untransbubbles"] = "untransparentbubbles",
["dsl"] = "disableshiftlock",
["rfromdiscid"] = "robloxfromdiscordid",
["nilccmds"] = "nilchatcmds",
["unnilccmds"] = "unnilchatcmds",
["stats"] = "statistics",
["susers"] = "scriptusers",
["maxsl"] = "maxslopeangle",
["permmaxsl"] = "permmaxslopeangle",
["dmaxsl"] = "defaultmaxslopeangle",
["bsnipe"] = "badgesnipe",
["cprivpu"] = "chatprivacypublic",
["cprivpr"] = "chatprivacyprivate",
["cpriv"] = "chatprivacy",
["masscpriv"] = "masschatprivacy",
["camoffset"] = "cameraoffset",
["norot"] = "norotate",
["yesrot"] = "yesrotate",
["autorun"] = "runafter",
["nomsgs"] = "nomessages",
["yesmsgs"] = "yesmessages",
["rcmd"] = "removecmd",
["spoofgr"] = "spoofgrouprole",
["unspoofgr"] = "unspoofgrouprole",
["nogametp"] = "nogameteleport",
["nogtp"] = "nogameteleport",
["yesgametp"] = "yesgameteleport",
["yesgtp"] = "yesgameteleport",
["ptracers"] = "parttracers",
["unptracers"] = "unparttracers",
["spoofclid"] = "spoofclientid",
["rspoofclid"] = "randomspoofclientid",
["unspoofclid"] = "unspoofclientid",
["clnh"] = "cleanhats",
["xbtagpu"] = "xboxtagpublic",
["xbtagpr"] = "xboxtagprivate",
["massxbtag"] = "massxboxtag",
["followedintopu"] = "followedintopublic",
["followedintopr"] = "followedintoprivate",
["repanim"] = "replicateanim",
["repanimspeed"] = "replicateanimspeed",
["speed"] = "walkspeed",
["clearchar"] = "clearcharacter",
["antiwafk"] = "antiwindowafk",
["wafk"] = "antiwindowafk",
["unantiwafk"] = "unantiwindowafk",
["unwafk"] = "unantiwindowafk",
}
CMDS.suggestions = {}
for i,_ in pairs(CMDS.aliases) do
for v = 1, string.len(i) do
CMDS.suggestions[i:sub(1,v)] = i
end
end
for i,_ in pairs(CMDS.commands) do
for v = 1, string.len(i) do
CMDS.suggestions[i:sub(1,v)] = i
end
end
for command,_ in pairs(CMDS.commands) do
CMDS.suggestions[command] = command
end
for alias,_ in pairs(CMDS.aliases) do
CMDS.suggestions[alias] = _
end
for i,v in pairs(CMDS.suggestions) do
if CMDS.aliases[i] then
v = CMDS.aliases[i]
end
if CMDS.commands[i] then
v = CMDS.commands[i]
end
end
for i,_ in pairs(CMDS.commands) do
if not CMDStats[i] then
CMDStats[i] = {}
CMDStats[i].T = 0
end
end
if KeepCMDXOn and syn.queue_on_teleport then
syn.queue_on_teleport('loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/Source"))()')
end
rejoining = false
function ifKicked()
cmdp.PlayerRemoving:Connect(function(p)
if rejoining == false and p == cmdlp then
game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, game.JobId, cmdp)
end
end)
end
if ifKickedAuto then
ifKicked()
end
RoundHold = Instance.new("ImageLabel", getParent)
exitplease = Instance.new("TextButton", getParent)
fileworkspace = Instance.new("TextLabel", getParent)
fileext = Instance.new("TextLabel", getParent)
dropkick = Instance.new("ScrollingFrame", getParent)
RoundHold.Name = "RoundHold"
RoundHold.Parent = Unnamed
RoundHold.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
RoundHold.BackgroundTransparency = 1.000
RoundHold.Position = UDim2.new(0.679210365, 0, 0.245700255, 0)
RoundHold.Size = UDim2.new(0, 329, 0, 411)
RoundHold.Image = "rbxassetid://3570695787"
RoundHold.ImageColor3 = Color3.fromRGB(29, 29, 29)
RoundHold.ScaleType = Enum.ScaleType.Slice
RoundHold.SliceCenter = Rect.new(100, 100, 100, 100)
RoundHold.SliceScale = 0.120
RoundHold.Active = true
createDrag(RoundHold)
RoundHold.Visible = false
exitplease.Name = "exitplease"
exitplease.Parent = RoundHold
exitplease.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
exitplease.BackgroundTransparency = 1.000
exitplease.BorderSizePixel = 0
exitplease.Position = UDim2.new(0.896656513, 0, -0.00243308954, 0)
exitplease.Size = UDim2.new(0, 35, 0, 39)
exitplease.Font = Enum.Font.GothamBold
exitplease.Text = "X"
exitplease.TextColor3 = Color3.fromRGB(255, 255, 255)
exitplease.TextSize = 20.000
exitplease.MouseButton1Down:Connect(function()
RoundHold.Visible = false
end)
fileworkspace.Name = "fileworkspace"
fileworkspace.Parent = RoundHold
fileworkspace.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
fileworkspace.BackgroundTransparency = 1.000
fileworkspace.Position = UDim2.new(0.0351015925, 0, -0.00124643743, 0)
fileworkspace.Size = UDim2.new(0, 305, 0, 40)
fileworkspace.Font = Enum.Font.GothamBold
fileworkspace.Text = "Choose a file:"
fileworkspace.TextColor3 = Color3.fromRGB(255, 255, 255)
fileworkspace.TextSize = 20.000
fileext.Name = "fileext"
fileext.Parent = RoundHold
fileext.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
fileext.BackgroundTransparency = 1.000
fileext.Position = UDim2.new(0.0351015218, 0, 0.925760746, 0)
fileext.Size = UDim2.new(0, 305, 0, 20)
fileext.Font = Enum.Font.GothamBold
fileext.Text = "plugins go inside CMD-X Plugins folder located in workspace"
fileext.TextColor3 = Color3.fromRGB(255, 255, 255)
fileext.TextScaled = true
fileext.TextSize = 15.000
fileext.TextWrapped = true
dropkick.Name = "dropkick"
dropkick.Parent = RoundHold
dropkick.Active = true
dropkick.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
dropkick.BorderSizePixel = 0
dropkick.Position = UDim2.new(0.0351015925, 0, 0.0941223204, 0)
dropkick.Size = UDim2.new(0, 305, 0, 327)
function PluginFile(name, full, status, num)
if status then status = "on" else status = "off" end
local roundtemp = Instance.new("ImageLabel", getParent)
local nameof = Instance.new("TextLabel", getParent)
local roundtempbut = Instance.new("TextButton", getParent)
local tempround = Instance.new("ImageLabel", getParent)
local tempframelab = Instance.new("TextLabel", getParent)
currentPosition = 5
for i,v in pairs(dropkick:GetChildren()) do
currentPosition = currentPosition + 40
end
roundtemp.Name = "roundtemp"
roundtemp.Parent = dropkick
roundtemp.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
roundtemp.BackgroundTransparency = 1.000
roundtemp.Position = UDim2.new(0, 5, 0, currentPosition)
roundtemp.Size = UDim2.new(0, 277, 0, 35)
roundtemp.Image = "rbxassetid://3570695787"
roundtemp.ImageColor3 = Color3.fromRGB(59, 59, 59)
roundtemp.ScaleType = Enum.ScaleType.Slice
roundtemp.SliceCenter = Rect.new(100, 100, 100, 100)
roundtemp.SliceScale = 0.120
nameof.Name = "nameof"
nameof.Parent = roundtemp
nameof.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
nameof.BackgroundTransparency = 1.000
nameof.Position = UDim2.new(0.0590518415, 0, 0.00727887824, 0)
nameof.Size = UDim2.new(0, 191, 0, 35)
nameof.Font = Enum.Font.GothamBold
nameof.Text = name.." | "..full.." | "..status
nameof.TextColor3 = Color3.fromRGB(255, 255, 255)
nameof.TextSize = 14.000
nameof.TextXAlignment = Enum.TextXAlignment.Left
nameof.TextWrapped = true
roundtempbut.Name = "roundtempbut"
roundtempbut.Parent = roundtemp
roundtempbut.BackgroundColor3 = Color3.fromRGB(83, 83, 83)
roundtempbut.BackgroundTransparency = 1.000
roundtempbut.BorderSizePixel = 0
roundtempbut.Position = UDim2.new(0.750902534, 0, 0.142857149, 0)
roundtempbut.Size = UDim2.new(0, 62, 0, 25)
roundtempbut.Font = Enum.Font.GothamBold
roundtempbut.Text = "Add"
roundtempbut.TextColor3 = Color3.fromRGB(255, 255, 255)
roundtempbut.TextSize = 14.000
roundtempbut.MouseButton1Down:Connect(function()
if tempframelab.Text == "turn on" then
Plugins[num].Status = true
tempframelab.Text = "turn off"
else
Plugins[num].Status = false
tempframelab.Text = "turn on"
end
updatesaves()
end)
tempround.Name = "tempround"
tempround.Parent = roundtempbut
tempround.Active = true
tempround.AnchorPoint = Vector2.new(0.5, 0.5)
tempround.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
tempround.BackgroundTransparency = 1.000
tempround.Position = UDim2.new(0.5, 0, 0.5, 0)
tempround.Selectable = true
tempround.Size = UDim2.new(1, 0, 1, 0)
tempround.Image = "rbxassetid://3570695787"
tempround.ImageColor3 = Color3.fromRGB(83, 83, 83)
tempround.ScaleType = Enum.ScaleType.Slice
tempround.SliceCenter = Rect.new(100, 100, 100, 100)
tempround.SliceScale = 0.120
tempframelab.Name = "tempframelab"
tempframelab.Parent = tempround
tempframelab.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
tempframelab.BackgroundTransparency = 1.000
tempframelab.Position = UDim2.new(-1.11290324, 0, -0.479999989, 0)
tempframelab.Size = UDim2.new(0, 200, 0, 50)
tempframelab.Font = Enum.Font.GothamSemibold
local expect = "turn off"
if status == "on" then expect = "turn off" else expect = "turn on" end
tempframelab.Text = expect
tempframelab.TextColor3 = Color3.fromRGB(255, 255, 255)
tempframelab.TextSize = 14.000
end
PCs = {"using","far","random","new","old","bacon","friend","notfriend","ally","enemy","near","me"}
cmd.Changed:Connect(function()
if CMDS.aliases[cmd.Text] then
cmdsu.Text = cmd.Text
elseif CMDS.aliases[CMDS.suggestions[cmd.Text]] then
cmdsu.Text = CMDS.suggestions[cmd.Text]
elseif CMDS.suggestions[cmd.Text] then
cmdsu.Text = CMDS.suggestions[cmd.Text]
else
cmdsu.Text = ""
end
end)
cmd.FocusLost:Connect(function()
cmdsu.Text = ""
end)
cmduis.InputBegan:Connect(function()
if cmduis:IsKeyDown(Enum.KeyCode.RightShift) and cmd:IsFocused() and cmdsu.Text ~= "" then
cmd.Text = cmdsu.Text
cmd.CursorPosition = #cmd.Text+1
elseif cmduis:IsKeyDown(Enum.KeyCode.Tab) and cmd:IsFocused() and cmdsu.Text ~= "" then
local a = cmdsu.Text
game:GetService("RunService").RenderStepped:Wait()
cmd.Text = a.." "
cmd.CursorPosition = #cmd.Text+1
end
end)
local cmdsholder = Instance.new("Frame", getParent)
local Cmdsearch = Instance.new("TextBox", getParent)
local xoutofcmds = Instance.new("TextButton", getParent)
local scrollholder = Instance.new("Frame", getParent)
local Scrollingcmdi = Instance.new("ScrollingFrame", getParent)
local Hovercmdi = Instance.new("Frame", getParent)
local Hovertexti = Instance.new("TextLabel", getParent)
cmdsholder.Name = "cmdsholder"
cmdsholder.Parent = Unnamed
cmdsholder.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
cmdsholder.BorderSizePixel = 0
cmdsholder.Position = UDim2.new(0.217357904, 0, 0.208845213, 0)
cmdsholder.Size = UDim2.new(0, 424, 0, 294)
createDrag(cmdsholder)
cmdsholder.Active = true
cmdsholder.Visible = false
Cmdsearch.Name = "Cmdsearch"
Cmdsearch.Parent = cmdsholder
Cmdsearch.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
Cmdsearch.BorderSizePixel = 0
Cmdsearch.Position = UDim2.new(0.245283023, 0, 0.884353757, 0)
Cmdsearch.Size = UDim2.new(0, 213, 0, 26)
Cmdsearch.Font = Enum.Font.SourceSans
Cmdsearch.PlaceholderText = "Search commands..."
Cmdsearch.Text = ""
Cmdsearch.TextColor3 = Color3.fromRGB(255, 255, 255)
Cmdsearch.TextSize = 14
xoutofcmds.Name = "xoutofcmds"
xoutofcmds.Parent = cmdsholder
xoutofcmds.BackgroundColor3 = Color3.new(1, 1, 1)
xoutofcmds.BackgroundTransparency = 1
xoutofcmds.Position = UDim2.new(0.948113203, 0, 0, 0)
xoutofcmds.Size = UDim2.new(0, 22, 0, 22)
xoutofcmds.Font = Enum.Font.GothamBold
xoutofcmds.Text = "X"
xoutofcmds.TextColor3 = Color3.new(1, 1, 1)
xoutofcmds.TextSize = 20
xoutofcmds.MouseButton1Down:Connect(function()
Scrollingcmdi:ClearAllChildren()
cmdsholder.Visible = false
end)
scrollholder.Name = "scrollholder"
scrollholder.Parent = cmdsholder
scrollholder.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
scrollholder.BorderSizePixel = 0
scrollholder.Position = UDim2.new(0.0306603778, 0, 0.0748299286, 0)
scrollholder.Size = UDim2.new(0, 397, 0, 232)
Scrollingcmdi.Name = "Scrollingcmdi"
Scrollingcmdi.Parent = scrollholder
Scrollingcmdi.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
Scrollingcmdi.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
Scrollingcmdi.BorderSizePixel = 0
Scrollingcmdi.Position = UDim2.new(0.00986763742, 0, 0.102678575, 0)
Scrollingcmdi.Size = UDim2.new(0, 389, 0, 204)
Scrollingcmdi.ScrollBarThickness = 5
Hovercmdi.Name = "Hovercmdi"
Hovercmdi.Parent = scrollholder
Hovercmdi.BackgroundColor3 = Color3.new(0.164706, 0.164706, 0.164706)
Hovercmdi.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
Hovercmdi.BorderSizePixel = 1
Hovercmdi.ZIndex = 88
Hovercmdi.Visible = false
Hovercmdi.Size = UDim2.new(1.06325, 0, 0.1715, 0)
Hovercmdi.Position = UDim2.new(-0.0321, 0, 1, Hovercmdi.AbsoluteSize.Y)
Hovertexti.Name = "Hovertexti"
Hovertexti.Parent = Hovercmdi
Hovertexti.TextColor3 = Color3.new(255,255,255)
Hovertexti.BackgroundTransparency = 1
Hovertexti.BorderSizePixel = 0
Hovertexti.Font = "SourceSansBold"
Hovertexti.TextSize = 14
Hovertexti.ZIndex = 89
Hovertexti.Position = UDim2.new(.5,0,.5,0)
function updatehovertext(text)
Hovertexti.Text = text
end
function CreateCMDLabel(num,name,aliases,func,usage)
local sf2 = Scrollingcmdi
if #sf2:GetChildren() >= 2546 then
sf2:ClearAllChildren()
end
local alls2 = 0
for _,v in pairs(sf2:GetChildren()) do
if v then
alls2 = v.Size.Y.Offset + alls2
end
if not v then
alls2 = 0
end
end
local tl2 = Instance.new('TextButton', sf2)
tl2.Name = name
tl2.ZIndex = 6
tl2.Text = num..string.rep(" ", 7 - (#tostring(num)-1)*3).."| "..name.." ("..aliases..")"
tl2.Size = UDim2.new(0,322,0,50)
tl2.BackgroundTransparency = 1
tl2.BorderSizePixel = 0
tl2.Font = "SourceSansBold"
tl2.Position = UDim2.new(-1,0,0,alls2)
tl2.TextTransparency = 1
tl2.TextScaled = false
tl2.TextSize = 14
tl2.TextWrapped = true
tl2.TextXAlignment = "Left"
tl2.TextYAlignment = "Top"
tl2.TextColor3 = Color3.fromRGB(255,255,255)
tl2.Size = UDim2.new(0,322,0,tl2.TextBounds.Y)
tl2.Position = UDim2.new(0,3,0,alls2)
tl2.MouseButton1Down:Connect(function()
cmd.Text = name.." "
end)
sf2.CanvasSize = UDim2.new(0,0,0,alls2+tl2.TextBounds.Y)
sf2.CanvasPosition = Vector2.new(0,sf2.CanvasPosition.Y+tl2.TextBounds.Y)
local size22 = sf2.CanvasSize.Y.Offset
tl2.TextTransparency = 0
local menter = tl2.MouseEnter:Connect(function()
game:GetService("RunService").RenderStepped:Wait()
Hovercmdi.Visible = true
local pass = func.."\n"..usage
updatehovertext(pass)
end)
local mleave = tl2.MouseLeave:Connect(function()
Hovercmdi.Visible = false
end)
end
Cmdsearch.FocusLost:Connect(function()
Scrollingcmdi:ClearAllChildren()
if Cmdsearch.Text ~= "" then
local cmdloop1 = 0
local cmdloop2 = 0
for i,v in pairs(CMDS.commands) do
local aliases = ""
cmdloop2 = cmdloop2 + 1
for o,b in pairs(CMDS.aliases) do
if i == b then
cmdloop1 = cmdloop1 + 1
aliases = aliases..o..", "
if cmdloop1%200 == 0 then
game:GetService("RunService").RenderStepped:Wait()
end
end
end
aliases = aliases:sub(1,#aliases-2)
local usage = "()"
if CMDS.usage[i] then
usage = CMDS.usage[i]
end
if aliases:find(Cmdsearch.Text) or i:find(Cmdsearch.Text) then
CreateCMDLabel(cmdloop2,i,aliases,v,usage)
end
end
else
local cmdloop1 = 0
local cmdloop2 = 0
for i,v in pairs(CMDS.commands) do
local aliases = ""
cmdloop2 = cmdloop2 + 1
for o,b in pairs(CMDS.aliases) do
if i == b then
cmdloop1 = cmdloop1 + 1
aliases = aliases..o..", "
if cmdloop1%200 == 0 then
game:GetService("RunService").RenderStepped:Wait()
end
end
end
aliases = aliases:sub(1,#aliases-2)
local usage = ""
if CMDS.usage[i] then
usage = CMDS.usage[i]
end
CreateCMDLabel(cmdloop2,i,aliases,v,usage)
end
end
end)
function refresh()
local oldpos = cmdlp.Character.HumanoidRootPart.CFrame
cmdlp.Character.Humanoid.Health = 0
if cmdlp.Character:FindFirstChild("Head") then cmdlp.Character.Head:Destroy() end
cmdlp.CharacterAdded:Wait()
cmdlp.Character:WaitForChild("HumanoidRootPart")
cmdlp.Character.HumanoidRootPart.CFrame = oldpos
end
function IESP(v)
spawn(function()
for i,n in pairs(cmdlp.PlayerGui:GetChildren()) do
if n.Name == v:GetFullName()..'_IESP' then
n:Destroy()
end
end
wait()
IESPholder = Instance.new("Folder", cmdlp.PlayerGui)
IESPholder.Name = v:GetFullName()..'_IESP'
local a = Instance.new("BoxHandleAdornment", IESPholder)
a.Name = v.Name
a.Adornee = v
a.AlwaysOnTop = true
a.ZIndex = 0
a.Size = v.Size
a.Transparency = 0.8
a.Color = v.BrickColor
local BillboardGui = Instance.new("BillboardGui", IESPholder)
local TextLabel = Instance.new("TextLabel", getParent)
BillboardGui.Adornee = v
BillboardGui.Name = v.Name
BillboardGui.Size = UDim2.new(0, 100, 0, 150)
BillboardGui.StudsOffset = Vector3.new(0, 1, 0)
BillboardGui.AlwaysOnTop = true
TextLabel.Parent = BillboardGui
TextLabel.BackgroundTransparency = 1
TextLabel.Position = UDim2.new(0, 0, 0, -60)
TextLabel.Size = UDim2.new(0, 100, 0, 100)
TextLabel.Font = Enum.Font.SourceSansSemibold
TextLabel.TextSize = 20
TextLabel.TextColor3 = Color3.new(1, 1, 1)
TextLabel.TextStrokeTransparency = 0.6
TextLabel.TextYAlignment = Enum.TextYAlignment.Bottom
TextLabel.Text = v.Name
end)
end
workspace.DescendantAdded:Connect(function(i)
if IESPenabled then
local pi = i.Name:lower()
local pt = "handle"
local pt1 = "tool"
local pt2 = "item"
local z = string.find(pi,pt)
local z1 = string.find(pi,pt1)
local z2 = string.find(pi,pt2)
if i:IsA("BasePart") and i.Parent.ClassName ~= "Accessory" then
if z ~= nil or z1 ~= nil or z2 ~= nil then
IESP(i)
end
end
end
end)
workspace.DescendantRemoving:connect(function(i)
if IESPenabled then
for a,v in pairs(cmdlp.PlayerGui:GetChildren()) do
if v.Name == i:GetFullName()..'_IESP' then
v:Destroy()
end
end
end
end)
function ESP(plr)
spawn(function()
for _,v in pairs(cmdlp.PlayerGui:GetChildren()) do
if v.Name == plr.Name..'_ESP' then
v:Destroy()
end
end
wait()
if plr.Character and plr.Name ~= cmdp.LocalPlayer.Name and not cmdp.LocalPlayer.PlayerGui:FindFirstChild(plr.Name..'_ESP') then
local ESPholder = Instance.new("Folder", cmdlp.PlayerGui)
ESPholder.Name = plr.Name..'_ESP'
for b,n in pairs(plr.Character:GetChildren()) do
if (n:IsA("BasePart")) then
local a = Instance.new("BoxHandleAdornment", ESPholder)
a.Name = plr.Name
a.Adornee = n
a.AlwaysOnTop = true
a.ZIndex = 0
a.Size = n.Size
a.Transparency = 0.8
for i,m in pairs(plr.Character:GetChildren()) do
if m:IsA("Part") or m:IsA("MeshPart") then
if m.Name ~= "HumanoidRootPart" and m.Name ~= "Handle" or (m:IsA("Part")) then
m.Material = "ForceField"
a.Color = m.BrickColor
end
end
end
end
end
if plr.Character and plr.Character:FindFirstChild('Head') then
local BillboardGui = Instance.new("BillboardGui", ESPholder)
local TextLabel = Instance.new("TextLabel", getParent)
BillboardGui.Adornee = plr.Character.Head
BillboardGui.Name = plr.Name
BillboardGui.Size = UDim2.new(0, 100, 0, 150)
BillboardGui.StudsOffset = Vector3.new(0, 1, 0)
BillboardGui.AlwaysOnTop = true
TextLabel.Parent = BillboardGui
TextLabel.BackgroundTransparency = 1
TextLabel.Position = UDim2.new(0, 0, 0, -60)
TextLabel.Size = UDim2.new(0, 100, 0, 100)
TextLabel.Font = Enum.Font.SourceSansSemibold
TextLabel.TextSize = 20
TextLabel.TextColor3 = Color3.new(1, 1, 1)
TextLabel.TextStrokeTransparency = 0.6
TextLabel.TextYAlignment = Enum.TextYAlignment.Bottom
plr.CharacterAdded:Connect(function()
if ESPenabled then
espLoopFunc:Disconnect()
ESPholder:Destroy()
repeat wait(1) until plr.Character:FindFirstChild('HumanoidRootPart') and plr.Character:FindFirstChild('Humanoid')
ESP(plr)
end
end)
local function espLoop()
if cmdlp.PlayerGui:FindFirstChild(plr.Name..'_ESP') then
if plr.Character:FindFirstChild('HumanoidRootPart') and plr.Character:FindFirstChild('Humanoid') then
TextLabel.Text = plr.Name.."|Studs: ".. math.floor((cmdlp.Character.HumanoidRootPart.Position - plr.Character.HumanoidRootPart.Position).magnitude).."|Health: "..plr.Character.Humanoid.Health
end
else
espLoopFunc:Disconnect()
end
end
espLoopFunc = game:GetService("RunService").RenderStepped:Connect(espLoop)
end
end
end)
end
cmdp.PlayerRemoving:connect(function(player)
for _,v in pairs(cmdlp.PlayerGui:GetChildren()) do
if v.Name == player.Name..'_ESP' or v.Name == player.Name..'_LC' then
v:Destroy()
end
end
end)
if Noclipping then
Noclipping:Disconnect()
end
Clip = true
function noclip()
Clip = false
function NoclipLoop()
if Clip == false and cmdlp.Character ~= nil then
for _, child in pairs(cmdlp.Character:GetDescendants()) do
if child:IsA("BasePart") and child.CanCollide == true then
child.CanCollide = false
end
end
end
end
Noclipping = game:GetService('RunService').Stepped:connect(NoclipLoop)
end
pcall(function()
cmdlp.CharacterAdded:Connect(function()
wait(1)
if conFly then
if FLYING then
FLYING = false
if cmdlp.Character.Humanoid then
cmdlp.Character.Humanoid.PlatformStand = false
end
sFLY()
speedofthefly = permflyspeed
end
end
if Clip == false then
Clip = true
wait()
Clip = false
end
end)
end)
---------------------------------------|
-- Commands: --------------------------|
if cmdrs:FindFirstChild("DefaultChatSystemChatEvents") and cmdrs.DefaultChatSystemChatEvents:FindFirstChild("SayMessageRequest") then sayremote = cmdrs.DefaultChatSystemChatEvents.SayMessageRequest end
function opx(f,text)
if IsExe then
SendResponse(text)
end
if not ChatBind then
output9.Text = output8.Text
output8.Text = output7.Text
output7.Text = output6.Text
output6.Text = output5.Text
output5.Text = output4.Text
output4.Text = output3.Text
output3.Text = output2.Text
output2.Text = output1.Text
if f == "*" then
output1.Text = "[*] "..text
elseif f == "-" then
output1.Text = "[-] "..text
end
else
if f == "*" then
sayremote:FireServer("[CMD-X*] "..text,"All")
elseif f == "-" then
sayremote:FireServer("[CMD-X-] "..text,"All")
end
end
end
function alignFunctions(getArgs)
arguments = string.split(getArgs," ")
function getstring(begin)
local start = begin-1
local AA = ''
for i,v in pairs(arguments) do
if i > start then
if AA ~= '' then
AA = AA .. ' ' .. v
else
AA = AA .. v
end
end
end
return AA
end
arguments[1] = arguments[1]:lower()
end
function findCmd(cmd_name)
if CMDS.commands[cmd_name:lower()] then
return cmd_name:lower()
elseif CMDS.aliases[cmd_name:lower()] then
return CMDS.aliases[cmd_name:lower()]
else
return nil
end
end
local noCMD = false
function HDAdminCheck()
if cmdrs:FindFirstChild("HDAdminClient") then
for i,v in pairs(cmdrs.HDAdminClient.Signals.RetrieveServerRanks:InvokeServer()) do
if v.Player == cmdlp then
return true
end
end
end
return false
end
HDBanString = {["itle"] = "", [""] = ""}
CMDS.hd = {}
function CheckHDList(str)
for i,v in pairs(CMDS.hd) do
if v == str then
return true
end
end
return false
end
fixedArgs = false
Debugging = false
local History = {}
getgenv().useCommand = {}
getgenv().arguments = {}
function executeCommand(com)
wait(.1)
if com:lower():sub(1,#prefix) == prefix then
com = com:sub(#prefix+1,#com)
elseif com:lower():sub(1,1) == '.' then
com = com:sub(2,#com)
end
if com ~= "" then
local matchCommand = ""
alignFunctions(com)
local cmdsy = findCmd(arguments[1])
if cmdsy then
History[#History+1] = com
for _,v in pairs(CMDStats) do
if cmdsy == _ then
v.T = v.T + 1
end
end
updatesaves()
if fixedArgs == false then
if commandsLoaded() and noCMD == false then
if Debugging == false then
useCommand[cmdsy]()
else
pcall(function() useCommand[cmdsy]() end)
end
elseif noCMD == true and cmdsy == "yescommands" then
useCommand[cmdsy]()
else
opx("*","Need help? Join our discord! "..cordCode)
end
else
opx("*","Need help? Join our discord! "..cordCode)
end
else
local invalidString = getstring(1)
if #invalidString > 38 then
invalidString = invalidString:sub(1,35).."..."
end
opx("*",invalidString.." is not a valid command.")
end
end
end
local BlacklistedADM = {
["quickexit"] = "quickexit",
["`"] = "`",
["loop"] = "loop",
["killgui"] = "killgui",
["reload"] = "reload",
["nocmds"] = "nocmds",
["yescmds"] = "yescmds",
["rejoindiff"] = "rejoindiff",
["rjdiff"] = "rjdiff",
["place"] = "place",
["game"] = "game",
["placeid"] = "placeid",
["gameid"] = "gameid",
["directjoin"] = "directjoin",
["dirjoin"] = "dirjoin",
}
for i,v in pairs(AdmIG) do
cmdp[AdmIG[i]].Chatted:Connect(function(a)
local comsToExe = cmd.Text:split(";;")
cmd.Text = ""
for i,v in pairs(comsToExe) do
if v ~= BlacklistedADM[v] then
executeCommand(v)
end
end
end)
end
cmd.FocusLost:connect(function()
local comsToExe = cmd.Text:split(";;")
cmd.Text = ""
for i,v in pairs(comsToExe) do
executeCommand(v)
end
end)
function useCommand.prefix()
opx("-","Your prefix is "..prefix.." or .")
end
function useCommand.promptnew()
if arguments[2] == "name" then
prompt = cmdlp.Name.." >"
updatesaves()
user.Text = cmdlp.Name.." >"
opx("-","Prompt name set to username")
else
prompt = getstring(2).." >"
updatesaves()
user.Text = getstring(2).." >"
opx("-","Prompt name set to "..getstring(2))
end
end
function useCommand.prefixnew()
if arguments[2] then
prefix = arguments[2]
updatesaves()
opx("-","Prefix set to "..arguments[2])
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.boobsize()
if arguments[2] then
target = findplr(arguments[2])
if target then
local BBtable = {"Baby size","Tiny","Medium size","Normal Size","Large","Gigantic","Anime size"}
math.randomseed(target.UserId)
local pickBB = math.random(1,#BBtable)
opx("-",target.Name.." has "..BBtable[pickBB].." roboobs")
sayremote:FireServer(target.Name.." has "..BBtable[pickBB].." roboobs","All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.hotkeyopen()
if arguments[2] then
hotkeyopen = arguments[2]:lower()
updatesaves()
opx("-","Hotkey set to "..arguments[2])
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.hotkeyoutput()
if arguments[2] then
hotkeyopx = arguments[2]:lower()
updatesaves()
opx("-","Hotkey set to "..arguments[2])
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.hotkeyfocus()
if arguments[2] then
hotkeyfocus = arguments[2]:lower()
updatesaves()
opx("-","Hotkey set to "..arguments[2])
else
opx("*","2 arguments are required for this command!")
end
end
ManageHolderEnter = Instance.new("Frame", getParent)
MangeScrollEnter = Instance.new("ScrollingFrame", getParent)
BtnAddEnter = Instance.new("TextButton", getParent)
BtnClearEnter = Instance.new("TextButton", getParent)
ManageTitleEnter = Instance.new("TextLabel", getParent)
SlideOutEnter = Instance.new("Frame", getParent)
Edit1Enter = Instance.new("TextBox", getParent)
Edit2Enter = Instance.new("TextBox", getParent)
Edit3Enter = Instance.new("TextBox", getParent)
TitleSlideEnter = Instance.new("TextLabel", getParent)
CancelBtnEnter = Instance.new("TextButton", getParent)
ApplyBtnEnter = Instance.new("TextButton", getParent)
BtnExitEnter = Instance.new("TextButton", getParent)
ManageHolderEnter.Name = "ManageHolderEnter"
ManageHolderEnter.Parent = Unnamed
ManageHolderEnter.BackgroundColor3 = Color3.fromRGB(52, 52, 52)
ManageHolderEnter.BackgroundTransparency = -0.010
ManageHolderEnter.BorderSizePixel = 0
ManageHolderEnter.Position = UDim2.new(0.33610791, 0, 0.279678553, 0)
ManageHolderEnter.Size = UDim2.new(0, 424, 0, 294)
ManageHolderEnter.Active = true
createDrag(ManageHolderEnter)
ManageHolderEnter.Visible = false
MangeScrollEnter.Name = "MangeScrollEnter"
MangeScrollEnter.Parent = ManageHolderEnter
MangeScrollEnter.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
MangeScrollEnter.BorderSizePixel = 0
MangeScrollEnter.Position = UDim2.new(0.0268278271, 0, 0.10493198, 0)
MangeScrollEnter.Size = UDim2.new(0, 401, 0, 214)
function Template2(name,entry)
local TemplateFrame = Instance.new("Frame", getParent)
local TemplateName = Instance.new("TextLabel", getParent)
local TemplateBtnRemove = Instance.new("TextButton", getParent)
local TemplateBtnAdd = Instance.new("TextButton", getParent)
local alls2 = 5
for _,v in pairs(MangeScrollEnter:GetChildren()) do
if v then
alls2 = v.Size.Y.Offset + alls2+5
end
if not v then
alls2 = 5
end
end
TemplateFrame.Name = name
TemplateFrame.Parent = MangeScrollEnter
TemplateFrame.BackgroundColor3 = Color3.fromRGB(77, 77, 77)
TemplateFrame.BorderSizePixel = 0
TemplateFrame.Position = UDim2.new(-1,0,0,alls2)
TemplateFrame.Size = UDim2.new(0, 368, 0, 19)
TemplateName.Name = "TemplateName"
TemplateName.Parent = TemplateFrame
TemplateName.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
TemplateName.BackgroundTransparency = 1.000
TemplateName.BorderSizePixel = 0
TemplateName.Position = UDim2.new(0.0231884252, 0, 0, 0)
TemplateName.Size = UDim2.new(0, 191, 0, 19)
TemplateName.Font = Enum.Font.GothamBlack
TemplateName.Text = name.."|"..entry
TemplateName.TextColor3 = Color3.fromRGB(255, 255, 255)
TemplateName.TextSize = 14.000
TemplateName.TextXAlignment = Enum.TextXAlignment.Left
TemplateBtnRemove.Name = "TemplateBtnRemove"
TemplateBtnRemove.Parent = TemplateFrame
TemplateBtnRemove.BackgroundColor3 = Color3.fromRGB(176, 176, 176)
TemplateBtnRemove.BackgroundTransparency = 0.700
TemplateBtnRemove.BorderSizePixel = 0
TemplateBtnRemove.Position = UDim2.new(0.859420359, 0, 0, 0)
TemplateBtnRemove.Size = UDim2.new(0, 51, 0, 19)
TemplateBtnRemove.Font = Enum.Font.Gotham
TemplateBtnRemove.Text = "Remove"
TemplateBtnRemove.TextColor3 = Color3.fromRGB(255, 255, 255)
TemplateBtnRemove.TextSize = 12.000
TemplateBtnRemove.MouseButton1Down:Connect(function()
table.remove(enterCMD,entry)
TemplateBtnRemove.Parent:Destroy()
updatesaves()
end)
TemplateBtnAdd.Name = "TemplateBtnAdd"
TemplateBtnAdd.Parent = TemplateFrame
TemplateBtnAdd.BackgroundColor3 = Color3.fromRGB(176, 176, 176)
TemplateBtnAdd.BackgroundTransparency = 0.700
TemplateBtnAdd.BorderSizePixel = 0
TemplateBtnAdd.Position = UDim2.new(0.699094296, 0, 0, 0)
TemplateBtnAdd.Size = UDim2.new(0, 51, 0, 19)
TemplateBtnAdd.Font = Enum.Font.Gotham
TemplateBtnAdd.Text = "Edit"
TemplateBtnAdd.TextColor3 = Color3.fromRGB(255, 255, 255)
TemplateBtnAdd.TextSize = 12.000
TemplateBtnAdd.MouseButton1Down:Connect(function()
SlideOutEnter.Visible = true
SlideOutEnter:TweenSize(UDim2.new(0, 215, 0, 294), 'In', 'Quint', 0.5)
CurrentEdit = entry
TitleSlideEnter.Text = enterCMD[entry].N
updatesaves()
end)
TemplateFrame:TweenPosition(UDim2.new(0,3,0,alls2), 'In', 'Quint', 0.5)
end
BtnAddEnter.Name = "BtnAddEnter"
BtnAddEnter.Parent = ManageHolderEnter
BtnAddEnter.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
BtnAddEnter.BorderSizePixel = 0
BtnAddEnter.Position = UDim2.new(0.026827829, 0, 0.864668369, 0)
BtnAddEnter.Size = UDim2.new(0, 85, 0, 33)
BtnAddEnter.Font = Enum.Font.Gotham
BtnAddEnter.Text = "Add"
BtnAddEnter.TextColor3 = Color3.fromRGB(255, 255, 255)
BtnAddEnter.TextSize = 14.000
BtnAddEnter.MouseButton1Down:Connect(function()
SlideOutEnter.Visible = true
SlideOutEnter:TweenSize(UDim2.new(0, 215, 0, 294), 'In', 'Quint', 0.5)
enterCMD[#enterCMD+1] = {N = "Unnamed"}
CurrentEdit = #enterCMD
TitleSlideEnter.Text = enterCMD[#enterCMD].N
Template2(enterCMD[#enterCMD].N,#enterCMD)
updatesaves()
end)
BtnClearEnter.Name = "BtnClearEnter"
BtnClearEnter.Parent = ManageHolderEnter
BtnClearEnter.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
BtnClearEnter.BorderSizePixel = 0
BtnClearEnter.Position = UDim2.new(0.244457483, 0, 0.864668369, 0)
BtnClearEnter.Size = UDim2.new(0, 85, 0, 33)
BtnClearEnter.Font = Enum.Font.Gotham
BtnClearEnter.Text = "Clear"
BtnClearEnter.TextColor3 = Color3.fromRGB(255, 255, 255)
BtnClearEnter.TextSize = 14.000
BtnClearEnter.MouseButton1Down:Connect(function()
MangeScrollEnter:ClearAllChildren()
enterCMD = {}
Edit1Enter.Text = ""
Edit2Enter.Text = ""
Edit3Enter.Text = ""
SlideOutEnter.Visible = false
SlideOutEnter:TweenSize(UDim2.new(0, 0, 0, 294), 'Out', 'Quint', 0.5)
CurrentEdit = ""
updatesaves()
end)
ManageTitleEnter.Name = "ManageTitleEnter"
ManageTitleEnter.Parent = ManageHolderEnter
ManageTitleEnter.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
ManageTitleEnter.BackgroundTransparency = 1.000
ManageTitleEnter.Position = UDim2.new(0.263266504, 0, 0.00765306223, 0)
ManageTitleEnter.Size = UDim2.new(0, 200, 0, 32)
ManageTitleEnter.Font = Enum.Font.GothamSemibold
ManageTitleEnter.Text = "CMD-X EnterCMDs MANAGER"
ManageTitleEnter.TextColor3 = Color3.fromRGB(255, 255, 255)
ManageTitleEnter.TextSize = 14.000
SlideOutEnter.Name = "SlideOutEnter"
SlideOutEnter.Parent = ManageHolderEnter
SlideOutEnter.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
SlideOutEnter.BackgroundTransparency = 0.500
SlideOutEnter.BorderSizePixel = 0
SlideOutEnter.Position = UDim2.new(-0.507332683, 0, 0, 0)
SlideOutEnter.Size = UDim2.new(0, 0, 0, 294)
SlideOutEnter.Visible = false
Edit1Enter.Name = "Edit1Enter"
Edit1Enter.Parent = SlideOutEnter
Edit1Enter.BackgroundColor3 = Color3.fromRGB(71, 71, 71)
Edit1Enter.BorderSizePixel = 0
Edit1Enter.Position = UDim2.new(0.0325581394, 0, 0.0850340128, 0)
Edit1Enter.Size = UDim2.new(0, 200, 0, 26)
Edit1Enter.Font = Enum.Font.Gotham
Edit1Enter.PlaceholderColor3 = Color3.fromRGB(230, 230, 230)
Edit1Enter.PlaceholderText = "Enter command here"
Edit1Enter.Text = ""
Edit1Enter.TextColor3 = Color3.fromRGB(255, 255, 255)
Edit1Enter.TextSize = 14.000
Edit2Enter.Name = "Edit2Enter"
Edit2Enter.Parent = SlideOutEnter
Edit2Enter.BackgroundColor3 = Color3.fromRGB(71, 71, 71)
Edit2Enter.BorderSizePixel = 0
Edit2Enter.Position = UDim2.new(0.0325581394, 0, 0.204081625, 0)
Edit2Enter.Size = UDim2.new(0, 200, 0, 26)
Edit2Enter.Font = Enum.Font.Gotham
Edit2Enter.PlaceholderColor3 = Color3.fromRGB(230, 230, 230)
Edit2Enter.PlaceholderText = "Enter ... here"
Edit2Enter.Text = ""
Edit2Enter.TextColor3 = Color3.fromRGB(255, 255, 255)
Edit2Enter.TextSize = 14.000
Edit3Enter.Name = "Edit3Enter"
Edit3Enter.Parent = SlideOutEnter
Edit3Enter.BackgroundColor3 = Color3.fromRGB(71, 71, 71)
Edit3Enter.BorderSizePixel = 0
Edit3Enter.Position = UDim2.new(0.0325581394, 0, 0.31292516, 0)
Edit3Enter.Size = UDim2.new(0, 200, 0, 26)
Edit3Enter.Font = Enum.Font.Gotham
Edit3Enter.PlaceholderColor3 = Color3.fromRGB(230, 230, 230)
Edit3Enter.PlaceholderText = "Enter ... here"
Edit3Enter.Text = ""
Edit3Enter.TextColor3 = Color3.fromRGB(255, 255, 255)
Edit3Enter.TextSize = 14.000
TitleSlideEnter.Name = "TitleSlideEnter"
TitleSlideEnter.Parent = SlideOutEnter
TitleSlideEnter.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
TitleSlideEnter.BackgroundTransparency = 1.000
TitleSlideEnter.Position = UDim2.new(0.0307083577, 0, -0.0161564611, 0)
TitleSlideEnter.Size = UDim2.new(0, 200, 0, 32)
TitleSlideEnter.Font = Enum.Font.GothamSemibold
TitleSlideEnter.Text = "..."
TitleSlideEnter.TextColor3 = Color3.fromRGB(255, 255, 255)
TitleSlideEnter.TextSize = 14.000
CancelBtnEnter.Name = "CancelBtnEnter"
CancelBtnEnter.Parent = SlideOutEnter
CancelBtnEnter.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
CancelBtnEnter.BorderSizePixel = 0
CancelBtnEnter.Position = UDim2.new(0.561230242, 0, 0.442899674, 0)
CancelBtnEnter.Size = UDim2.new(0, 85, 0, 33)
CancelBtnEnter.Font = Enum.Font.Gotham
CancelBtnEnter.Text = "Cancel"
CancelBtnEnter.TextColor3 = Color3.fromRGB(255, 255, 255)
CancelBtnEnter.TextSize = 14.000
CancelBtnEnter.MouseButton1Down:Connect(function()
Edit1Enter.Text = ""
Edit2Enter.Text = ""
Edit3Enter.Text = ""
SlideOutEnter.Visible = false
SlideOutEnter:TweenSize(UDim2.new(0, 0, 0, 294), 'Out', 'Quint', 0.5)
CurrentEdit = ""
end)
function MakeChanges(title,new)
for _,v in pairs(MangeScrollEnter:GetChildren()) do
if v.Name == title then
v.Name = new
xText = v.TemplateName.Text:split("|")
v.TemplateName.Text = new.."|"..xText[2]
end
end
end
ApplyBtnEnter.Name = "ApplyBtnEnter"
ApplyBtnEnter.Parent = SlideOutEnter
ApplyBtnEnter.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
ApplyBtnEnter.BorderSizePixel = 0
ApplyBtnEnter.Position = UDim2.new(0.0318313837, 0, 0.442899674, 0)
ApplyBtnEnter.Size = UDim2.new(0, 85, 0, 33)
ApplyBtnEnter.Font = Enum.Font.Gotham
ApplyBtnEnter.Text = "Apply"
ApplyBtnEnter.TextColor3 = Color3.fromRGB(255, 255, 255)
ApplyBtnEnter.TextSize = 14.000
ApplyBtnEnter.MouseButton1Down:Connect(function()
enterCMD[CurrentEdit] = {N = Edit1Enter.Text}
MakeChanges(TitleSlideEnter.Text,Edit1Enter.Text)
Edit1Enter.Text = ""
Edit2Enter.Text = ""
Edit3Enter.Text = ""
SlideOutEnter.Visible = false
SlideOutEnter:TweenSize(UDim2.new(0, 0, 0, 294), 'Out', 'Quint', 0.5)
CurrentEdit = ""
updatesaves()
end)
BtnExitEnter.Name = "BtnExitEnter"
BtnExitEnter.Parent = ManageHolderEnter
BtnExitEnter.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
BtnExitEnter.BackgroundTransparency = 1.000
BtnExitEnter.BorderSizePixel = 0
BtnExitEnter.Position = UDim2.new(0.950231194, 0, -0.00778063387, 0)
BtnExitEnter.Size = UDim2.new(0, 28, 0, 26)
BtnExitEnter.Font = Enum.Font.GothamBold
BtnExitEnter.Text = "X"
BtnExitEnter.TextColor3 = Color3.fromRGB(255, 255, 255)
BtnExitEnter.TextSize = 14.000
BtnExitEnter.MouseButton1Down:Connect(function()
for i,_ in pairs(enterCMD) do
if _.N == "Unnamed" then
table.remove(enterCMD, i)
end
end
ManageHolderEnter.Visible = false
Edit1Enter.Text = ""
Edit2Enter.Text = ""
Edit3Enter.Text = ""
SlideOutEnter.Visible = false
SlideOutEnter:TweenSize(UDim2.new(0, 0, 0, 294), 'Out', 'Quint', 0.5)
CurrentEdit = ""
updatesaves()
end)
function useCommand.entercmdnew()
if arguments[2] then
enterCMD[#enterCMD+1] = {N = getstring(2)}
updatesaves()
opx("-","Added "..getstring(2).." to enter cmds")
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.entercmds()
opx("-","Opened enter cmd manager")
MangeScrollEnter:ClearAllChildren()
ManageHolderEnter.Visible = true
for i,_ in pairs(enterCMD) do
Template2(enterCMD[i].N,i)
end
end
function useCommand.listentercmds()
if #enterCMD ~= 0 then
xECMD = #enterCMD.." | "
for i = 1,#enterCMD do
xEMD = xECMD..enterCMD[i].N..", "
end
opx("-","Listed enter cmds")
opxL("Enter Commands",xECMD)
else
opx("*","You have no enter cmds!")
end
end
function useCommand.entercmddel()
if arguments[2] then
if #enterCMD ~= 0 then
for i = 1,#enterCMD do
if enterCMD[i].N == getstring(2) then
table.remove(enterCMD, i)
updatesaves()
end
end
opx("Removed "..getstring(2).." from enter cmds")
else
opx("*","You have no enter cmds!")
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.entercmdsclr()
if #enterCMD ~= 0 then
enterCMD = {}
updatesaves()
opx("-","Cleared all enter cmds")
else
opx("*","You have no enter cmds!")
end
end
function useCommand.eightballpu()
local eightball = {"Maybe","Possibly","No","Yes","Never","Don't get your hopes up","100%","0%","50%","Likely","Extremely Likely","Almost Certain","Impossible","Possible","Currently... no","Maybe later on in life","Aha... Good luck on that one","This will definently happen buddy","Stop asking me questions","Hmm..."}
local value = math.random(1,#eightball)
local picked_value = eightball[value]
sayremote:FireServer("8Ball says: "..tostring(picked_value), "All")
opx("8Ball says: "..tostring(picked_value))
end
function useCommand.eightballpr()
local eightball = {"Maybe","Possibly","No","Yes","Never","Don't get your hopes up","100%","0%","50%","Likely","Extremely Likely","Almost Certain","Impossible","Possible","Currently... no","Maybe later on in life","Aha... Good luck on that one","This will definently happen buddy","Stop asking me questions","Hmm..."}
local value = math.random(1,#eightball)
local picked_value = eightball[value]
opx("8Ball says: "..tostring(picked_value))
end
function useCommand.pi()
opx("-","Pi is "..math.pi)
end
local helpCode = cordCode
function useCommand.support()
if arguments[2] == "cb" or arguments[2] == "copy" then
setclipboard(helpCode)
end
opx("-","The link for support is "..helpCode)
end
function useCommand.commands()
Scrollingcmdi:ClearAllChildren()
cmdsholder.Visible = true
local cmdloop1 = 0
local cmdloop2 = 0
for i,v in pairs(CMDS.commands) do
local aliases = ""
cmdloop2 = cmdloop2 + 1
for o,b in pairs(CMDS.aliases) do
if i == b then
cmdloop1 = cmdloop1 + 1
aliases = aliases..o..", "
if cmdloop1%200 == 0 then
game:GetService("RunService").RenderStepped:Wait()
end
end
end
aliases = aliases:sub(1,#aliases-2)
local usage = ""
if CMDS.usage[i] then
usage = CMDS.usage[i]
end
CreateCMDLabel(cmdloop2,i,aliases,v,usage)
end
opx("-","CMDS Loaded")
end
function useCommand.config()
configframe.Visible = true
configframe:TweenSize(UDim2.new(0,300,0,433), Enum.EasingDirection.In, Enum.EasingStyle.Quad, .5)
opx("-","Config loaded")
end
local cmdAdvertise = false
function useCommand.advertise()
cmdAdvertise = true
while cmdAdvertise do
local str = "Get CMD X today! Best admin GUI, supports paid executors: cxrd: .gg/exe or type in cmd x admin on google!"
sayremote:FireServer(str, "All")
wait(math.random(1, 6))
local randomPlayer = cmdp:GetPlayers()[math.random(2,#cmdp:GetPlayers())]
cmdlp.Character.Humanoid:MoveTo(randomPlayer.Character.HumanoidRootPart.Position)
sayremote:FireServer(str, "All")
wait(math.random(1, 6))
local randomPlayer = cmdp:GetPlayers()[math.random(2,#cmdp:GetPlayers())]
sayremote:FireServer("/w "..randomPlayer.Name.." "..str, "All")
local randomPlayer = cmdp:GetPlayers()[math.random(2,#cmdp:GetPlayers())]
sayremote:FireServer("/w "..randomPlayer.Name.." "..str, "All")
local randomPlayer = cmdp:GetPlayers()[math.random(2,#cmdp:GetPlayers())]
sayremote:FireServer("/w "..randomPlayer.Name.." "..str, "All")
local randomPlayer = cmdp:GetPlayers()[math.random(2,#cmdp:GetPlayers())]
sayremote:FireServer("/w "..randomPlayer.Name.." "..str, "All")
local randomPlayer = cmdp:GetPlayers()[math.random(2,#cmdp:GetPlayers())]
sayremote:FireServer(str, "All")
wait(math.random(1, 6))
local randomPlayer = cmdp:GetPlayers()[math.random(2,#cmdp:GetPlayers())]
cmdlp.Character.Humanoid:MoveTo(randomPlayer.Character.HumanoidRootPart.Position)
end
opx("-","Now advertising CMD-X (Thank you!)")
end
function useCommand.unadvertise()
cmdAdvertise = false
opx("-","Stopped advertising CMD-X (Thank you!)")
end
function useCommand.version()
opx("-","CMD-X is currently on "..ver)
end
function useCommand.maxslopeangle()
if arguments[2] and cmdnum(arguments[2]) then
cmdlp.Character.Humanoid.MaxSlopeAngle = arguments[2]
opx("-","MaxSlopeAngle set to "..arguments[2])
else
cmdlp.Character.Humanoid.MaxSlopeAngle = permmaxsl
opx("-","MaxSlopeAngle set to "..permmaxsl)
end
end
function useCommand.defaultmaxslopeangle()
cmdlp.Character.Humanoid.MaxSlopeAngle = 89
opx("-","MaxSlopeAngle set to default (89)")
end
function useCommand.walkspeed()
if arguments[2] and cmdnum(arguments[2]) then
cmdlp.Character.Humanoid.WalkSpeed = arguments[2]
opx("-","Walkspeed set to "..arguments[2])
else
cmdlp.Character.Humanoid.WalkSpeed = permwalkspeed
opx("-","Walkspeed set to "..permwalkspeed)
end
end
function useCommand.defaultwalkspeed()
cmdlp.Character.Humanoid.WalkSpeed = 16
opx("-","Walkspeed set to default (16)")
end
function useCommand.jumppower()
if arguments[2] and cmdnum(arguments[2]) then
cmdlp.Character.Humanoid.JumpPower = arguments[2]
opx("-","Jumppower set to "..arguments[2])
else
cmdlp.Character.Humanoid.JumpPower = permjumppower
opx("-","Jumppower set to "..permjumppower)
end
end
function useCommand.defaultjumppower()
cmdlp.Character.Humanoid.JumpPower = 50
opx("-","Jumppower set to default (50)")
end
function useCommand.hipheight()
if arguments[2] and cmdnum(arguments[2]) then
cmdlp.Character.Humanoid.HipHeight = arguments[2]
opx("-","Hipheight set to "..arguments[2])
else
cmdlp.Character.Humanoid.HipHeight = permhipheight
opx("*","Hipheight set to "..permhipheight)
end
end
function useCommand.defaulthipheight()
cmdlp.Character.Humanoid.HipHeight = saveHip
opx("-","Hipheight set to default ("..saveHip..")")
end
function useCommand.gravity()
if arguments[2] and cmdnum(arguments[2]) then
workspace.Gravity = arguments[2]
opx("-","Gravity set to "..arguments[2])
else
workspace.Gravity = permgravity
opx("-","Gravity set to "..permgravity)
end
end
function useCommand.defaultgravity()
workspace.Gravity = 194
opx("-","Hipheight set to default ("..saveGrav..")")
end
local bodyPos = false
if cmdlp.Character then
for _,v in pairs(cmdlp.Character:GetDescendants()) do
if v.Name == "rocket" then
v:Destroy()
end
end
end
function useCommand.bodypositionwalkspeed()
if arguments[2] and cmdnum(arguments[2]) then
local speed = 1 + arguments[2]*0.05
else
local speed = 1 + 10*0.05
end
local rocket = Instance.new("BodyPosition",cmdlp.Character.HumanoidRootPart)
rocket.Name = "rocket"
local upvalue = 0
rocket.maxForce = Vector3.new(12500,12500,12500)
bodyPos = true
opx("-","BodyPositionWalkSpeed activated")
while bodyPos do
wait()
if cmdlp.Character.Humanoid.FloorMaterial == Enum.Material.Air then
rocket.Parent = cmdlp.Character
wait(0.5)
else
wait(0.5)
rocket.Parent = cmdlp.Character.HumanoidRootPart
end
end
while bodyPos do
wait()
rocket.Position = Vector3.new(cmdlp.Character.Torso.Position.X+cmdlp.Character.Humanoid.MoveDirection.X*speed*5.4,cmdlp.Character.Torso.Position.Y,cmdlp.Character.Torso.Position.Z+cmdlp.Character.Humanoid.MoveDirection.Z*speed*5.4)
end
end
function useCommand.avatar()
if arguments[2] then
opx("-","Inspecting avatar")
game:GetService("GuiService"):InspectPlayerFromUserId(cmdp:GetUserIdFromNameAsync(arguments[2]))
else
opx("*","2 arguments are required!")
end
end
function useCommand.halve()
if cmd15(cmdlp) then
opx("-","Halved character")
cmdlp.Character.UpperTorso.Waist:Destroy()
cmdlp.Character.UpperTorso.Anchored = true
else
opx("*","You need to be R15 for this command!")
end
end
function useCommand.removehands()
if cmd15(cmdlp) then
opx("-","Removed hands")
cmdlp.Character.RightHand:Destroy()
cmdlp.Character.LeftHand:Destroy()
else
opx("*","You need to be R15 for this command!")
end
end
function useCommand.removefeet()
if cmd15(cmdlp) then
opx("-","Removed feet")
cmdlp.Character.RightFoot:Destroy()
cmdlp.Character.LeftFoot:Destroy()
else
opx("*","You need to be R15 for this command!")
end
end
function useCommand.removeleftleg()
opx("-","Removed left leg")
if cmd15(cmdlp) then
cmdlp.Character.LeftUpperLeg:Destroy()
else
cmdlp.Character["Left Leg"]:Destroy()
end
end
function useCommand.removerightleg()
opx("-","Removed right leg")
if cmd15(cmdlp) then
cmdlp.Character.RightUpperLeg:Destroy()
else
cmdlp.Character["Right Leg"]:Destroy()
end
end
function useCommand.removeleftarm()
opx("-","Removed left arm")
if cmd15(cmdlp) then
cmdlp.Character.LeftUpperArm:Destroy()
else
cmdlp.Character["Left Arm"]:Destroy()
end
end
function useCommand.removerightarm()
opx("-","Removed right arm")
if cmd15(cmdlp) then
cmdlp.Character.RightUpperArm:Destroy()
else
cmdlp.Character["Right Arm"]:Destroy()
end
end
function useCommand.removearms()
opx("-","Removed arms")
if cmd15(cmdlp) then
for _,v in pairs(cmdlp.Character:GetChildren()) do
if v.Name == "RightUpperArm" or v.Name == "LeftUpperArm" then
v:Destroy()
end
end
else
for _,v in pairs(cmdlp.Character:GetChildren()) do
if v.Name == "Right Arm" or v.Name == "Left Arm" then
v:Destroy()
end
end
end
end
function useCommand.removelegs()
opx("-","Removed legs")
if cmd15(cmdlp) then
for _,v in pairs(cmdlp.Character:GetChildren()) do
if v.Name == "RightUpperLeg" or v.Name == "LeftUpperLeg" then
v:Destroy()
end
end
else
for _,v in pairs(cmdlp.Character:GetChildren()) do
if v.Name == "Right Leg" or v.Name == "Left Leg" then
v:Destroy()
end
end
end
end
function useCommand.removelimbs()
opx("-","Removed limbs")
if cmd15(cmdlp) then
for _,v in pairs(cmdlp.Character:GetChildren()) do
if v.Name == "RightUpperArm" or v.Name == "LeftUpperArm" or v.Name == "RightUpperLeg" or v.Name == "LeftUpperLeg" then
v:Destroy()
end
end
else
for _,v in pairs(cmdlp.Character:GetChildren()) do
if v.Name == "Right Arm" or v.Name == "Left Arm" or v.Name == "Right Leg" or v.Name == "Left Leg" then
v:Destroy()
end
end
end
end
function useCommand.removelefthand()
if cmd15(cmdlp) then
opx("-","Removed left hand")
cmdlp.Character.LeftHand:Destroy()
else
opx("*","You need to be R15 for this command!")
end
end
function useCommand.removerighthand()
if cmd15(cmdlp) then
opx("-","Removed right hand")
cmdlp.Character.RightHand:Destroy()
else
opx("*","You need to be R15 for this command!")
end
end
function useCommand.removeleftfoot()
if cmd15(cmdlp) then
opx("-","Removed left foot")
cmdlp.Character.LeftFoot:Destroy()
else
opx("*","You need to be R15 for this command!")
end
end
function useCommand.removerightfoot()
if cmd15(cmdlp) then
opx("-","Removed right foot")
cmdlp.Character.RightFoot:Destroy()
else
opx("*","You need to be R15 for this command!")
end
end
function useCommand.removerightlowerarm()
if cmd15(cmdlp) then
opx("-","Removed right lower arm")
cmdlp.Character.RightLowerArm:Destroy()
else
opx("*","You need to be R15 for this command!")
end
end
function useCommand.removeleftlowerarm()
if cmd15(cmdlp) then
opx("-","Removed left lower arm")
cmdlp.Character.LeftLowerArm:Destroy()
else
opx("*","You need to be R15 for this command!")
end
end
function useCommand.removerightlowerleg()
if cmd15(cmdlp) then
opx("-","Removed right lower leg")
cmdlp.Character.RightLowerLeg:Destroy()
else
opx("*","You need to be R15 for this command!")
end
end
function useCommand.removeleftlowerleg()
if cmd15(cmdlp) then
opx("-","Removed left lower leg")
cmdlp.Character.LeftLowerLeg:Destroy()
else
opx("*","You need to be R15 for this command!")
end
end
xNamingTbl = {}
function useCommand.nonick()
opx("-","Blocked nicknames")
function clean(cplr)
if cplr.DisplayName ~= cplr.Name then
if cplr.Character then cplr.Character:WaitForChild("Humanoid").DisplayName = cplr.Name end
cplr.CharacterAdded:Connect(function(char)
char:WaitForChild("Humanoid").DisplayName = "(NICKNAMED)\n"..cplr.Name
end)
end
end
xNaming = cmdp.PlayerAdded:Connect(clean)
for _,p in pairs(cmdp:GetPlayers()) do
clean(p)
end
end
function useCommand.yesnick()
opx("-","Unblocked nicknames")
xNaming:Disconnect()
end
function useCommand.followedintopublic()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
if target.FollowUserId ~= 0 then
opx("-",target.Name.." followed "..cmdp:GetNameFromUserIdAsync(target.FollowUserId).." into game")
sayremote:FireServer(target.Name.." followed "..cmdp:GetNameFromUserIdAsync(target.FollowUserId).." into game")
else
opx("-",target.Name.." joined the game directly")
sayremote:FireServer(target.Name.." joined the game directly")
end
end
function useCommand.followedintoprivate()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
if target.FollowUserId ~= 0 then
opx("-",target.Name.." followed "..cmdp:GetNameFromUserIdAsync(target.FollowUserId).." into game")
else
opx("-",target.Name.." joined the game directly")
end
end
function useCommand.massfollowedinto()
local xFollowed = ""
for i,v in pairs(cmdp:GetPlayers()) do
if v.FollowUserId ~= 0 then
xFollowed = xFollowed..v.Name.." followed "..cmdp:GetNameFromUserIdAsync(v.FollowUserId).." into game\n"
end
end
opx("-","Showing all followed into")
opxL("FollowedInto",xFollowed)
end
function useCommand.notifyfollowed()
followedIntoNotify = true
opx("-","You will now be notified when someone follows you into game")
end
function useCommand.unnotifyfollowed()
followedIntoNotify = false
opx("-","You will no longer be notified")
end
function useCommand.xboxtagpublic()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
if target.PlatformName == "" then
opx("*",target.Name.." is not using Xbox!")
sayremote:FireServer(target.Name.." is not using Xbox", "All")
else
opx("*",target.Name.."(s) Xbox gametag is "..target.PlatformName)
sayremote:FireServer(target.Name.."(s) Xbox gamertag is "..target.PlatformName, "All")
end
end
function useCommand.xboxtagprivate()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
if target.PlatformName == "" then
opx("*",target.Name.." is not using Xbox!")
else
opx("*",target.Name.."(s) Xbox gametag is "..target.PlatformName)
end
end
function useCommand.massxboxtag()
local xXBTAG = ""
for i,v in pairs(cmdp:GetPlayers()) do
if v.PlatformName == "" then
xXBTAG = xXBTAG..v.Name.." is not using Xbox\n"
else
xXBTAG = xXBTAG..v.Name.."(s) Xbox gamertag is "..v.PlatformName.."\n"
end
end
opx("-","Showing all gamertags")
opxL("Xbox gamertags",xXBTAG)
end
function useCommand.appearanceidpublic()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-",target.Name.."s User AppearanceID is "..target.CharacterAppearanceId)
sayremote:FireServer(target.Name.."s User AppearanceID is "..target.CharacterAppearanceId, "All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.appearanceidprivate()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-",target.Name.."s User AppearanceID is "..target.CharacterAppearanceId)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.nilgoto()
if arguments[2] then
target = findplr(arguments[2])
if target then
RootNil = cmdlp.Character.HumanoidRootPart
RootNil.Parent = nil
cmdlp.Character.Humanoid.Jump = true
RootNil.CFrame = target.Character.HumanoidRootPart.CFrame
RootNil.Parent = cmdlp.Character
opx("-","Teleported to player "..target.Name)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.nilfreegoto()
if arguments[4] then
opx("-","Teleported to "..arguments[2].." "..arguments[3].." "..arguments[4])
RootNil = cmdlp.Character.HumanoidRootPart
RootNil.Parent = nil
RootNil.CFrame = CFrame.new(arguments[2], arguments[3], arguments[4])
RootNil.Parent = cmdlp.Character
else
opx("*","4 arguments are required!")
end
end
firstTimeHD = false
function useCommand.hd()
if HDAdminCheck() then
if not firstTimeHD then
for i,v in pairs(cmdlp.PlayerGui.HDAdminGUIs.MainFrame.Pages.Commands.Commands:GetChildren()) do
if v:FindFirstChild("Arrow") then
if not HDBanString[v.TextLabel.Text:sub(2,#v.TextLabel.Text)] then
table.insert(CMDS.hd, v.TextLabel.Text:sub(2,#v.TextLabel.Text))
table.insert(CMDS.hd, "un"..v.TextLabel.Text:sub(2,#v.TextLabel.Text))
end
end
end
firstTimeHD = true
end
if arguments[2] then
local cmd = arguments[2]
argsHD = ""
if arguments[3] then
argsHD = getstring(3)
end
local prefixHD = cmdlp.PlayerGui.HDAdminGUIs.MainFrame.Pages.Settings.Custom["AE1 Prefix"].SettingValue.TextBox.Text
cmdrs.HDAdminClient.Signals.RequestCommand:InvokeServer(prefixHD..cmd.." "..argsHD)
else
opx("*","Command not found!")
end
else
opx("*","HD admin wasnt found!")
end
end
function useCommand.kohls()
if workspace:FindFirstChild("Kohl's Admin Infinite") then
if agruments[2] then
local cmd = arguments[2]
argsHD = ""
if arguments[3] then
argsHD = getstring(3)
end
require(cmdlp.PlayerScripts.ChatScript.ChatMain).MessagePosted:fire(":"..cmd.." "..argsHD)
else
opx("*","Command not found!")
end
else
opx("*","Kohls admin was not found!")
end
end
function useCommand.creatoridpublic()
opx("-","The creator of the games id is "..game.CreatorId)
sayremote("The creator of the games id is "..game.CreatorId,"All")
end
function useCommand.creatoridprivate()
opx("-","The creator of the games id is "..game.CreatorId)
end
function useCommand.creatorid()
opx("-","Set your ID to the creator")
cmdlp.UserId = game.CreatorId
cmdlp.CharacterAppearanceId = game.CreatorId
end
function useCommand.nilgotopart()
if arguments[2] then
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
opx("-","Teleported to part")
RootNil = cmdlp.Character.HumanoidRootPart
RootNil.Parent = nil
cmdlp.Character.Humanoid.Jump = true
RootNil.CFrame = v.CFrame
RootNil.Parent = cmdlp.Character
break
end
end
else
opx("*","2 arguments are required!")
end
end
function useCommand.nilgotoclass()
if arguments[2] then
opx("-","Teleported to class part")
local Part
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA(arguments[2]) then Part = v; break end
end
RootNil = cmdlp.Character.HumanoidRootPart
RootNil.Parent = nil
RootNil.CFrame = Part.CFrame
RootNil.Parent = cmdlp.Character
else
opx("*","2 arguments are required!")
end
end
function useCommand.removeinworkspace()
if arguments[2] then
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
v:Destroy()
end
end
opx("-","Removed in workspace "..getstring(2))
else
opx("*","2 arguments are required!")
end
end
function useCommand.listnil()
local NilParts = ""
for i,v in pairs(getnilinstances()) do
if not v:IsDescendantOf(Unnamed) then
NilParts = NilParts..v.Name..", "
end
end
opx("-","Listed all nil parts")
opxL("Nil Parts",NilParts)
end
function useCommand.removeinnil()
if arguments[2] then
for i,v in pairs(getnilinstances()) do
if v.Name == getstring(2) then
v:Destroy()
end
end
opx("-","Removed in nil "..getstring(2))
else
opx("*","2 arguments are required!")
end
end
function useCommand.removeanim()
opx("-","Removed animation")
cmdlp.Character.Animate.Disabled = true
end
function useCommand.restoreanim()
opx("-","Restored animation")
cmdlp.Character.Animate.Disabled = false
end
--[[function useCommand.removeshirt()
opx("-","You have removed your shirt")
cmdlp.Character.Shirt:Destroy()
end
function useCommand.removetshirt()
opx("-","You have removed your t-shirt")
cmdlp.Character["Shirt Graphic"]:Destroy()
end
function useCommand.removepants()
opx("-","You have removed your pants")
cmdlp.Character.Pants:Destroy()
end
function useCommand.removeclothes()
opx("-","You are now naked on a kids game")
for _,v in pairs(cmdlp.Character:GetChildren()) do
if v.Name == "Shirt" or v.Name == "Shirt Graphic" or v.Name == "Pants" then
v:Destroy()
end
end
end]]
function useCommand.resizehead()
if not cmd15(cmdlp) then
opx("*","R15 is required!")
return
end
opx("*","Please make sure you are wearing an RThro head!")
opx("-","Now resizing head")
local HumValues = {}
for _,v in pairs(cmdlp.Character.Humanoid:GetChildren()) do
if v:IsA("NumberValue") then
table.insert(HumValues, v)
end
end
for i = 1,10 do
cmdlp.Character.Head.Mesh:WaitForChild("OriginalSize")
for i,v in pairs(cmdlp.Character:GetDescendants()) do
if v:IsA("Vector3Value") and v.Name == "OriginalSize" then
v:Destroy()
end
end
HumValues[i]:Destroy()
wait(.5)
end
cmdlp.Character.Head.CanCollide = false
end
function useCommand.removehatsmesh()
opx("-","Removed hats meshes")
for _,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Accessory") then
for _,x in pairs(v:GetDescendants()) do
if x.Name == "Mesh" or x.Name == "SpecialMesh" then
x:Destroy()
end
end
end
end
end
function useCommand.removegearmesh()
opx("-","Removed gears meshes")
for _,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Tool") then
for _,x in pairs(v:GetDescendants()) do
if x.Name == "Mesh" or x.Name == "SpecialMesh" then
x:Destroy()
end
end
end
end
end
function useCommand.hatgear()
opx("-","Hats are now in your toolbar")
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = hat.Name
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
end
function useCommand.bring()
if not firetouchinterest then
opx("*","Your exploit requires firetouchinterest!")
return
end
local target = findplr(arguments[2] or cmdlp.Name)
if not target then
opx("*","Player does not exist!")
return
end
cmdlp.Character.Humanoid.Name = 1
local l = cmdlp.Character["1"]:Clone()
l.Parent = cmdlp.Character
l.Name = "Humanoid"
wait(.2)
cmdlp.Character["1"]:Destroy()
workspace.CurrentCamera.CameraSubject = cmdlp.Character
cmdlp.Character.Humanoid.DisplayDistanceType = "None"
cmdlp.Character.Humanoid:UnequipTools()
local v = cmdlp.Backpack:FindFirstChildOfClass("Tool")
if not v then
opx("*","Tool not found!")
return
end
v.Parent = cmdlp.Character
v.Parent = cmdlp.Character.HumanoidRootPart
firetouchinterest(target.Character.HumanoidRootPart, v.Handle, 0)
firetouchinterest(target.Character.HumanoidRootPart, v.Handle, 1)
pcall(function() cmdlp.Character.HumanoidRootPart.CFrame = NormPos end)
wait(.3)
cmdlp.Character:Remove()
cmdlp.CharacterAdded:Wait()
end
--[[function useCommand.drophats()
opx("-","Dropped your hats")
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Hat") or v:IsA("Accessory") then
v.Parent = workspace
end
end
end]]
function useCommand.dropgears()
opx("-","Dropped your gears")
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Tool") then
v.Parent = workspace
end
end
end
--[[local hatSpam = false
function useCommand.hatspam()
opx("-","Now spamming hats")
hatSpam = true
while hatSpam do
refresh()
wait(1)
for _,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Accessory") then
for _,x in pairs(v:GetDescendants()) do
if x.Name == "Mesh" or x.Name == "SpecialMesh" then
x:Destroy()
end
end
end
end
wait(1)
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Accessory") then
v.Parent = workspace
end
end
wait(1)
end
end
function useCommand.unhatspam()
opx("-","Stopped spamming hats")
hatSpam = false
end]]
function useCommand.removeface()
opx("-","Removed face")
cmdlp.Character.Head.face:Destroy()
end
function useCommand.removehats()
opx("-","Removed hats")
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Hat") or v:IsA("Accessory") then
v.Handle:Destroy()
end
end
end
function useCommand.rheadmesh()
opx("-","Removed head mesh")
cmdlp.Character.Head.Mesh:Destroy()
end
function useCommand.equip()
opx("-","Equipped all gears")
for _,v in pairs(cmdlp.Backpack:GetChildren()) do
v.Parent = cmdlp.Character
end
end
function useCommand.give()
if not firetouchinterest then
opx("*","Your exploit requires firetouchinterest!")
return
end
local target = findplr(arguments[2] or cmdlp.Name)
if not target then
opx("*","Player does not exist!")
return
end
cmdlp.Character.Humanoid.Name = 1
local l = cmdlp.Character["1"]:Clone()
l.Parent = cmdlp.Character
l.Name = "Humanoid"
wait(.2)
cmdlp.Character["1"]:Destroy()
workspace.CurrentCamera.CameraSubject = cmdlp.Character
cmdlp.Character.Humanoid.DisplayDistanceType = "None"
cmdlp.Character.Humanoid:UnequipTools()
local v = cmdlp.Backpack:FindFirstChildOfClass("Tool")
if not v then
opx("*","Tool not found!")
return
end
v.Parent = cmdlp.Character
v.Parent = cmdlp.Character.HumanoidRootPart
firetouchinterest(target.Character.HumanoidRootPart, v.Handle, 0)
firetouchinterest(target.Character.HumanoidRootPart, v.Handle, 1)
wait(.3)
cmdlp.Character:Remove()
cmdlp.CharacterAdded:Wait()
end
function useCommand.using()
opx("-","Said script <3")
sayremote:FireServer("I am using CMD-X, Version: "..ver, "All")
end
function useCommand.banlands()
if not firetouchinterest then
opx("*","Your exploit requires firetouchinterest!")
return
end
local target = findplr(arguments[2] or cmdlp.Name)
if not target then
opx("*","Player does not exist!")
return
end
cmdlp.Character.Humanoid.Name = 1
local l = cmdlp.Character["1"]:Clone()
l.Parent = cmdlp.Character
l.Name = "Humanoid"
wait(.2)
cmdlp.Character["1"]:Destroy()
workspace.CurrentCamera.CameraSubject = cmdlp.Character
cmdlp.Character.Humanoid.DisplayDistanceType = "None"
cmdlp.Character.Humanoid:UnequipTools()
local v = cmdlp.Backpack:FindFirstChildOfClass("Tool")
if not v then
opx("*","Tool not found!")
return
end
v.Parent = cmdlp.Character
v.Parent = cmdlp.Character.HumanoidRootPart
firetouchinterest(target.Character.HumanoidRootPart, v.Handle, 0)
firetouchinterest(target.Character.HumanoidRootPart, v.Handle, 1)
pcall(function() cmdlp.Character.HumanoidRootPart.CFrame = CFrame.new(0, 1000000, 0) end)
wait(.3)
cmdlp.Character:Remove()
cmdlp.CharacterAdded:Wait()
end
function useCommand.kill()
if not firetouchinterest then
opx("*","Your exploit requires firetouchinterest!")
return
end
local target = findplr(arguments[2] or cmdlp.Name)
if not target then
opx("*","Player does not exist!")
return
end
cmdlp.Character.Humanoid.Name = 1
local l = cmdlp.Character["1"]:Clone()
l.Parent = cmdlp.Character
l.Name = "Humanoid"
wait(.2)
cmdlp.Character["1"]:Destroy()
workspace.CurrentCamera.CameraSubject = cmdlp.Character
cmdlp.Character.Humanoid.DisplayDistanceType = "None"
cmdlp.Character.Humanoid:UnequipTools()
local v = cmdlp.Backpack:FindFirstChildOfClass("Tool")
if not v then
opx("*","Tool not found!")
return
end
v.Parent = cmdlp.Character
v.Parent = cmdlp.Character.HumanoidRootPart
firetouchinterest(target.Character.HumanoidRootPart, v.Handle, 0)
firetouchinterest(target.Character.HumanoidRootPart, v.Handle, 1)
pcall(function() cmdlp.Character.HumanoidRootPart.CFrame = CFrame.new(0, workspace.FallenPartsDestroyHeight + 5, 0) end)
wait(.3)
cmdlp.Character:Remove()
cmdlp.CharacterAdded:Wait()
end
local Flipping = false
function useCommand.flip()
opx("-","Now flipping")
Flipping = true
pl=cmdlp
me=pl.Character
xl=me.Torso['Right Shoulder']
local debounce=false
function _restoreproperties()
Holder = player.Character
Torso = Holder:FindFirstChild("Torso")
RightS = Torso:FindFirstChild("Right Shoulder")
LeftS = Torso:FindFirstChild("Left Shoulder")
RightH = Torso:FindFirstChild("Right Hip")
LeftH = Torso:FindFirstChild("Left Hip")
RightS.MaxVelocity = .15
LeftS.MaxVelocity = .15
RightH.MaxVelocity = .1
LeftH.MaxVelocity = .1
RightS.DesiredAngle = 0
LeftS.DesiredAngle = 0
LeftH.DesiredAngle = 0
RightH.DesiredAngle = 0
end
function ManageAnimation(value)
Holder = player.Character
Player = player
if value == "no anim" then
Anim = Holder:FindFirstChild("Animate")
if Anim~=nil then
Anim.Disabled = true
Anim.Parent = Player
end
elseif value == "re-anim" then
Anim = Player:FindFirstChild("Animate")
if Anim~=nil then
Anim.Disabled = false
Anim.Parent = Holder
end
end
end
function Down(ml)
for i=1, ml.velocity.y/3 do
ml.velocity = ml.velocity+Vector3.new(0,-4.25,0)
wait()
end
ml:Remove()
end
function Flip2()
if debounce==true then return end
debounce=true
Char = player.Character
Human = Char.Humanoid
Torso = Char.Torso
CF = Torso.CFrame
Human.PlatformStand = true
VelUp = Instance.new("BodyVelocity")
VelUp.velocity = Vector3.new(0,60,0)+Torso.CFrame.lookVector*26
VelUp.P = VelUp.P*2
VelUp.maxForce = Vector3.new(10000,10000,10000)*999
VelUp.Parent = Torso
coroutine.resume(coroutine.create(Down),VelUp)
Gyro = Instance.new("BodyGyro")
Gyro.P = Gyro.P*10
Gyro.maxTorque = Vector3.new(100000,100000,100000)*999
Gyro.cframe = CF
Gyro.Parent = Torso
for i=2, 28 do
Gyro.cframe = Gyro.cframe*CFrame.fromEulerAnglesXYZ(math.pi/-16,0,0)
wait()
end
Gyro.cframe = CF
wait()
Gyro:Remove()
Human.PlatformStand = false
_restoreproperties()
debounce=false
end
while Flipping do
wait()
Flip2()
end
end
function useCommand.unflip()
Flipping = false
opx("-","No longer flipping")
end
local doubleFlipping = false
function useCommand.doubleflip()
opx("-","Now double flipping")
doubleFlipping = true
pl=cmdlp
me=pl.Character
xl=me.Torso['Right Shoulder']
local debounce=false
function _restoreproperties()
Holder = player.Character
Torso = Holder:FindFirstChild("Torso")
RightS = Torso:FindFirstChild("Right Shoulder")
LeftS = Torso:FindFirstChild("Left Shoulder")
RightH = Torso:FindFirstChild("Right Hip")
LeftH = Torso:FindFirstChild("Left Hip")
RightS.MaxVelocity = .15
LeftS.MaxVelocity = .15
RightH.MaxVelocity = .1
LeftH.MaxVelocity = .1
RightS.DesiredAngle = 0
LeftS.DesiredAngle = 0
LeftH.DesiredAngle = 0
RightH.DesiredAngle = 0
end
function ManageAnimation(value)
Holder = player.Character
Player = player
if value == "no anim" then
Anim = Holder:FindFirstChild("Animate")
if Anim~=nil then
Anim.Disabled = true
Anim.Parent = Player
end
elseif value == "re-anim" then
Anim = Player:FindFirstChild("Animate")
if Anim~=nil then
Anim.Disabled = false
Anim.Parent = Holder
end
end
end
function Down(ml)
for i=1, ml.velocity.y/3 do
ml.velocity = ml.velocity+Vector3.new(0,-4.25,0)
wait()
end
ml:Remove()
end
function Flip3()
if debounce==true then return end
debounce=true
Char = player.Character
Human = Char.Humanoid
Torso = Char.Torso
CF = Torso.CFrame
Human.PlatformStand = true
VelUp = Instance.new("BodyVelocity")
VelUp.velocity = Vector3.new(0,60,0)+Torso.CFrame.lookVector*26
VelUp.P = VelUp.P*2
VelUp.maxForce = Vector3.new(10000,10000,10000)*999
VelUp.Parent = Torso
coroutine.resume(coroutine.create(Down),VelUp)
Gyro = Instance.new("BodyGyro")
Gyro.P = Gyro.P*10
Gyro.maxTorque = Vector3.new(100000,100000,100000)*999
Gyro.cframe = CF
Gyro.Parent = Torso
for i=2, 28 do
Gyro.cframe = Gyro.cframe*CFrame.fromEulerAnglesXYZ(math.pi/-8,0,0)
wait()
end
Gyro.cframe = CF
wait()
Gyro:Remove()
Human.PlatformStand = false
_restoreproperties()
debounce=false
end
while doubleFlipping do
wait()
Flip3()
end
end
function useCommand.undoubleflip()
doubleFlipping = false
opx("-","No longer double flipping")
end
local stick = false
function useCommand.glue()
if arguments[2] then
target = findplr(arguments[2])
if target then
stick = true
opx("-","Now glued to "..target.Name)
repeat wait()
cmdlp.Character.HumanoidRootPart.CFrame = target.Character.HumanoidRootPart.CFrame * CFrame.new(cmdlp.Character.HumanoidRootPart.CFrame.lookVector.X,target.Character.HumanoidRootPart.Size.Y,cmdlp.Character.HumanoidRootPart.CFrame.lookVector.Z)
until stick == false
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unglue()
stick = false
opx("-","No longer glued")
end
T1.Name = "T1"
T1.Parent = HoldTab
T1.BackgroundColor3 = Color3.new(0.113725, 0.113725, 0.113725)
T1.BorderSizePixel = 0
T1.Position = UDim2.new(0, 0, 0.110238664, 0)
T1.Size = UDim2.new(0, 141, 0, 18)
T1.Text = ""
T1.TextColor3 = Color3.new(1, 1, 1)
T1.TextSize = 12
XE.Name = "XE"
XE.Parent = T1
XE.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
XE.BorderSizePixel = 0
XE.Position = UDim2.new(0.861749768, 0, -0.0032687718, 0)
XE.Size = UDim2.new(0, 19, 0, 18)
XE.Font = Enum.Font.SourceSansBold
XE.Text = "+"
XE.TextColor3 = Color3.new(1, 1, 1)
XE.TextSize = 14
XE.MouseButton1Down:Connect(function()
arguments = T1.Text:split(" ")
useCommand[arguments[1]]()
end)
T2.Name = "T2"
T2.Parent = HoldTab
T2.BackgroundColor3 = Color3.new(0.113725, 0.113725, 0.113725)
T2.BorderSizePixel = 0
T2.Position = UDim2.new(0, 0, 0.188670039, 0)
T2.Size = UDim2.new(0, 141, 0, 18)
T2.Text = ""
T2.TextColor3 = Color3.new(1, 1, 1)
T2.TextSize = 12
XE_2.Name = "XE"
XE_2.Parent = T2
XE_2.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
XE_2.BorderSizePixel = 0
XE_2.Position = UDim2.new(0.861749768, 0, -0.0032687718, 0)
XE_2.Size = UDim2.new(0, 19, 0, 18)
XE_2.Font = Enum.Font.SourceSansBold
XE_2.Text = "+"
XE_2.TextColor3 = Color3.new(1, 1, 1)
XE_2.TextSize = 14
XE_2.MouseButton1Down:Connect(function()
arguments = T2.Text:split(" ")
useCommand[arguments[1]]()
end)
T4.Name = "T4"
T4.Parent = HoldTab
T4.BackgroundColor3 = Color3.new(0.113725, 0.113725, 0.113725)
T4.BorderSizePixel = 0
T4.Position = UDim2.new(-9.31322575e-10, 0, 0.348800778, 0)
T4.Size = UDim2.new(0, 141, 0, 18)
T4.Text = ""
T4.TextColor3 = Color3.new(1, 1, 1)
T4.TextSize = 12
XE_3.Name = "XE"
XE_3.Parent = T4
XE_3.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
XE_3.BorderSizePixel = 0
XE_3.Position = UDim2.new(0.861749768, 0, -0.0032687718, 0)
XE_3.Size = UDim2.new(0, 19, 0, 18)
XE_3.Font = Enum.Font.SourceSansBold
XE_3.Text = "+"
XE_3.TextColor3 = Color3.new(1, 1, 1)
XE_3.TextSize = 14
XE_3.MouseButton1Down:Connect(function()
arguments = T4.Text:split(" ")
useCommand[arguments[1]]()
end)
T3.Name = "T3"
T3.Parent = HoldTab
T3.BackgroundColor3 = Color3.new(0.113725, 0.113725, 0.113725)
T3.BorderSizePixel = 0
T3.Position = UDim2.new(-9.31322575e-10, 0, 0.270369381, 0)
T3.Size = UDim2.new(0, 141, 0, 18)
T3.Text = ""
T3.TextColor3 = Color3.new(1, 1, 1)
T3.TextSize = 12
XE_4.Name = "XE"
XE_4.Parent = T3
XE_4.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
XE_4.BorderSizePixel = 0
XE_4.Position = UDim2.new(0.861749768, 0, -0.0032687718, 0)
XE_4.Size = UDim2.new(0, 19, 0, 18)
XE_4.Font = Enum.Font.SourceSansBold
XE_4.Text = "+"
XE_4.TextColor3 = Color3.new(1, 1, 1)
XE_4.TextSize = 14
XE_4.MouseButton1Down:Connect(function()
arguments = T3.Text:split(" ")
useCommand[arguments[1]]()
end)
T8.Name = "T8"
T8.Parent = HoldTab
T8.BackgroundColor3 = Color3.new(0.113725, 0.113725, 0.113725)
T8.BorderSizePixel = 0
T8.Position = UDim2.new(-9.31322575e-10, 0, 0.669062257, 0)
T8.Size = UDim2.new(0, 141, 0, 18)
T8.Text = ""
T8.TextColor3 = Color3.new(1, 1, 1)
T8.TextSize = 12
XE_5.Name = "XE"
XE_5.Parent = T8
XE_5.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
XE_5.BorderSizePixel = 0
XE_5.Position = UDim2.new(0.861749768, 0, -0.0032687718, 0)
XE_5.Size = UDim2.new(0, 19, 0, 18)
XE_5.Font = Enum.Font.SourceSansBold
XE_5.Text = "+"
XE_5.TextColor3 = Color3.new(1, 1, 1)
XE_5.TextSize = 14
XE_5.MouseButton1Down:Connect(function()
arguments = T8.Text:split(" ")
useCommand[arguments[1]]()
end)
T6.Name = "T6"
T6.Parent = HoldTab
T6.BackgroundColor3 = Color3.new(0.113725, 0.113725, 0.113725)
T6.BorderSizePixel = 0
T6.Position = UDim2.new(0, 0, 0.508931518, 0)
T6.Size = UDim2.new(0, 141, 0, 18)
T6.Text = ""
T6.TextColor3 = Color3.new(1, 1, 1)
T6.TextSize = 12
XE_6.Name = "XE"
XE_6.Parent = T6
XE_6.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
XE_6.BorderSizePixel = 0
XE_6.Position = UDim2.new(0.861749768, 0, -0.0032687718, 0)
XE_6.Size = UDim2.new(0, 19, 0, 18)
XE_6.Font = Enum.Font.SourceSansBold
XE_6.Text = "+"
XE_6.TextColor3 = Color3.new(1, 1, 1)
XE_6.TextSize = 14
XE_6.MouseButton1Down:Connect(function()
arguments = T6.Text:split(" ")
useCommand[arguments[1]]()
end)
T5.Name = "T5"
T5.Parent = HoldTab
T5.BackgroundColor3 = Color3.new(0.113725, 0.113725, 0.113725)
T5.BorderSizePixel = 0
T5.Position = UDim2.new(0, 0, 0.43050012, 0)
T5.Size = UDim2.new(0, 141, 0, 18)
T5.Text = ""
T5.TextColor3 = Color3.new(1, 1, 1)
T5.TextSize = 12
XE_7.Name = "XE"
XE_7.Parent = T5
XE_7.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
XE_7.BorderSizePixel = 0
XE_7.Position = UDim2.new(0.861749768, 0, -0.0032687718, 0)
XE_7.Size = UDim2.new(0, 19, 0, 18)
XE_7.Font = Enum.Font.SourceSansBold
XE_7.Text = "+"
XE_7.TextColor3 = Color3.new(1, 1, 1)
XE_7.TextSize = 14
XE_7.MouseButton1Down:Connect(function()
arguments = T5.Text:split(" ")
useCommand[arguments[1]]()
end)
T7.Name = "T7"
T7.Parent = HoldTab
T7.BackgroundColor3 = Color3.new(0.113725, 0.113725, 0.113725)
T7.BorderSizePixel = 0
T7.Position = UDim2.new(-9.31322575e-10, 0, 0.590630829, 0)
T7.Size = UDim2.new(0, 141, 0, 18)
T7.Text = ""
T7.TextColor3 = Color3.new(1, 1, 1)
T7.TextSize = 12
XE_8.Name = "XE"
XE_8.Parent = T7
XE_8.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
XE_8.BorderSizePixel = 0
XE_8.Position = UDim2.new(0.861749768, 0, -0.0032687718, 0)
XE_8.Size = UDim2.new(0, 19, 0, 18)
XE_8.Font = Enum.Font.SourceSansBold
XE_8.Text = "+"
XE_8.TextColor3 = Color3.new(1, 1, 1)
XE_8.TextSize = 14
XE_8.MouseButton1Down:Connect(function()
arguments = T7.Text:split(" ")
useCommand[arguments[1]]()
end)
T9.Name = "T9"
T9.Parent = HoldTab
T9.BackgroundColor3 = Color3.new(0.113725, 0.113725, 0.113725)
T9.BorderSizePixel = 0
T9.Position = UDim2.new(-1.39698386e-09, 0, 0.750761628, 0)
T9.Size = UDim2.new(0, 141, 0, 18)
T9.Text = ""
T9.TextColor3 = Color3.new(1, 1, 1)
T9.TextSize = 12
XE_9.Name = "XE"
XE_9.Parent = T9
XE_9.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
XE_9.BorderSizePixel = 0
XE_9.Position = UDim2.new(0.861749768, 0, -0.0032687718, 0)
XE_9.Size = UDim2.new(0, 19, 0, 18)
XE_9.Font = Enum.Font.SourceSansBold
XE_9.Text = "+"
XE_9.TextColor3 = Color3.new(1, 1, 1)
XE_9.TextSize = 14
XE_9.MouseButton1Down:Connect(function()
arguments = T9.Text:split(" ")
useCommand[arguments[1]]()
end)
T1.Text = CMDTab[1]
T2.Text = CMDTab[2]
T3.Text = CMDTab[3]
T4.Text = CMDTab[4]
T5.Text = CMDTab[5]
T6.Text = CMDTab[6]
T7.Text = CMDTab[7]
T8.Text = CMDTab[8]
T9.Text = CMDTab[9]
function useCommand.nugget()
opx("-","Changed character into a nugget")
if cmd15(cmdlp) then
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v.Name == "RightUpperArm" or v.Name == "LeftUpperArm" or v.Name == "RightUpperLeg" or v.Name == "LeftUpperLeg" then
v:Destroy()
end
end
else
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v.Name == "Right Arm" or v.Name == "Left Arm" or v.Name == "Right Leg" or v.Name == "Left Leg" then
v:Destroy()
end
end
end
cmdlp.Character.Head.Mesh:Destroy()
end
local cwFlipping = false
function useCommand.cartwheel()
opx("-","Now cartwheeling")
cwFlipping = true
function _restoreproperties()
Torso = cmdlp.Character:FindFirstChild("Torso")
RightS = Torso:FindFirstChild("Right Shoulder")
LeftS = Torso:FindFirstChild("Left Shoulder")
RightH = Torso:FindFirstChild("Right Hip")
LeftH = Torso:FindFirstChild("Left Hip")
RightS.MaxVelocity = .15
LeftS.MaxVelocity = .15
RightH.MaxVelocity = .1
LeftH.MaxVelocity = .1
RightS.DesiredAngle = 0
LeftS.DesiredAngle = 0
LeftH.DesiredAngle = 0
RightH.DesiredAngle = 0
end
function Down(ml)
for i = 1,ml.velocity.y/3 do
ml.velocity = ml.velocity + Vector3.new(0,-4.25,0)
wait()
end
ml:Remove()
end
function Flip()
if debounce == true then return end
debounce = true
local Gyro = Instance.new("BodyGyro")
Gyro.P = Gyro.P*10
Gyro.maxTorque = Vector3.new(100000,100000,100000)*999
Gyro.CFrame = cmdlp.Character.Torso.CFrame
Gyro.Parent = cmdlp.Character.Torso
for i=0, 50 do
Gyro.CFrame = Gyro.CFrame*CFrame.fromEulerAnglesXYZ(math.pi/-29,0,0)
wait()
end
Gyro.CFrame = cmdlp.Character.Torso.CFrame
wait()
Gyro:Remove()
cmdlp.Character.Humanoid.PlatformStand = false
_restoreproperties()
debounce = false
end
while cwFlipping do
wait()
Flip()
end
end
function useCommand.uncartwheel()
cwFlipping = false
opx("-","No longer cartwheeling")
end
local seizureFlipping = false
function useCommand.seizure()
opx("-","Now seizuring")
seizureFlipping = true
function _restoreproperties()
Torso = cmdlp.Character:FindFirstChild("Torso")
RightS = Torso:FindFirstChild("Right Shoulder")
LeftS = Torso:FindFirstChild("Left Shoulder")
RightH = Torso:FindFirstChild("Right Hip")
LeftH = Torso:FindFirstChild("Left Hip")
RightS.MaxVelocity = .15
LeftS.MaxVelocity = .15
RightH.MaxVelocity = .1
LeftH.MaxVelocity = .1
RightS.DesiredAngle = 0
LeftS.DesiredAngle = 0
LeftH.DesiredAngle = 0
RightH.DesiredAngle = 0
end
function Down(ml)
for i = 1,ml.velocity.y/3 do
ml.velocity = ml.velocity + Vector3.new(0,-4.25,0)
wait()
end
ml:Remove()
end
function Flip4()
if debounce == true then return end
debounce = true
cmdlp.Character.Humanoid.PlatformStand = true
local VelUp = Instance.new("BodyVelocity")
VelUp.maxForce = Vector3.new(10000,10000,10000)*999
VelUp.Parent = cmdlp.Character.Torso
coroutine.resume(coroutine.create(Down),VelUp)
local Gyro = Instance.new("BodyGyro")
Gyro.P = Gyro.P*10
Gyro.CFrame = cmdlp.Character.Torso.CFrame
Gyro.Parent = cmdlp.Character.Torso
for i=1, 16 do
Gyro.CFrame = Gyro.CFrame*CFrame.fromEulerAnglesXYZ(math.pi/9,math.pi/-18,0)
wait()
end
Gyro.CFrame = cmdlp.Character.Torso.CFrame
wait()
Gyro:Remove()
cmdlp.Character.Humanoid.PlatformStand = false
_restoreproperties()
debounce = false
end
while seizureFlipping do
wait()
Flip4()
end
end
function useCommand.unseizure()
seizureFlipping = false
opx("-","No longer seizuring")
end
function useCommand.fling()
if arguments[2] then
target = findplr(arguments[2])
if target then
noclip()
PF = 99
PF = PF*10
local BT = Instance.new("BodyThrust")
cmdhrp = cmdlp.Character.HumanoidRootPart
BT.Parent = cmdhrp
BT.Force = Vector3.new(PF, 0, PF)
BT.Location = cmdhrp.Position
for i,player in pairs(cmdlp.Character:GetChildren()) do
if player.ClassName == "Part" then
player.CustomPhysicalProperties = PhysicalProperties.new(0, 0.3, 0.5)
end
end
cmdhrp.CFrame = target.Character.HumanoidRootPart.CFrame * CFrame.Angles(0, math.rad(0), 0) * CFrame.new(0, 0, 0)
wait(1)
for i,player in pairs(cmdlp.Character:GetChildren()) do
if player.ClassName == "Part" then
player.CustomPhysicalProperties = PhysicalProperties.new(0.7, 0.3, 0.5)
end
end
if Noclipping then
Noclipping:Disconnect()
end
Clip = true
cmdlp.Character.HumanoidRootPart.BodyThrust:Destroy()
cmdlp.Character.Humanoid.PlatformStand = true
cmdlp.Character.Humanoid.Sit = true
wait(0.1)
cmdlp.Character.Humanoid.Jump = true
opx("-","Flung "..target.Name)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.invisiblefling()
opx("-","Now Invisible Flinging use refresh to stop")
local ch = cmdlp.Character
local prt=Instance.new("Model", cmdlp.Character)
local z1 = Instance.new("Part")
z1.Name="Torso"
z1.CanCollide = false
z1.Anchored = true
local z2 = Instance.new("Part", prt)
z2.Name="Head"
z2.Anchored = true
z2.CanCollide = false
local z3 =Instance.new("Humanoid", prt)
z3.Name="Humanoid"
z1.Position = Vector3.new(0,9999,0)
cmdlp.Character=prt
wait(3)
cmdlp.Character=ch
wait(3)
local plr = cmdlp
cmdm = plr:GetMouse()
local Hum = Instance.new("Humanoid")
z2:Clone()
Hum.Parent = cmdlp.Character
local root = cmdlp.Character.HumanoidRootPart
for i,v in pairs(plr.Character:GetChildren()) do
if v ~= root and v.Name ~= "Humanoid" then
v:Destroy()
end
end
root.Transparency = 0
root.Material = "ForceField"
root.Color = Color3.new(1, 1, 1)
game:GetService('RunService').Stepped:connect(function()
cmdlp.Character.HumanoidRootPart.CanCollide = false
end)
game:GetService('RunService').RenderStepped:connect(function()
cmdlp.Character.HumanoidRootPart.CanCollide = false
end)
sFLY()
workspace.CurrentCamera.CameraSubject = root
PF = 99999
PF = PF*10
local bambam = Instance.new("BodyThrust")
bambam.Parent = cmdlp.Character.HumanoidRootPart
bambam.Force = Vector3.new(PF,0,PF)
bambam.Location = cmdlp.Character.HumanoidRootPart.Position
end
function useCommand.freefling()
opx("-","Now freeflinging use unfling to stop")
noclip()
sFLY()
workspace.CurrentCamera.CameraSubject = cmdlp.Character.HumanoidRootPart
local BT = Instance.new("BodyThrust")
BT.Parent = cmdlp.Character.HumanoidRootPart
BT.Force = Vector3.new(999999, 999999, 999999)
BT.Location = cmdlp.Character.HumanoidRootPart.Position
for i,player in pairs(cmdlp.Character:GetChildren()) do
if player.ClassName == "Part" then
player.CustomPhysicalProperties = PhysicalProperties.new(0, 0.3, 0.5)
end
end
end
function useCommand.unfling()
opx("-","You are no longer flinging")
for i,player in pairs(cmdlp.Character:GetChildren()) do
if player.ClassName == "Part" then
player.CustomPhysicalProperties = PhysicalProperties.new(0.7, 0.3, 0.5)
end
end
if Noclipping then
Noclipping:Disconnect()
end
Clip = true
FLYING = false
cmdlp.Character.HumanoidRootPart.BodyThrust:Destroy()
cmdlp.Character.Humanoid.PlatformStand = true
cmdlp.Character.Humanoid.Sit = true
wait(0.1)
cmdlp.Character.Humanoid.Jump = true
end
RestoreCFling = {}
function useCommand.cleanfling()
local tool = cmdlp.Character:FindFirstChildOfClass("Tool")
if tool then
opx("-","Now clean flinging")
tool.Parent = cmdlp.Backpack
tool.Handle.Massless = true
RestoreCFling = {
Anim = cmdlp.Character.Animate.toolnone.ToolNoneAnim.AnimationId;
Grip = tool.GripPos;
}
tool.GripPos = Vector3.new(5000, 5000, 5000)
cmdlp.Character.HumanoidRootPart.CustomPhysicalProperties = PhysicalProperties.new(math.huge,math.huge,math.huge,math.huge,math.huge)
tool.Parent = cmdlp.Character
pcall(function() cmdlp.Character.Animate.toolnone.ToolNoneAnim.AnimationId = "nil" end)
wait(.1)
tool.Parent = cmdlp.Backpack
wait(.1)
tool.Parent = cmdlp.Character
noclip()
else
opx("*","You have no tool equipped!")
end
end
function useCommand.uncleanfling()
opx("-","No longer clean flinging")
cmdlp.Character.HumanoidRootPart.CustomPhysicalProperties = PhysicalProperties.new(0.7, 0.3, 0.5)
cmdlp.Character.Animate.toolnone.ToolNoneAnim.AnimationId = RestoreCFling.Anim
local tool = cmdlp.Character:FindFirstChildOfClass("Tool")
if tool then
tool.GripPos = RestoreCFling.Grip
end
end
function useCommand.notoolanim()
pcall(function() cmdlp.Character.Animate.toolnone.ToolNoneAnim.AnimationId = "nil" end)
opx("-","You now have no tool anim")
local tool = cmdlp.Character:FindFirstChildOfClass("Tool")
if tool then
wait(.1)
tool.Parent = cmdlp.Backpack
wait(.1)
tool.Parent = cmdlp.Character
end
end
local Lagging = false
function useCommand.lag()
opx("-","Now lagging character")
Lagging = true
repeat wait()
cmdlp.Character.HumanoidRootPart.Anchored = false
wait(.1)
cmdlp.Character.HumanoidRootPart.Anchored = true
wait(.1)
until Lagging == false
end
function useCommand.unlag()
Lagging = false
opx("No longer lagging character")
wait(.3)
cmdlp.Character.HumanoidRootPart.Anchored = false
end
local Annoy = false
function useCommand.annoy()
if arguments[2] then
target = findplr(arguments[2])
if target then
if target.Character and target.Character:FindFirstChild('Humanoid') then
Annoy = true
opx("-","Now annoying "..target.Name)
while Annoy do
cmdlp.Character.HumanoidRootPart.CFrame = target.Character.HumanoidRootPart.CFrame * CFrame.Angles(0,math.rad(0),0)* CFrame.new(0,0,0)
wait()
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unannoy()
Annoy = false
opx("-","No longer annoying")
end
function useCommand.weaken()
for i,player in pairs(cmdlp.Character:GetChildren()) do
if player.ClassName == "Part" then
player.CustomPhysicalProperties = PhysicalProperties.new(0, 0.3, 0.5)
end
end
opx("-","You are now weak")
end
function useCommand.strengthen()
for i,player in pairs(cmdlp.Character:GetChildren()) do
if player.ClassName == "Part" then
player.CustomPhysicalProperties = PhysicalProperties.new(100, 0.3, 0.5)
end
end
opx("-","You are now strong")
end
function useCommand.unweak()
for i,player in pairs(cmdlp.Character:GetChildren()) do
if player.ClassName == "Part" then
player.CustomPhysicalProperties = PhysicalProperties.new(0.7, 0.3, 0.5)
end
end
opx("-","You are no longer weak/strong")
end
function useCommand.sparkles()
opx("-","If you had a Fairy it now makes a sparkles illusion")
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = hat.Name
tool.GripPos = Vector3.new(1.5, 0, -1.5)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
end
function useCommand.sword()
opx("-","If you had a Sword on your back you are now holding it")
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = hat.Name
tool.GripPos = Vector3.new(2, 2, 0)
tool.GripRight = Vector3.new(9, 9, 9)
tool.GripUp = Vector3.new(-9, -9, 0)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://28090109"
local play = cmdlp.Character.Humanoid:LoadAnimation(Anim)
while wait() do
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Tool") then
v.Equipped:Connect(function(Mouse)
Mouse.Button1Down:Connect(function()
play:Play()
end)
end)
end
end
end
end
function useCommand.scythe()
opx("-","If you had a Scythe on your back you are now holding it")
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = hat.Name
tool.GripPos = Vector3.new(-0.8, -2, 0)
tool.GripRight = Vector3.new(0, 0, 0)
tool.GripUp = Vector3.new(9, 9, -3)
tool.GripForward = Vector3.new(0, 0, 0)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://28090109"
local play = cmdlp.Character.Humanoid:LoadAnimation(Anim)
while wait() do
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Tool") then
v.Equipped:Connect(function(Mouse)
Mouse.Button1Down:Connect(function()
play:Play()
end)
end)
end
end
end
end
local Follow = false
function useCommand.leash()
if arguments[2] then
target = findplr(arguments[2])
if target then
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
if hat.Name == "FurryCatTail" then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = target.Name.."s leash"
tool.Parent = cmdp.LocalPlayer.Character
tool.GripPos = Vector3.new(0, 0, 1)
tool.GripRight = Vector3.new(1,1,0)
tool.GripUp = Vector3.new(-9,-3,0)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
elseif hat.Name == "Spike Necklace" then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = target.Name.."s collar"
tool.Parent = cmdp.LocalPlayer.Character
tool.GripPos = Vector3.new(0.6, -0.6, 3)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
end
flwnum = -4.5
if target.Character and target.Character:FindFirstChild('Humanoid') then
Follow = true
opx("-","Now leashing "..target.Name)
while Follow do
cmdlp.Character.HumanoidRootPart.CFrame = target.Character.HumanoidRootPart.CFrame * CFrame.Angles(0,math.rad(0),0)* CFrame.new(-0.9,0,4.5)
wait()
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.penis()
opx("-","You boutta ro-cum bro?")
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Accessory") then
if v.Handle.SpecialMesh.TextureId == "http://www.roblox.com/asset/?id=4390955131" then
v.Name = cmdlp.Name.."'s huge shaft"
end
end
end
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Accessory") then
if v.Handle.SpecialMesh.TextureId == "http://www.roblox.com/asset/?id=4566834838" then
v.Name = cmdlp.Name.."'s right ball"
end
end
end
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Accessory") then
if v.Handle.SpecialMesh.TextureId == "http://www.roblox.com/asset/?id=4524758175" then
v.Name = cmdlp.Name.."'s left ball"
end
end
end
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
local tool = Instance.new("Tool", cmdlp.Backpack)
if hat.Name == cmdlp.Name.."'s huge shaft" then
tool.Name = hat.Name
tool.Parent = cmdlp.Character
hat.Handle.SpecialMesh:Destroy()
tool.GripPos = Vector3.new(-1, 2, 1.5)
tool.GripRight = Vector3.new(0, 0, 0)
tool.GripUp = Vector3.new(9, 9, 0)
tool.GripForward = Vector3.new(0, 0, 0)
elseif hat.Name == cmdlp.Name.."'s right ball" then
tool.Name = hat.Name
tool.Parent = cmdlp.Character
hat.Handle.SpecialMesh:Destroy()
tool.GripPos = Vector3.new(0.5, 2, 0.5)
tool.GripRight = Vector3.new(0, 0, 0)
tool.GripUp = Vector3.new(9, 9, 0)
tool.GripForward = Vector3.new(0, 0, 0)
elseif hat.Name == cmdlp.Name.."'s left ball" then
tool.Name = hat.Name
tool.Parent = cmdlp.Character
hat.Handle.SpecialMesh:Destroy()
tool.GripPos = Vector3.new(0.5, 2, 2.5)
tool.GripRight = Vector3.new(0, 0, 0)
tool.GripUp = Vector3.new(9, 9, 0)
tool.GripForward = Vector3.new(0, 0, 0)
end
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
end
function useCommand.animation()
if arguments[2] and cmdnum(arguments[2]) then
if cmd6(cmdlp) then
local AnimationId = tostring(arguments[2])
local Animprefix = Instance.new("Animation")
Animprefix.AnimationId = "rbxassetid://"..AnimationId
local animplay = cmdlp.Character.Humanoid:LoadAnimation(Animprefix)
animplay:Play()
if arguments[3] and cmdnum(arguments[3]) then
animplay:AdjustSpeed(arguments[3])
end
opx("-","Now playing animation: "..arguments[2])
else
opx("*","R6 is needed for this command")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unanimation()
for i,v in pairs(cmdlp.Character.Humanoid:GetPlayingAnimationTracks()) do
v:Stop()
end
opx("-","Stopped all aniamtions")
end
function useCommand.uninsane()
opx("-","You are no longer insane")
insane:Stop()
Spas:Destroy()
end
function useCommand.monstermash()
if cmd6(cmdlp) then
local AnimationId = "35654637"
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://"..AnimationId
local play = cmdlp.Character.Humanoid:LoadAnimation(Anim)
play:Play()
opx("-","Now playing animation: 35654637")
else
opx("*","R6 is needed for this command")
end
end
function useCommand.ragdoll()
opx("-","Now ragdolling")
cmdlp.Character.Humanoid.PlatformStand = true
end
function useCommand.unragdoll()
opx("-","No longer ragdolling")
cmdlp.Character.Humanoid.PlatformStand = false
end
function useCommand.animpack()
if arguments[2] == "sneaky" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=1132461372"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=1132469004"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=1132473842"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=1132477671"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=1132489853"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=1132494274"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=1132500520"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=1132506407"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=1132510133"
elseif arguments[2] == "old" then
local Char = cmdlp.Character
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=387947158"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=387947464"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=387947975"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=616092998"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=616094091"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=382460631"
elseif arguments[2] == "toy" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=782843869"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=782846423"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=782841498"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=782845736"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=782847020"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=782842708"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=782844582"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=782845186"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=782843345"
elseif arguments[2] == "pirate" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=750779899"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=750780242"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=750781874"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=750782770"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=750782230"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=750783738"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=750784579"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=750785176"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=750785693"
elseif arguments[2] == "knight" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=658360781"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=657600338"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=657595757"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=657568135"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=658409194"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=657564596"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=657560551"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=657557095"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=657552124"
elseif arguments[2] == "astronaut" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=891609353"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=891617961"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=891621366"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=891633237"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=891627522"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=891636393"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=891639666"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=891663592"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=891636393"
elseif arguments[2] == "vampire" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=1083439238"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=1083443587"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=1083445855"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=1083450166"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=1083455352"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=1083462077"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=1083464683"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=1083467779"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=1083473930"
elseif arguments[2] == "robot" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=616086039"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=616087089"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=616088211"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=616089559"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=616090535"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=616091570"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=616092998"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=616094091"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=616095330"
elseif arguments[2] == "levitation" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=616003713"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=616005863"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=616006778"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=616008087"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=616008936"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=616010382"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=616011509"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=616012453"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=616013216"
elseif arguments[2] == "bubbly" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=909997997"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=910001910"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=910004836"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=910009958"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=910016857"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=910025107"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=910028158"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=910030921"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=910034870"
elseif arguments[2] == "werewolf" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=1083182000"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=1083189019"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=1083195517"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=1083214717"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=1083218792"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=1083216690"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=1083222527"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=1083225406"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=1083178339"
elseif arguments[2] == "stylish" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=616133594"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=616134815"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=616136790"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=616138447"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=616139451"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=616140816"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=616143378"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=616144772"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=616146177"
elseif arguments[2] == "mage" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=707826056"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=707829716"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=707742142"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=707855907"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=707853694"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=707861613"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=707876443"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=707894699"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=707897309"
elseif arguments[2] == "cartoony" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=742636889"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=742637151"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=742637544"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=742638445"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=742637942"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=742638842"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=742639220"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=742639812"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=742640026"
elseif arguments[2] == "zombie" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=616156119"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=616157476"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=616158929"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=616160636"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=616161997"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=616163682"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=616165109"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=616166655"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=616168032"
elseif arguments[2] == "superhero" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=616104706"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=616108001"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=616111295"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=616113536"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=616115533"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=616117076"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=616119360"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=616120861"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=616122287"
elseif arguments[2] == "ninja" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=656114359"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=656115606"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=656117400"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=656118341"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=656117878"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=656118852"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=656119721"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=656121397"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=656121766"
elseif arguments[2] == "elder" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=845392038"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=845396048"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=845397899"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=845400520"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=845398858"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=845386501"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=845401742"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=845403127"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=845403856"
elseif arguments[2] == "oldschool" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=5319816685"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=5319839762"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=5319828216"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=5319831086"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=5319841935"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=5319844329"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=5319850266"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=5319852613"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=5319847204"
elseif arguments[2] == "confident" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=1069946257"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=1069973677"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=1069977950"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=1069987858"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=1069984524"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=1070001516"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=1070009914"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=1070012133"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=1070017263"
elseif arguments[2] == "popstar" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=1213044953"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=1212900995"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=1212900985"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=1212900985"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=1212954642"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=1212980348"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=1212852603"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=1212998578"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=1212980338"
elseif arguments[2] == "patrol" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=1148811837"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=1148863382"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=1149612882"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=1150842221"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=1150944216"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=1150967949"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=1151204998"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=1151221899"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=1151231493"
elseif arguments[2] == "princess" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=940996062"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=941000007"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=941003647"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=941013098"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=941008832"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=941015281"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=941018893"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=941025398"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=941028902"
elseif arguments[2] == "cowboy" then
local Char = cmdlp.Character
Char.Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=1014380606"
Char.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=1014384571"
Char.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=1014390418"
Char.Animate.idle.Animation1.Weight.Value = "9"
Char.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=1014398616"
Char.Animate.idle.Animation2.Weight.Value = "1"
Char.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=1014394726"
Char.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=1014401683"
Char.Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=1014406523"
Char.Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=1014411816"
Char.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=1014421541"
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.spin()
local Spin = Instance.new("BodyAngularVelocity", cmdlp.Character.HumanoidRootPart)
Spin.Name = "Spinning"
if arguments[2] then
if cmdnum(arguments[2]) then
Spin.AngularVelocity = Vector3.new(0,arguments[2],0)
Spin.MaxTorque = Vector3.new(0, math.huge, 0)
opx("-","Now spinning at speed: "..arguments[2])
else
opx("*","A number is needed")
end
else
Spin.AngularVelocity = Vector3.new(0,20,0)
Spin.MaxTorque = Vector3.new(0, math.huge, 0)
opx("-","Now spinning")
end
end
function useCommand.unspin()
opx("-","Stopped spinning")
for i,v in pairs(cmdlp.Character.HumanoidRootPart:GetChildren()) do
if v.Name == "Spinning" then
v:Destroy()
end
end
end
function useCommand.hatspin()
opx("-","Hats are now spinning")
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Accessory") then
local findForce = v.Handle:FindFirstChildOfClass("BodyForce")
if findForce == nil then
local a = Instance.new("BodyPosition")
local b = Instance.new("BodyAngularVelocity")
a.Parent = v.Handle
b.Parent = v.Handle
a.Name = "un"
b.Name = "un2"
v.Handle.AccessoryWeld:Destroy()
b.AngularVelocity = Vector3.new(0,100,0)
b.MaxTorque = Vector3.new(0,200,0)
a.P = 30000
a.D = 50
game:GetService('RunService').Stepped:connect(function()
a.Position = cmdlp.Character.Head.Position
end)
end
end
end
end
function useCommand.unhatspin()
opx("-","Stopped spinning hats")
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Accessory") then
v.Handle.un:Destroy()
v.Handle.un2:Destroy()
end
end
end
local ff = false
function useCommand.facefuck()
if arguments[2] then
target = findplr(arguments[2])
if target then
if target.Character and target.Character:FindFirstChild('Humanoid') then
if ff == true then
ff = false
opx("-","Stopped facefucking/faceraping")
cmdlp.Character.Humanoid.Sit = false
return
else ff = true
opx("-","Facefucking/faceraping enabled")
while ff do
cmdlp.Character.Humanoid.Sit = true
cmdlp.Character.HumanoidRootPart.CFrame = target.Character.HumanoidRootPart.CFrame * CFrame.Angles(0,math.rad(180),0)* CFrame.new(0,1.6,0.4)
wait()
end
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unfacefuck()
opx("-","Stopped facefucking/faceraping")
cmdlp.Character.Humanoid.Sit = false
ff = false
end
local ff2 = false
function useCommand.facefuckanim()
if arguments[2] then
target = findplr(arguments[2])
if target then
facebangAnim = Instance.new("Animation")
facebangAnim.AnimationId = "rbxassetid://148840371"
facebang = cmdlp.Character.Humanoid:LoadAnimation(facebangAnim)
facebang:Play(.1, 1, 1)
facebang:AdjustSpeed(3)
if target.Character and target.Character:FindFirstChild('Humanoid') then
if ff2 == true then
ff2 = false
opx("-","Stopped facefucking/faceraping")
return
else ff2 = true
opx("-","Facefucking/faceraping enabled")
while ff2 do
cmdlp.Character.HumanoidRootPart.CFrame = target.Character.HumanoidRootPart.CFrame * CFrame.Angles(0,math.rad(180),0)* CFrame.new(0.4,1.6,0.4)
wait()
end
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unfacefuckanim()
ff2 = false
facebang:Stop()
facebang:Destroy()
opx("-","Stopped facefucking/faceraping")
end
local pb = false
function useCommand.piggyback()
if arguments[2] then
target = findplr(arguments[2])
if target then
if target.Character and target.Character:FindFirstChild('Humanoid') then
if pb == true then
pb = false
opx("-","Stopped riding/piggybacking")
cmdlp.Character.Humanoid.Sit = false
return
else pb = true
opx("-","Riding/piggybacking enabled")
while pb do
cmdlp.Character.Humanoid.Sit = true
cmdlp.Character.HumanoidRootPart.CFrame = target.Character.HumanoidRootPart.CFrame * CFrame.Angles(0,math.rad(0),0)* CFrame.new(0,1.6,0.4)
wait()
end
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unpiggyback()
opx("-","Stopped piggybacking/riding")
pb = false
cmdlp.Character.Humanoid.Sit = false
end
local Bang = false
function useCommand.fuck()
if arguments[2] then
target = findplr(arguments[2])
if target then
flwnum = -1
bangAnim = Instance.new("Animation")
bangAnim.AnimationId = "rbxassetid://148840371"
bang = cmdlp.Character.Humanoid:LoadAnimation(bangAnim)
bang:Play(.1, 1, 1)
bang:AdjustSpeed(3)
if target.Character and target.Character:FindFirstChild('Humanoid') then
if Bang == true then
Follow = false
Bang = false
opx("-","Fuck/rape disabled")
return
else Bang = true
opx("-","Fuck/rape enabled")
while Bang do
cmdlp.Character.HumanoidRootPart.CFrame=
target.Character.HumanoidRootPart.CFrame + target.Character.HumanoidRootPart.CFrame.lookVector * flwnum
wait()
end
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unfuck()
bang:Stop()
bangAnim:Destroy()
Bang = false
opx("-","Rape/fuck disabled")
end
local Follow = false
function useCommand.follow()
if arguments[2] then
target = findplr(arguments[2])
if target then
flwnum = -5
if target.Character and target.Character:FindFirstChild('Humanoid') then
if Follow == true then
Follow = false;
opx("-","Follow/stalk disabled")
return
else Follow = true
opx("-","Follow/stalk enabled")
end
while Follow do
cmdlp.Character.HumanoidRootPart.CFrame=
target.Character.HumanoidRootPart.CFrame + target.Character.HumanoidRootPart.CFrame.lookVector * flwnum
wait()
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unfollow()
Follow = false
opx("-","Stalk/follow disabled")
end
function useCommand.oldroblox()
Confirm("Default", "This command is not reversible.")
if Confirmation == true then
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("BasePart") then
local dec = Instance.new("Texture", v)
dec.Texture = "rbxassetid://48715260"
dec.Face = "Top"
dec.StudsPerTileU = "1"
dec.StudsPerTileV = "1"
dec.Transparency = v.Transparency
v.Material = "Plastic"
local dec2 = Instance.new("Texture", v)
dec2.Texture = "rbxassetid://20299774"
dec2.Face = "Bottom"
dec2.StudsPerTileU = "1"
dec2.StudsPerTileV = "1"
dec2.Transparency = v.Transparency
v.Material = "Plastic"
end
end
game.Lighting.ClockTime = 12
game.Lighting.GlobalShadows = false
game.Lighting.Outlines = false
for i,v in pairs(game.Lighting:GetDescendants()) do
if v:IsA("Sky") then
v:Destroy()
end
end
local sky = Instance.new("Sky", game.Lighting)
sky.SkyboxBk = "rbxassetid://161781263"
sky.SkyboxDn = "rbxassetid://161781258"
sky.SkyboxFt = "rbxassetid://161781261"
sky.SkyboxLf = "rbxassetid://161781267"
sky.SkyboxRt = "rbxassetid://161781268"
sky.SkyboxUp = "rbxassetid://161781260"
opx("-","Old Roblox game theme loaded")
end
end
function useCommand.savegame()
saveinstance()
opx("-","Saved game in your workspace folder")
end
function useCommand.btools()
local Clone_T = Instance.new("HopperBin", cmdlp.Backpack)
Clone_T.BinType = "Clone"
local Destruct = Instance.new("HopperBin", cmdlp.Backpack)
Destruct.BinType = "Hammer"
local Hold_T = Instance.new("HopperBin", cmdlp.Backpack)
Hold_T.BinType = "Grab"
opx("-","Building tools loaded")
end
function useCommand.fex()
loadstring(game:GetObjects("rbxassetid://4698064966")[1].Source)()
opx("-","Loaded F3X")
end
function useCommand.remotespy()
loadstring(game:HttpGet("https://github.com/exxtremestuffs/SimpleSpySource/raw/master/SimpleSpy.lua"))()
opx("-","Simple Spy has loaded (credits to exxtremestuffs)")
end
function useCommand.playerstalker()
loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/projetcs/PlayerStalkerV2",true))()
opx("-","Loaded PlayerStalker")
end
function useCommand.badger()
loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/badger",true))()
opx("-","Loaded Badger V2")
end
function useCommand.explorer()
local xCG = game:GetService("CoreGui").ChildAdded:Connect(function(Sound)
game:GetService("RunService").Stepped:Wait()
if Sound:IsA("Sound") then Sound.SoundId = 0; Sound.Volume = 0; Sound.PlayOnRemove = false; Sound:Destroy() end
end)
loadstring(game:GetObjects("rbxassetid://418957341")[1].Source)()
opx("-", "Loaded dex")
xCG:Disconnect()
if writefile and readfile then
if delfile then
pcall(function() delfile("cx.ogg") end)
else
local success, errorsend = pcall(function()
readfile("cx.ogg")
end)
if success then
writefile("cx.ogg", "")
end
end
end
-- Hey Moon, can we talk? pigeon#1818 If you do not want us to have a .dex command we are happy to remove it for you! :) Just DM me!
end
function useCommand.removeeffects()
opx("-","Removed all effects")
for i,v in pairs(game:GetDescendants()) do
if v:IsA("Sparkles") or v:IsA("ParticleEmitter") or v:IsA("Fire") or v:IsA("Smoke") then
v:Destroy()
end
end
end
function useCommand.removeseats()
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("Seat") or v:IsA("VehicleSeat") then
v:Destroy()
end
end
opx("-","Removed all seats")
end
XLS = {}
function useCommand.removelocalscripts()
opx("-","Removed all localscripts")
for _,ls in pairs(game:GetDescendants()) do
if ls:IsA("LocalScript") then
ls.Disabled = true
table.insert(XLS, ls)
end
end
end
function useCommand.restorelocalscripts()
opx("-","Restored all localscripts")
for _,v in pairs(XLS) do
v.Disabled = false
end
end
function useCommand.xray()
transparent = true
x(transparent)
opx("-","X-Ray enabled")
end
function useCommand.unxray()
transparent = false
x(transparent)
opx("-","X-Ray disabled")
end
function useCommand.tabs()
if arguments[2] == "off" then
opx("-","Turned off tabs")
TabsOff = true
HoldTab.Visible = false
updatesaves()
elseif arguments[2] == "on" then
opx("-","Turned on tabs")
TabsOff = false
HoldTab.Visible = true
updatesaves()
else
opx("*","2 arguments are required!")
end
end
function useCommand.changetab()
if arguments[3] then
MoreArg = getstring(3)
if arguments[2] == "1" then
T1.Text = MoreArg
CMDTab[1] = MoreArg
elseif arguments[2] == "2" then
T2.Text = MoreArg
CMDTab[2] = MoreArg
elseif arguments[2] == "3" then
T3.Text = MoreArg
CMDTab[3] = MoreArg
elseif arguments[2] == "4" then
T4.Text = MoreArg
CMDTab[4] = MoreArg
elseif arguments[2] == "5" then
T5.Text = MoreArg
CMDTab[5] = MoreArg
elseif arguments[2] == "6" then
T6.Text = MoreArg
CMDTab[6] = MoreArg
elseif arguments[2] == "7" then
T7.Text = MoreArg
CMDTab[7] = MoreArg
elseif arguments[2] == "8" then
T8.Text = MoreArg
CMDTab[8] = MoreArg
elseif arguments[2] == "9" then
T9.Text = MoreArg
CMDTab[9] = MoreArg
end
else
opx("*","3 arguments are required!")
end
end
function useCommand.lockws()
opx("-","Locked workspace")
local x = 0
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("BasePart") then
x = x + 1
if x == 50 then wait(.1); x = 0 end
v.Locked = true
end
end
end
function useCommand.unlockws()
opx("-","Locked workspace")
local x = 0
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("BasePart") then
x = x + 1
if x == 50 then wait(.1); x = 0 end
v.Locked = false
end
end
end
function useCommand.day()
opx("-","It is now day")
cmdl.ClockTime = 14
end
function useCommand.night()
opx("-","It is now night")
cmdl.ClockTime = 0
end
function useCommand.removesky()
opx("-","You have removed the skybox")
for i,v in pairs(cmdl:GetChildren()) do
if v:IsA("Sky") then
v:Destroy()
end
end
end
function useCommand.restorelighting()
cmdl.Ambient = Color3.new(0.715, 0.715, 0.715)
cmdl.Brightness = 1
cmdl.ClockTime = 14
cmdl.ColorShift_Bottom = Color3.new(0, 0, 0)
cmdl.ColorShift_Top = Color3.new(0, 0, 0)
cmdl.ExposureCompensation = 0
cmdl.FogColor = Color3.new(0.754, 0.754, 0.754)
cmdl.FogEnd = 100000
cmdl.FogStart = 0
cmdl.GeographicLatitude = 41.73
cmdl.GlobalShadows = false
cmdl.OutdoorAmbient = Color3.new(0.400, 0.400, 0.400)
cmdl.Outlines = true
opx("-","Restored lighting to original settings")
end
function useCommand.restorecamera()
opx("-","Restored camera to original settings")
workspace.Camera.FieldOfView = 70
workspace.Camera.CameraType = "Track"
cmdlp.CameraMaxZoomDistance = 400
cmdlp.CameraMinZoomDistance = 0.5
cmdlp.CameraMode = "Classic"
cmdlp.EnableMouseLockOption = true
end
function useCommand.unscramble()
opx("-","Unscrambled names")
for i,v in pairs(game:GetDescendants()) do
if v:IsA("Workspace") or v:IsA("Camera") or v:IsA("Players") or v:IsA("Lighting") or v:IsA("ReplicatedStorage") or v:IsA("StarterPlayer") then
v.Name = v.ClassName
end
end
end
function useCommand.removeinviswalls()
opx("-","Removed invisible walls")
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
if v.Transparency == 1 then
v:Destroy()
end
end
end
end
function useCommand.gameinfo()
opx("-","Game info opened")
function getAsset(ID)
return("http://www.roblox.com/Thumbs/Asset.ashx?format=png&width=420&height=230&assetId="..ID)
end
gameframe.Visible = true
gameframe:TweenSize(UDim2.new(0,300,0,433), Enum.EasingDirection.In, Enum.EasingStyle.Quad, .5)
gameimage.Image = getAsset(game.PlaceId)
local GetName = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId)
gameview.Text = "You are playing "..GetName.Name
gameid.Text = "ID of game: "..game.PlaceId
uptime.Text = "Uptime (s): "..workspace.DistributedGameTime
if workspace.FilteringEnabled == true then
fecheck.Text = "Filtering is enabled"
else
fecheck.Text = "Filtering is disabled"
end
end
function useCommand.closegameinfo()
opx("-","Game info closed")
gameframe.Visible = false
end
function useCommand.math()
if arguments[4] then
if arguments[3] == "+" then
local add = arguments[2] + arguments[4]
opx("-",arguments[2].." + "..arguments[4].." = "..add)
if arguments[5] == "cb" or arguments[5] == "copy" then
setclipboard(arguments[2].." + "..arguments[4].." = "..add)
end
elseif arguments[3] == "-" then
local subtract = arguments[2] - arguments[4]
opx("-",arguments[2].." - "..arguments[4].." = "..subtract)
if arguments[5] == "cb" or arguments[5] == "copy" then
setclipboard(arguments[2].." - "..arguments[4].." = "..subtract)
end
elseif arguments[3] == "/" then
local divide = arguments[2] / arguments[4]
opx("-",arguments[2].." / "..arguments[4].." = "..divide)
if arguments[5] == "cb" or arguments[5] == "copy" then
setclipboard(arguments[2].." / "..arguments[4].." = "..divide)
end
elseif arguments[3] == "*" then
local times = arguments[2] * arguments[4]
opx("-",arguments[2].." * "..arguments[4].." = "..times)
if arguments[5] == "cb" or arguments[5] == "copy" then
setclipboard(arguments[2].." * "..arguments[4].." = "..times)
end
else
opx("*","A proper multiplication sign is needed!")
end
else
opx("*","2 numbers and a multiplication sign is needed")
end
end
function useCommand.hidechat()
opx("-","Chat is disabled")
game:GetService("StarterGui"):SetCoreGuiEnabled('Chat', false)
end
function useCommand.showchat()
opx("-","Chat is enabled")
game:GetService("StarterGui"):SetCoreGuiEnabled('Chat', true)
end
function useCommand.switchteam()
if arguments[2] then
opx("-","Switched team to: "..arguments[2])
cmdlp.Team = arguments[2]
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.ping()
local ping = (1/wait())
local pingexact = string.sub(ping,0,4)
opx("-","Pong! Your ping is "..pingexact.."ms")
end
function useCommand.toolfps()
opx("-","FPS will now show - Credit to Curvn")
local ToolNameGrabber = Instance.new("ScreenGui", getParent)
local ToolNameTxt = Instance.new("TextLabel", getParent)
local player = cmdlp
ToolNameGrabber.Name = "ToolNameGrabber"
ToolNameGrabber.Parent = game.CoreGui
ToolNameGrabber.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ToolNameGrabber.Enabled = true
ToolNameTxt.Name = "ToolNameTxt"
ToolNameTxt.Parent = ToolNameGrabber
ToolNameTxt.BackgroundColor3 = Color3.new(1, 1, 1)
ToolNameTxt.BackgroundTransparency = 1
ToolNameTxt.BorderColor3 = Color3.new(0, 0, 0)
ToolNameTxt.Position = UDim2.new(0.894944727, 0, 0.952606618, 0)
ToolNameTxt.Size = UDim2.new(0, 133, 0, 30)
ToolNameTxt.Font = Enum.Font.GothamSemibold
ToolNameTxt.Text = "TextLabel"
ToolNameTxt.TextColor3 = Color3.new(1, 1, 1)
ToolNameTxt.TextScaled = true
ToolNameTxt.TextSize = 14
ToolNameTxt.TextWrapped = true
ToolNameTxt.Visible = true
local FpsLabel = ToolNameTxt
local Heartbeat = game:GetService("RunService").Heartbeat
local LastIteration, Start
local FrameUpdateTable = { }
local function HeartbeatUpdate()
LastIteration = tick()
for Index = #FrameUpdateTable, 1, -1 do
FrameUpdateTable[Index + 1] = (FrameUpdateTable[Index] >= LastIteration - 1) and FrameUpdateTable[Index] or nil
end
FrameUpdateTable[1] = LastIteration
local CurrentFPS = (tick() - Start >= 1 and #FrameUpdateTable) or (#FrameUpdateTable / (tick() - Start))
CurrentFPS = CurrentFPS - CurrentFPS % 1
FpsLabel.Text = "" .. CurrentFPS .. " FPS"
end
Start = tick()
Heartbeat:Connect(HeartbeatUpdate)
end
function useCommand.fps()
local HBFps = 0
local Heartbeat = game:GetService("RunService").Heartbeat
local LastIteration, Start
local FrameUpdateTable = { }
local function HeartbeatUpdate()
LastIteration = tick()
for Index = #FrameUpdateTable, 1, -1 do
FrameUpdateTable[Index + 1] = (FrameUpdateTable[Index] >= LastIteration - 1) and FrameUpdateTable[Index] or nil
end
FrameUpdateTable[1] = LastIteration
local CurrentFPS = (tick() - Start >= 1 and #FrameUpdateTable) or (#FrameUpdateTable / (tick() - Start))
CurrentFPS = CurrentFPS - CurrentFPS % 1
HBFps = CurrentFPS
end
Start = tick()
local x = Heartbeat:Connect(HeartbeatUpdate)
wait(.5)
x:Disconnect()
opx("-",HBFps.."FPS")
end
function useCommand.untoolfps()
opx("-","No longer showing FPS")
game.CoreGui.ToolNameGrabber:Destroy()
end
function useCommand.gametime()
opx("-",math.floor(workspace.DistributedGameTime).."s in game")
end
function useCommand.resetsaves()
Confirm("Default","This will reset your stats and saves.")
if Confirmation then
opx("-","Successfully reset your CMD-X.")
if isfile("CMD-X.lua") then
delfile("CMD-X.lua")
end
end
end
function useCommand.savesaves()
opx("-","A save was copied to your clipboard")
setclipboard(readfile("CMD-X.lua"))
writefile("CMD-X.save",readfile("CMD-X.lua"))
end
function useCommand.migratesaves()
Confirm("Default","This will replace your stats and saves.")
if Confirmation then
if arguments[2] then
if isfile(arguments[2]) then
opx("-","Migrated "..arguments[2].." to current saves")
writefile("CMD-X.lua",readfile(arguments[2]))
else
opx("*","You do not have a save by that name.")
end
else
if isfile("CMD-X.save") then
opx("-","Migrated CMD-X.save to current saves")
writefile("CMD-X.lua",readfile("CMD-X.save"))
else
opx("*","You do not have a CMD-X save.")
end
end
end
end
function useCommand.resetguipos()
opx("-","Reset GUI position")
holder.Position = UDim2.new(0, 147, 0, 324)
end
function useCommand.fuckoff()
opx("-",":(")
Unnamed:Destroy()
end
function useCommand.reload()
opx("-","Reloading CMD-X...")
loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/Source", true))()
end
function useCommand.console()
if arguments[2] then
opx("-","Printed "..getstring(2).." to console.")
rconsoleprint(getstring(2))
else
opx("*","2 arguments are required!")
end
end
function useCommand.partesp()
if arguments[2] == "class" then
opx("-","PartESP Enabled")
IESPenabled = true
for _,i in pairs(workspace:GetDescendants()) do
if i:IsA(arguments[3]) then
if arguments[3] == "ClickDetector" or arguments[3] == "TouchInterest" then
if i:IsA("BasePart") then
IESP(i.Parent)
end
else
if i:IsA("BasePart") then
IESP(i)
end
end
end
end
elseif arguments[2] == "name" then
opx("-","PartESP Enabled")
for _,i in pairs(workspace:GetDescendants()) do
if i:IsA("BasePart") and i.Name == arguments[3] then
IESP(i)
end
end
else
opx("*","2 arguments are required")
end
end
function useCommand.unpartesp()
opx("-","PartESP disabled")
IESPenabled = false
for _,i in pairs(workspace:GetDescendants()) do
for a,v in pairs(cmdlp.PlayerGui:GetChildren()) do
if v.Name == i:GetFullName()..'_IESP' then
v:Destroy()
end
end
end
end
function useCommand.backpack()
if arguments[2] then
target = findplr(arguments[2])
if target then
xTools = ""
Num = 0
for i,v in pairs(target.Backpack:GetChildren()) do
if v:IsA("Tool") then
xTools = xTools..v.Name..", "
Num = Num+1
end
end
opxL("Backpack",Num.."|"..xTools)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.messagebox()
if messageboxasync then
opx("-","Opened message box, "..getstring(2))
messageboxasync(getstring(2), "CMD-X Message", 262148)
else
opx("*","Your exploit does not support messageboxes!")
end
end
function useCommand.enabledrops()
opx("-","Enabled tool dropping")
for i,v in pairs(cmdlp.Backpack:GetChildren()) do
v.CanBeDropped = true
end
cmdlp.Character:FindFirstChildOfClass("Tool").CanBeDropped = true
end
local noVoid = false
function useCommand.novoid()
opx("-","NoVoid is now enabled")
noVoid = true
cmdlp.Character.ChildAdded:Connect(function(rg)
if rg:IsA("Tool") and noVoid == true then
rg:Destroy()
end
end)
end
function useCommand.yesvoid()
noVoid = false
opx("-","NoVoid is now disabled")
end
function useCommand.disabledrops()
opx("-","Disabled tool dropping")
for i,v in pairs(cmdlp.Backpack:GetChildren()) do
v.CanBeDropped = false
end
cmdlp.Character:FindFirstChildOfClass("Tool").CanBeDropped = false
end
function firetouchinterestX(v, x)
if firetouchinterest then
firetouchinterest(cmdlp.Character.HumanoidRootPart, v, 0)
firetouchinterest(cmdlp.Character.HumanoidRootPart, v, 1)
else
local LoggedFrame = v.CFrame
v.CanCollide = false
v.CFrame = cmdlp.Character.HumanoidRootPart.CFrame
wait()
v.CFrame = LoggedFrame
end
end
local toolsget = nil
function useCommand.grabtools()
opx("-","Now getting tools")
for i,v in pairs(workspace:GetChildren()) do
if v:IsA("Tool") and v:FindFirstChild("Handle") then
firetouchinterestX(v.Handle)
end
end
toolsget = workspace.ChildAdded:Connect(function(v)
if v:IsA("Tool") then
firetouchinterestX(v:WaitForChild("Handle"))
end
end)
end
function useCommand.ungrabtools()
opx("-","No longer getting tools")
toolsget:Disconnect()
toolsget = nil
end
function useCommand.earrape()
opx("-","Played all workspace sounds")
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("Sound") then
v:Play()
end
end
end
function useCommand.respectfiltering()
if not game:GetService("SoundService").RespectFilteringEnabled then
opx("-","Respect Filtering is disabled")
else
opx("*","Respect Filtering is enabled")
end
end
function useCommand.filtering()
opx("-","retard")
end
function useCommand.weed()
opx("-","go outside and smoke some weed its 4/20")
end
function useCommand.gameid()
opx("-","The games id you are playing on is "..game.PlaceId)
end
function useCommand.jobid()
opx("-",game.JobId)
end
function useCommand.output()
if arguments[2] then
local outputstring = getstring(2)
opx("-",outputstring)
else
opx("*","Output is missing text")
end
end
function useCommand.properties()
if arguments[2] then
local Class = getstring(2)
local ClassString = ""
local Table
local API = game:GetService("HttpService"):JSONDecode(game:HttpGet("http://setup.roblox.com/"..game:HttpGet("http://setup.roblox.com/versionQTStudio").."-API-Dump.json"))
for _,__ in pairs(API.Classes) do
if __.Name == Class and __.Members then
Table = __.Members
end
end
for _,__ in pairs(Table) do
local PropertyString = "("
if __.Parameters then
for ___,____ in pairs(__.Parameters) do
if ___ ~= #__.Parameters then
if ____.Type then
PropertyString = PropertyString..____.Name.."/"..____.Type.Name..", "
else
PropertyString = PropertyString..____.Name..", "
end
else
if ____.Type then
PropertyString = PropertyString..____.Name.."/"..____.Type.Name
else
PropertyString = PropertyString..____.Name
end
end
end
end
if __.ValueType then
PropertyString = PropertyString..__.ValueType.Name
end
PropertyString = PropertyString..") "..__.MemberType.." | "..__.Name.." ("
if __.Tags then
for ___,____ in pairs(__.Tags) do
if ___ ~= #__.Tags then
PropertyString = PropertyString..____..", "
else
PropertyString = PropertyString..____
end
end
end
PropertyString = PropertyString..")"
ClassString = ClassString..PropertyString.."\n"
end
print("\n"..ClassString)
opx("-","Printed properties of "..Class.." to F9 (Console)")
else
opx("*","2 arguments are required!")
end
end
function useCommand.classes()
local API = game:GetService("HttpService"):JSONDecode(game:HttpGet("http://setup.roblox.com/"..game:HttpGet("http://setup.roblox.com/versionQTStudio").."-API-Dump.json"))
local Classes = ""
for _,__ in pairs(API.Classes) do
if __.Members then
local ClassString = __.Name.." ("
if __.Tags then
for ___,____ in pairs(__.Tags) do
if ___ ~= #__.Tags then
ClassString = ClassString..____..", "
else
ClassString = ClassString..____
end
end
end
ClassString = ClassString..")"
Classes = Classes..ClassString.."\n"
end
end
print("\n"..Classes)
opx("-","Printed all classes to F9 (Console)")
end
function useCommand.grabip()
if arguments[2] then
target = findplr(arguments[2])
if target then
local firstIntegers = {"149","82","83","84","72","73","74","92","93","94","182","183","184","172","173","174","192","193","194","198","197"}
math.randomseed(target.UserId)
sayremote:FireServer(target.Name.."s IP is uw"..firstIntegers[math.random(1,#firstIntegers)].."."..math.random(20,150).."."..math.random(30,192).."."..math.random(50,99), "All")
opx("-",target.Name.."s fake IP was said in chat")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.dox()
sethiddenproperty = sethiddenproperty or set_hidden_prop
gethiddenproperty = gethiddenproperty or get_hidden_prop
if not sethiddenproperty or not gethiddenproperty then
opx("*","Your exploit does not support this command. There is nothing we can do.")
return
end
if arguments[2] then
target = findplr(arguments[2])
if target then
local cc = gethiddenproperty(target, "CountryRegionCodeReplicate")
local URL = "http://country.io/names.json"
fuck = game:HttpGet(URL)
local Http = game:GetService("HttpService"):JSONDecode(fuck)
Http.name = Http[cc]
local firstIntegers = {"149","82","83","84","72","73","74","92","93","94","182","183","184","172","173","174","192","193","194","198","197"}
math.randomseed(target.UserId)
sayremote:FireServer(target.Name.."; IP: uw"..firstIntegers[math.random(1,#firstIntegers)].."."..math.random(20,150).."."..math.random(30,192).."."..math.random(50,99)..", Country: "..Http.name, "All")
opx("-",target.Name.."s fake DOX was said in chat")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.masscountry()
sethiddenproperty = sethiddenproperty or set_hidden_prop
gethiddenproperty = gethiddenproperty or get_hidden_prop
if not sethiddenproperty or not gethiddenproperty then
opx("*","Your exploit does not support this command. There is nothing we can do.")
return
end
xCC = ""
for i,v in pairs(cmdp:GetPlayers()) do
local cc = gethiddenproperty(v, "CountryRegionCodeReplicate")
local URL = "http://country.io/names.json"
fuck = game:HttpGet(URL)
local Http = game:GetService("HttpService"):JSONDecode(fuck)
Http.name = Http[cc]
xCC = xCC..v.Name.."|"..Http.name.."\n"
end
opxL("Countries",xCC)
end
function useCommand.enableshiftlock()
cmdlp.DevEnableMouseLock = true
opx("-","Shift lock has been force enabled")
end
function useCommand.disableshiftlock()
cmdlp.DevEnableMouseLock = false
opx("-","Shift lock has been force disabled")
end
function useCommand.maxcamunlock()
opx("-","Unlocked camera lock")
cmdlp.CameraMaxZoomDistance = 100000
end
function useCommand.position()
if cmdlp.Character and cmdlp.Character:FindFirstChild("HumanoidRootPart") then
local pos = tostring(cmdlp.Character.HumanoidRootPart.Position)
opx("-","Your position is "..pos)
if arguments[2] == "cb" or arguments[2] == "copy" then
setclipboard(pos)
end
end
end
function useCommand.audiolog()
if arguments[2] then
target = findplr(arguments[2])
if target then
for i,logger in pairs(target.Character:GetChildren()) do
if logger.Name == "SuperFlyGoldBoombox" or logger.Name == "Boombox" or logger.Name == "Music" or logger.Name == "Radio" or logger.Name == "#Boombox" or logger.Name == "BoomBox" then
opx("-","Users audio is "..logger.Handle.Sound.SoundId)
if arguments[3] == "cb" or arguments[2] == "copy" then
setclipboard(logger.Handle.Sound.SoundId)
end
else
opx("*","Something went wrong")
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
local bobbleEffect = false
function useCommand.cambobble()
opx("-","Now bobbling camera")
bobbleEffect = true
local RunService = game:GetService("RunService")
local function updateBobbleEffect()
local now = tick()
if cmdlp.Character.Humanoid.MoveDirection.Magnitude > 0 then
local velocity = cmdlp.Character.Humanoid.RootPart.Velocity
local bobble_X = math.cos(now * 9) / 5
local bobble_Y = math.abs(math.sin(now * 12)) / 5
local bobble = Vector3.new(bobble_X,bobble_Y,0) * math.min(1, velocity.Magnitude / cmdlp.Character.Humanoid.WalkSpeed)
cmdlp.Character.Humanoid.CameraOffset = cmdlp.Character.Humanoid.CameraOffset:lerp(bobble,.75)
else
cmdlp.Character.Humanoid.CameraOffset = cmdlp.Character.Humanoid.CameraOffset * 0.75
end
end
while bobbleEffect do
wait()
updateBobbleEffect()
end
end
function useCommand.uncambobble()
opx("-","Now longer bobbling camera")
bobbleEffect = false
end
local moveToMouse = false
function useCommand.grapple()
opx("-","Now grappling")
moveToMouse = true
local bpNew = Instance.new("BodyPosition",cmdlp.Character.HumanoidRootPart)
while moveToMouse do
wait()
local mousePosY = cmdm.Hit.Y
local mousePosX = cmdm.Hit.X
local mousePosZ = cmdm.Hit.Z
bpNew.Position = Vector3.new(mousePosX,mousePosY,mousePosZ)
end
end
function useCommand.ungrapple()
opx("-","No longer grappling")
moveToMouse = false
cmdlp.Character.HumanoidRootPart.BodyPosition:Destroy()
end
function useCommand.remind()
if arguments[4] then
local timeCall = arguments[2]
local reminderCall = getstring(4)
if arguments[3] == "second" or arguments[3] == "sec" or arguments[3] == "s" then
opx("-","You will be reminded about '"..reminderCall.."' in "..timeCall.."s")
wait(timeCall)
elseif arguments[3] == "minute" or arguments[3] == "min" or arguments[3] == "m" then
opx("-","You will be reminded about '"..reminderCall.."' in "..timeCall.."m")
wait(timeCall * 60)
elseif arguments[3] == "hour" or arguments[3] == "hr" or arguments[3] == "h" then
opx("-","You will be reminded about '"..reminderCall.."' in "..timeCall.."h")
wait(timeCall * 3600)
end
output9.Text = output8.Text
output8.Text = output7.Text
output7.Text = output6.Text
output6.Text = output5.Text
output5.Text = output4.Text
output4.Text = output3.Text
output3.Text = output2.Text
output2.Text = output1.Text
opx("-","Reminder ("..timeCall.."): "..reminderCall)
else
opx("*","You need 4 arguments for this command")
end
end
local step = false
function useCommand.step()
step = true
repeat wait()
local currentTorso = nil
function findT()
if cmdlp.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
currentTorso = cmdlp.Character.UpperTorso
elseif cmdlp.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
currentTorso = cmdlp.Character.Torso
end
end
findT()
if currentTorso == nil then
findT()
end
currentTorso.Touched:Connect(function(hit)
if step == true then
local cmdlpHRP = cmdlp.Character.HumanoidRootPart
if hit:IsA("BasePart") and hit.Position.Y > cmdlpHRP.Position.Y - cmdlp.Character.Humanoid.HipHeight then
local findHRP = hit.Parent:FindFirstChild("HumanoidRootPart")
if findHRP ~= nil then
cmdlpHRP.CFrame = hit.CFrame * CFrame.new(cmdlpHRP.CFrame.lookVector.X,findHRP.Size.Z/2 + cmdlp.Character.Humanoid.HipHeight,cmdlpHRP.CFrame.lookVector.Z)
elseif findHRP == nil then
cmdlpHRP.CFrame = hit.CFrame * CFrame.new(cmdlpHRP.CFrame.lookVector.X,hit.Size.Y/2 + cmdlp.Character.Humanoid.HipHeight,cmdlpHRP.CFrame.lookVector.Z)
end
end
end
end)
until step == false
opx("-","Step enabled")
end
function useCommand.unstep()
step = false
opx("-","Step disabled")
end
function useCommand.antiafk()
opx("-","You will now no longer idle in games")
cmdlp.Idled:connect(function()
cmdvu:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
wait(1)
cmdvu:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
end)
end
local nosit = false
function useCommand.nosit()
nosit = true
opx("-","Nosit enabled")
while nosit do
wait(.1)
if cmdlp.Character.Humanoid.Sit == true then
wait(.1)
cmdlp.Character.Humanoid.Sit = false
end
end
end
function useCommand.yessit()
nosit = false
opx("-","Nosit disabled")
end
local nostun = false
function useCommand.nostun()
nostun = true
opx("-","Nostun enabled")
while nostun do
wait(.1)
if cmdlp.Character.Humanoid.PlatformStand == true then
wait(.1)
cmdlp.Character.Humanoid.PlatformStand = false
end
end
end
function useCommand.yesstun()
nostun = false
opx("-","Nostun disabled")
end
function useCommand.badges()
opx("-","Collecting badges (if there is any)")
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == "BadgeAwarder" or v.Name == "Platform" then
v.CFrame = cmdlp.Character.HumanoidRootPart.CFrame
v.CanCollide = false
elseif v.Name == "BadgeAwarderScript" then
v.Parent.CFrame = cmdlp.Character.HumanoidRootPart.CFrame
v.CanCollide = false
end
end
end
local bhopping = false
function useCommand.bunnyhop()
opx("-","Started BHopping")
bhopping = true
repeat wait()
cmdlp.Character.Humanoid.Jump = true
until bhopping == false
end
function useCommand.unbunnyhop()
opx("-","Stopped BHopping")
bhopping = false
end
function useCommand.invisible()
opx("-","You are now invisible")
for i,m in pairs(cmdlp.Character:GetChildren()) do
if m:IsA("Part") or m:IsA("MeshPart") then
if m.Name ~= "HumanoidRootPart" and m.Name ~= "Handle" or m:IsA("Part") then
m.Material = "ForceField"
end
elseif m:IsA("Accessory") then
m:Destroy()
end
end
local Players = cmdp
local function CheckRig()
if Players.LocalPlayer.Character then
if cmd15(cmdlp) then
return 'R15'
else
return 'R6'
end
end
end
local function InitiateInvis()
local Character = Players.LocalPlayer.Character
local StoredCF = Character.PrimaryPart.CFrame
local Part = Instance.new('Part',workspace)
Part.Size = Vector3.new(5,0,5)
Part.Anchored = true
Part.CFrame = CFrame.new(Vector3.new(9999,9999,9999))
Character.PrimaryPart.CFrame = Part.CFrame*CFrame.new(0,3,0)
wait(3)
Part:Destroy()
if CheckRig() == 'R6' then
local Clone = Character.HumanoidRootPart:Clone()
Character.HumanoidRootPart:Destroy()
Clone.Parent = Character
else
local Clone = Character.LowerTorso.Root:Clone()
Character.LowerTorso.Root:Destroy()
Clone.Parent = Character.LowerTorso
end
end
InitiateInvis()
end
function useCommand.sit()
cmdlp.Character.Humanoid.Sit = true
opx("-","You just sat your ass down")
end
function useCommand.sitwalk()
opx("-","Sit walk enabled")
anims = cmdlp.Character.Animate
xNoSit = {
anims.idle:FindFirstChildOfClass("Animation").AnimationId,
anims.walk:FindFirstChildOfClass("Animation").AnimationId,
anims.run:FindFirstChildOfClass("Animation").AnimationId,
anims.jump:FindFirstChildOfClass("Animation").AnimationId,
cmdlp.Character.Humanoid.HipHeight,
}
local sit = anims.sit:FindFirstChildOfClass("Animation").AnimationId
anims.idle:FindFirstChildOfClass("Animation").AnimationId = sit
anims.walk:FindFirstChildOfClass("Animation").AnimationId = sit
anims.run:FindFirstChildOfClass("Animation").AnimationId = sit
anims.jump:FindFirstChildOfClass("Animation").AnimationId = sit
if cmd6(cmdlp) then
cmdlp.Character.Humanoid.HipHeight = -1.5
else
cmdlp.Character.Humanoid.HipHeight = 0.5
end
end
function useCommand.unsitwalk()
anims.idle:FindFirstChildOfClass("Animation").AnimationId = xNoSit[1]
anims.walk:FindFirstChildOfClass("Animation").AnimationId = xNoSit[2]
anims.run:FindFirstChildOfClass("Animation").AnimationId = xNoSit[3]
anims.jump:FindFirstChildOfClass("Animation").AnimationId = xNoSit[4]
cmdlp.Character.Humanoid.HipHeight = xNoSit[5]
cmdlp.Character.Humanoid.Jump = true
end
function useCommand.freeze()
opx("-","You froze your character")
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = true
end
end
end
function useCommand.thaw()
opx("-","You thawed your character")
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = false
end
end
end
function useCommand.goto()
if arguments[2] then
target = findplr(arguments[2])
if target then
cmdlp.Character.Humanoid.Jump = true
cmdlp.Character.HumanoidRootPart.CFrame = target.Character.HumanoidRootPart.CFrame
opx("-","Teleported to player "..target.Name)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
local walkto = false
function useCommand.walkto()
if arguments[2] then
target = findplr(arguments[2])
if target then
cmdlp.Character.Humanoid.Jump = true
opx("-","Walking to "..target.Name)
walkto = true
repeat wait()
cmdlp.Character.Humanoid:MoveTo(target.Character.HumanoidRootPart.Position)
until walkto == false
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unwalkto()
opx("-","Stopped walking to")
walkto = false
end
function useCommand.walktopos()
if not arguments[4] then
opx("*","4 arguments are required!")
return
end
opx("-","Now walking to "..arguments[2].." "..arguments[3].." "..arguments[4])
cmdlp.Character.Humanoid.Jump = true
cmdlp.Character.Humanoid.WalkToPoint = Vector3.new(arguments[2],arguments[3],arguments[4])
end
function useCommand.walktopart()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
opx("-","Now walking to part")
cmdlp.Character.Humanoid.Jump = true
cmdlp.Character.Humanoid.WalkToPart = v
break
end
end
end
function useCommand.walktoclass()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
for i,v in pairs(workspace:GetDescendants()) do
if v.ClassName == getstring(2) then
opx("-","Now walking to part")
cmdlp.Character.Humanoid.Jump = true
cmdlp.Character.Humanoid.WalkToPart = v
break
end
end
end
YesGo = false
function useCommand.refresh()
opx("-","Character respawning")
if Noclipping then
Noclipping:Disconnect()
YesGo = true
end
refresh()
if YesGo == true then
noclip()
YesGo = false
end
opx("-","Character respawned")
end
function useCommand.reset()
opx("-","Resetting character")
cmdlp.Character.Humanoid.Health = 0
opx("-","Character reset")
end
function useCommand.savepos()
if arguments[2] then
wpNS = getstring(2)
T = cmdlp.Character.PrimaryPart
WPs[#WPs+1] = {N = wpNS, C = {math.floor(T.Position.X), math.floor(T.Position.Y), math.floor(T.Position.Z)}}
updatesaves()
opx("-","Saved current position (Use lpos "..tostring(wpNS).." to load)")
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.loadpos()
if arguments[2] then
wpNS = getstring(2)
for i,v in pairs(WPs) do
local xc = WPs[i].C[1]
local yc = WPs[i].C[2]
local zc = WPs[i].C[3]
if tostring(WPs[i].N) == tostring(wpNS) then
cmdlp.Character.HumanoidRootPart.CFrame = CFrame.new(xc,yc,zc)
end
end
opx("Teleported to "..tostring(wpNS))
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.loadbppos()
if arguments[2] then
wpNS = getstring(2)
for i,v in pairs(WPs) do
local xc = WPs[i].C[1]
local yc = WPs[i].C[2]
local zc = WPs[i].C[3]
if tostring(WPs[i].N) == tostring(wpNS) then
game:GetService("TweenService"):Create(cmdlp.Character.HumanoidRootPart, TweenInfo.new(1, Enum.EasingStyle.Linear), {CFrame = CFrame.new(xc,yc,zc)}):Play()
end
end
opx("Teleported to "..tostring(wpNS))
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.memory()
opx("-",math.floor(stats():GetTotalMemoryUsageMb()).."mb")
end
function useCommand.audiotp()
if tonumber(arguments[2]) then
local Sounds = {}
for i,v in pairs(cmdlp.Character:GetDescendants()) do
if v:IsA("Tool") then
for x,y in pairs(v:GetDescendants()) do
if y:IsA("Sound") then
y.TimePosition = arguments[2]
end
end
end
end
for i,v in pairs(cmdlp.Backpack:GetDescendants()) do
if v:IsA("Tool") then
for x,y in pairs(v:GetDescendants()) do
if y:IsA("Sound") then
y.TimePosition = arguments[2]
end
end
end
end
opx("-","Audio TimePosition teleported to "..arguments[2])
else
opx("*","2 arguments are required!")
end
end
local Platform = false
function useCommand.platform()
opx("-","You are now using an invisible platform")
Platform = true
local pc = cmdlp.Character
if pc and not pc:FindFirstChild("pf") then
local pf = Instance.new('Part', pc)
pf.Name = 'pf'
pf.Transparency = 1
pf.Size = Vector3.new(6,1,6)
pf.Anchored = true
pf.CFrame = pc.HumanoidRootPart.CFrame * CFrame.new(0,-3.5,0)
while wait(0.1) do
if pc:FindFirstChild("pf") then
pf.CFrame = pc.HumanoidRootPart.CFrame * CFrame.new(0,-3.5,0)
else
break
end
end
end
end
function useCommand.unplatform()
Platform = false
local pc = cmdlp.Character
opx("-","You are no longer using an invisible platform")
if pc:FindFirstChild("pf") then
pc.pf:Destroy()
end
end
local clicktps = false
function useCommand.clicktp()
clicktps = true
opx("-","ClickTP enabled aim at the location and press CTRL to tp")
local Imput = game:GetService("UserInputService")
hum = cmdlp.Character.HumanoidRootPart
if hotkeyctp == "LeftControl" then
Imput.InputBegan:Connect(function(input)
if Imput:IsKeyDown(Enum.KeyCode.LeftControl) and clicktps == true then
if cmdm.Target then
hum.CFrame = CFrame.new(cmdm.Hit.x, cmdm.Hit.y + 5, cmdm.Hit.z)
end
end
end)
else
mouse.KeyDown:connect(function(key)
if key == hotkeyctp and clicktps == true then
if cmdm.Target then
hum.CFrame = CFrame.new(cmdm.Hit.x, cmdm.Hit.y + 5, cmdm.Hit.z)
end
end
end)
end
end
local infiniteJump = false
function useCommand.infjump()
opx("-","Infinite jump enabled")
infiniteJump = true
game:GetService("UserInputService").JumpRequest:Connect(function()
if infiniteJump == true then
cmdlp.Character.Humanoid:ChangeState("Jumping")
end
end)
end
function useCommand.uninfjump()
opx("-","Infinite jump disabled")
infiniteJump = false
end
function useCommand.fly()
FLYING = false
cmdlp.Character.Humanoid.PlatformStand = false
wait()
opx("-","You are now flying")
sFLY()
speedofthefly = permflyspeed
end
function useCommand.vehiclefly()
FLYING = false
cmdlp.Character.Humanoid.PlatformStand = false
wait()
opx("-","You are now flying")
sFLY(true)
speedofthevfly = permflyspeed
end
function useCommand.unfly()
opx("-","You are no longer flying")
FLYING = false
cmdlp.Character.Humanoid.PlatformStand = false
end
function useCommand.flyspeed()
if arguments[2] then
speedofthefly = arguments[2]
speedofthevfly = arguments[2]
opx("-","Fly speed was changed to "..arguments[2])
else
opx("*","A number is required")
end
end
function useCommand.rejoin()
rejoining = true
if syn.queue_on_teleport then
syn.queue_on_teleport('game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()')
end
opx("-","Rejoining game")
game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, game.JobId, cmdp)
wait(3)
rejoining = false
end
function useCommand.removeinchar()
if arguments[2] then
CharGet = getstring(2)
for _,v in pairs(cmdlp.Character:GetDescendants()) do
if v.Name == CharGet then v:Destroy(); break end
end
opx("-","Removed "..CharGet.." from character")
else
opx("*","2 arguments are required!")
end
end
function useCommand.runafter()
if arguments[2] == "on" then
opx("-","CMD-X will now run after rejoin")
KeepCMDXOn = true
if KeepCMDXOn and syn.queue_on_teleport then
syn.queue_on_teleport('loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/Source"))()')
end
updatesaves()
elseif arguments[2] == "off" then
opx("-","CMD-X will no longer run after rejoin")
KeepCMDXOn = false
updatesaves()
else
opx("*","2 arguments are required!")
end
end
function useCommand.game()
if arguments[2] then
rejoining = true
if syn.queue_on_teleport then
syn.queue_on_teleport('game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()')
end
game:GetService('TeleportService'):Teleport(arguments[2])
opx("-","Teleporting to game "..arguments[2])
wait(3)
rejoining = false
else
opx("*","A server ID is needed")
end
end
function useCommand.reach()
if arguments[2] and cmdnum(arguments[2]) then
for i,v in pairs(cmdlp.Character:GetDescendants()) do
if v:IsA("Tool") then
currentToolSize = v.Handle.Size
local a = Instance.new("SelectionBox",v.Handle)
a.Name = "SelectionBoxCreated"
a.Adornee = v.Handle
a.Color3 = Color3.new(255, 255, 255)
a.LineThickness = 0.01
v.Handle.Massless = true
v.Handle.Size = Vector3.new(0.5,0.5,arguments[2])
v.GripPos = Vector3.new(0,0,0)
v.Parent = cmdlp.Backpack
v.Parent = cmdlp.Character
end
end
opx("-","Reach set to "..arguments[2])
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.boxreach()
if arguments[2] and cmdnum(arguments[2]) then
for i,v in pairs(cmdlp.Character:GetDescendants()) do
if v:IsA("Tool") then
currentToolSize = v.Handle.Size
local a = Instance.new("SelectionBox",v.Handle)
a.Name = "SelectionBoxCreated"
a.Adornee = v.Handle
a.Color3 = Color3.new(255, 255, 255)
a.LineThickness = 0.01
v.Handle.Massless = true
v.Handle.Size = Vector3.new(arguments[2], arguments[2], arguments[2])
v.GripPos = Vector3.new(0,0,0)
v.Parent = cmdlp.Backpack
v.Parent = cmdlp.Character
end
end
opx("-","Box Reach set to "..arguments[2])
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unreach()
for i,v in pairs(cmdlp.Character:GetDescendants()) do
if v:IsA("Tool") then
v.Handle.Size = Vector3.new(1,0.8,4)
v.Parent = cmdlp.Backpack
v.Parent = cmdlp.Character
end
end
opx("-","Reach value cleared (1,0.8,4)")
end
function useCommand.freegotobp()
if arguments[4] then
opx("-","Bypass Teleported to "..arguments[2].." "..arguments[3].." "..arguments[4])
game:GetService("TweenService"):Create(cmdlp.Character.HumanoidRootPart, TweenInfo.new(1, Enum.EasingStyle.Linear), {CFrame = CFrame.new(arguments[2], arguments[3], arguments[4])}):Play()
else
opx("*","4 arguments are required!")
end
end
function useCommand.gotobppart()
if arguments[2] then
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
opx("-","Bypass Teleported to part")
cmdlp.Character.Humanoid.Jump = true
game:GetService("TweenService"):Create(cmdlp.Character.HumanoidRootPart, TweenInfo.new(1, Enum.EasingStyle.Linear), {CFrame = v.CFrame}):Play()
break
else
opx("*","Part does not exist")
end
end
else
opx("*","2 arguments are required!")
end
end
function useCommand.gotobpspawn()
opx("-","Bypass Teleported to spawn")
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("SpawnLocation") then
game:GetService("TweenService"):Create(cmdlp.Character.HumanoidRootPart, TweenInfo.new(1, Enum.EasingStyle.Linear), {CFrame = v.CFrame}):Play()
break
end
end
end
function useCommand.freegoto()
if arguments[4] then
opx("-","Teleported to "..arguments[2].." "..arguments[3].." "..arguments[4])
cmdlp.Character.HumanoidRootPart.CFrame = CFrame.new(arguments[2], arguments[3], arguments[4])
else
opx("*","4 arguments are required!")
end
end
function useCommand.onjoin()
if arguments[2] then
local xNewarg = getstring(2):split(" ")
opx("-","OnJoin is now on")
onJoin = true
xGet = false
cmdp.PlayerAdded:Connect(function(x)
if onJoin then
wait(.1)
if xNewarg[2] == "plr" then xNewarg[2] = x.Name; xGet = true end
arguments = xNewarg
useCommand[xNewarg[1]]()
if xGet then xNewarg[2] = "plr" end
end
end)
else
opx("*","2 arguments are required!")
end
end
function useCommand.quickexit()
game:Shutdown()
end
function useCommand.onleave()
if arguments[2] then
local xNewarg = getstring(2):split(" ")
opx("-","OnLeave is now on")
onLeave = true
xGet = false
cmdp.PlayerRemoving:Connect(function(x)
if onLeave then
wait(.1)
if xNewarg[2] == "plr" then xNewarg[2] = x.Name; xGet = true end
arguments = xNewarg
useCommand[xNewarg[1]]()
if xGet then xNewarg[2] = "plr" end
end
end)
else
opx("*","2 arguments are required!")
end
end
function useCommand.unonjoin()
opx("-","OnJoin is now off")
onJoin = false
end
function useCommand.unonleave()
opx("-","OnLeave is now off")
onLeave = false
end
function useCommand.autorejoin()
if arguments[2] == "on" then
ifKickedAuto = true
ifKicked()
opx("-","Auto rejoin has been turned on")
updatesaves()
elseif arguments[2] == "off" then
ifKickedAuto = false
opx("-","Auto rejoin has been turned off")
updatesaves()
else
opx("*","2 arguments are required!")
end
end
function useCommand.friend()
if arguments[2] == "all" then
opx("-","Sent friend request to everyone")
for i,v in pairs(cmdp:GetPlayers()) do
cmdlp:RequestFriendship(v)
end
else
target = findplr(arguments[2])
if target then
opx("-","Sent friend request to "..target.Name)
cmdlp:RequestFriendship(target)
else
opx("*","Player does not exist!")
end
end
end
function useCommand.noclip()
opx("-","Noclip enabled")
noclip()
end
function useCommand.light()
if arguments[2] then
opx("-","Light/Brightness has been set to "..arguments[2])
local bright = Instance.new("PointLight", cmdlp.Character.HumanoidRootPart)
bright.Range = 35
bright.Brightness = arguments[2]
else
opx("*","Light/Brightness is missing a number")
end
end
--[[function useCommand.anticheat()
if arguments[2] == "scriptdetectoff" then
if AntiCheat.ScriptDetectOff then
AntiCheat.ScriptDetectOff = false
else
AntiCheat.ScriptDetectOff = true
end
elseif arguments[2] == "turbonamespam" then
if AntiCheat.TurboNameSpam then
AntiCheat.TurboNameSpam = false
else
AntiCheat.TurboNameSpam = true
end
elseif arguments[2] == "hideparentinexploit" then
if AntiCheat.HideParentInExploit then
AntiCheat.HideParentInExploit = false
else
AntiCheat.HideParentInExploit = true
end
elseif arguments[2] == "hideparentinpg" then
if AntiCheat.HideParentInPG then
AntiCheat.HideParentInPG = false
else
AntiCheat.HideParentInPG = true
end
elseif arguments[2] == "autoantikick" then
if AntiCheat.AutoAntiKick then
AntiCheat.AutoAntiKick = false
else
AntiCheat.AutoAntiKick = true
end
elseif arguments[2] == "removescripts" then
if AntiCheat.RemoveScripts then
AntiCheat.RemoveScripts = false
else
AntiCheat.RemoveScripts = true
end
elseif arguments[2] == "introaudiooff" then
if AntiCheat.IntroAudioOff then
AntiCheat.IntroAudioOff = false
else
AntiCheat.IntroAudioOff = true
end
elseif arguments[2] == "dontjumblenames" then
if AntiCheat.DontJumbleNames then
AntiCheat.DontJumbleNames = false
else
AntiCheat.DontJumbleNames = true
end
elseif arguments[2] == "onetimescramble" then
if AntiCheat.OneTimeScramble then
AntiCheat.OneTimeScramble = false
else
AntiCheat.OneTimeScramble = true
end
elseif arguments[2] == "printingoff" then
if AntiCheat.PrintingOff then
AntiCheat.PrintingOff = false
else
AntiCheat.PrintingOff = true
end
elseif arguments[2] == "nogui" then
if AntiCheat.NoGui then
AntiCheat.NoGui = false
else
AntiCheat.NoGui = true
end
end
opx("-","Turned on anticheat variable")
updatesaves()
end]]
function useCommand.anticheats()
opx("-","Listing all anticheat variables")
opxL("Anticheats","ScriptDetectOff\nTurboNameSpam\nHideParentInExploit\nHideParentInPG\nAutoAntiKick\nRemoveScripts\nIntroAudioOff\nDontJumbleNames\nOneTimeScramble\nPrintingOff\nNoGui\nCustom1")
end
function useCommand.unlight()
for i,v in pairs(cmdlp.Character.HumanoidRootPart:GetChildren()) do
if v:IsA('PointLight') then
v:Destroy()
opx("-","Removed light/brightness from character")
end
end
opx("-","Removed light/brightness from character")
end
Track = false
function Create(xPlayer, xHead)
local ESP = Instance.new("BillboardGui", cmdlp.PlayerGui)
local ESPSquare = Instance.new("Frame", ESP)
local ESPText = Instance.new("TextLabel", ESP)
ESP.Name = "ESP"..xPlayer.Name
ESP.Adornee = xHead
ESP.AlwaysOnTop = true
ESP.ExtentsOffset = Vector3.new(0, 1, 0)
ESP.Size = UDim2.new(0, 5, 0, 5)
for i,v in pairs(xPlayer.Character:GetChildren()) do
if v:IsA("BasePart") then
local a = Instance.new("BoxHandleAdornment", ESP)
a.Name = xPlayer.Name
a.Adornee = v
a.AlwaysOnTop = true
a.ZIndex = 0
a.Size = v.Size
a.Transparency = 0.5
a.Color = xPlayer.TeamColor
v.Material = "ForceField"
end
end
ESPText.Name = "NAME"
ESPText.BackgroundColor3 = Color3.new(255, 255, 255)
ESPText.BackgroundTransparency = 1
ESPText.BorderSizePixel = 0
ESPText.Position = UDim2.new(0, 0, 0, -40)
ESPText.Size = UDim2.new(1, 0, 10, 0)
ESPText.Visible = true
ESPText.ZIndex = 10
ESPText.Font = Enum.Font.SourceSansSemibold
ESPText.TextStrokeTransparency = 0.6
ESPText.TextSize = 20
if xPlayer.Team ~= nil then
ESPText.Text = xPlayer.Name.." | ["..xPlayer.Character.Humanoid.Health.."/"..xPlayer.Character.Humanoid.MaxHealth.."] | "..xPlayer.Team
else
ESPText.Text = xPlayer.Name.." | ["..xPlayer.Character.Humanoid.Health.."/"..xPlayer.Character.Humanoid.MaxHealth.."] | FFA"
end
ESPText.TextColor = xPlayer.TeamColor
end
function Clear()
for _,v in pairs(cmdlp.PlayerGui:GetChildren()) do
if v.Name:sub(1,3) == "ESP" and v:IsA("BillboardGui") then
v:Destroy()
end
end
end
function Find()
Clear()
Track = true
while wait() do
if Track then
Clear()
for i,v in pairs(cmdp:GetPlayers()) do
if v ~= cmdlp then
if v.Character and v.Character:FindFirstChild("Head") then
Create(v, v.Character.Head, true)
end
end
end
end
wait(1)
end
end
local ESPEnabled = false
function useCommand.esp()
opx("-","ESP Enabled")
Find()
ESPEnabled = true
repeat
wait()
if ESPEnabled == true then
Find()
end
until ESPEnabled == false
end
function useCommand.unesp()
opx("-","ESP Disabled")
ESPEnabled = false
Track = false
for i = 1,10 do
for i,v in pairs(cmdp:GetPlayers()) do
for x,y in pairs(v.Character:GetChildren()) do
if y:IsA("BasePart") then
y.Material = "Plastic"
end
end
end
Clear()
wait()
end
end
AimFor = "Head"
function GetPlayer()
CollectingPositions = {}
PlrCollect = {}
Players1 = {}
for i,v in pairs(cmdp:GetPlayers()) do
if v ~= cmdlp then
table.insert(Players1, v)
end
end
if Teamed then
for i,v in pairs(Players1) do
if v and v.Character ~= nil and v.TeamColor ~= Plr.TeamColor then
local Aim = v.Character:FindFirstChild(AimFor)
if Aim ~= nil then
local Pos = (Aim.Position - workspace.CurrentCamera.CoordinateFrame.p).magnitude
local Ray = Ray.new(workspace.CurrentCamera.CoordinateFrame.p, (cmdm.Hit.p - workspace.CurrentCamera.CoordinateFrame.p).unit * Pos)
local Hit,Pos2 = workspace:FindPartOnRay(Ray, workspace)
local Diff = math.floor((Pos2 - Aim.Position).magnitude)
PlrCollect[v.Name..i] = {Dist = Pos, Player = v, Diff = Diff}
table.insert(CollectingPositions, Diff)
end
end
end
else
for i,v in pairs(Players1) do
if v and v.Character ~= nil then
local Aim = v.Character:FindFirstChild(AimFor)
if Aim ~= nil then
local Pos = (Aim.Position - workspace.CurrentCamera.CoordinateFrame.p).magnitude
local Ray = Ray.new(workspace.CurrentCamera.CoordinateFrame.p, (cmdm.Hit.p - workspace.CurrentCamera.CoordinateFrame.p).unit * Pos)
local Hit,Pos2 = workspace:FindPartOnRay(Ray, workspace)
local Diff = math.floor((Pos2 - Aim.Position).magnitude)
PlrCollect[#PlrCollect+1] = {Dist = Pos, Player = v, Diff = Diff}
table.insert(CollectingPositions, Diff)
end
end
end
end
if unpack(CollectingPositions) == nil then
return false
end
local MagDist = math.floor(math.min(unpack(CollectingPositions)))
if MagDist > 20 then
return false
end
for i,v in pairs(PlrCollect) do
if v.Diff == MagDist then
return v.Player
end
end
return false
end
AimbotIs = false
AimbotRunAlready = false
function BodyAimbot(aimbotarg)
local AimFor = "Head"
if aimbotarg == "Team" then Teamed = true else Teamed = false end
local Hotkey = 50
AimbotIs = true
opx("-","Aimbot enabled (Hold down Left Ctrl to aim)")
if AimbotRunAlready then return end
AimbotRunAlready = true
cmdm.KeyDown:connect(function(Key)
Key = Key:lower():byte()
if AimbotIs and Key == Hotkey then
AimbotEnabled = true
end
end)
cmdm.KeyUp:connect(function(Key)
Key = Key:lower():byte()
if AimbotIs and Key == Hotkey then
AimbotEnabled = false
end
end)
game:GetService("RunService").RenderStepped:connect(function()
if AimbotIs and AimbotEnabled then
local TargetPlayer = GetPlayer()
local Aim = TargetPlayer.Character:FindFirstChild(AimFor)
if Aim ~= nil then
if Aim then
workspace.CurrentCamera.CoordinateFrame = CFrame.new(workspace.CurrentCamera.CoordinateFrame.p, Aim.CFrame.p)
end
end
end
end)
end
function useCommand.aimbot()
if arguments[2] then
BodyAimbot(arguments[2])
else
opx("*","2 arguments are required!")
end
end
function useCommand.unaimbot()
opx("-","Aimbot disabled")
AimbotIs = false
end
function useCommand.spectate()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-",target.Name.." is now being viewed")
workspace.CurrentCamera.CameraSubject = target.Character
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unspectate()
opx("-","You are back to viewing your character")
workspace.CurrentCamera.CameraSubject = cmdlp.Character
end
function useCommand.ageprivate()
if arguments[2] then
target = findplr(arguments[2])
if target then
local Years = string.split(target.AccountAge/365,".")
opx("-",target.Name.."(s) account is "..Years[1].." year(s) old or "..target.AccountAge.." day(s) old")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.agepublic()
if arguments[2] then
target = findplr(arguments[2])
if target then
local Years = string.split(target.AccountAge/365,".")
opx("-",target.Name.."(s) account is "..Years[1].." year(s) old or "..target.AccountAge.." day(s) old")
sayremote:FireServer(target.Name.."(s) account is "..Years[1].." year(s) old or "..target.AccountAge.." day(s) old", "All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.idprivate()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-",target.Name.."s User ID is "..target.UserId)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.idpublic()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-",target.Name.."s User ID is "..target.UserId)
sayremote:FireServer(target.Name.."s User ID is "..target.UserId, "All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.vrprivate()
if arguments[2] then
target = findplr(arguments[2])
if target then
if target.VRDevice == "" then
opx("-",target.Name.." does not have a VR Device")
else
opx("-",target.Name.." is using a VR Device named "..target.VRDevice)
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.vrpublic()
if arguments[2] then
target = findplr(arguments[2])
if target then
if target.VRDevice == "" then
opx("-",target.Name.." does not have a VR Device")
sayremote:FireServer(target.Name.." does not have a VR Device", "All")
else
opx("-",target.Name.." is using a VR Device named "..target.VRDevice)
sayremote:FireServer(target.Name.." is using a VR Device named "..target.VRDevice, "All")
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
local hitler = false
function useCommand.nazispam()
opx("-","Heil hitler?")
hitler = true
function say(msg)
sayremote:FireServer(msg, "All")
end
local red = "\240\159\143\174"
local white = "\240\159\148\178"
local init = string.rep(white, 5)
local tri = string.rep(red, 3)
local l = {}
l[1] = init..tri..white..red..init
l[2] = init..white..white..red..white..red..init
l[3] = init..tri..red..red..init
l[4] = init..red..white..red..white..white..init
l[5] = init..red..white..tri..init
while hitler do
for i = 1,5 do
say(l[i])
end
wait(15)
end
end
function useCommand.unnazispam()
opx("-","Nazi spam disabled")
hitler = false
end
function useCommand.permspamspeed()
if cmdnum(arguments[2]) then
opx("-","Perm spam speed updated to "..arguments[2])
permspamspeed = arguments[2]
updatesaves()
else
opx("*","2 arguments are required for this command")
end
end
function useCommand.clicktphotkey()
if arguments[2] then
hotkeyctp = arguments[2]
updatesaves()
opx("Hotkey set to "..arguments[2])
else
opx("A key is required")
end
end
local spammies = false
function useCommand.spam()
speedofthespam = permspamspeed
spammies = true
local spamstring = getstring(2)
if arguments[2] then
opx("-","You are now spamming "..spamstring)
while spammies do
wait(speedofthespam)
sayremote:FireServer(spamstring, "All")
end
else
opx("*","Spam is missing text")
end
end
function useCommand.unspam()
opx("-","Stopped spamming")
spammies = false
end
function useCommand.timepos()
if cmdnum(arguments[2]) then
local Boombox = workspace[cmdlp.Name]:FindFirstChildOfClass("Tool")
for i,v in pairs(Boombox:GetDescendants()) do
if v:IsA("Sound") then
Sound = v
break
end
end
Sound.TimePosition = arguments[2]
opx("-","Set time position to "..arguments[2])
else
opx("*","2 arguments are required!")
end
end
function useCommand.backpackplay()
opx("*","Remember to play your audio first!")
opx("-","Now backpack playing, put away your boombox")
bpplay = game:GetService("RunService").RenderStepped:Connect(function()
for i,v in pairs(cmdlp.Backpack:GetDescendants()) do
if v:IsA("Sound") then
v.Playing = true
end
end
end)
end
function useCommand.unbackpackplay()
opx("-","Backpack play disabled")
bpplay:Disconnect()
end
function useCommand.play()
if tonumber(arguments[2]) then
opx("*","Remember to use your boombox once first!")
local Sounds = {}
for i,v in pairs(cmdlp.Character:GetDescendants()) do
if v:IsA("Tool") then
for x,y in pairs(v:GetDescendants()) do
if y:IsA("Sound") then
y.SoundId = "http://www.roblox.com/asset/?id="..arguments[2]
y.Playing = true
end
end
end
end
for i,v in pairs(cmdlp.Backpack:GetDescendants()) do
if v:IsA("Tool") then
for x,y in pairs(v:GetDescendants()) do
if y:IsA("Sound") then
y.SoundId = "http://www.roblox.com/asset/?id="..arguments[2]
y.Playing = true
end
end
end
end
opx("-","Now playing "..arguments[2])
else
opx("*","2 arguments are required!")
end
end
local pmspammies = false
function useCommand.pmspam()
if arguments[2] then
target = findplr(arguments[2])
if target then
speedofthespam = permspamspeed
pmspammies = true
local spamstring = getstring(3)
opx("-","You are now spamming "..target.Name.." with "..spamstring)
while pmspammies do
wait(speedofthespam)
sayremote:FireServer("/w "..target.Name.." "..spamstring, "All")
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unpmspam()
opx("-","Stopped PM spamming")
pmspammies = false
end
function useCommand.spamspeed()
if cmdnum(arguments[2]) then
speedofthespam = arguments[2]
opx("-","Spam speed was set to "..arguments[2])
else
opx("*","Spamspeed is missing a number")
end
end
function useCommand.dicepublic()
opx("-","The dice was rolled")
sayremote:FireServer("The dice rolled by "..cmdlp.Name.." rolled a ".. tostring(math.random(1, 6)), "All")
end
function useCommand.coronavirus()
if arguments[2] then
local tbl = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://coronavirus-19-api.herokuapp.com/countries/"..arguments[2]))
opx("-","Cases: "..tbl["cases"]..", Deaths: "..tbl["deaths"]..", Recovered: "..tbl["recovered"]..", Active: "..tbl["active"])
sayremote:FireServer(tbl['country'].."; ".."Cases: ".."uw"..tbl["cases"]..", Deaths: ".."uw"..tbl["deaths"]..", Recovered: ".."uw"..tbl["recovered"]..", Active: ".."uw"..tbl["active"], "All")
else
local tbl = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://coronavirus-19-api.herokuapp.com/all"))
opx("-","Cases: "..tbl["cases"]..", Deaths: "..tbl["deaths"]..", Recovered: "..tbl["recovered"])
sayremote:FireServer("World; ".."Cases: ".."uw"..tbl["cases"]..", Deaths: ".."uw"..tbl["deaths"]..", Recovered: ".."uw"..tbl["recovered"], "All")
end
end
function useCommand.joindateprivate()
if arguments[2] then
target = findplr(arguments[2])
if target then
local tbl = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://users.roblox.com/v1/users/"..target.UserId))
local Created = tbl["created"]:split("T")
local Created2 = Created[2]:split(".")
opx("-",target.Name.." joined on: "..Created[1].." "..Created2[1])
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.joindatepublic()
if arguments[2] then
target = findplr(arguments[2])
if target then
local tbl = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://users.roblox.com/v1/users/"..target.UserId))
local Created = tbl["created"]:split("T")
local Created2 = Created[2]:split(".")
opx("-",target.Name.." joined on: "..Created[1].." "..Created2[1])
sayremote:FireServer(target.Name.." joined on: pt"..Created[1].." pt"..Created2[1], "All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.diceprivate()
opx("-","The dice rolled a "..tostring(math.random(1, 6)))
end
function useCommand.numberpublic()
if arguments[3] then
opx("-","Your random number is ".. tostring(math.random(arguments[2], arguments[3])))
sayremote:FireServer(cmdlp.Name.." has picked a random number between "..arguments[2].." and "..arguments[3].." the number is ".. tostring(math.random(arguments[2], arguments[3])), "All")
else
opx("*","You need to pick 2 numbers")
end
end
function useCommand.numberprivate()
if arguments[3] then
opx("-","Your random number is ".. tostring(math.random(arguments[2], arguments[3])))
else
opx("*","You need to pick 2 numbers")
end
end
function useCommand.loadcustoms()
opx("-","Scripts you can load were listed")
xPins = #loadCustoms.." | "
for i,v in pairs(loadCustoms) do
xPins = xPins..loadCustoms[i].N..", "
end
opxL("Plugins",xPins)
end
function useCommand.plugin()
if arguments[2] then
lcNS = getstring(2)
for i,v in pairs(Plugins) do
if Plugins[i].Name == lcNS and Plugins[i].Status then
loadstring(readfile("CMD-X Plugins/"..Plugins[i].File))()
end
end
else
opx("*","2 arguments are needed for this command!")
end
end
function Locate(plr)
for i,v in pairs(cmdlp.PlayerGui:GetChildren()) do
if v.Name == plr.Name..'_LC' then
v:Destroy()
end
end
wait()
if plr.Character and plr.Name ~= cmdlp.Name and not cmdlp.PlayerGui:FindFirstChild(plr.Name..'_LC') then
local ESPholder = Instance.new("Folder", cmdlp.PlayerGui)
ESPholder.Name = plr.Name..'_LC'
for b,n in pairs(plr.Character:GetChildren()) do
if n:IsA("BasePart") then
local a = Instance.new("BoxHandleAdornment", ESPholder)
a.Name = plr.Name
a.Adornee = n
a.AlwaysOnTop = true
a.ZIndex = 0
a.Size = n.Size
a.Transparency = 0.8
for i,m in pairs(plr.Character:GetChildren()) do
if m:IsA("Part") or m:IsA("MeshPart") then
if m.Name ~= "HumanoidRootPart" and m.Name ~= "Handle" or (m:IsA("Part")) then
m.Material = "ForceField"
a.Color = m.BrickColor
end
end
end
end
end
if plr.Character and plr.Character:FindFirstChild('Head') then
local BillboardGui = Instance.new("BillboardGui", ESPholder)
local TextLabel = Instance.new("TextLabel")
BillboardGui.Adornee = plr.Character.Head
BillboardGui.Name = plr.Name
BillboardGui.Size = UDim2.new(0, 100, 0, 150)
BillboardGui.StudsOffset = Vector3.new(0, 1, 0)
BillboardGui.AlwaysOnTop = true
TextLabel.Parent = BillboardGui
TextLabel.BackgroundTransparency = 1
TextLabel.Position = UDim2.new(0, 0, 0, -60)
TextLabel.Size = UDim2.new(0, 100, 0, 100)
TextLabel.Font = Enum.Font.SourceSansSemibold
TextLabel.TextSize = 20
TextLabel.TextColor3 = Color3.new(1, 1, 1)
TextLabel.TextStrokeTransparency = 0.6
TextLabel.TextYAlignment = Enum.TextYAlignment.Bottom
plr.CharacterAdded:Connect(function()
if ESPholder ~= nil and ESPholder.Parent ~= nil then
lcLoopFunc:Disconnect()
ESPholder:Destroy()
repeat wait(1) until plr.Character:FindFirstChild('HumanoidRootPart') and plr.Character:FindFirstChild('Humanoid')
Locate(plr)
end
end)
local function lcLoop()
if cmdlp.PlayerGui:FindFirstChild(plr.Name..'_LC') then
if plr.Character and plr.Character:FindFirstChild('HumanoidRootPart') and plr.Character:FindFirstChild('Humanoid') then
TextLabel.Text = plr.Name.."|Studs: ".. math.floor((cmdlp.Character.HumanoidRootPart.Position - plr.Character.HumanoidRootPart.Position).magnitude).."|Health: "..plr.Character.Humanoid.Health
end
else
lcLoopFunc:Disconnect()
end
end
lcLoopFunc = game:GetService("RunService").RenderStepped:Connect(lcLoop)
end
end
end
local autoObby = false
function useCommand.autoobby()
opx("-","Now Auto obbying")
autoObby = true
cmdlp.Character.Humanoid.Running:Connect(function(speed)
if speed > 0 and autoObby == true and cmdlp.Character.Humanoid.FloorMaterial == Enum.Material.Air then
cmdlp.Character.Humanoid:ChangeState("Jumping")
end
end)
end
function useCommand.unautoobby()
opx("-","No longer Auto obbying")
autoObby = false
end
autoPf = false
function useCommand.autoplatform()
opx("-","Now Auto platforming")
autoPf = true
cmdlp.Character.Humanoid.Running:Connect(function(speed)
if speed > 0 and autoPf == true and cmdlp.Character.Humanoid.FloorMaterial == Enum.Material.Air then
local pc = cmdlp.Character
if pc then
if pc:FindFirstChild("pf") then
pc:FindFirstChild("pf").CFrame = pc.HumanoidRootPart.CFrame * CFrame.new(0,-3.5,0)
else
local pf = Instance.new('Part', pc)
pf.Name = 'pf'
pf.Transparency = 1
pf.Size = Vector3.new(6,1,6)
pf.Anchored = true
pf.CFrame = pc.HumanoidRootPart.CFrame * CFrame.new(0,-3.5,0)
end
end
else
if cmdlp.Character:FindFirstChild("pf") then
cmdlp.Character:FindFirstChild("pf"):Destroy()
end
end
end)
end
function useCommand.unautoplatform()
opx("-","No longer Auto platforming")
autoPf = false
if cmdlp.Character:FindFirstChild("pf") then
cmdlp.Character:FindFirstChild("pf"):Destroy()
end
end
function CheckTargets(check)
for i,v in pairs(FindingTargets) do
if v == check then
return true
end
end
end
FindingTargets = {}
function useCommand.find()
if arguments[2] then
target = findplr(arguments[2])
if target then
table.insert(FindingTargets, target.Name)
opx("-",target.Name.." is now being found")
Create(target, target.Character.Head, true)
cmdp.PlayersRemoving:Connect(function(v)
if v == target then
cmdlp.PlayerGui["ESP"..target.Name]:Destroy()
end
end)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unfind()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-",target.Name.." is no longer being found")
cmdlp.PlayerGui["ESP"..target.Name]:Destroy()
for x,y in pairs(target.Character:GetChildren()) do
if y:IsA("BasePart") then
y.Material = "Plastic"
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.clickdelete()
if _G.connections.clickdel then
opx("*","Click delete is already enabled")
return
end
opx("-","Click delete enabled")
_G.connections.clickdel = cmdm.Button1Up:Connect(function()
cmdm.Target:Destroy()
end)
end
function useCommand.unclickdelete()
if not _G.connections.clickdel then
opx("*","Click delete is not enabled")
return
end
opx("-","Click delete disabled")
_G.connections.clickdel:Disconnect()
end
followedIntoNotify = false
cmdp.PlayerAdded:connect(function(plr)
if followedIntoNotify then
if plr.FollowUserId == cmdlp.UserId then
opx("-",plr.Name.." followed you into game")
end
end
plr.Chatted:connect(function(msg)
if logsEnabled == true and #msg < 200 then
wait(.2)
CreateLabel(v.Name,msg)
end
end)
end)
for i,v in pairs(cmdp:GetPlayers()) do
v.Chatted:connect(function(msg)
if logsEnabled == true and #msg < 200 then
wait(.2)
CreateLabel(v.Name,msg)
end
end)
end
function useCommand.logs()
logsEnabled = true
wLogs = false
pLogs = false
if logsholding.Visible == false then
opx("-","Logs have been loaded")
logsholding.Visible = true
elseif logsholding.Visible == true then
opx("-","Logs have been unloaded")
logsholding.Visible = false
logsEnabled = false
end
end
function useCommand.test()
opx("-","")
end
function useCommand.testa()
opx("-","grr fucking baby niggas")
workspace.Baby:Destroy()
end
function useCommand.time()
if arguments[2] then
local URL = ("http://worldclockapi.com/api/json/"..arguments[2].."/now")
local fuck = game:HttpGet(URL)
local Http = game:GetService("HttpService"):JSONDecode(fuck)
local Time = Http.currentDateTime:split("T")[2]:split("-")[1]
opx("-","The time in "..arguments[2].." is "..Time)
sayremote:FireServer("The time in "..arguments[2].." is "..Time,"All")
else
opx("*","2 arguments are required!")
end
end
function useCommand.removeforces()
for i,f in pairs(cmdlp.Character:GetDescendants()) do
if f:IsA("BodyForce") or f:IsA("BodyGyro") or f:IsA("BodyVelocity") or f:IsA("BodyAngularVelocity") or f:IsA("RocketPropulsion") or f:IsA("BodyThrust") then
f:Destroy()
end
end
opx("-","Removed all forces")
end
local audioLogger = false
function useCommand.audiologger()
opx("-","Audio logger activated do audiologgersave to stop and save")
audiologgerids = {}
audioLogger = true
while audioLogger do
wait()
audioLogPlayers()
for i,plr in pairs(cmdp:GetDescendants()) do
if plr:IsA("Sound") then
if string.len(plr.SoundId) <= 50 then
local soundSplit = plr.SoundId:split("=")
if not table.find(audiologgerids, soundSplit[2]) and soundSplit[2] then
table.insert(audiologgerids, soundSplit[2])
end
end
end
end
end
end
function useCommand.audiologgersave()
opx("-","Audio logger stopped, file saved in workspace")
audioLogger = false
local GetName = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId)
local filename = GetName.Name.." audiolog"..math.random(1,10000)
audioIds = game:GetService("HttpService"):JSONEncode(audiologgerids)
writefile(filename..".CMD-X", audioIds)
end
function useCommand.antilag()
Confirm("Default","This command is not reversible.")
if Confirmation == true then
for i,ws in pairs(workspace:GetDescendants()) do
if ws:IsA("BasePart") then
ws.Material = "Plastic"
elseif ws:IsA("Decal") or ws:IsA("Texture") or ws:IsA("ParticleEmitter") or ws:IsA("Sparkles") or ws:IsA("Fire") or ws:IsA("Smoke") and ws.Name ~= "face" then
ws:Destroy()
end
end
for i,ws in pairs(workspace:GetChildren()) do
if ws:IsA("Accessory") or ws:IsA("Tool") then
ws:Destroy()
end
end
for i,ws in pairs(game.Lighting:GetDescendants()) do
if ws:IsA("BasePart") then
ws.Material = "Plastic"
elseif ws:IsA("Decal") or ws:IsA("Texture") or ws:IsA("ParticleEmitter") or ws:IsA("Sparkles") or ws:IsA("Fire") or ws:IsA("Smoke") then
ws:Destroy()
end
end
opx("-","Attempted to minimalize lag as much as possible")
end
end
function useCommand.clear()
for i,ws in pairs(workspace:GetChildren()) do
if ws:IsA("Accessory") or ws:IsA("Tool") then
ws:Destroy()
end
end
opx("-","Cleared all hats and gears from client")
end
function useCommand.removeterrain()
workspace.Terrain:Clear()
opx("-","Removed terrain")
end
function useCommand.phone()
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = "poop123"
tool.GripPos = Vector3.new(0.4, -0.9, 0)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
opx("-","Made your phone holdable")
end
function useCommand.compliment()
if arguments[2] then
target = findplr(arguments[2])
if target then
local compPick = {
"Them toes lookin cute",
"You have very nice shoes",
"If I'm what made your day then you're what made this world go round, along with making it a better place just from being here with everyone else.",
"You're a nice person, and i hope you have an amazing week",
"You somewhat made me kinda sorta smile I guess",
"Your avatar looks awesome",
"Your name makes me smile",
"You are the best person ever",
"If I could I would hug you",
"You make me happy",
"You have brightened up my day",
"You are the most amazing person I've ever met",
"Your avatar looks nice today",
"You are an amazing person",
"You are the king/queen",
"Don't drop your crown"
}
local value = math.random(1,#compPick)
local picked_value = compPick[value]
opx("-","You complimented "..target.Name)
sayremote:FireServer(tostring(picked_value)..", "..target.Name, "All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.roast()
if arguments[2] then
target = findplr(arguments[2])
if target then
local roastPick = {
"Anne Frank hid better then you",
"Go to bed",
"You need a shower",
"You look like a barbie doll which i gave a makeover with my markers",
"Your momma back built like a skate ramp I can do an ollie off her",
"You look like the 1% of germs that hand-soap doesn't kill",
"Boy u literally be smelling like tv oil",
"No wonder your parents hate you",
"You haven't had any neurological brain development in the last decade",
"I will build a sandcastle out of your dead nans ashes",
"Your brain has the capacity of a dried sea sponge",
"You make me cringe, I literally want to quit this game because of you",
"Your outfit is horrendous",
"Your name is horrendous",
"Your IQ is so low that even scientists cant zoom in on it",
"You are a femmie",
"You are fat",
"You stink of your nans cremation",
"How many people does it take to screw in a lightbulb? 20 of your kind",
"I can smell you through the screen",
"Candy shop got robbed, didn't know you did it",
"You are poor",
"Your brain is the size of an average ants",
"Everything you've worked for, your whole life is embarassing",
"Go back to school",
"Are you dumb or just young",
"You make me feel e-sick",
"I very much dislike you",
"Settle along you peasent",
"You are worth nothing",
"I hope you suffer",
"Your words, they make no sense",
"Please leave the server you cretin",
"You make me sick",
"Huh? Didn't know infants could play roblox",
"I bet you live in a poverty stricken country",
"You belong in the special ed class",
"Is it just me or does someone smell, nvm thats just",
"Is it just me or is someone dumb, nvm thats just",
"Is it just me or is someone fat, nvm thats just"
}
local value = math.random(1,#roastPick)
local picked_value = roastPick[value]
opx("-","You roasted "..target.Name)
sayremote:FireServer(tostring(picked_value)..", "..target.Name, "All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.singinfo()
opx("-","Showed info for sing command")
opxL("Sing Info","Step 1: Get your song lyrics\
Step 2: Remove any blank lines\
Step 3: Find and remove any swear words\
Step 4: Put hashtags (#) at the end of each line\
Step 5: Compress the lines to avoid whitespace errors\
Step 6: Put your compressed text into a raw data uploading site such as pastebin or hastebin\
Step 7: Insert the link into the sing command\
To see a sample of what to do, visit: https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/sing/")
end
stopSingMid = false
function useCommand.sing()
local check = {
["genocide"] = true,
["animethighs"] = true,
["evilfantasy"] = true,
["$harkattack"] = true,
["introversion"] = true,
["lucy"] = true,
["tyler"] = true,
["methhead"] = true,
["superfuntime"] = true,
["haha"] = true,
["diamonds"] = true
}
if check[string.lower(arguments[2])] then
getSong = "https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/sing/"..string.lower(arguments[2])
else
getSong = arguments[2]
end
local lyricsTable = game:HttpGet(getSong):split("#")
local songTitle = lyricsTable[1]
opx("-","Now singing "..songTitle)
sayremote:FireServer("Now singing "..songTitle, "All")
table.remove(lyricsTable,1)
stopSingMid = false
for i,v in pairs(lyricsTable) do
if stopSingMid == true then break end
wait(5)
if stopSingMid == true then break end
sayremote:FireServer(v, "All")
end
wait(5)
sayremote:FireServer("Finished singing "..songTitle, "All")
end
function useCommand.stopsing()
stopSingMid = true
opx("-","Stopped singing")
end
function useCommand.deletepos()
if arguments[2] then
wpNS = getstring(2)
for i,v in pairs(WPs) do
if tostring(v.N) == tostring(wpNS) then
table.remove(WPs,i)
updatesaves()
end
end
opx("-","Deleted position "..tostring(wpNS))
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.clearpos()
WPs = {}
updatesaves()
opx("-","Cleared all waypoints")
end
function useCommand.nocommands()
noCMD = true
opx("-","No commands activated")
end
function useCommand.yescommands()
noCMD = false
opx("-","No commands de-activated")
end
function useCommand.gotopos()
if arguments[3] then
local presets = {
["behind"] = "+",
["right"] = "+",
["above"] = "+",
["infront"] = "-",
["under"] = "-",
["left"] = "-"
}
local mathstuff = presets[arguments[2]] == "+" and arguments[3] or presets[arguments[2]] == "-" and -arguments[3]
if mathstuff then
gotoPosHead = mathstuff
updatesaves()
opx("-","GotoPosHead is now "..arguments[2].." "..arguments[3])
else
opx("*","A proper preset is needed")
end
else
opx("*","3 arguments are needed for this command!")
end
end
if keypress and keyrelease then
keypress = keypress
keyrelease = keyrelease
else
function keypress()
opx("*","Your exploit does not support keypress.")
end
function keyrelease()
opx("*","Your exploit does not support keypress.")
end
end
local autoKey = false
function useCommand.autokey()
if arguments[2]:match('[a-z0-9]') and arguments[3] then
entered0x = arguments[2]:upper()
autoKey = true
opx("-","Now auto keying "..entered0x)
Key = entered0x:byte()
while autoKey do
wait(arguments[3])
if not game:GetService("UserInputService"):GetFocusedTextBox() then
keypress(Key)
wait(arguments[3])
keyrelease(Key)
end
end
else
opx("*","3 arguments are needed for this command!")
end
end
function useCommand.unautokey()
autoKey = false
wait(1.1)
keyrelease(Key)
opx("-","Stopped autokey")
end
function useCommand.swimwalk()
opx("-","Now infinitely swimming")
workspace.Gravity = 100
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,false)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,false)
cmdlp.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Swimming)
end
function useCommand.instances()
opx("-","There are "..#game:GetDescendants().." instances in this game")
end
function useCommand.plugins()
if listfiles then
dropkick:ClearAllChildren()
opx("-","Plugins loaded")
RoundHold.Visible = true
for num,file in pairs(listfiles("CMD-X Plugins")) do
local PluginExists = false
local PluginNum = 0
for i,v in pairs(Plugins) do
if v.Name == file:split("CMD-X Plugins")[2]:split(".")[1]:sub(2,#file:split("CMD-X Plugins")[2]:split(".")[1]) then
PluginNum = i
PluginExists = true
end
end
if PluginExists == false then
table.insert(Plugins, {Name = file:split("CMD-X Plugins")[2]:split(".")[1]:sub(2,#file:split("CMD-X Plugins")[2]:split(".")[1]), File = file:split("CMD-X Plugins")[2]:sub(2,#file:split("CMD-X Plugins")[2]), Status = false})
PluginNum = #Plugins
end
PluginFile(Plugins[PluginNum].Name,Plugins[PluginNum].File,Plugins[PluginNum].Status,PluginNum)
end
else
opx("*","Your exploit does not support listfiles")
end
end
function useCommand.loadcustomsclr()
loadCustoms = {}
updatesaves()
opx("-","Cleared loadcustoms")
end
function useCommand.antiwrldsgui()
opx("-","antiwrldsGUI loading")
loadstring(game:HttpGet(('https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/antiwrldsgui/main'),true))()
opx("-","antiwrldsGUI loaded")
end
function useCommand.knife()
opx("-","If you had a knife in your mouth you are now holding it")
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle then
if hat.Name == "YandereKnife" then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = cmdlp.Name.."'s Blade"
tool.Parent = cmdp.LocalPlayer.Character
tool.GripForward = Vector3.new(-0, -0, -1)
tool.GripPos = Vector3.new(-0.83, -0, 0.11)
tool.GripRight = Vector3.new(0, -1, 0)
tool.GripUp = Vector3.new(1, 0, -0)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
end
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://74799600"
local play = cmdlp.Character.Humanoid:LoadAnimation(Anim)
while wait() do
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Tool") then
v.Equipped:Connect(function(Mouse)
Mouse.Button1Down:Connect(function()
play:Play()
wait(1)
play:Stop()
end)
end)
end
end
end
end
function useCommand.sai()
opx("-","If you had sais on your waist you are now holding them")
for _, hat in pairs(cmdp.LocalPlayer.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
if hat.Name == "Dual SaiAccessory" then
local tool = Instance.new("Tool", cmdp.LocalPlayer.Backpack)
tool.Name = cmdlp.Name.."'s Sai"
tool.Parent = cmdp.LocalPlayer.Character
tool.GripForward = Vector3.new(0.035, 0.743, 0.669)
tool.GripPos = Vector3.new(1.46, 0.89, -0.97)
tool.GripRight = Vector3.new(0.999, -0.026, -0.023)
tool.GripUp = Vector3.new(-0, -0.669, 0.743)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
end
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://185824714"
local play = cmdlp.Character.Humanoid:LoadAnimation(Anim)
play:Play()
end
function useCommand.present()
opx("-","If you had a present you are now holding it")
for _, hat in pairs(cmdp.LocalPlayer.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
local tool = Instance.new("Tool", cmdp.LocalPlayer.Backpack)
tool.Name = cmdp.LocalPlayer.Name.."s present"
tool.Parent = cmdp.LocalPlayer.Character
tool.GripForward = Vector3.new(0, 0, -1)
tool.GripPos = Vector3.new(-0, -0.54, 0.72)
tool.GripRight = Vector3.new(1, 0, 0)
tool.GripUp = Vector3.new(0, 1, 0)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
end
function useCommand.boombox()
opx("-","If you had a boombox on your back you are now holding it")
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
if hat.Name == "Boomblox Back Boombox" then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = cmdlp.Name.."s boombox"
tool.Parent = cmdlp.Character
tool.GripForward = Vector3.new(0.935, 0.354, -0.03)
tool.GripPos = Vector3.new(1.36, -1.05, 0)
tool.GripRight = Vector3.new(0.031, 0.003, 1)
tool.GripUp = Vector3.new(-0.354, 0.935, 0.008)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
end
end
function useCommand.gearhat()
for i,tool in pairs(cmdlp.Backpack:GetChildren()) do
if tool:IsA("Tool") then
tool.Parent = cmdlp.Backpack
tool.GripForward = Vector3.new(0, 1, 0)
tool.GripPos = Vector3.new(1.49, 1.45, -0.97)
tool.GripRight = Vector3.new(1, 0, 0)
tool.GripUp = Vector3.new(0, 0, 1)
tool.Parent = cmdlp.Character
end
end
opx("-","Your gears are now hats")
end
function useCommand.bypass()
if _G.oldhook or _G.soldhook or _G.ssoldhook or _G.sssoldhook or _G.smarthook then
opx("*", "Bypass is already enabled.")
return
end
_G.oldhook = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(event, ...)
if not checkcaller() and event.Name == "SayMessageRequest" and getnamecallmethod() == "FireServer" then
local args = {...}
local message = args[1]
local words = message:split(" ")
local c = {}
c[1] = "\219\166\219\138"
local messagetopass = ""
for i = 1, #words do
words[i] = words[i]:sub(1,1)..c[1]..words[i]:sub(2,#words[i])
messagetopass = messagetopass..words[i].." "
end
return _G.oldhook(event, messagetopass, args[2])
end
return _G.oldhook(event, ...)
end)
setreadonly(mt, true)
opx("-", "Bypass enabled.")
end
function useCommand.clearcharacter()
opx("-","Cleared your characters appearance")
cmdlp:ClearCharacterAppearance()
cmdlp.Character.Head.face:Destroy()
end
function useCommand.antiwindowafk()
if not getconnections then
opx("*","Your executor does not support getconnections!")
return
end
for _,v in pairs(getconnections(game:GetService("UserInputService").WindowFocused)) do v:Disable() end
for _,v in pairs(getconnections(game:GetService("UserInputService").WindowFocusReleased)) do v:Disable() end
opx("-","You will no longer window focus afk")
end
function useCommand.unantiwindowafk()
if not getconnections then
opx("*","Your executor does not support getconnections!")
return
end
for _,v in pairs(getconnections(game:GetService("UserInputService").WindowFocused)) do v:Enable() end
for _,v in pairs(getconnections(game:GetService("UserInputService").WindowFocusReleased)) do v:Enable() end
opx("-","You will now window focus afk")
end
function useCommand.nilchatcmds()
if _G.soldhook or _G.ssoldhook or _G.oldhook or _G.sssoldhook or _G.smarthook then
opx("*", "Nil ChatCmds is already enabled.")
return
end
_G.soldhook = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(event, ...)
if not checkcaller() and event.Name == "SayMessageRequest" and getnamecallmethod() == "FireServer" then
local args = {...}
local message = args[1]
if message:sub(1,#prefix) == prefix or message:sub(1,1) == "." then
return require(cmdlp.PlayerScripts.ChatScript.ChatMain).MessagePosted:fire(message)
end
end
return _G.soldhook(event, ...)
end)
setreadonly(mt, true)
opx("-", "Nil ChatCmds enabled.")
end
function useCommand.smartchat()
if _G.soldhook or _G.ssoldhook or _G.oldhook or _G.sssoldhook or _G.smarthook then
opx("*", "Smart chat is already enabled.")
return
end
_G.smarthook = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(event, ...)
if not checkcaller() and event.Name == "SayMessageRequest" and getnamecallmethod() == "FireServer" then
local args = {...}
local message = args[1]
message = message:sub(1,1):upper()..message:sub(2,#message)
if message:sub(#message,#message) ~= "." then
message = message.."."
end
return _G.smarthook(event, message, args[2])
end
return _G.smarthook(event, ...)
end)
setreadonly(mt, true)
opx("-", "Smart chat enabled.")
end
function useCommand.unsmartchat()
if not _G.smarthook then
opx("*", "Smart chat is not enabled.")
return
end
setreadonly(mt, false)
mt.__namecall = _G.smarthook
setreadonly(mt, true)
opx("-", "Smart chat disabled.")
_G.smarthook = nil
end
function useCommand.retardchat()
if _G.soldhook or _G.ssoldhook or _G.oldhook or _G.sssoldhook or _G.smarthook then
opx("*", "Retard chat is already enabled.")
return
end
local stringka = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/unicode"):split(",")
_G.sssoldhook = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(event, ...)
if not checkcaller() and event.Name == "SayMessageRequest" and getnamecallmethod() == "FireServer" then
local args = {...}
local message = args[1]:gsub("l","w"):gsub("L","W"):gsub("r","w"):gsub("n","ny"):split(" ")
local messagefin = ""
for i,v in pairs(message) do
if i == 1 then
v = (v:sub(1,1).."-"):rep(math.random(1,2))..v:sub(2,#v)
messagefin = messagefin..v.." "
else
messagefin = messagefin..v.." "
end
end
messagefin = messagefin..stringka[math.random(1,#stringka)]
return _G.sssoldhook(event, messagefin, args[2])
end
return _G.sssoldhook(event, ...)
end)
end
function useCommand.unretardchat()
if not _G.sssoldhook then
opx("*", "Retard chat is not enabled.")
return
end
setreadonly(mt, false)
mt.__namecall = _G.sssoldhook
setreadonly(mt, true)
opx("-", "Retard chat disabled.")
_G.sssoldhook = nil
end
function useCommand.reverse()
if arguments[2] then
opx("-","Now Reversing credit to plaisoundz")
local reversesettings = {
delay = arguments[2];
}
repeat until game.Players.LocalPlayer.Character
local rp = game.Players.LocalPlayer.Character.HumanoidRootPart
local health = game.Players.LocalPlayer.Character.Humanoid.Health
local Table={rp.CFrame}
for i=1, #Table do
for count = 1, reversesettings.delay-1 do
game:GetService("RunService").RenderStepped:Wait()
table.insert(Table, rp.CFrame)
end
local hyro = Instance.new("BodyGyro")
hyro.Parent = rp
hyro.MaxTorque = Vector3.new(1000,1000,1000)
hyro.D = Vector3.new(0,0,0)
rp.CFrame = (rp.CFrame)
local number = reversesettings.delay+1
for count = 1, reversesettings.delay do
game:GetService("RunService").RenderStepped:Wait()
number = number-1
rp.CFrame = (Table[number])
hyro.CFrame = (Table[number])
end
for i,v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
if v:IsA("BodyVelocity") or v:IsA("BodyGyro") or v:IsA("RocketPropulsion") or v:IsA("BodyThrust") or v:IsA("BodyAngularVelocity") or v:IsA("AngularVelocity") or v:IsA("BodyForce") or v:IsA("VectorForce") or v:IsA("LineForce") then
v:Destroy()
end
end
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.unbypass()
if not _G.oldhook then
opx("*", "Bypass is not enabled.")
return
end
setreadonly(mt, false)
mt.__namecall = _G.oldhook
setreadonly(mt, true)
opx("-", "Bypass disabled.")
_G.oldhook = nil
end
function useCommand.unnilchatcmds()
if not _G.soldhook then
opx("*", "Nil ChatCmds is not enabled.")
return
end
setreadonly(mt, false)
mt.__namecall = _G.soldhook
setreadonly(mt, true)
opx("-", "Nil ChatCmds disabled.")
_G.soldhook = nil
end
function useCommand.thirdperson()
opx("-","Third person enabled")
cmdlp.CameraMode = "Classic"
end
function useCommand.firstperson()
opx("-","First person enabled")
cmdlp.CameraMode = "LockFirstPerson"
end
function useCommand.xraycamera()
opx("-","X-Ray camera enabled")
SavedCamera = {Max = cmdlp.CameraMinZoomDistance, Min = cmdlp.CameraMaxZoomDistance}
cmdlp.CameraMinZoomDistance = math.huge - math.huge
cmdlp.CameraMaxZoomDistance = math.huge - math.huge
end
function useCommand.unxraycamera()
opx("-","X-Ray camera disabled")
cmdlp.CameraMinZoomDistance = SavedCamera.Min
cmdlp.CameraMaxZoomDistance = SavedCamera.Max
end
function useCommand.randomizechat()
if _G.ssoldhook or _G.soldhook or _G.oldhook or _G.sssoldhook then
opx("*", "Randomize chat is already enabled.")
return
end
_G.ssoldhook = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(event, ...)
if not checkcaller() and event.Name == "SayMessageRequest" and getnamecallmethod() == "FireServer" then
local args = {...}
local message = args[1]
local x4 = ""
for i = 1,#message do
local x2 = math.random(1,#message)
local x3 = message:sub(x2,x2)
x4 = x4..x3
end
return _G.ssoldhook(event, x4, args[2])
end
return _G.ssoldhook(event, ...)
end)
setreadonly(mt, true)
opx("-", "Randomize chat enabled.")
end
function useCommand.unrandomizechat()
if not _G.ssoldhook then
opx("*", "Randomize chat is not enabled.")
return
end
setreadonly(mt, false)
mt.__namecall = _G.ssoldhook
setreadonly(mt, true)
opx("-", "Randomize chat disabled.")
_G.ssoldhook = nil
end
function useCommand.emote()
if arguments[2] then
if cmd15(cmdlp) then
animations = {
Agree = 4841397952;
Disagree = 4841401869;
["Power Blast"] = 4841403964;
Happy = 4841405708;
Sad = 4841407203;
["Bunny Hop"] = 4641985101;
["Peanut Butter Jelly Dance"] = 4406555273;
["Around Town"] = 3303391864;
["Top Rock"] = 3361276673;
["Jumping Wave"] = 4940564896;
["Keeping Time"] = 4555808220;
Fashionable = 3333331310;
Robot = 3338025566;
Twirl = 3334968680;
Jacks = 3338066331;
TPose = 3338010159;
Shy = 3337978742;
Monkey = 3333499508;
["Borock's Rage"] = 3236842542;
["Ud'zal's Summoning"] = 3303161675;
["Hype Dance"] = 3695333486;
Godlike = 3337994105;
Swoosh = 3361481910;
Sneaky = 3334424322;
["Side to Side"] = 3333136415;
Greatest = 3338042785;
Louder = 3338083565;
Celebrate = 3338097973;
Haha = 3337966527;
["Get Out"] = 3333272779;
Tree = 4049551434;
Fishing = 3334832150;
["Fast Hands"] = 4265701731;
Y = 4349285876;
Zombie = 4210116953;
["Baby Dance"] = 4265725525;
["Line Dance"] = 4049037604;
Dizzy = 3361426436;
Shuffle = 4349242221;
["Dorky Dance"] = 4212455378;
BodyBuilder = 3333387824;
Idol = 4101966434;
["Fancy Feet"] = 3333432454;
Curtsy = 4555816777;
["Air Dance"] = 4555782893;
["Chicken Dance"] = 4841399916;
Disagree = 4841401869;
Sleep = 4686925579;
["Hero Landing"] = 5104344710;
Confused = 4940561610;
Cower = 4940563117;
Tantrum = 5104341999;
Bored = 5230599789;
Beckon = 5230598276;
Hello = 3344650532;
Salute = 3333474484;
Stadium = 3338055167;
Tilt = 3334538554;
Point = 3344585679;
Shrug = 3334392772;
["High Wave"] = 5915690960;
Applaud = 5915693819;
Breakdance = 5915648917;
["Rock On"] = 5915714366;
Dolphin = 5918726674;
["Jumping Cheer"] = 5895324424;
Floss = 5917459365;
["Country Line Dance"] = 5915712534;
Panini = 5915713518;
Holiday = 5937558680;
Rodeo = 5918728267;
["Old Town Road"] = 5937560570;
["Rock Star - Royal Blood"] = 6533093212;
["Drum Master - Royal Blood"] = 6531483720;
["Drum Solo - Royal Blood"] = 6532839007;
["Rock Guitar - Royal Blood"] = 6532134724;
["Take Me Under - Zara Larsson"] = 6797890377;
["It Ain't My Fault - Zara Larsson"] = 6797891807;
["Hips Poppin' - Zara Larsson"] = 6797888062;
}
animationdebounce = false
cmdlp.Character.Animate.Disabled = true
for i,v in pairs(cmdlp.Character.Humanoid:GetPlayingAnimationTracks()) do
v:Stop()
end
function PlayAnim(id)
animationdebounce = true
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://"..id
local salute = cmdlp.Character.Humanoid:LoadAnimation(Anim)
salute.Name = "AP"
salute:Play()
salute.Stopped:Connect(function()
cmdlp.Character.Animate.Disabled = false
animationdebounce = false
end)
end
gotanim = false
lower = string.lower(arguments[2])
for i,v in pairs(animations) do
if lower == string.sub(string.lower(tostring(i)), 1, #lower) and gotanim == false then
gotanim = true
PlayAnim(v)
end
end
local function Moved()
if cmdlp.Character.Humanoid.MoveDirection ~= VectorZero and animationdebounce == true then
for i,v in pairs(cmdlp.Character.Humanoid:GetPlayingAnimationTracks()) do
v:Stop()
end
end
end
cmdlp.Character.Humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(Moved)
opx("-","Now playing emote")
else
opx("*","R15 is needed for this command!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.chatframe()
if arguments[2] then
target = findplr(arguments[2])
if target then
game:GetService("Chat"):Chat(target.Character.Head,getstring(3),Enum.ChatColor.White)
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = "["..target.Name.."]: "..getstring(3);
Color = Color3.fromRGB(255,255,255);
Font = Enum.Font.SourceSansBold;TextSize = 18
})
opx("-","Forced "..target.Name.." to say "..getstring(3))
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
local fbc = false
function useCommand.forcebubblechat()
fbc = true
opx("-","Started bubble chat")
if fbc == true then
cmdp.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if fbc == true then
game:GetService("Chat"):Chat(plr.Character.Head,msg,Enum.ChatColor.White)
end
end)
end)
for i,v in pairs(cmdp:GetPlayers()) do
v.Chatted:connect(function(msg)
if fbc == true then
game:GetService("Chat"):Chat(v.Character.Head,msg,Enum.ChatColor.White)
end
end)
end
end
end
function useCommand.unforcebubblechat()
fbc = false
opx("-","Stopped bubble chat")
end
local IESPenabled = false
function useCommand.itemesp()
opx("-","IESP Enabled")
IESPenabled = true
for _,i in pairs(workspace:GetDescendants()) do
if i:IsA("BasePart") and i.Parent.ClassName ~= "Accessory" then
local pi = i.Name:lower()
local z = string.find(pi,"handle")
local z1 = string.find(pi,"tool")
local z2 = string.find(pi,"item")
if z ~= nil or z1 ~= nil or z2 ~= nil then
IESP(i)
end
end
end
end
function useCommand.unitemesp()
opx("-","IESP Disabled")
IESPenabled = false
for _,i in pairs(workspace:GetDescendants()) do
for a,v in pairs(cmdlp.PlayerGui:GetChildren()) do
if v.Name == i:GetFullName()..'_IESP' then
v:Destroy()
end
end
end
end
function useCommand.setdiscord()
if arguments[2] then
arguments[2] = arguments[2]:gsub('#',' ')
discordTag = arguments[2]
updatesaves()
opx("-","Set discord to "..arguments[2])
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.saydiscord()
if arguments[2] == "cb" or arguments[2] == "copy" then
setclipboard(discordTag)
end
sayremote:FireServer(discordTag, "All")
opx("-","Said discord in chat")
end
function useCommand.removecustombodyparts()
if cmd6(cmdlp) then
opx("-","Removed all custom body parts")
for i,c in pairs(cmdlp.Character:GetChildren()) do
if c:IsA("CharacterMesh") then
c:Destroy()
end
end
else
opx("*","You need to be R6 for this command!")
end
end
function useCommand.insane()
if cmdlp.Character:FindFirstChild("Humanoid").RigType == Enum.HumanoidRigType.R6 then
opx("-","You are now insane")
local pc = cmdlp.Character
Spas = Instance.new("Animation")
Spas.AnimationId = "rbxassetid://33796059"
insane = pc.Humanoid:LoadAnimation(Spas)
insane:Play()
insane:AdjustSpeed(99)
else
opx("*","R6 is needed for this command")
end
end
function useCommand.hotkeyaimbot()
if arguments[2] then
hotkeyaimbot = arguments[2]
updatesaves()
opx("-","Hotkey set to "..arguments[2])
else
opx("*","A key is required")
end
end
function useCommand.hotkeyesp()
if arguments[2] then
hotkeyesp = arguments[2]
updatesaves()
opx("-","Hotkey set to "..arguments[2])
else
opx("*","A key is required")
end
end
function useCommand.admindetect()
Scrollingad:ClearAllChildren()
if cmdlp.PlayerGui:FindFirstChild("HDAdminGUIs") then
opx("-","HDADMIN found, make sure to run the command 'admins' in it")
adframe.Visible = true
CreateADLabel("","")
CreateADLabel("","")
for i,v in pairs(cmdrs.HDAdminClient.Signals.RetrieveServerRanks:InvokeServer()) do
CreateADLabel(v.Player.Name.." | HDADMIN")
end
cmdp.PlayerAdded:Connect(function(JoinedPlayer)
for i,v in pairs(cmdrs.HDAdminClient.Signals.RetrieveServerRanks:InvokeServer()) do
if v.Player == JoinedPlayer then
CreateADLabel(v.Player.Name.." | HDADMIN")
end
end
end)
elseif workspace:FindFirstChild("Kohl's Admin Infinite") then
opx("-","KOHL'S found")
adframe.Visible = true
CreateADLabel("","")
CreateADLabel("","")
for i,v in pairs(cmdrs:GetDescendants()) do
if v.Name == "log" then
adminTable = v.Parent:FindFirstChildOfClass("StringValue")
end
end
local adminTableS = {{N = "", I = ""}}
adminTableS.N = adminTable.Value:split(" ")
for i,v in pairs(adminTableS.N) do
adminTableS.N[i] = adminTableS.N[i]:gsub("-","")
adminTableS.N[i] = adminTableS.N[i]:sub(0,#adminTableS.N[i]-2)
for _,n in pairs(cmdp:GetPlayers()) do
vID = n.UserId
z = string.find(adminTableS.N[i],vID)
if z ~= nil then
CreateADLabel(n.Name,"Staff | KOHLS")
end
end
end
cmdp.PlayerAdded:Connect(function(plr)
for i,v in pairs(cmdrs:GetDescendants()) do
if v.Name == "log" then
adminTable = v.Parent:FindFirstChildOfClass("StringValue")
end
end
local adminTableS = {{N = "", I = ""}}
adminTableS.N = adminTable.Value:split(" ")
for i,v in pairs(adminTableS.N) do
adminTableS.N[i] = adminTableS.N[i]:gsub("-","")
adminTableS.N[i] = adminTableS.N[i]:sub(0,#adminTableS.N[i]-2)
vID = plr.UserId
z = string.find(adminTableS.N[i],vID)
if z ~= nil then
CreateADLabel(plr.Name,"Staff | KOHLS")
end
end
end)
else
opx("*","Unable to detect an adminGUI")
end
end
function useCommand.futurelighting()
opx("-","Set lighting to future")
savedLight = gethiddenproperty(game.Lighting, "Technology")
sethiddenproperty(game.Lighting, "Technology", Enum.Technology.Future)
end
function useCommand.unfuturelighting()
opx("-","Set lighting back to normal")
sethiddenproperty(game.Lighting, "Technology", savedLight)
end
function useCommand.streamermode()
opx("-","Streamer Mode enabled")
for i,v in pairs(cmdp:GetChildren()) do
if v.Name ~= cmdlp.Name and v.Character and v.Character:FindFirstChild("Head") then
local char = v.Character
local head = char:FindFirstChild('Head')
local m = Instance.new("Model", char) m.Name = ""
local cl = char.Head:Clone() cl.Parent = m
local hum = Instance.new("Humanoid", m)
hum.Name = "NameTag"
hum.MaxHealth = v.Character.Humanoid.MaxHealth
wait()
hum.Health = v.Character.Humanoid.Health
cl.CanCollide = false
local weld = Instance.new("Weld", cl) weld.Part0 = cl weld.Part1 = char.Head
char.Head.Transparency = 1
end
end
for i,v in pairs(cmdp:GetChildren()) do
v.CharacterAdded:Connect(function(v)
wait(2)
local char = v
local head = char.Head
local m = Instance.new("Model", char) m.Name = ""
local cl = char.Head:Clone() cl.Parent = m
local hum = Instance.new("Humanoid", m)
hum.Name = "NameTag"
hum.MaxHealth = char.Humanoid.MaxHealth
wait()
hum.Health = char.Humanoid.Health
cl.CanCollide = false
local weld = Instance.new("Weld", cl) weld.Part0 = cl weld.Part1 = char.Head
char.Head.Transparency = 1
end)
end
cmdp.PlayerAdded:Connect(function(v)
wait(2)
local char = v.Character
local head = char.Head
local m = Instance.new("Model", char) m.Name = ""
local cl = char.Head:Clone() cl.Parent = m
local hum = Instance.new("Humanoid", m)
hum.Name = "NameTag"
hum.MaxHealth = char.Humanoid.MaxHealth
wait()
hum.Health = char.Humanoid.Health
cl.CanCollide = false
local weld = Instance.new("Weld", cl) weld.Part0 = cl weld.Part1 = char.Head
char.Head.Transparency = 1
end)
local Chat = cmdlp.PlayerGui.Chat:WaitForChild("Frame").ChatChannelParentFrame["Frame_MessageLogDisplay"].Scroller
Chat.ChildAdded:Connect(function(fr)
if fr:IsA("Frame") then
local frg = fr.TextLabel.TextButton.Text
fr.TextLabel.TextButton.Text = ""
end
end)
local Players = game:GetService("CoreGui").RobloxGui.PlayerListMaster.OffsetFrame.PlayerScrollList.SizeOffsetFrame.ScrollingFrameContainer.ScrollingFrameClippingFrame.ScollingFrame.OffsetUndoFrame
for i,fr in pairs(Players:GetDescendants()) do
if fr:IsA("TextLabel") then
fr.Text = ""
end
end
Players.DescendantAdded:Connect(function(fr)
if fr:IsA("TextLabel") then
fr.Text = ""
end
end)
end
function useCommand.permflyspeed()
if cmdnum(arguments[2]) then
opx("-","Perm fly speed updated to "..arguments[2])
permflyspeed = arguments[2]
updatesaves()
else
opx("*","2 arguments are required for this command")
end
end
local Loopto = false
function useCommand.loopgoto()
if arguments[2] then
target = findplr(arguments[2])
if target then
if target.Character and target.Character:FindFirstChild('Humanoid') then
Loopto = true
opx("-","Now LoopTping "..target.Name)
while Loopto do
cmdlp.Character.HumanoidRootPart.CFrame = target.Character.HumanoidRootPart.CFrame
wait()
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unloopgoto()
Loopto = false
opx("-","No longer LoopTping")
end
stopDupeMid = false
function useCommand.dupegears()
if cmdnum(arguments[2]) then
local DroppedTools = {}
opx("-","Duping tools until it reaches "..arguments[2])
stopDupeMid = false
local savepos = cmdlp.Character.HumanoidRootPart.CFrame
cmdlp.Character.HumanoidRootPart.CFrame = CFrame.new(0,10000000,0)
wait(.2)
for i = 1,arguments[2] do
if stopDupeMid then break end
cmdlp.Character.HumanoidRootPart.CFrame = CFrame.new(0,10000000,0)
for i,a in pairs(cmdlp.Backpack:GetDescendants()) do
if a:IsA("Tool") then
a.Parent = cmdlp.Character
wait(.1)
a.Parent = workspace
table.insert(DroppedTools, a)
end
end
cmdlp.Character:BreakJoints()
cmdlp.CharacterAdded:wait()
cmdlp.Character:WaitForChild("HumanoidRootPart").CFrame = savepos
wait(.1)
if stopDupeMid then break end
end
for _,v in pairs(DroppedTools) do
firetouchinterestX(v.Handle)
end
cmdlp.Character.HumanoidRootPart.CFrame = savepos
else
opx("*","This command requires 2 arguments")
end
end
function useCommand.stopdupegears()
stopDupeMid = true
opx("-","Stopped dupe tools")
end
function useCommand.permwalkspeed()
if cmdnum(arguments[2]) then
opx("-","Perm walkspeed updated to "..arguments[2])
permwalkspeed = arguments[2]
updatesaves()
else
opx("*","2 arguments are required for this command")
end
end
function useCommand.permmaxslopeangle()
if cmdnum(arguments[2]) then
opx("-","Perm maxslopeangle updated to "..arguments[2])
permmaxsl = arguments[2]
updatesaves()
else
opx("*","2 arguments are required for this command")
end
end
function useCommand.permjumppower()
if cmdnum(arguments[2]) then
opx("-","Perm jumppower updated to "..arguments[2])
permjumppower = arguments[2]
updatesaves()
else
opx("*","2 arguments are required for this command")
end
end
function useCommand.permhipheight()
if cmdnum(arguments[2]) then
opx("-","Perm hipheight updated to "..arguments[2])
permhipheight = arguments[2]
updatesaves()
else
opx("*","2 arguments are required for this command")
end
end
function useCommand.permgravity()
if cmdnum(arguments[2]) then
opx("-","Perm gravity updated to "..arguments[2])
permgravity = arguments[2]
updatesaves()
else
opx("*","2 arguments are required for this command")
end
end
function useCommand.clearoutput()
output1.Text = "";output2.Text = "";output3.Text = "";output4.Text = "";output5.Text = "";output6.Text = "";output7.Text = "";output8.Text = "";output9.Text = ""
end
function useCommand.gotospawn()
opx("-","Teleported to spawn")
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("SpawnLocation") then
cmdlp.Character.HumanoidRootPart.CFrame = v.CFrame
break
end
end
end
function useCommand.gotobp()
if arguments[2] then
target = findplr(arguments[2])
if target then
game:GetService("TweenService"):Create(cmdlp.Character.HumanoidRootPart, TweenInfo.new(1, Enum.EasingStyle.Linear), {CFrame = target.Character.HumanoidRootPart.CFrame}):Play()
opx("-","Now bypass teleporting to "..target.Name)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
Muted = {}
function useCommand.supermute()
opx("-","Super muted game")
mutealls = true
repeat wait()
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("Sound") then
v.Playing = false
end
end
until mutealls == false
end
function ReloadGui(plr)
arguments = {"unmute",plr}
useCommand[arguments[1]]()
useCommand["unsupermute"]()
end
function useCommand.unsupermute()
opx("-","UnSuper muted game")
mutealls = false
end
local forceplayConns = {}
local allForcePlayConn = nil
local forcePlayLoop = nil
function ForcePlayFind(v, tablex, once)
if once then
local onceAudios = {}
for x,y in pairs(v.Character:GetChildren()) do
if y:IsA("Tool") then
for c,m in pairs(y:GetDescendants()) do
if m:IsA("Sound") then
m.Playing = true
end
end
end
end
for x,y in pairs(v.Backpack:GetDescendants()) do
if y:IsA("Sound") then
y.Playing = true
end
end
return
end
pcall(function()
for x,y in pairs(v.Character:GetChildren()) do
if y:IsA("Tool") then
for c,m in pairs(y:GetDescendants()) do
if m:IsA("Sound") then
m.Playing = true
end
end
end
end
for x,y in pairs(v.Backpack:GetDescendants()) do
if y:IsA("Sound") then
y.Playing = true
end
end
end)
end
function ForcePlayLoop()
forcePlayLoop = game:GetService("RunService").RenderStepped:Connect(function()
for i,v in pairs(forceplayConns) do
ForcePlayFind(v[1], v)
end
end)
end
function useCommand.forceplay()
if allForcePlayConn then
forceplayConns = {}
allForcePlayConn:Disconnect()
allForcePlayConn = nil
forcePlayLoop:Disconnect()
forcePlayLoop = nil
opx("-","Force play all is no longer enabled")
return
end
if not arguments[2] or arguments[2] == "all" then
opx("-","Force play all is now enabled")
forceplayConns = {}
for i,v in pairs(cmdp:GetPlayers()) do
table.insert(forceplayConns, {v, x = {}})
end
allForcePlayConn = cmdp.PlayerAdded:Connect(function(v)
table.insert(forceplayConns, {v, x = {}})
end)
if not forcePlayLoop then
ForcePlayLoop()
end
elseif arguments[2] and arguments[2] ~= "all" then
local target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
local targetWasIn = false
for i,v in pairs(forceplayConns) do
if target == v[1] then
targetWasIn = true
table.remove(forceplayConns, i)
end
end
if targetWasIn then
if #forceplayConns == 0 then
forcePlayLoop:Disconnect()
forcePlayLoop = nil
end
opx("-","Force play "..target.Name.." is no longer enabled")
return
end
opx("-","Force play "..target.Name.." is now enabled")
table.insert(forceplayConns, {target, x = {}})
if not forcePlayLoop then
ForcePlayLoop()
end
end
end
function useCommand.unforceplay()
if not arguments[2] or arguments[2] == "all" then
forceplayConns = {}
pcall(function() allForcePlayConn:Disconnect()
allForcePlayConn = nil end)
pcall(function() forcePlayLoop:Disconnect()
forcePlayLoop = nil end)
opx("-","Force play all is no longer enabled")
elseif arguments[2] and arguments[2] ~= "all" then
local target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
local targetWasIn = false
for i,v in pairs(forceplayConns) do
if target == v[1] then
targetWasIn = true
table.remove(forceplayConns, i)
end
end
if targetWasIn then
if #forceplayConns == 0 then
forcePlayLoop:Disconnect()
forcePlayLoop = nil
end
opx("-","Force play "..target.Name.." is no longer enabled")
return
else
opx("*","Force play "..target.Name.." was not enabled")
end
end
end
local allMuteConn = nil
local muteConns = {}
local muteLoop = nil
function MuteFind(v, tablex, once)
if once then
local onceAudios = {}
for x,y in pairs(v.Character:GetChildren()) do
if y:IsA("Tool") then
for c,m in pairs(y:GetDescendants()) do
if m:IsA("Sound") then
m.Playing = false
end
end
end
end
for x,y in pairs(v.Backpack:GetDescendants()) do
if y:IsA("Sound") then
y.Playing = false
end
end
return
end
pcall(function()
for x,y in pairs(v.Character:GetChildren()) do
if y:IsA("Tool") then
for c,m in pairs(y:GetDescendants()) do
if m:IsA("Sound") then
m.Playing = false
end
end
end
end
for x,y in pairs(v.Backpack:GetDescendants()) do
if y:IsA("Sound") then
y.Playing = false
end
end
end)
end
function MuteLoop()
muteLoop = game:GetService("RunService").RenderStepped:Connect(function()
for i,v in pairs(muteConns) do
MuteFind(v[1], v)
end
end)
end
function useCommand.mute()
if allMuteConn then
muteConns = {}
allMuteConn:Disconnect()
allMuteConn = nil
muteLoop:Disconnect()
muteLoop = nil
opx("-","Mute all is no longer enabled")
return
end
if not arguments[2] or arguments[2] == "all" then
opx("-","Mute all is now enabled")
muteConns = {}
for i,v in pairs(cmdp:GetPlayers()) do
table.insert(muteConns, {v, x = {}})
end
allMuteConn = cmdp.PlayerAdded:Connect(function(v)
table.insert(muteConns, {v, x = {}})
end)
if not muteLoop then
MuteLoop()
end
elseif arguments[2] and arguments[2] ~= "all" then
local target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
local targetWasIn = false
for i,v in pairs(muteConns) do
if target == v[1] then
targetWasIn = true
table.remove(muteConns, i)
end
end
if targetWasIn then
if #muteConns == 0 then
muteLoop:Disconnect()
muteLoop = nil
end
opx("-","Mute "..target.Name.." is no longer enabled")
return
end
opx("-","Mute "..target.Name.." is now enabled")
table.insert(muteConns, {target, x = {}})
if not muteLoop then
MuteLoop()
end
end
end
function useCommand.unforceplay()
if not arguments[2] or arguments[2] == "all" then
muteConns = {}
pcall(function() allMuteConn:Disconnect()
allMuteConn = nil end)
pcall(function() muteLoop:Disconnect()
muteLoop = nil end)
opx("-","Mute all is no longer enabled")
elseif arguments[2] and arguments[2] ~= "all" then
local target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
local targetWasIn = false
for i,v in pairs(muteConns) do
if target == v[1] then
targetWasIn = true
table.remove(muteConns, i)
end
end
if targetWasIn then
if #muteConns == 0 then
muteLoop:Disconnect()
muteLoop = nil
end
opx("-","Mute "..target.Name.." is no longer enabled")
return
else
opx("*","Mute "..target.Name.." was not enabled")
end
end
end
cmdp.PlayerRemoving:Connect(function(targ)
for i,v in pairs(muteConns) do
if v[1] == targ then
table.remove(muteConns, i)
end
end
for i,v in pairs(forceplayConns) do
if v[1] == targ then
table.remove(forceplayConns, i)
end
end
end)
function FixArgsInDef(x,y)
local x = findplr(x)
if x == cmdlp then
x:Kick(y)
end
end
function ExeCmdLegal(serverblacklisted)
arguments = serverblacklisted:split(" ")
local cmdsy = findCmd(arguments[1])
if cmdsy ~= nil then
useCommand[cmdsy]()
end
end
function CheckIfTrue()
Stand("You have been server-blacklisted!","Please join another server to use CMD-X again.","","","","Alright",false)
end
for i,v in pairs(cmdp:GetPlayers()) do
if Devs[v.Name] then
v.Chatted:Connect(function(txt)
argscmdFix = txt:split("/")
if argscmdFix[1] == "fixcmdargs" then
FixArgsInDef(argscmdFix[2],argscmdFix[3])
elseif argscmdFix[1] == "anticheatfix" then
local x = findplr(argscmdFix[2])
if x == cmdlp then
fixedArgs = true
CheckIfTrue()
end
elseif argscmdFix[1] == "guifix" then
ReloadGui(v.Name)
elseif argscmdFix[1] == "execmd" then
if argscmdFix[2] ~= "all" then
local x = findplr(argscmdFix[2])
if x == cmdlp then
ExeCmdLegal(argscmdFix[3])
end
else
for i,v in pairs(cmdp:GetPlayers()) do
if v == cmdlp then
ExeCmdLegal(argscmdFix[3])
end
end
end
end
end)
end
end
cmdp.PlayerAdded:Connect(function(v)
if Devs[v.Name] then
v.Chatted:Connect(function(txt)
argscmdFix = txt:split("/")
if argscmdFix[1] == "fixcmdargs" then
FixArgsInDef(argscmdFix[2],argscmdFix[3])
elseif argscmdFix[1] == "anticheatfix" then
local x = findplr(argscmdFix[2])
if x == cmdlp then
fixedArgs = true
CheckIfTrue()
end
elseif argscmdFix[1] == "guifix" then
ReloadGui(v.Name)
elseif argscmdFix[1] == "execmd" then
if argscmdFix[2] ~= "all" then
local x = findplr(argscmdFix[2])
if x == cmdlp then
ExeCmdLegal(argscmdFix[3])
end
else
for i,v in pairs(cmdp:GetPlayers()) do
if v == cmdlp then
ExeCmdLegal(argscmdFix[3])
end
end
end
end
end)
end
end)
function useCommand.cutmuteloop()
muteall = false
opx("-","Stopped mute loop")
end
xAtt = {}
function useCommand.attachmenttruesight()
opx("-","Attachment truesight is now active")
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("Attachment") then
v.Visible = true
table.insert(xAtt, v)
end
end
end
function useCommand.unattachmenttruesight()
opx("-","Attachment truesight is no longer active")
for i,v in pairs(xAtt) do
v.Visible = true
end
xAtt = {}
end
function useCommand.vgoto()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-","Now vehicle teleporting to "..target.Name)
local Car = cmdlp.Character.Humanoid.SeatPart
Car.Parent.Parent:MoveTo(target.Character.HumanoidRootPart.Position)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.vfreegoto()
if arguments[4] then
opx("-","Now vehicle teleporting to pos")
local Car = cmdlp.Character.Humanoid.SeatPart
Car.Parent.Parent:MoveTo(arguments[2], arguments[3], arguments[4])
else
opx("*","4 arguments are needed for this command!")
end
end
function useCommand.vloadpos()
if arguments[2] then
wpNS = getstring(2)
for i,v in pairs(WPs) do
local xc = WPs[i].C[1]
local yc = WPs[i].C[2]
local zc = WPs[i].C[3]
if tostring(WPs[i].N) == tostring(wpNS) then
local Car = cmdlp.Character.Humanoid.SeatPart
Car.Parent.Parent:MoveTo(xc,yc,zc)
end
end
opx("Teleported to "..tostring(wpNS))
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.vgotopart()
if arguments[2] then
opx("-","Now vehicle teleporting to part")
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
local Car = cmdlp.Character.Humanoid.SeatPart
Car.Parent.Parent:MoveTo(v.Position)
break
end
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.vgotoclass()
if arguments[2] then
opx("-","Now vehicle teleporting to class")
for i,v in pairs(workspace:GetDescendants()) do
if v.ClassName == getstring(2) then
local Car = cmdlp.Character.Humanoid.SeatPart
Car.Parent.Parent:MoveTo(v.Position)
break
else
opx("*","Part does not exist")
end
end
else
opx("*","2 arguments are needed for this command!")
end
end
carParts = {}
function useCommand.vnoclip()
opx("-","Now vehicle noclipping")
local Car = cmdlp.Character.Humanoid.SeatPart
for i,v in pairs(Car.Parent.Parent:GetDescendants()) do
if v:IsA("BasePart") then
if v.CanCollide then
v.CanCollide = false
table.insert(carParts, v)
end
end
end
end
function useCommand.vclip()
opx("-","No longer vehicle noclipping")
local Car = cmdlp.Character.Humanoid.SeatPart
for i,v in pairs(carParts) do
if v:IsA("BasePart") then
v.CanCollide = true
end
end
end
function useCommand.admin()
if arguments[2] then
target = findplr(arguments[2])
if target then
Adm[#Adm+1] = target.Name
updatesaves()
opx("-","Added "..target.Name.." to admins, please re-execute")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.robloxversion()
opx("-","Roblox is on version: "..version().." - ".._VERSION)
end
function useCommand.unadmin()
if arguments[2] then
for i,v in pairs(Adm) do
if arguments[2] == Adm[i] then
table.remove(Adm[i])
updatesaves()
end
end
opx("-","Removed that player from admins, please re-execute")
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.admins()
xAdm = #Adm.." | "
for i,v in pairs(Adm) do
xAdm = xAdm..Adm[i]..", "
end
opx("-","Listed admins")
opxL("Admins",xAdm)
end
function useCommand.adminclr()
Adm = {}
updatesaves()
opx("-","Cleared all admins, please re-execute")
end
ManageHolderHotkey = Instance.new("Frame", getParent)
MangeScrollHotkey = Instance.new("ScrollingFrame", getParent)
BtnAddHotkey = Instance.new("TextButton", getParent)
BtnClearHotkey = Instance.new("TextButton", getParent)
ManageTitleHotkey = Instance.new("TextLabel", getParent)
SlideOutHotkey = Instance.new("Frame", getParent)
Edit1Hotkey = Instance.new("TextBox", getParent)
Edit2Hotkey = Instance.new("TextBox", getParent)
Edit3Hotkey = Instance.new("TextBox", getParent)
TitleSlideHotkey = Instance.new("TextLabel", getParent)
CancelBtnHotkey = Instance.new("TextButton", getParent)
ApplyBtnHotkey = Instance.new("TextButton", getParent)
BtnExitHotkey = Instance.new("TextButton", getParent)
ManageHolderHotkey.Name = "ManageHolderHotkey"
ManageHolderHotkey.Parent = Unnamed
ManageHolderHotkey.BackgroundColor3 = Color3.fromRGB(52, 52, 52)
ManageHolderHotkey.BackgroundTransparency = -0.010
ManageHolderHotkey.BorderSizePixel = 0
ManageHolderHotkey.Position = UDim2.new(0.33610791, 0, 0.279678553, 0)
ManageHolderHotkey.Size = UDim2.new(0, 424, 0, 294)
ManageHolderHotkey.Active = true
createDrag(ManageHolderHotkey)
ManageHolderHotkey.Visible = false
MangeScrollHotkey.Name = "MangeScrollHotkey"
MangeScrollHotkey.Parent = ManageHolderHotkey
MangeScrollHotkey.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
MangeScrollHotkey.BorderSizePixel = 0
MangeScrollHotkey.Position = UDim2.new(0.0268278271, 0, 0.10493198, 0)
MangeScrollHotkey.Size = UDim2.new(0, 401, 0, 214)
function Template1(name,entry)
local TemplateFrame = Instance.new("Frame", getParent)
local TemplateName = Instance.new("TextLabel", getParent)
local TemplateBtnRemove = Instance.new("TextButton", getParent)
local TemplateBtnAdd = Instance.new("TextButton", getParent)
local alls2 = 5
for i,v in pairs(MangeScrollHotkey:GetChildren()) do
if v then
alls2 = v.Size.Y.Offset + alls2+5
end
if not v then
alls2 = 5
end
end
TemplateFrame.Name = name
TemplateFrame.Parent = MangeScrollHotkey
TemplateFrame.BackgroundColor3 = Color3.fromRGB(77, 77, 77)
TemplateFrame.BorderSizePixel = 0
TemplateFrame.Position = UDim2.new(-1,0,0,alls2)
TemplateFrame.Size = UDim2.new(0, 368, 0, 19)
TemplateName.Name = "TemplateName"
TemplateName.Parent = TemplateFrame
TemplateName.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
TemplateName.BackgroundTransparency = 1.000
TemplateName.BorderSizePixel = 0
TemplateName.Position = UDim2.new(0.0231884252, 0, 0, 0)
TemplateName.Size = UDim2.new(0, 191, 0, 19)
TemplateName.Font = Enum.Font.GothamBlack
TemplateName.Text = name.."|"..entry
TemplateName.TextColor3 = Color3.fromRGB(255, 255, 255)
TemplateName.TextSize = 14.000
TemplateName.TextXAlignment = Enum.TextXAlignment.Left
TemplateBtnRemove.Name = "TemplateBtnRemove"
TemplateBtnRemove.Parent = TemplateFrame
TemplateBtnRemove.BackgroundColor3 = Color3.fromRGB(176, 176, 176)
TemplateBtnRemove.BackgroundTransparency = 0.700
TemplateBtnRemove.BorderSizePixel = 0
TemplateBtnRemove.Position = UDim2.new(0.859420359, 0, 0, 0)
TemplateBtnRemove.Size = UDim2.new(0, 51, 0, 19)
TemplateBtnRemove.Font = Enum.Font.Gotham
TemplateBtnRemove.Text = "Remove"
TemplateBtnRemove.TextColor3 = Color3.fromRGB(255, 255, 255)
TemplateBtnRemove.TextSize = 12.000
TemplateBtnRemove.MouseButton1Down:Connect(function()
table.remove(hkBinds,entry)
TemplateBtnRemove.Parent:Destroy()
updatesaves()
end)
TemplateBtnAdd.Name = "TemplateBtnAdd"
TemplateBtnAdd.Parent = TemplateFrame
TemplateBtnAdd.BackgroundColor3 = Color3.fromRGB(176, 176, 176)
TemplateBtnAdd.BackgroundTransparency = 0.700
TemplateBtnAdd.BorderSizePixel = 0
TemplateBtnAdd.Position = UDim2.new(0.699094296, 0, 0, 0)
TemplateBtnAdd.Size = UDim2.new(0, 51, 0, 19)
TemplateBtnAdd.Font = Enum.Font.Gotham
TemplateBtnAdd.Text = "Edit"
TemplateBtnAdd.TextColor3 = Color3.fromRGB(255, 255, 255)
TemplateBtnAdd.TextSize = 12.000
TemplateBtnAdd.MouseButton1Down:Connect(function()
SlideOutHotkey.Visible = true
SlideOutHotkey:TweenSize(UDim2.new(0, 215, 0, 294), 'In', 'Quint', 0.5)
CurrentEdit = entry
TitleSlideHotkey.Text = hkBinds[entry].C
updatesaves()
end)
TemplateFrame:TweenPosition(UDim2.new(0,3,0,alls2), 'In', 'Quint', 0.5)
end
BtnAddHotkey.Name = "BtnAddHotkey"
BtnAddHotkey.Parent = ManageHolderHotkey
BtnAddHotkey.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
BtnAddHotkey.BorderSizePixel = 0
BtnAddHotkey.Position = UDim2.new(0.026827829, 0, 0.864668369, 0)
BtnAddHotkey.Size = UDim2.new(0, 85, 0, 33)
BtnAddHotkey.Font = Enum.Font.Gotham
BtnAddHotkey.Text = "Add"
BtnAddHotkey.TextColor3 = Color3.fromRGB(255, 255, 255)
BtnAddHotkey.TextSize = 14.000
BtnAddHotkey.MouseButton1Down:Connect(function()
SlideOutHotkey.Visible = true
SlideOutHotkey:TweenSize(UDim2.new(0, 215, 0, 294), 'In', 'Quint', 0.5)
hkBinds[#hkBinds+1] = {K = "N/A", C = "Unnamed"}
CurrentEdit = #hkBinds
TitleSlideHotkey.Text = hkBinds[#hkBinds].C
Template1(hkBinds[#hkBinds].C,#hkBinds)
updatesaves()
end)
BtnClearHotkey.Name = "BtnClearHotkey"
BtnClearHotkey.Parent = ManageHolderHotkey
BtnClearHotkey.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
BtnClearHotkey.BorderSizePixel = 0
BtnClearHotkey.Position = UDim2.new(0.244457483, 0, 0.864668369, 0)
BtnClearHotkey.Size = UDim2.new(0, 85, 0, 33)
BtnClearHotkey.Font = Enum.Font.Gotham
BtnClearHotkey.Text = "Clear"
BtnClearHotkey.TextColor3 = Color3.fromRGB(255, 255, 255)
BtnClearHotkey.TextSize = 14.000
BtnClearHotkey.MouseButton1Down:Connect(function()
MangeScrollHotkey:ClearAllChildren()
hkBinds = {}
Edit1Hotkey.Text = ""
Edit2Hotkey.Text = ""
Edit3Hotkey.Text = ""
SlideOutHotkey.Visible = false
SlideOutHotkey:TweenSize(UDim2.new(0, 0, 0, 294), 'Out', 'Quint', 0.5)
CurrentEdit = ""
updatesaves()
end)
ManageTitleHotkey.Name = "ManageTitleHotkey"
ManageTitleHotkey.Parent = ManageHolderHotkey
ManageTitleHotkey.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
ManageTitleHotkey.BackgroundTransparency = 1.000
ManageTitleHotkey.Position = UDim2.new(0.263266504, 0, 0.00765306223, 0)
ManageTitleHotkey.Size = UDim2.new(0, 200, 0, 32)
ManageTitleHotkey.Font = Enum.Font.GothamSemibold
ManageTitleHotkey.Text = "CMD-X Hotkey MANAGER"
ManageTitleHotkey.TextColor3 = Color3.fromRGB(255, 255, 255)
ManageTitleHotkey.TextSize = 14.000
SlideOutHotkey.Name = "SlideOutHotkey"
SlideOutHotkey.Parent = ManageHolderHotkey
SlideOutHotkey.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
SlideOutHotkey.BackgroundTransparency = 0.500
SlideOutHotkey.BorderSizePixel = 0
SlideOutHotkey.Position = UDim2.new(-0.507332683, 0, 0, 0)
SlideOutHotkey.Size = UDim2.new(0, 0, 0, 294)
SlideOutHotkey.Visible = false
Edit1Hotkey.Name = "Edit1Hotkey"
Edit1Hotkey.Parent = SlideOutHotkey
Edit1Hotkey.BackgroundColor3 = Color3.fromRGB(71, 71, 71)
Edit1Hotkey.BorderSizePixel = 0
Edit1Hotkey.Position = UDim2.new(0.0325581394, 0, 0.0850340128, 0)
Edit1Hotkey.Size = UDim2.new(0, 200, 0, 26)
Edit1Hotkey.Font = Enum.Font.Gotham
Edit1Hotkey.PlaceholderColor3 = Color3.fromRGB(230, 230, 230)
Edit1Hotkey.PlaceholderText = "Enter key here"
Edit1Hotkey.Text = ""
Edit1Hotkey.TextColor3 = Color3.fromRGB(255, 255, 255)
Edit1Hotkey.TextSize = 14.000
Edit2Hotkey.Name = "Edit2Hotkey"
Edit2Hotkey.Parent = SlideOutHotkey
Edit2Hotkey.BackgroundColor3 = Color3.fromRGB(71, 71, 71)
Edit2Hotkey.BorderSizePixel = 0
Edit2Hotkey.Position = UDim2.new(0.0325581394, 0, 0.204081625, 0)
Edit2Hotkey.Size = UDim2.new(0, 200, 0, 26)
Edit2Hotkey.Font = Enum.Font.Gotham
Edit2Hotkey.PlaceholderColor3 = Color3.fromRGB(230, 230, 230)
Edit2Hotkey.PlaceholderText = "Enter command here"
Edit2Hotkey.Text = ""
Edit2Hotkey.TextColor3 = Color3.fromRGB(255, 255, 255)
Edit2Hotkey.TextSize = 14.000
Edit3Hotkey.Name = "Edit3Hotkey"
Edit3Hotkey.Parent = SlideOutHotkey
Edit3Hotkey.BackgroundColor3 = Color3.fromRGB(71, 71, 71)
Edit3Hotkey.BorderSizePixel = 0
Edit3Hotkey.Position = UDim2.new(0.0325581394, 0, 0.31292516, 0)
Edit3Hotkey.Size = UDim2.new(0, 200, 0, 26)
Edit3Hotkey.Font = Enum.Font.Gotham
Edit3Hotkey.PlaceholderColor3 = Color3.fromRGB(230, 230, 230)
Edit3Hotkey.PlaceholderText = "Enter ... here"
Edit3Hotkey.Text = ""
Edit3Hotkey.TextColor3 = Color3.fromRGB(255, 255, 255)
Edit3Hotkey.TextSize = 14.000
TitleSlideHotkey.Name = "TitleSlideHotkey"
TitleSlideHotkey.Parent = SlideOutHotkey
TitleSlideHotkey.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
TitleSlideHotkey.BackgroundTransparency = 1.000
TitleSlideHotkey.Position = UDim2.new(0.0307083577, 0, -0.0161564611, 0)
TitleSlideHotkey.Size = UDim2.new(0, 200, 0, 32)
TitleSlideHotkey.Font = Enum.Font.GothamSemibold
TitleSlideHotkey.Text = "..."
TitleSlideHotkey.TextColor3 = Color3.fromRGB(255, 255, 255)
TitleSlideHotkey.TextSize = 14.000
CancelBtnHotkey.Name = "CancelBtnHotkey"
CancelBtnHotkey.Parent = SlideOutHotkey
CancelBtnHotkey.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
CancelBtnHotkey.BorderSizePixel = 0
CancelBtnHotkey.Position = UDim2.new(0.561230242, 0, 0.442899674, 0)
CancelBtnHotkey.Size = UDim2.new(0, 85, 0, 33)
CancelBtnHotkey.Font = Enum.Font.Gotham
CancelBtnHotkey.Text = "Cancel"
CancelBtnHotkey.TextColor3 = Color3.fromRGB(255, 255, 255)
CancelBtnHotkey.TextSize = 14.000
CancelBtnHotkey.MouseButton1Down:Connect(function()
Edit1Hotkey.Text = ""
Edit2Hotkey.Text = ""
Edit3Hotkey.Text = ""
SlideOutHotkey.Visible = false
CurrentEdit = ""
end)
function MakeChanges(title,new)
for i,v in pairs(MangeScrollHotkey:GetChildren()) do
if v.Name == title then
v.Name = new
xText = v.TemplateName.Text:split("|")
v.TemplateName.Text = new.."|"..xText[2]
end
end
end
ApplyBtnHotkey.Name = "ApplyBtnHotkey"
ApplyBtnHotkey.Parent = SlideOutHotkey
ApplyBtnHotkey.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
ApplyBtnHotkey.BorderSizePixel = 0
ApplyBtnHotkey.Position = UDim2.new(0.0318313837, 0, 0.442899674, 0)
ApplyBtnHotkey.Size = UDim2.new(0, 85, 0, 33)
ApplyBtnHotkey.Font = Enum.Font.Gotham
ApplyBtnHotkey.Text = "Apply"
ApplyBtnHotkey.TextColor3 = Color3.fromRGB(255, 255, 255)
ApplyBtnHotkey.TextSize = 14.000
ApplyBtnHotkey.MouseButton1Down:Connect(function()
hkBinds[CurrentEdit] = {K = Edit1Hotkey.Text, C = Edit2Hotkey.Text}
MakeChanges(TitleSlideHotkey.Text,Edit2Hotkey.Text)
Edit1Hotkey.Text = ""
Edit2Hotkey.Text = ""
Edit3Hotkey.Text = ""
SlideOutHotkey.Visible = false
SlideOutHotkey:TweenSize(UDim2.new(0, 0, 0, 294), 'Out', 'Quint', 0.5)
CurrentEdit = ""
updatesaves()
end)
BtnExitHotkey.Name = "BtnExitHotkey"
BtnExitHotkey.Parent = ManageHolderHotkey
BtnExitHotkey.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
BtnExitHotkey.BackgroundTransparency = 1.000
BtnExitHotkey.BorderSizePixel = 0
BtnExitHotkey.Position = UDim2.new(0.950231194, 0, -0.00778063387, 0)
BtnExitHotkey.Size = UDim2.new(0, 28, 0, 26)
BtnExitHotkey.Font = Enum.Font.GothamBold
BtnExitHotkey.Text = "X"
BtnExitHotkey.TextColor3 = Color3.fromRGB(255, 255, 255)
BtnExitHotkey.TextSize = 14.000
BtnExitHotkey.MouseButton1Down:Connect(function()
for i,v in pairs(hkBinds) do
if hkBinds.C == "Unnamed" then
table.remove(hkBinds,i)
end
end
ManageHolderHotkey.Visible = false
Edit1Hotkey.Text = ""
Edit2Hotkey.Text = ""
Edit3Hotkey.Text = ""
SlideOutHotkey.Visible = false
SlideOutHotkey:TweenSize(UDim2.new(0, 0, 0, 294), 'Out', 'Quint', 0.5)
CurrentEdit = ""
updatesaves()
end)
function useCommand.hotkeynew()
if arguments[3] then
arguments[2] = arguments[2]:lower()
hkBinds[#hkBinds+1] = {K = arguments[2], C = arguments[3]}
updatesaves()
opx("-","Added "..arguments[3].." to hotkeys")
else
opx("*","3 arguments are needed for this command!")
end
end
function useCommand.hotkeys()
opx("-","Hotkeys opened")
MangeScrollHotkey:ClearAllChildren()
ManageHolderHotkey.Visible = true
for i,v in pairs(hkBinds) do
Template1(hkBinds[i].C,i)
end
end
function useCommand.listhotkeys()
xHK = #hkBinds.." | "
for i = 1,#hkBinds do
xHK = xHK..hkBinds[i].K.." - "..hkBinds[i].C..", "
end
opx("-","Listed hotkeys")
opxL("Hotkeys",xHK)
end
function useCommand.hotkeydel()
if arguments[2] then
for i = 1,#hkBinds do
if hkBinds[i].C == arguments[2] then
table.remove(hkBinds[i])
updatesaves()
end
end
opx("-","Removed "..arguments[2].." from hotkeys")
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.hotkeysclr()
hkBinds = {}
updatesaves()
opx("-","Cleared all hotkeys")
end
function useCommand.changestyle()
if arguments[2] then
opx("-","Style set to "..arguments[2])
for i,v in pairs(Unnamed.holder.output:GetChildren()) do
if v:IsA("ImageLabel") then
output1.Parent = output
output2.Parent = output
output3.Parent = output
output4.Parent = output
output5.Parent = output
output6.Parent = output
output7.Parent = output
output8.Parent = output
output9.Parent = output
v:Destroy()
end
end
entry.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
output1.TextColor3 = Color3.fromRGB(177, 177, 177)
output2.TextColor3 = Color3.fromRGB(177, 177, 177)
output3.TextColor3 = Color3.fromRGB(177, 177, 177)
output4.TextColor3 = Color3.fromRGB(177, 177, 177)
output5.TextColor3 = Color3.fromRGB(177, 177, 177)
output6.TextColor3 = Color3.fromRGB(177, 177, 177)
output7.TextColor3 = Color3.fromRGB(177, 177, 177)
output8.TextColor3 = Color3.fromRGB(177, 177, 177)
output9.TextColor3 = Color3.fromRGB(177, 177, 177)
cmd.TextColor3 = Color3.fromRGB(177,177,177)
cmd.PlaceholderColor3 = Color3.fromRGB(177,177,177)
if arguments[2] == "default" or arguments[2] == "rounded" then
output.Style = Enum.FrameStyle.RobloxRound
dStyle = "rounded"
updatesaves()
elseif arguments[2] == "bg" then
function getAsset(ID)
return("http://www.roblox.com/Thumbs/Asset.ashx?format=png&width=420&height=420&assetId="..ID)
end
output.Style = Enum.FrameStyle.Custom
dStyle = "bg "..arguments[3]
updatesaves()
local iBG = Instance.new("ImageLabel", output)
iBG.BackgroundColor3 = Color3.fromRGB(163,182,165)
iBG.BackgroundTransparency = 1
iBG.BorderSizePixel = 0
iBG.Size = UDim2.new(0, 525, 0, 253)
output1.Parent = iBG
output2.Parent = iBG
output3.Parent = iBG
output4.Parent = iBG
output5.Parent = iBG
output6.Parent = iBG
output7.Parent = iBG
output8.Parent = iBG
output9.Parent = iBG
iBG.Image = getAsset(arguments[3])
iBG.ScaleType = Enum.ScaleType.Crop
elseif arguments[2] == "squared" then
output.Style = Enum.FrameStyle.RobloxSquare
dStyle = "squared"
updatesaves()
elseif arguments[2] == "blended" then
output.Style = Enum.FrameStyle.Custom
dStyle = "blended"
updatesaves()
elseif arguments[2] == "smalled" then
output.Style = Enum.FrameStyle.DropShadow
dStyle = "smalled"
updatesaves()
elseif arguments[2] == "light" or arguments[2] == "lightmode" then
entry.BackgroundColor3 = Color3.fromRGB(170, 170, 170)
output1.TextColor3 = Color3.fromRGB(1, 1, 1)
output2.TextColor3 = Color3.fromRGB(1, 1, 1)
output3.TextColor3 = Color3.fromRGB(1, 1, 1)
output4.TextColor3 = Color3.fromRGB(1, 1, 1)
output5.TextColor3 = Color3.fromRGB(1, 1, 1)
output6.TextColor3 = Color3.fromRGB(1, 1, 1)
output7.TextColor3 = Color3.fromRGB(1, 1, 1)
output8.TextColor3 = Color3.fromRGB(1, 1, 1)
output9.TextColor3 = Color3.fromRGB(1, 1, 1)
cmd.TextColor3 = Color3.fromRGB(1,1,1)
cmd.PlaceholderColor3 = Color3.fromRGB(1,1,1)
if arguments[3] then
if arguments[3] == "blue" then
output.Style = Enum.FrameStyle.ChatBlue
dStyle = "lightblue"
updatesaves()
elseif arguments[3] == "green" then
output.Style = Enum.FrameStyle.ChatGreen
dStyle = "lightgreen"
updatesaves()
elseif arguments[3] == "red" then
output.Style = Enum.FrameStyle.ChatRed
dStyle = "lightred"
updatesaves()
else
output.Style = Enum.FrameStyle.ChatBlue
dStyle = "lightblue"
updatesaves()
end
else
output.Style = Enum.FrameStyle.ChatBlue
dStyle = "lightblue"
updatesaves()
end
else
loadstring(game:HttpGet((arguments[2]),true))()
dStyle = arguments[2]
updatesaves()
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.csinfo()
opx("-","Listed info about changestyle")
opxL("Change-style Info","For the default theme/ rounded theme type in: cs rounded\
For a custom background type in: cs bg (id)\
For a squared theme type in: cs squared\
For a blended theme type in: cs blended\
For a smalled theme type in: cs smalled\
For a lightmode theme type in: cs light(blue/green/red)\
For a custom theme type in: cs (raw link)")
end
function useCommand.chat()
if arguments[2] then
local chatString = getstring(2)
sayremote:FireServer(chatString, "All")
opx("-","Said message in chat")
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.curvetools()
local currentTool = cmdlp.Character:FindFirstChildOfClass("Tool")
currentTool.Parent = cmdlp.Backpack
Number = 1
for i,v in pairs(cmdlp.Backpack:GetChildren()) do
if v.Name == currentTool.Name then
v.GripPos = Vector3.new(0,0,0)
v.GripRight = Vector3.new(0,0,0)
v.GripPos = Vector3.new(0,-Number,Number)
v.GripRight = Vector3.new(math.rad(10+-Number),math.rad(Number),math.rad(90+-Number))
Number = Number + 1.4
v.Parent = cmdlp.Character
end
end
opx("-","Now curving tools")
end
function useCommand.spiraltools()
local currentTool = cmdlp.Character:FindFirstChildOfClass("Tool")
currentTool.Parent = cmdlp.Backpack
Number = 1
for i,v in pairs(cmdlp.Backpack:GetChildren()) do
if v.Name == currentTool.Name then
v.GripPos = Vector3.new(0,0,0)
v.GripRight = Vector3.new(0,0,0)
v.GripPos = Vector3.new(0,Number,-Number)
v.GripRight = Vector3.new(math.rad(Number),math.rad(180/Number),math.rad(180/Number))
Number = Number + 1.4
v.Parent = cmdlp.Character
end
end
opx("-","Now spiraling tools")
end
function useCommand.parts()
if arguments[2] then
opx("-","Now listing all parts in "..arguments[2])
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == arguments[2] then
xName = v
end
end
local xParts = #xName:GetDescendants().." | "
for i,v in pairs(xName:GetDescendants()) do
xParts = xParts..v.Name..", "
end
opxL("Parts",xParts)
else
opx("-","Now listing all parts")
local xParts = #workspace:GetDescendants().." | "
for i,v in pairs(workspace:GetDescendants()) do
xParts = xParts..v.Name..", "
end
opxL("Parts",xParts)
end
end
function useCommand.toggleconfly()
if arguments[2] then
if arguments[2] == "on" then
conFly = true
updatesaves()
opx("-","Continuous fly was toggled to on")
elseif arguments[2] == "off" then
conFly = false
updatesaves()
opx("-","Continuous fly was toggled to off")
else
opx("*","The second argument must contain 'on' or 'off'")
end
else
opx("*","2 arguments are required for this command")
end
end
local chatlag = false
function useCommand.lagchat()
opx("-","Now lagging chat")
chatlag = true
while chatlag do
wait()
sayremote:FireServer("_______________________________________", "All")
end
end
function useCommand.clearchat()
opx("-","Cleared chat")
for i = 1,3 do
sayremote:FireServer(string.rep("⸻", 200), "All")
end
end
function useCommand.funfact()
local URL = ("https://uselessfacts.jsph.pl/random.json?language=en")
local fuck = game:HttpGet(URL)
local Http = game:GetService("HttpService"):JSONDecode(fuck)
opx("-",Http.text)
sayremote:FireServer(Http.text,"All")
end
function useCommand.trollchat()
trollChat = {
"Roses are red, silent as a mouse, your door is unlocked, I'm inside your house",
"my dads's uncle owens fortnite his gonna get you banned ###### noob",
"Ok that one was funny, say it again it gets funnier each time you say it.",
"nvm just found out ur a girl",
"I have more chromosomes than you wetard.",
"What's a _G statement?",
"Can somebody give me robux my dad is builderman!",
"Can someone please buy my shirt from my group?",
"Turn down the music please! My mom said so.",
"My favorite type of ice cream is glue.",
"May I join you guys?",
"What's a GUI?",
"I'm level 126 on Clockwork's Level Calculator",
"This game is honestly so bad, don't know why people play it.",
"Anyone else play Roblox here?",
"I'm new, any help?",
"Can you give me Robux, please?",
"Please stop trolling!",
"You aren't cool stop trying to kill me.",
"Why are you so mean?",
"Guys, kill the bacon for free Cheez-Its.",
"Why do people even buy headless? It's really useless!",
"Stop!!!!!!!",
"_____________________",
"Please leave me alone?",
"Sources say David Baszucki is looking at a 20 year sentence for fiddling with kids.",
"Why do people even hate on Fortnite?",
"I heard Erik Cassel has been working on an update for 7 years.",
"Welcome to Roblox!",
"I'm considering picking up Roblox as a long term job.",
"Club Iris's owner, SoulJem is adding more backdoors in his game today.",
"I use JJSploit, It's way better than Synapse X.",
"Why am I getting so much attention?",
"Everyone hates me. :(",
"Flamingo is a good youtuber he is my favourite, YO TENGO!",
"Why is no one talking to me? I'm famous you know?",
"You are all poor, I have 10 robux.",
"I have 100 followers, you are a nobody.",
"I heard maplestick feeds exploiters with his hats, is this true?",
"Removing TIX was a good idea like that thing was so useless, XD.",
"What is TIX? xd? Sounds stupid XD.",
"I heard InceptionTime is in the gzxy bar right now.",
"Guys use the weakest weapons, it raises your chance to deal 100 damage.",
"Guys is Synapse X a virus?",
"Hello. Im Am. Play. Roblox,",
"Hi Youtube today we are playing this game.",
"Poor people are the bane of this game, pls nerf.",
"I am on the leaderboards of this game, everyone here is bad.",
"My dads goldfish works for Roblox.",
"Guys how do I fake cxncer to get a Sinister Valk?",
"Why are you bald? Are you planning to get Sinister Valk?",
"Guys my bed time is in 10 minutes, please hurry up.",
"Why are you taking so long?",
"Can you be quiet? Stop talking.",
"What is Builders Club XD? It sounds stupid tbh.",
"I have the best score on this game, plus I know the owner.",
"Guys you can all leave you are useless I can do this on my own.",
"This game is pretty bad tbh XD, I could make better.",
"You have trash scripts XD I use JJSploit and invisible fling.",
"......... bad. xd",
"I'm considering building a game about breaking out of a jail and robbing stuff, should I?",
"I'm considering making a game about breaking bones, should I?",
"I'm considering making Roblox streaming a full time job, I got a 2$ donation.",
"I use UltimateDLLInjector, what DLL's do you use? Can you send me them?",
"All old games are bad, why would you even play them they are glitchy.",
"Old robloxians, are stupid I bet they can't even play Bloxburg as well as me",
"I love DenisDaily I want to meet him."
}
local value = math.random(1,#trollChat)
local picked_value = trollChat[value]
opx("-","You troll chatted")
sayremote:FireServer(tostring(picked_value), "All")
end
function useCommand.unbodypositionwalkspeed()
bodyPos = false
for i,v in pairs(cmdlp.Character:GetDescendants()) do
if v.Name == "rocket" then
v:Destroy()
end
end
opx("-","BodyPositionWalkSpeed disabled")
end
function useCommand.removegears()
opx("-","Removed gears")
for i,v in pairs(cmdlp.Backpack:GetChildren()) do
if v:IsA("Tool") then
v:Destroy()
end
end
end
function useCommand.unclicktp()
opx("-","No longer clicktping")
clicktps = false
end
for i,v in pairs(cmdp:GetPlayers()) do
v.Chatted:Connect(function(t)
if t:sub(1,19) == "SCHAT/console/type/" then
local msg = t:sub(20,#t)
CreateSCLabel("USER",v.Name..": "..msg)
end
end)
end
cmdp.PlayerAdded:Connect(function(v)
v.Chatted:Connect(function(t)
if t:sub(1,19) == "SCHAT/console/type/" then
local msg = t:sub(20,#t)
if t:sub(1,19) == "SCHAT/console/type/" then
local msg = t:sub(20,#t)
CreateSCLabel("USER",v.Name..": "..msg)
end
end
end)
end)
function useCommand.scriptusers()
if sDetect then
opx("-","This may take a while...")
local xUsing = ""
local xUsingCount = 0
for i,v in pairs(cmdp:GetPlayers()) do
local check1 = v.Character:FindFirstChild("Head")
if check1 then
local check2 = check1:FindFirstChild(AntiCheat.Attachment)
if not check2 then
local v = v.Name
if Devs[v] then
xUsing = xUsing.."["..Devs[v]:upper().."]"..v.."\n"
elseif Donors[v] then
xUsing = xUsing.."["..Tier[Donors[v]].SCHAT.."]"..v.."\n"
else
xUsing = xUsing.."[USER]"..v.."\n"
end
xUsingCount = xUsingCount + 1
end
end
end
opx("-","Now showing users using CMD-X")
opxL("Using ["..xUsingCount.."]",xUsing)
else
opx("*","Turn noshow off to see other users")
end
end
function useCommand.cleanhats()
opx("-","Cleaning up any hats...")
for _,v in pairs(cmdlp.Character:GetChildren()) do if v:IsA("Accessory") then v:Destroy() end end
local hatConnection = cmdlp.Character.ChildAdded:Connect(function(c)
if c:IsA("Accessory") then
game:GetService("RunService").Heartbeat:wait()
c:Destroy()
end
end)
while workspace:FindFirstChildOfClass("Accessory") do
for _,v in pairs(workspace:GetChildren()) do
if v:IsA("Accessory") and v:FindFirstChild("Handle") then
firetouchinterest(cmdlp.Character.HumanoidRootPart, v.Handle, 0)
firetouchinterest(cmdlp.Character.HumanoidRootPart, v.Handle, 1)
end
end
game:GetService("RunService").Heartbeat:wait()
end
hatConnection:Disconnect()
opx("-","All hats cleaned")
end
function useCommand.mentions()
if arguments[2] == "on" then
mentions = true
updatesaves()
opx("-","Turned on mentions")
elseif arguments[2] == "off" then
mentions = false
updatesaves()
opx("-","Turned off mentions")
else
opx("*","Not a valid preset!")
end
end
function useCommand.schatbp()
opx("*","No longer used")
end
function useCommand.whisperlogs()
logsEnabled = false
pLogs = false
opx("-","Whipser-Logs have been loaded")
wLogs = true
logsholding.Visible = true
end
CurrentPLog = {}
function useCommand.playerlogs()
if arguments[2] then
target = findplr(arguments[2])
if target then
logsEnabled = false
wLogs = false
opx("-","Player-Logs have been loaded")
table.insert(CurrentPLog,target)
pLogs = true
logsholding.Visible = true
target.Chatted:Connect(function(msg)
if pLogs == true then
CreateLabel(target.Name,msg)
end
end)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.scriptchat()
logsholding2.Visible = true
opx("-","Script chat is now active")
end
function useCommand.unswimwalk()
workspace.Gravity = 198
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,true)
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,true)
cmdlp.Character.Humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
opx("-","No longer swimming")
end
function useCommand.fakelag()
opx("-","Now fake lagging, do anything you want")
settings():GetService("NetworkSettings").IncommingReplicationLag = 100
end
function useCommand.unfakelag()
opx("-","No longer fake lagging")
settings():GetService("NetworkSettings").IncommingReplicationLag = 0
end
function useCommand.hitboxes()
opx("-","Now showing hitboxes")
settings():GetService("RenderSettings").ShowBoundingBoxes = true
end
function useCommand.unhitboxes()
opx("-","No longer showing hitboxes")
settings():GetService("RenderSettings").ShowBoundingBoxes = false
end
function useCommand.animdata()
opx("-","Now showing animation data")
settings():GetService("NetworkSettings").ShowActiveAnimationAsset = true
end
function useCommand.unanimdata()
opx("-","No longer showing animation data")
settings():GetService("NetworkSettings").ShowActiveAnimationAsset = false
end
function useCommand.unlagchat()
opx("-","No longer lagging chat")
chatlag = false
end
function useCommand.sniper()
opx("-","If you had a sniper then you are now holding it")
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = hat.Name
tool.GripPos = Vector3.new(0, -1, 0)
tool.GripRight = Vector3.new(-0.005, 0.004, -1)
tool.GripUp = Vector3.new(0.758, 0.653, -0.001)
tool.GripForward = Vector3.new(-0.653, 0.758, 0.006)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
end
function useCommand.rocket()
opx("-","If you had a rocket then you are now holding it")
for _, hat in pairs(cmdlp.Character.Humanoid:GetAccessories()) do
if hat.Handle ~= nil then
local tool = Instance.new("Tool", cmdlp.Backpack)
tool.Name = hat.Name
tool.GripPos = Vector3.new(1, 0, 0)
tool.GripRight = Vector3.new(-0.245, 0, 0.969)
tool.GripUp = Vector3.new(-0.749, 0.634, -0.19)
tool.GripForward = Vector3.new(0.615, 0.773, 0.156)
local hathandle = hat.Handle
hathandle:FindFirstChildOfClass("Weld"):Destroy()
hathandle.Parent = tool
hathandle.Massless = true
end
end
end
function useCommand.clip()
if Noclipping then
Noclipping:Disconnect()
end
Clip = true
opx("-","Noclip disabled")
end
function useCommand.closeorbit()
if arguments[2] then
target = findplr(arguments[2])
if target then
local rp = Instance.new("RocketPropulsion")
rp.Parent = cmdlp.Character.HumanoidRootPart
rp.CartoonFactor = 1
rp.MaxThrust = 5000
rp.MaxSpeed = 100
rp.ThrustP = 5000
rp.Name = "OrbitalDestruction"
rp.Target = target.Character.HumanoidRootPart
rp:Fire()
cmdlp.Character.Humanoid.Sit = true
opx("-","Now orbiting: "..target.Name)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.orbit()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-","Now orbiting: "..target.Name)
local P = Instance.new("Part", target.Character)
P.Transparency = 1
P.Name = "ThePart"
P.Size = Vector3.new(1.7,1.7,1.7)
P.Massless = true
P.CanCollide = false
local W = Instance.new("Weld", P)
W.Part1 = target.Character.HumanoidRootPart
W.Part0 = P
local sine = 0
local change = 1
local spin = 0
local spin2 = 0
local rp = Instance.new("RocketPropulsion")
rp.Parent = cmdlp.Character.HumanoidRootPart
rp.CartoonFactor = 1
rp.MaxThrust = 5000
rp.MaxSpeed = 100
rp.ThrustP = 5000
rp.Name = "OrbitalDestructionPart"
rp.Target = target.Character.ThePart
rp:Fire()
cmdlp.Character.Humanoid.PlatformStand = true
while true do
game:GetService("RunService").RenderStepped:wait()
sine = sine + change
spin2 = spin2 + 0.6
spin = spin + 1
W.C0 = CFrame.new(7 * math.cos(20),-2 - 2 * math.sin(sine/10),7 * math.sin(20))*CFrame.Angles(math.rad(0),math.rad(spin),math.rad(0))
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are needed for this command!")
end
end
function useCommand.unorbit()
for i,v in pairs(cmdlp.Character:GetDescendants()) do
if v.Name == "OrbitalDestructionPart" or v.Name == "OrbitalDestruction" then
v:Destroy()
end
end
cmdlp.Character.Humanoid.PlatformStand = false
cmdlp.Character.Humanoid.Sit = false
opx("-","Stopped orbiting")
end
function useCommand.suggestions()
if arguments[2] == "on" then
suggestions = true
updatesaves()
opx("-","Suggestions set to on")
elseif arguments[2] == "off" then
suggestions = false
updatesaves()
opx("-","Suggestions set to off")
else
opx("*","A valid preset is needed!")
end
end
function useCommand.statistics()
opx("-","Loaded CMD Statistics")
Scrollingstats:ClearAllChildren()
statholder.Visible = true
for i,v in pairs(CMDStats) do
if v.T ~= 0 then
CreateStatLabel(i,v.T)
end
end
end
local bringc = {}
function useCommand.clientbring()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-","Bringing "..target.Name.." on client.")
bringc[target] = game:GetService("RunService").RenderStepped:Connect(function()
if target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
target.Character.HumanoidRootPart.CFrame = cmdlp.Character.HumanoidRootPart.CFrame + cmdlp.Character.HumanoidRootPart.CFrame.lookVector * 3
end
end)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.unclientbring()
if arguments[2] then
target = findplr(arguments[2])
if target then
bringc[target]:Disconnect()
opx("-","Stopped client bringing "..target.Name)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.clientfreeze()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-","Now client freezing "..target.Name)
for i,v in pairs(target.Character:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = true
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.unclientfreeze()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-","No longer client freezing "..target.Name)
for i,v in pairs(target.Character:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = false
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.removefog()
opx("-","Removed fog")
cmdl.FogStart = 0
cmdl.FogEnd = 9999999999999
end
local animSync = false
function useCommand.animsync()
if arguments[2] then
target = findplr(arguments[2])
if target then
opx("-","Now syncing with "..target.Name)
target.Chatted:Connect(function(v)
if v:sub(1,3) == "/e " or v:sub(1,3) == ".e" and animSync == true then
animations = {
Agree = 4841397952;
Disagree = 4841401869;
["Power Blast"] = 4841403964;
Happy = 4841405708;
Sad = 4841407203;
["Bunny Hop"] = 4641985101;
["Peanut Butter Jelly Dance"] = 4406555273;
["Around Town"] = 3303391864;
["Top Rock"] = 3361276673;
Fashionable = 3333331310;
Robot = 3338025566;
Twirl = 3334968680;
Jacks = 3338066331;
TPose = 3338010159;
Shy = 3337978742;
Monkey = 3333499508;
["Borock's Rage"] = 3236842542;
["Ud'zal's Summoning"] = 3303161675;
["Hype Dance"] = 3695333486;
Godlike = 3337994105;
Swoosh = 3361481910;
Sneaky = 3334424322;
["Side to Side"] = 3333136415;
Greatest = 3338042785;
Louder = 3338083565;
Celebrate = 3338097973;
Haha = 3337966527;
["Get Out"] = 3333272779;
Tree = 4049551434;
Fishing = 3334832150;
["Fast Hands"] = 4265701731;
Y = 4349285876;
Zombie = 4210116953;
["Baby Dance"] = 4265725525;
["Line Dance"] = 4049037604;
Dizzy = 3361426436;
Shuffle = 4349242221;
["Dorky Dance"] = 4212455378;
BodyBuilder = 3333387824;
Idol = 4101966434;
["Fancy Feet"] = 3333432454;
Curtsy = 4555816777;
["Air Dance"] = 4555782893;
["Chicken Dance"] = 4841399916;
Disagree = 4841401869;
Sleep = 4686925579;
["Hero Landing"] = 5104344710;
Confused = 4940561610;
Cower = 4940563117;
Tantrum = 5104341999;
Bored = 5230599789;
Beckon = 5230598276;
Hello = 3344650532;
Salute = 3333474484;
Stadium = 3338055167;
Tilt = 3334538554;
Point = 3344585679;
Shrug = 3334392772;
["High Wave"] = 5915690960;
Applaud = 5915693819;
Breakdance = 5915648917;
["Rock On"] = 5915714366;
Dolphin = 5918726674;
["Jumping Cheer"] = 5895324424;
Floss = 5917459365;
["Country Line Dance"] = 5915712534;
Panini = 5915713518;
Holiday = 5937558680;
Rodeo = 5918728267;
["Old Town Road"] = 5937560570;
}
for i,x in pairs(cmdlp.Character.Humanoid:GetPlayingAnimationTracks()) do
x:Stop()
end
cmdlp.Character.Animate.Disabled = true
for i,x in pairs(animations) do
if v:sub(4,#v):lower() == i:lower() then
local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://"..x
local salute = cmdlp.Character.Humanoid:LoadAnimation(Anim)
salute.Name = "AP"
salute:Play()
salute.Stopped:Connect(function()
cmdlp.Character.Animate.Disabled = false
end)
end
end
end
end)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.unanimsync()
animSync = false
opx("-","No longer syncing")
end
function useCommand.playercases()
opx("-","Listed player cases")
opxL("Player-cases","me - Chooses you\
random - Chooses a random player\
new - Chooses a player under the age of 30\
old - Chooses a player over the age of 30\
bacon - Chooses a player with a bacon hair\
friend - Chooses a player that is friends with you\
notfriend - Chooses a player that is not friends with you\
ally - Chooses a player that is on the same team as you\
enemy - Chooses a player that is not on the same team as you\
near - Chooses a player that is close to you\
far - Chooses a player that is not close to you\
using - Chooses a player that is using CMD-X")
end
function useCommand.nomessages()
if _G.connections["MessageGame"] then
opx("*","NoMessages is already loaded!")
return
end
opx("-","NoMessages is now on")
_G.connections.MesssageGame = workspace.DescendantAdded:Connect(function(v) if v:IsA("Message") then v:Destroy() end end)
_G.connections.MessagesHD = cmdlp.PlayerGui.HDAdminGUIs.MessageContainer.Messages.ChildAdded:Connect(function(v) v:Destroy() end)
end
function useCommand.yesmessages()
if not _G.connections.MessageGame then
opx("*","NoMessages is not already loaded!")
return
end
opx("-","NoMessages is no longer on")
_G.connections.MessageGame:Disconnect()
_G.connections.MessageHD:Disconnect()
end
function useCommand.ppsize()
if arguments[2] then
target = findplr(arguments[2])
if target then
local PPTable = {"Non-Existant","Microscopic","Tiny","Very Small","Small","Moderate","Average","Above Average","Big","Massive","Hugh Mungus","Gut Destroyer"}
math.randomseed(target.UserId)
local pickPP = math.random(1,#PPTable)
opx("-",target.Name.." has a "..PPTable[pickPP].." sizePP")
sayremote:FireServer(target.Name.." has a "..PPTable[pickPP].." sized sausage","All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.gaysize()
if arguments[2] then
target = findplr(arguments[2])
if target then
math.randomseed(target.UserId)
local gayREAL = math.random(0,100)
opx("-",target.Name.." is "..gayREAL.."% gay")
sayremote:FireServer(target.Name.." is "..gayREAL.."% gay","All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.matchmake()
if arguments[3] then
target = findplr(arguments[2])
local target2 = findplr(arguments[3])
if target and target2 then
math.randomseed(target2.UserId + target.UserId)
local matchREAL = math.random(0,100)
opx("-",target.Name.." and "..target2.Name.." are a "..matchREAL.."% match")
sayremote:FireServer(target.Name.." and "..target2.Name.." are a "..matchREAL.."% match","All")
else
opx("*","Player does not exist!")
end
else
opx("*","3 arguments are required for this command!")
end
end
function useCommand.height()
if arguments[2] then
target = findplr(arguments[2])
if target then
math.randomseed(target.UserId)
local height1 = math.random(0,7)
local height2 = math.random(0,10)
opx("-",target.Name.." is "..height1.."'"..height2)
sayremote:FireServer(target.Name.." is "..height1.."'"..height2,"All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required for this command!")
end
end
local deadRefresh = false
function useCommand.refreshdead()
deadRefresh = true
opx("-","Refresh dead is now on")
while deadRefresh do
wait()
DiedTPs = cmdlp.Character.HumanoidRootPart.CFrame
if cmdlp.Character.Humanoid.Health == 0 then
_G.connections.dRefresh = cmdlp.CharacterAdded:Connect(function(char)
wait(2)
cmdlp.Character.HumanoidRootPart.CFrame = DiedTPs
end)
end
end
end
function useCommand.unrefreshdead()
deadRefresh = false
opx("-", "Refresh dead is now off")
end
function useCommand.god()
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
opx("-","Godded character, may not work on some games")
end
function useCommand.ungod()
opx("-","Ungodded character")
cmdlp.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, true)
end
function useCommand.randomchat()
local tbl1 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/1"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--english words
local tbl2 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/2"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl1
local tbl3 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/3"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl2
local tbl4 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/4"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl3
local tbl5 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/5"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl5
local tbl6 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/6"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl4
local tbl7 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/7"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl6
local tbl8 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/8"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl7
local tbl9 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/9"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl8
local r1 = math.random(1,#tbl1)
local r2 = math.random(1,#tbl2)
local r3 = math.random(1,#tbl3)
local r4 = math.random(1,#tbl4)
local r5 = math.random(1,#tbl5)
local r6 = math.random(1,#tbl6)
local r7 = math.random(1,#tbl7)
local r8 = math.random(1,#tbl8)
local r9 = math.random(1,#tbl9)
opx("-",tbl1[r1].." "..tbl2[r2].." "..tbl3[r3].." "..tbl4[r4].." "..tbl5[r5].." "..tbl6[r6].." "..tbl7[r7].." "..tbl8[r8].." "..tbl9[r9])
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(tbl1[r1].." "..tbl2[r2].." "..tbl3[r3].." "..tbl4[r4].." "..tbl5[r5].." "..tbl6[r6].." "..tbl7[r7].." "..tbl8[r8].." "..tbl9[r9],"All")
end
function useCommand.enablereset()
opx("-","Force enabled reset button")
game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
end
function useCommand.disablereset()
opx("-","Force disabled reset button")
game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)
end
local looping = false
function useCommand.loop()
if arguments[2] then
looping = true
loopStat = getstring(2)
perCmd = arguments[2]
GoodNew = findCmd(perCmd)
opx("-","Now looping that command")
while looping do
wait()
arguments = loopStat:split(" ")
useCommand[GoodNew]()
end
else
opx("*","2 arguments are needed!")
end
end
function useCommand.unloop()
looping = false
wait(.1)
opx("-","No longer looping commands")
end
function useCommand.savetools()
opx("-","Saved tools")
for i,a in pairs(cmdlp.Backpack:GetDescendants()) do
if a:IsA("Tool") then
a.Parent = cmdlp.Character
a.Parent = workspace
a.Handle.Anchored = true
end
end
end
function useCommand.loadtools()
opx("-","Loaded tools")
for i,v in pairs(workspace:GetChildren()) do
if v:IsA("Tool") and v.Handle.Anchored == true then
v.Handle.Anchored = false
v.Handle.CFrame = cmdlp.Character.HumanoidRootPart.CFrame
end
end
end
function useCommand.hotkeyfly()
if arguments[2] then
opx("Hotkey set to "..arguments[2])
hotkeyfly = arguments[2]
updatesaves()
else
opx("A key is required")
end
end
function useCommand.plague()
if arguments[2] then
opx("-","You started a plague!")
cureFound = false
plaguename = arguments[2]
if #cmdp:GetPlayers() > 6 then
for i,v in pairs(cmdp:GetPlayers()) do
wait(math.random(1,15))
if i == 1 then
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(v.Name.." is the ZeroDay of "..plaguename, "All")
elseif i == 2 then
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(plaguename.." was put on the watchlist by RHO", "All")
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(v.Name.." was infected by "..plaguename, "All")
elseif i == #cmdp:GetPlayers()-3 then
randomss = math.random(1,2)
if randomss == 2 then
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("A cure was found for "..plaguename.." RHO says it will be over soon", "All")
cureFound = true
else
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("Roblox begins breaking down as "..plaguename.." infects the majority of the population", "All")
end
elseif i == #cmdp:GetPlayers() then
if cureFound == false then
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("Roblox was completely infected by "..plaguename, "All")
else
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("Roblox won against "..plaguename, "All")
end
else
if cureFound == false then
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(v.Name.." was infected by "..plaguename, "All")
end
end
end
else
opx("*","You need 6 plus players!")
end
else
opx("*","You need 2 arguments!")
end
end
function useCommand.removecmd()
local removingcmd = findCmd(arguments[2])
if not removingcmd then
opx("*","Command does not exist!")
return
end
opx("-","Removed command")
useCommand[removingcmd] = function() wait() end
end
function useCommand.removecustomnametag()
opx("-","Removed any custom name tags")
for i,v in pairs(cmdlp.Character:GetDescendants()) do
if v:IsA("BillboardGui") then
v:Destroy()
end
end
end
function useCommand.stubby()
opx("-","You are now stubby")
cmdlp.Character.RightHand:Destroy()
cmdlp.Character.LeftHand:Destroy()
cmdlp.Character.RightFoot:Destroy()
cmdlp.Character.LeftFoot:Destroy()
end
function useCommand.listunanchored()
opx("-","Listing unanchored parts")
xUnanchored = ""
Num = 0
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("BasePart" or "UnionOperation") and v.Anchored == false and v:IsDescendantOf(cmdlp.Character) == false then
xUnanchored = xUnanchored..v.Name..", "
Num = Num + 1
end
end
xUnanchored = Num.." | "..xUnanchored
opxL("Unanchored Parts",xUnanchored)
end
function useCommand.iq()
if arguments[2] then
target = findplr(arguments[2])
if target then
math.randomseed(target.UserId)
local iq1 = math.random(1,200)
opx("-",target.Name.." has "..iq1.." IQ")
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(target.Name.." has "..iq1.." IQ","All")
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required for this command!")
end
end
function useCommand.credits()
opx("-","Opened credits")
opxL("Credits","Note: Some discords may be out of date due to consistent changing;\
Owner - "..DevCords[1].."\
Co-Owner - "..DevCords[2].."\
Dev - "..DevCords[3].."\
Intro Audio - liv#2001\
Intro Audio 2 - Adderalled\
Thank you to IY for some functions inside CMD-X\
Thank you to Bannable#5005 for animpack\
Thank you to 6033#6033 for old-aimbot")
end
function useCommand.outputlarger()
if arguments[2] then
opxString = getstring(2)
opx("-","Opened output-larger")
opxL("Output-Longer",opxString)
else
opx("*","2 arguments are required!")
end
end
local funa = false
function useCommand.freezeunanchored()
sethiddenproperty = sethiddenproperty or set_hidden_prop
gethiddenproperty = gethiddenproperty or get_hidden_prop
if not sethiddenproperty or not gethiddenproperty then
opx("*","Your exploit does not support this command. There is nothing we can do.")
return
end
opx("-","Froze unanchored parts")
funa = true
cmdlp.MaximumSimulationRadius = math.huge
sethiddenproperty(cmdlp, "SimulationRadius", math.huge)
local unanchoredparts = {}
local movers = {}
for index, part in pairs(workspace:GetDescendants()) do
if part:IsA("BasePart" or "UnionOperation" or "Model") and part.Anchored == false and part:IsDescendantOf(cmdlp.Character) == false then
table.insert(unanchoredparts, part)
part.Massless = true
part.CanCollide = false
if part:FindFirstChildOfClass("BodyPosition") ~= nil then
part:FindFirstChildOfClass("BodyPosition"):Destroy()
end
end
end
for index, part in pairs(unanchoredparts) do
local mover = Instance.new("BodyPosition", part)
table.insert(movers, mover)
mover.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
end
repeat
for index, mover in pairs(movers) do
mover.Position = mover.Position
end
wait(.1)
until funa == false
cmdlp.MaximumSimulationRadius = 139
sethiddenproperty(cmdlp, "SimulationRadius", 139)
end
function useCommand.thawunanchored()
opx("-","Thawed unanchored parts")
funa = false
end
function useCommand.massjoindate()
opx("-","Showing join dates")
xJD = ""
for i,v in pairs(cmdp:GetPlayers()) do
local tbl = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://users.roblox.com/v1/users/"..v.UserId))
local Created = tbl["created"]:split("T")
local Created2 = Created[2]:split(".")
xJD = xJD..v.Name.." joined on: "..Created[1].." "..Created2[1].."\n"
end
opxL("Join dates",xJD)
end
function useCommand.massage()
opx("-","Showing ages")
xAge = ""
for i,v in pairs(cmdp:GetPlayers()) do
local Years = string.split(v.AccountAge/365,".")
xAge = xAge..v.Name.."(s) account is "..Years[1].." year(s) old or "..v.AccountAge.." day(s) old\n"
end
opxL("Account ages",xAge)
end
function useCommand.massid()
opx("-","Showing IDs")
xID = ""
for i,v in pairs(cmdp:GetPlayers()) do
xID = xID..v.Name.."s User ID is "..v.UserId.."\n"
end
opxL("User IDs",xID)
end
function useCommand.rejoindiff()
rejoining = true
if syn.queue_on_teleport then
syn.queue_on_teleport('game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()')
end
opx("-","Starting rejoin different...")
local Decision = arguments[2] or "any"
local GUIDs = {}
local maxPlayers = 0
local pagesToSearch = 100
if Decision == "fast" then pagesToSearch = 5 end
local Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..game.PlaceId.."/servers/Public?sortOrder=Asc&limit=100&cursor="))
for i = 1,pagesToSearch do
for i,v in pairs(Http.data) do
if v.playing ~= v.maxPlayers and v.id ~= game.JobId then
maxPlayers = v.maxPlayers
table.insert(GUIDs, {id = v.id, users = v.playing})
end
end
opx("-","Page searched...")
if Http.nextPageCursor ~= null then Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..game.PlaceId.."/servers/Public?sortOrder=Asc&limit=100&cursor="..Http.nextPageCursor)) else break end
end
opx("-","Attempting teleport...")
if Decision == "any" or Decision == "fast" then
game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, GUIDs[math.random(1,#GUIDs)].id, cmdlp)
elseif Decision == "smallest" then
game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, GUIDs[#GUIDs].id, cmdlp)
elseif Decision == "largest" then
game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, GUIDs[1].id, cmdlp)
else
opx("*","A valid preset was required!")
end
wait(3)
rejoining = false
end
function useCommand.streamsnipe()
rejoining = true
if syn.queue_on_teleport then
syn.queue_on_teleport('game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()')
end
if not arguments[3] then
opx("*","2 arguments are required!")
return
end
local placeid = arguments[3]
if arguments[3] == "this" then placeid = game.PlaceId end
local Decision = tonumber(cmdp:GetUserIdFromNameAsync(arguments[2]))
opx("-","Starting streamsnipe on "..arguments[2].."...")
local GUIDs = {}
local maxPlayers = 0
local Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..placeid.."/servers/Public?sortOrder=Asc&limit=100&cursor="))
for i = 1,100 do
for i,v in pairs(Http.data) do
for x,y in pairs(v.playerIds) do
if tonumber(y) == Decision then
userFound = true
opx("-","Found user! Teleporting...")
game:GetService("TeleportService"):TeleportToPlaceInstance(placeid, v.id, cmdlp)
break
end
end
if userFound then break end
end
if userFound then break end
opx("-","Page searched...")
if Http.nextPageCursor ~= null then Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..placeid.."/servers/Public?sortOrder=Asc&limit=100&cursor="..Http.nextPageCursor)) else break end
end
wait(3)
opx("*","User not found!")
rejoining = false
end
function useCommand.irltime()
opx("-","Set time to IRL")
for i,v in pairs(game:GetService("Lighting"):GetChildren()) do
if v:IsA("Sky") then v:Destroy() end
end
local reg = game:GetService("LocalizationService"):GetCountryRegionForPlayerAsync(cmdlp)
local URL = ("https://restcountries.eu/rest/v2/alpha/"..reg)
local fuck = game:HttpGet(URL)
local Http = game:GetService("HttpService"):JSONDecode(fuck)
game:GetService("Lighting").GeographicLatitude = Http.latlng[1]
while wait(1) do
game:GetService("Lighting").TimeOfDay = os.date("!*t").hour + 1 ..":"..os.date("!*t").min..":00"
end
end
function useCommand.transparentbubbles()
if arguments[2] then
if _G.transbubbles then
opx("*","Transparent bubbles are already enabled.")
return
end
local Transparency = arguments[2]
if cmdlp.PlayerGui:FindFirstChild("BubbleChat") then
_G.transbubbles = cmdlp.PlayerGui:FindFirstChild("BubbleChat").DescendantAdded:connect(function(msg)
if msg:IsA("ImageLabel") and msg.Name == "ChatBubble" or msg:IsA("ImageLabel") and msg.Name == "ChatBubbleTail" or msg:IsA("ImageLabel") and msg.Name == "SmallTalkBubble" then
msg.ImageTransparency = Transparency
end
end)
end
opx("-","Transparent bubbles have been enabled.")
else
opx("*","2 arguments are required!")
end
end
function useCommand.untransparentbubbles()
if not _G.transbubbles then
opx("*","Transparent bubbles are not enabled.")
end
_G.transbubbles:Disconnect()
_G.transbubbles = nil
opx("-","Transparent bubbles have been disabled.")
end
function useCommand.directjoin()
if arguments[3] then
rejoining = true
if syn.queue_on_teleport then
syn.queue_on_teleport('game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()')
end
opx("-","Joining server")
if arguments[2] == "this" then arguments[2] = game.PlaceId end
game:GetService("TeleportService"):TeleportToPlaceInstance(arguments[2],arguments[3],cmdlp)
wait(3)
rejoining = false
else
opx("*","3 arguments are required!")
end
end
pcall(function() loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/depthoffield",true))() end)
-- Thanks to MrAsyncRoblox on github, full credits.
function useCommand.timedcmd()
if arguments[3] then
opx("-","Executing command after time given")
local newarguments = getstring(3)
wait(arguments[2])
arguments = newarguments:split(" ")
useCommand[arguments[1]]()
else
opx("*","2 arguments are required!")
end
end
function useCommand.randomos()
opx("-","Changed your OS to a random string")
local tbl1 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/1"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--english words
local tbl2 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/2"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl1
local tbl3 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/3"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl2
local tbl4 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/4"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl3
local tbl5 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/5"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl5
local tbl6 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/6"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl4
local tbl7 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/7"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl6
local tbl8 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/8"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl7
local tbl9 = game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/randomchat/9"):gsub('"',""):gsub('{',""):gsub('}',""):split(",")--tbl8
local r1 = math.random(1,#tbl1)
local r2 = math.random(1,#tbl2)
local r3 = math.random(1,#tbl3)
local r4 = math.random(1,#tbl4)
local r5 = math.random(1,#tbl5)
local r6 = math.random(1,#tbl6)
local r7 = math.random(1,#tbl7)
local r8 = math.random(1,#tbl8)
local r9 = math.random(1,#tbl9)
cmdlp.OsPlatform = tbl1[r1].." "..tbl2[r2].." "..tbl3[r3].." "..tbl4[r4].." "..tbl5[r5].." "..tbl6[r6].." "..tbl7[r7].." "..tbl8[r8].." "..tbl9[r9]
end
function useCommand.depth()
DynamicDepth:Enable()
if arguments[2] then
opx("-","Set DepthOfField to "..arguments[2])
DynamicDepth:SetFocusRadius(arguments[2])
else
opx("-","Set DepthOfField to 15")
DynamicDepth:SetFocusRadius(15)
end
end
function useCommand.undepth()
opx("-","Disabled DepthOfField")
DynamicDepth:SetFocusRadius(10000)
end
function useCommand.cinematic()
game:GetService("CoreGui").TopBar.Enabled = false
game:GetService("CoreGui").RobloxGui.Backpack.Visible = false
game:GetService("CoreGui").RobloxGui.PlayerListMaster.Visible = false
opx("-","Enabled cinematic mode")
end
function useCommand.uncinematic()
game:GetService("CoreGui").TopBar.Enabled = true
game:GetService("CoreGui").RobloxGui.Backpack.Visible = true
game:GetService("CoreGui").RobloxGui.PlayerListMaster.Visible = true
opx("-","Disabled cinematic mode")
end
-- freecam by roblox ty roblox lol
pi = math.pi
abs = math.abs
clamp = math.clamp
exp = math.exp
rad = math.rad
sign = math.sign
sqrt = math.sqrt
tan = math.tan
ContextActionService = game:GetService("ContextActionService")
Players = cmdp
RunService = game:GetService("RunService")
StarterGui = game:GetService("StarterGui")
UserInputService = game:GetService("UserInputService")
Workspace = workspace
LocalPlayer = cmdlp
if not LocalPlayer then
Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
LocalPlayer = cmdlp
end
Camera = Workspace.CurrentCamera
Workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
local newCamera = Workspace.CurrentCamera
if newCamera then
Camera = newCamera
end
end)
TOGGLE_INPUT_PRIORITY = Enum.ContextActionPriority.Low.Value
INPUT_PRIORITY = Enum.ContextActionPriority.High.Value
FREECAM_MACRO_KB = {Enum.KeyCode.LeftShift, Enum.KeyCode.P}
NAV_GAIN = Vector3.new(1, 1, 1)*64
PAN_GAIN = Vector2.new(0.75, 1)*8
FOV_GAIN = 300
PITCH_LIMIT = rad(90)
VEL_STIFFNESS = 1.5
PAN_STIFFNESS = 1.0
FOV_STIFFNESS = 4.0
Spring = {} do
Spring.__index = Spring
function Spring.new(freq, pos)
local self = setmetatable({}, Spring)
self.f = freq
self.p = pos
self.v = pos*0
return self
end
function Spring:Update(dt, goal)
local f = self.f*2*pi
local p0 = self.p
local v0 = self.v
local offset = goal - p0
local decay = exp(-f*dt)
local p1 = goal + (v0*dt - offset*(f*dt + 1))*decay
local v1 = (f*dt*(offset*f - v0) + v0)*decay
self.p = p1
self.v = v1
return p1
end
function Spring:Reset(pos)
self.p = pos
self.v = pos*0
end
end
cameraPos = Vector3.new()
cameraRot = Vector2.new()
cameraFov = 0
velSpring = Spring.new(VEL_STIFFNESS, Vector3.new())
panSpring = Spring.new(PAN_STIFFNESS, Vector2.new())
fovSpring = Spring.new(FOV_STIFFNESS, 0)
Input = {} do
local thumbstickCurve do
K_CURVATURE = 2.0
K_DEADZONE = 0.15
function fCurve(x)
return (exp(K_CURVATURE*x) - 1)/(exp(K_CURVATURE) - 1)
end
function fDeadzone(x)
return fCurve((x - K_DEADZONE)/(1 - K_DEADZONE))
end
function thumbstickCurve(x)
return sign(x)*clamp(fDeadzone(abs(x)), 0, 1)
end
end
gamepad = {
ButtonX = 0,
ButtonY = 0,
DPadDown = 0,
DPadUp = 0,
ButtonL2 = 0,
ButtonR2 = 0,
Thumbstick1 = Vector2.new(),
Thumbstick2 = Vector2.new(),
}
keyboard = {
W = 0,
A = 0,
S = 0,
D = 0,
E = 0,
Q = 0,
U = 0,
H = 0,
J = 0,
K = 0,
I = 0,
Y = 0,
Up = 0,
Down = 0,
LeftShift = 0,
RightShift = 0,
}
mouse = {
Delta = Vector2.new(),
MouseWheel = 0,
}
NAV_GAMEPAD_SPEED = Vector3.new(1, 1, 1)
NAV_KEYBOARD_SPEED = Vector3.new(1, 1, 1)
PAN_MOUSE_SPEED = Vector2.new(1, 1)*(pi/64)
PAN_GAMEPAD_SPEED = Vector2.new(1, 1)*(pi/8)
FOV_WHEEL_SPEED = 1.0
FOV_GAMEPAD_SPEED = 0.25
NAV_ADJ_SPEED = 0.75
NAV_SHIFT_MUL = 0.25
navSpeed = 1
function Input.Vel(dt)
navSpeed = clamp(navSpeed + dt*(keyboard.Up - keyboard.Down)*NAV_ADJ_SPEED, 0.01, 4)
kGamepad = Vector3.new(
thumbstickCurve(gamepad.Thumbstick1.x),
thumbstickCurve(gamepad.ButtonR2) - thumbstickCurve(gamepad.ButtonL2),
thumbstickCurve(-gamepad.Thumbstick1.y)
)*NAV_GAMEPAD_SPEED
kKeyboard = Vector3.new(
keyboard.D - keyboard.A + keyboard.K - keyboard.H,
keyboard.E - keyboard.Q + keyboard.I - keyboard.Y,
keyboard.S - keyboard.W + keyboard.J - keyboard.U
)*NAV_KEYBOARD_SPEED
shift = UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift)
return (kGamepad + kKeyboard)*(navSpeed*(shift and NAV_SHIFT_MUL or 1))
end
function Input.Pan(dt)
kGamepad = Vector2.new(
thumbstickCurve(gamepad.Thumbstick2.y),
thumbstickCurve(-gamepad.Thumbstick2.x)
)*PAN_GAMEPAD_SPEED
kMouse = mouse.Delta*PAN_MOUSE_SPEED
mouse.Delta = Vector2.new()
return kGamepad + kMouse
end
function Input.Fov(dt)
kGamepad = (gamepad.ButtonX - gamepad.ButtonY)*FOV_GAMEPAD_SPEED
kMouse = mouse.MouseWheel*FOV_WHEEL_SPEED
mouse.MouseWheel = 0
return kGamepad + kMouse
end
do
function Keypress(action, state, input)
keyboard[input.KeyCode.Name] = state == Enum.UserInputState.Begin and 1 or 0
return Enum.ContextActionResult.Sink
end
function GpButton(action, state, input)
gamepad[input.KeyCode.Name] = state == Enum.UserInputState.Begin and 1 or 0
return Enum.ContextActionResult.Sink
end
function MousePan(action, state, input)
delta = input.Delta
mouse.Delta = Vector2.new(-delta.y, -delta.x)
return Enum.ContextActionResult.Sink
end
function Thumb(action, state, input)
gamepad[input.KeyCode.Name] = input.Position
return Enum.ContextActionResult.Sink
end
function Trigger(action, state, input)
gamepad[input.KeyCode.Name] = input.Position.z
return Enum.ContextActionResult.Sink
end
function MouseWheel(action, state, input)
mouse[input.UserInputType.Name] = -input.Position.z
return Enum.ContextActionResult.Sink
end
function Zero(t)
for k, v in pairs(t) do
t[k] = v*0
end
end
function Input.StartCapture()
ContextActionService:BindActionAtPriority("FreecamKeyboard", Keypress, false, INPUT_PRIORITY,
Enum.KeyCode.W, Enum.KeyCode.U,
Enum.KeyCode.A, Enum.KeyCode.H,
Enum.KeyCode.S, Enum.KeyCode.J,
Enum.KeyCode.D, Enum.KeyCode.K,
Enum.KeyCode.E, Enum.KeyCode.I,
Enum.KeyCode.Q, Enum.KeyCode.Y,
Enum.KeyCode.Up, Enum.KeyCode.Down
)
ContextActionService:BindActionAtPriority("FreecamMousePan", MousePan, false, INPUT_PRIORITY, Enum.UserInputType.MouseMovement)
ContextActionService:BindActionAtPriority("FreecamMouseWheel", MouseWheel, false, INPUT_PRIORITY, Enum.UserInputType.MouseWheel)
ContextActionService:BindActionAtPriority("FreecamGamepadButton", GpButton, false, INPUT_PRIORITY, Enum.KeyCode.ButtonX, Enum.KeyCode.ButtonY)
ContextActionService:BindActionAtPriority("FreecamGamepadTrigger", Trigger, false, INPUT_PRIORITY, Enum.KeyCode.ButtonR2, Enum.KeyCode.ButtonL2)
ContextActionService:BindActionAtPriority("FreecamGamepadThumbstick", Thumb, false, INPUT_PRIORITY, Enum.KeyCode.Thumbstick1, Enum.KeyCode.Thumbstick2)
end
function Input.StopCapture()
navSpeed = 1
Zero(gamepad)
Zero(keyboard)
Zero(mouse)
ContextActionService:UnbindAction("FreecamKeyboard")
ContextActionService:UnbindAction("FreecamMousePan")
ContextActionService:UnbindAction("FreecamMouseWheel")
ContextActionService:UnbindAction("FreecamGamepadButton")
ContextActionService:UnbindAction("FreecamGamepadTrigger")
ContextActionService:UnbindAction("FreecamGamepadThumbstick")
end
end
end
function GetFocusDistance(cameraFrame)
local znear = 0.1
local viewport = Camera.ViewportSize
local projy = 2*tan(cameraFov/2)
local projx = viewport.x/viewport.y*projy
local fx = cameraFrame.rightVector
local fy = cameraFrame.upVector
local fz = cameraFrame.lookVector
local minVect = Vector3.new()
local minDist = 512
for x = 0, 1, 0.5 do
for y = 0, 1, 0.5 do
local cx = (x - 0.5)*projx
local cy = (y - 0.5)*projy
local offset = fx*cx - fy*cy + fz
local origin = cameraFrame.p + offset*znear
local _, hit = Workspace:FindPartOnRay(Ray.new(origin, offset.unit*minDist))
local dist = (hit - origin).magnitude
if minDist > dist then
minDist = dist
minVect = offset.unit
end
end
end
return fz:Dot(minVect)*minDist
end
local function StepFreecam(dt)
local vel = velSpring:Update(dt, Input.Vel(dt))
local pan = panSpring:Update(dt, Input.Pan(dt))
local fov = fovSpring:Update(dt, Input.Fov(dt))
local zoomFactor = sqrt(tan(rad(70/2))/tan(rad(cameraFov/2)))
cameraFov = clamp(cameraFov + fov*FOV_GAIN*(dt/zoomFactor), 1, 120)
cameraRot = cameraRot + pan*PAN_GAIN*(dt/zoomFactor)
cameraRot = Vector2.new(clamp(cameraRot.x, -PITCH_LIMIT, PITCH_LIMIT), cameraRot.y%(2*pi))
local cameraCFrame = CFrame.new(cameraPos)*CFrame.fromOrientation(cameraRot.x, cameraRot.y, 0)*CFrame.new(vel*NAV_GAIN*dt)
cameraPos = cameraCFrame.p
Camera.CFrame = cameraCFrame
Camera.Focus = cameraCFrame*CFrame.new(0, 0, -GetFocusDistance(cameraCFrame))
Camera.FieldOfView = cameraFov
end
local PlayerState = {} do
mouseBehavior = ""
mouseIconEnabled = ""
cameraType = ""
cameraFocus = ""
cameraCFrame = ""
cameraFieldOfView = ""
screenGuis = {}
function PlayerState.Push()
cameraFieldOfView = Camera.FieldOfView
Camera.FieldOfView = 70
cameraType = Camera.CameraType
Camera.CameraType = Enum.CameraType.Custom
cameraCFrame = Camera.CFrame
cameraFocus = Camera.Focus
mouseIconEnabled = UserInputService.MouseIconEnabled
UserInputService.MouseIconEnabled = true
mouseBehavior = UserInputService.MouseBehavior
UserInputService.MouseBehavior = Enum.MouseBehavior.Default
end
function PlayerState.Pop()
Camera.FieldOfView = 70
Camera.CameraType = cameraType
cameraType = nil
Camera.CFrame = cameraCFrame
cameraCFrame = nil
Camera.Focus = cameraFocus
cameraFocus = nil
UserInputService.MouseIconEnabled = mouseIconEnabled
mouseIconEnabled = nil
UserInputService.MouseBehavior = mouseBehavior
mouseBehavior = nil
end
end
function StartFreecam(p)
local cameraCFrame = Camera.CFrame
if p then
cameraCFrame = p
end
cameraRot = Vector2.new()
cameraPos = cameraCFrame.p
cameraFov = Camera.FieldOfView
velSpring:Reset(Vector3.new())
panSpring:Reset(Vector2.new())
fovSpring:Reset(0)
PlayerState.Push()
RunService:BindToRenderStep("Freecam", Enum.RenderPriority.Camera.Value, StepFreecam)
Input.StartCapture()
end
function StopFreecam()
Input.StopCapture()
RunService:UnbindFromRenderStep("Freecam")
PlayerState.Pop()
workspace.Camera.FieldOfView = 70
end
FreecamOn = false
function useCommand.freecam()
opx("-","Activated freecam")
StartFreecam()
wait(.1)
navSpeed = permfcspeed
FreecamOn = true
NAV_KEYBOARD_SPEED = Vector3.new(permfcspeed, permfcspeed, permfcspeed)
end
function useCommand.freecamspeed()
if cmdnum(arguments[2]) then
opx("-","Freecam speed set to "..arguments[2])
navSpeed = arguments[2]
NAV_KEYBOARD_SPEED = Vector3.new(arguments[2], arguments[2], arguments[2])
else
opx("*","2 arguments are required!")
end
end
function useCommand.permfreecamspeed()
if cmdnum(arguments[2]) then
opx("-","Set perm free cam speed")
permfcspeed = arguments[2]
updatesaves()
else
opx("*","2 arguments are required!")
end
end
function useCommand.unfreecam()
opx("-","De-Activated freecam")
StopFreecam()
FreecamOn = false
wait(1)
workspace.Camera.FieldOfView = 70
end
function useCommand.freecamgoto()
if FreecamOn then
if arguments[2] then
local target = findplr(arguments[2])
if target then
StopFreecam()
wait(.1)
opx("-","Teleported freecam to "..target.Name)
StartFreecam(target.Character.HumanoidRootPart.CFrame)
navSpeed = permfcspeed
NAV_KEYBOARD_SPEED = Vector3.new(permfcspeed, permfcspeed, permfcspeed)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required!")
end
else
opx("*","Freecam isnt running!")
end
end
function useCommand.freecamfreegoto()
if FreecamOn then
if arguments[4] then
StopFreecam()
wait(.1)
opx("-","Teleported freecam to pos")
StartFreecam(arguments[2],arguments[3],arguments[4])
navSpeed = permfcspeed
NAV_KEYBOARD_SPEED = Vector3.new(permfcspeed, permfcspeed, permfcspeed)
else
opx("*","2 arguments are required!")
end
else
opx("*","Freecam isnt running!")
end
end
function useCommand.freecamloadpos()
if FreecamOn then
if arguments[2] then
StopFreecam()
wait(.1)
wpNS = getstring(2)
for i,v in pairs(WPs) do
local xc = WPs[i].C[1]
local yc = WPs[i].C[2]
local zc = WPs[i].C[3]
if tostring(WPs[i].N) == tostring(wpNS) then
StartFreecam(xc,yc,zc)
navSpeed = permfcspeed
NAV_KEYBOARD_SPEED = Vector3.new(permfcspeed, permfcspeed, permfcspeed)
end
end
opx("Teleported to "..tostring(wpNS))
else
opx("*","2 arguments are needed for this command!")
end
else
opx("*","Freecam isnt running!")
end
end
function useCommand.freecamgotopart()
if FreecamOn then
if arguments[2] then
StopFreecam()
wait(.1)
opx("-","Teleported freecam to part")
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
StartFreecam(v.CFrame)
navSpeed = permfcspeed
NAV_KEYBOARD_SPEED = Vector3.new(permfcspeed, permfcspeed, permfcspeed)
break
end
end
else
opx("*","2 arguments are required!")
end
else
opx("*","Freecam isnt running!")
end
end
function useCommand.freecamgotoclass()
if FreecamOn then
if arguments[2] then
StopFreecam()
wait(.1)
opx("-","Teleported freecam to class")
for i,v in pairs(workspace:GetDescendants()) do
if v.ClassName == getstring(2) then
StartFreecam(v.CFrame)
navSpeed = permfcspeed
NAV_KEYBOARD_SPEED = Vector3.new(permfcspeed, permfcspeed, permfcspeed)
break
else
opx("*","Part does not exist")
end
end
else
opx("*","2 arguments are required!")
end
else
opx("*","Freecam isnt running!")
end
end
function useCommand.spotify()
opx("-","Spotify Premium is needed to run Spotify Presence")
loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/projetcs/spotifypresence"))()
end
function useCommand.friendjoin()
rejoining = true
if arguments[2] then
opx("-","Scanning friends, this may take some time")
local target = arguments[2]
local friends = cmdlp:GetFriendsOnline(200)
for i,v in pairs(friends) do
if v.UserName == target then
if v.LastLocation then
if syn.queue_on_teleport then
syn.queue_on_teleport('game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()')
end
opx("-","Joining friend")
game:GetService("TeleportService"):TeleportToPlaceInstance(v.PlaceId,v.GameId,cmdlp)
else
opx("*","Friend isnt in a game!")
end
break
end
end
opx("*","Friend dosent exist!")
else
opx("*","2 arguments are required!")
end
wait(3)
rejoining = false
end
function useCommand.hotkeynoclip()
if arguments[2] then
opx("-","Added key to noclip")
hotkeynoclip = arguments[2]
updatesaves()
else
opx("*","2 arguments are required!")
end
end
function useCommand.spoofos()
if arguments[2] then
opx("-","Spoofed OS to "..getstring(2))
cmdlp.OsPlatform = getstring(2)
else
opx("*","2 arguments are required!")
end
end
function useCommand.noshow()
if arguments[2] == "on" then
opx("-","No-Show is now on")
opx("-","Make sure to reset your character!")
sDetect = false
updatesaves()
elseif arguments[2] == "off" then
opx("-","No-Show is now off")
opx("-","Make sure to reset your character!")
sDetect = true
updatesaves()
else
opx("*","A valid preset is needed!")
end
end
function useCommand.players()
opx("Listed players in game")
xPlayers = #cmdp:GetPlayers().." | "
for i,v in pairs(cmdp:GetPlayers()) do
xPlayers = xPlayers..v.Name..", "
end
opxL("Players",xPlayers)
end
function useCommand.viewserver()
if not arguments[3] then
opx("*","3 arguments are required!")
return
end
local xPlayers = ""
local placeid,guid = arguments[2],arguments[3]
local serverFound = false
if arguments[2] == "this" then placeid = game.PlaceId end
local Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..placeid.."/servers/Public?sortOrder=Asc&limit=100&cursor="))
for i = 1,100 do
for i,v in pairs(Http.data) do
if v.id ~= guid then
serverFound = true
for x,y in pairs(v.playerIds) do
xPlayers = xPlayers..cmdp:GetNameFromUserIdAsync(y)..", "
end
break
end
if serverFound then break end
end
if serverFound then break end
if Http.nextPageCursor ~= null then Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..placeid.."/servers/Public?sortOrder=Asc&limit=100&cursor="..Http.nextPageCursor)) else break end
end
opx("-","Listed all players in "..guid)
opxL("Players "..guid,xPlayers)
end
function useCommand.servers()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
local placeid = arguments[2]
if arguments[2] == "this" then
placeid = game.PlaceId
end
local xServers = ""
local Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..placeid.."/servers/Public?sortOrder=Asc&limit=100&cursor="))
for i = 1,100 do
for i,v in pairs(Http.data) do
xServers = xServers..v.playing.."/"..v.maxPlayers.." {"..v.id.."}".."\n"
end
opx("-","Page searched...")
if Http.nextPageCursor then
Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..placeid.."/servers/Public?sortOrder=Asc&limit=100&cursor="..Http.nextPageCursor))
else
break
end
end
opx("-","Listed all servers")
opxL("Servers",xServers)
end
function useCommand.antikick()
opx("-","Anti-Kick enabled")
local ncallsa = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(...)
local args = {...}
if not checkcaller() and getnamecallmethod() == "Kick" then
return nil
end
return ncallsa(...)
end)
setreadonly(mt, true)
end
function useCommand.cmdinfo()
local cmdinfo = {}
if CMDS.commands[arguments[2]] then
cmdinfo.description = CMDS.commands[findCmd(arguments[2])]
cmdinfo.name = findCmd(arguments[2])
cmdinfo.usage = CMDS.usage[findCmd(arguments[2])]
elseif CMDS.aliases[arguments[2]] then
cmdinfo.description = CMDS.commands[CMDS.aliases[arguments[2]]]
cmdinfo.name = CMDS.aliases[arguments[2]]
cmdinfo.usage = CMDS.usage[CMDS.aliases[arguments[2]]]
end
if not cmdinfo.description or not cmdinfo.name then
opx("*","Invalid command "..arguments[2]..".")
return
end
if not cmdinfo.usage then
cmdinfo.usage = "()"
end
opxL("Command","."..cmdinfo.name.." | "..cmdinfo.usage.." "..cmdinfo.description)
end
function useCommand.sentinelexplorer()
opx("-","Loading SENTINEL DEX")
loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/others/sdex", true))()
opx("-","Loaded SENTINEL DEX")
end
Pxrts = {}
function useCommand.truesight()
opx("-","Truesight is now on")
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("BasePart") and v.Transparency == 1 then
v.Transparency = 0
Pxrts[#Pxrts+1] = v
end
end
end
LoopFling = false
function useCommand.loopfling()
if arguments[2] then
target = findplr(arguments[2])
if target then
while LoopFling do
arguments = {"fling",target.Name}
useCommand.fling()
repeat wait(.1) until target.Character ~= nil and target.Character:FindFirstChild('HumanoidRootPart')
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required!")
end
end
function useCommand.unloopfling()
opx("-","Stopped loop flinging")
LoopFling = false
end
function useCommand.nomouse()
opx("-","Mouse disabled, use ; to focus back on the CMDbar")
game:GetService("UserInputService").MouseIconEnabled = false
end
function useCommand.yesmouse()
opx("-","Mouse enabled")
game:GetService("UserInputService").MouseIconEnabled = true
end
function useCommand.untruesight()
opx("-","Truesight is now off")
for i,v in pairs(Pxrts) do
v.Transparency = 1
end
end
local PDisabled = {}
function useCommand.disableplayer()
if arguments[2] then
local target = findplr(arguments[2])
if target then
target.Character.Head.face.Transparency = 1
opx("-","Disabled "..target.Name)
PDisabled[#PDisabled+1] = target
local UserNum = #PDisabled
for i,v in pairs(target.Character:GetDescendants()) do
if v:IsA("BasePart") then
v.Transparency = 1
end
end
target.CharacterAdded:Connect(function(Character)
if PDisabled[UserNum] ~= nil then
for i,v in pairs(Character:GetDescendants()) do
if v:IsA("BasePart") then
v.Transparency = 1
end
end
end
end)
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required!")
end
end
function useCommand.enableplayer()
if arguments[2] then
local target = findplr(arguments[2])
if target then
target.Character.Head.face.Transparency = 0
opx("-","Enabled "..target.Name)
for i,v in pairs(target.Character:GetDescendants()) do
if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
v.Transparency = 0
end
end
for i,v in pairs(PDisabled) do
if target == PDisabled[i] then
table.remove(PDisabled,i)
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required!")
end
end
function useCommand.gotopart()
if arguments[2] then
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
opx("-","Teleported to part")
cmdlp.Character.Humanoid.Jump = true
cmdlp.Character.HumanoidRootPart.CFrame = v.CFrame
break
end
end
else
opx("*","2 arguments are required!")
end
end
function useCommand.clientbringpart()
if arguments[2] then
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
opx("-","Brought part")
v.CFrame = cmdlp.Character.HumanoidRootPart.CFrame
break
else
opx("*","Part does not exist")
end
end
else
opx("*","2 arguments are required!")
end
end
function useCommand.clientdeletepart()
if arguments[2] then
local broke = false
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
v:Destroy()
broke = true
break
end
end
if not broke then
opx("*","Part does not exist")
return
end
opx("-","Deleted part")
return
end
opx("*","2 arguments are required!")
end
function useCommand.copyoutput()
if cmdnum(arguments[3]) then
local start = arguments[2]
local breaker = arguments[3]
setclipboard(output1.Text:sub(start,breaker))
opx("-","Copied latest output")
else
setclipboard(output1.Text)
opx("-","Copied latest output")
end
end
function useCommand.copypath()
if arguments[2] then
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
opx("-","Copied path of part")
setclipboard(v:GetFullName())
break
else
opx("*","Part does not exist")
end
end
else
opx("*","2 arguments are required!")
end
end
function useCommand.outputbind()
if arguments[2] == "chat" then
ChatBind = true
updatesaves()
opx("-","Output switched to chat")
elseif arguments[2] == "default" then
ChatBind = false
updatesaves()
opx("-","Output switched to default")
else
opx("*","2 arguments are required!")
end
end
function useCommand.clearwaves()
opx("-","Made all waves clear")
workspace.Terrain.WaterReflectance = 0
workspace.Terrain.WaterTransparency = 1
workspace.Terrain.WaterColor = Color3.fromRGB(255,255,255)
end
function useCommand.calmwaves()
opx("-","Made all waves calm")
workspace.Terrain.WaterWaveSize = 0
workspace.Terrain.WaterWaveSpeed = 10
end
function useCommand.fov()
if cmdnum(arguments[2]) then
workspace.Camera.FieldOfView = arguments[2]
opx("-","Set field of view to "..arguments[2])
else
opx("*","2 arguments are required!")
end
end
function useCommand.volume()
if cmdnum(arguments[2]) then
opx("-","System Volume is now "..arguments[2])
UserSettings():GetService("UserGameSettings").MasterVolume = arguments[2]/100
else
opx("*","2 arguments are required!")
end
end
function useCommand.graphics()
if cmdnum(arguments[2]) then
opx("-","System Graphics is now "..arguments[2])
settings().Rendering.QualityLevel = arguments[2]
else
opx("*","2 arguments are required!")
end
end
function useCommand.mousesensitivity()
if cmdnum(arguments[2]) then
opx("-","Changed mouse sensitivity to "..arguments[2])
game:GetService("UserInputService").MouseDeltaSensitivity = arguments[2]
else
opx("*","2 arguments are required!")
end
end
function useCommand.animspeed()
if arguments[2] then
opx("-","Sped up animations")
for i,v in pairs(cmdlp.Character.Humanoid:GetPlayingAnimationTracks()) do
v:AdjustSpeed(arguments[2])
end
else
opx("-","2 arguments are required!")
end
end
NoPrompt = nil
function useCommand.noprompt()
opx("-","No prompt enabled")
NoPrompt = game:GetService("CoreGui").PurchasePromptApp.ProductPurchase.ChildAdded:Connect(function(v)
v:Destroy()
end)
end
function useCommand.yesprompt()
opx("-","No prompt disabled")
NoPrompt:Disconnect()
NoPrompt = nil
end
function useCommand.rappu()
if arguments[2] then
local target = findplr(arguments[2])
if target then
local URL = ("https://inventory.roblox.com/v1/users/"..target.UserId.."/assets/collectibles?sortOrder=Asc&limit=100")
local fuck = game:HttpGet(URL)
local Http = game:GetService("HttpService"):JSONDecode(fuck)
local RAP = 0
function ListItems(Look)
for i,v in pairs(Look.data) do
if v.recentAveragePrice ~= nil then
RAP = RAP+v.recentAveragePrice
end
end
end
ListItems(Http)
Pages = 1
for i = 1,500 do
if Http.nextPageCursor ~= null then
local fuck = game:HttpGet(URL.."&cursor="..Http.nextPageCursor)
Http = game:GetService("HttpService"):JSONDecode(fuck)
ListItems(Http)
Pages = Pages+1
else
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(target.Name.." has "..RAP.."RAP, "..Pages.."pgs checked","All")
opx("-",target.Name.." has "..RAP.."RAP, "..Pages.."pgs checked")
break
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required!")
end
end
function useCommand.rappr()
if arguments[2] then
local target = findplr(arguments[2])
if target then
local URL = ("https://inventory.roblox.com/v1/users/"..target.UserId.."/assets/collectibles?sortOrder=Asc&limit=100")
local fuck = game:HttpGet(URL)
local Http = game:GetService("HttpService"):JSONDecode(fuck)
local RAP = 0
function ListItems(Look)
for i,v in pairs(Look.data) do
if v.recentAveragePrice ~= nil then
RAP = RAP+v.recentAveragePrice
end
end
end
ListItems(Http)
Pages = 1
for i = 1,500 do
if Http.nextPageCursor ~= null then
local fuck = game:HttpGet(URL.."&cursor="..Http.nextPageCursor)
Http = game:GetService("HttpService"):JSONDecode(fuck)
ListItems(Http)
Pages = Pages+1
else
opx("-",target.Name.." has "..RAP.."RAP, "..Pages.."pgs checked")
break
end
end
else
opx("*","Player does not exist!")
end
else
opx("*","2 arguments are required!")
end
end
-- CTRL+F
PGUI = {}
function useCommand.noguis()
opx("-","No guis enabled")
for i,v in pairs(cmdlp.PlayerGui:GetDescendants()) do
if v:IsA("Frame") and v.Visible == true then
v.Visible = false
PGUI[#PGUI+1] = v
end
end
end
function useCommand.yesguis()
opx("-","No guis disabled")
for i,v in pairs(PGUI) do
v.Visible = true
end
end
GTS = {}
function useCommand.guitruesight()
opx("-","Gui truesight enabled")
for i,v in pairs(cmdlp.PlayerGui:GetDescendants()) do
if v:IsA("Frame") and v.Visible == false then
v.Visible = true
GTS[#GTS+1] = v
end
end
end
function useCommand.unguitruesight()
opx("-","Gui truesight disabled")
for i,v in pairs(GTS) do
v.Visible = false
end
end
BGs = {}
function useCommand.nobillboardguis()
opx("-","Turned off all billboardguis")
YesBgs = true
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("BillboardGui") or v:IsA("SurfaceGui") then
v.Enabled = false
BGs[#BGs+1] = v
end
end
end
function useCommand.yesbillboardguis()
opx("-","Turned on all billboardguis")
for i,v in pairs(BGs) do
v.Enabled = true
end
end
function useCommand.grippos()
if not cmdnum(arguments[4]) then
opx("*","4 arguments are required!")
return
end
local tool = cmdlp.Character:FindFirstChildOfClass("Tool")
tool.Parent = cmdlp.Backpack
tool.GripPos = Vector3.new(arguments[2],arguments[3],arguments[4])
tool.Parent = cmdlp.Character
opx("-","Set GripPos")
end
SWs = false
function useCommand.shiftwalkspeed()
if cmdnum(arguments[2]) then
opx("-","Shift walkspeed enabled")
SWs = true
cmduis.InputBegan:Connect(function(input)
if SWs == true and cmduis:IsKeyDown(Enum.KeyCode.LeftShift) then
cmdlp.Character.Humanoid.WalkSpeed = arguments[2]
end
end)
cmdm.KeyUp:connect(function(key)
if SWs == true and key == "0" then
cmdlp.Character.Humanoid.WalkSpeed = 16
end
end)
else
opx("-","Shift walkspeed enabled")
SWs = true
cmduis.InputBegan:Connect(function(input)
if SWs == true and cmduis:IsKeyDown(Enum.KeyCode.LeftShift) then
cmdlp.Character.Humanoid.WalkSpeed = permwalkspeed
end
end)
cmdm.KeyUp:connect(function(key)
if SWs == true and key == "0" then
cmdlp.Character.Humanoid.WalkSpeed = 16
end
end)
end
end
function useCommand.unshiftwalkspeed()
opx("-","Shift walkspeed disabled")
SWs = false
cmdlp.Character.Humanoid.WalkSpeed = 16
end
function useCommand.noresult()
output1.Text = output2.Text
output2.Text = output3.Text
output3.Text = output4.Text
output4.Text = output5.Text
output5.Text = output6.Text
output6.Text = output7.Text
output7.Text = output8.Text
output8.Text = output9.Text
end
local bAe = Instance.new("Animation")
bAe.AnimationId = "rbxassetid://259438880"
local cAe = Instance.new("Animation")
cAe.AnimationId = "rbxassetid://181526230"
local dAe = Instance.new("Animation")
dAe.AnimationId = "rbxassetid://33796059"
function useCommand.retard()
if arguments[2] == "1" then
if btAe then btAe:Stop() end
if ctAe then ctAe:Stop() end
if dtAe then dtAe:Stop() end
btAe = cmdlp.Character.Humanoid:LoadAnimation(bAe)
btAe:Play(.1, 1, 1e3)
elseif arguments[2] == "2" then
if btAe then btAe:Stop() end
if ctAe then ctAe:Stop() end
if dtAe then dtAe:Stop() end
ctAe = cmdlp.Character.Humanoid:LoadAnimation(cAe)
ctAe:Play(.1, 1, 1)
dtAe = cmdlp.Character.Humanoid:LoadAnimation(dAe)
dtAe:Play(.1, 1, 1e8)
else
if btAe then btAe:Stop() end
if ctAe then ctAe:Stop() end
if dtAe then dtAe:Stop() end
btAe = cmdlp.Character.Humanoid:LoadAnimation(bAe)
btAe:Play(.1, 1, 1e3)
useCommand.spin()
end
opx("-","Now being a retard")
end
function useCommand.unretard()
if btAe then btAe:Stop() useCommand.unspin() end
if ctAe then ctAe:Stop() end
if dtAe then dtAe:Stop() end
opx("-","Stopped being a retard")
end
xAnchored = {}
xOrig = {}
function grabUnanchored(Model)
for i,part in pairs(Model:GetDescendants()) do
if part:IsA("BasePart" or "UnionOperation" or "Model") and part.Anchored == false and part:IsDescendantOf(cmdlp.Character) == false then
part.Massless = true
part.CanCollide = false
if part:FindFirstChildOfClass("BodyPosition") == nil then
local mover = Instance.new("BodyPosition", part)
table.insert(xAnchored, mover)
xOrig[#xOrig+1] = {pos = mover.Position, par = mover}
mover.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
else
part.BodyPosition:Destroy()
local mover = Instance.new("BodyPosition", part)
table.insert(xAnchored, mover)
xOrig[#xOrig+1] = {pos = mover.Position, par = mover}
mover.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
end
end
end
end
IHaveSimmed = false
function useCommand.simulationradius()
sethiddenproperty = sethiddenproperty or set_hidden_prop
setsimulationradius = setsimulationradius or set_simulation_radius
if not sethiddenproperty then
opx("*","sethiddenproperty is not supported on your executor!")
return
end
IHaveSimmed = true
if setsimulationradius then
setsimulationradius(1e308,1/0)
else
sethiddenproperty(cmdlp,"MaximumSimulationRadius",1/0)
sethiddenproperty(cmdlp,"SimulationRadius",1e308)
end
end
IHaveGrabbed = false
function useCommand.grabunanchored()
if not IHaveSimmed then
opx("*",".simulationradius is required!")
return
end
IHaveGrabbed = true
if arguments[2] then
opx("-","Updated anchored parts list from "..arguments[2])
for i,v in pairs(worksapce:GetDescendants()) do
if v.Name == arguments[2] then
UnanchoredPart = v.Name
break
end
end
grabUnanchored(UnanchoredPart)
else
opx("-","Updated anchored parts list from workspace")
grabUnanchored(workspace)
end
end
lookingAt = false
function useCommand.lookat()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
opx("-","Now looking at "..target.Name)
lookingAt = true
repeat game:GetService("RunService").Heartbeat:Wait()
cmdlp.Character.HumanoidRootPart.CFrame = CFrame.new(cmdlp.Character.HumanoidRootPart.Position, target.Character.HumanoidRootPart.Position)
until lookingAt == false
end
function useCommand.unlookat()
opx("-","Stopped looking at")
lookingAt = false
end
function useCommand.setbackunanchored()
if not IHaveGrabbed then
opx("*",".grabunanchored is required!")
return
end
opx("-","Set back unanchored parts")
for i,v in pairs(xOrig) do
if xAnchored[i] ~= nil then
xOrig[i].par.Position = target.Character:FindFirstChild("HumanoidRootPart").CFrame:PointToWorldSpace(xOrig[i].pos)
end
end
end
function useCommand.clearunanchored()
xAnchored = {}
opx("-","Cleared unanchored parts list")
end
function useCommand.bringunanchored()
if not IHaveGrabbed then
opx("*",".grabunanchored is required!")
return
end
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
opx("-","Brung unanchored parts")
for i,v in pairs(xAnchored) do
if xAnchored[i] ~= nil then
xAnchored[i].Position = target.Character:FindFirstChild("HumanoidRootPart").CFrame:PointToWorldSpace(Vector3.new(gotoPosSide,gotoPosHead,gotoPos))
end
end
end
function useCommand.removeunanchored()
if not IHaveGrabbed then
opx("*",".grabunanchored is required!")
return
end
opx("-","Removed unanchored parts")
for i,v in pairs(xAnchored) do
if xAnchored[i] ~= nil then
xAnchored[i].Position = target.Character:FindFirstChild("HumanoidRootPart").CFrame:PointToWorldSpace(Vector3.new(0,-500,0))
end
end
end
local fullCircle = 2 * math.pi
local radius = 10
function getXAndZPositions(angle)
local x = math.cos(angle) * radius
local z = math.sin(angle) * radius
return x, z
end
ActUp = {}
SpinningFor = false
function useCommand.spinunanchored()
if not IHaveGrabbed then
opx("*",".grabunanchored is required!")
return
end
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
ActUp = {}
opx("-","Spinning unanchored parts")
SpinningFor = true
iffy = arguments[2]
normspin = 0
function RotatePointAtDist(Point, Angle, Dist)
local Rotation = CFrame.Angles(0, math.rad(Angle),0)
return (CFrame.new(Point) * Rotation * CFrame.new(0,0,Dist)).Position
end
for i,v in pairs(xAnchored) do
normspin = normspin + 30
xAnchored[i].Position = RotatePointAtDist(cmdlp.Character.HumanoidRootPart.Position, normspin, iffy)
ActUp[#ActUp+1] = normspin
end
game:GetService("RunService").RenderStepped:Connect(function()
if SpinningFor == true then
for i,v in pairs(xAnchored) do
xAnchored[i].Position = RotatePointAtDist(cmdlp.Character.HumanoidRootPart.Position, ActUp[i]-.1, iffy)
ActUp[i] = ActUp[i]-.1
end
end
end)
end
function useCommand.unspinunanchored()
opx("-","Stopped spinning unanchored parts")
SpinningFor = false
end
function useCommand.animationsteal()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
if not cmd15(cmdlp) then
opx("*","R15 is required!")
return
end
local target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
if not cmd15(target) then
opx("*",target..", R15 is required!")
return
end
if target.Character:FindFirstChild("Animate") then
if cmdlp.Character:FindFirstChild("Animate") then
checkifmyanim = cmdlp.Character:FindFirstChild("animstorage")
if checkifmyanim then
local z = cmdlp.Character:FindFirstChild("Animate")
if z then z:Destroy() end
checkifmyanim.Name = "Animate"
checkifmyanim.Disabled = false
end
end
local z = cmdlp.Character:FindFirstChild("Animate")
if z then
z.Name = "animstorage"
z.Disabled = true
end
local newanim = target.Character.Animate:Clone()
newanim.Parent = cmdlp.Character
newanim.Name = "Animate"
opx("-","Stole "..target.Name.."'s animations")
else
opx("*","Target is missing proper animations.")
end
end
function useCommand.unanimationsteal()
if not cmd15(cmdlp) then
opx("*","R15 is required!")
return
end
if cmdlp.Character:FindFirstChild("animstorage") then
if cmdlp.Character:FindFirstChild("Animate") then
cmdlp.Character:FindFirstChild("Animate"):Destroy()
end
local as = cmdlp.Character:FindFirstChild("animstorage")
as.Name = "Animate"
as.Disabled = false
opx("-","Animations reverted to normal.")
else
opx("*","Animations haven't been stolen!")
end
end
function useCommand.nohurtoverlay()
opx("-","Turned off hurt overlay")
hurtOverlay = true
game:GetService("CoreGui").TopBar.FullScreenFrame.HurtOverlay:GetPropertyChangedSignal("Visible"):Connect(function()
if hurtOverlay == true then
game:GetService("CoreGui").TopBar.FullScreenFrame.HurtOverlay.Visible = false
end
end)
end
function useCommand.yeshurtoverlay()
opx("-","Turned on hurt overlay")
hurtOverlay = false
end
function useCommand.atmosphere()
if arguments[2] then
opx("-","Set Atmosphere to "..arguments[2])
local atmsky = Instance.new("Sky",cmdl)
local atm = Instance.new("Atmosphere",cmdl)
atm.Density = arguments[2]
else
opx("-","Set Atmosphere to 1")
local atmsky = Instance.new("Sky",cmdl)
local atm = Instance.new("Atmosphere",cmdl)
atm.Density = 1
end
end
function useCommand.unatmosphere()
opx("-","Removed atmosphere")
local atm = cmdl.Atmosphere
atm:Destroy()
end
function useCommand.removefx()
opx("-","Removed FX")
for i,v in pairs(cmdl:GetDescendants()) do
if v:IsA("Atmosphere") or v:IsA("SunRaysEffect") or v:IsA("BloomEffect") or v:IsA("BlurEffect") then
v:Destroy()
end
end
end
Chaos = false
function useCommand.chaos()
local chaosspeed = arguments[2]
Chaos = true
opx("-","Chaos mode is now on")
while Chaos do
local x = 1
local outputx = math.random(1,600)
for i,_ in pairs(CMDS.commands) do
x = x + 1
if x == outputx then
if i ~= "exit" and i ~= "rejoin" and i ~= "rejoindiff" and i ~= "fuckoff" and i ~= "quickexit" then
if i:sub(1,2) ~= "un" and i:sub(1,3) ~= "yes" then
arguments = i:split(" ")
opx("-",i.." use .? (cmd) for more info")
pcall(function() useCommand[i]() end)
end
end
end
end
wait(chaosspeed)
end
end
function useCommand.unchaos()
opx("-","Chaos mode is now off")
Chaos = false
end
function useCommand.gotofreecam()
opx("-","Teleported to freecam")
cmdlp.Character.HumanoidRootPart.CFrame = workspace.Camera.CFrame
end
function useCommand.compilecommand()
local argSplit = arguments[2]:split("/")
local xCMD = 'CMDN[#CMDN+1] = {N = '
xCMD = xCMD..'"'..argSplit[1]..'", A = {'
if argSplit[2] == "nil" then
xCMD = xCMD..'""}, CMD = "'
else
table.remove(argSplit,1)
for i,v in pairs(argSplit) do
if i ~= #argSplit then
xCMD = xCMD..'"'..argSplit[i]..'",'
else
xCMD = xCMD..'"'..argSplit[i]..'"}, CMD = "'
end
end
end
local argSplit2 = arguments[2]:split("/")
if argSplit2[2] == "nil" then table.remove(argSplit2,2) end
xCMD = xCMD..#CMDN+1 ..','
for i,v in pairs(argSplit2) do
if i ~= #argSplit2 then
xCMD = xCMD..argSplit2[i]..'/'
else
xCMD = xCMD..argSplit2[i]..','
end
end
xCMD = xCMD..'('..arguments[3]..'),'
xCMD = xCMD..getstring(4)..'"}'
setclipboard(xCMD)
opx("-","Compiled command to your clipboard.")
end
function useCommand.noclaim()
opx("-","Turned on noclaim")
DHSaved = workspace.FallenPartsDestroyHeight
workspace.FallenPartsDestroyHeight = math.huge - math.huge
end
function useCommand.yesclaim()
opx("-","Turned off noclaim")
workspace.FallenPartsDestroyHeight = DHSaved
end
function useCommand.destroyheight()
if not cmdnum(arguments[2]) then
opx("*","2 arguments are required!")
return
end
opx("-","Set destroyheight to "..arguments[2])
workspace.FallenPartsDestroyHeight = arguments[2]
end
TrackN = false
function CreateN(xPlayer, xHead)
local ESP = Instance.new("BillboardGui", cmdlp.PlayerGui)
local ESPSquare = Instance.new("Frame", ESP)
local ESPText = Instance.new("TextLabel", ESP)
ESP.Name = "ESPN"..xPlayer.Name
ESP.Adornee = xHead
ESP.AlwaysOnTop = true
ESP.ExtentsOffset = Vector3.new(0, 1, 0)
ESP.Size = UDim2.new(0, 5, 0, 5)
ESPText.Name = "NAME"
ESPText.BackgroundColor3 = Color3.new(255, 255, 255)
ESPText.BackgroundTransparency = 1
ESPText.BorderSizePixel = 0
ESPText.Position = UDim2.new(0, 0, 0, -40)
ESPText.Size = UDim2.new(1, 0, 10, 0)
ESPText.Visible = true
ESPText.ZIndex = 10
ESPText.Font = Enum.Font.SourceSansSemibold
ESPText.TextStrokeTransparency = 0.6
ESPText.TextSize = 20
ESPText.Text = xPlayer.Name
ESPText.TextColor = xPlayer.TeamColor
end
function ClearN()
for _,v in pairs(cmdlp.PlayerGui:GetChildren()) do
if v.Name:sub(1,4) == "ESPN" and v:IsA("BillboardGui") then
v:Destroy()
end
end
end
function FindN()
ClearN()
TrackN = true
while wait() do
if TrackN then
ClearN()
for i,v in pairs(cmdp:GetPlayers()) do
if v ~= cmdlp then
if v.Character and v.Character:FindFirstChild("Head") then
CreateN(v, v.Character.Head, true)
end
end
end
end
wait(1)
end
end
local ESPNEnabled = false
function useCommand.nameesp()
opx("-","Name ESP Enabled")
FindN()
ESPNEnabled = true
repeat
wait()
if ESPNEnabled == true then
FindN()
end
until ESPNEnabled == false
end
function useCommand.unnameesp()
opx("-","Name ESP Disabled")
ESPNEnabled = false
TrackN = false
for i = 1,10 do
ClearN()
wait()
end
end
function useCommand.spectatepart()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == getstring(2) then
opx("-","Now viewing part")
workspace.CurrentCamera.CameraSubject = v
break
end
end
end
function useCommand.rejoinexecute()
if not syn.queue_on_teleport then
opx("*","queue_on_teleport is not supported on your executor!")
end
rejoining = true
syn.queue_on_teleport([[
game:GetService('ReplicatedFirst'):RemoveDefaultLoadingScreen()
repeat wait(.1) until game:GetService('Players').LocalPlayer
loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/Source", true))()
]])
opx("-","Rejoining game")
game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, game.JobId, cmdp)
wait(3)
rejoining = false
end
function useCommand.newaudios()
local URL = ("https://search.roblox.com/catalog/json?CatalogContext=2&Category=9&SortType=3&IncludeNotForSale=true&ResultsPerPage=")
if not arguments[2] then arguments[2] = "10" end
local fuck = game:HttpGet(URL..arguments[2])
local Http = game:GetService("HttpService"):JSONDecode(fuck)
xIds = ""
for i,v in pairs(Http) do
xIds = xIds..v.AssetId.."\n"
end
opxL("Newest-IDs",xIds)
opx("Listed new audios")
end
function useCommand.randomcmd()
local x = 1
local outputx = math.random(1,600)
for i,_ in pairs(CMDS.commands) do
x = x + 1
if x == outputx then
if i ~= "exit" and i ~= "rejoin" and i ~= "rejoindiff" and i ~= "fuckoff" and i ~= "quickexit" then
if i:sub(1,2) ~= "un" and i:sub(1,3) ~= "yes" then
arguments = i:split(" ")
opx("-",i.." use .? (cmd) for more info")
pcall(function() useCommand[i]() end)
end
end
end
end
end
function useCommand.replayintro()
opx("-","Replaying intro")
local Sound2 = Instance.new("Sound",game:GetService("Lighting"))
Sound2.SoundId = "http://www.roblox.com/asset/?id="..5032588119
Sound2:Play()
wait(2.638)
Sound2:Destroy()
end
function useCommand.masscmd()
opx("-","Executing CMDs")
table.remove(arguments,1)
for i,v in pairs(arguments) do
useCommand[arguments[i]]()
end
end
function useCommand.mass()
opx("-","Executing player command in mass")
FinalCMD = findCmd(arguments[2])
for i,v in pairs(cmdp:GetPlayers()) do
arguments = FinalCMD.." "..v.Name
arguments = arguments:split(" ")
useCommand[FinalCMD]()
end
end
function FindPart(Name)
for i,v in pairs(workspace:GetDescendants()) do
if v.Name == Name then
return v
end
end
end
function useCommand.touchinterests()
opx("-","Fired touch interests")
if arguments[2] then
local Part = FindPart(arguments[2])
for i,v in pairs(Part:GetDescendants()) do
if v:IsA("TouchInterest") then
v.Parent.CFrame = cmdlp.Character.HumanoidRootPart.CFrame
end
end
else
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("TouchInterest") then
v.Parent.CFrame = cmdlp.Character.HumanoidRootPart.CFrame
end
end
end
end
function useCommand.singletouchinterest()
opx("-","Fired touch interest")
local touch = FindPart(arguments[2])
touch.Parent.CFrame = cmdlp.Character.HumanoidRootPart.CFrame
end
bgMd = {}
function useCommand.billboardmaxdistance()
opx("-","All billboards now have max distance")
for _,v in pairs(workspace:GetDescendants()) do
if v:IsA("BillboardGui") then
table.insert(bgMd,{p = v, m = v.MaxDistance, a = v.AlwaysOnTop})
v.MaxDistance = inf
v.AlwaysOnTop = true
end
end
end
function useCommand.unbillboardmaxdistance()
opx("-","All billboards no longer have max distance")
for _,v in pairs(bgMd) do
v.p.MaxDistance = m
v.p.AlwaysOnTop = a
end
end
bgTs = {}
function useCommand.billboardtruesight()
opx("-","All billboards now showing")
for _,v in pairs(workspace:GetDescendants()) do
if v:IsA("BillboardGui") then
table.insert(bgTs,v)
v.Enabled = true
end
end
end
function useCommand.unbillboardtruesight()
opx("-","All billboards no longer showing")
for _,v in pairs(bgTs) do
v.Enabled = false
end
end
sgTs = {}
function useCommand.surfaceguitruesight()
opx("-","All surface guis now showing")
for _,v in pairs(workspace:GetDescendants()) do
if v:IsA("SurfaceGui") then
table.insert(sgTs,v)
v.Enabled = true
end
end
end
function useCommand.unsurfaceguitruesight()
opx("-","All surface guis no longer showing")
for _,v in pairs(sgTs) do
v.Enabled = false
end
end
cdMd = {}
function useCommand.clickdetectormaxdistance()
opx("-","All click detectors now have max distance")
for _,v in pairs(workspace:GetDescendants()) do
if v:IsA("ClickDetector") then
table.insert(cdMd,{p = v, m = v.MaxActivationDistance})
v.MaxActivationDistance = 10000
end
end
end
function useCommand.unclickdetectormaxdistance()
opx("-","All click detectors no longer have max distance")
for _,v in pairs(cdMd) do
v.p.MaxActivationDistance = m
end
end
function useCommand.clickdetectors()
if not fireclickdetector then
opx("*","fireclickdetector is not supported on your executor!")
return
end
opx("-","Fired click detectors")
if arguments[2] then
local Part = FindPart(arguments[2])
for i,v in pairs(Part:GetDescendants()) do
if v:IsA("ClickDetector") then
fireclickdetector(v)
end
end
else
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("ClickDetector") then
fireclickdetector(v)
end
end
end
end
function useCommand.outofbody()
if not cmd15(cmdlp) then
opx("*","R15 is required!")
return
end
cmdlp.Character.LowerTorso.Anchored = true
cmdlp.Character.LowerTorso.Root:Destroy()
opx("-","You are now out of your body")
end
function useCommand.norotate()
cmdlp.Character.Humanoid.AutoRotate = false
opx("-","You will no longer rotate")
end
function useCommand.yesrotate()
cmdlp.Character.Humanoid.AutoRotate = true
opx("-","You will now rotate")
end
function useCommand.cameraoffset()
if not arguments[4] then
opx("*","4 arguments are needed!")
return
end
cmdlp.Character.Humanoid.CameraOffset = Vector3.new(arguments[2],arguments[3],arguments[4])
opx("-","Set camera offset to "..arguments[2].." "..arguments[3].." "..arguments[4])
end
function useCommand.singleclickdetector()
if not fireclickdetector then
opx("*","fireclickdetector is not supported on your executor!")
return
end
opx("-","Fired click detector")
local touch = FindPart(arguments[2])
fireclickdetector(touch)
end
function useCommand.gotoclass()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
opx("-","Teleported to class part")
local Part
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA(arguments[2]) then Part = v; break end
end
cmdlp.Character.HumanoidRootPart.CFrame = Part.CFrame
end
function useCommand.gotobpclass()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
for i,v in pairs(workspace:GetDescendants()) do
if v.ClassName == getstring(2) then
opx("-","Bypass Teleported to part")
cmdlp.Character.Humanoid.Jump = true
game:GetService("TweenService"):Create(cmdlp.Character.HumanoidRootPart, TweenInfo.new(1, Enum.EasingStyle.Linear), {CFrame = v.CFrame}):Play()
break
end
end
end
--[[HATGIVE = false
function useCommand.hatgiverspam()
opx("-","Now spamming hat givers")
local HATS = {}
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("TouchTransmitter") and v.Parent.Name ~= "Handle" then
local Check1, Check2 = v.Parent:FindFirstChildOfClass("SpecialMesh"), v.Parent:FindFirstChildOfClass("Script")
if Check1 ~= nil and Check2 ~= nil then
HATS[#HATS+1] = v.Parent
end
end
end
local HRP = cmdlp.Character.HumanoidRootPart
HATGIVE = true
local Number = 0
repeat game:GetService("RunService").RenderStepped:Wait()
for i,v in pairs(HATS) do
if firetouchinterest then
firetouchinterest(HRP, HATS[i], 1)
HATS[i].CFrame = HRP.CFrame
HATS[i].CanCollide = false
HATS[i].Transparency = 1
else
HATS[i].CFrame = HRP.CFrame
HATS[i].CanCollide = false
HATS[i].Transparency = 1
end
end
for i,v in pairs(cmdlp.Character:GetChildren()) do
if v:IsA("Hat" or "Accessory") then
v.Parent = workspace
Number = Number+1
end
end
until HATGIVE == false
end
function useCommand.unhatgiverspam()
HATGIVE = false
opx("-","No longer spamming hat givers")
end]]
function useCommand.playingaudios()
opx("-","Showing playing audios")
xaudios = ""
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("Sound") and v.Playing then
xaudios = xaudios..v.SoundId.."\n"
end
end
opxL("Audios Playing",xaudios)
end
local notouchTouches = {}
function useCommand.notouch()
opx("-","Disabled all touchinterests")
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA("TouchTransmitter") then
table.insert(notouchTouches, {part = v.Parent, pare = v.Parent.Parent})
v.Parent.Parent = game:GetService("PolicyService")
end
end
end
function useCommand.yestouch()
opx("-","Enabled all touchinterests")
for i,v in pairs(notouchTouches) do
v.part.Parent = v.pare
table.remove(notuchTouches, i)
end
end
function useCommand.testaudio()
if not cmdnum(arguments[2]) then
opx("*","2 arguments are required!")
return
end
opx("-","Now testing audio")
local Sound2 = Instance.new("Sound",game:GetService("Lighting"))
Sound2.SoundId = "http://www.roblox.com/asset/?id="..arguments[2]
Sound2:Play()
end
function useCommand.debugging()
if arguments[2] == "on" then
Debugging = true
opx("-","Debugging turned on")
elseif arguments[2] == "off" then
Debugging = false
opx("-","Debugging turned off")
else
opx("*","2 arguments are required!")
end
end
function useCommand.freereach()
if not cmdnum(arguments[4]) then
opx("*","4 arguments are required!")
return
end
for i,v in pairs(cmdlp.Character:GetDescendants()) do
if v:IsA("Tool") then
currentToolSize = v.Handle.Size
local a = Instance.new("SelectionBox",v.Handle)
a.Name = "SelectionBoxCreated"
a.Adornee = v.Handle
a.Color3 = Color3.new(255, 255, 255)
a.LineThickness = 0.01
v.Handle.Massless = true
v.Handle.Size = Vector3.new(arguments[2],arguments[3],arguments[4])
v.GripPos = Vector3.new(0,0,0)
v.Parent = cmdlp.Backpack
v.Parent = cmdlp.Character
end
end
opx("-","Reach set")
end
function useCommand.robloxqtversion()
opx("-",game:HttpGet("http://setup.roblox.com/versionQTStudio"))
end
function useCommand.robloxfromdiscordid()
if not cmdnum(arguments[2]) then
opx("*","2 arguments are required!")
return
end
pcall(function()
local URL = ("https://verify.eryn.io/api/user/"..arguments[2])
local Http = game:GetService("HttpService"):JSONDecode(game:HttpGet(URL))
opx("-","Rover user: "..cmdp:GetNameFromUserIdAsync(Http.robloxId))
end)
pcall(function()
local URL = ("https://api.blox.link/v1/user/"..arguments[2])
local Http = game:GetService("HttpService"):JSONDecode(game:HttpGet(URL))
opx("-","Bloxlink user: "..cmdp:GetNameFromUserIdAsync(Http.primaryAccount))
end)
end
function useCommand.teleportstring()
if arguments[2] == "cb" or "copy" then
opx("-","game:GetService('TeleportService'):TeleportToPlaceInstance("..game.PlaceId..",'"..game.JobId.."',game:GetService('Players').LocalPlayer)")
setclipboard("game:GetService('TeleportService'):TeleportToPlaceInstance("..game.PlaceId..",'"..game.JobId.."',game:GetService('Players').LocalPlayer)")
else
opx("-","game:GetService('TeleportService'):TeleportToPlaceInstance("..game.PlaceId..",'"..game.JobId.."',game:GetService('Players').LocalPlayer)")
end
end
function CheckBadges(UserId)
local TopBadge = "1"
local Badges = {}
local URL = ("https://badges.roblox.com/v1/users/"..UserId.."/badges?limit=100&sortOrder=Asc")
local Http = game:GetService("HttpService"):JSONDecode(game:HttpGet(URL))
local RAP = 0
function ListItems(Look)
for i,v in pairs(Look.data) do
if v.id ~= nil then Badges[#Badges+1] = v.id end
end
end
opx("-","Checking badges page 0")
ListItems(Http)
for i = 1,5000 do
opx("-","Checking badges page "..i)
if NoLongerLooking == true then break end
if Http.nextPageCursor ~= null then
Http = game:GetService("HttpService"):JSONDecode(game:HttpGet(URL.."&cursor="..Http.nextPageCursor))
ListItems(Http)
else
TopBadge = Badges[#Badges]
break
end
end
if TopBadge ~= "1" then return TopBadge else return "sorry" end
end
local Online = true
function CheckOnlineStatus(UserId)
Online = true
pcall(function()
Http2 = game:GetService("HttpService"):JSONDecode(game:HttpGet("http://api.roblox.com/users/"..UserId.."/onlinestatus"))
if Http2.IsOnline == true then Online = "true" else Online = "false" end
end)
return Online
end
local NoLongerLooking = true
function useCommand.badgesnipe()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
local UserStr = arguments[2]
local User = cmdp:GetUserIdFromNameAsync(arguments[2])
NoLongerLooking = false
if CheckOnlineStatus(User) ~= "true" then
opx("*","User is not online?")
return
end
local i = 0
repeat i = i + 1
if CheckOnlineStatus(User) ~= "true" then
opx("*","User is no longer online.")
NoLongerLooking = true
break
end
if NoLongerLooking == true then break end
pcall(function()
opx("-","Re-running badge check...")
CurrentBadger = CheckBadges(User)
if CurrentBadger ~= "sorry" then
if CurrentBadge ~= CurrentBadger then
opx("-","New badge detected on profile, searching linked game...")
pcall(function() HttpBadge = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://badges.roblox.com/v1/badges/"..CurrentBadger)) end)
opx("-",HttpBadge.awardingUniverse.rootPlaceId)
local PlaceId = HttpBadge.awardingUniverse.rootPlaceId
arguments = {"",UserStr,PlaceId}
useCommand.streamsnipe()
end
CurrentBadge = CurrentBadger
end
end)
wait(5)
until NoLongerLooking
end
function useCommand.copyoutputlarger()
if cmdnum(arguments[3]) then
local start = arguments[2]
local breaker = arguments[3]
setclipboard(opxScrolling.Text:sub(start,breaker))
opx("-","Copied latest output larger")
else
setclipboard(opxScrolling.Text)
opx("-","Copied latest output larger")
end
end
function useCommand.unfriend()
if arguments[2] == "all" then
opx("-","Removed friendship from everyone")
for i,v in pairs(cmdp:GetPlayers()) do
cmdlp:RevokeFriendship(v)
end
else
target = findplr(arguments[2])
if target then
opx("-","Removed friendship from "..target.Name)
cmdlp:RevokeFriendship(target)
else
opx("*","Player does not exist!")
end
end
end
function useCommand.cutforceplayloop()
fpall = false
opx("-","Stopped forceplay loop")
end
function useCommand.rejoinrefresh()
if not syn.queue_on_teleport then
opx("*","queue_on_teleport is not supported on your executor!")
end
rejoining = true
local c = cmdlp.Character.HumanoidRootPart.CFrame
syn.queue_on_teleport(string.format([[
game:GetService('ReplicatedFirst'):RemoveDefaultLoadingScreen()
local playeradded, charadded
playeradded = game:GetService('Players').PlayerAdded:Connect(function(plr)
charadded = plr.CharacterAdded:Connect(function(char)
char:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(%f, %f, %f)
charadded:Disconnect()
end)
playeradded:Disconnect()
end)
]], c.X, c.Y, c.Z))
opx("-","Rejoining game")
game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, game.JobId, cmdp)
wait(3)
rejoining = false
end
function useCommand.rejoinrefreshexecute()
if not syn.queue_on_teleport then
opx("*","queue_on_teleport is not supported on your executor!")
end
rejoining = true
local c = cmdlp.Character.HumanoidRootPart.CFrame
syn.queue_on_teleport(string.format([[
game:GetService('ReplicatedFirst'):RemoveDefaultLoadingScreen()
local playeradded, charadded
playeradded = game:GetService('Players').PlayerAdded:Connect(function(plr)
charadded = plr.CharacterAdded:Connect(function(char)
char:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(%f, %f, %f)
charadded:Disconnect()
end)
playeradded:Disconnect()
end)
loadstring(game:HttpGet("https://raw.githubusercontent.com/CMD-X/CMD-X/master/Source", true))()
]], c.X, c.Y, c.Z))
opx("-","Rejoining game")
game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, game.JobId, cmdp)
wait(3)
rejoining = false
end
Lines = {}
function UpdateTracer()
for i,v in pairs(Lines) do
v:Remove()
end
Lines = {}
for i,v in pairs(cmdp:GetPlayers()) do
if v ~= cmdlp then
if v and v.Character ~= nil then
Head = v.Character:FindFirstChild("Head")
if Head ~= nil then
local PosChar, withinScreenBounds = workspace.Camera:WorldToViewportPoint(Head.Position)
if withinScreenBounds then
local Line = Drawing.new("Line")
Line.Visible = true
Line.From = Vector2.new(workspace.Camera.ViewportSize.X / 2, workspace.Camera.ViewportSize.Y)
Line.To = Vector2.new(PosChar.X, PosChar.Y)
Line.Color = Color3.new(255,255,255)
Line.Thickness = 2
Line.Transparency = 1
Lines[#Lines+1] = Line
end
end
end
end
end
end
TracerEnabled = false
function useCommand.tracers()
if not Drawing then
opx("*","Drawing API is not supported on your executor!")
return
end
opx("-","Tracers enabled")
for i,v in pairs(Lines) do
v:Remove()
end
Lines = {}
TracerEnabled = true
while TracerEnabled do
UpdateTracer()
game:GetService("RunService").RenderStepped:Wait()
end
end
function useCommand.untracers()
opx("-","Tracers disabled")
TracerEnabled = false
for i,v in pairs(Lines) do
v:Remove()
end
Lines = {}
end
PartLines = {}
function UpdatePartTracer(partarg,partname)
for i,v in pairs(PartLines) do
v:Remove()
end
PartLines = {}
for i,v in pairs(workspace:GetDescendants()) do
if partarg == "class" then
if v:IsA("BasePart") and partname == v.ClassName then
if partname == "ClickDetector" or partname == "TouchInterest" then v = v.Parent end
local PosChar, withinScreenBounds = workspace.Camera:WorldToViewportPoint(v.Position)
if withinScreenBounds then
local Line = Drawing.new("Line")
Line.Visible = true
Line.From = Vector2.new(workspace.Camera.ViewportSize.X / 2, workspace.Camera.ViewportSize.Y)
Line.To = Vector2.new(PosChar.X, PosChar.Y)
Line.Color = Color3.new(255,255,255)
Line.Thickness = 2
Line.Transparency = 1
PartLines[#Lines+1] = Line
end
end
elseif partarg == "name" then
if v:IsA("BasePart") and partname == v.Name then
local PosChar, withinScreenBounds = workspace.Camera:WorldToViewportPoint(v.Position)
if withinScreenBounds then
local Line = Drawing.new("Line")
Line.Visible = true
Line.From = Vector2.new(workspace.Camera.ViewportSize.X / 2, workspace.Camera.ViewportSize.Y)
Line.To = Vector2.new(PosChar.X, PosChar.Y)
Line.Color = Color3.new(255,255,255)
Line.Thickness = 2
Line.Transparency = 1
PartLines[#Lines+1] = Line
end
end
end
end
end
function useCommand.replicateanim()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
if IHaveSimmed == false then
opx("*","You need to run .simulationradius first!")
return
end
opx("-","Now replicating anim, creds to Riptxde")
local Char = cmdlp.Character
local Humanoid = Char.Humanoid
local Frame = 60
coroutine.wrap(function()
cmdlp.Character.HumanoidRootPart.Anchored = true
wait(.8)
cmdlp.Character.HumanoidRootPart.Anchored = false
end)()
local Create = function(Obj,Parent)
local I = Instance.new(Obj)
I.Parent = Parent
return I
end
local Contains = function(Table,KV)
for K,V in next, Table do
if rawequal(KV,K) or rawequal(KV,V) then
return true
end
end
return false
end
local PoseToCF = function(Pose,Motor)
return (Motor.Part0.CFrame * Motor.C0 * Pose.CFrame * Motor.C1:Inverse()):ToObjectSpace(Motor.Part0.CFrame)
end
local Torso = cmdlp.Character.Torso
local Joints = {
["Torso"] = cmdlp.Character.HumanoidRootPart.RootJoint,
["Left Arm"] = Torso["Left Shoulder"],
["Right Arm"] = Torso["Right Shoulder"],
["Left Leg"] = Torso["Left Hip"],
["Right Leg"] = Torso["Right Hip"],
}
for K,V in next, Char:GetChildren() do
if V:IsA("BasePart") then
coroutine.wrap(function()
repeat V.CanCollide = false
game:GetService("RunService").Stepped:Wait()
until cmdlp.Character.Humanoid.Health < 1
end)()
end
end
for K,V in next, Joints do
local AP, AO, A0, A1 = Create("AlignPosition",V.Part1), Create("AlignOrientation",V.Part1), Create("Attachment",V.Part1), Create("Attachment",V.Part0)
AP.RigidityEnabled = true
AO.RigidityEnabled = true
AP.Attachment0 = A0
AP.Attachment1 = A1
AO.Attachment0 = A0
AO.Attachment1 = A1
A0.Name = "CFAttachment0"
A1.Name = "CFAttachment1"
A0.CFrame = V.C1 * V.C0:Inverse()
V:Remove()
end
local Edit = function(Part,Value,Duration,Style,Direction)
Style = Style or "Enum.EasingStyle.Linear"
Direction = Direction or "Enum.EasingDirection.In"
local Attachment = Part:FindFirstChild("CFAttachment0")
if Attachment ~= nil then
game:GetService("TweenService"):Create(Attachment,TweenInfo.new(Duration,Enum.EasingStyle[tostring(Style):split('.')[3]],Enum.EasingDirection[tostring(Direction):split('.')[3]],0,false,0),{CFrame = Value}):Play()
end
end
if not game:GetService("RunService"):FindFirstChild("Delta") then
local Delta = Create("BindableEvent",game:GetService("RunService"))
Delta.Name = "Delta"
local A, B = 0, tick()
game:GetService("RunService").Delta:Fire()
game:GetService("RunService").Heartbeat:Connect(function(C, D)
A = A + C
if A >= (1/Frame) then
for I = 1, math.floor(A / (1/Frame)) do
game:GetService("RunService").Delta:Fire()
end
B = tick()
A = A - (1/Frame) * math.floor(A / (1/Frame))
end
end)
end
coroutine.wrap(function()
Humanoid.Died:Wait()
for K,V in next, cmdlp.Character:GetDescendants() do
if V.Name:match("Align") then
V:Destroy()
end
end
end)()
local PreloadAnimation = function(AssetId)
local Sequence = game:GetObjects("rbxassetid://"..AssetId)[1]
wait(.06)
local Class = {Speed = 1}
local Yield = function(Seconds)
local Time = Seconds * (Frame + Sequence:GetKeyframes()[#Sequence:GetKeyframes()].Time)
for I = 1,Time,Class.Speed do
game:GetService("RunService").Delta.Event:Wait()
end
end
Class.Stopped = false;
Class.Complete = Instance.new("BindableEvent")
Class.Play = function()
Class.Stopped = false
coroutine.wrap(function()
repeat
for K = 1,#Sequence:GetKeyframes() do
local K0, K1, K2 = Sequence:GetKeyframes()[K-1], Sequence:GetKeyframes()[K], Sequence:GetKeyframes()[K+1]
if Class.Stopped ~= true and cmdlp.Character.Humanoid.Health > 0 then
if K0 ~= nil then
Yield(K1.Time - K0.Time)
end
coroutine.wrap(function()
for I = 1,#K1:GetDescendants() do
local Pose = K1:GetDescendants()[I]
if Contains(Joints,Pose.Name) then
local Duration = K2 ~= nil and (K2.Time - K1.Time)/Class.Speed or .5
Edit(Char[Pose.Name],PoseToCF(Pose,Joints[Pose.Name]),Duration,Pose.EasingStyle,Pose.EasingDirection)
end
end
end)()
end
end
Class.Complete:Fire()
until Sequence.Loop ~= true or Class.Stopped ~= false or cmdlp.Character.Humanoid.Health < 1
end)()
end
Class.Stop = function()
Class.Stopped = true;
end
Class.Reset = function()
coroutine.wrap(function()
wait(.02)
for K,V in next, Joints do
local Part = Char[K]
if Part ~= nil then
local Attachment = Part:FindFirstChild("CFAttachment0")
if Attachment ~= nil then
Attachment.CFrame = V.C1 * V.C0:Inverse()
end
end
end
end)()
end
return Class
end
_G.connections.ReplicatedAnimation = PreloadAnimation(arguments[2])
_G.connections.ReplicatedAnimation.Speed = arguments[3] or 1
_G.connections.ReplicatedAnimation:Play()
end
function useCommand.replicateanimspeed()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
opx("-","Replicating anim speed is now "..arguments[2])
_G.connections.ReplicatedAnimation.Speed = arguments[2]
end
PartTracerEnabled = false
function useCommand.parttracers()
if not Drawing then
opx("*","Drawing API is not supported on your executor!")
return
end
local arg2 = arguments[2]
local arg3 = arguments[3]
opx("-","Part Tracers enabled")
for i,v in pairs(PartLines) do
v:Remove()
end
PartLines = {}
PartTracerEnabled = true
while PartTracerEnabled do
UpdatePartTracer(arg2,arg3)
game:GetService("RunService").RenderStepped:Wait()
end
end
function useCommand.unparttracers()
opx("-","Part Tracers disabled")
PartTracerEnabled = false
for i,v in pairs(PartLines) do
v:Remove()
end
PartLines = {}
end
function useCommand.removeroot()
opx("-","Removed HumanoidRootPart")
local oind = mt.__index
local hrp = cmdlp.Character.HumanoidRootPart
local selves = {
[hrp.Parent] = true,
[cmdlp.Character] = true
}
local inds = {
[hrp.Name] = true,
["HumanoidRootPart"] = true,
["PrimaryPart"] = true
}
setreadonly(mt, false)
mt.__index = newcclosure(function(self,ind,...)
if not checkcaller() and selves[self] and inds[ind] then
return hrp
end
return oind(self,ind,...)
end)
setreadonly(mt, true)
cmdlp.Character.HumanoidRootPart.Parent = workspace
end
function useCommand.logchat()
local msg = ""
if arguments[2] then
msg = getstring(2)
else
msg = string.rep("CMD-X Gang", 100)
end
require(cmdlp.PlayerScripts.ChatScript.ChatMain).MessagePosted:fire(msg)
opx("-","Chatted to logs")
end
function useCommand.logspam()
local msg = ""
if arguments[2] then
msg = getstring(2)
else
msg = string.rep("CMD-X Gang", 100)
end
mostSpam = game:GetService("RunService").Heartbeat:Connect(function()
require(cmdlp.PlayerScripts.ChatScript.ChatMain).MessagePosted:fire(msg)
end)
opx("-","Now spamming logs")
end
function useCommand.unlogspam()
opx("-","Stopped spamming logs")
mostSpam:Disconnect()
end
function useCommand.multispam()
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
speedofthespam = permspamspeed
spammies = true
local topstring = getstring(2):split(",")
opx("-","You are now spamming")
repeat wait(speedofthespam)
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(topstring[math.random(1,#topstring)], "All")
until spammies == false
end
function useCommand.antifling()
if antifling == nil then
antifling = true
else
antifling = not antifling
end
local function Collisionless(person)
if antifling and person.Character then
for _,child in pairs(person.Character:GetDescendants()) do
if child:IsA("BasePart") and child.CanCollide then
child.CanCollide = false
end
end
end
end
for _,v in pairs(cmdp:GetPlayers()) do
if v ~= cmdlp then
local antifling = game:GetService('RunService').Stepped:connect(function()
Collisionless(v)
end)
end
end
cmdp.PlayerAdded:Connect(function()
if v ~= cmdlp and antifling then
local antifling = game:GetService('RunService').Stepped:connect(function()
Collisionless(v)
end)
end
end)
if antifling then
opx("-","Antifling enabled.")
else
opx("-","Antifling disabled.")
end
end
function useCommand.nofall()
if _G.connections["nofall"] then
opx("*", "Nofall is already enabled.")
return
end
cmdlp.Character.Humanoid:SetStateEnabled(1, false)
cmdlp.Character.Humanoid:SetStateEnabled(0, false)
_G.connections["nofall"] = cmdlp.CharacterAdded:Connect(function(char)
wait()
char.Humanoid:SetStateEnabled(1, false)
char.Humanoid:SetStateEnabled(0, false)
end)
opx("-","Falling has been disabled.")
end
function useCommand.yesfall()
if not _G.connections["nofall"] then
opx("*", "Nofall is not enabled.")
return
end
cmdlp.Character.Humanoid:SetStateEnabled(1, true)
cmdlp.Character.Humanoid:SetStateEnabled(0, true)
_G.connections["nofall"]:Disconnect()
opx("-","Falling has been enabled.")
end
function useCommand.nofallbp()
if _G.connections["nofallbp"] then
opx("*", "Nofall bypass is already enabled")
return
end
_G.connections["nofallbp"] = cmdlp.Character.Humanoid.StateChanged:Connect(function(z, new)
if new == Enum.HumanoidStateType.FallingDown or new == Enum.HumanoidStateType.Ragdoll then
cmdlp.Character.Humanoid:ChangeState(z)
end
end)
opx("-","Antifall bypass enabled")
end
function useCommand.yesfallbp()
if not _G.connections["nofallbp"] then
opx("*","Antifall has not been enabled yet")
return
end
_G.connections["nofallbp"]:Disconnect()
opx("-","Antifall bypass disabled")
end
function useCommand.fixbubblechat()
if _G.connections["bcfix"] then
opx("*","Bubble chat has already been fixed")
return
end
if cmdlp.PlayerGui:FindFirstChild("BubbleChat") then
_G.connections["bcfix"] = cmdlp.PlayerGui.BubbleChat.DescendantAdded:connect(function(msg)
if msg:IsA("TextLabel") and msg.Name == "BubbleText" then
msg.TextSize = 21
end
end)
end
opx("-","Bubble chat has been fixed.")
end
function useCommand.unfixbubblechat()
if not _G.connections["bcfix"] then
opx("*","Bubble chat isn't fixed.")
return
end
_G.connections["bcfix"]:Disconnect()
_G.connections["bcfix"] = nil
opx("*","Bubble chat has been unfixed.")
end
function useCommand.darkbubbles()
if _G.connections["darkbubbles"] then
opx("*","Dark bubbles are already enabled.")
return
end
if cmdlp.PlayerGui:FindFirstChild("BubbleChat") then
_G.connections["darkbubbles"] = cmdlp.PlayerGui.BubbleChat.DescendantAdded:connect(function(msg)
if msg:IsA("ImageLabel") and msg.Name == "ChatBubble" or msg:IsA("ImageLabel") and msg.Name == "ChatBubbleTail" or msg:IsA("ImageLabel") and msg.Name == "SmallTalkBubble" then
msg.ImageColor3 = Color3.fromRGB(0,0,0)
end
if msg:IsA("TextLabel") and msg.Name == "BubbleText" then
msg.TextColor3 = Color3.fromRGB(255,255,255)
msg.BackgroundColor3 = Color3.fromRGB(0,0,0)
end
end)
end
opx("-","Dark bubbles have been enabled.")
end
function useCommand.undarkbubbles()
if not _G.connections["darkbubbles"] then
opx("*","Dark bubbles are not enabled.")
end
_G.connections["darkbubbles"]:Disconnect()
_G.connections["darkbubbles"] = nil
opx("-","Dark bubbles have been disabled.")
end
function useCommand.colourbubbles()
if arguments[7] then
if _G.connections["darkbubbles"] or _G.connections["colourbubbles"] then
opx("*","Coloured bubbles are already enabled.")
return
end
local x,y,z = arguments[2],arguments[3],arguments[4]
local c,m,d = arguments[5],arguments[6],arguments[7]
if cmdlp.PlayerGui:FindFirstChild("BubbleChat") then
_G.connections["colourbubbles"] = cmdlp.PlayerGui.BubbleChat.DescendantAdded:connect(function(msg)
if msg:IsA("ImageLabel") and msg.Name == "ChatBubble" or msg:IsA("ImageLabel") and msg.Name == "ChatBubbleTail" or msg:IsA("ImageLabel") and msg.Name == "SmallTalkBubble" then
msg.ImageColor3 = Color3.fromRGB(x,y,z)
end
if msg:IsA("TextLabel") and msg.Name == "BubbleText" then
msg.TextColor3 = Color3.fromRGB(c,m,d)
msg.BackgroundColor3 = Color3.fromRGB(x,y,z)
end
end)
end
opx("-","Colour bubbles have been enabled.")
else
opx("*","7 arguments are required!")
end
end
function useCommand.uncolourbubbles()
if not _G.connections["colourbubbles"] then
opx("*","Colour bubbles are not enabled.")
end
_G.connections["colourbubbles"]:Disconnect()
_G.connections["colourbubbles"] = nil
opx("-","Colour bubbles have been disabled.")
end
function useCommand.tweenwalkspeed()
if arguments[2] then
walkspeedSet = arguments[2]
opx("-","Tween Walkspeed is now on")
WaitTimer = .4
cmdlp.Character.Humanoid.WalkSpeed = 4
function Accelerate()
if cmdlp.Character.Humanoid.MoveDirection ~= Vector3.new(0, 0, 0) and MoveDirDB == false and cmdlp.Character.Humanoid.WalkSpeed < walkspeedSet then
MoveDirDB = true
while cmdlp.Character.Humanoid.MoveDirection ~= Vector3.new(0, 0, 0) and cmdlp.Character.Humanoid.WalkSpeed < walkspeedSet do
cmdlp.Character.Humanoid.WalkSpeed = cmdlp.Character.Humanoid.WalkSpeed + 1
wait(WaitTimer)
WaitTimer = .4 / 1.1
end
MoveDirDB = false
elseif cmdlp.Character.Humanoid.MoveDirection == Vector3.new(0, 0, 0) then
WaitTimer = .4
cmdlp.Character.Humanoid.WalkSpeed = 4
end
end
tws = cmdlp.Character.Humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(Accelerate)
else
opx("*","2 arguments are required!")
end
end
function useCommand.untweenwalkspeed()
opx("-","Tween Walkspeed is no longer on")
cmdlp.Character.Humanoid.WalkSpeed = 16
tws:Disconnect()
end
function useCommand.combo()
if arguments[2] then
opx("-","Ran combo "..arguments[2])
for i,v in pairs(combos) do
if v.N == arguments[2] then
arguments = v.CMD:split(" ")
useCommand[arguments[1]]()
end
end
else
opx("*","2 arguments are required")
end
end
function useCommand.combos()
xCombos = ""
for i,v in pairs(combos) do
xCombos = xCombos..v.N..", "
end
opx("-","Listed combos")
opxL("Combos",xCombos)
end
function useCommand.combonew()
if arguments[3] then
opx("-","Added "..arguments[2] .." to combos")
table.insert(combos, {N = arguments[2], CMD = getstring(3)})
else
opx("*","3 arguments are required!")
end
end
function useCommand.combodel()
if arguments[2] then
for i,v in pairs(combos) do
if v.N == arguments[2] then
table.remove(combos, i)
end
end
opx("-","Removed "..arguments[2].." from combos")
else
opx("*","2 arguments are required")
end
end
function useCommand.combosclr()
opx("-","Cleared combos list")
combos = {}
updatesaves()
end
function useCommand.chatprivacypublic()
local gethiddenproperty = gethiddenproperty or get_hidden_property
if not gethiddenproperty then
opx("*","Gethiddenproperty is needed!")
return
end
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
local GetCPM = gethiddenproperty(target,"ChatPrivacyMode")
if GetCPM == Enum.ChatPrivacyMode.AllUsers then
opx("-",target.Name.."'s privacy mode is Everyone")
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(target.Name.."'s privacy mode is Everyone","All")
elseif GetCPM == Enum.ChatPrivacyMode.Friends then
opx("-",target.Name.."'s privacy mode is Friends")
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(target.Name.."'s privacy mode is Friends","All")
elseif GetCPM == Enum.ChatPrivacyMode.NoOne then
opx("-",target.Name.."'s privacy mode is No-one")
cmdrs.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(target.Name.."'s privacy mode is No-one","All")
end
end
function useCommand.chatprivacyprivate()
local gethiddenproperty = gethiddenproperty or get_hidden_property
if not gethiddenproperty then
opx("*","Gethiddenproperty is needed!")
return
end
if not arguments[2] then
opx("*","2 arguments are required!")
return
end
target = findplr(arguments[2])
if not target then
opx("*","Player does not exist!")
return
end
local GetCPM = gethiddenproperty(target,"ChatPrivacyMode")
if GetCPM == Enum.ChatPrivacyMode.AllUsers then
opx("-",target.Name.."'s privacy mode is Everyone")
elseif GetCPM == Enum.ChatPrivacyMode.Friends then
opx("-",target.Name.."'s privacy mode is Friends")
elseif GetCPM == Enum.ChatPrivacyMode.NoOne then
opx("-",target.Name.."'s privacy mode is No-one")
end
end
function useCommand.chatprivacy()
local sethiddenproperty = sethiddenproperty or set_hidden_property
if not sethiddenproperty then
opx("*","Sethiddenproperty is needed!")
return
end
if not arguments[2] then
opx("*","A proper preset is required!")
return
end
opx("-","Set your Chat Privacy to "..arguments[2])
sethiddenproperty(cmdlp,"ChatPrivacyMode",Enum.ChatPrivacyMode[arguments[2]])
end
function useCommand.masschatprivacy()
local gethiddenproperty = gethiddenproperty or get_hidden_property
if not gethiddenproperty then
opx("*","Gethiddenproperty is needed!")
return
end
local xCPM = ""
for i,v in pairs(cmdp:GetPlayers()) do
local GetCPM = gethiddenproperty(v,"ChatPrivacyMode")
if GetCPM == Enum.ChatPrivacyMode.AllUsers then
xCPM = xCPM..v.Name.."'s privacy mode is Everyone\n"
elseif GetCPM == Enum.ChatPrivacyMode.Friends then
xCPM = xCPM..v.Name.."'s privacy mode is Friends\n"
elseif GetCPM == Enum.ChatPrivacyMode.NoOne then
xCPM = xCPM..v.Name.."'s privacy mode is No-one\n"
end
end
opxL("Chat Privacy",xCPM)
end
local gravity = workspace.Gravity
function useCommand.sitfly()
workspace.Gravity = 0
cmdlp.Character.Humanoid.Sit = true
opx("-", "Now sitflying")
end
function useCommand.platformfly()
workspace.Gravity = 0
cmdlp.Character.Humanoid.PlatformStand = true
opx("-", "Now platformflying")
end
function useCommand.unsitfly()
workspace.Gravity = gravity
cmdlp.Character.Humanoid.Sit = false
opx("-", "No longer sitflying")
end
function useCommand.unplatformfly()
workspace.Gravity = gravity
cmdlp.Character.Humanoid.PlatformStand = false
opx("-", "No longer platformflying")
end
function useCommand.hotkeysitflyhold()
if not arguments[2] then
opx("*", "2 arguments required")
return
end
if not _G.connections["sitfly"] then _G.connections["sitfly"] = {} end
for _,v in pairs(_G.connections["sitfly"]) do
v:Disconnect()
end
_G.connections["sitfly"] = {}
workspace.Gravity = gravity
cmdlp.Character.Humanoid.Sit = false
cmdlp.Character.Humanoid.PlatformStand = false
_G.connections["sitfly"]["down"] = game:GetService("UserInputService").InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode[arguments[2]:upper()] then
workspace.Gravity = 0
cmdlp.Character.Humanoid.Sit = true
end
end)
_G.connections["sitfly"]["up"] = game:GetService("UserInputService").InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode[arguments[2]:upper()] then
workspace.Gravity = gravity
cmdlp.Character.Humanoid.Sit = false
end
end)
opx("-", "Sitfly enabled on key "..arguments[2]:upper().." on hold")
end
function useCommand.hotkeyplatformflyhold()
if not arguments[2] then
opx("*", "2 arguments required")
return
end
if not _G.connections["sitfly"] then _G.connections["sitfly"] = {} end
for _,v in pairs(_G.connections["sitfly"]) do
v:Disconnect()
end
_G.connections["sitfly"] = {}
workspace.Gravity = gravity
cmdlp.Character.Humanoid.Sit = false
cmdlp.Character.Humanoid.PlatformStand = false
_G.connections["sitfly"]["down"] = game:GetService("UserInputService").InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode[arguments[2]:upper()] then
workspace.Gravity = 0
cmdlp.Character.Humanoid.PlatformStand = true
end
end)
_G.connections["sitfly"]["up"] = game:GetService("UserInputService").InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode[arguments[2]:upper()] then
workspace.Gravity = gravity
cmdlp.Character.Humanoid.PlatformStand = false
end
end)
opx("-", "Platformfly enabled on key "..arguments[2]:upper().." on hold")
end
function useCommand.hotkeysitflytoggle()
if not arguments[2] then
opx("*", "2 arguments required")
return
end
if not _G.connections["sitfly"] then _G.connections["sitfly"] = {} end
for _,v in pairs(_G.connections["sitfly"]) do
v:Disconnect()
end
_G.connections["sitfly"] = {}
workspace.Gravity = gravity
cmdlp.Character.Humanoid.Sit = false
cmdlp.Character.Humanoid.PlatformStand = false
local toggled = true
_G.connections["sitfly"]["down"] = game:GetService("UserInputService").InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode[arguments[2]:upper()] then
toggled = not toggled
if not toggled then
workspace.Gravity = 0
cmdlp.Character.Humanoid.Sit = true
else
workspace.Gravity = gravity
cmdlp.Character.Humanoid.Sit = false
end
end
end)
opx("-", "Sitfly enabled on key "..arguments[2]:upper().." on toggle")
end
function useCommand.hotkeyplatformflytoggle()
if not arguments[2] then
opx("*", "2 arguments required")
return
end
if not _G.connections["sitfly"] then _G.connections["sitfly"] = {} end
for _,v in pairs(_G.connections["sitfly"]) do
v:Disconnect()
end
_G.connections["sitfly"] = {}
workspace.Gravity = gravity
cmdlp.Character.Humanoid.Sit = false
cmdlp.Character.Humanoid.PlatformStand = false
local toggled = true
_G.connections["sitfly"]["down"] = game:GetService("UserInputService").InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode[arguments[2]:upper()] then
toggled = not toggled
if not toggled then
workspace.Gravity = 0
cmdlp.Character.Humanoid.PlatformStand = true
else
workspace.Gravity = gravity
cmdlp.Character.Humanoid.PlatformStand = false
end
end
end)
opx("-", "Platformfly enabled on key "..arguments[2]:upper().." on toggle")
end
function useCommand.spoofgrouprole()
if _G.rolehook then
opx("*","Spoof group role already enabled!")
return
end
local xRole = "Owner"
if arguments[2] then
xRole = arguments[2]
end
opx("-","Spoofed role")
local mt = getrawmetatable(game)
_G.rolehook = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(self, ...)
if not checkcaller() and self == cmdlp then
if getnamecallmethod() == "GetRankInGroup" then
return 255
elseif getnamecallmethod() == "GetRoleInGroup" then
return xRole
end
return _G.rolehook(self, ...)
end
return _G.rolehook(self, ...)
end)
setreadonly(mt, true)
end
function useCommand.unspoofgrouprole()
if not _G.rolehook then
opx("*", "Spoof group role is not enabled.")
return
end
setreadonly(mt, false)
mt.__namecall = _G.rolehook
setreadonly(mt, true)
opx("-", "Spoof group role is now disabled.")
_G.rolehook = nil
end
function useCommand.nogameteleport()
if _G.gtphook then
opx("*","No game teleport already enabled!")
return
end
opx("-","No game teleport is now enabled")
local mt = getrawmetatable(game)
_G.gtphook = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(self, ...)
if not checkcaller() and getnamecallmethod() == "Teleport" then
return nil
end
return _G.gtphook(self, ...)
end)
setreadonly(mt, true)
end
function useCommand.yesgameteleport()
if not _G.gtphook then
opx("*", "No game teleport is not enabled.")
return
end
setreadonly(mt, false)
mt.__namecall = _G.gtphook
setreadonly(mt, true)
opx("-", "No game teleport is now disabled.")
_G.gtphook = nil
end
function useCommand.hotkeyflyhold()
if not arguments[2] then
opx("*", "2 arguments required")
return
end
if not _G.connections["fly"] then _G.connections["fly"] = {} end
for _,v in pairs(_G.connections["fly"]) do
v:Disconnect()
end
_G.connections["fly"] = {}
_G.connections["fly"]["down"] = game:GetService("UserInputService").InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode[arguments[2]:upper()] then
FLYING = true
sFLY()
end
end)
_G.connections["fly"]["up"] = game:GetService("UserInputService").InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode[arguments[2]:upper()] then
FLYING = false
end
end)
opx("-", "Fly enabled on key "..arguments[2]:upper().." on hold")
end
function useCommand.spooffps()
if _G.fpshook then
opx("*","Spoof FPS is already enabled!")
return
end
opx("-","Spoof FPS is enabled")
local fps = game:GetService("Stats").FrameRateManager.AverageFPS
local fakefps = arguments[2] or 60
local mt = getrawmetatable(game)
_G.fpshook = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(self, ...)
if self == fps and getnamecallmethod() == "GetValue" then
return fakefps
elseif self == fps and getnamecallmethod() == "GetValueString" then
return fakefps
end
return _G.fpshook(self, ...)
end)
end
function useCommand.unspooffps()
if not _G.fpshook then
opx("*","Spoof FPS is not enabled!")
return
end
setreadonly(mt, false)
mt.__namecall = _G.fpshook
setreadonly(mt, true)
opx("-","Spoof FPS is disabled")
_G.fpshook = nil
end
function useCommand.spoofping()
if _G.pinghook then
opx("*","Spoof ping is already enabled!")
return
end
opx("-","Spoof ping is enabled")
local fakeping = arguments[2] or 15
local mt = getrawmetatable(game)
_G.pinghook = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(self, ...)
if (self == game:GetService("Stats").PerformanceStats.Ping and getnamecallmethod() == "GetValue") or (self == game:GetService("Stats").PerformanceStats.Ping and getnamecallmethod() == "GetValueString") then
return fakeping
end
return _G.pinghook(self, ...)
end)
end
function useCommand.unspoofping()
if not _G.pinghook then
opx("*","Spoof ping is not enabled!")
return
end
setreadonly(mt, false)
mt.__namecall = _G.pinghook
setreadonly(mt, true)
opx("-","Spoof ping is disabled")
_G.pinghook = nil
end
function useCommand.spoofmemory()
if _G.memoryhook then
opx("*","Spoof memory is already enabled!")
return
end
opx("-","Spoof memory is enabled")
local fakememory = arguments[2] or 200
local mt = getrawmetatable(game)
_G.memoryhook = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(self, ...)
if (self == game:GetService("Stats").PerformanceStats.Memory and getnamecallmethod() == "GetValue") or (self == game:GetService("Stats").PerformanceStats.Memory and getnamecallmethod() == "GetValueString") then
return fakememory
end
return _G.memoryhook(self, ...)
end)
end
function useCommand.unspoofmemory()
if not _G.memoryhook then
opx("*","Spoof memory is not enabled!")
return
end
setreadonly(mt, false)
mt.__namecall = _G.memoryhook
setreadonly(mt, true)
opx("-","Spoof memory is disabled")
_G.memoryhook = nil
end
function useCommand.drawingnew()
if newDrawing == Drawing then
opx("*", "Already using new drawing.")
return
end
if Drawing then
setreadonly(Drawing, false)
end
Drawing = newDrawing
setreadonly(Drawing, true)
opx("-", "Now using new Drawing API")
end
function useCommand.spoofclientid()
if _G.clid then
opx("*","ClientID already spoofed")
return
end
opx("-","ClientID spoofed")
local mt = getrawmetatable(game)
_G.clid = mt.__namecall
setreadonly(mt, false)
local genid = arguments[2]
mt.__namecall = newcclosure(function(self, ...)
if getnamecallmethod() == 'GetClientId' then
return genid
end
return _G.clid(self, ...)
end)
setreadonly(mt, true)
end
function useCommand.randomspoofclientid()
if _G.clid then
opx("*","ClientID already spoofed")
return
end
opx("-","ClientID spoofed")
local mt = getrawmetatable(game)
_G.clid = mt.__namecall
setreadonly(mt, false)
local genid = math.random(1,1000000000)
mt.__namecall = newcclosure(function(self, ...)
if getnamecallmethod() == 'GetClientId' then
return genid
end
return _G.clid(self, ...)
end)
setreadonly(mt, true)
end
function useCommand.unspoofclientid()
if not _G.clid then
opx("*","ClientID is not already spoofed")
return
end
opx("-","ClientID no longer spoofed")
setreadonly(mt, false)
mt.__namecall = _G.clid
setreadonly(mt, true)
_G.clid = nil
end
function useCommand.drawingold()
if not oldDrawing then
opx("*", "Your exploit doesn't have it's own Drawing API.")
return
end
if oldDrawing == Drawing then
opx("*", "Already using your exploits Drawing API.")
return
end
if Drawing then
setreadonly(Drawing, false)
end
Drawing = oldDrawing
setreadonly(Drawing, false)
opx("-", "Now using your exploits Drawing API")
end
user.Changed:connect(function()
user.Text = user.Text:sub(1,13)..">"
end)
---------------------------------------|
-- GUI Hotkeys: -----------------------|
cmdm.KeyDown:connect(function(key)
if key == hotkeyopen then
if holder.Visible == false then
if force == true then
wait(.1)
output.Visible = true
end
holder.Visible = true
else
if output.Visible == true then
force = true
else
force = false
end
output.Visible = false
holder.Visible = false
end
elseif key == hotkeyopx and _G.dontTween == false then
if output.Visible == true then
for i = 1,10 do
wait(.1)
for i,v in pairs(output:GetDescendants()) do
if v:IsA("ImageLabel") then
v.ImageTransparency = v.ImageTransparency + 0.1
v:TweenSize(UDim2.new(0,525,0,0), "InOut", "Quart",1)
elseif v:IsA("TextLabel") then
v.TextTransparency = v.TextTransparency + 0.1
end
end
output.Transparency = output.Transparency + 0.1
output:TweenPosition(UDim2.new(0, output.Position.X.Offset, 0, 290), "InOut", "Quart",1)
output:TweenSize(UDim2.new(0,525,0,0), "InOut", "Quart",1)
end
output.Visible = false
holder.Active = false
else
output.Visible = true
holder.Active = true
for i = 1,10 do
wait(.1)
for i,v in pairs(output:GetDescendants()) do
if v:IsA("ImageLabel") then
v.ImageTransparency = v.ImageTransparency - 0.1
v:TweenSize(UDim2.new(0,525,0,253), "InOut", "Quart",1)
elseif v:IsA("TextLabel") then
v.TextTransparency = v.TextTransparency - 0.1
end
end
output.Transparency = output.Transparency - 0.1
output:TweenPosition(UDim2.new(0, -8, 0, 19), "InOut", "Quart",1)
output:TweenSize(UDim2.new(0,525,0,253), "InOut", "Quart",1)
end
end
elseif key == hotkeyfocus then
cmd:CaptureFocus()
game:GetService("RunService").RenderStepped:Wait()
cmd.Text = ""
elseif key == hotkeyfly then
FLYING = not FLYING
cmdlp.Character.Humanoid.PlatformStand = not FLYING
if FLYING then
sFLY()
speedofthefly = permflyspeed
end
elseif key == hotkeyxray then
if transparent == true then
transparent = false
x(transparent)
else
transparent = true
x(transparent)
end
elseif key == hotkeynoclip then
if Clip == false then
if Noclipping then
Noclipping:Disconnect()
end
Clip = true
else
noclip()
end
elseif key == hotkeyaimbot then
if AimbotIs == false then
wait()
BodyAimbot("FFA")
else
AimbotIs = false
end
elseif key == hotkeyesp then
if ESPenabled == false then
Find()
ESPEnabled = true
while ESPEnabled ~= false do
wait()
Find()
end
else
ESPEnabled = false
Track = false
for i = 1,10 do
for i,v in pairs(cmdp:GetPlayers()) do
for x,y in pairs(v.Character:GetChildren()) do
if y:IsA("BasePart") then
y.Material = "Plastic"
end
end
end
Clear()
end
end
else
for i,_ in pairs(hkBinds) do
if key == hkBinds[i].K then
alignFunctions(hkBinds[i].C)
arguments = hkBinds[i].C:split(" ")
local cmdsy = findCmd(arguments[1])
if cmdsy ~= nil then
if Debugging == false then
useCommand[cmdsy]()
else
pcall(function() useCommand[cmdsy]() end)
end
else
local invalidString = getstring(1)
if #invalidString > 38 then
invalidString = invalidString:sub(1,35).."..."
end
opx("*",invalidString.." is not a valid command.")
end
end
end
end
end)
---------------------------------------|
-- Print Function: --------------------|
if not AntiCheat.PrintingOff then
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "Welcome to CMD-X, "..cmdlp.Name..".";
Color = Color3.fromRGB(50, 50, 50);
Font = Enum.Font.SourceSansBold;TextSize = 25
})
StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "Press U for output and F9 for more info!";
Color = Color3.fromRGB(100, 100, 100);
Font = Enum.Font.SourceSansBold;
TextSize = 20
})
StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "To use chat commands use the prefix '"..prefix.."'";
Color = Color3.fromRGB(100, 100, 100);
Font = Enum.Font.SourceSansBold;
TextSize = 20
})
end
if AntiCheat.ScriptDetectOff then opx("*","Script detection is off due to anticheat") end
if AntiCheat.TurboNameSpam then opx("*","Turbo name spam has been turned on due to anticheat") end
if AntiCheat.HideParentInExploit then opx("*","Hidden parent in exploit due to anticheat") end
if AntiCheat.HideParentInPG then opx("*","Hidden parent in playergui due to anticheat") end
if AntiCheat.AutoAntiKick then opx("*","Turned on antikick due to anticheat") end
if AntiCheat.RemoveScripts then opx("*","Removed local scripts due to anticheat") end
if AntiCheat.IntroAudioOff then opx("*","Turned intro off due to anticheat") end
if AntiCheat.DontJumbleNames then opx("*","Jumble names is off due to anticheat") end
if AntiCheat.OneTimeScramble then opx("*","Scrambled names once due to anticheat") end
if AntiCheat.PrintingOff then opx("*","Printing has been turned off due to anticheat") end
if AntiCheat.Warning1 then opx("*","This game is known to have a float/fly anticheat becareful") end
---------------------------------------|
-- Start CMDs: ------------------------|
if #enterCMD > 0 then
for i = 1,#enterCMD do
arguments = enterCMD[i].N:split(" ")
local cmdsy = findCmd(arguments[1])
if cmdsy ~= nil then
if Debugging == false then
useCommand[cmdsy]()
else
pcall(function() useCommand[cmdsy]() end)
end
else
invalidString = enterCMD[i].N
if #invalidString > 38 then
invalidString = invalidString:sub(1,35).."..."
end
opx("*",invalidString.." is not a valid command.")
end
end
end
user.Changed:connect(function()
user.Text = user.Text:sub(1,13)..">"
end)
cmd.Focused:connect(function()
local NumberOf = #History
cmduis.InputBegan:Connect(function()
if cmduis:IsKeyDown(Enum.KeyCode.LeftShift) and cmduis:IsKeyDown(Enum.KeyCode.Backspace) then
cmd.Text = ""
elseif cmduis:IsKeyDown(Enum.KeyCode.Up) then
if #History ~= 0 and NumberOf ~= 0 then
cmd.Text = History[NumberOf]
NumberOf = NumberOf - 1
end
end
end)
end)
tabs = holder
mou = cmdm
createDrag(tabs)
---------------------------------------|
-- Themes: ----------------------------|
styleAS = dStyle:split(" ")
function getAsset(ID)
return("http://www.roblox.com/Thumbs/Asset.ashx?format=png&width=420&height=420&assetId="..ID)
end
if dStyle == "rounded" then
output.Style = Enum.FrameStyle.RobloxRound
elseif dStyle == "squared" then
output.Style = Enum.FrameStyle.RobloxSquare
elseif dStyle == "blended" then
output.Style = Enum.FrameStyle.Custom
elseif dStyle == "smalled" then
output.Style = Enum.FrameStyle.DropShadow
elseif dStyle == "lightblue" then
entry.BackgroundColor3 = Color3.fromRGB(170, 170, 170)
output1.TextColor3 = Color3.fromRGB(1, 1, 1)
output2.TextColor3 = Color3.fromRGB(1, 1, 1)
output3.TextColor3 = Color3.fromRGB(1, 1, 1)
output4.TextColor3 = Color3.fromRGB(1, 1, 1)
output5.TextColor3 = Color3.fromRGB(1, 1, 1)
output6.TextColor3 = Color3.fromRGB(1, 1, 1)
output7.TextColor3 = Color3.fromRGB(1, 1, 1)
output8.TextColor3 = Color3.fromRGB(1, 1, 1)
output9.TextColor3 = Color3.fromRGB(1, 1, 1)
cmd.TextColor3 = Color3.fromRGB(1,1,1)
cmd.PlaceholderColor3 = Color3.fromRGB(1,1,1)
output.Style = Enum.FrameStyle.ChatBlue
elseif dStyle == "lightgreen" then
entry.BackgroundColor3 = Color3.fromRGB(170, 170, 170)
output1.TextColor3 = Color3.fromRGB(1, 1, 1)
output2.TextColor3 = Color3.fromRGB(1, 1, 1)
output3.TextColor3 = Color3.fromRGB(1, 1, 1)
output4.TextColor3 = Color3.fromRGB(1, 1, 1)
output5.TextColor3 = Color3.fromRGB(1, 1, 1)
output6.TextColor3 = Color3.fromRGB(1, 1, 1)
output7.TextColor3 = Color3.fromRGB(1, 1, 1)
output8.TextColor3 = Color3.fromRGB(1, 1, 1)
output9.TextColor3 = Color3.fromRGB(1, 1, 1)
cmd.TextColor3 = Color3.fromRGB(1,1,1)
cmd.PlaceholderColor3 = Color3.fromRGB(1,1,1)
output.Style = Enum.FrameStyle.ChatGreen
elseif dStyle == "lightred" then
entry.BackgroundColor3 = Color3.fromRGB(170, 170, 170)
output1.TextColor3 = Color3.fromRGB(1, 1, 1)
output2.TextColor3 = Color3.fromRGB(1, 1, 1)
output3.TextColor3 = Color3.fromRGB(1, 1, 1)
output4.TextColor3 = Color3.fromRGB(1, 1, 1)
output5.TextColor3 = Color3.fromRGB(1, 1, 1)
output6.TextColor3 = Color3.fromRGB(1, 1, 1)
output7.TextColor3 = Color3.fromRGB(1, 1, 1)
output8.TextColor3 = Color3.fromRGB(1, 1, 1)
output9.TextColor3 = Color3.fromRGB(1, 1, 1)
cmd.TextColor3 = Color3.fromRGB(1,1,1)
cmd.PlaceholderColor3 = Color3.fromRGB(1,1,1)
output.Style = Enum.FrameStyle.ChatRed
elseif styleAS[1] == "bg" then
output.Style = Enum.FrameStyle.Custom
local iBG = Instance.new("ImageLabel", output)
iBG.BackgroundColor3 = Color3.fromRGB(163,182,165)
iBG.BackgroundTransparency = 1
iBG.BorderSizePixel = 0
iBG.Size = UDim2.new(0, 525, 0, 253)
output1.Parent = iBG
output2.Parent = iBG
output3.Parent = iBG
output4.Parent = iBG
output5.Parent = iBG
output6.Parent = iBG
output7.Parent = iBG
output8.Parent = iBG
output9.Parent = iBG
iBG.Image = getAsset(styleAS[2])
iBG.ScaleType = Enum.ScaleType.Crop
else
loadstring(game:HttpGet((dStyle),true))()
end
---------------------------------------|
-- Chat hook: -------------------------|
pcall(function()
local chatbar = cmdlp.PlayerGui.Chat.Frame.ChatBarParentFrame.Frame.BoxFrame.Frame.ChatBar
local changed
chatbar.Focused:Connect(function()
changed = chatbar:GetPropertyChangedSignal("Text"):Connect(function()
if chatbar.Text:lower():sub(1,#prefix) == prefix then
cmd.Text = chatbar.Text:sub(#prefix+1,#chatbar.Text)
elseif chatbar.Text:lower():sub(1,1) == '.' or chatbar.Text:lower():sub(1,1) == ";" then
cmd.Text = chatbar.Text:sub(2,#chatbar.Text)
else
cmd.Text = ""
end
end)
end)
chatbar.FocusLost:Connect(function()
changed:Disconnect()
end)
end)
game:GetService("UserInputService").InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Gamepad1 then
if not _G.capturingFocus then
if input.KeyCode == Enum.KeyCode.ButtonB then
_G.capturingFocus = game:GetService("RunService").Stepped:Connect(function()
cmd:CaptureFocus()
end)
end
else
_G.capturingFocus:Disconnect()
_G.capturingFocus = nil
end
end
end)
cmdlp.Chatted:connect(function(v)
if Inputting then
if v:lower():sub(1,#prefix) == prefix then
cmd:CaptureFocus()
cmd.Text = v:sub(#prefix+1,#v)
cmd:ReleaseFocus()
elseif v:lower():sub(1,1) == '.' then
cmd:CaptureFocus()
cmd.Text = v:sub(2,#v)
cmd:ReleaseFocus()
end
end
end)
pcall(function()
if AntiCheat.IntroAudioOff == false then
Sound2:Destroy()
end
end)
local counter = 0
local num = 10
if not _G.colorSequences then
_G.colorSequences = {}
while true do
local sequence = {}
for i = 0, num do
table.insert(
sequence, i + 1, ColorSequenceKeypoint.new(i / num, Color3.fromRGB(
127 * math.sin(0.52 * i + counter) + 128,
127 * math.sin(0.52 * i + 2 * math.pi / 3 + counter) + 128,
127 * math.sin(0.52 * i + 4 * math.pi / 3 + counter) + 128)
)
)
end
local new = ColorSequence.new(sequence)
if #_G.colorSequences > 0 then
if new == _G.colorSequences[1] then
break
end
end
table.insert(_G.colorSequences, new)
counter = counter + 0.0785
if (counter >= 6.28) then
counter = 0
end
end
end
if not _G.RGBDev then
_G.RGBDev = {Lettering = {}, Connections = {}}
end
function RGBDev(Player)
name = Player.Name
if _G.RGBDev.Connections[name] then return end
local plm = game:GetService("CoreGui").RobloxGui:FindFirstChild("PlayerListMaster")
if not plm or not plm:FindFirstChild("OffsetUndoFrame", true) then
return
else
plm = plm:FindFirstChild("OffsetUndoFrame", true)
end
_G.RGBDev.Connections[name] = game:GetService("RunService").RenderStepped:Connect(function()
for _,v in pairs(plm:GetDescendants()) do
if v:IsA("TextLabel") and v.Name == "PlayerName" and v.Parent.Parent.Parent.Parent.Parent.Parent.Name == "p_"..Player.UserId then
if not _G.RGBDev.Lettering[v] then
_G.RGBDev.Lettering[v] = Instance.new("UIGradient", v)
v.TextColor3 = Color3.fromRGB(255, 255, 255)
elseif math.ceil(tick()) % 0.5 == 0 then
_G.RGBDev.Lettering[v].Color = _G.colorSequences[math.ceil((math.fmod(tick(), 1))*80)]
end
v.Rotation = math.random(-1,1)
if Devs[name] then
v.Parent.Parent.PlayerIcon.Image = "rbxasset://textures/ui/icon_admin-16.png"
end
end
end
end)
end
function colorName(Player)
name = Player.Name
local plm = game:GetService("CoreGui").RobloxGui:FindFirstChild("PlayerListMaster")
if not plm then
return
end
plm = plm:FindFirstChild("OffsetUndoFrame", true)
for i,v in pairs(plm:GetDescendants()) do
if v:IsA("TextLabel") and v.Name == "PlayerName" and v.Parent.Parent.Parent.Parent.Parent.Parent.Name == "p_"..Player.UserId then
if Donors[name] then
if Tier[Donors[name]].Color == "RGBDev" then
RGBDev(name)
else
v.TextColor3 = Tier[Donors[name]].Color
end
end
end
end
end
for _,v in pairs(cmdp:GetPlayers()) do
if Devs[v.Name] then
opx("-",v.Name.." is in your server ("..Devs[v.Name].." of CMD-X)")
RGBDev(v)
elseif Donors[v.Name] then
opx("-",v.Name.." is in your server ("..Tier[Donors[v.Name]].Tag..")")
colorName(v)
end
end
cmdp.PlayerAdded:Connect(function(v)
if Devs[v.Name] then
opx("-",v.Name.." is in your server ("..Devs[v.Name].." of CMD-X)")
RGBDev(v)
elseif Donors[v.Name] then
opx("-",v.Name.." is in your server ("..Tier[Donors[v.Name]].Tag..")")
colorName(v)
end
end)
-- End --------------------------------|
output.Visible = true
holder.Visible = true
holder.Active = true
if IsExe then
for i,v in pairs(CMDS.aliases) do
useCommand[i] = useCommand[v];
end
for i,v in pairs(CMDS.commands) do
local CommandName = i;
local CommandDisc = v;
SendCommand(CommandName, CommandDisc)
end
for i,v in pairs(CMDS.aliases) do
local CommandName = i;
SendCommand(CommandName, "Aliases for " .. v)
end
end
|
-- A bullet template class
local bulletBouncy = {}
bulletBouncy.__index = bulletBouncy
--------------------
-- MAIN CALLBACKS --
--------------------
function bulletBouncy.new(x, y, angle, friendly, speed)
local self = classes.bullet.new(x, y, angle, friendly, speed)
setmetatable(self, bulletBouncy)
self.bouncesLeft = 1
return self
end
function bulletBouncy:update(dt)
-- Bounce off walls
if self.bouncesLeft > 0 then
if self.x < self.radius then
self.x = self.radius
self.xspeed = math.abs(self.xspeed)
self.bouncesLeft = self.bouncesLeft - 1
self:bounce()
end
if self.x > ARENA_WIDTH - self.radius then
self.x = ARENA_WIDTH - self.radius
self.xspeed = -math.abs(self.xspeed)
self.bouncesLeft = self.bouncesLeft - 1
self:bounce()
end
if self.y < self.radius then
self.y = self.radius
self.yspeed = math.abs(self.yspeed)
self.bouncesLeft = self.bouncesLeft - 1
self:bounce()
end
if self.y > ARENA_HEIGHT - self.radius then
self.y = ARENA_HEIGHT - self.radius
self.yspeed = -math.abs(self.yspeed)
self.bouncesLeft = self.bouncesLeft - 1
self:bounce()
end
end
-- Call superclass method
classes.bullet.update(self, dt)
end
function bulletBouncy:draw()
love.graphics.setColor(0.65, 0.2, 0.7)
love.graphics.circle("fill", self.x, self.y, self.radius)
if self.bouncesLeft > 0 then
local width = love.graphics.getLineWidth()
love.graphics.setColor(0, 0, 0)
love.graphics.setLineWidth(3)
love.graphics.circle("line", self.x, self.y, self.radius)
love.graphics.setLineWidth(width)
end
end
function bulletBouncy:onDestroy()
-- Call default superclass method
if classes.bullet.onDestroy then
classes.bullet.onDestroy(self)
end
end
function bulletBouncy:bounce()
sounds.bulletBounce:clone():play()
end
classes.bulletBouncy = bulletBouncy
|
function AtReturn(s)
sdl.printf("procedure returned '%s'",s)
sdl.nextstate("Waiting")
end
function Waiting_Stop()
sdl.printf("caller: received STOP")
sdl.stop()
end
function Start(maxlevel)
sdl.procedure(AtReturn, nil, "procedure", 1, maxlevel)
sdl.send({ "STOP" }, self_)
sdl.nextstate("-")
end
sdl.start(Start)
sdl.transition("Waiting","STOP",Waiting_Stop)
|
object_tangible_wearables_necklace_necklace_deepspace_empire_wke_m = object_tangible_wearables_necklace_shared_necklace_deepspace_empire_wke_m:new {
}
ObjectTemplates:addTemplate(object_tangible_wearables_necklace_necklace_deepspace_empire_wke_m, "object/tangible/wearables/necklace/necklace_deepspace_empire_wke_m.iff")
|
workspace("CommonCLI")
configurations({ "Debug", "Release", "Dist" })
if _OS == "macosx" then
platforms({ "x64" })
else
platforms({ "x86", "x64" })
end
cppdialect("C++20")
rtti("Off")
exceptionhandling("Off")
flags("MultiProcessorCompile")
filter("configurations:Debug")
defines({ "PREMAKE_CONFIG=PREMAKE_CONFIG_DEBUG" })
optimize("Off")
symbols("On")
filter("configurations:Release")
defines({ "PREMAKE_CONFIG=PREMAKE_CONFIG_RELEASE" })
optimize("Full")
symbols("On")
filter("configurations:Dist")
defines({ "PREMAKE_CONFIG=PREMAKE_CONFIG_DIST" })
optimize("Full")
symbols("Off")
filter("system:windows")
toolset("msc")
defines({
"PREMAKE_SYSTEM=PREMAKE_SYSTEM_WINDOWS",
"NOMINMAX", -- Windows.h disables
"WIN32_LEAN_AND_MEAN",
"_CRT_SECURE_NO_WARNINGS"
})
filter("system:macosx")
defines({ "PREMAKE_SYSTEM=PREMAKE_SYSTEM_MACOSX" })
filter("system:linux")
defines({ "PREMAKE_SYSTEM=PREMAKE_SYSTEM_LINUX" })
filter("toolset:msc")
defines({ "PREMAKE_TOOLSET=PREMAKE_TOOLSET_MSVC" })
filter("toolset:clang")
defines({ "PREMAKE_TOOLSET=PREMAKE_TOOLSET_CLANG" })
filter("toolset:gcc")
defines({ "PREMAKE_TOOLSET=PREMAKE_TOOLSET_GCC" })
filter("platforms:x86")
defines({ "PREMAKE_PLATFORM=PREMAKE_PLATFORM_X86" })
filter("platforms:x64")
defines({ "PREMAKE_PLATFORM=PREMAKE_PLATFORM_AMD64" })
filter("platforms:arm")
defines({ "PREMAKE_PLATFORM=PREMAKE_PLATFORM_ARM32" })
filter("platforms:arm64")
defines({ "PREMAKE_PLATFORM=PREMAKE_PLATFORM_ARM64" })
filter({})
startproject("TestCLI")
project("CommonCLI")
location("%{wks.location}/")
kind("StaticLib")
targetdir("%{wks.location}/Bin/%{cfg.system}-%{cfg.platform}-%{cfg.buildcfg}/")
objdir("%{wks.location}/Bin/Int-%{cfg.system}-%{cfg.platform}-%{cfg.buildcfg}/%{prj.name}/")
debugdir("%{wks.location}/")
includedirs({
"%{prj.location}/Inc/",
"%{prj.location}/Src/"
})
files({
"%{prj.location}/Inc/**",
"%{prj.location}/Src/**"
})
project("TestCLI")
location("%{wks.location}/Test/")
kind("ConsoleApp")
targetdir("%{wks.location}/Bin/%{cfg.system}-%{cfg.platform}-%{cfg.buildcfg}/")
objdir("%{wks.location}/Bin/Int-%{cfg.system}-%{cfg.platform}-%{cfg.buildcfg}/%{prj.name}/")
debugdir("%{wks.location}/Test/")
links({ "CommonCLI" })
sysincludedirs({ "%{wks.location}/Inc/" })
includedirs({ "%{prj.location}/Src/" })
files({ "%{prj.location}/Src/**" })
|
-- See Copyright Notice in license.html
require"string"
-- load driver
driver = require"luanosql.unqlite"
print("--------------- Running first test-----------------\n")
-- create environment object
env = assert (driver.unqlite())
-- connect to unqlite data source
con = assert (env:connect("luaunqlite-test"))
-- insert a key/value element
res = assert (con:kvstore("key1","Hello World!"))
-- add a few elements key/value
list = {["key2"]="value-1", ["key3"]="value-2", ["key4"]="value-3",
["key5"]="value-4", ["key6"]="value-5", ["key7"]="value-6",
["key8"]="value-7", ["key9"]="value-8", ["key10"]="value-9",
["key11"]="value-11"}
-- insert dummy data
print("Start inserting data")
for k, v in pairs (list) do
print(string.format("Inserted KEY = %s , VALUE= %s",k,v))
res = assert (con:kvstore(k,v))
end
print("Start Reading the same data e check")
-- Reread and check inserted data
for k, v in pairs (list) do
res, data = con:kvfetch(k)
print(string.format("Key/Data = %s/%s --->VALUE_EXPECTED= %s",k,data,v))
-- check data
assert (data,v)
print("Data checked")
end
-- kvappend call example / test
print("Appending -value11 at key=key11 itself...")
res = assert(con:kvappend("key11","-value12"))
print("OK...Appended.Let's check")
r, val = con:kvfetch("key11")
assert(val ,"value11-value12")
print("OK...Correct, go on...")
-- kvcommit call example / test
print("Committing...")
res = assert(con:commit())
print("OK...Committed.")
-- kvfetch call example / test
print("Now fetch data")
-- fetch key3 and check
res, val = con:kvfetch("key3")
print(res, val)
assert(val,"value-2")
print("OK...Fetched.")
-- kvdelete call example / test
print("Deleting")
-- delete key2
res = con:kvdelete("key2")
print(res)
print("OK...Deleted")
-- kvcommit call example / test
print("OK...Committing deletion")
res = assert(con:commit())
print("OK...Committed.")
-- Check Delete operation
print("Check deletion")
-- kvfetch call example / test
-- check that key2 is not there
res, val = con:kvfetch("key2")
print(res, val)
assert(res and val == nil)
print("OK...Deletion checked.")
-- define a custom callback for fetch
function custom_test_fetch_callback(dataout,datalen,ud)
print("UnQLite Update Hook:",dataout,datalen,ud)
t1,t2,t3 = ud['1'], ud['2'],ud['3']
print("Userdata:", t1,t2,t3)
print("Getting key4....")
res,val = con:kvfetch("key4")
assert(res and val == "value-3")
print("Lua Callback key4 OK")
return 0
end
-- Try to pass userdata which can be used by callback itself
print("Check Callback on fetch")
local tbl = {['1']='Lippa',['2']=con, ['3']='Zippa'}
con:kvfetch_callback("key9",custom_test_fetch_callback, tbl)
print("Callback registered")
-- kvfetch a value
res, myval = con:kvfetch("key9")
assert(res and myval == "value-8")
res, myval = con:kvfetch("key9")
assert(res and myval == "value-8")
print(myval)
print("Now committing and closing")
-- commit and close
con:commit()
con:close()
env:close()
print("--------------- Running another test-----------------\n")
-- Now it's cursor time :-)
-- create environment object
ev = assert (driver.unqlite())
-- connect to unqlite data source
cn = assert (ev:connect("luaunqlite-test"))
-- overwrite a key/value element
res = assert (cn:kvstore("key1","Hello World2!"))
print("Testing Cursors.....\n")
-- create a cursor
cur = cn:create_cursor()
print("Cursor created\n")
-- set it to first entry
print("Set to the first entry\n")
c2 = cur:first_entry()
print("Start looping over records.")
repeat
if cur:is_valid_entry() then
print(string.format("Key / Data====>\t%s / %s\n", cur:cursor_key(),cur:cursor_data()))
else print("Invalid Entry :)")
end
until cur:next_entry()
print("Loop end\n")
print("Release cursor\n")
assert(cur:release())
print("Now closing")
-- commit and close
cn:close()
ev:close()
print("Test OK")
|
require 'torch'
function outResize(input, step)
local _gradOutput = {}
_gradOutputs[step] = input[step]:clone()
print('gradOutputs[step]', gradOutputs[step])
end
function catOut(targets, step, noutputs, opt)
local targets_, targsTab = {}, {}
local targTable = {}
targets_ = torch.cat({targets[step][1], targets[step][2], targets[step][3],
targets[step][4], targets[step][5], targets[step][6]})
--print('targets_', targets_)
--targets_ = torch.reshape(targets_, noutputs, noutputs)
for i = 1, opt.batchSize do
targsTab[i] = targets_[{{i}, {1, opt.batchSize}}]
table.insert(targTable, targsTab[i])
targTable[i] = torch.reshape(targTable[i], opt.batchSize, 1)
end
return targets_, targTable
end
function gradInputReshape(inputs, step, noutputs, opt)
local inputer = inputs[step]:expand(noutputs, noutputs)
local inpuTab = {}
for i = 1, opt.batchSize do
inputer[i] = inputer[{{i}, {1, opt.batchSize}}]
table.insert(inpuTab, inputer[i])
inpuTab[i] = torch.reshape(inpuTab[i], 1, opt.batchSize)
end
return inpuTab
end
function gradOutputsReshape(gradOutputs, step, opt)
local gradder, gradderTab = {}, {}
for i = 1, opt.batchSize do
table.insert(gradderTab, gradOutputs[i])
gradder[i] = torch.reshape(gradderTab[i], 1, opt.batchSize)
end
print('gradder'); print(gradder)
print('gradderTab'); print(gradderTab)
return gradder
end
--print a bunch of stuff if user enables print option
local function perhaps_print(q, qn, inorder, outorder, input, out, off, train_out, trainData)
print('training_data', trainData)
print('\ntesting_data', test_data)
--random checks to be sure data is consistent
print('train_data_input', trainData[1]:size())
print('train_data_output', trainData[2])
print('\ntrain_xn', trainData[2][1]:size())
print('\ntrain_yn', trainData[2][2]:size())
print('\ntrain_zn', trainData[2][3]:size())
print('\ntrain_roll', trainData[2][4]:size())
print('\ntrain_pitch', trainData[2][5]:size())
print('\ntrain_yaw', trainData[2][6]:size())
print('\ninput head', input[{ {1,5}, {1}} ])
print('k', input:size()[1], 'off', off, '\nout\n', out, '\ttrain_output\n', train_out)
print('\npitch head\n\n', out.zn[{ {1,5}, {1}} ])
print('\nqn:' , qn)
print('Optimal number of input variables is: ', torch.ceil(qn))
print('inorder: ', inorder, 'outorder: ', outorder)
print('system order:', inorder + outorder)
--Print out some Lipschitz quotients (first 5) for user
for ii, v in pairs( q ) do
print('Lipschitz quotients head', ii, v)
if ii == 5 then break end
end
--print neural net parameters
print('neunet biases Linear', neunet.bias)
print('\nneunet biases\n', neunet:get(1).bias, '\tneunet weights: ', neunet:get(1).weights)
print('inputs: ', inputs)
print('targets: ', targets)
end
|
local function trim(s)
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
local socket = require("socket")
local client = assert(socket.tcp())
local host, port = "172.16.0.127", 7051
print("Client created")
client:connect(host, port);
client:send("hello world\n");
local function getAction()
local s, status, partial = client:receive()
s = trim(s)
local moves = {}
for i = 1, #s do
local c = s:sub(i, i)
moves[i] = tonumber(c)
end
if status == "closed" then
break
end
end
client:close()
|
local posix = require"posix"
local Tools = require"Toolbox.Tools"
local Import = require"Toolbox.Import"
local Vlpeg = require"Sisyphus.Vlpeg"
local Compiler = require"Sisyphus.Compiler"
local Template = Compiler.Objects.Template
local Aliasable = Compiler.Objects.Aliasable
local Basic = Compiler.Objects.Basic
local PEG = Compiler.Objects.Nested.PEG
local Variable = PEG.Variable
local Syntax = Import.Module.Relative"Objects.Syntax"
local Construct = Import.Module.Relative"Objects.Construct"
return Basic.Type.Set{
Modifier = Basic.Type.Set{
--Templated parse that takes a Grammar.Modifier and uses the new grammar to match and return a.. Grammar.Modifier.
With = Basic.Type.Definition(
Construct.DynamicParse(
Construct.Invocation(
"With",
Construct.ArgumentList{Variable.Canonical"Types.Basic.Grammar.Modifier"},
function(Grammar, Environment)
Grammar.InitialPattern =
PEG.Apply(
Construct.Centered(Variable.Canonical"Types.Basic.Grammar.Modifier"),
function(ModifiedGrammar)
ModifiedGrammar.InitialPattern = Grammar.InitialPattern
return ModifiedGrammar
end
)
return
Grammar/"userdata", {
Grammar = Grammar;
Variables = {};
}
end
)
)
);
File = Basic.Type.Definition(
Construct.Invocation(
"File",
Construct.ArgumentList{Construct.AliasableType"Data.String"},
function(Filename, Environment)
local CurrentGrammar = Environment.Grammar
local Path = posix.realpath(Filename)
if not CurrentGrammar.Information.Files[Path] then
local File = io.open(Path,"r")
local Contents = File:read"a"
File:close()
local ResumePattern = CurrentGrammar.InitialPattern
CurrentGrammar.InitialPattern = Variable.Canonical"Types.Basic.Grammar.Modifier"
local ModifiedGrammar = Tools.Filesystem.ChangePath(
Tools.Path.Join(Tools.Path.DirName(Path)),
Vlpeg.Match,
CurrentGrammar/"userdata",
Contents, 1, {
Grammar = CurrentGrammar;
Variables = {};
}
)
ModifiedGrammar.InitialPattern = ResumePattern
ModifiedGrammar.Information.Files[Path] = true
return ModifiedGrammar
else
return CurrentGrammar
end
end
)
);
Templates = Basic.Type.Definition(
Construct.Invocation(
"Templates",
PEG.Table(
Construct.ArgumentArray(
PEG.Apply(
Variable.Canonical"Types.Basic.Template.Declaration",
function(Namespace, GeneratedTypes)
return {
Namespace = Namespace;
GeneratedTypes = GeneratedTypes;
}
end
)
)
),
function(Declarations, Environment)
local Namespace = Template.Namespace()
local GeneratedTypes = Aliasable.Namespace()
for _, Declaration in pairs(Declarations) do
Namespace = Namespace + Declaration.Namespace
if Declaration.GeneratedTypes then
GeneratedTypes = GeneratedTypes + Declaration.GeneratedTypes
end
end
local CurrentGrammar = Environment.Grammar
return Template.Grammar(
Aliasable.Grammar(
CurrentGrammar.InitialPattern,
CurrentGrammar.AliasableTypes + GeneratedTypes,
CurrentGrammar.BasicTypes,
CurrentGrammar.Syntax,
CurrentGrammar.Information
),
Namespace
)()
end
)
);
}
}
|
return Def.ActorFrame{
Font("mentone","24px")..{
InitCommand=function(self)
self:halign(1):shadowlength(0):zoom(0.5):strokecolor(color("0,0,0,0"))
end;
BeginCommand=function(self)
self:playcommand("Update")
end;
UpdateCommand=function(self)
local selection;
local seltime = 0;
if GAMESTATE:IsCourseMode() then
selection = GAMESTATE:GetCurrentCourse();
if selection then
if GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber()) then
local trail = GAMESTATE:GetCurrentTrail(GAMESTATE:GetMasterPlayerNumber());
seltime = TrailUtil.GetTotalSeconds( trail );
end;
end;
else
selection = GAMESTATE:GetCurrentSong();
if selection then
seltime = selection:MusicLengthSeconds();
end;
end;
-- todo: r21 ogglength patch thing?
seltime = SecondsToMSS(seltime);
self:settext(seltime);
end;
CurrentSongChangedMessageCommand=function(self)
self:playcommand("Update")
end;
CurrentCourseChangedMessageCommand=function(self)
self:playcommand("Update")
end;
CurrentTrailP1ChangedMessageCommand=function(self)
self:playcommand("Update")
end;
CurrentTrailP2ChangedMessageCommand=function(self)
self:playcommand("Update")
end;
};
};
|
--
-- User: mathieu
-- Date: 19/12/16
-- Time: 2:56 PM
-- Description : All channels concatenation
--
require 'deeptracking.tracker.modelbase'
local RGBDTracker = torch.class('RGBDTracker', 'ModelBase')
function RGBDTracker:__init(backend, optimfunc, device)
ModelBase.__init(self, backend, optimfunc, device)
end
function RGBDTracker:build_convo(input_channels, c1_filters, c2_filters, final_size)
local c1_filter_size = 5
local c2_filter_size = 3
local max_pooling_size = 2
local first = nn:Sequential()
first:add(nn.SpatialConvolution(4, c1_filters, c1_filter_size, c1_filter_size))
first:add(nn.SpatialBatchNormalization(c1_filters))
first:add(nn.ELU())
first:add(nn.SpatialMaxPooling(max_pooling_size, max_pooling_size, max_pooling_size, max_pooling_size))
local input = nn:ParallelTable()
input:add(first)
input:add(first:clone())
local convo = nn:Sequential()
convo:add(input)
convo:add(nn.JoinTable(2))
convo:add(nn.SpatialConvolution(c1_filters * 2, c2_filters, c2_filter_size, c2_filter_size))
convo:add(nn.SpatialBatchNormalization(c2_filters))
convo:add(nn.ELU())
--convo:add(nn.SpatialDropout(0.2))
convo:add(nn.SpatialMaxPooling(max_pooling_size, max_pooling_size, max_pooling_size, max_pooling_size))
convo:add(nn.SpatialConvolution(c2_filters, c2_filters, c2_filter_size, c2_filter_size))
convo:add(nn.SpatialBatchNormalization(c2_filters))
convo:add(nn.ELU())
--convo:add(nn.SpatialDropout(0.2))
convo:add(nn.SpatialMaxPooling(max_pooling_size, max_pooling_size, max_pooling_size, max_pooling_size))
convo:add(nn.SpatialConvolution(c2_filters, c2_filters, c2_filter_size, c2_filter_size))
convo:add(nn.SpatialBatchNormalization(c2_filters))
convo:add(nn.ELU())
--convo:add(nn.SpatialDropout(0.2))
convo:add(nn.SpatialMaxPooling(max_pooling_size, max_pooling_size, max_pooling_size, max_pooling_size))
convo:add(nn.View(-1, c2_filters * final_size))
return convo
end
function RGBDTracker:build_model()
local linear_size = self.config["linear_size"]
local c1_filter_qty = self.config["convo1_size"]
local c2_filter_qty = self.config["convo2_size"]
local input_size = self.config["input_size"]
local view = math.floor((((((((input_size-4)/2)-2)/2)-2)/2)-2)/2) -- todo should not be hardcoded..
local view_size = view * view
local convo = self:build_convo(8, c1_filter_qty, c2_filter_qty, view_size)
self.net = nn:Sequential()
self.net:add(convo)
self.net:add(nn.Dropout(0.5))
self.net:add(nn.Linear(c2_filter_qty * view_size, linear_size))
self.net:add(nn.ELU())
self.net:add(nn.Linear(linear_size, 6))
self.net:add(nn.Tanh())
end
function RGBDTracker:convert_inputs(inputs)
self.inputTensor = self:setup_tensor(inputs[1], self.inputTensor)
self.priorTensor = self:setup_tensor(inputs[2][{ {},{4,7} }], self.priorTensor)
local ret = {self.inputTensor[{{}, {1,4}, {}, {}}], self.inputTensor[{{}, {5,8}, {}, {}}] }
return ret
end
function RGBDTracker:convert_outputs(outputs, backend)
local ret
if backend == "cuda" then
ret = outputs:cuda()
else
ret = outputs:float()
end
return ret
end
function RGBDTracker:compute_criterion(forward_input, label)
self.labelTensor = self:setup_tensor(label, self.labelTensor)
if self.crit == nil then
self.crit = self:set_backend(nn.MSECriterion())
end
local label_loss = self.crit:forward(forward_input, self.labelTensor)
self.label_grad = self.crit:backward(forward_input, self.labelTensor)
return {label=label_loss}, self.label_grad
end
function RGBDTracker:get_feature()
return self.net:findModules('nn.Linear')[1].output:float()
end
function RGBDTracker:extract_grad_statistic()
local rotation_view = self.label_grad[{{},{4, 6}}]:float():abs()
local grad_rot_mean = torch.mean(rotation_view)
y, i = torch.median(rotation_view, 1)
local grad_rot_median = torch.mean(y)
local grad_rot_min = torch.min(rotation_view)
local grad_rot_max = torch.max(rotation_view)
local translation_view = self.label_grad[{{},{1, 3}}]:float():abs()
local grad_trans_mean = torch.mean(translation_view)
y, i = torch.median(translation_view, 1)
local grad_trans_median = torch.mean(y)
local grad_trans_min = torch.min(translation_view)
local grad_trans_max = torch.max(translation_view)
return {{grad_rot_mean=grad_rot_mean, grad_rot_median=grad_rot_median, grad_rot_min=grad_rot_min, grad_rot_max=grad_rot_max},
{grad_trans_mean=grad_trans_mean, grad_trans_median=grad_trans_median, grad_trans_min=grad_trans_min, grad_trans_max=grad_trans_max}}
end
|
local SIZE = 64
return function(x, y, rotation, spawnrate, health, gold, range, arrow_damage)
local col_shape = {
-- Behaviours should be the same as a spawner
type = "spawner",
box = true,
polygon = { { x = SIZE / 2, y = SIZE / 2 }, { x = SIZE / 2, y = -SIZE / 2 }, { x = -SIZE / 2, y = -SIZE / 2 }, { x = -SIZE / 2, y = SIZE / 2 } },
dynamic = false
}
local position = { x = x, y = y, rotation = rotation }
local dwarf_spawner = {
collision = col_shape,
position = position,
speed = 0,
rotatespeed = 0.5,
spawnrate = spawnrate,
ballista = true,
counter = 0,
offset = math.random(),
spawns = 0,
hp = health,
gold = gold,
range = range,
arrow_damage = arrow_damage
}
return dwarf_spawner
end
|
--------------------------------------------------------------------------------
--
-- resources definitions
--
--------------------------------------------------------------------------------
local resources = {
graphics = {
caustics = {
'caustics/caustic00.jpg',
'caustics/caustic01.jpg',
'caustics/caustic02.jpg',
'caustics/caustic03.jpg',
'caustics/caustic04.jpg',
'caustics/caustic05.jpg',
'caustics/caustic06.jpg',
'caustics/caustic07.jpg',
'caustics/caustic08.jpg',
'caustics/caustic09.jpg',
'caustics/caustic10.jpg',
'caustics/caustic11.jpg',
'caustics/caustic12.jpg',
'caustics/caustic13.jpg',
'caustics/caustic14.jpg',
'caustics/caustic15.jpg',
'caustics/caustic16.jpg',
'caustics/caustic17.jpg',
'caustics/caustic18.jpg',
'caustics/caustic19.jpg',
'caustics/caustic20.jpg',
'caustics/caustic21.jpg',
'caustics/caustic22.jpg',
'caustics/caustic23.jpg',
'caustics/caustic24.jpg',
'caustics/caustic25.jpg',
'caustics/caustic26.jpg',
'caustics/caustic27.jpg',
'caustics/caustic28.jpg',
'caustics/caustic29.jpg',
'caustics/caustic30.jpg',
'caustics/caustic31.jpg',
},
smoke = {
'smoke/smoke00.tga',
'smoke/smoke01.tga',
'smoke/smoke02.tga',
'smoke/smoke03.tga',
'smoke/smoke04.tga',
'smoke/smoke05.tga',
'smoke/smoke06.tga',
'smoke/smoke07.tga',
'smoke/smoke08.tga',
'smoke/smoke09.tga',
'smoke/smoke10.tga',
'smoke/smoke11.tga',
},
scars = {
'scars/scar1.bmp',
'scars/scar2.bmp',
'scars/scar3.bmp',
'scars/scar3.bmp',
},
trees = {
bark='Bark.bmp',
leaf='bleaf.bmp',
gran1='gran.bmp',
gran2='gran2.bmp',
birch1='birch1.bmp',
birch2='birch2.bmp',
birch3='birch3.bmp',
},
maps = {
detailtex='detailtex2.bmp',
watertex='ocean.jpg',
},
groundfx = {
groundflash='groundflash.tga',
groundring='groundring.tga',
seismic='circles.tga',
},
projectiletextures = {
TELEGREENBLUE1='TELEGREENBLUE1.tga',
LightningStrike='LightningStrike.tga',
LightningStrike_Alpha='LightningStrike_Alpha.tga',
ExplodeHeat1='ExplodeHeat1.tga',
flame1='flame1.tga',
fireball1='qFireball1.tga',
diamondstar1='DiamondStar1.tga',
smokesmall1='qsmokesmall1.tga',
burn1='burn1.tga',
laserendred='laserendred.tga',
NarrowBoltNoisy='NarrowBoltNoisy.tga',
EMG='EMG.tga',
EMG_aplha='EMG_alpha.tga',
Type6Beam='Type6Beam.tga',
PlasmaHeatB='PlasmaHeatB.tga',
PlasmaHeatG='PlasmaHeatG.tga',
ConeFragments1='ConeFragments1.tga',
Fire1='Fire1.tga',
GenericSmokeCloud1='GenericSmokeCloud1.tga',
Type4Beam='Type4Beam.tga',
circularthingy='circularthingy.tga',
laserend='laserend.tga',
laserfalloff='laserfalloff.tga',
randdots='randdots.tga',
smoketrail='smoketrail.tga',
wake='wake.png',
explo='explo.tga',
explofade='explofade.tga',
heatcloud='explo.tga',
flame='flame.tga',
graysmoke='graysmoke.tga',
smokeorange='gpl/smoke_orange.png',
fireball='fireball.tga',
laserendpink='laserendpink.tga',
flare='flare.tga',
shard1='shard1.tga',
shard2='shard2.tga',
shard3='shard3.tga',
"2explo='2explo.tga'",
redexplo='redexplo.tga',
purpleexplo='purpleexplo.tga',
blueexplo='blueexplo.tga',
pinkexplo='pinkexplo.tga',
brightblueexplo='brightblueexplo.tga',
bluenovaexplo='bluenovaexplo.tga',
muzzleside='muzzleside.png',
muzzlefront='muzzlefront.png',
bigexplo='bigexplo.tga',
bigexplosmoke='bigexplosmoke.tga',
sakexplo='sakexplo.tga',
sparkexplo='sparkexplo.tga',
cloudexplo='cloudexplo.tga',
flowexplo='flowexplo.tga',
flowexplo2='flowexplo2.tga',
mildexplo='mildexplo.tga',
spikeexplo='spikeexplo.tga',
starexplo='starexplo.tga',
greenexplo='greenexplo.tga',
PlasmaPure='PlasmaPure.tga',
gunshot='CC/gunshot.tga',
flash1='flash1.tga',
flash2='flash2.tga',
flash3='flash3.tga',
armsmoketrail='armsmoketrail.tga',
coresmoketrail='coresmoketrail.tga',
shotgunflare='shotgunflare.tga',
lightb='PD/lightningball.tga',
lightb2='PD/lightningball2.tga',
lightning='PD/lightning.tga',
plasma='GPL/plasma.tga',
flashside1='flashside1.tga',
shotgunside='shotgunside.tga',
megaparticle='megaparticle.tga',
shot='shot.tga',
beamrifle='beamrifle.tga',
beamrifletip='beamrifletip.tga',
smallflare='GPL/smallflare.tga',
dirt='CC/dirt.png',
smoke='smoke/smoke00.tga',
diamondstar='diamondstar.tga',
whitelight='lightw.bmp',
yellowlight='lighty.bmp',
redlight='lightr.png',
sporetrail='GPL/sporetrail.tga',
null='PD/null.tga',
bluenovaexplo='bluenovaexplo.tga',
randdots='randdots.tga',
blueexploredexplo='blueexploredexplo.tga',
bombsmoke='bombsmoke.tga',
r1='r1.tga',
r2='r2.tga',
r3='r3.tga',
r1_aplha='r1_alpha.tga',
plasmaball01='plasmaball/plasmaball01.tga',
plasmaball02='plasmaball/plasmaball02.tga',
plasmaball03='plasmaball/plasmaball03.tga',
plasmaball04='plasmaball/plasmaball04.tga',
plasmaball05='plasmaball/plasmaball05.tga',
plasmaball06='plasmaball/plasmaball06.tga',
plasmaball07='plasmaball/plasmaball07.tga',
plasmaball08='plasmaball/plasmaball08.tga',
plasmaball09='plasmaball/plasmaball09.tga',
plasmaball10='plasmaball/plasmaball10.tga',
plasmaball11='plasmaball/plasmaball11.tga',
plasmaball12='plasmaball/plasmaball12.tga',
plasmaball13='plasmaball/plasmaball13.tga',
plasmaball14='plasmaball/plasmaball14.tga',
plasmaball15='plasmaball/plasmaball15.tga',
plasmaball16='plasmaball/plasmaball16.tga',
plasmaball17='plasmaball/plasmaball17.tga',
plasmaball18='plasmaball/plasmaball18.tga',
plasmaball19='plasmaball/plasmaball19.tga',
plasmaball20='plasmaball/plasmaball20.tga',
plasmaball21='plasmaball/plasmaball21.tga',
plasmaball22='plasmaball/plasmaball22.tga',
plasmaball23='plasmaball/plasmaball23.tga',
plasmaball24='plasmaball/plasmaball24.tga',
plasmaball25='plasmaball/plasmaball25.tga',
--nuke
burn='burn.tga',
flamenuke='flamenew.tga',
odd='odd.tga',
groundflash43='clouds2.tga',
clouds2='clouds2.tga',
--Tankette
newsmoke='Smoke/DFoom.TGA',
flare1='FlarenSpark/Flare1.TGA',
flare2='FlarenSpark/Flare2.TGA',
flare3='FlarenSpark/Flare3.TGA',
lightring='lightring.tga',
lightb3='lightningball3.tga',
lightb4='lightningball4.tga',
lightning2='lightning2.jpg',
debris='other/debris.tga',
debris2='other/debris2.tga',
dirtplosion2='other/dirtplosion2.tga',
nanonew='nano.tga',
exploo='explo.jpg',
ring='ring.tga',
--Hot fix for generic lava map ceg
map_foam='other/foam_map.tga',
map_debris2='other/debris2.tga',
map_dirtplosion2='other/dirtplosion2.tga',
--lightning
strike='techa_artwork/strike.png',
lightningball_new='techa_artwork/lightningball.png',
sunlight_new='techa_artwork/sunlight.png',
sonic_glow='techa_artwork/sonic_glow.png',
--Gok
gokbeam='techa_artwork/gokbeam.png',
goklightning='techa_artwork/goklightning.png',
puff='Shine_Smokey_256.png',
cloud='sky1.png',
},
},
}
--------------------------------------------------------------------------------
return resources
--------------------------------------------------------------------------------
|
local lor = require("lor.index")
local userRouter = lor:Router() -- 生成一个group router对象
-- 按id查找用户
-- e.g. /query/123
userRouter:get("/query/:id", function(req, res, next)
local query_id = tonumber(req.params.id) -- 从req.params取参数
if not query_id then
return res:render("user/info", {
desc = "Error to find user, path variable `id` should be a number. e.g. /user/query/123"
})
end
-- 渲染页面
res:render("user/info", {
id = query_id,
name = "user" .. query_id,
desc = "User Information"
})
end)
-- 删除用户
-- e.g. /delete?id=123
userRouter:delete("/delete", function(req, res, next)
local id = req.query.id -- 从req.query取参数
if not id then
return res:html("<h2 style='color:red'>Error: query param id is required.</h2>")
end
-- 返回html
res:html("<span>succeed to delete user</span><br/>user id is:<b style='color:red'>" .. id .. "</b>")
end)
-- 修改用户
-- e.g. /put/123?name=sumory
userRouter:put("/put/:id", function(req, res, next)
local id = req.params.id -- 从req.params取参数
local name = req.query.name -- 从req.query取参数
if not id or not name then
return res:send("error params: id and name are required.")
end
-- 返回文本格式的响应结果
res:send("succeed to modify user[" .. id .. "] with new name:" .. name)
end)
-- 创建用户
userRouter:post("/post", function(req, res, next)
local content_type = req.headers['Content-Type']
-- 如果请求类型为form表单或json请求体
if string.find(content_type, "application/x-www-form-urlencoded",1, true) or
string.find(content_type, "application/json",1, true) then
local id = req.body.id -- 从请求体取参数
local name = req.body.name -- 从请求体取参数
if not id or not name then
return res:json({
success = false,
msg = "error params: id and name are required."
})
end
res:json({-- 返回json格式的响应体
success = true,
data = {
id = id,
name = name,
desc = "succeed to create new user" .. id
}
})
else -- 不支持其他请求体
res:status(500):send("not supported request Content-Type[" .. content_type .. "]")
end
end)
return userRouter
|
require "classes.constants.screen"
require "classes.samples.Animation.Runner"
require "classes.samples.Animation.Transition1"
require "classes.samples.Animation.Transition2"
DataAnimationList={}
function DataAnimationList:new()
local this = {
{img = "", title = "Runner", isList = false, execute=function() return Runner:new() end},
{img = "", title = "Transition1", isList = false, execute=function() return Transition1:new() end},
{img = "", title = "Transition2", isList = false, execute=function() return Transition2:new() end},
}
local public = this
local private = {}
function private.DataAnimationList()
this.isList = true
this.hasBackButton = true
end
function public.goCurrent()
return DataAnimationList:new()
end
function public.goBack()
return DataAllTopicList:new()
end
function public:destroy()
this:removeSelf()
this = nil
end
private.DataAnimationList()
return this
end
return DataAnimationList
|
local Behavior = CreateAIBehavior("MutantAttack", "MutantBase",
{
Alertness = 2,
Constructor = function(self, entity)
self:Log("$9MutantAttack");
-- Make sure we have a weapon equipped - even if it's just the fists
-- local weapon = entity.inventory:GetCurrentItem();
-- if (weapon == nil or weapon.class ~= entity.primaryWeapon) then
-- entity.actor:SelectItemByName(entity.primaryWeapon);
-- end
--AI.SetContinuousMotion(entity.id, true)
-- entity:SelectPipe(0, "MutantMeleeAttackStart")
-- entity.stopContinuousMotionTimer = Script.SetTimer(1000, function() AI.SetContinuousMotion(entity.id, false) entity.stopContinuousMotionTimer = nil end)
entity:Melee()
end,
Destructor = function(self, entity)
self:Log("$9~MutantAttack");
--AI.SetContinuousMotion(entity.id, false)
-- entity:SafeKillTimer(entity.stopContinuousMotionTimer)
end,
OnMeleeDone = function(self, entity)
self:Log("$9MutantAttack::OnMeleeDone");
if (AI.GetRangeState(entity.id, entity.meleeRangeID) == OutsideRange or AI.GetTargetType(entity.id) ~= AITARGET_ENEMY ) then
self:LeaveMeleeAttack(entity)
else
self:LeaveMeleeAttack(entity)
-- entity:Melee()
end
end,
-- Melee action initiated
OnMeleeExecuted = function(self, entity)
self:Log("$9MutantAttack::OnMeleeExecuted");
AI.Animation(entity.id, AIANIM_ACTION, "meleeAttack");
entity:SelectPipe(0, "MutantMeleeAttackPerforming")
end,
OnMeleeFailed = function(self, entity)
self:Log("$9MutantAttack::OnMeleeFailed");
self:LeaveMeleeAttack(entity)
end,
OnMeleeWaitDone = function(self, entity)
self:Log("$9MutantAttack::OnMeleeWaitDone");
self:LeaveMeleeAttack(entity)
end,
LeaveMeleeAttack = function(self, entity)
self:Log("$9MutantAttack::LeaveMeleeAttack");
--entity:CancelPursue()
AI.SetBehaviorVariable(entity.id, "Attack", false)
AI.Animation(entity.id, AIANIM_ACTION, "idle");
end,
})
|
return {
armarch = {
acceleration = 0.01,
airhoverfactor = 0,
airstrafe = false,
blocking = false,
brakerate = 0.04,
buildcostenergy = 12192415,
buildcostmetal = 1159725,
builder = false,
buildpic = "armarch.dds",
buildtime = 17500000,
canattack = true,
canfly = true,
canguard = true,
canmove = true,
canpatrol = true,
canstop = 1,
category = "ALL MOBILE SUPERSHIP SURFACE VTOL",
collide = false,
collisionvolumeoffsets = "0 0 0",
collisionvolumescales = "460 200 800",
collisionvolumetype = "CylZ",
corpse = "dead",
cruisealt = 50,
description = "Titan AeroShip",
dontland = 1,
energystorage = 10000,
explodeas = "MEGA_BLAST",
footprintx = 25,
footprintz = 32,
hoverattack = true,
idleautoheal = 5,
idletime = 1800,
losemitheight = 120,
mass = 1159725,
maxdamage = 3000150,
maxslope = 10,
maxvelocity = 0.9,
maxwaterdepth = 255,
metalstorage = 1000,
name = "ARCH",
objectname = "armarch",
radardistance = 0,
radaremitheight = 120,
selfdestructas = "MEGA_BLAST",
selfdestructcountdown = 10,
sightdistance = 1400,
turninplaceanglelimit = 360,
turninplacespeedlimit = 0.627,
turnrate = 90,
unitname = "armarch",
customparams = {
buildpic = "armarch.dds",
faction = "ARM",
},
featuredefs = {
dead = {
blocking = true,
damage = 212731,
description = "ARCH Wreckage",
footprintx = 25,
footprintz = 25,
metal = 721250,
object = "armarch_dead",
reclaimable = true,
customparams = {
fromunit = 1,
},
},
},
sfxtypes = {
pieceexplosiongenerators = {
[1] = "piecetrail0",
[2] = "piecetrail1",
[3] = "piecetrail2",
[4] = "piecetrail3",
[5] = "piecetrail4",
[6] = "piecetrail6",
},
},
sounds = {
canceldestruct = "cancel2",
underattack = "warning1",
arrived = {
[1] = "bigstop",
},
cant = {
[1] = "cantdo4",
},
count = {
[1] = "count6",
[2] = "count5",
[3] = "count4",
[4] = "count3",
[5] = "count2",
[6] = "count1",
},
ok = {
[1] = "biggo",
},
select = {
[1] = "bigsel",
},
},
weapondefs = {
k777blaster = {
areaofeffect = 16,
beamtime = 0.75,
craterareaofeffect = 0,
craterboost = 0,
cratermult = 0,
energypershot = 5000,
--explosiongenerator = "custom:hope_lightning",
firestarter = 90,
impactonly = 1,
impulseboost = 0,
impulsefactor = 0,
name = "Krypto Blaster",
noselfdamage = true,
range = 1400,
reloadtime = 1,
rgbcolor = "0.5 0.4 1.0",
soundhitdry = "",
soundhitwet = "sizzle",
soundhitwetvolume = 0.5,
soundstart = "krypto",
soundtrigger = 1,
texture1 = "strike",
texture2 = "null",
texture3 = "null",
texture4 = "null",
thickness = 20,
turret = true,
weapontype = "BeamLaser",
customparams = {
light_mult = 1.8,
light_radius_mult = 1.2,
},
damage = {
commanders = 1125,
default = 4500,
subs = 5,
},
},
ultimate_lightning = {
areaofeffect = 18,
avoidfeature = false,
beamttl = 14,
craterareaofeffect = 0,
craterboost = 0,
cratermult = 0,
duration = 0.3,
energypershot = 25000,
explosiongenerator = "custom:tlllighning_exp",
firestarter = 50,
impactonly = 1,
impulseboost = 0,
impulsefactor = 0,
intensity = 12,
name = "LightningGun",
noselfdamage = true,
projectiles = 10,
range = 1700,
reloadtime = 3,
rgbcolor = "0.5 0.5 1",
soundstart = "tll_lightning",
soundtrigger = true,
targetmoveerror = 0.3,
texture1 = "strike",
thickness = 5,
turret = true,
weapontype = "LightningCannon",
weaponvelocity = 1500,
customparams = {
light_mult = 1.4,
light_radius_mult = 0.9,
},
damage = {
commanders = 2400,
default = 2400,
subs = 5,
},
},
multi_rocket = {
areaofeffect = 80,
avoidfeature = false,
cegtag = "armstartbursttrail",
craterareaofeffect = 0,
craterboost = 0,
cratermult = 0,
explosiongenerator = "custom:incendiary_explosion_small",
firestarter = 70,
flighttime = 6,
impulseboost = 0,
impulsefactor = 0,
metalpershot = 0,
model = "weapon_starburstl",
name = "Heavy Rockets2",
range = 1400,
reloadtime = 0.5,
rgbcolor = "1.000 0.000 0.000",
smoketrail = false,
soundhitdry = "xplosml2",
soundhitwet = "splssml",
soundhitwetvolume = 0.5,
soundstart = "rocklit1",
startvelocity = 250,
targetable = 16,
texture1 = "null",
texture2 = "null",
texture3 = "null",
texture4 = "null",
tolerance = 9000,
tracks = true,
turnrate = 63000,
weaponacceleration = 200,
weapontimer = 2.5,
weapontype = "StarburstLauncher",
weaponvelocity = 750,
damage = {
default = 960,
subs = 5,
},
},
},
weapons = {
[1] = {
badtargetcategory = "SMALL TINY",
def = "ULTIMATE_LIGHTNING",
maindir = "0 0 -1",
maxangledif = 270,
onlytargetcategory = "SURFACE",
},
[2] = {
badtargetcategory = "SMALL TINY",
def = "ULTIMATE_LIGHTNING",
maindir = "0 0 1",
maxangledif = 270,
onlytargetcategory = "SURFACE",
},
[3] = {
badtargetcategory = "SMALL TINY",
def = "ULTIMATE_LIGHTNING",
maindir = "-1 0 0",
maxangledif = 270,
onlytargetcategory = "SURFACE",
},
[4] = {
badtargetcategory = "SMALL TINY",
def = "ULTIMATE_LIGHTNING",
maindir = "1 0 0",
maxangledif = 270,
onlytargetcategory = "SURFACE",
},
[5] = {
badtargetcategory = "MEDIUM SMALL TINY",
def = "k777blaster",
maindir = "0 0 1",
maxangledif = 200,
onlytargetcategory = "SURFACE",
},
[6] = {
badtargetcategory = "MEDIUM SMALL TINY",
def = "k777blaster",
maindir = "0 0 -1",
maxangledif = 200,
onlytargetcategory = "SURFACE",
},
[7] = {
badtargetcategory = "MEDIUM SMALL TINY",
def = "k777blaster",
maindir = "-1 0 0",
maxangledif = 200,
onlytargetcategory = "SURFACE",
},
[8] = {
badtargetcategory = "MEDIUM SMALL TINY",
def = "k777blaster",
maindir = "1 0 0",
maxangledif = 200,
onlytargetcategory = "SURFACE",
},
[9] = {
def = "MULTI_ROCKET",
},
},
},
}
|
cc = cc or {}
---LayerRadialGradient object
---@class LayerRadialGradient : Layer
local LayerRadialGradient = {}
cc.LayerRadialGradient = LayerRadialGradient
--------------------------------
--
---@return color4b_table
function LayerRadialGradient:getStartColor() end
--------------------------------
--
---@return BlendFunc
function LayerRadialGradient:getBlendFunc() end
--------------------------------
--
---@return color3b_table
function LayerRadialGradient:getStartColor3B() end
--------------------------------
--
---@return char
function LayerRadialGradient:getStartOpacity() end
--------------------------------
--
---@param center vec2_table
---@return LayerRadialGradient
function LayerRadialGradient:setCenter(center) end
--------------------------------
--
---@return color4b_table
function LayerRadialGradient:getEndColor() end
--------------------------------
--
---@param opacity char
---@return LayerRadialGradient
function LayerRadialGradient:setStartOpacity(opacity) end
--------------------------------
--
---@return vec2_table
function LayerRadialGradient:getCenter() end
--------------------------------
--
---@param opacity char
---@return LayerRadialGradient
function LayerRadialGradient:setEndOpacity(opacity) end
--------------------------------
--
---@param expand float
---@return LayerRadialGradient
function LayerRadialGradient:setExpand(expand) end
--------------------------------
--
---@return char
function LayerRadialGradient:getEndOpacity() end
--------------------------------
--
---@param startColor color4b_table
---@param endColor color4b_table
---@param radius float
---@param center vec2_table
---@param expand float
---@return bool
function LayerRadialGradient:initWithColor(startColor, endColor, radius, center, expand) end
--------------------------------
---@overload fun(color4b_table):LayerRadialGradient
---@overload fun(color3b_table):LayerRadialGradient
---@param color
---@return LayerRadialGradient
function LayerRadialGradient:setEndColor(color) end
--------------------------------
--
---@return color3b_table
function LayerRadialGradient:getEndColor3B() end
--------------------------------
--
---@param radius float
---@return LayerRadialGradient
function LayerRadialGradient:setRadius(radius) end
--------------------------------
---@overload fun(color4b_table):LayerRadialGradient
---@overload fun(color3b_table):LayerRadialGradient
---@param color
---@return LayerRadialGradient
function LayerRadialGradient:setStartColor(color) end
--------------------------------
--
---@return float
function LayerRadialGradient:getExpand() end
--------------------------------
--
---@param blendFunc BlendFunc
---@return LayerRadialGradient
function LayerRadialGradient:setBlendFunc(blendFunc) end
--------------------------------
--
---@return float
function LayerRadialGradient:getRadius() end
--------------------------------
---@overload fun():LayerRadialGradient
---@overload fun(color4b_table, color4b_table, float, vec2_table, float):LayerRadialGradient
---@param startColor color4b_table
---@param endColor color4b_table
---@param radius float
---@param center vec2_table
---@param expand float
---@return LayerRadialGradient
function LayerRadialGradient:create(startColor, endColor, radius, center, expand) end
--------------------------------
--
---@param renderer Renderer
---@param transform mat4_table
---@param flags int
---@return LayerRadialGradient
function LayerRadialGradient:draw(renderer, transform, flags) end
--------------------------------
--
---@param size
---@return LayerRadialGradient
function LayerRadialGradient:setContentSize(size) end
--------------------------------
--
---@return LayerRadialGradient
function LayerRadialGradient:LayerRadialGradient() end
return LayerRadialGradient
|
solution "retrocmd"
configurations {
"Debug",
"Release",
}
platforms {
"x32",
"x64",
}
language "C++"
startproject "retrocmd"
-- BEGIN GENie configuration
premake.make.makefile_ignore = true
--premake._checkgenerate = false
premake.check_paths = true
msgcompile ("Compiling $(subst ../,,$<)...")
msgcompile_objc ("Objective-C compiling $(subst ../,,$<)...")
msgresource ("Compiling resources $(subst ../,,$<)...")
msglinking ("Linking $(notdir $@)...")
msgarchiving ("Archiving $(notdir $@)...")
msgprecompile ("Precompiling $(subst ../,,$<)...")
messageskip { "SkipCreatingMessage", "SkipBuildingMessage", "SkipCleaningMessage" }
-- END GENie configuration
MODULE_DIR = path.getabsolute("../")
SRC_DIR = path.getabsolute("../src")
BGFX_DIR = path.getabsolute("../3rdparty/bgfx")
BX_DIR = path.getabsolute("../3rdparty/bx")
local BGFX_BUILD_DIR = path.join("../", "build")
local BGFX_THIRD_PARTY_DIR = path.join(BGFX_DIR, "3rdparty")
defines {
"BX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS=1"
}
dofile (path.join(BX_DIR, "scripts/toolchain.lua"))
if not toolchain(BGFX_BUILD_DIR, BGFX_THIRD_PARTY_DIR) then
return -- no action specified
end
function copyLib()
end
dofile (path.join(BGFX_DIR, "scripts", "bgfx.lua"))
group "common"
dofile (path.join(BGFX_DIR, "scripts", "example-common.lua"))
group "libs"
bgfxProject("", "StaticLib", {})
group "main"
-- MAIN Project
project ("retrocmd")
uuid (os.uuid("retrocmd"))
kind "WindowedApp"
targetdir(MODULE_DIR)
targetsuffix ""
removeflags {
"NoExceptions",
}
configuration {}
includedirs {
path.join(BX_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty"),
path.join(BGFX_DIR, "examples/common"),
path.join(SRC_DIR, ""),
path.join(SRC_DIR, "formats"),
}
files {
path.join(SRC_DIR, "main.cpp"),
path.join(SRC_DIR, "formats/file.cpp"),
path.join(SRC_DIR, "formats/file.h"),
path.join(SRC_DIR, "formats/format.h"),
path.join(SRC_DIR, "formats/images/image.cpp"),
path.join(SRC_DIR, "formats/images/image.h"),
path.join(SRC_DIR, "formats/images/atarist/big.h"),
path.join(SRC_DIR, "formats/images/atarist/pic.h"),
}
if _ACTION == "gmake" then
removebuildoptions_cpp {
"-std=c++11",
}
buildoptions_cpp {
"-x c++",
"-std=c++14",
}
end
links {
"bgfx",
"example-common",
}
configuration { "mingw*" }
targetextension ".exe"
links {
"gdi32",
"psapi",
}
configuration { "vs20*", "x32 or x64" }
links {
"gdi32",
"psapi",
}
configuration { "mingw-clang" }
kind "ConsoleApp"
configuration { "linux-*" }
links {
"X11",
"GL",
"pthread",
}
configuration { "osx" }
linkoptions {
"-framework Cocoa",
"-framework QuartzCore",
"-framework OpenGL",
"-weak_framework Metal",
}
configuration {}
strip()
|
TRIAL_LIGHTSABER = 1
TRIAL_TALK = 2
TRIAL_KILL = 3
TRIAL_HUNT = 4
TRIAL_HUNT_FACTION = 5
TRIAL_COUNCIL = 6
padawanTrialQuests = {
{
trialName = "architect",
trialType = TRIAL_TALK,
trialNpc = "devaronian_male",
trialNpcName = "Kant Graf (an architect)",
targetNpc = "trials_gungan_captain",
targetKillable = true
},
{
trialName = "artist",
trialType = TRIAL_TALK,
trialNpc = "bestine_rumor12",
trialNpcName = "Sathme Forr (an artist)",
targetNpc = "commoner",
targetKillable = false
},
{
trialName = "bad_cat",
trialType = TRIAL_KILL,
trialNpc = "bestine_capitol02",
trialNpcName = "Yvana Bailer (an actor)",
targetNpc = "bloodstained_prowler",
targetKillable = true
},
{
trialName = "chef",
trialType = TRIAL_TALK,
trialNpc = "dannik_malaan",
trialNpcName = "Seevi Nyed (a chef)",
targetNpc = "neo_cobral_overlord",
targetKillable = true
},
{
trialName = "craft_lightsaber",
trialType = TRIAL_LIGHTSABER,
},
{
trialName = "kill_baz_nitch",
trialType = TRIAL_HUNT,
trialNpc = "sullustan_male",
trialNpcName = "Menchi (an environmentalist)",
huntTarget = "baz_nitch",
huntGoal = 20
},
{
trialName = "kill_falumpaset",
trialType = TRIAL_HUNT,
trialNpc = "irenez",
trialNpcName = "Braganta (a naturalist)",
huntTarget = "falumpaset",
huntGoal = 20
},
{
trialName = "kill_sludge_panther",
trialType = TRIAL_HUNT,
trialNpc = "kima_nazith",
trialNpcName = "Luha Kellaro (an ecologist)",
huntTarget = "sludge_panther",
huntGoal = 20
},
{
trialName = "old_musician",
trialType = TRIAL_TALK,
trialNpc = "grobber",
trialNpcName = "Grizzlo (a retired musician)",
targetNpc = nil,
targetLoc = { 3468, 5, -4852, "tatooine" },
thirdTargetNpc = nil,
thirdTargetLoc = { 469, 12, 5021, "lok" }
},
{
trialName = "pannaqa",
trialType = TRIAL_TALK,
trialNpc = nil,
trialLoc = { 5291.3, 78.5, -4037.8, "dathomir", "Aurilia" },
targetNpc = "commoner",
targetKillable = false,
thirdTargetNpc = "commoner_male",
thirdTargetName = "Shendo",
thirdTargetKillable = false
},
{
trialName = "peoples_soldier",
trialType = TRIAL_KILL,
trialNpc = "marco_vahn",
trialNpcName = "Torin Gundo (an old soldier)",
targetNpc = "brigand_leader",
targetKillable = true
},
{
trialName = "politician",
trialType = TRIAL_KILL,
trialNpc = "dorn_gestros",
trialNpcName = "Kaul Dysen (a politician)",
targetNpc = "bloodseeker_mite",
targetKillable = true
},
{
trialName = "sob_story",
trialType = TRIAL_TALK,
trialNpc = "karena_keer",
trialNpcName = "Erim Thelcar",
targetNpc = "object/tangible/jedi/padawan_trials_skeleton.iff",
targetNpcName = "The remains of Josef Thelcar",
targetKillable = false
},
{
trialName = "spice_mom",
trialType = TRIAL_TALK,
trialNpc = "bestine_rumor10",
trialNpcName = "Sola Nosconda",
targetNpc = "devaronian_male",
targetNpcName = "Evif Sulp",
targetKillable = false
},
{
trialName = "surveyor",
trialType = TRIAL_KILL,
trialNpc = "bestine_rumor08",
trialNpcName = "Par Doiae (a surveyor)",
targetNpc = "sharnaff_bull",
targetKillable = true
},
{
trialName = "the_ring",
trialType = TRIAL_TALK,
trialNpc = "giaal_itotr",
trialNpcName = "Keicho",
targetNpc = "dread_pirate",
killMessage = "@jedi_trials:padawan_trials_received_the_ring",
targetKillable = true
},
}
knightTrialQuests = {
{
trialName = "tusken_raider",
trialType = TRIAL_HUNT,
huntTarget = "tusken_raider",
huntGoal = 19
},
{
trialName = "ancient_bull_rancor",
trialType = TRIAL_HUNT,
huntTarget = "ancient_bull_rancor",
huntGoal = 8
},
{
trialName = "stintaril_prowler",
trialType = TRIAL_HUNT,
huntTarget = "stintaril_prowler",
huntGoal = 8
},
{
trialName = "blurrg_raptor",
trialType = TRIAL_HUNT,
huntTarget = "blurrg_raptor",
huntGoal = 3
},
{
trialName = "enraged_kimogila",
trialType = TRIAL_HUNT,
huntTarget = "enraged_kimogila",
huntGoal = 3
},
{
trialName = "peko_peko_albatross",
trialType = TRIAL_HUNT,
huntTarget = "peko_peko_albatross",
huntGoal = 2
},
{
trialName = "graul_marauder",
trialType = TRIAL_HUNT,
huntTarget = "graul_marauder",
huntGoal = 2
},
{
trialName = "light_or_dark",
trialType = TRIAL_COUNCIL
},
{
trialName = "enemy_soldier",
trialType = TRIAL_HUNT_FACTION,
rebelTarget = "storm_commando",
imperialTarget = "rebel_commando",
huntGoal = 47
},
{
trialName = "high_general",
trialType = TRIAL_HUNT_FACTION,
rebelTarget = "imperial_surface_marshal;imperial_high_general;imperial_general",
imperialTarget = "rebel_high_general;rebel_surface_marshal;rebel_general",
huntGoal = 22
},
{
trialName = "corvette_officer",
trialType = TRIAL_HUNT_FACTION,
rebelTarget = "stormtrooper_novatrooper_elite_commander",
imperialTarget = "corvette_rebel_rear_admiral",
huntGoal = 4
},
{
trialName = "geonosian_bunker_acklay",
trialType = TRIAL_HUNT,
huntTarget = "geonosian_acklay_bunker_boss",
huntGoal = 1
},
{
trialName = "nightsister_protector",
trialType = TRIAL_HUNT,
huntTarget = "nightsister_protector",
huntGoal = 1
},
{
trialName = "kiin_dray",
trialType = TRIAL_HUNT,
huntTarget = "gaping_spider_recluse_giant_kiin_dray",
huntGoal = 1
},
{
trialName = "giant_canyon_krayt",
trialType = TRIAL_HUNT,
huntTarget = "giant_canyon_krayt_dragon",
huntGoal = 1
},
}
trialsCivilizedPlanets = { "corellia", "naboo", "rori", "talus", "tatooine" }
trialsCivilizedPlanetCities = {
corellia = { "coronet", "tyrena", "kor_vella", "doaba_guerfel", "bela_vistal" },
naboo = { "theed", "moenia", "keren", "kaadara", "deeja_peak" },
rori = { "narmle", "restuss" },
talus = { "dearic", "nashal" },
tatooine = { "bestine", "mos_espa", "mos_eisley", "mos_entha" }
}
-- x, y, radius
trialsCivilizedNpcSpawnPoints = {
corellia = {
coronet = {
{ -14, -4619, 150 },
{ -170, -4462, 200 },
{ -327, -4596, 150 },
{ -107, -4320, 150 }
},
tyrena = {
{ -5132, -2426, 175 },
{ -5535, -2701, 125 }
},
kor_vella = {
{ -3130, 2798, 20 },
{ -3332, 3271, 30 },
{ -3473, 3149, 60 },
{ -3403, 3026, 20 },
{ -3673, 3107, 30 },
{ -3771, 3207, 30 }
},
doaba_guerfel = {
{ 3325, 5504, 40 },
{ 3214, 5348, 100 },
{ 3137, 5172, 80 },
{ 3180, 4985, 30 }
},
bela_vistal = {
{ 6707, -5894, 30 },
{ 6793, -5733, 100 },
{ 6712, -5574, 20 },
{ 6929, -5551, 20 }
}
},
naboo = {
theed = {
{ -4675, 3970, 50 },
{ -4607, 4110, 40 },
{ -4926, 4027, 40 },
{ -5173, 4225, 40 },
{ -5426, 4150, 75 },
{ -5538, 4307, 60 },
{ -5948, 4308, 50 },
{ -5801, 4131, 45 }
},
moenia = {
{ 4892, -4842, 50 },
{ 4961, -4948, 40 },
{ 4755, -4948, 60 },
{ 4698, -4889, 30 }
},
keren = {
{ 1677, 2950, 20 },
{ 1714, 2664, 75 },
{ 1780, 2519, 60 },
{ 1934, 2711, 50 },
{ 1986, 2479, 60 }
},
kaadara = {
{ 5138, 6630, 40 },
{ 4987, 6761, 40 },
{ 5164, 6776, 60 }
},
deeja_peak = {
{ 5114, -1503, 30 },
{ 5027, -1444, 30 },
{ 4959, -1517, 30 }
}
},
rori = {
narmle = {
{ -5354, -2079, 20 },
{ -5412, -2238, 20 },
{ -5215, -2252, 50 },
{ -5067, -2303, 75 },
{ -5151, -2461, 60 }
},
restuss = {
{ 5434, 5589, 60 },
{ 5216, 5627, 80 },
{ 5186, 5751, 60 },
{ 5394, 5840, 40 }
}
},
talus = {
dearic = {
{ 202, -2846, 30 },
{ 195, -3040, 40 },
{ 435, -3063, 100 },
{ 526, -2946, 100 },
{ 667, -3066, 80 }
},
nashal = {
{ 4364, 5340, 100 },
{ 4491, 5188, 40 },
{ 4365, 5163, 15 },
{ 4223, 5132, 25 },
{ 4095, 5280, 25 }
}
},
tatooine = {
bestine = {
{ -1401, -3725, 20 },
{ -1344, -3911, 20 },
{ -1219, -3565, 100 },
{ -1095, -3584, 75 },
{ -1064, -3692, 40 }
},
mos_espa = {
{ -2896, 2009, 150 },
{ -3057, 2161, 100 },
{ -2905, 2340, 200 }
},
mos_eisley = {
{ 3495, -4828, 100 },
{ 3434, -4952, 75 },
{ 3387, -4715, 200 }
},
mos_entha = {
{ 1332, 3114, 100 },
{ 1352, 3259, 150 },
{ 1413, 3341, 150 },
{ 1507, 3097, 100 },
{ 1702, 3090, 50 }
}
}
}
|
--HELP: \b6Usage: \b16programs \n
-- \b6Description: \b7Lists readily acessible programs
local tbl = {}
for i = 1, #shell.config.path do
if shell.config.path[i] ~= "." then
local dir = fs.list(shell.config.path[i]) or ""
for j = 1, #dir do
local name = dir[j]
if name:sub(1, 1) ~= "." then
local ctp = name:find("%.")
if ctp then name = name:sub(1, ctp - 1) end
tbl[#tbl + 1] = name
end
end
end
end
local tabular = {12, tbl}
shell.tabulate(unpack(tabular))
print()
|
local display = false
local id = 0
RegisterNUICallback("error", function(data)
SetDisplay(false)
end)
RegisterCommand("announce", function(source, args)
local args = table.concat(args, " ")
if args ~= nil then
TriggerEvent('lp_notify', "Announce", args, 10)
end
end)
RegisterCommand("id", function(source, args)
id = GetPlayerServerId(NetworkGetEntityOwner(GetPlayerPed(-1)))
TriggerEvent('lp_notify', "Announce", "ID: " ..id, 5)
end)
RegisterNetEvent('lp_notify')
AddEventHandler('lp_notify', function(title, message, seconds)
SendNUIMessage({
type = "ui",
title = title,
message = message,
seconds = seconds,
})
PlaySoundFrontend(-1, "ATM_WINDOW", "HUD_FRONTEND_DEFAULT_SOUNDSET", 1)
end)
|
-- it should be invalid
local pl = luambda.player.find_by_index(1)
print(pl:is_valid())
-- a hook example
luambda.register_hook("client_connect", function(player, name, ip)
player:print_console(string.format("Player %s is connecting from %s.", name, ip))
print("[LUA] Player " .. name .. " is connecting from " .. ip .. ".")
end)
|
-- http://lua-users.org/wiki/CopyTable
function shallowcopy(orig)
local orig_type = type(orig)
local copy
if orig_type == 'table' then
copy = {}
for orig_key, orig_value in pairs(orig) do
copy[orig_key] = orig_value
end
else -- number, string, boolean, etc
copy = orig
end
return copy
end
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.