Advertisement
Guest User

Untitled

a guest
Dec 6th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.70 KB | None | 0 0
  1. -- tables
  2.  
  3. 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"}
  4. local answers = {"oki", "stfu", "kid", "tenks", "lol", "kiddy", "wow", "pff", "lmao", "noob", "omg"}
  5. local random = {"if i die tell my mom i love she", "omg my heart", "i miss you"}
  6.  
  7. ------
  8. -- DO NOT EDIT CODE BELOW
  9. ------
  10.  
  11. -- functions
  12.  
  13. function table.random ( theTable )
  14. return theTable[math.random ( #theTable )]
  15. end
  16.  
  17. function findRotation(x1,y1,x2,y2)
  18. local t = -math.deg(math.atan2(x2-x1,y2-y1))
  19. if t < 0 then t = t + 360 end
  20. return t
  21. end
  22.  
  23. function playAgkRageSound()
  24. for _, v in ipairs(getElementsByType("player")) do
  25. local player = getPlayerFromName(getPlayerName(v))
  26. if isElementWithinColShape(player, colArea) then
  27. triggerClientEvent("agk_rage", player)
  28. else
  29. return
  30. end
  31. end
  32. end
  33.  
  34.  
  35. -- peds
  36.  
  37. colArea = createColSphere(-2413.0368652344, -602.43762207031, 132.5625, 10)
  38. function reviveTarek()
  39. tarek = createPed(23, -2413.0368652344, -602.43762207031, 132.5625)
  40. setElementData(tarek, "alive", true)
  41. end
  42.  
  43. addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function()
  44. reviveTarek()
  45. end)
  46.  
  47. -- Detect if anybody entered the col sphere
  48. -- Ped greets the player
  49.  
  50. addEventHandler("onColShapeHit", colArea, function(thePlayer)
  51. if getElementData(tarek, "alive") == false then
  52. destroyElement(tarek)
  53. reviveTarek()
  54. return
  55. end
  56. if getElementType(thePlayer) == "player" then
  57. setElementData(tarek, "alive", true)
  58. setElementData(tarek, "limit_value", 1)
  59. index = 1
  60. index_value = true
  61. setElementData(tarek, "limit_value", tonumber(index))
  62. local nameOfPlayer = getPlayerName(thePlayer)
  63. outputChatBox("#FFBC74Tarek: #FFFFFFhey "..nameOfPlayer.." kid", thePlayer, 255, 255, 255, true)
  64. local x, y, z = getElementPosition(tarek)
  65. local tx, ty, tz = getElementPosition(thePlayer)
  66. setPedRotation(tarek, findRotation(x, y, tx, ty))
  67. setPedAnimation(tarek)
  68. end
  69. end)
  70.  
  71. -- Ped's reaction according to what the player says
  72.  
  73. addEventHandler("onPlayerChat", root, function(message, messageType)
  74. if not messageType == 0 then
  75. return
  76. end
  77. if not isElementWithinColShape(source, colArea) then
  78. return
  79. end
  80. if not getElementData(tarek, "alive") == true then
  81. return
  82. end
  83. if getElementData(tarek, "rage") == true then
  84. return
  85. end
  86. for _, sMessage in pairs(insults) do
  87. if message == sMessage then
  88. functionA()
  89. else
  90. functionB()
  91. return
  92. end
  93. end
  94. end)
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101. function functionA()
  102. setTimer(function()
  103. local end_limit_value = 5
  104. if getElementData(tarek, "limit_value") == tonumber(end_limit_value) then
  105. setElementData(tarek, "rage", true)
  106. setPedAnimation(tarek, "graveyard", "mrnf_loop")
  107. outputChatBox("#FFBC74Tarek: #FFFFFFgtfo kiddy", source, 255, 255, 255, true)
  108. playAgkRageSound()
  109. setTimer(function()
  110. outputChatBox("#FFBC74Tarek: #FFFFFFgod get a pussy you virgin shit of peace", source, 255, 255, 255, true)
  111. end, 3000, 1)
  112. setTimer(function()
  113. outputChatBox("#FFBC74Tarek: #FFFFFFmotherfucker you mom dont want you", source, 255, 255, 255, true)
  114. setTimer(function()
  115. local x, y, z = getElementPosition(tarek)
  116. createExplosion(x, y, z, 6)
  117. createExplosion(x, y, z, 6)
  118. createExplosion(x, y, z, 6)
  119. killPed(tarek)
  120. setElementData(tarek, "alive", false)
  121. outputChatBox("Angry German Kid has exploded and killed you!", source, 255, 100, 100)
  122. setTimer(function()
  123. destroyElement(tarek)
  124. reviveTarek()
  125. setElementData(tarek, "rage", false)
  126. end, 20000, 1)
  127. end, 6000, 1)
  128. end, 2000, 1)
  129. return
  130. end
  131. outputChatBox("#FFBC74Tarek: #FFFFFF"..table.random(answers).."", source, 255, 255, 255, true)
  132. index = index + (index_value and 1 or -1)
  133. setElementData(tarek, "limit_value", tonumber(index))
  134. end, 3000, 1)
  135. end
  136.  
  137. function functionB()
  138. outputChatBox("#FFBC74Tarek: #FFFFFF"..table.random(random).."", source, 255, 255, 255, true)
  139. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement