[Release] BadgerBankRobbery

Version 1.0
This is a really simple script that allows realistic robberies of the banks. Currently I only have the Paleto bank and harmony Fleeca bank within it. I may add the 24/7 of Sandy Shores and Gun stores later on. Depending on suggestions of what other locations you guys want, I’ll see what I can do!

Basically this allows an animation of robbing the bank for users and fun RP for all on the server.

Banks reset every 15 minutes after a bank robbery, so this gives the cops a break (this time is subject to increase/decrease if you find it in the server.lua and simply change the value ‘15’ to another value). Once you start breaking into safes, beware that you cannot move and cannot cancel the action! This is why it’s highly suggested you rob the bank with your friends/hooligans! They will need to protect you while you steal the goods! How do you rob the bank? Very easy, just walk up to the red circle and press the ‘E’ key! Once you start breaking in, the silent alarm will be triggered and everyone will know the bank is being robbed! I’ve shown a demo gif below.

REQUIRED DEPENDENCY
You must have this properly installed for this script to work correctly → [Dev-Resource] Mythic Progress Bar

Config

--- Config ---
timeToRob = 60 -- In seconds
robbingStr = "Breaking into safes..."

harmonySilentAlarm = "^1^*A silent alarm has been triggered at ^5Harmony Fleeca Bank^1! All police forces are required to assist!"
paletoSilentAlarm = "^1^*A silent alarm has been triggered at ^5Paleto Bank^1! All police forces are required to assist!"

Download
BadgerBankRobbery

Installation

  1. Download BadgerBankRobbery
  2. Extract the .zip and place the folder in your /resources/ of your Fivem server
  3. Make sure you add “start BadgerBankRobbery” in your server.cfg
  4. Enjoy :slight_smile:

My Other Work

DiscordChatRoles

DiscordAcePerms

SandyVehiclesRestrict

DiscordTagIDs

DiscordVehiclesRestrict

DiscordPedPerms

BadgerAnims

DiscordWeaponPerms

BadgerTools

BadgerBankRobbery

VehicleTrustSystem

Version 2.0
Credits to @TiggyTheTiger for his pull request

All stores/ammunations now can be robbed as well!

New Config

--- Config ---
timeToRob = 60 -- In seconds
robbingStr = "Breaking into the Safe..."
enableAmmunation = true -- Enables all Ammunations to be robbed.
enable247 = true -- Enables all 24/7's to be robbed.
enableGasStation = true -- Enables all Gas Stations to be robbed.
enableBank = true -- Enables all Banks to be robbed.
enableLiquor = true -- Enables all Liquor Stores to be robbed.

paletobankSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Blaine County Savings Bank in Paleto Bay^1! All police units are required to assist!"
harmonybankSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Fleeca Bank Harmony in Harmony^1! All police units are required to assist!"
banhamcanyonbankSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Bank in Banham Canyon^1! All police units are required to assist!"
pillboxbankSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Bank in Banham Canyon^1! All police units are required to assist!"

paletoammoSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Paleto Bay^1! All police units are required to assist!"
senora24SilentAlarm = "^1^*A silent alarm has been triggered at the ^524/7 on Senora Fwy // Mount Chilliad^1! All police units are required to assist!"
senora242SilentAlarm = "^1^*A silent alarm has been triggered at the ^524/7 on Senora Fwy // Grand Senora Desert^1! All police units are required to assist!"
harmony24SilentAlarm = "^1^*A silent alarm has been triggered at the ^524/7 in Harmony^1! All police units are required to assist!"
sandy24SilentAlarm = "^1^*A silent alarm has been triggered at the ^524/7 in Sandy Shores^1! All police units are required to assist!"
chumash24SilentAlarm = "^1^*A silent alarm has been triggered at the ^524/7 in Chumash^1! All police units are required to assist!"
banhamcanyon24SilentAlarm = "^1^*A silent alarm has been triggered at the ^524/7 in Banham Canyon^1! All police units are required to assist!"
palomino24SilentAlarm = "^1^*A silent alarm has been triggered at the ^524/7 on Palomino Fwy^1! All police units are required to assist!"
vinewood24SilentAlarm = "^1^*A silent alarm has been triggered at the ^524/7 in Vinewood^1! All police units are required to assist!"
strawberry24SilentAlarm = "^1^*A silent alarm has been triggered at the ^524/7 in Strawberry^1! All police units are required to assist!"

sandyammoSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Sandy Shores^1! All police units are required to assist!"
ammo68SilentAlarm = "^1^*A silent alarm has been triggered at the ^5Ammunation on Route 68^1! All police units are required to assist!"
chumashammoSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Chumash^1! All police units are required to assist!"
palominoammoSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Ammunation on Palomino Fwy^1! All police units are required to assist!"
hawickammoSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Hawick^1! All police units are required to assist!"
littleseoulammoSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Little Seoul^1! All police units are required to assist!"
pillboxammoSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Pillbox Hill^1! All police units are required to assist!"
cypressammoSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Cypress Flats^1! All police units are required to assist!"

grapeseedltdSilentAlarm = "^1^*A silent alarm has been triggered at the ^5LTD in Grapeseed^1! All police units are required to assist!"
richmanltdSilentAlarm = "^1^*A silent alarm has been triggered at the ^5LTD in Richman Glen^1! All police units are required to assist!"
littleseoulltdSilentAlarm = "^1^*A silent alarm has been triggered at the ^5LTD in Little Seoul^1! All police units are required to assist!"
davisltdSilentAlarm = "^1^*A silent alarm has been triggered at the ^5LTD in Davis^1! All police units are required to assist!"
mirrorparkltdSilentAlarm = "^1^*A silent alarm has been triggered at the ^5LTD in Mirror Park^1! All police units are required to assist!"

vespucchiliquorSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Liquor Store in Vespucci Canals^1! All police units are required to assist!"
harmonyliquorSilentAlarm = "^1^*A silent alarm has been triggered at the ^5Liquor Store in Harmony^1! All police units are required to assist!"

Version 3.0
Basically @Tiggythetiger fixed his original code and made it more pretty. He also made a new config file! You can change all values in the neat config.lua! Thanks so much Tiggy!

config = {
	timeToRob = 60, -- In seconds
	robbingStr = "Breaking into the Safe...",

	displayBlips = true, -- Makes it so when a robbery is started a blip is created and flashes.

	enableAmmunations = true, -- Enables all Ammunations to be robbed.
	enable247 = true, -- Enables all 24/7's to be robbed.
	enableGasStations = true, -- Enables all Gas Stations to be robbed.
	enableBanks = true, -- Enables all Banks to be robbed.
	enableLiquor = true, -- Enables all Liquor Stores to be robbed.

	bankcoords = {
		{name = "Paleto Bank", yeet = "C", alarm = "^1^*A silent alarm has been triggered at the ^5Blaine County Savings Bank in Paleto Bay^1! All police units are required to assist!", 
		x = -104.42, y = 6476.56, z=32.51-1.7},

		{name = "Harmony Bank", yeet = "C", alarm = "^1^*A silent alarm has been triggered at the ^5Fleeca Bank Harmony in Harmony^1! All police units are required to assist!", 
		x = 1177.32, y = 2711.79, z = 38.1 - 1},

		{name = "Banham Canyon Bank", yeet = "C", alarm = "^1^*A silent alarm has been triggered at the ^5Bank in Banham Canyon^1! All police units are required to assist!", 
		x = -2957.5, y = 480.97, z = 15.71 - 1},

		{name = "Pillbox Hill Bank", yeet = "C", alarm = "^1^*A silent alarm has been triggered at the ^5Bank in Pillbox Hill^1! All police units are required to assist!", 
		x = 146.46, y = -1044.67, z = 29.38 - 1},
	},

	ammunationcoords = {
		{name = "Paleto Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Paleto Bay^1! All police units are required to assist!", 
		x = -334.27, y = 6082.13, z = 31.45 - 1},

		{name = "Sandy Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Sandy Shores^1! All police units are required to assist!", 
		x = 1689.63, y = 3757.84, z = 34.71 - 1},

		{name = "Route 68 Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation on Route 68^1! All police units are required to assist!", 
		x = -1121.77, y = 2697.31, z = 18.55 - 1},

		{name = "Chumash Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Chumash^1! All police units are required to assist!", 
		x = -3174.94, y = 1084.96, z = 20.84 - 1},

		{name = "Palomino Fwy Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation on Palomino Fwy^1! All police units are required to assist!", 
		x = 2571.7, y = 292.58, z = 108.73 - 1},

		{name = "Hawick Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Hawick^1! All police units are required to assist!", 
		x = 254.94, y = -47.05, z = 69.94 - 1},

		{name = "Little Seoul Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Little Seoul^1! All police units are required to assist!", 
		x = -666.1, y = -933.72, z = 21.83 - 1},

		{name = "Pillbox Hill Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Pillbox Hill^1! All police units are required to assist!", 
		x = 12.62, y = -1105.23, z = 29.8 - 1},

		{name = "Cypress Flats Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Cypress Flats^1! All police units are required to assist!", 
		x = 819.6, y = -2155.81, z = 29.62 - 1},

		{name = "Morningwood Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in Morningwood^1! All police units are required to assist!", 
		x = -1303.41, y = -391.09, z = 36.7 - 1},

		{name = "La Mesa Ammunation", alarm = "^1^*A silent alarm has been triggered at the ^5Ammunation in La Mesa^1! All police units are required to assist!", 
		x = 846.1, y = -1035.17, z = 28.26 - 1},
	},

	shopcoords = {
		{name = "24/7 Senora Fwy // Mount Chilliad", alarm = "^1^*A silent alarm has been triggered at the ^524/7 on Senora Fwy // Mount Chilliad^1! All police units are required to assist!", 
		x = 1734.54, y = 6420.27, z = 35.04 - 1},

		{name = "24/7 on Senora Fwy // Grand Senora Desert", alarm = "^1^*A silent alarm has been triggered at the ^524/7 on Senora Fwy // Grand Senora Desert^1! All police units are required to assist!", 
		x = 2673.21, y = 3286.36, z = 55.24 - 1},

		{name = "Harmony 24/7", alarm = "^1^*A silent alarm has been triggered at the ^524/7 in Harmony^1! All police units are required to assist!", 
		x = 546.35, y = 2663.35, z = 42.16 - 1},

		{name = "Sandy 24/7", alarm = "^1^*A silent alarm has been triggered at the ^524/7 in Sandy Shores^1! All police units are required to assist!", 
		x = 1960.71, y = 3748.53, z = 32.36 - 1},

		{name = "Chumash 24/7", alarm = "^1^*A silent alarm has been triggered at the ^524/7 in Chumash^1! All police units are required to assist!", 
		x = -3249.52, y = 1004.41, z = 12.83 - 1},

		{name = "Banham Canyon 24/7", alarm = "^1^*A silent alarm has been triggered at the ^524/7 in Banham Canyon^1! All police units are required to assist!", 
		x = -3047.39, y = 585.85, z = 7.91 - 1},

		{name = "Palomino Fwy 24/7", alarm = "^1^*A silent alarm has been triggered at the ^524/7 on Palomino Fwy^1! All police units are required to assist!", 
		x = 2549.84, y = 384.93, z = 108.64 - 1},

		{name = "Vinewood 24/7", alarm = "^1^*A silent alarm has been triggered at the ^524/7 in Vinewood^1! All police units are required to assist!", 
		x = 377.99, y = 332.96, z = 103.57 - 1},

		{name = "Strawberry 24/7", alarm = "^1^*A silent alarm has been triggered at the ^524/7 in Strawberry^1! All police units are required to assist!", 
		x = 28.71, y = -1339.51, z = 29.5 - 1},
	},

	ltdcoords = {
		{name = "Grapeseed LTD", alarm = "^1^*A silent alarm has been triggered at the ^5LTD in Grapeseed^1! All police units are required to assist!", 
		x = 1707.27, y = 4919.77, z = 42.09 - 1},

		{name = "Richman Glen LTD", alarm = "^1^*A silent alarm has been triggered at the ^5LTD in Richman Glen^1! All police units are required to assist!", 
		x = -1828.57, y = 799.13, z = 138.20 - 1},

		{name = "Little Seoul LTD", alarm = "^1^*A silent alarm has been triggered at the ^5LTD in Little Seoul^1! All police units are required to assist!", 
		x = -709.11, y = -904.12, z = 19.22 - 1},

		{name = "Davis LTD", alarm = "^1^*A silent alarm has been triggered at the ^5LTD in Davis^1! All police units are required to assist!", 
		x = -42.99, y = -1748.79, z = 29.42 - 1},

		{name = "Mirror Park LTD", alarm = "^1^*A silent alarm has been triggered at the ^5LTD in Mirror Park^1! All police units are required to assist!", 
		x = 1160.38, y = -313.88, z = 69.21 - 1},
	},

	liquorcoords = {
		{name = "Vespucci Canals Liquor Store", alarm = "^1^*A silent alarm has been triggered at the ^5Liquor Store in Vespucci Canals^1! All police units are required to assist!", 
		x = -1220.25, y = -915.79, z = 11.33 - 1},

		{name = "Harmony Liquor Store", alarm = "^1^*A silent alarm has been triggered at the ^5Liquor Store in Harmony^1! All police units are required to assist!", 
		x = 1168.83, y = 2718.03, z = 37.16 - 1},
	}

	
}
21 Likes

Thanks for this!

1 Like

im having an issue in my server with this! When its done with breaking into the safe nothing pops up for me and nothing can undo the animation! please help.

Something other then discord lol. But it looks nice.

A standalone script that’s dependent on another script lol, good script though.

1 Like

Great Script! however Im having a problem, when I rob the safe it will follow thorugh with the task, animation and all but when it finishes, the animation continues and i cant move. any fixes?

A good point lol… When I put that in the title, I moreso was thinking about ESX and stuff being required for most scripts with animations. I’ll edit the title now though cause you’re right it’s technically not standalone, sorry about that.

1 Like

Never had this issue on my server, I’d make sure you installed mythic’s script correctly. I do know that happens if a server is not restarted with the scripts. Just starting them in console will run into that error.

Restart the server, mythic’s script can’t be started with “start” in console, it’ll run into that bug otherwise

Lol yes… Don’t have much more discord things to do haha

just to clarify, i just need to type “start resourcename” in the console when the server starts?

No. After installing mythic’s script, the server requires a restart for his script to work correctly

oh, Yeah thats what Ive done, I always have my server down when installing scripts unless im fine tuning a menu or something. Let me reinstall both scripts and ill see if that fixes anything

Okay so the problem is still persistent, any suggestions

What does your config part look like?

Stuff

— BadgerBankRobbery —

— Config —
timeToRob = 60 – In seconds
robbingStr = “Breaching Vault”

harmonySilentAlarm = “^1^[DISPATCH]: ^r^3 A Silent Alarm Has Been Triggered At ^1Harmony Fleeca, Postal 4022.^3 All Units Respond ^1Code 3^3."
paletoSilentAlarm = "^1^
[DISPATCH]: ^r^3 A Silent Alarm Has Been Triggered At ^1Blaine County Savings Union, Postal 1055.^3 All Units Respond ^1Code 3^3.”

— Client —
–[[
Paleto Bank Robbery Coords: X= -104.42 Y=6476.56 Z=32.51

Harmony Bank Robbery Coords: X=1177.32 Y=2711.79 Z=38.1

]]–
robberyActive = false
RegisterNetEvent(‘BadgerBankRobbery:IsActive:Return’)
AddEventHandler(‘BadgerBankRobbery:IsActive:Return’, function(bool)
robberyActive = bool
end)

Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
– Draw the markers
local xPaleto = -104.42
local yPaleto = 6476.56
local zPaleto = 32.51 - 1.7

	local xHarmony = 1177.32
	local yHarmony = 2711.79 
	local zHarmony = 38.1 - 1
	if not robberyActive then
		-- Paleto:
		DrawMarker(27, xPaleto, yPaleto, zPaleto, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 5.0, .2, 255, 0, 0, 255, false, true, 2, false, nil, nil, false)
		--DrawMarker(Config.MarkerType, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.0, 3.0, 1.0, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, nil, nil, false)
		-- Harmony:
		DrawMarker(27, xHarmony, yHarmony, zHarmony, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.0, 3.0, .2, 255, 0, 0, 255, false, true, 2, false, nil, nil, false)
		-- Check if player is in, if they are, have them rob the bank
		-- Paleto
		local coords = GetEntityCoords(GetPlayerPed(-1))
		if GetDistanceBetweenCoords(coords.x, coords.y, coords.z, xPaleto, yPaleto, zPaleto) < 5.0 then
			DisplayNotification('~r~Press the ~w~E ~r~key to rob the bank')
			if IsControlJustReleased(0, 38) then -- E key
				TriggerServerEvent('PrintBR:PrintMessage', paletoSilentAlarm)
				TriggerServerEvent('BadgerBankRobbery:SetActive', true)
				TriggerEvent("mythic_progbar:client:progress", {
					name = "RobbingTheBank",
					duration = (1000 * timeToRob), -- 1000ms * x seconds
					label = robbingStr,
					useWhileDead = false,
					canCancel = false,
					controlDisables = {
						disableMovement = true,
						disableCarMovement = true,
						disableMouse = false,
						disableCombat = true,
					},
					animation = {
						animDict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@",
						anim = "machinic_loop_mechandplayer",
						flags = 49,
					},
					prop = {
						model = "prop_ing_crowbar",
					}
				}, function(status)
					if not status then
						-- Do Something If Event Wasn't Cancelled
						DisplayNotification('~g~Success: You Have Collected The Money.')
					end
				end)
			end
		end
		-- Harmony
		if GetDistanceBetweenCoords(coords.x, coords.y, coords.z, xHarmony, yHarmony, zHarmony) < 3.0 then
			DisplayNotification('~r~Press the ~w~E ~r~key to rob the bank')
			if IsControlJustReleased(0, 38) then -- E key
				TriggerServerEvent('PrintBR:PrintMessage', harmonySilentAlarm)
				TriggerServerEvent('BadgerBankRobbery:SetActive', true)
				TriggerEvent("mythic_progbar:client:progress", {
					name = "RobbingTheBank",
					duration = (1000 * timeToRob), -- 1000ms * x seconds
					label = robbingStr,
					useWhileDead = false,
					canCancel = false,
					controlDisables = {
						disableMovement = true,
						disableCarMovement = true,
						disableMouse = false,
						disableCombat = true,
					},
					animation = {
						animDict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@",
						anim = "machinic_loop_mechandplayer",
						flags = 49,
					},
					prop = {
						model = "prop_ing_crowbar",
					}
				}, function(status)
					if not status then
						-- Do Something If Event Wasn't Cancelled
						DisplayNotification('~g~Success: You Have Collected The Money.')
					end
				end)
			end
		end
	end
end

end)
function DisplayNotification( text )
SetNotificationTextEntry( “STRING” )
AddTextComponentString( text )
DrawNotification( false, false )
end
Citizen.CreateThread(function()
while true do
Citizen.Wait(1000)
TriggerServerEvent(‘BadgerBankRobbery:IsActive’)
end
end)

I would think that may be a problem with Mythic since it works perfectly fine on my server :frowning: May want to contact the developer of it

alrighty

good work :kissing_heart:

NEW UPDATE

Thanks to @TiggyTheTiger All stores/ammunations and stuff are added as well to be robbed! He also made it configurable to turn these off and on as well as change the messages! It’s not the most efficient code I will admit, but it gets the job done! Thanks man!

1 Like