SmokeDelsin

my powa

Jun 12th, 2015
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.39 KB | None | 0 0
  1. print'wow just changed sound gg'
  2. function clerp(c1,c2,al)
  3. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  4. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  5. for i,v in pairs(com1) do
  6. com1[i] = v+(com2[i]-v)*al
  7. end
  8. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  9. end
  10.  
  11. plr = game:service'Players'.LocalPlayer
  12. char = plr.Character
  13. mouse = plr:GetMouse()
  14. humanoid = char:findFirstChild("Humanoid")
  15. torso = char:findFirstChild("Torso")
  16. head = char.Head
  17. ra = char:findFirstChild("Right Arm")
  18. la = char:findFirstChild("Left Arm")
  19. rl = char:findFirstChild("Right Leg")
  20. ll = char:findFirstChild("Left Leg")
  21. rs = torso:findFirstChild("Right Shoulder")
  22. ls = torso:findFirstChild("Left Shoulder")
  23. rh = torso:findFirstChild("Right Hip")
  24. lh = torso:findFirstChild("Left Hip")
  25. neck = torso:findFirstChild("Neck")
  26. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  27. anim = char:findFirstChild("Animate")
  28. if anim then
  29. anim:Destroy()
  30. end
  31. rootpart = char:findFirstChild("HumanoidRootPart")
  32. camera = workspace.CurrentCamera
  33. modelforparts = char:findFirstChild("ModelForParts") or Instance.new("Model", char)
  34. modelforparts.Name = "ModelForParts"
  35.  
  36. function trailconnect(obj, wat)
  37. local trail = {}
  38. for i = 1, 4 do
  39. local p = Instance.new("Part")
  40. p.BrickColor = obj.BrickColor
  41. p.formFactor = "Custom"
  42. p.Size = Vector3.new(1,1,1)
  43. p.Locked = true
  44. p.Anchored = true
  45. p.CanCollide = false
  46. local mesh = Instance.new("CylinderMesh", p)
  47. mesh.Name = "Mesh"
  48. table.insert(trail,{p,0})
  49. end
  50. local lastpos = obj.Position
  51. local updatethis = 0
  52. local dontdothis = false
  53. game:service'RunService'.Stepped:connect(function()
  54. if wat == true then if dontdothis then return end
  55. for i,v in pairs(trail) do
  56. game:service'Debris':AddItem(obj, 0)
  57. table.remove(v, i)
  58. end
  59. dontdothis = true
  60. return
  61. end
  62. updatethis = ((updatethis) % 4) + 1
  63. local dstnc = (obj.Position - lastpos).magnitude
  64. trail[updatethis][1].Mesh.Scale = Vector3.new(.2,dstnc,.2)
  65. trail[updatethis][1].Parent = obj.Parent
  66. trail[updatethis][1].CFrame = CFrame.new((obj.Position + lastpos)/2,obj.Position) * CFrame.Angles(math.pi/2, 0, 0)
  67. trail[updatethis][2] = 0
  68. for i,v in pairs(trail) do
  69. v[2] = v[2] + .15
  70. v[1].Transparency = v[2]
  71. end
  72. lastpos = obj.Position
  73. end)
  74. end
  75.  
  76. do --rayCast
  77. function rayCast(startpos, Speed, Gravity, Dmg, color)
  78. local ran,err = ypcall(function()
  79. local rayPart = Instance.new("Part")
  80. rayPart.Name = "RayPart"
  81. rayPart.BrickColor = BrickColor.new(color)
  82. rayPart.Anchored = true
  83. rayPart.CanCollide = false
  84. rayPart.Locked = true
  85. rayPart.FormFactor = "Custom"
  86. rayPart.TopSurface = Enum.SurfaceType.Smooth
  87. rayPart.BottomSurface = Enum.SurfaceType.Smooth
  88. rayPart.Size = Vector3.new(.2, 50, .2)
  89. rayPart:breakJoints()
  90. Instance.new("CylinderMesh", rayPart)
  91. local fire = Instance.new("Fire", rayPart)
  92. fire.Color = rayPart.BrickColor.Color
  93. fire.SecondaryColor = rayPart.BrickColor.Color
  94. fire.Heat = 0
  95. fire.Size = 10
  96. local pl = Instance.new("PointLight", rayPart)
  97. pl.Color = Color3.new(rayPart.BrickColor.r/1.5, rayPart.BrickColor.g/1.5, rayPart.BrickColor.b/1.5)
  98. pl.Range = 18
  99.  
  100. local hitobj = false
  101. local bulletposition = startpos.Position
  102. rayPart.CFrame = startpos.CFrame
  103. trailconnect(rayPart, hitobj)
  104.  
  105. local bulletvelocity = (Vector3.new(math.random(-2,2), math.random(-2,2), math.random(-2,2)))+( mouse.Hit.p - bulletposition).unit*Speed
  106. local bulletlastposition = bulletposition
  107.  
  108. coroutine.resume(coroutine.create(function()
  109. while true do
  110.  
  111. local dt = wait()
  112. bulletlastposition = bulletposition
  113. bulletvelocity = bulletvelocity + (Vector3.new(0, -3.81*Gravity, 0)*dt)
  114. bulletposition = bulletposition + (bulletvelocity*dt)
  115. local ray = Ray.new(bulletlastposition, (bulletposition - bulletlastposition))
  116. local hit, hitposition = workspace:FindPartOnRayWithIgnoreList( ray, {char, modelforparts} )
  117.  
  118. if (torso.Position - rayPart.Position).magnitude > 840 then
  119. rayPart:Destroy()
  120. hitobj = true
  121. break
  122. end
  123.  
  124.  
  125. if hit then
  126. hitobj = true
  127. local damage = math.random(Dmg, Dmg+6)
  128. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  129. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage
  130. elseif hit.Parent:IsA("Hat") and hit.Parent.Parent:findFirstChild("Humanoid") then
  131. hit.Parent.Parent.Humanoid.Health = hit.Parent.Parent.Humanoid.Health - damage
  132. end
  133. local boom = Instance.new("Part", modelforparts)
  134. boom.BrickColor = rayPart.BrickColor
  135. boom.Anchored = true
  136. boom.FormFactor = "Custom"
  137. boom.Size = Vector3.new(1,1,1)
  138. boom.CanCollide = false
  139. boom.Transparency = 0.25
  140. boom.CFrame = CFrame.new(hitposition.x, hitposition.y, hitposition.z)
  141. boom.TopSurface = 0
  142. boom.BottomSurface = 0
  143. local sphere = Instance.new("SpecialMesh", boom)
  144. sphere.MeshType = "Sphere"
  145. local pl = Instance.new("PointLight", boom)
  146. pl.Color = Color3.new(boom.BrickColor.r/1.5, boom.BrickColor.g/1.5, boom.BrickColor.b/1.5)
  147. pl.Range = 20
  148. for ye = 0, 8 do
  149. local lite = Instance.new("Part", boom)
  150. lite.FormFactor = "Custom"
  151. lite.Size = Vector3.new(.2, 1.5, .2)
  152. lite.BrickColor = boom.BrickColor
  153. lite.CanCollide = false
  154. lite.TopSurface = 0
  155. lite.Anchored = false
  156. lite.BottomSurface = 0
  157. lite.Position = boom.Position + Vector3.new(math.random(-10, 10), math.random(6,15), math.random(-10, 10))
  158. end
  159.  
  160. for i = 0, 20, 2.5 do
  161. sphere.Scale = sphere.Scale + Vector3.new(i,i,i)
  162. boom.Transparency = boom.Transparency + i/60
  163. pl.Range = pl.Range + i/15
  164. wait()
  165. end
  166. boom:Destroy()
  167. for i,v in pairs(workspace:children()) do
  168. if v:IsA("Model") and v:findFirstChild("Humanoid") then
  169. if v:findFirstChild("Head") and v:findFirstChild("Torso") then
  170. if (v:findFirstChild("Torso").Position - boom.Position).magnitude < 16 and v.Name ~= char.Name then
  171. v:findFirstChild("Humanoid"):TakeDamage(math.random(Dmg+2,Dmg+6))
  172. end
  173. end
  174. end
  175. if v and v:IsA("Part") and v.Name ~= "Base" then
  176. if (v.Position - boom.Position).magnitude < 16 then
  177. v:BreakJoints()
  178. v.TopSurface = 0
  179. v.BottomSurface = 0
  180. v.LeftSurface = 0
  181. v.RightSurface = 0
  182. v.FrontSurface = 0
  183. v.BackSurface = 0
  184. v.Anchored = false
  185. end
  186. end
  187. end
  188. pcall(function()
  189. bulletposition = hitposition
  190. rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0)
  191. rayPart:Destroy()
  192. end)
  193. break
  194. end
  195. rayPart.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0)
  196. rayPart.Parent = modelforparts
  197. end
  198. end))
  199. for i = 70, 65, -1.5 do
  200. firing = true
  201. camera.FieldOfView = i
  202. wait()
  203. end
  204. for i = 65, 70, 2.5 do
  205. firing = false
  206. camera.FieldOfView = i
  207. wait()
  208. end
  209. end)
  210. if err then
  211. print(err)
  212. end
  213. end
  214. end
  215.  
  216.  
  217. charge = 500
  218.  
  219. plrgui = game:service'Players'.LocalPlayer:findFirstChild("PlayerGui")
  220.  
  221. local statusgui = Instance.new("ScreenGui", plrgui)
  222. local mainframe = Instance.new("Frame", statusgui)
  223. mainframe.Size = UDim2.new(0, 200, 0, 200)
  224. mainframe.Position = UDim2.new(.75, 0, .75, 0)
  225. mainframe.Style = 3
  226. local image = Instance.new("ImageLabel", mainframe)
  227. image.Size = UDim2.new(1, 0, .47, 0)
  228. image.Position = UDim2.new(0, 0, .235, 0)
  229. image.BackgroundTransparency = 1
  230. image.Image = "rbxassetid://145057975"
  231. local chargetext = Instance.new("TextLabel", mainframe)
  232. chargetext.FontSize = "Size18"
  233. chargetext.Size = UDim2.new(1, 0, .95, 0)
  234. chargetext.TextYAlignment = "Bottom"
  235. chargetext.BackgroundTransparency = 1
  236. chargetext.TextColor3 = Color3.new(1,1,1)
  237. game:service'RunService'.Stepped:connect(function()
  238. chargetext.Text = math.floor(charge).."%"
  239. end)
  240.  
  241.  
  242.  
  243. local rm = Instance.new("Weld", torso)
  244. rm.C0 = CFrame.new(1.5, 0.5, 0)
  245. rm.C1 = CFrame.new(0, 0.5, 0)
  246. rm.Part0 = torso
  247. rm.Part1 = ra
  248. local lm = Instance.new("Weld", torso)
  249. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  250. lm.C1 = CFrame.new(0, 0.5, 0)
  251. lm.Part0 = torso
  252. lm.Part1 = la
  253.  
  254. sound = Instance.new("Sound", head)
  255. sound.Volume = 1
  256. sound.SoundId = "rbxassetid://151380796"
  257. sound.Looped = true
  258.  
  259.  
  260. dancemode = true
  261. debounceofsprint = false
  262.  
  263. --create func
  264. function part(parent, size, color, formfactor, collide, transparency)
  265. if transparency == nil then transparency=0 end
  266. if collide == nil then collide=false end
  267. if formfactor == nil then formfactor="Custom" end
  268. local p = Instance.new("Part", parent)
  269. p.FormFactor = formfactor
  270. p.CanCollide = collide
  271. p.Size = size
  272. p.Locked = true
  273. p.Transparency = transparency
  274. p.Position = torso.Position + Vector3.new(0, 1, 0)
  275. p.BrickColor = color
  276. p.FrontSurface = "SmoothNoOutlines"
  277. p.BackSurface = "SmoothNoOutlines"
  278. p.LeftSurface = "SmoothNoOutlines"
  279. p.BottomSurface = "SmoothNoOutlines"
  280. p.TopSurface = "SmoothNoOutlines"
  281. p.RightSurface = "SmoothNoOutlines"
  282. return p
  283. end
  284. function wedge(parent, size, color, formfactor, collide, transparency)
  285. if transparency==nil then transparency=0 end
  286. if collide==nil then collide=false end
  287. if formfactor==nil then formfactor="Custom" end
  288. local p = Instance.new("WedgePart", parent)
  289. p.FormFactor = formfactor
  290. p.CanCollide = collide
  291. p.Size = size
  292. p.Locked = true
  293. p.Position = torso.Position
  294. p.BrickColor = color
  295. p.FrontSurface = "SmoothNoOutlines"
  296. p.BackSurface = "SmoothNoOutlines"
  297. p.LeftSurface = "SmoothNoOutlines"
  298. p.BottomSurface = "SmoothNoOutlines"
  299. p.TopSurface = "SmoothNoOutlines"
  300. p.RightSurface = "SmoothNoOutlines"
  301. return p
  302. end
  303. function weld(part0, part1, c0, parent, c1)
  304. if parent == nil then parent=char end
  305. if c1 == nil then c1=CFrame.new() end
  306.  
  307. local wel = Instance.new("Weld", parent)
  308. wel.Part0 = part0
  309. wel.Part1 = part1
  310. wel.C0 = c0
  311. wel.C1 = c1
  312. return wel
  313. end
  314. function specialmesh(parent, meshType, scale, meshId)
  315. if meshId==nil then meshId="" end
  316. local mesh = Instance.new("SpecialMesh", parent)
  317. mesh.Scale = scale
  318. mesh.MeshType = meshType
  319. mesh.MeshId = meshId
  320. return mesh
  321. end
  322. ----------------------------------------------------------------------------------------------------------
  323. --function part(parent, size, color, formfactor, collide, transparency)
  324. --function weld(part0, part1, c0, parent, c1)
  325.  
  326. ----------------------------------------------------------------------------------------------------------
  327. function animatehuman(animationid, object)
  328. local animation = object:findFirstChild("Humanoid"):LoadAnimation(animationid)
  329. animation:Play()
  330. end
  331. local danceAnim = Instance.new("Animation", char)
  332. danceAnim.AnimationId = "http://www.roblox.com/asset/?id=130018893"
  333. danceAnim.Name = "DancingAnimation"
  334. ----------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment