Advertisement
LuaExploitz

Tribal Demon

Oct 15th, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 12.04 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local pchar = player.Character
  3. local mouse = player:GetMouse()
  4. local torso=pchar.Torso
  5. anim=true
  6. anglespeed = 1
  7. angle = 0
  8. maxrage = 9001
  9. rage = 9001 -- ITS OVER 9000!
  10. local asin = math.asin
  11. local atan2 = math.atan2
  12. local rad = math.rad
  13. local sin = math.sin
  14. local abs = math.abs
  15. local ceil = math.ceil
  16. local pi = math.pi
  17. deddeb=false
  18. deb=false
  19. Part = function(x,y,z,color,tr,cc,an,parent)
  20.     local p = Instance.new('Part',parent or Weapon)
  21.     p.formFactor = 'Custom'
  22.     p.Size = Vector3.new(x,y,z)
  23.     p.BrickColor = BrickColor.new(color)
  24.     p.CanCollide = cc
  25.     p.Transparency = tr
  26.     p.Anchored = an
  27.     p.TopSurface,p.BottomSurface = 0,0
  28.     return p
  29. end
  30. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  31.     p0.Position = p1.Position
  32.     local w = Instance.new('Motor',par or p0)
  33.     w.Part0 = p0
  34.     w.Part1 = p1
  35.     w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz)
  36.     return w
  37. end
  38. Mesh = function(par,num,x,y,z)
  39.     local msh = nil
  40.     if num == 1 then
  41.         msh = Instance.new("CylinderMesh",par)
  42.     elseif num == 2 then
  43.         msh = Instance.new("SpecialMesh",par)
  44.         msh.MeshType = 3
  45.     elseif num == 3 then
  46.         msh = Instance.new("BlockMesh",par)
  47.     elseif num == 4 then
  48.         msh = Instance.new("SpecialMesh",par)
  49.         msh.MeshType = "Wedge"
  50.     elseif type(num) == 'string' then
  51.         msh = Instance.new("SpecialMesh",par)
  52.         msh.MeshId = num
  53.     end
  54.     msh.Scale = Vector3.new(x,y,z)
  55.     return msh
  56. end
  57. so = function(id,par,lo,pi)
  58.     s = Instance.new("Sound",par) s.Looped=lo s.Pitch=pi
  59.     s.SoundId = "http://roblox.com/asset/?id="..id s:play()
  60. end
  61. ROW = function(x, pa, out, col, trans, s, wt, t, ang, plus)
  62.     for i = 1, 360, 360/t do wait()
  63.         local c = Instance.new("Part", pa)
  64.         c.FormFactor = 3
  65.         c.TopSurface = 0
  66.         c.BottomSurface = 0
  67.         c.Size = s
  68.         c.Anchored = true
  69.         c.CanCollide = wt
  70.         c.Transparency = trans
  71.         c.BrickColor = BrickColor.new(col)
  72.         c.CFrame = x * CFrame.Angles(0, math.rad(i + plus), 0) * CFrame.new(0, 0, out) * ang
  73.     end
  74. end
  75. Lightning = function(Start,End,Times,Offset,Color,Thickness,Transparency)
  76.     local magz = (Start - End).magnitude local curpos = Start local trz = {-Offset,Offset}
  77.     for i=1,Times do
  78.                 local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true  li.Transparency = Transparency or 0.4 li.BrickColor = BrickColor.new(Color)
  79.         li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(Thickness,Thickness,magz/Times) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  80.                 local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
  81.         if Times == i then
  82.             local magz2 = (curpos - End).magnitude li.Size = Vector3.new(Thickness,Thickness,magz2)
  83.             li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
  84.         else
  85.             li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
  86.         end
  87.         curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p game.Debris:AddItem(li,0.01)
  88.     end
  89. end
  90.  
  91. local function getAngles(cf)
  92.     local sx,sy,sz,m00,m01,m02,m10,m11,m12,m20,m21,m22 = cf:components()
  93.     return atan2(-m12,m22),asin(m02),atan2(-m01,m00)
  94. end
  95. Lerp = {
  96.     Number = function(C1,C2,inc)
  97.         return C1 + (C2 - C1) * inc
  98.     end;
  99.     CFrame = function(C1,C2,inc)
  100.         local x1,y1,z1 = getAngles(C1)
  101.         local x2,y2,z2 = getAngles(C2)
  102.         return CFrame.new(
  103.             Lerp.Number(C1.X,C2.X,inc),
  104.             Lerp.Number(C1.Y,C2.Y,inc),
  105.             Lerp.Number(C1.Z,C2.Z,inc)
  106.         ) * CFrame.Angles(
  107.             Lerp.Number(x1,x2,inc),
  108.             Lerp.Number(y1,y2,inc),
  109.             Lerp.Number(z1,z2,inc)
  110.         )
  111.     end;
  112. }
  113. local function genWeld(a,b)
  114.     local w = Instance.new("Weld",a)
  115.     w.Part0 = a
  116.     w.Part1 = b
  117.     return w
  118. end
  119. local Neck = genWeld(pchar.Torso,pchar.Head)
  120. Neck.C0 = CFrame.new(0,1,0)
  121. Neck.C1 = CFrame.new(0,-0.5,0)
  122. local LeftShoulder = genWeld(pchar.Torso,pchar['Left Arm'])
  123. LeftShoulder.C0 = CFrame.new(-1,0.5,0)
  124. LeftShoulder.C1 = CFrame.new(0.5,0.5,0)
  125. RightShoulder = genWeld(pchar.Torso,pchar['Right Arm'])
  126. RightShoulder.C0 = CFrame.new(1,0.5,0)
  127. RightShoulder.C1 = CFrame.new(-0.5,0.5,0)
  128. local LeftHip = genWeld(pchar.Torso,pchar['Left Leg'])
  129. LeftHip.C0 = CFrame.new(-1,-1,0)
  130. LeftHip.C1 = CFrame.new(-0.5,1,0)
  131. local RightHip = genWeld(pchar.Torso,pchar['Right Leg'])
  132. RightHip.C0 = CFrame.new(1,-1,0)
  133. RightHip.C1 = CFrame.new(0.5,1,0)
  134. local RootJoint = genWeld(pchar.HumanoidRootPart,pchar.Torso)
  135. RootJoint.C0 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi)
  136. RootJoint.C1 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi)
  137. local function newLerpTo(weld)
  138.         return {
  139.                 Weld = weld; -- The weld that will lerp
  140.                 To = weld.C0; -- Where it will lerp to; a CFrame
  141.                 Cache = weld.C0; -- Cache of original position; it helps when making anim keyframes
  142.                 Speed = 0.1; -- Speed of lerp. 0.1 or 0.2 is best
  143.         }
  144. end
  145. LerpTo = {
  146.         Neck = newLerpTo(Neck);
  147.         LeftArm = newLerpTo(LeftShoulder);
  148.         RightArm = newLerpTo(RightShoulder);
  149.         LeftLeg = newLerpTo(LeftHip);
  150.         RightLeg = newLerpTo(RightHip);
  151.         RootJoint = newLerpTo(RootJoint);
  152. }
  153. -- gui
  154. sc = Instance.new("ScreenGui",player.PlayerGui)
  155. sc.Name = "RaigMeter"
  156. fr = Instance.new("Frame",sc)
  157. fr.Size = UDim2.new(0, 250, 0, 28)
  158. fr.Position = UDim2.new(0.75, 0, .95, 0)
  159. fr.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
  160. met = Instance.new("Frame", fr)
  161. met.Size = UDim2.new(1, -10, 1, -6)
  162. met.Position = UDim2.new(0, 5, 0, 3)
  163. met.BackgroundColor3 = Color3.new(0, 0, 0)
  164. met.BorderSizePixel = 0
  165. metr = Instance.new("ImageLabel", met)
  166. metr.Size = UDim2.new(rage/maxrage, 0, 1, -2)
  167. metr.Position = UDim2.new(0, 0, 0, 1)
  168. metr.Image = "http://www.roblox.com/asset/?id=112941056"
  169. metr.BorderSizePixel = 0
  170. metr.BackgroundColor3 = Color3.new(0,0,0)
  171. tx = Instance.new("TextLabel", met)
  172. tx.Size = UDim2.new(0, 0, 1, 0)
  173. tx.Position = UDim2.new(0, 5, 0, 0)
  174. tx.Text = rage.." / "..maxrage
  175. tx.Font = "ArialBold"
  176. tx.FontSize = "Size18"
  177. tx.BackgroundTransparency = 1
  178. tx.TextColor3 = BrickColor.new("Deep orange").Color
  179. tx.TextXAlignment = "Left"
  180. laast = rage
  181. -- func
  182. function click()
  183.     if deb==true then return end
  184.     deb=true
  185.     anim=false
  186.     ded= Part(.5,0,2,'White',1,false,false,mo)
  187.     dedwl= Weld(ded,rot,0,0,0,0,0,0,mo)
  188.     ded.Touched:connect(function(hit)
  189.     if deddeb==true then return end
  190.     if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent:findFirstChild("Humanoid").Health >= 1 then
  191.     deddeb=true
  192.     local hed=hit.Parent.Head:Clone()
  193.     hed.Parent=workspace
  194.     hed.CFrame=hit.Parent.Head.CFrame
  195.     hit.Parent.Head:Destroy()
  196.     wait(1)
  197.     game.Debris:AddItem(hed,10)
  198.     deddeb=false
  199.         end
  200.     end)
  201.     so('10209645',torso,false,.75)
  202.     LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,-rad(20),0)
  203.     LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(60),0,0)
  204.     LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(-rad(5),0,0)
  205.     LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(10),0,0)
  206.     LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(10),0,0)
  207.     wait(.1)
  208.     LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,rad(20),0)
  209.     LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(60),0,-rad(60))
  210.     LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(5),0,0)
  211.     LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-rad(10),0,0)
  212.     LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(rad(10),0,0)
  213.     wait(.2)
  214.     LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,-rad(20),0)
  215.     LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(80),rad(20),rad(100))
  216.     LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(5),0,0)
  217.     LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-rad(10),0,0)
  218.     LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(rad(10),0,0)
  219.     so('28144425',torso,false,1)
  220.     wait(.3)
  221.     ded:Destroy()
  222.     wait(.25)
  223.     anim=true
  224.     wait(.75)
  225.     deb=false
  226. end
  227.  
  228.  
  229. --keys
  230. mouse.Button1Down:connect(function() click(mouse) end)
  231. mouse.KeyDown:connect(function(k)
  232.     if k == "q" then
  233.     end
  234. end)
  235. --parts
  236. mo=Instance.new("Model",pchar)
  237. mpa= Part(1,1,1,'Earth green',0,false,false,mo)
  238. Mesh(mpa,1,.3,6,.3)
  239. mwl= Weld(mpa,pchar["Right Arm"],0,-1.1,0,-pi/2,pi/1,-pi/3.5,mo)
  240. pa= Part(1,1,1,'Brown',0,false,false,mo)
  241. Mesh(pa,3,.301,6,.1)
  242. wl= Weld(pa,mpa,0,0,0,0,0,0,mo)
  243. pa= Part(1,1,1,'Brown',0,false,false,mo)
  244. Mesh(pa,3,.301,6,.1)
  245. wl= Weld(pa,mpa,0,0,0,0,pi/2,0,mo)
  246. for i=1,7 do
  247.     pa= Part(1,1,1,'Black',0,false,false,mo)
  248.     Mesh(pa,1,.301,.2,.301)
  249.     wl= Weld(pa,mpa,0,-4+i,0,0,0,0,mo)
  250. end
  251. -- blade
  252. cl= Part(1,1,1,'Deep orange',0,false,false,mo)
  253. Mesh(cl,3,.1,.5,.5)
  254. clwl= Weld(cl,mpa,0,3,0,0,0,0,mo)
  255. pa= Part(1,1,1,'Deep orange',0,false,false,mo)
  256. Mesh(pa,4,.1,.5,1)
  257. wl= Weld(pa,cl,0,0,.75,0,pi/1,0,mo)
  258. bla= Part(1,1,1,'Deep orange',0,false,false,mo)
  259. Mesh(bla,4,.1,.5,1)
  260. wl= Weld(bla,cl,0,-.585,1.7,rad(10),pi/1,0,mo)
  261. pa= Part(1,1,1,'Deep orange',0,false,false,mo)
  262. Mesh(pa,4,.1,.5,1)
  263. wl= Weld(pa,cl,0,-1.298,2.5,rad(20),pi/1,0,mo)
  264. pa= Part(1,1,1,'Deep orange',0,false,false,mo)
  265. Mesh(pa,3,.1,.3,1)
  266. wl= Weld(pa,cl,0,-.4,.75,0,pi/1,0,mo)
  267. pa= Part(1,1,1,'Deep orange',0,false,false,mo)
  268. Mesh(pa,3,.1,.3,.5)
  269. wl= Weld(pa,bla,0,-.4,-.2,0,0,0,mo)
  270. pa= Part(1,1,1,'Black',0,false,false,mo)
  271. Mesh(pa,3,.09,.2,.9)
  272. wl= Weld(pa,cl,0,-.65,.75,0,pi/1,0,mo)
  273. pa= Part(1,1,1,'Black',0,false,false,mo)
  274. Mesh(pa,4,.1,.3,.5)
  275. wl= Weld(pa,bla,0,-.4,.3,0,pi/1,pi/1,mo)
  276. pa= Part(1,1,1,'Black',0,false,false,mo)
  277. Mesh(pa,4,.09,.175,.55)
  278. wl= Weld(pa,bla,0,-.63,-.2,0,pi/1,pi/1,mo)
  279. rot= Part(1,1,1,'Really black',0,false,false,mo)
  280. Mesh(rot,1,.5,.09,.5)
  281. pawl= Weld(rot,cl,0,0,-.25,0,0,pi/2,mo)
  282. pa= Part(.1,.1,.1,'Black',0,false,false,mo)
  283. Mesh(pa,'http://www.roblox.com/Asset/?id=9756362',.2,.75,.2)
  284. pawl= Weld(pa,rot,0,0,-.75,pi/2,0,0,mo)
  285. pa= Part(.1,.1,.1,'Black',0,false,false,mo)
  286. Mesh(pa,'http://www.roblox.com/Asset/?id=9756362',.2,.75,.2)
  287. pawl= Weld(pa,rot,.5,0,-.5,pi/2,0,pi/3,mo)
  288.  
  289. local function updateanims()
  290.     if anim==true then
  291.         if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  292.             anglespeed = 1/3
  293.             LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(sin(angle)*0.05,0,0)
  294.             LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(150),-rad(15)+abs(sin(angle))*0.1,rad(30))
  295.             LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(sin(angle)*0.1,0,0)
  296.             LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(0,0,abs(sin(angle))*0.1)
  297.             LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(0,0,-abs(sin(angle))*0.1)
  298.         end
  299.         if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  300.             anglespeed = 4
  301.             LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,math.sin(angle)*0.05)
  302.             LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(80),rad(20),0)
  303.             LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(100),0,rad(20))
  304.             LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(sin(angle)*.8,0,0)
  305.             LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-sin(angle)*.8,0,0)
  306.         end
  307.     end
  308. end
  309. local function onupdate()
  310.     if rage > maxrage then rage=maxrage end
  311.     tx.Text = ceil(rage).." / "..maxrage
  312.     metr.Size = UDim2.new(ceil(rage)/maxrage, 0, 1, -2)
  313. end
  314.  
  315. Spawn(function()
  316.     while wait()do
  317.         angle = (angle % 100) + anglespeed/10 -- no matter whut it has to be in a loop or its on exticy
  318.     end
  319. end)
  320. meo=0
  321. sdeb=false
  322. game:service'RunService'.RenderStepped:connect(function()
  323.     meo=meo+1
  324.         for _,v in pairs(LerpTo) do
  325.         v.Weld.C0 = Lerp.CFrame(v.Weld.C0,v.To,v.Speed)end
  326.         onupdate()
  327.     updateanims()
  328. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement