Advertisement
ReisenBunny

Untitled

Sep 5th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.97 KB | None | 0 0
  1. function sandbox(var,func)
  2. local env = getfenv(func)
  3. local newenv = setmetatable({},{
  4. __index = function(self,k)
  5. if k=="script" then
  6. return var
  7. else
  8. return env[k]
  9. end
  10. end,
  11. })
  12. setfenv(func,newenv)
  13. return func
  14. end
  15. cors = {}
  16. mas = Instance.new("Model",game:GetService("Lighting"))
  17. SpecialMesh25 = Instance.new("SpecialMesh")
  18. Part26 = Instance.new("Part")
  19. SpecialMesh27 = Instance.new("SpecialMesh")
  20. Trail28 = Instance.new("Trail")
  21. Sound29 = Instance.new("Sound")
  22. SpecialMesh25.MeshId = "rbxassetid://2125899404"
  23. SpecialMesh25.MeshType = Enum.MeshType.FileMesh
  24. Part26.Name = "Grenade"
  25. Part26.Parent = mas
  26. Part26.CFrame = CFrame.new(38.2035713, 1.02035296, 21.0111828, -0.776946664, -0.0182258431, -0.629302561, -0.629268765, -0.00825065561, 0.777144015, -0.0193562619, 0.999799848, -0.00505863409)
  27. Part26.Orientation = Vector3.new(-51, -90.4599991, -90.75)
  28. Part26.Position = Vector3.new(38.2035713, 1.02035296, 21.0111828)
  29. Part26.Rotation = Vector3.new(-90.3699951, -39, 178.659988)
  30. Part26.Color = Color3.new(0.152941, 0.27451, 0.176471)
  31. Part26.Velocity = Vector3.new(0.0464646779, 0.00033079437, 0.0308197252)
  32. Part26.Size = Vector3.new(1.43749833, 2.29999709, 1.43749833)
  33. Part26.BrickColor = BrickColor.new("Earth green")
  34. Part26.RotVelocity = Vector3.new(-0.000168789324, 0.010219017, 0.000870788237)
  35. Part26.brickColor = BrickColor.new("Earth green")
  36. Part26.FormFactor = Enum.FormFactor.Plate
  37. Part26.formFactor = Enum.FormFactor.Plate
  38. SpecialMesh27.Parent = Part26
  39. SpecialMesh27.MeshId = "http://www.roblox.com/Asset/?id=10207236"
  40. SpecialMesh27.Scale = Vector3.new(0.244374722, 0.244374692, 0.244374722)
  41. SpecialMesh27.VertexColor = Vector3.new(255, 255, 255)
  42. SpecialMesh27.MeshType = Enum.MeshType.FileMesh
  43. Trail28.Parent = Part26
  44. Trail28.Attachment0 = nil
  45. Trail28.Attachment1 = nil
  46. Trail28.Color = ColorSequence.new(Color3.new(0.152941, 0.27451, 0.176471),Color3.new(0.152941, 0.27451, 0.176471))
  47. Trail28.LightInfluence = 1
  48. Trail28.Transparency = NumberSequence.new(0.5,0.61249995231628,0.71249997615814,1)
  49. Trail28.Lifetime = 0.10000000149012
  50. Sound29.Parent = Part26
  51. Sound29.EmitterSize = 24
  52. Sound29.MinDistance = 24
  53. Sound29.SoundId = "http://www.roblox.com/asset/?id=326088041"
  54. Sound29.Volume = 7
  55. for i,v in pairs(mas:GetChildren()) do
  56. v.Parent = script
  57. pcall(function() v:MakeJoints() end)
  58. end
  59. mas:Destroy()
  60. for i,v in pairs(cors) do
  61. spawn(function()
  62. pcall(v)
  63. end)
  64. end
  65.  
  66. local GRENADE = script.Grenade
  67. GRENADE.Parent = nil
  68. GRENADE.Anchored = false
  69.  
  70. local SIZE = 1
  71.  
  72. function ApplyDamage(Humanoid,Damage,OneShot)
  73. Damage = Damage * DAMAGEMULTIPLIER
  74. local DEAD = false
  75. if Humanoid.Health < 2000 and OneShot == false then
  76. if Humanoid.Health - Damage > 0 then
  77. Humanoid.Health = Humanoid.Health - Damage
  78. else
  79. Humanoid.Parent:BreakJoints()
  80. DEAD = true
  81. end
  82. else
  83. DEAD = true
  84. Humanoid.Parent:BreakJoints()
  85. end
  86. if DEAD == true then
  87. local PARTS = {}
  88. for index, CHILD in pairs(Humanoid.Parent:GetChildren()) do
  89. if CHILD:IsA("BasePart") then
  90. table.insert(PARTS,CHILD)
  91. end
  92. end
  93. coroutine.resume(coroutine.create(function()
  94. wait(2)
  95. repeat
  96. Swait()
  97. local PIECE = nil
  98. if MRANDOM(1,5) == 1 then
  99. for E = 1, #PARTS do
  100. if MRANDOM(1,5) == 1 then
  101. PIECE = PARTS[E]
  102. table.remove(PARTS,E)
  103. break
  104. end
  105. end
  106. end
  107. if PIECE ~= nil then
  108. if PIECE.Name == "Head" then
  109. WACKYEFFECT({Time = MRANDOM(10,30)*5, EffectType = "Box", Size = VT(PIECE.Size.Z,PIECE.Size.Y,PIECE.Size.Z), Size2 = (VT(PIECE.Size.Z,PIECE.Size.Y,PIECE.Size.Z))*MRANDOM(7,14)/10, Transparency = PIECE.Transparency, Transparency2 = 1, CFrame = PIECE.CFrame, MoveToPos = PIECE.Position+VT(0,MRANDOM(5,8)/1.5,0), RotationX = MRANDOM(-25,25)/35, RotationY = MRANDOM(-25,25)/35, RotationZ = MRANDOM(-25,25)/35, Material = "Neon", Color = C3(0.4,0,0), SoundID = 3264923, SoundPitch = MRANDOM(12,16)/10, SoundVolume = 2})
  110. else
  111. WACKYEFFECT({Time = MRANDOM(10,30)*5, EffectType = "Box", Size = PIECE.Size, Size2 = PIECE.Size*MRANDOM(7,14)/10, Transparency = PIECE.Transparency, Transparency2 = 1, CFrame = PIECE.CFrame, MoveToPos = PIECE.Position+VT(0,MRANDOM(5,8)/1.5,0), MRANDOM(-25,25)/35, RotationY = MRANDOM(-25,25)/35, RotationZ = MRANDOM(-25,25)/35, Material = "Neon", Color = C3(0.4,0,0), SoundID = 3264923, SoundPitch = MRANDOM(12,16)/10, SoundVolume = 2})
  112. end
  113. PIECE:remove()
  114. end
  115. until #PARTS == 0
  116. end))
  117. end
  118. end
  119.  
  120. function CreateFlyingDebree(FLOOR,POSITION,AMOUNT,BLOCKSIZE,SWAIT,STRENGTH)
  121. if FLOOR ~= nil then
  122. for i = 1, AMOUNT do
  123. local DEBREE = CreatePart(3, Effects, "Neon", FLOOR.Reflectance, FLOOR.Transparency, "Peal", "Debree", BLOCKSIZE, false)
  124. DEBREE.Material = FLOOR.Material
  125. DEBREE.Color = FLOOR.Color
  126. DEBREE.CFrame = POSITION * ANGLES(RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)),RAD(MRANDOM(-360,360)))
  127. DEBREE.Velocity = VT(MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH),MRANDOM(-STRENGTH,STRENGTH))
  128. coroutine.resume(coroutine.create(function()
  129. Swait(15)
  130. DEBREE.Parent = workspace
  131. DEBREE.CanCollide = true
  132. Debris:AddItem(DEBREE,SWAIT)
  133. end))
  134. end
  135. end
  136. end
  137.  
  138. function ApplyAoE2(POSITION, RANGE, MINDMG, MAXDMG, FLING, INSTAKILL)
  139. for index, CHILD in pairs(workspace:GetDescendants()) do
  140. if CHILD.ClassName == "Model" and CHILD ~= Character then
  141. local HUM = CHILD:FindFirstChildOfClass("Humanoid")
  142. if HUM then
  143. local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
  144. if TORSO and RANGE >= (TORSO.Position - POSITION).Magnitude then
  145. if INSTAKILL == true then
  146. CHILD:BreakJoints()
  147. else
  148. local DMG = MRANDOM(MINDMG, MAXDMG)
  149. ApplyDamage(HUM, DMG)
  150. end
  151. if FLING > 0 then
  152. for _, c in pairs(CHILD:GetChildren()) do
  153. if c:IsA("BasePart") then
  154. local bv = Instance.new("BodyVelocity")
  155. bv.maxForce = Vector3.new(1000000000, 1000000000, 1000000000)
  156. bv.velocity = CF(POSITION, TORSO.Position).lookVector * FLING
  157. bv.Parent = c
  158. Debris:AddItem(bv, 0.05)
  159. end
  160. end
  161. end
  162. end
  163. end
  164. end
  165. end
  166. end
  167. function SHAKECAM(POSITION, RANGE, INTENSITY, TIME)
  168.  
  169. end
  170.  
  171. local HELDGUN, GUNWELD
  172.  
  173. local GUNOFFSET = CF(0, 0.8, -1.3)
  174.  
  175. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  176. local DIRECTION = CF(StartPos, EndPos).lookVector
  177. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  178. end
  179.  
  180. function GearGrenade()
  181. ATTACK = true
  182. Rooted = false
  183. chatfunc("Fire in the Hole!")
  184. coroutine.resume(coroutine.create(function()
  185. repeat
  186. Swait()
  187. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * SIZE, 0.35 * SIZE - 0.05 * SIZE * SIN(SINE / 24), 0.2 * SIZE) * ANGLES(RAD(-20), RAD(-25), RAD(-3)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  188. until ATTACK == false
  189. end))
  190. local GYRO = IT("BodyGyro", RootPart)
  191. GYRO.D = 2
  192. GYRO.P = 20000
  193. GYRO.MaxTorque = VT(0, 4000000, 0)
  194. GYRO.CFrame = CF(RootPart.Position, Mouse.Hit.p)
  195. coroutine.resume(coroutine.create(function()
  196. repeat
  197. Swait()
  198. GYRO.CFrame = CF(RootPart.Position, Mouse.Hit.p)
  199. until ATTACK == false
  200. GYRO:Remove()
  201. end))
  202. for i = 0, 0.4, 0.1 / Animation_Speed do
  203. Swait()
  204. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * SIZE, 0 * SIZE, 0 + 0.05 * SIZE * COS(SINE / 24)) * ANGLES(RAD(0), RAD(0), RAD(15)), 1 / Animation_Speed)
  205. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + (1 * SIZE - 1)) * ANGLES(RAD(0 - 5 * COS(SINE / 24)), RAD(-5), RAD(-5)), 1 / Animation_Speed)
  206. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * SIZE, 0.5 * SIZE - 0.05 * SIZE * SIN(SINE / 24), 0 * SIZE) * ANGLES(RAD(-5), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  207. RightHip.C0 = Clerp(RightHip.C0, CF(1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
  208. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-4), RAD(0), RAD(0)), 1 / Animation_Speed)
  209. end
  210. local NADE = GRENADE:Clone()
  211. NADE.CFrame = LeftArm.CFrame * CF(0, -1.2 * SIZE, 0) * ANGLES(RAD(90), RAD(0), RAD(0))
  212. NADE.Parent = Effects
  213. CreateSound(326088041, NADE, 7, 1, false)
  214. local WELD = weldBetween(LeftArm, NADE)
  215. for i = 0, 0.7, 0.1 / Animation_Speed do
  216. Swait()
  217. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * SIZE, 0 * SIZE, 0 + 0.05 * SIZE * COS(SINE / 24)) * ANGLES(RAD(0), RAD(0), RAD(25)), 1 / Animation_Speed)
  218. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + (1 * SIZE - 1)) * ANGLES(RAD(0 - 5 * COS(SINE / 24)), RAD(-5), RAD(-15)), 1 / Animation_Speed)
  219. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * SIZE, 0.5 * SIZE - 0.05 * SIZE * SIN(SINE / 24), 0 * SIZE) * ANGLES(RAD(150), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  220. RightHip.C0 = Clerp(RightHip.C0, CF(1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(0), RAD(55), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
  221. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-4), RAD(0), RAD(0)), 1 / Animation_Speed)
  222. end
  223. coroutine.resume(coroutine.create(function()
  224. WELD:remove()
  225. local DISTANCE = (NADE.Position - Mouse.Hit.p).Magnitude
  226. if DISTANCE > 150 then
  227. DISTANCE = 150
  228. end
  229. NADE.Velocity = CF(NADE.Position - VT(0, 5, 0), Mouse.Hit.p).lookVector * (DISTANCE * 2)
  230. wait(0.2)
  231. TOUCH = NADE.Touched:Connect(function()
  232. TOUCH:Disconnect()
  233. wait(0.5)
  234. NADE.Anchored = true
  235. NADE.Transparency = 1
  236. NADE.CanCollide = false
  237. local COLORS = {
  238. C3(0.8862745098039215, 0.6078431372549019, 0.25098039215686274),
  239. C3(0, 1, 0),
  240. C3(0.9607843137254902, 0.803921568627451, 0.18823529411764706)
  241. }
  242. WACKYEFFECT({
  243. Time = 66,
  244. EffectType = "Sphere",
  245. Size = VT(45, 45, 45),
  246. Size2 = VT(450, 450, 450),
  247. Transparency = 0.99,
  248. Transparency2 = 1,
  249. CFrame = CF(NADE.Position),
  250. MoveToPos = nil,
  251. RotationX = 0,
  252. RotationY = 0,
  253. RotationZ = 0,
  254. Material = "Neon",
  255. Color = C3(1, 1, 1),
  256. SoundID = nil,
  257. SoundPitch = nil,
  258. SoundVolume = nil
  259. })
  260. for i = 1, 45 do
  261. WACKYEFFECT({
  262. Time = MRANDOM(10, 60),
  263. EffectType = "Sphere",
  264. Size = VT(45, 45, 45) * MRANDOM(5, 12) / 10,
  265. Size2 = VT(65, 65, 65) * MRANDOM(5, 22) / 10,
  266. Transparency = 0,
  267. Transparency2 = 1,
  268. CFrame = CF(NADE.Position) * ANGLES(RAD(MRANDOM(0, 360)), RAD(MRANDOM(0, 360)), RAD(MRANDOM(0, 360))) * CF(0, 15, 0),
  269. MoveToPos = nil,
  270. RotationX = 0,
  271. RotationY = 0,
  272. RotationZ = 0,
  273. Material = "Neon",
  274. Color = COLORS[MRANDOM(1, #COLORS)],
  275. SoundID = nil,
  276. SoundPitch = nil,
  277. SoundVolume = nil
  278. })
  279. end
  280. ApplyAoE2(NADE.Position, 75, 35, 80, 145, true)
  281. SHAKECAM(NADE.Position, 160, 12, 25)
  282. CreateSound(174580476, NADE, 10, 1, false)
  283. CreateSound(165970126, NADE, 6, 1, false)
  284. Debris:AddItem(NADE, 10)
  285. end)
  286. end))
  287. for i = 0, 0.3, 0.1 / Animation_Speed do
  288. Swait()
  289. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * SIZE, 0 * SIZE, 0 + 0.05 * SIZE * COS(SINE / 24)) * ANGLES(RAD(0), RAD(0), RAD(-25)), 1 / Animation_Speed)
  290. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + (1 * SIZE - 1)) * ANGLES(RAD(0 - 5 * COS(SINE / 24)), RAD(-5), RAD(15)), 1 / Animation_Speed)
  291. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.35 * SIZE, 0.5 * SIZE - 0.05 * SIZE * SIN(SINE / 24), -0.2 * SIZE) * ANGLES(RAD(25), RAD(0), RAD(10)) * LEFTSHOULDERC0, 2 / Animation_Speed)
  292. RightHip.C0 = Clerp(RightHip.C0, CF(1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-4), RAD(0), RAD(0)), 1 / Animation_Speed)
  293. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * SIZE, -1 * SIZE - 0.05 * SIZE * COS(SINE / 24), -0.01 * SIZE) * ANGLES(RAD(-5), RAD(-80), RAD(0)) * ANGLES(RAD(-4), RAD(0), RAD(0)), 1 / Animation_Speed)
  294. end
  295. ATTACK = false
  296. Rooted = false
  297. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement