Advertisement
Super_Nagga

Untitled

May 1st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.42 KB | None | 0 0
  1. player = game:service("Players").KlarcDecoy
  2. char = player.Character
  3.  
  4. local P = Instance.new("Part")
  5. P.Name = "Part"
  6. P.formFactor = "Custom"
  7. P.Size = Vector3.new(0.5,0.5,0.5)
  8. P.Locked = true
  9. P.TopSurface = 0
  10. P.BottomSurface = 0
  11.  
  12. function GenFlag(cf, scale)
  13. P.Anchored = true
  14. P.CanCollide = true
  15. for i, v in pairs(workspace:children()) do
  16. if v.Name == "NFlag" then
  17. if v.Owner.Value == player then
  18. v:remove()
  19. end
  20. end
  21. end
  22. scale = scale or 1
  23. local m = Instance.new("Model", workspace)
  24. m.Name = "NFlag"
  25.  
  26. local ob = Instance.new("ObjectValue", m)
  27. ob.Name = "Owner"
  28. ob.Value = player
  29.  
  30. local b = P:Clone()
  31. b.Parent = m
  32. b.BrickColor = BrickColor.new("Bright red")
  33. b.Size = Vector3.new(14*scale,25*scale,0.5)
  34. b.CFrame = cf
  35.  
  36. local p = P:Clone()
  37. p.Parent = m
  38. p.BrickColor = BrickColor.new("Really black")
  39. p.CFrame = cf * CFrame.new(0,25/2*scale,0) * CFrame.Angles(0,0,math.pi/2)
  40. local mesh = Instance.new("CylinderMesh", p)
  41. mesh.Scale = Vector3.new(3.5,15*2*scale,3.5)
  42. local p = P:Clone()
  43. p.Parent = m
  44. p.BrickColor = BrickColor.new("Really black")
  45. p.CFrame = cf * CFrame.new(0,25/2*scale,0) * CFrame.Angles(0,0,math.pi/2)
  46. local mesh = Instance.new("CylinderMesh", p)
  47. mesh.Scale = Vector3.new(2,21*2*scale,2)
  48.  
  49. ------ left pole ------------------------------------------------
  50. local p = P:Clone()
  51. p.Parent = m
  52. p.BrickColor = BrickColor.new("Really black")
  53. p.CFrame = cf * CFrame.new(9*scale,11.25*scale,0) * CFrame.Angles(math.pi/4.5,0,0)
  54. local mesh = Instance.new("CylinderMesh", p)
  55. mesh.Scale = Vector3.new(2.4,6*scale,2.4)
  56. mesh.Offset = Vector3.new(0,1.4*scale,0)
  57. local p = P:Clone()
  58. p.Parent = m
  59. p.BrickColor = BrickColor.new("Really black")
  60. p.CFrame = cf * CFrame.new(9*scale,11.25*scale,0) * CFrame.Angles(-math.pi/4.5,0,0)
  61. local mesh = Instance.new("CylinderMesh", p)
  62. mesh.Scale = Vector3.new(2.4,6*scale,2.4)
  63. mesh.Offset = Vector3.new(0,1.4*scale,0)
  64. local p = P:Clone()
  65. p.Parent = m
  66. p.BrickColor = BrickColor.new("Really black")
  67. p.Size = Vector3.new(1.2,25.5,1.2)
  68. p.CFrame = cf * CFrame.new(9*scale,-1.5*scale,0)
  69. local mesh = Instance.new("CylinderMesh", p)
  70.  
  71. ------ right pole ------------------------------------------------
  72. local p = P:Clone()
  73. p.Parent = m
  74. p.BrickColor = BrickColor.new("Really black")
  75. p.CFrame = cf * CFrame.new(-9*scale,11.25*scale,0) * CFrame.Angles(math.pi/4.5,0,0)
  76. local mesh = Instance.new("CylinderMesh", p)
  77. mesh.Scale = Vector3.new(2.4,6*scale,2.4)
  78. mesh.Offset = Vector3.new(0,1.4*scale,0)
  79. local p = P:Clone()
  80. p.Parent = m
  81. p.BrickColor = BrickColor.new("Really black")
  82. p.CFrame = cf * CFrame.new(-9*scale,11.25*scale,0) * CFrame.Angles(-math.pi/4.5,0,0)
  83. local mesh = Instance.new("CylinderMesh", p)
  84. mesh.Scale = Vector3.new(2.4,6*scale,2.4)
  85. mesh.Offset = Vector3.new(0,1.4*scale,0)
  86. local p = P:Clone()
  87. p.Parent = m
  88. p.BrickColor = BrickColor.new("Really black")
  89. p.Size = Vector3.new(1.2,25.5,1.2)
  90. p.CFrame = cf * CFrame.new(-9*scale,-1.5*scale,0)
  91. local mesh = Instance.new("CylinderMesh", p)
  92.  
  93. ----------------- icon -----------------------------------------
  94. local c = P:Clone()
  95. c.Parent = m
  96. c.BrickColor = BrickColor.new("White")
  97. c.CFrame = cf * CFrame.new(0,0,0) * CFrame.Angles(math.pi/2,0,0)
  98. local mesh = Instance.new("CylinderMesh", c)
  99. mesh.Scale = Vector3.new(12*2*scale, 1.1, 12*2*scale)
  100.  
  101. for i = 1, 4 do
  102. local c = P:Clone()
  103. c.Parent = m
  104. c.BrickColor = BrickColor.new("Really black")
  105. c.CFrame = cf * CFrame.Angles(0,0,math.pi/2*i) * CFrame.new(2*scale,0,-0.1)
  106. local mesh = Instance.new("BlockMesh", c)
  107. mesh.Scale = Vector3.new(8*scale,3*scale,1)
  108. local c = P:Clone()
  109. c.Parent = m
  110. c.BrickColor = BrickColor.new("Really black")
  111. c.CFrame = cf * CFrame.Angles(0,0,math.pi/2*i) * CFrame.new(3.25*scale,2*scale,-0.1)
  112. local mesh = Instance.new("BlockMesh", c)
  113. mesh.Scale = Vector3.new(3*scale,8*scale,1)
  114. end
  115.  
  116. cf = cf * CFrame.Angles(0,math.pi,0)
  117.  
  118. for i = 1, 4 do
  119. local c = P:Clone()
  120. c.Parent = m
  121. c.BrickColor = BrickColor.new("Really black")
  122. c.CFrame = cf * CFrame.Angles(0,0,math.pi/2*i) * CFrame.new(2*scale,0,-0.1)
  123. local mesh = Instance.new("BlockMesh", c)
  124. mesh.Scale = Vector3.new(8*scale,3*scale,1)
  125. local c = P:Clone()
  126. c.Parent = m
  127. c.BrickColor = BrickColor.new("Really black")
  128. c.CFrame = cf * CFrame.Angles(0,0,math.pi/2*i) * CFrame.new(3.25*scale,2*scale,-0.1)
  129. local mesh = Instance.new("BlockMesh", c)
  130. mesh.Scale = Vector3.new(3*scale,8*scale,1)
  131. end
  132.  
  133. end
  134.  
  135. -------------------------- Arm Band Func -------------------------------------
  136.  
  137. function ArmBand(charz, side)
  138. P.Anchored = false
  139. P.CanCollide = false
  140. for i, v in pairs(charz:children()) do
  141. if side == "Left" then
  142. if v.Name == "LArmBand" then
  143. v:remove()
  144. end
  145. elseif side == "Right" then
  146. if v.Name == "RArmBand" then
  147. v:remove()
  148. end
  149. end
  150. end
  151.  
  152. side = side or "Left"
  153. local arm = charz:findFirstChild("Left Arm")
  154. if side == "Right" then
  155. arm = charz:findFirstChild("Right Arm")
  156. end
  157. if arm ~= nil then
  158. local s = arm.Size.x
  159.  
  160. local m = Instance.new("Model", charz)
  161. m.Name = "LArmBand"
  162. if side == "Right" then
  163. m.Name = "RArmBand"
  164. end
  165.  
  166. local b = P:Clone()
  167. b.Parent = m
  168. b.BrickColor = BrickColor.new("Bright red")
  169. local mesh = Instance.new("BlockMesh", b)
  170. mesh.Scale = Vector3.new(1.05*s*2,0.85*s*2,1.05*s*2)
  171. local w = Instance.new("Motor", b)
  172. w.Part0 = arm
  173. w.Part1 = b
  174. w.C0 = CFrame.new(0,0.2*s,0)
  175. if side == "Left" then
  176. w.C0 = w.C0 * CFrame.Angles(0,0,0)
  177. elseif side == "Right" then
  178. w.C0 = w.C0 * CFrame.Angles(0,math.pi,0)
  179. end
  180.  
  181. local c = P:Clone()
  182. c.Parent = m
  183. c.BrickColor = BrickColor.new("White")
  184. local mesh = Instance.new("CylinderMesh", c)
  185. mesh.Scale = Vector3.new(0.65*s*2,0.1*s*2,0.65*s*2)
  186. local w = Instance.new("Motor", c)
  187. w.Part0 = b
  188. w.Part1 = c
  189. w.C0 = CFrame.new(-0.5*s,0,0) * CFrame.Angles(0,0,math.pi/2)
  190.  
  191. for i = 1, 4 do
  192. local l = P:Clone()
  193. l.Parent = m
  194. l.BrickColor = BrickColor.new("Really black")
  195. local mesh = Instance.new("BlockMesh", l)
  196. mesh.Scale = Vector3.new(0.22*s*2,0.1*s*2,0.1*s*2)
  197. local w = Instance.new("Motor", l)
  198. w.Part0 = c
  199. w.Part1 = l
  200. w.C0 = CFrame.new(0,0.02*s,0) * CFrame.Angles(0,math.pi/2*i,0) * CFrame.new(0.11*s,0,0)
  201. local l = P:Clone()
  202. l.Parent = m
  203. l.BrickColor = BrickColor.new("Really black")
  204. local mesh = Instance.new("BlockMesh", l)
  205. mesh.Scale = Vector3.new(0.1*s*2,0.1*s*2,0.22*s*2)
  206. local w = Instance.new("Motor", l)
  207. w.Part0 = c
  208. w.Part1 = l
  209. w.C0 = CFrame.new(0,0.02*s,0) * CFrame.Angles(0,math.pi/2*i,0) * CFrame.new(0.17*s,0,0.1)
  210.  
  211. end
  212.  
  213. end
  214. end
  215.  
  216. player.Chatted:connect(function(msg)
  217. if string.sub(msg, 1, 7) == "laband/" then
  218. local str = string.sub(msg, 8):lower()
  219. local num = str:len()
  220. for i, v in pairs(player.Parent:children()) do
  221. local str2 = string.sub(v.Name, 1, num):lower()
  222. if str2 == str then
  223. ArmBand(v.Character, "Left")
  224. end
  225. end
  226. elseif string.sub(msg, 1, 7) == "raband/" then
  227. local str = string.sub(msg, 8):lower()
  228. local num = str:len()
  229. for i, v in pairs(player.Parent:children()) do
  230. local str2 = string.sub(v.Name, 1, num):lower()
  231. if str2 == str then
  232. ArmBand(v.Character, "Right")
  233. end
  234. end
  235. elseif msg == "flag" then
  236. GenFlag(player.Character.Torso.CFrame * CFrame.new(0,11,4))
  237. elseif msg == "noflag" then
  238. pcall(function()
  239. for i, v in pairs(workspace:children()) do
  240. if v.Name == "NFlag" then
  241. if v.Owner.Value == player then
  242. v:remove()
  243. end
  244. end
  245. end
  246. end)
  247. elseif msg == "remove n" then
  248. script:remove()
  249. end
  250. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement