Advertisement
Pixenova

AI Bot

Aug 4th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 40.67 KB | None | 0 0
  1. Player = game:GetService("Players").Pixenova
  2. Character = Player.Character
  3. PlayerGui = Player.PlayerGui
  4. Backpack = Player.Backpack
  5. Torso = Character.Torso
  6. Head = Character.Head
  7. LeftArm = Character["Left Arm"]
  8. LeftLeg = Character["Left Leg"]
  9. RightArm = Character["Right Arm"]
  10. RightLeg = Character["Right Leg"]
  11. LS = Torso["Left Shoulder"]
  12. LH = Torso["Left Hip"]
  13. RS = Torso["Right Shoulder"]
  14. RH = Torso["Right Hip"]
  15. necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  16. mode=1
  17. color="Navy blue"
  18. damage=15
  19. canshoot=false
  20. shooting1=false
  21. shooting2=false
  22. cframe=CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  23. weld=false
  24. local main = Instance.new("Part")
  25. local mod = Instance.new("Model",Character)
  26. local pip2 = Instance.new("Part")
  27. local pip1 = Instance.new("Part")
  28. local mainp = Instance.new("Part")
  29. local mainweld = Instance.new("Weld")
  30. local p1 = Instance.new("Part")
  31. local p2 = Instance.new("Part")
  32. local p3 = Instance.new("Part")
  33. local p4 = Instance.new("Part")
  34. local p5 = Instance.new("Part")
  35. local p6 = Instance.new("Part")
  36. local p7 = Instance.new("Part")
  37. local p8 = Instance.new("Part")
  38. local p9 = Instance.new("Seat")
  39. p6.BrickColor=BrickColor.new("Black")
  40. local Type=Instance.new("StringValue")
  41. local CanShoot=Instance.new("BoolValue")
  42. local MienMouse=Instance.new("ObjectValue")
  43. MMouse = nil
  44. sitting=false
  45. --player
  46. player = nil
  47. --save shoulders
  48. RSH, LSH = nil, nil
  49. --welds
  50. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  51. --what anim
  52. anim = "none"
  53.  
  54.  
  55. if Player.PlayerGui:findFirstChild("Fen's GUI") ~= nil then
  56. Player.PlayerGui:findFirstChild("Fen's GUI").Parent = nil
  57. end
  58.  
  59. local fengui = Instance.new("GuiMain")
  60. fengui.Parent = Player.PlayerGui
  61. fengui.Name = "Fen's GUI"
  62. local fenframe = Instance.new("Frame")
  63. fenframe.Parent = fengui
  64. fenframe.BackgroundColor3 = Color3.new(255,255,255)
  65. fenframe.BackgroundTransparency = 1
  66. fenframe.BorderColor3 = Color3.new(17,17,17)
  67. fenframe.Size = UDim2.new(0.0500000007, 0, 0.100000001, 0)
  68. fenframe.Position = UDim2.new(0,0,0,0)
  69. local fentext2 = Instance.new("TextLabel")
  70. fentext2.Parent = fenframe
  71. fentext2.Text = " "
  72. fentext2.BackgroundTransparency = 0
  73. fentext2.BackgroundColor3 = Color3.new(0,0,1)
  74. fentext2.SizeConstraint = "RelativeXY"
  75. fentext2.TextXAlignment = "Center"
  76. fentext2.TextYAlignment = "Center"
  77. fentext2.Position = UDim2.new(0,10,1,170)
  78. fentext2.Size = UDim2.new(2.79999995,0,0.210000306,0)
  79. local fentext3 = Instance.new("TextLabel")
  80. fentext3.Parent = fenframe
  81. fentext3.Text = "Shoot: "..tostring(canshoot).." | Mode: "..mode..""
  82. fentext3.BackgroundTransparency = 0
  83. fentext3.BackgroundColor3 = Color3.new(1,1,1)
  84. fentext3.SizeConstraint = "RelativeXY"
  85. fentext3.TextXAlignment = "Center"
  86. fentext3.TextYAlignment = "Center"
  87. fentext3.Position = UDim2.new(0,10,1,170)
  88. fentext3.Size = UDim2.new(400*0.007,0,0.400000006,0)
  89.  
  90. function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  91. part.Parent = parent
  92. part.formFactor = form
  93. part.CanCollide = collide
  94. part.Transparency = tran
  95. part.Reflectance = ref
  96. part.Size = Vector3.new(x,y,z)
  97. part.BrickColor = BrickColor.new(color)
  98. part.TopSurface = 0
  99. part.BottomSurface = 0
  100. part.Anchored = anchor
  101. part:BreakJoints()
  102. end
  103.  
  104. function weld(w, p, p0, p1, a, b, c, x, y, z)
  105. w.Parent = p
  106. w.Part0 = p0
  107. w.Part1 = p1
  108. w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z)
  109. end
  110.  
  111. function mesh(mesh, parent, x, y, z, type)
  112. mesh.Parent = parent
  113. mesh.Scale = Vector3.new(x, y, z)
  114. mesh.MeshType = type
  115. end
  116.  
  117. function findNearestTorso(pos)
  118.     local list = game.Workspace:children()
  119.     local torso = nil
  120.     local dist = 50
  121.     local temp = nil
  122.     local human = nil
  123.     local temp2 = nil
  124.     for x = 1, #list do
  125.         temp2 = list[x]
  126.         if (temp2.className == "Model") and (temp2 ~= Character) and (temp2.Name ~= "kash5") then
  127.             temp = temp2:findFirstChild("Torso")
  128.             human = temp2:findFirstChild("Humanoid")
  129.             if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  130.                 if (temp.Position - pos).magnitude < dist then
  131.                     torso = temp
  132.                     dist = (temp.Position - pos).magnitude
  133.                 end
  134.             end
  135.         end
  136.     end
  137.     return torso
  138. end
  139.  
  140. if Character:findFirstChild("Controller Model") ~= nil then
  141. Character:findFirstChild("Controller Model").Parent = nil
  142. end
  143.  
  144. CModel=Instance.new("Model")
  145. CModel.Parent=Character
  146. CModel.Name="Controller Model"
  147.  
  148. function makerob()
  149. coroutine.resume(coroutine.create(function()
  150.     if Character:findFirstChild("Fen's Bot",true) ~= nil then
  151.     Character:findFirstChild("Fen's Bot",true).Parent = nil
  152.     end
  153.     mod.Parent=Character
  154.     mod.Name = "Fen's Bot"
  155. --  local main = Instance.new("Part")
  156.     prop(main,mod,true,0,0,2.4,1.3,4,color,false,"Custom")
  157.     main.Name = "MainPart"
  158.     main.Position = Head.Position+Vector3.new(0,10,0)
  159.  
  160.     for i=-1, 1, 2 do
  161.         local fir = Instance.new("Part")
  162.         prop(fir,mod,true,0,0,1,1.8,1,"Black",false,"Custom")
  163.         local wel = Instance.new("Weld")
  164.         weld(wel,main,main,fir,(0.4+math.pi),0,i/2.5,i,1,-1.7)
  165.         local fira = Instance.new("Fire",fir)
  166.         fira.Color = Color3.new(0.1,1,0.1)
  167.         fira.SecondaryColor = fira.Color
  168.         fira.Size = 1
  169.         fira.Heat = 25
  170.     end
  171.     for i=-1, 1, 2 do
  172.         local fir = Instance.new("Part")
  173.         prop(fir,mod,true,0,0,1,1.8,1,"Black",false,"Custom")
  174.         local wel = Instance.new("Weld")
  175.         weld(wel,main,main,fir,(-0.4+math.pi),0,i/2.5,i,1,1.7)
  176.         local fira = Instance.new("Fire",fir)
  177.         fira.Color = Color3.new(0.1,1,0.1)
  178.         fira.SecondaryColor = fira.Color
  179.         fira.Size = 1
  180.         fira.Heat = 25
  181.     end
  182.         prop(pip2,mod,true,0,0,0.6,2,0.6,"Black",false,"Custom")
  183.         local mes = Instance.new("SpecialMesh")
  184.         mesh(mes,pip2,1,1,1,"Head")
  185.         local we = Instance.new("Weld")
  186.         weld(we,main,main,pip2,1.57,0,1.57,0.6,-0.3,2.2)
  187.         prop(pip1,mod,true,0,0,0.6,2,0.6,"Black",false,"Custom")
  188.         local mes = Instance.new("SpecialMesh")
  189.         mesh(mes,pip1,1,1,1,"Head")
  190.         local we = Instance.new("Weld")
  191.         weld(we,main,main,pip1,1.57,0,1.57,-0.6,-0.3,2.2)
  192.     local bal = Instance.new("Part")
  193.     prop(bal,mod,true,0,0,2.2,1,3.6,"Black",false,"Custom")
  194.     local mf = Instance.new("SpecialMesh")
  195.     mesh(mf,bal,1,1,1,"Sphere")
  196.     local weg = Instance.new("Weld")
  197.     weld(weg,main,main,bal,0,0,0,0,-0.6,0)
  198.     local pos = Instance.new("BodyPosition",main)
  199.     pos.position = Torso.Position + Vector3.new(0,25,0)
  200.     pos.maxForce = Vector3.new(7500,7500,7500)
  201.     pos.Name = "BP"
  202.     local bg = Instance.new("BodyGyro",main)
  203.     bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  204.     bg.P = 50000
  205.     bg.cframe = CFrame.new(main.Position, Torso.Position)
  206.     bg.Name = "BG"
  207.     while true do
  208.         wait()
  209.         if mode==1 then
  210.             if workspace.kash5.Torso then
  211.                 local target = findNearestTorso(Character.Torso.Position)
  212.                 if target~=nil then
  213.                     bg.cframe = CFrame.new(main.Position, target.Position)
  214.                     if canshoot==true then
  215.                     coroutine.resume(coroutine.create(function()
  216.                     if target~=nil and shooting1==false then
  217.                     shooting1=true
  218.                     wait(math.random())
  219.                     fire1(0.3)
  220.                     shoottrail2(pip1,damage/2)
  221.                     shooting1=false
  222.                     end
  223.                     end))
  224.                     coroutine.resume(coroutine.create(function()
  225.                     if target~=nil and shooting2==false then
  226.                     shooting2=true
  227.                     wait(math.random())
  228.                     fire1(0.3)
  229.                     shoottrail2(pip2,damage*2)
  230.                     shooting2=false
  231.                     end
  232.                     end))
  233.                     end
  234.                 else
  235.                     bg.cframe = CFrame.new(main.Position, Torso.Position)
  236.                 end
  237.                 local heh = math.random(1,35)
  238.                 if heh == 1 then
  239.                     pos.position = Torso.Position + Vector3.new(math.random(-24,24),math.random(5,25),math.random(-24,24))
  240.                 end
  241.             end
  242.         elseif mode==2 then
  243.             if workspace.kash5.Torso then
  244. --                  print(shooting)
  245.                     vel=main.Velocity.x
  246.                     if vel>=0.7 then
  247.                     vel=0.7
  248.                     end
  249.                     if vel<-0.7 then
  250.                     vel=-0.7
  251.                     end
  252.                     vel2=main.Velocity.z
  253.                     if vel2>=0.7 then
  254.                     vel2=0.7
  255.                     end
  256.                     if vel2<-0.7 then
  257.                     vel2=-0.7
  258.                     end
  259.                     p2.Weld.C0 = CFrame.new(0, -0.8, 0) * CFrame.fromEulerAnglesXYZ(-vel,0,vel2)
  260.                     LW.C0 = CFrame.new(-1.5+0.3,0.5,-0.3) * CFrame.fromEulerAnglesXYZ(1.5,0,0.5)
  261.                     LW.C1 = CFrame.new(vel2/3, 0.5-vel/2, 0) * CFrame.fromEulerAnglesXYZ(0,0,-vel2/2)
  262.                     if canshoot==true then
  263.                     coroutine.resume(coroutine.create(function()
  264.                     if target~=nil and shooting1==false then
  265.                     shooting1=true
  266.                     wait(math.random())
  267.                     fire1(0.3)
  268.                     shoottrail2(pip1,damage/2)
  269.                     shooting1=false
  270.                     end
  271.                     end))
  272.                     coroutine.resume(coroutine.create(function()
  273.                     if target~=nil and shooting2==false then
  274.                     shooting2=true
  275.                     wait(math.random())
  276.                     fire1(0.3)
  277.                     shoottrail2(pip2,damage*2)
  278.                     shooting2=false
  279.                     end
  280.                     end))
  281.                     end
  282.                 if MMouse.Hit.p~=nil then
  283.                     bg.cframe = CFrame.new(main.Position, MMouse.Hit.p)
  284.                 end
  285.                 local heh = math.random(1,35)
  286.                 if heh == 1 then
  287.                     if MMouse.Hit.p~=nil then
  288.                         pos.position = MMouse.Hit.p + Vector3.new(math.random(-24,24),math.random(5,25),math.random(-24,24))
  289.                     else
  290.                         pos.position = Torso.Position + Vector3.new(math.random(-24,24),math.random(5,25),math.random(-24,24))
  291.                     end
  292.                 end
  293.             end
  294.         elseif mode==3 then
  295.             if workspace.kash5.Torso then
  296.                 local target = findNearestTorso(Character.Torso.Position)
  297.                 if target~=nil then
  298.                     bg.cframe = CFrame.new(main.Position, target.Position)
  299. --                  print(shooting)
  300.                     if canshoot==true then
  301.                     coroutine.resume(coroutine.create(function()
  302.                     if target~=nil and shooting1==false then
  303.                     shooting1=true
  304.                     wait(math.random())
  305.                     fire1(0.3)
  306.                     shoottrail2(pip1,damage/2)
  307.                     shooting1=false
  308.                     end
  309.                     end))
  310.                     coroutine.resume(coroutine.create(function()
  311.                     if target~=nil and shooting2==false then
  312.                     shooting2=true
  313.                     wait(math.random())
  314.                     fire1(0.3)
  315.                     shoottrail2(pip2,damage*2)
  316.                     shooting2=false
  317.                     end
  318.                     end))
  319.                     end
  320.                 else
  321.                     bg.cframe = CFrame.new(main.Position, Torso.Position)
  322.                 end
  323.                 local heh = 1
  324.                 if heh == 1 then
  325.                     pos.position = Torso.Position + Vector3.new(0,20,0)
  326.                 end
  327.             end
  328.         elseif mode==4 then
  329.             if workspace.kash5.Torso then
  330.                     vel=main.Velocity.x
  331.                     if vel>=0.7 then
  332.                     vel=0.7
  333.                     end
  334.                     if vel<-0.7 then
  335.                     vel=-0.7
  336.                     end
  337.                     vel2=main.Velocity.z
  338.                     if vel2>=0.7 then
  339.                     vel2=0.7
  340.                     end
  341.                     if vel2<-0.7 then
  342.                     vel2=-0.7
  343.                     end
  344.                     p2.Weld.C0 = CFrame.new(0, -0.8, 0) * CFrame.fromEulerAnglesXYZ(-vel,0,vel2)
  345.                     LW.C0 = CFrame.new(-1.5+0.3,0.5,-0.3) * CFrame.fromEulerAnglesXYZ(1.5,0,0.5)
  346.                     LW.C1 = CFrame.new(vel2/3, 0.5-vel/2, 0) * CFrame.fromEulerAnglesXYZ(0,0,-vel2/2)
  347.                     if canshoot==true then
  348.                     coroutine.resume(coroutine.create(function()
  349.                     if target~=nil and shooting1==false then
  350.                     shooting1=true
  351.                     wait(math.random())
  352.                     fire1(0.3)
  353.                     shoottrail2(pip1,damage/2)
  354.                     shooting1=false
  355.                     end
  356.                     end))
  357.                     coroutine.resume(coroutine.create(function()
  358.                     if target~=nil and shooting2==false then
  359.                     shooting2=true
  360.                     wait(math.random())
  361.                     fire1(0.3)
  362.                     shoottrail2(pip2,damage*2)
  363.                     shooting2=false
  364.                     end
  365.                     end))
  366.                     end
  367.                 if MMouse.Hit.p~=nil then
  368.                     bg.cframe = CFrame.new(main.Position, MMouse.Hit.p)
  369.                 end
  370.                 local heh = 1
  371.                 if heh == 1 then
  372.                     pos.position = Torso.Position + Vector3.new(0,20,0)
  373.                 end
  374.             end
  375.         elseif mode==5 then
  376.             if workspace.kash5.Torso then
  377. if sitting==false then
  378. coroutine.resume(coroutine.create(function()
  379. for i=0,1,0.1 do
  380. wait()
  381. print(p9.Parent)
  382. sitting=true
  383. p9.formFactor = 1
  384. p9.CanCollide = false
  385. p9.Name = "Dat Seat"
  386. p9.Locked = true
  387. p9.Size = Vector3.new(2,1,2)
  388. p9.BrickColor=BrickColor.new("Navy blue")
  389. p9.Parent = mod
  390. p9.CFrame=main.CFrame
  391. p9:BreakJoints()
  392. local seatweld = Instance.new("Weld")
  393. seatweld.Parent = p9
  394. seatweld.Part0 = p9
  395. seatweld.Part1 = main
  396. seatweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0, 0, 0)
  397. end
  398. end))
  399. end
  400.                     vel=main.Velocity.x
  401.                     if vel>=0.7 then
  402.                     vel=0.7
  403.                     end
  404.                     if vel<-0.7 then
  405.                     vel=-0.7
  406.                     end
  407.                     vel2=main.Velocity.z
  408.                     if vel2>=0.7 then
  409.                     vel2=0.7
  410.                     end
  411.                     if vel2<-0.7 then
  412.                     vel2=-0.7
  413.                     end
  414.                     p2.Weld.C0 = CFrame.new(0, -0.8, 0) * CFrame.fromEulerAnglesXYZ(-vel,0,vel2)
  415.                     LW.C0 = CFrame.new(-1.5+0.3,0.5,-0.3) * CFrame.fromEulerAnglesXYZ(1.5,0,0.5)
  416.                     LW.C1 = CFrame.new(vel2/3, 0.5-vel/2, 0) * CFrame.fromEulerAnglesXYZ(0,0,-vel2/2)
  417. --                  print(shooting)
  418.                     if canshoot==true then
  419.                     coroutine.resume(coroutine.create(function()
  420.                     if shooting1==false then
  421.                     shooting1=true
  422.                     wait(math.random())
  423.                     fire1(0.3)
  424.                     shoottrail2(pip1,25)
  425.                     shooting1=false
  426.                     end
  427.                     end))
  428.                     coroutine.resume(coroutine.create(function()
  429.                     if shooting2==false then
  430.                     shooting2=true
  431.                     wait(math.random())
  432.                     fire1(0.3)
  433.                     shoottrail2(pip2,15)
  434.                     shooting2=false
  435.                     end
  436.                     end))
  437.                     end
  438.                 if MMouse.Hit.p~=nil then
  439.                     bg.cframe = CFrame.new(main.Position, MMouse.Hit.p+Vector3.new(0,4,0))
  440.                 end
  441.                 local heh = 1
  442.                 if heh == 1 then
  443.                     if MMouse.Hit.p~=nil then
  444.                         pos.position = MMouse.Hit.p + Vector3.new(0,4,0)
  445.                     end
  446.                 end
  447.             end
  448.         end
  449.     end
  450. end))
  451. end
  452. makerob()
  453.  
  454. if (script.Parent.className ~= "HopperBin") then
  455. Tool = Instance.new("HopperBin")
  456. Tool.Parent = Backpack
  457. Tool.Name = "AI Bot"
  458. script.Parent = Tool
  459. end
  460. Bin = script.Parent
  461.  
  462. function shoottrail2(pos1,Damage)
  463. coroutine.resume(coroutine.create(function()
  464. spread2 = 0
  465. range2 = 1000
  466. rangepower = 5
  467. local spreadvector = (Vector3.new(math.random(-spread2,spread2),math.random(-spread2,spread2),math.random(-spread2,spread2)) / 100) --* (pos1.Position).magnitude/100
  468. --local dir = Head.CFrame.lookVector+spreadvector
  469. local dir = main.CFrame.lookVector+spreadvector
  470. local ammount = 100
  471. local hit2,pos = rayCast(pos1.Position,dir,10,mod)
  472. local rangepos = range2
  473. local function drawtrail(From,To)
  474. local effectsmsh = Instance.new("SpecialMesh")
  475. local Damg = Damage*2
  476. effectsmsh.Scale = Vector3.new(1,1,1)
  477. effectsmsh.MeshType="Sphere"
  478. effectsmsh.Name = "Mesh"
  479. local effectsg = Instance.new("Part")
  480. local spar=Instance.new("Sparkles")
  481. spar.Parent=effectsg
  482. spar.SparkleColor=Color3.new(0, 0, 102)
  483. effectsg.formFactor = 3
  484. effectsg.CanCollide = false
  485. effectsg.Name = "Eff"
  486. effectsg.Locked = true
  487. effectsg.Anchored = true
  488. effectsg.Size = Vector3.new(1,0.4,1)
  489. effectsg.Parent = mod
  490. effectsmsh.Parent = effectsg
  491. effectsg.BrickColor = BrickColor.new("Cyan")
  492. effectsg.Reflectance = 0.25
  493. local LP = From
  494. local point1 = To
  495. local mg = (LP - point1).magnitude
  496. effectsmsh.Scale = Vector3.new(1,mg*5,1)
  497. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  498. coroutine.resume(coroutine.create(function()
  499. wait(0.1)
  500. spar.Enabled=false
  501. Smok.Enabled=false
  502. end))
  503. coroutine.resume(coroutine.create(function()
  504. for i = 0 , 1 , 0.2 do
  505. wait()
  506. --effectsg.Transparency = 1*i
  507. effectsmsh.Scale = Vector3.new(1-1*i,mg*5,1-1*i)
  508. end
  509. effectsg.Transparency = 1
  510. wait()
  511. effectsg.Parent = nil
  512. end))
  513. end
  514. local newpos = pos1.Position
  515. local inc = rangepower
  516. local Damg = Damage*2
  517. local decr = 0
  518. repeat
  519. wait()
  520. rangepos = rangepos - 10
  521. dir = dir
  522. --dir = dir
  523. --print(Damg)
  524. hit2,pos = rayCast(newpos,dir,inc,mod)
  525. drawtrail(newpos,pos)
  526. newpos = newpos + (dir * inc)
  527. if alt==1 then
  528. inc = 10
  529. if inc >= 20 then
  530. inc = inc - 10
  531. end
  532. end
  533. if hit2 ~= nil then
  534. rangepos = 0
  535. end
  536. until rangepos <= 0
  537. EVENMOARMAGIX2(CFrame.new(newpos),2,2,2,0,0,0,0,0,0,BrickColor.new("Cyan"))
  538. if hit2 ~= nil then
  539. local effectsmsh = Instance.new("SpecialMesh")
  540. effectsmsh.MeshId = "http://www.roblox.com/asset/?id=15887356"
  541. --effectsmsh.Scale = Vector3.new(1,1,2.5)
  542. effectsmsh.Scale = Vector3.new(3,3,3)
  543. local effectsg = Instance.new("Part")
  544. effectsg.formFactor = 3
  545. effectsg.CanCollide = false
  546. effectsg.Name = "Arrow"
  547. effectsg.Locked = true
  548. effectsg.Transparency = 1
  549. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  550. effectsg.Parent = mod
  551. effectsg.BrickColor = BrickColor.new("Cyan")
  552. effectsmsh.Parent = effectsg
  553. effectsg.CFrame = CFrame.new(newpos,pos) + CFrame.new(newpos,pos).lookVector*2.5*2
  554. coroutine.resume(coroutine.create(function()
  555. wait()
  556. effectsg.Parent = nil
  557. end))
  558. local efwel = Instance.new("Weld")
  559. efwel.Parent = effectsg
  560. efwel.Part0 = effectsg
  561. efwel.Part1 = hit2
  562. efwel.Parent = nil
  563. effectsg.Anchored = true
  564. local HitPos = effectsg.Position + CFrame.new(newpos,pos).lookVector*0.75
  565. --local HitPos = pppart.Position + CFrame.new(newpos,pos).lookVector*0.75
  566. --local HitPos = pppart.Position + (prt1.CFrame.lookVector * .5)
  567. local CJ = CFrame.new(HitPos)
  568. local C0 = effectsg.CFrame:inverse() * CJ
  569. local C1 = hit2.CFrame:inverse() * CJ
  570. --efwel.C0 = C0
  571. --efwel.C1 = C1
  572. --efwel.Parent = effectsg
  573. if hit2.Parent:FindFirstChild("Humanoid") ~= nil then
  574. hum = hit2.Parent.Humanoid
  575. attackdebounce=false
  576. Damagefunc1(hit2,math.floor(Damg/4),5)
  577. elseif hit2.Parent.Parent ~= nil and hit2.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  578. hum = hit2.Parent.Parent.Humanoid
  579. attackdebounce=false
  580. Damagefunc1(hit2,math.floor(Damg/4),5)
  581. end
  582. end
  583. end))
  584. end
  585.  
  586. function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , Ignore Descendants
  587. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  588. end
  589.  
  590. function MMMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  591.     local msh1 = Instance.new("BlockMesh")
  592.     msh1.Scale = Vector3.new(1,1,1)
  593.     S=Instance.new("Part")
  594.     S.Name="Effect"
  595.     S.formFactor=0
  596.     S.Size=Vector3.new(x1,y1,z1)
  597.     S.BrickColor=color
  598.     S.Reflectance = 0
  599.     S.TopSurface=0
  600.     S.BottomSurface=0
  601.     S.Transparency=0
  602.     S.Anchored=true
  603.     S.CanCollide=false
  604.     S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  605.     S.Parent=Character
  606.     msh1.Parent = S
  607.     coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.1,0.1,0.1) Part.CFrame = CFrame.new(Part.Position-Vector3.new(0,0.3,0))*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  608. end
  609.  
  610. function UltimaMMMAGIC(part,x1,y1,z1,x2,y2,z2,color)
  611.     local msh1 = Instance.new("BlockMesh")
  612.     msh1.Scale = Vector3.new(x1,y1,z1)
  613.     S=Instance.new("Part")
  614.     S.Name="Effect"
  615.     S.formFactor=0
  616.     S.Size=Vector3.new(1,1,1)
  617.     S.BrickColor=color
  618.     S.Reflectance = 0
  619.     S.TopSurface=0
  620.     S.BottomSurface=0
  621.     S.Transparency=0
  622.     S.Anchored=true
  623.     S.CanCollide=false
  624.     S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  625.     S.Parent=Character
  626.     msh1.Parent = S
  627.     coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.1,0.1,0.1) Part.CFrame=Part.CFrame*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  628. end
  629.  
  630. function MOREMAGIX(part,cframe,x,y,z,color)
  631.         p2=Instance.new("Part")
  632.         p2.Name="Blast"
  633.         p2.TopSurface=0
  634.         p2.BottomSurface=0
  635.         p2.CanCollide=false
  636.         p2.Anchored=true
  637.         p2.BrickColor=color
  638.         p2.Size=Vector3.new(x,y,z)
  639.         p2.formFactor="Symmetric"
  640.         p2.CFrame=part.CFrame*CFrame.new(0,cframe,0)
  641.         p2.Parent=workspace
  642.         m=Instance.new("BlockMesh")
  643.         m.Parent=p2
  644.         m.Name="BlastMesh"
  645.         coroutine.resume(coroutine.create(function(part,dir) for loll=1, 15 do part.BlastMesh.Scale=part.BlastMesh.Scale-Vector3.new(.09,.09,.09) part.Transparency=loll/20 part.CFrame=part.CFrame*CFrame.new(dir)*CFrame.fromEulerAnglesXYZ(math.random(-100,100)/100, math.random(-100,100)/100, math.random(-100,100)/100) wait() end part.Parent=nil end),p2,Vector3.new(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10))
  646. end
  647.  
  648. function EVENMOARMAGIX(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  649.     local msh1 = Instance.new("SpecialMesh")
  650.     msh1.Scale = Vector3.new(0.5,0.5,0.5)
  651.     msh1.MeshType = "Sphere"
  652.     S=Instance.new("Part")
  653.     S.Name="Effect"
  654.     S.formFactor=0
  655.     S.Size=Vector3.new(x1,y1,z1)
  656.     S.BrickColor=color
  657.     if Style == "WingBlade" and element == "Dark" then
  658.     S.BrickColor=BrickColor.new("Black")
  659.     end
  660.     S.Reflectance = 0
  661.     S.TopSurface=0
  662.     S.BottomSurface=0
  663.     S.Transparency=0
  664.     S.Anchored=true
  665.     S.CanCollide=false
  666.     S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  667.     S.Parent=Character
  668.     msh1.Parent = S
  669.     coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.15,0.3,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  670. end
  671.  
  672. function WaveEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  673.     local msh1 = Instance.new("SpecialMesh")
  674.     msh1.Scale = Vector3.new(x1,y1,z1)
  675.     msh1.MeshId = "http://www.roblox.com/asset/?id=20329976"
  676.     S=Instance.new("Part")
  677.     S.Name="Effect"
  678.     S.formFactor=0
  679.     S.Size=Vector3.new(1,1,1)
  680.     S.BrickColor=color
  681.     S.Reflectance = 0
  682.     S.TopSurface=0
  683.     S.BottomSurface=0
  684.     S.Transparency=0
  685.     S.Anchored=true
  686.     S.CanCollide=false
  687.     S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  688.     S.Parent=Character
  689.     msh1.Parent = S
  690.     coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.15,0.3,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  691. end
  692.  
  693. function BlastEffect(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  694.     local msh1 = Instance.new("SpecialMesh")
  695.     msh1.Scale = Vector3.new(x1,y1,z1)
  696.     msh1.MeshId = "http://www.roblox.com/asset/?id=1323306"
  697.     S=Instance.new("Part")
  698.     S.Name="Effect"
  699.     S.formFactor=0
  700.     S.Size=Vector3.new(1,1,1)
  701.     S.BrickColor=color
  702.     S.Reflectance = 0
  703.     S.TopSurface=0
  704.     S.BottomSurface=0
  705.     S.Transparency=0
  706.     S.Anchored=true
  707.     S.CanCollide=false
  708.     S.CFrame=part.CFrame*CFrame.new(x2,y2,z2)*CFrame.fromEulerAnglesXYZ(x3,y3,z3)
  709.     S.Parent=Character
  710.     msh1.Parent = S
  711.     coroutine.resume(coroutine.create(function(Part,CF) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.15,0.3,0.15) Part.Transparency=i*.1 wait() end Part.Parent=nil end),S,S.CFrame)
  712. end
  713.  
  714. function EVENMOARMAGIX2(part,x1,y1,z1,x2,y2,z2,x3,y3,z3,color)
  715.     local msh1 = Instance.new("SpecialMesh")
  716.     msh1.Scale = Vector3.new(0.5,0.5,0.5)
  717.     msh1.MeshType = "Sphere"
  718.     S=Instance.new("Part")
  719.     S.Name="Effect"
  720.     S.formFactor=0
  721.     S.Size=Vector3.new(x1,y1,z1)
  722.     S.BrickColor=color
  723.     S.Reflectance = 0
  724.     S.TopSurface=0
  725.     S.BottomSurface=0
  726.     S.Transparency=0
  727.     S.Anchored=true
  728.     S.CanCollide=false
  729.     S.CFrame=part
  730.     S.Parent=workspace
  731.     msh1.Parent = S
  732.     coroutine.resume(coroutine.create(function(Part,CF) for i=1, 5 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.3,0.3,0.3) Part.Transparency=Part.Transparency+0.15 wait() end Part.Parent=nil end),S,S.CFrame)
  733. end
  734.  
  735. function ss(pitch)
  736.  
  737. local SlashSound = Instance.new("Sound")
  738. SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
  739. SlashSound.Parent = main
  740.  
  741. SlashSound.Volume = .7
  742. SlashSound.Pitch = pitch
  743. SlashSound.PlayOnRemove = true
  744. coroutine.resume(coroutine.create(function()
  745. wait(1)
  746. SlashSound.Parent = nil
  747. end))
  748. end
  749. function critsound(pitch)
  750.  
  751. local SlashSound = Instance.new("Sound")
  752. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2801263"
  753. SlashSound.Parent = main
  754.  
  755. SlashSound.Volume = .4
  756. SlashSound.Pitch = pitch
  757. SlashSound.PlayOnRemove = true
  758. coroutine.resume(coroutine.create(function()
  759. wait(1)
  760. SlashSound.Parent = nil
  761. end))
  762. end
  763. function charge(pitch)
  764.  
  765. local SlashSound = Instance.new("Sound")
  766. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2101137"
  767. SlashSound.Parent = main
  768.  
  769. SlashSound.Volume = 1
  770. SlashSound.Pitch = pitch
  771. SlashSound.PlayOnRemove = true
  772. coroutine.resume(coroutine.create(function()
  773. wait(1)
  774. SlashSound.Parent = nil
  775. end))
  776. end
  777. function bewm(pitch)
  778.  
  779. local SlashSound = Instance.new("Sound")
  780. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2248511"
  781. SlashSound.Parent = main
  782.  
  783. SlashSound.Volume = .7
  784. SlashSound.Pitch = pitch
  785. SlashSound.PlayOnRemove = true
  786. coroutine.resume(coroutine.create(function()
  787. wait(1)
  788. SlashSound.Parent = nil
  789. end))
  790. end
  791. function abscond(pitch)
  792.  
  793. local SlashSound = Instance.new("Sound")
  794. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2767090"
  795. SlashSound.Parent = main
  796. game:service'Lighing'["Lolsound"].Value=SlashSound
  797. SlashSound.Volume = 1
  798. SlashSound.Pitch = pitch
  799. SlashSound.PlayOnRemove = true
  800. coroutine.resume(coroutine.create(function()
  801. wait(1)
  802. SlashSound.Parent = nil
  803. end))
  804. end
  805. function distort(pitch)
  806.  
  807. local SlashSound = Instance.new("Sound")
  808. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2974249"
  809. SlashSound.Parent = main
  810.  
  811. SlashSound.Volume = 1
  812. SlashSound.Pitch = pitch
  813. SlashSound.PlayOnRemove = true
  814. coroutine.resume(coroutine.create(function()
  815. wait(1)
  816. SlashSound.Parent = nil
  817. end))
  818. end
  819. function thwack(pitch)
  820.  
  821. local SlashSound = Instance.new("Sound")
  822. SlashSound.SoundId = "http://www.roblox.com/asset/?id=46153268"
  823. SlashSound.Parent = main
  824.  
  825. SlashSound.Volume = 1
  826. SlashSound.Pitch = pitch
  827. SlashSound.PlayOnRemove = true
  828. coroutine.resume(coroutine.create(function()
  829. wait(1)
  830. SlashSound.Parent = nil
  831. end))
  832. end
  833. function fire1(pitch)
  834.  
  835. local SlashSound = Instance.new("Sound")
  836. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2697431"
  837. SlashSound.Parent = main
  838.  
  839. SlashSound.Volume = 1
  840. SlashSound.Pitch = pitch
  841. SlashSound.PlayOnRemove = true
  842. coroutine.resume(coroutine.create(function()
  843. wait(1)
  844. SlashSound.Parent = nil
  845. end))
  846. end
  847. function fire2(pitch)
  848.  
  849. local SlashSound = Instance.new("Sound")
  850. SlashSound.SoundId = "http://www.roblox.com/asset/?id=48618802 "
  851. SlashSound.Parent = main
  852.  
  853. SlashSound.Volume = 1
  854. SlashSound.Pitch = pitch
  855. SlashSound.PlayOnRemove = true
  856. coroutine.resume(coroutine.create(function()
  857. wait(1)
  858. SlashSound.Parent = nil
  859. end))
  860. end
  861. function grip(pitch)
  862.  
  863. local SlashSound = Instance.new("Sound")
  864. SlashSound.SoundId = "rbxasset://sounds/swordslash.wav"
  865. SlashSound.Parent = main
  866.  
  867. SlashSound.Volume = 1
  868. SlashSound.Pitch = pitch
  869. SlashSound.PlayOnRemove = true
  870. coroutine.resume(coroutine.create(function()
  871. wait(1)
  872. SlashSound.Parent = nil
  873. end))
  874. end
  875. function reload(pitch)
  876.  
  877. local SlashSound = Instance.new("Sound")
  878. SlashSound.SoundId = "http://www.roblox.com/asset/?id=2697295"
  879. SlashSound.Parent = main
  880.  
  881. SlashSound.Volume = 1
  882. SlashSound.Pitch = pitch
  883. SlashSound.PlayOnRemove = true
  884. coroutine.resume(coroutine.create(function()
  885. wait(1)
  886. SlashSound.Parent = nil
  887. end))
  888. end
  889.  
  890. Damagefunc1=function(hit,Damage,Knockback)
  891.     if attackdebounce == false then
  892.     attackdebounce = true
  893.     coroutine.resume(coroutine.create(function()
  894.     wait(0.1)
  895.     attackdebounce = false
  896.     end))
  897.     if hit.Parent==nil then
  898.         return
  899.     end
  900.     CPlayer=Bin
  901.     h=hit.Parent:FindFirstChild("Humanoid")
  902.     if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  903.         Damage=Damage
  904. --[[        if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  905.             return
  906.         end]]
  907.             c=Instance.new("ObjectValue")
  908.             c.Name="creator"
  909.             c.Value=game.Players.LocalPlayer
  910.             c.Parent=h
  911.             game:GetService("Debris"):AddItem(c,.5)
  912. --          print(c.Value)
  913.         if math.random(0,99)+math.random()<=5 then
  914.             CRIT=true
  915.             Damage=Damage*1.5
  916. --[[            Knockback=Knockback*2
  917.             r=Instance.new("BodyAngularVelocity")
  918.             r.P=3000
  919.             r.maxTorque=Vector3.new(500000000,50000000000,500000000)*50000
  920.             r.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  921.             r.Parent=hit.Parent.Torso]]
  922.             critsound(2)
  923.    
  924.         end
  925.         Damage=Damage+math.random(0,10)
  926. --      Blood(hit.CFrame*CFrame.new(math.random(-10,10)/10,math.random(-10,10)/10,0),math.floor(Damage/2))
  927.         h:TakeDamage(Damage)
  928.         showDamage(hit.Parent,Damage,.5)
  929.         vp=Instance.new("BodyVelocity")
  930.         vp.P=500
  931.         vp.maxForce=Vector3.new(math.huge,0,math.huge)
  932. --      vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  933.         vp.velocity=Torso.CFrame.lookVector*Knockback+Torso.Velocity/1.05
  934.         if Knockback>0 then
  935.             vp.Parent=hit.Parent.Torso
  936.         end
  937.         game:GetService("Debris"):AddItem(vp,.25)
  938. --[[        r=Instance.new("BodyAngularVelocity")
  939.         r.P=3000
  940.         r.maxTorque=Vector3.new(500000000,50000000000,500000000)*50000
  941.         r.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
  942.         r.Parent=hit.Parent.Torso]]
  943.         game:GetService("Debris"):AddItem(r,.5)
  944.                 c=Instance.new("ObjectValue")
  945.             c.Name="creator"
  946.             c.Value=Player
  947.             c.Parent=h
  948.             game:GetService("Debris"):AddItem(c,.5)
  949.         CRIT=false
  950.         hitDeb=true
  951.         AttackPos=6
  952.     end
  953.     end
  954. end
  955.  
  956. showDamage=function(Char,Dealt,du)
  957.     m=Instance.new("Model")
  958.     m.Name=tostring(Dealt)
  959.     h=Instance.new("Humanoid")
  960.     h.Health=0
  961.     h.MaxHealth=0
  962.     h.Parent=m
  963.     c=Instance.new("Part")
  964.     c.Transparency=0
  965.     c.BrickColor=BrickColor:Red()
  966.     if CRIT==true then
  967.         c.BrickColor=BrickColor.new("Really red")
  968.     end
  969.     c.Name="Head"
  970.     c.TopSurface=0
  971.     c.BottomSurface=0
  972.     c.formFactor="Plate"
  973.     c.Size=Vector3.new(1,.4,1)
  974.     ms=Instance.new("CylinderMesh")
  975.     ms.Scale=Vector3.new(.8,.8,.8)
  976.     if CRIT==true then
  977.         ms.Scale=Vector3.new(1.25,1.5,1.25)
  978.     end
  979.     ms.Parent=c
  980.     c.Reflectance=0
  981.     Instance.new("BodyGyro").Parent=c
  982.     c.Parent=m
  983.     c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  984.     f=Instance.new("BodyPosition")
  985.     f.P=2000
  986.     f.D=100
  987.     f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  988.     f.position=c.Position+Vector3.new(0,3,0)
  989.     f.Parent=c
  990.     game:GetService("Debris"):AddItem(m,.5+du)
  991.     c.CanCollide=false
  992.     m.Parent=workspace
  993.     c.CanCollide=false
  994. end
  995.  
  996. hold = false
  997.  
  998. function ob1d(mouse)
  999. if attack == true then return end
  1000. if mouse.Target.Parent:findFirstChild("Humanoid")~=nil then
  1001. player = Player
  1002. ch = Character
  1003. RW = ch.Torso["Right Shoulder"]
  1004. LW = ch.Torso["Left Shoulder"]
  1005. coroutine.resume(coroutine.create(function()
  1006. DerpRainEffect(mouse.Target)
  1007. end))
  1008. hold = true
  1009. --[[RW.Parent = nil
  1010. LW.Parent = nil
  1011. RSH.Parent = player.Character.Torso
  1012. LSH.Parent = player.Character.Torso ]]
  1013. RW.C0 = CFrame.new(1,0.5,0,0,0,1,0,1,0,-1,-0,-0)
  1014. LW.C0 = CFrame.new(-1,0.5,0,-0,-0,-1,0,1,0,1,0,0)
  1015. end
  1016. end
  1017.  
  1018. function ob1u(mouse)
  1019. hold = false
  1020. end
  1021.  
  1022. buttonhold = false
  1023.  
  1024. function Key(key,mouse)
  1025. if key == "q" then
  1026. for i=0,1,0.1 do
  1027. wait()
  1028. LW.C0 = CFrame.new(-1.5+0.3-0.1*i,0.5,-0.3+0.1*i) * CFrame.fromEulerAnglesXYZ(1.5,0,0.5+0.4*i)
  1029. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1030. end
  1031. for i=0,1,0.2 do
  1032. wait()
  1033. p5.Mesh.Scale = Vector3.new(0.3,0.3-0.09*i,0.3)
  1034. LW.C0 = CFrame.new(-1.5+0.3-0.1,0.5,-0.3+0.1) * CFrame.fromEulerAnglesXYZ(1.5-0.2*i,0,0.5+0.4+0.1*i)
  1035. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1036. end
  1037. if canshoot==false then
  1038. canshoot=true
  1039. p6.BrickColor=BrickColor.new("New Yeller")
  1040. else
  1041. canshoot=false
  1042. p6.BrickColor=BrickColor.new("Black")
  1043. end
  1044. for i=0,1,0.2 do
  1045. wait()
  1046. p5.Mesh.Scale = Vector3.new(0.3,0.3-0.09+0.09*i,0.3)
  1047. LW.C0 = CFrame.new(-1.5+0.3-0.1,0.5,-0.3+0.1) * CFrame.fromEulerAnglesXYZ(1.5-0.2+0.2*i,0,0.5+0.4+0.1-0.1*i)
  1048. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1049. end
  1050. for i=0,1,0.1 do
  1051. wait()
  1052. LW.C0 = CFrame.new(-1.5+0.3-0.1+0.1*i,0.5,-0.3+0.1-0.1*i) * CFrame.fromEulerAnglesXYZ(1.5,0,0.5+0.4-0.4*i)
  1053. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1054. end
  1055. end
  1056. if key=="e" then
  1057. sitting=false
  1058. p9.Parent=nil
  1059. p2.Weld.C0 = CFrame.new(0, -0.8, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1060. for i=0,1,0.1 do
  1061. wait()
  1062. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0.3-0.1*i,0,0)
  1063. LW.C0 = CFrame.new(-1.5+0.3,0.5,-0.3-0.6*i) * CFrame.fromEulerAnglesXYZ(1.5,0,0.5-0.4*i)
  1064. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1065. end
  1066. for i=0,1,0.2 do
  1067. wait()
  1068. p8.Mesh.Scale = Vector3.new(0.3,0.3-0.09*i,0.3)
  1069. LW.C0 = CFrame.new(-1.5+0.3,0.5,-0.3-0.6) * CFrame.fromEulerAnglesXYZ(1.5-0.2*i,0,0.5-0.4)
  1070. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1071. end
  1072. if mode==1 then
  1073. mode=2
  1074. elseif mode==2 then
  1075. mode=3
  1076. elseif mode==3 then
  1077. mode=4
  1078. elseif mode==4 then
  1079. mode=5
  1080. elseif mode==5 then
  1081. mode=1
  1082. end
  1083. for i=0,1,0.2 do
  1084. wait()
  1085. p2.Weld.C0 = CFrame.new(0, -0.8, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1086. p8.Mesh.Scale = Vector3.new(0.3,0.3-0.09+0.09*i,0.3)
  1087. LW.C0 = CFrame.new(-1.5+0.3,0.5,-0.3-0.6) * CFrame.fromEulerAnglesXYZ(1.5-0.2+0.2*i,0,0.5-0.4)
  1088. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1089. end
  1090. for i=0,1,0.1 do
  1091. wait()
  1092. p2.Weld.C0 = CFrame.new(0, -0.8, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1093. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0.3-0.1+0.1*i,0,0)
  1094. LW.C0 = CFrame.new(-1.5+0.3,0.5,-0.3-0.6+0.6*i) * CFrame.fromEulerAnglesXYZ(1.5,0,0.5-0.4+0.4*i)
  1095. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1096. end
  1097. sitting=false
  1098. p9.Parent=nil
  1099. end
  1100. end
  1101.  
  1102. function Key2(key,mouse)
  1103. end
  1104.  
  1105. function s(mouse)
  1106. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1107. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1108. mouse.KeyDown:connect(function(key) Key(key,mouse) end)
  1109. mouse.KeyUp:connect(function(key) Key2(key,mouse) end)
  1110. MMouse = mouse
  1111. --mouse.KeyDown:connect(key,mouse)
  1112. --mouse.KeyUp:connect(key2,mouse)
  1113. MienMouse.Parent=mod
  1114. MienMouse.Value=MMouse
  1115. MienMouse.Name="MouseValue"
  1116. equipped = true
  1117. player = Player
  1118. ch = Character
  1119. RSH = ch.Torso["Right Shoulder"]
  1120. LSH = ch.Torso["Left Shoulder"]
  1121. --
  1122. RW.Part0 = ch.Torso
  1123. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1124. RW.C1 = CFrame.new(0, 0.5, 0)
  1125. RW.Part1 = ch["Right Arm"]
  1126. RW.Parent = ch.Torso
  1127. --_G.R = RW
  1128. --
  1129. LW.Part0 = ch.Torso
  1130. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1131. LW.C1 = CFrame.new(0, 0.5, 0)
  1132. LW.Part1 = ch["Left Arm"]
  1133. LW.Parent = ch.Torso
  1134. --_G.L = LW
  1135. for i=0,1,0.1 do
  1136. wait()
  1137. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3*i,3.14,0.3*i) * CFrame.new(0,0,-0.5)
  1138. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1139. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1140. RW.C0 = CFrame.new(1.5-0.5*i,0.5,0.5*i) * CFrame.fromEulerAnglesXYZ(-0.3*i,0,-0.5*i)
  1141. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1142. end
  1143. CModel.Parent=Character
  1144. --local mainp = Instance.new("Part")
  1145. mainp.formFactor = 1
  1146. mainp.CanCollide = false
  1147. mainp.Name = "MainPart"
  1148. mainp.Locked = true
  1149. mainp.Size = Vector3.new(2,1,2)
  1150. mainp.BrickColor=BrickColor.new(color)
  1151. mainp.Parent = CModel
  1152. local mainmesh = Instance.new("BlockMesh")
  1153. mainmesh.Parent = mainp
  1154. mainmesh.Scale = Vector3.new(1,0.5,1)
  1155. --local mainweld = Instance.new("Weld")
  1156. mainweld.Parent = mainp
  1157. mainweld.Part0 = mainp
  1158. mainweld.Part1 = RightArm
  1159. mainweld.C0 = CFrame.fromEulerAnglesXYZ(1.57,0,0) * CFrame.new(0, 1.9, 0)
  1160. --local p1 = Instance.new("Part")
  1161. p1.formFactor = 1
  1162. p1.CanCollide = false
  1163. p1.Name = "Part1"
  1164. p1.Locked = true
  1165. p1.Size = Vector3.new(1,1,1)
  1166. p1.BrickColor=BrickColor.new(color)
  1167. p1.Parent = CModel
  1168. local m1 = Instance.new("SpecialMesh")
  1169. m1.Parent = p1
  1170. m1.MeshType="Sphere"
  1171. m1.Scale = Vector3.new(1.2,0.5,1.2)
  1172. local w1 = Instance.new("Weld")
  1173. w1.Parent = p1
  1174. w1.Part0 = p1
  1175. w1.Part1 = mainp
  1176. w1.C0 = CFrame.fromEulerAnglesXYZ(0,0,0) * CFrame.new(0, -0.2, 0)
  1177. --local p2 = Instance.new("Part")
  1178. p2.formFactor = 1
  1179. p2.CanCollide = false
  1180. p2.Name = "Part2"
  1181. p2.Locked = true
  1182. p2.Size = Vector3.new(1,1,1)
  1183. p2.BrickColor=BrickColor.new("Black")
  1184. p2.Parent = CModel
  1185. local m2 = Instance.new("CylinderMesh")
  1186. m2.Parent = p2
  1187. m2.Scale = Vector3.new(0.3,1,0.3)
  1188. local w2 = Instance.new("Weld")
  1189. w2.Parent = p2
  1190. w2.Part0 = p2
  1191. w2.Part1 = p1
  1192. w2.C0 = CFrame.new(0, -0.8, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1193. --local p3 = Instance.new("Part")
  1194. p3.formFactor = 1
  1195. p3.CanCollide = false
  1196. p3.Name = "Part3"
  1197. p3.Locked = true
  1198. p3.Size = Vector3.new(1,1,1)
  1199. p3.BrickColor=BrickColor.new("Really black")
  1200. p3.Parent = CModel
  1201. local m3 = Instance.new("SpecialMesh")
  1202. m3.Parent = p3
  1203. m3.MeshType="Sphere"
  1204. m3.Scale = Vector3.new(0.5,0.5,0.5)
  1205. local w3 = Instance.new("Weld")
  1206. w3.Parent = p3
  1207. w3.Part0 = p3
  1208. w3.Part1 = p2
  1209. w3.C0 = CFrame.new(0, -0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1210. --local p4 = Instance.new("Part")
  1211. p4.formFactor = 1
  1212. p4.CanCollide = false
  1213. p4.Name = "Part4"
  1214. p4.Locked = true
  1215. p4.Size = Vector3.new(1,1,1)
  1216. p4.BrickColor=BrickColor.new("Black")
  1217. p4.Parent = CModel
  1218. local m4 = Instance.new("CylinderMesh")
  1219. m4.Parent = p4
  1220. m4.Scale = Vector3.new(0.4,0.2,0.4)
  1221. local w4 = Instance.new("Weld")
  1222. w4.Parent = p4
  1223. w4.Part0 = p4
  1224. w4.Part1 = p1
  1225. w4.C0 = CFrame.new(-0.1, 0, -0.8) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1226. --local p5 = Instance.new("Part")
  1227. p5.formFactor = 1
  1228. p5.CanCollide = false
  1229. p5.Name = "Part5"
  1230. p5.Locked = true
  1231. p5.Size = Vector3.new(1,1,1)
  1232. p5.BrickColor=BrickColor.new("Bright red")
  1233. p5.Parent = CModel
  1234. local m5 = Instance.new("CylinderMesh")
  1235. m5.Parent = p5
  1236. m5.Scale = Vector3.new(0.3,0.3,0.3)
  1237. local w5 = Instance.new("Weld")
  1238. w5.Parent = p5
  1239. w5.Part0 = p5
  1240. w5.Part1 = p4
  1241. w5.C0 = CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1242. --local p6 = Instance.new("Part")
  1243. p6.formFactor = 1
  1244. p6.CanCollide = false
  1245. p6.Name = "Part6"
  1246. p6.Locked = true
  1247. p6.Size = Vector3.new(1,1,1)
  1248. p6.Parent = CModel
  1249. local m6 = Instance.new("SpecialMesh")
  1250. m6.Parent = p6
  1251. m6.MeshType="Sphere"
  1252. m6.Scale = Vector3.new(0.3,0.4,0.3)
  1253. local w6 = Instance.new("Weld")
  1254. w6.Parent = p6
  1255. w6.Part0 = p6
  1256. w6.Part1 = p1
  1257. w6.C0 = CFrame.new(-0.8, 0, 0.8) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1258. --local p7 = Instance.new("Part")
  1259. p7.formFactor = 1
  1260. p7.CanCollide = false
  1261. p7.Name = "Part7"
  1262. p7.Locked = true
  1263. p7.Size = Vector3.new(1,1,1)
  1264. p7.BrickColor=BrickColor.new("Black")
  1265. p7.Parent = CModel
  1266. local m7 = Instance.new("CylinderMesh")
  1267. m7.Parent = p7
  1268. m7.Scale = Vector3.new(0.4,0.2,0.4)
  1269. local w7 = Instance.new("Weld")
  1270. w7.Parent = p7
  1271. w7.Part0 = p7
  1272. w7.Part1 = p1
  1273. w7.C0 = CFrame.new(0.8, 0, 0.8) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1274. --local p8 = Instance.new("Part")
  1275. p8.formFactor = 1
  1276. p8.CanCollide = false
  1277. p8.Name = "Part8"
  1278. p8.Locked = true
  1279. p8.Size = Vector3.new(1,1,1)
  1280. p8.BrickColor=BrickColor.new("Bright red")
  1281. p8.Parent = CModel
  1282. local m8 = Instance.new("CylinderMesh")
  1283. m8.Parent = p8
  1284. m8.Scale = Vector3.new(0.3,0.3,0.3)
  1285. local w8 = Instance.new("Weld")
  1286. w8.Parent = p8
  1287. w8.Part0 = p8
  1288. w8.Part1 = p7
  1289. w8.C0 = CFrame.new(0, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1290. for i=0,1,0.1 do
  1291. wait()
  1292. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3-0.3*i,3.14,0.3-0.3*i) * CFrame.new(0,0,-0.5)
  1293. LW.C0 = CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1294. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1295. RW.C0 = CFrame.new(1.5-0.5+0.5*i,0.5,0.5-0.5*i) * CFrame.fromEulerAnglesXYZ(-0.3+0.3*i,0,-0.5+0.5*i)
  1296. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1297. end
  1298. for i=0,1,0.1 do
  1299. wait()
  1300. mainweld.C0 = CFrame.fromEulerAnglesXYZ(1.57-0.57*i,0,-0.5*i) * CFrame.new(0.5*i, 1.9-0.3*i, 0)
  1301. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0.3*i,0,0)
  1302. LW.C0 = CFrame.new(-1.5+0.3*i,0.5,-0.3*i) * CFrame.fromEulerAnglesXYZ(1.5*i,0,0.5*i)
  1303. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1304. RW.C0 = CFrame.new(1.5-0.3*i,0.5,-0.3*i) * CFrame.fromEulerAnglesXYZ(1*i,0,-0.5*i)
  1305. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1306. end
  1307. end
  1308.  
  1309. function ds(mouse)
  1310. for i=0,1,0.1 do
  1311. wait()
  1312. mainweld.C0 = CFrame.fromEulerAnglesXYZ(1.57-0.57,0,-0.5) * CFrame.new(0.5, 1.9-0.3, 0)
  1313. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0.3-0.3*i,0,0)
  1314. LW.C0 = CFrame.new(-1.5+0.3,0.5,-0.3) * CFrame.fromEulerAnglesXYZ(1.5,0,0.5)
  1315. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1316. RW.C0 = CFrame.new(1.5-0.3,0.5,-0.3) * CFrame.fromEulerAnglesXYZ(1,0,-0.5)
  1317. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1318. end
  1319. wait(0.3)
  1320. for i=0,1,0.1 do
  1321. wait()
  1322. mainweld.C0 = CFrame.fromEulerAnglesXYZ(1.57-0.57+0.57*i,0,-0.5+0.5*i) * CFrame.new(0.5-0.5*i, 1.9-0.3+0.3*i, 0)
  1323. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3*i,3.14,0.3*i) * CFrame.new(0,0,-0.5)
  1324. LW.C0 = CFrame.new(-1.5+0.3-0.3*i,0.5,-0.3+0.3*i) * CFrame.fromEulerAnglesXYZ(1.5-1.5*i,0,0.5-0.5*i)
  1325. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1326. RW.C0 = CFrame.new(1.5-0.3-0.2*i,0.5,-0.3+0.8*i) * CFrame.fromEulerAnglesXYZ(1-1.3*i,0,-0.5)
  1327. RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  1328. end
  1329. CModel.Parent=nil
  1330. mainp.Parent=nil
  1331. p1.Parent=nil
  1332. p2.Parent=nil
  1333. for i=0,1,0.1 do
  1334. wait()
  1335. Torso.Neck.C1 = CFrame.fromEulerAnglesXYZ(1.57+0.3-0.3*i*i,3.14,0.3-0.3*i*i) * CFrame.new(0,0,-0.5)
  1336. RW.C0 = CFrame.new(1.5-0.5+0.5*i,0.5,0.5-0.5*i) * CFrame.fromEulerAnglesXYZ(-0.3+0.3*i,0,-0.5+0.5*i)
  1337. end
  1338. equipped = false
  1339. RW.Parent = nil
  1340. LW.Parent = nil
  1341. RSH.Parent = player.Character.Torso
  1342. LSH.Parent = player.Character.Torso
  1343. Torso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(0,0,0)
  1344. end
  1345.  
  1346. Bin.Selected:connect(s)
  1347. Bin.Deselected:connect(ds)
  1348.  
  1349. while true do
  1350. wait(0)  
  1351. fentext3.Text = "Shoot: "..tostring(canshoot).." | Mode: "..mode..""
  1352. end
  1353.  
  1354. -- lego This acts as a chat filter. Don't ask why I do it. I just do >.>
  1355. --[[
  1356. Copyrighted (C) Pixenova 2011
  1357. This script is copyrighted for Pixenova. Any use of this script is breaking
  1358. this copyright.
  1359. All Rights Reserved.
  1360. ]]
  1361. -- mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement