Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- tables
- local insults = {"fuck you", "fuck off", "cry", "suck my dick", "pussy", "dick", "idiot", "whore", "dickhead", "motherfucker", "your mom sucks", "bitch", "fucker", "virgin", "peace of shit", "piece of shit", "shit of peace", "shit of piece", "retard", "gay faggot", "cunt", "gay cunt", "gay", "dicksucker", "coward", "angry german kid", "kid", "agk", "asshole"}
- local answers = {"oki", "stfu", "kid", "tenks", "lol", "kiddy", "wow", "pff", "lmao", "noob", "omg"}
- local random = {"if i die tell my mom i love she", "omg my heart", "i miss you"}
- ------
- -- DO NOT EDIT CODE BELOW
- ------
- -- functions
- function table.random ( theTable )
- return theTable[math.random ( #theTable )]
- end
- function findRotation(x1,y1,x2,y2)
- local t = -math.deg(math.atan2(x2-x1,y2-y1))
- if t < 0 then t = t + 360 end
- return t
- end
- function playAgkRageSound()
- for _, v in ipairs(getElementsByType("player")) do
- local player = getPlayerFromName(getPlayerName(v))
- if isElementWithinColShape(player, colArea) then
- triggerClientEvent("agk_rage", player)
- else
- return
- end
- end
- end
- -- peds
- colArea = createColSphere(-2413.0368652344, -602.43762207031, 132.5625, 10)
- function reviveTarek()
- tarek = createPed(23, -2413.0368652344, -602.43762207031, 132.5625)
- setElementData(tarek, "alive", true)
- end
- addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function()
- reviveTarek()
- end)
- -- Detect if anybody entered the col sphere
- -- Ped greets the player
- addEventHandler("onColShapeHit", colArea, function(thePlayer)
- if getElementData(tarek, "alive") == false then
- destroyElement(tarek)
- reviveTarek()
- return
- end
- if getElementType(thePlayer) == "player" then
- setElementData(tarek, "alive", true)
- setElementData(tarek, "limit_value", 1)
- index = 1
- index_value = true
- setElementData(tarek, "limit_value", tonumber(index))
- local nameOfPlayer = getPlayerName(thePlayer)
- outputChatBox("#FFBC74Tarek: #FFFFFFhey "..nameOfPlayer.." kid", thePlayer, 255, 255, 255, true)
- local x, y, z = getElementPosition(tarek)
- local tx, ty, tz = getElementPosition(thePlayer)
- setPedRotation(tarek, findRotation(x, y, tx, ty))
- setPedAnimation(tarek)
- end
- end)
- -- Ped's reaction according to what the player says
- addEventHandler("onPlayerChat", root, function(message, messageType)
- if not messageType == 0 then
- return
- end
- if not isElementWithinColShape(source, colArea) then
- return
- end
- if not getElementData(tarek, "alive") == true then
- return
- end
- if getElementData(tarek, "rage") == true then
- return
- end
- for _, sMessage in pairs(insults) do
- if message == sMessage then
- functionA()
- else
- functionB()
- return
- end
- end
- end)
- function functionA()
- setTimer(function()
- local end_limit_value = 5
- if getElementData(tarek, "limit_value") == tonumber(end_limit_value) then
- setElementData(tarek, "rage", true)
- setPedAnimation(tarek, "graveyard", "mrnf_loop")
- outputChatBox("#FFBC74Tarek: #FFFFFFgtfo kiddy", source, 255, 255, 255, true)
- playAgkRageSound()
- setTimer(function()
- outputChatBox("#FFBC74Tarek: #FFFFFFgod get a pussy you virgin shit of peace", source, 255, 255, 255, true)
- end, 3000, 1)
- setTimer(function()
- outputChatBox("#FFBC74Tarek: #FFFFFFmotherfucker you mom dont want you", source, 255, 255, 255, true)
- setTimer(function()
- local x, y, z = getElementPosition(tarek)
- createExplosion(x, y, z, 6)
- createExplosion(x, y, z, 6)
- createExplosion(x, y, z, 6)
- killPed(tarek)
- setElementData(tarek, "alive", false)
- outputChatBox("Angry German Kid has exploded and killed you!", source, 255, 100, 100)
- setTimer(function()
- destroyElement(tarek)
- reviveTarek()
- setElementData(tarek, "rage", false)
- end, 20000, 1)
- end, 6000, 1)
- end, 2000, 1)
- return
- end
- outputChatBox("#FFBC74Tarek: #FFFFFF"..table.random(answers).."", source, 255, 255, 255, true)
- index = index + (index_value and 1 or -1)
- setElementData(tarek, "limit_value", tonumber(index))
- end, 3000, 1)
- end
- function functionB()
- outputChatBox("#FFBC74Tarek: #FFFFFF"..table.random(random).."", source, 255, 255, 255, true)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement