Stefanuk12

ROBLOX Script Builder Scripts (Weeb)

Jan 4th, 2018
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 28.76 KB | None | 0 0
  1. Player=game:GetService("Players").LocalPlayer
  2. Character=Player.Character
  3. PlayerGui=Player.PlayerGui
  4. Backpack=Player.Backpack
  5. Torso=Character.Torso
  6. Head=Character.Head
  7. Humanoid=Character.Humanoid
  8. m=Instance.new('Model',Character)
  9. LeftArm=Character["Left Arm"]
  10. LeftLeg=Character["Left Leg"]
  11. RightArm=Character["Right Arm"]
  12. RightLeg=Character["Right Leg"]
  13. LS=Torso["Left Shoulder"]
  14. LH=Torso["Left Hip"]
  15. RS=Torso["Right Shoulder"]
  16. RH=Torso["Right Hip"]
  17. Neck=Torso.Neck
  18. it=Instance.new
  19. attacktype=1
  20. vt=Vector3.new
  21. cf=CFrame.new
  22. euler=CFrame.fromEulerAnglesXYZ
  23. angles=CFrame.Angles
  24. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  25. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  26. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  27. LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
  28. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  29. RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
  30. RootPart=Character.HumanoidRootPart
  31. RootJoint=RootPart.RootJoint
  32. RootCF=euler(-1.57,0,3.14)
  33. attack = false
  34. attackdebounce = false
  35. deb=false
  36. equipped=true
  37. hand=false
  38. MMouse=nil
  39. combo=0
  40. mana=0
  41. cam=workspace.CurrentCamera
  42. RocketTarget=nil
  43. Targetting=false
  44. trispeed=.2
  45. attackmode='none'
  46. local idle=0
  47. local Anim="Idle"
  48. local Effects={}
  49. local gun=false
  50. local shoot=false
  51. local issprinting=false
  52. local memeing=false
  53. player=nil
  54. mouse=Player:GetMouse()
  55. --save shoulders
  56. RSH, LSH=nil, nil
  57. --welds
  58. RW, LW=Instance.new("Weld"), Instance.new("Weld")
  59. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  60. LH=Torso["Left Hip"]
  61. RH=Torso["Right Hip"]
  62. TorsoColor=Torso.BrickColor
  63. function NoOutline(Part)
  64. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  65. end
  66. player=Player
  67. ch=Character
  68. RSH=ch.Torso["Right Shoulder"]
  69. LSH=ch.Torso["Left Shoulder"]
  70. --
  71. RSH.Parent=nil
  72. LSH.Parent=nil
  73. --
  74. RW.Name="Right Shoulder"
  75. RW.Part0=ch.Torso
  76. RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  77. RW.C1=cf(0, 0.5, 0)
  78. RW.Part1=ch["Right Arm"]
  79. RW.Parent=ch.Torso
  80. --
  81. LW.Name="Left Shoulder"
  82. LW.Part0=ch.Torso
  83. LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  84. LW.C1=cf(0, 0.5, 0)
  85. LW.Part1=ch["Left Arm"]
  86. LW.Parent=ch.Torso
  87.  
  88. if Humanoid:findFirstChild("Animate") then
  89.   Humanoid:findFirstChild("Animate"):Destroy()
  90. elseif Character:findFirstChild("Animate") then
  91.   Character:findFirstChild("Animate"):Destroy()
  92. end
  93.  
  94.  
  95. local WEEB = Instance.new("Sound",Torso)
  96. WEEB.Volume=0
  97. WEEB.Pitch=0
  98. WEEB.SoundId="http://www.roblox.com/asset/?id=239632147"
  99. WEEB.Looped=true
  100. wait()
  101. WEEB:play()
  102.  
  103.  
  104. local Stats=Instance.new("BoolValue")
  105. Stats.Name="Stats"
  106. Stats.Parent=Character
  107. local Atk=Instance.new("NumberValue")
  108. Atk.Name="Damage"
  109. Atk.Parent=Stats
  110. Atk.Value=1
  111. local Def=Instance.new("NumberValue")
  112. Def.Name="Defense"
  113. Def.Parent=Stats
  114. Def.Value=1
  115. local Speed=Instance.new("NumberValue")
  116. Speed.Name="Speed"
  117. Speed.Parent=Stats
  118. Speed.Value=1
  119. local Mvmt=Instance.new("NumberValue")
  120. Mvmt.Name="Movement"
  121. Mvmt.Parent=Stats
  122. Mvmt.Value=1
  123.  
  124.  
  125. local donum=0
  126.  
  127. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  128. local fp=it("Part")
  129. fp.formFactor=formfactor
  130. fp.Parent=parent
  131. fp.Reflectance=reflectance
  132. fp.Transparency=transparency
  133. fp.CanCollide=false
  134. fp.Locked=true
  135. fp.BrickColor=brickcolor
  136. fp.Name=name
  137. fp.Size=size
  138. fp.Position=Torso.Position
  139. NoOutline(fp)
  140. fp.Material="SmoothPlastic"
  141. fp:BreakJoints()
  142. return fp
  143. end
  144.  
  145. function part2(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
  146.     local fp = Instance.new("Part")
  147.         fp.formFactor = formfactor
  148.         fp.Parent = parent
  149.         fp.Reflectance = reflectance
  150.         fp.Transparency = transparency
  151.         fp.CanCollide = false
  152.         fp.Locked = true
  153.         fp.BrickColor = BrickColor.new(tostring(brickcolor))
  154.         fp.Name = name
  155.         fp.Size = size
  156.         fp.Position = Character.Torso.Position
  157.         fp.Material = material
  158.    
  159.     NoOutline(fp)
  160.     return fp
  161. end
  162.  
  163. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  164. local mesh=it(Mesh)
  165. mesh.Parent=part
  166. if Mesh=="SpecialMesh" then
  167. mesh.MeshType=meshtype
  168. mesh.MeshId=meshid
  169. end
  170. mesh.Offset=offset
  171. mesh.Scale=scale
  172. return mesh
  173. end
  174.  
  175. function weld(parent,part0,part1,c0)
  176. local weld=it("Weld")
  177. weld.Parent=parent
  178. weld.Part0=part0
  179. weld.Part1=part1
  180. weld.C0=c0
  181. return weld
  182. end
  183.  
  184. function weld2(parent, part0, part1, c0, c1)
  185.     local Weld = Instance.new("Weld")
  186.         Weld.Parent = parent
  187.         Weld.Part0 = part0
  188.         Weld.Part1 = part1
  189.         Weld.C0 = c0
  190.         Weld.C1 = c1
  191.    
  192.     return Weld
  193. end
  194.  
  195. local Color1=Torso.BrickColor
  196.  
  197. local bodvel=Instance.new("BodyVelocity")
  198. local bg=Instance.new("BodyGyro")
  199.  
  200. ArtificialHB = Instance.new("BindableEvent", script)
  201. ArtificialHB.Name = "Heartbeat"
  202.  
  203. script:WaitForChild("Heartbeat")
  204.  
  205. frame = 1 / 60
  206. tf = 0
  207. allowframeloss = true
  208. tossremainder = false
  209. lastframe = tick()
  210. script.Heartbeat:Fire()
  211.  
  212. game:GetService("RunService").Heartbeat:connect(function(s, p)
  213.     tf = tf + s
  214.     if tf >= frame then
  215.         if allowframeloss then
  216.             script.Heartbeat:Fire()
  217.             lastframe = tick()
  218.         else
  219.             for i = 1, math.floor(tf / frame) do
  220.                 script.Heartbeat:Fire()
  221.             end
  222.             lastframe = tick()
  223.         end
  224.         if tossremainder then
  225.             tf = 0
  226.         else
  227.             tf = tf - frame * math.floor(tf / frame)
  228.         end
  229.     end
  230. end)
  231.  
  232. function swait(num)
  233.     if num == 0 or num == nil then
  234.         ArtificialHB.Event:wait()
  235.     else
  236.         for i = 0, num do
  237.             ArtificialHB.Event:wait()
  238.         end
  239.     end
  240. end
  241.  
  242.  
  243. so = function(id,par,vol,pit)
  244. coroutine.resume(coroutine.create(function()
  245. local sou = Instance.new("Sound",par or workspace)
  246. sou.Volume=vol
  247. sou.Pitch=pit or 1
  248. sou.SoundId=id
  249. swait()
  250. sou:play()
  251. game:GetService("Debris"):AddItem(sou,6)
  252. end))
  253. end
  254.  
  255. function clerp(a,b,t)
  256. local qa = {QuaternionFromCFrame(a)}
  257. local qb = {QuaternionFromCFrame(b)}
  258. local ax, ay, az = a.x, a.y, a.z
  259. local bx, by, bz = b.x, b.y, b.z
  260. local _t = 1-t
  261. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  262. end
  263.  
  264. function QuaternionFromCFrame(cf)
  265. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  266. local trace = m00 + m11 + m22
  267. if trace > 0 then
  268. local s = math.sqrt(1 + trace)
  269. local recip = 0.5/s
  270. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  271. else
  272. local i = 0
  273. if m11 > m00 then
  274. i = 1
  275. end
  276. if m22 > (i == 0 and m00 or m11) then
  277. i = 2
  278. end
  279. if i == 0 then
  280. local s = math.sqrt(m00-m11-m22+1)
  281. local recip = 0.5/s
  282. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  283. elseif i == 1 then
  284. local s = math.sqrt(m11-m22-m00+1)
  285. local recip = 0.5/s
  286. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  287. elseif i == 2 then
  288. local s = math.sqrt(m22-m00-m11+1)
  289. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  290. end
  291. end
  292. end
  293.  
  294. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  295. local xs, ys, zs = x + x, y + y, z + z
  296. local wx, wy, wz = w*xs, w*ys, w*zs
  297. local xx = x*xs
  298. local xy = x*ys
  299. local xz = x*zs
  300. local yy = y*ys
  301. local yz = y*zs
  302. local zz = z*zs
  303. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  304. end
  305.  
  306. function QuaternionSlerp(a, b, t)
  307. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  308. local startInterp, finishInterp;
  309. if cosTheta >= 0.0001 then
  310. if (1 - cosTheta) > 0.0001 then
  311. local theta = math.acos(cosTheta)
  312. local invSinTheta = 1/math.sin(theta)
  313. startInterp = math.sin((1-t)*theta)*invSinTheta
  314. finishInterp = math.sin(t*theta)*invSinTheta  
  315. else
  316. startInterp = 1-t
  317. finishInterp = t
  318. end
  319. else
  320. if (1+cosTheta) > 0.0001 then
  321. local theta = math.acos(-cosTheta)
  322. local invSinTheta = 1/math.sin(theta)
  323. startInterp = math.sin((t-1)*theta)*invSinTheta
  324. finishInterp = math.sin(t*theta)*invSinTheta
  325. else
  326. startInterp = t-1
  327. finishInterp = t
  328. end
  329. end
  330. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  331. end
  332.  
  333. function rayCast(Pos, Dir, Max, Ignore)  -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  334. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  335. end
  336.  
  337. Damagefunc = function(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) --bm1
  338.     if hit.Parent == nil then
  339.         return
  340.     end
  341.     local h = hit.Parent:FindFirstChild("Humanoid")
  342.     for _, v in pairs(hit.Parent:children()) do
  343.         if v:IsA("Humanoid") then
  344.             h = v
  345.         end
  346.     end
  347.     if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  348.         if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  349.             if hit.Parent.DebounceHit.Value == true then
  350.                 return
  351.             end
  352.         end
  353.         if h.MaxHealth >= math.huge then
  354.             hit:BreakJoints()
  355.         end
  356.         --[[                if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  357.                         return
  358.                 end]]
  359. --                        hs(hit,1.2)
  360.         local c = Instance.new("ObjectValue")
  361.             c.Name = "creator"
  362.             c.Value = game:service("Players").LocalPlayer
  363.             c.Parent = h
  364.        
  365.         game:GetService("Debris"):AddItem(c, .5)
  366.         if HitSound ~= nil and HitPitch ~= nil then
  367.             so(HitSound, hit, 1, HitPitch)
  368.         end
  369.         local Damage = math.random(minim, maxim)
  370. --                h:TakeDamage(Damage)
  371.         local blocked = false
  372.         local block = hit.Parent:findFirstChild("Block")
  373.         if block ~= nil then
  374.             if block.className == "IntValue" then
  375.                 if block.Value > 0 then
  376.                     blocked = true
  377.                     block.Value = block.Value - 1
  378.                     print(block.Value)
  379.                 end
  380.             end
  381.         end
  382.         if blocked == false then
  383. --                h:TakeDamage(Damage)
  384.             h.Health = h.Health - Damage
  385.             if Damage ~= 0 then
  386.             ShowDamage2((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Institutional white").Color)
  387.             end
  388.         else
  389.             h.Health = h.Health - (Damage / 2)
  390.             if Damage ~=0 then
  391.             ShowDamage2((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Institutional white").Color)
  392.             end
  393.         end
  394.         if Type == "Knockdown" then
  395.             local hum = hit.Parent.Humanoid
  396.             hum.PlatformStand = true
  397.             coroutine.resume(coroutine.create(function(HHumanoid)
  398.                 swait(1)
  399.                 HHumanoid.PlatformStand = false
  400.             end), hum)
  401.             local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  402.             local bodvol = Instance.new("BodyVelocity")
  403.                 bodvol.velocity = angle * knockback
  404.                 bodvol.P = 5000
  405.                 bodvol.maxForce = Vector3.new(8e+003, 8e+003, 8e+003)
  406.                 bodvol.Parent = hit
  407.            
  408.             local rl = Instance.new("BodyAngularVelocity")
  409.                 rl.P = 3000
  410.                 rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000
  411.                 rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  412.                 rl.Parent = hit
  413.            
  414.             game:GetService("Debris"):AddItem(bodvol, .5)
  415.             game:GetService("Debris"):AddItem(rl, .5)
  416.         elseif Type == "Plat" then
  417.             local hum = hit.Parent.Humanoid
  418.             hum.PlatformStand = true
  419.             coroutine.resume(coroutine.create(function(HHumanoid)
  420.                 swait(2)
  421.                 HHumanoid.PlatformStand = false
  422.             end), hum)
  423.  
  424.             local rl = Instance.new("BodyAngularVelocity")
  425.                 rl.P = 3000
  426.                 rl.maxTorque = Vector3.new(100, 100, 100) * 500
  427.                 rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  428.                 rl.Parent = hit
  429.                
  430.             game:GetService("Debris"):AddItem(rl, .5)
  431.         elseif Type == "Normal" then
  432.             local vp = Instance.new("BodyVelocity")
  433.                 vp.P = 500
  434.                 vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  435.                 vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  436.            
  437.             if knockback > 0 then
  438.                 vp.Parent = hit.Parent.Torso
  439.             end
  440.             game:GetService("Debris"):AddItem(vp, .5)
  441.         elseif Type == "Up" then
  442.             local bodyVelocity = Instance.new("BodyVelocity")
  443.                 bodyVelocity.velocity = vt(0, 20, 0)
  444.                 bodyVelocity.P = 5000
  445.                 bodyVelocity.maxForce = Vector3.new(8e+003, 8e+003, 8e+003)
  446.                 bodyVelocity.Parent = hit
  447.            
  448.             game:GetService("Debris"):AddItem(bodyVelocity, .5)
  449.         elseif Type == "Snare" then
  450.             local bp = Instance.new("BodyPosition")
  451.                 bp.P = 2000
  452.                 bp.D = 100
  453.                 bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  454.                 bp.position = hit.Parent.Torso.Position
  455.                 bp.Parent = hit.Parent.Torso
  456.             game:GetService("Debris"):AddItem(bp, 1)
  457.  
  458.         elseif Type == "Freeze" then
  459.             local BodPos = Instance.new("BodyPosition")
  460.                 BodPos.P = 50000
  461.                 BodPos.D = 1000
  462.                 BodPos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  463.                 BodPos.position = hit.Parent.Torso.Position
  464.                 BodPos.Parent = hit.Parent.Torso
  465.            
  466.             local BodGy = Instance.new("BodyGyro")
  467.                 BodGy.maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge
  468.                 BodGy.P = 20e+003
  469.                 BodGy.Parent = hit.Parent.Torso
  470.                 BodGy.cframe = hit.Parent.Torso.CFrame
  471.            
  472.             hit.Parent.Torso.Anchored = true
  473.             coroutine.resume(coroutine.create(function(Part)
  474.                 swait(1.5)
  475.                 Part.Anchored = false
  476.             end), hit.Parent.Torso)
  477.             game:GetService("Debris"):AddItem(BodPos, 3)
  478.             game:GetService("Debris"):AddItem(BodGy, 3)
  479.        
  480.        
  481.                 elseif Type=="Target" then
  482.                 if Targetting==false then
  483.                 ZTarget=hit.Parent.Torso
  484.                 coroutine.resume(coroutine.create(function(Part)
  485.                 so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)  
  486.                 swait(5)
  487.                 so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  488.                 end),ZTarget)
  489.                 TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  490.                 targetgui=Instance.new("BillboardGui")
  491.                 targetgui.Parent=ZTarget
  492.                 targetgui.Size=UDim2.new(10,100,10,100)
  493.                 targ=Instance.new("ImageLabel")
  494.                 targ.Parent=targetgui
  495.                 targ.BackgroundTransparency=1
  496.                 targ.Image="rbxassetid://4834067"
  497.                 targ.Size=UDim2.new(1,0,1,0)
  498.                 cam.CameraType="Scriptable"
  499.                 cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  500.                 dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  501.                 workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  502.                 Targetting=true
  503.                 RocketTarget=ZTarget
  504.                 for i=1,Property do
  505.                 if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  506.                 swait()
  507.                 end
  508.                 cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  509.                 dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  510.                 cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  511.                 end
  512.                 Targetting=false
  513.                 RocketTarget=nil
  514.                 targetgui.Parent=nil
  515.                 cam.CameraType="Custom"
  516.                 end
  517.         end    
  518.        
  519.         local debounce = Instance.new("BoolValue")
  520.         debounce.Name = "DebounceHit"
  521.         debounce.Parent = hit.Parent
  522.         debounce.Value = true
  523.         game:GetService("Debris"):AddItem(debounce, Delay)
  524.         c = Instance.new("ObjectValue")
  525.         c.Name = "creator"
  526.         c.Value = Player
  527.         c.Parent = h
  528.         game:GetService("Debris"):AddItem(c, .5)
  529.     end
  530. end
  531.  
  532. function ShowDamage2(Pos, Text, Time, Color)
  533.     local Rate = (1 / 30)
  534.     local Pos = (Pos or Vector3.new(0, 0, 0))
  535.     local Text = (Text or "")
  536.     local Time = (Time or 2)
  537.     local Color = (Color or Color3.new(1, 0, 0))
  538.     local EffectPart = part2("Custom", workspace, "Neon", 0, 1, BrickColor.new(Color), "Effect", vt(0, 0, 0))
  539.     EffectPart.Anchored = true
  540.     local BillboardGui = Instance.new("BillboardGui")
  541.         BillboardGui.Size = UDim2.new(3, 0, 3, 0)
  542.         BillboardGui.Adornee = EffectPart
  543.         BillboardGui.Parent = EffectPart
  544.    
  545.     local TextLabel = Instance.new("TextLabel")
  546.         TextLabel.BackgroundTransparency = 1
  547.         TextLabel.Size = UDim2.new(1, 0, 1, 0)
  548.         TextLabel.Text = Text
  549.         TextLabel.TextColor3 = Color
  550.         TextLabel.TextScaled = true
  551.         TextLabel.Font = Enum.Font.ArialBold
  552.         TextLabel.Parent = BillboardGui
  553.    
  554.     game.Debris:AddItem(EffectPart, (Time + 0.1))
  555.     EffectPart.Parent = game:GetService("Workspace")
  556.     delay(0, function()
  557.         local Frames = (Time / Rate)
  558.         for Frame = 1, Frames do
  559.             wait(Rate)
  560.             local Percent = (Frame / Frames)
  561.             EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  562.             TextLabel.TextTransparency = Percent
  563.         end
  564.         if EffectPart and EffectPart.Parent then
  565.             EffectPart:Destroy()
  566.         end
  567.     end)
  568. end
  569.  
  570. function BlastEffect(brickcolor, cframe, x1, y1, z1, x2, y2, z2)
  571.     local prt = part2(3, workspace, "Neon", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  572.     prt.Anchored = true
  573.     prt.CFrame = cframe
  574.     local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
  575.     coroutine.resume(coroutine.create(function()
  576.         for i = 0, 1, 0.05 do
  577.             wait()
  578.             prt.Transparency = i
  579.             msh.Scale = msh.Scale + vt(x2, y2, z2)
  580.         end
  581.         prt.Parent = nil
  582.     end))
  583. end
  584.  
  585. function weld(parent, part0, part1, c0, c1)
  586.     local Weld = Instance.new("Weld")
  587.         Weld.Parent = parent
  588.         Weld.Part0 = part0
  589.         Weld.Part1 = part1
  590.         Weld.C0 = c0
  591.         Weld.C1 = c1
  592.    
  593.     return Weld
  594. end
  595.  
  596. function MagniDamage(Hit, Part, magni, mindam, maxdam, knock, Type)
  597.     for _, c in pairs(workspace:children()) do
  598.         local hum = c:findFirstChild("Humanoid")
  599.         if hum ~= nil then
  600.             local head = c:findFirstChild("Torso")
  601.             if head ~= nil then
  602.                 local targ = head.Position - Part.Position
  603.                 local mag = targ.magnitude
  604.                 if mag <= magni and c.Name ~= Player.Name then
  605.                     Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, .2, 1, 3)
  606.                 end
  607.             end
  608.         end
  609.     end
  610. end
  611.  
  612. function MagicCircle(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  613.     local prt = part2(3, workspace, "Neon", 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  614.     prt.Anchored = true
  615.     prt.CFrame = cframe
  616.     local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
  617.     game:GetService("Debris"):AddItem(prt, 2)
  618.     coroutine.resume(coroutine.create(function(Part, Mesh)
  619.         for i = 0, 1, delay do
  620.             swait()
  621.             Part.CFrame = Part.CFrame
  622.             Part.Transparency = i
  623.             Mesh.Scale = Mesh.Scale + vt(x3, y3, z3)
  624.         end
  625.         Part.Parent = nil
  626.     end), prt, msh)
  627. end
  628.  
  629. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  630.     local prt=part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt())
  631.     prt.Anchored=true
  632.     prt.CFrame=cframe
  633.     local msh = mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  634.     game:GetService("Debris"):AddItem(prt,2)
  635.     coroutine.resume(coroutine.create(function(Part,Mesh)
  636.         for i=0,1,delay do
  637.             swait()
  638.             Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  639.             Part.Transparency=i
  640.             Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  641.         end
  642.         Part.Parent=nil
  643.     end),prt,msh)
  644. end
  645.  
  646.  
  647.     user=game:service'Players'.localPlayer
  648.     char=user.Character
  649.     mouse=user:GetMouse()
  650.    
  651.  
  652. local function weldBetween(a, b, name)
  653.     local weld = Instance.new("ManualWeld")
  654.     weld.Part0 = a
  655.     weld.Part1 = b
  656.     weld.C0 = CFrame.new()
  657.     weld.C1 = b.CFrame:inverse() * a.CFrame
  658.     weld.Parent = a
  659.     weld.Name=name or 'weldb1'
  660.     weld.Parent=m
  661.     return weld;
  662. end
  663.  
  664.  
  665. player=game.Players.localPlayer
  666. char=player.Character
  667. Effects={}
  668. vt=Vector3.new
  669. cf=CFrame.new
  670. euler=CFrame.fromEulerAnglesXYZ
  671. m=Instance.new("Model",char)
  672.  
  673. mouse.Button1Down:connect(function()
  674. print("NEIN")
  675. end)
  676.  
  677. local mdel = false
  678.  
  679. mouse.KeyDown:connect(function(k)
  680.     k=k:lower()
  681.     if k=='f' then
  682.         if attack==false then
  683.             ToggleMemes()
  684.         end
  685.     end
  686. end)
  687.  
  688. function ToggleMemes()
  689.     if memeing == true and mdel == false then
  690.         memeing = false
  691.         issprinting=false
  692.         Humanoid.WalkSpeed = 16
  693.         mdel = true
  694.         for i = 1,0,-0.1 do
  695.             wait(0.05)
  696.             WEEB.Volume = i
  697.         end
  698.         WEEB.Pitch = 0
  699.         mdel = false
  700.     elseif memeing == false and mdel == false then
  701.         memeing = true
  702.         issprinting=true
  703.         Humanoid.WalkSpeed=35
  704.         WEEB.Pitch = 1
  705.         mdel = true
  706.         for i = 0,1,.1 do
  707.             wait(0.05)
  708.             WEEB.Volume = i
  709.         end
  710.         mdel = false
  711.     end
  712. end
  713.  
  714. local function CFrameFromTopBack(at, top, back)
  715. local right = top:Cross(back)
  716. return CFrame.new(at.x, at.y, at.z,
  717. right.x, top.x, back.x,
  718. right.y, top.y, back.y,
  719. right.z, top.z, back.z)
  720. end
  721.  
  722. function Triangle(a, b, c)
  723. local edg1 = (c-a):Dot((b-a).unit)
  724. local edg2 = (a-b):Dot((c-b).unit)
  725. local edg3 = (b-c):Dot((a-c).unit)
  726. if edg1 <= (b-a).magnitude and edg1 >= 0 then
  727. a, b, c = a, b, c
  728. elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
  729. a, b, c = b, c, a
  730. elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
  731. a, b, c = c, a, b
  732. else
  733. assert(false, "unreachable")
  734. end
  735.  
  736. local len1 = (c-a):Dot((b-a).unit)
  737. local len2 = (b-a).magnitude - len1
  738. local width = (a + (b-a).unit*len1 - c).magnitude
  739.  
  740. local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
  741.  
  742. local list = {}
  743.  
  744. if len1 > 0.01 then
  745. local w1 = Instance.new('WedgePart', m)
  746. game:GetService("Debris"):AddItem(w1,5)
  747. w1.Material = "SmoothPlastic"
  748. w1.FormFactor = 'Custom'
  749. w1.BrickColor = TorsoColor
  750. w1.Transparency = 0
  751. w1.Reflectance = 0
  752. w1.Material = "SmoothPlastic"
  753. w1.CanCollide = false
  754. NoOutline(w1)
  755. local sz = Vector3.new(0.2, width, len1)
  756. w1.Size = sz
  757. local sp = Instance.new("SpecialMesh",w1)
  758. sp.MeshType = "Wedge"
  759. sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
  760. w1:BreakJoints()
  761. w1.Anchored = true
  762. w1.Parent = workspace
  763. w1.Transparency = 0.7
  764. table.insert(Effects,{w1,"Disappear",.01})
  765. w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  766. table.insert(list,w1)
  767. end
  768.  
  769. if len2 > 0.01 then
  770. local w2 = Instance.new('WedgePart', m)
  771. game:GetService("Debris"):AddItem(w2,5)
  772. w2.Material = "SmoothPlastic"
  773. w2.FormFactor = 'Custom'
  774. w2.BrickColor = TorsoColor
  775. w2.Transparency = 0
  776. w2.Reflectance = 0
  777. w2.Material = "SmoothPlastic"
  778. w2.CanCollide = false
  779. NoOutline(w2)
  780. local sz = Vector3.new(0.2, width, len2)
  781. w2.Size = sz
  782. local sp = Instance.new("SpecialMesh",w2)
  783. sp.MeshType = "Wedge"
  784. sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
  785. w2:BreakJoints()
  786. w2.Anchored = true
  787. w2.Parent = workspace
  788. w2.Transparency = 0.7
  789. table.insert(Effects,{w2,"Disappear",.01})
  790. w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  791. table.insert(list,w2)
  792. end
  793. return unpack(list)
  794. end
  795.  
  796. function NoOutline(Part)
  797. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  798. end
  799.  
  800. local sine = 0
  801. local change = 1
  802. local val = 0
  803.  
  804. if #Effects>0 then
  805. --table.insert(Effects,{prt,"Block1",delay})
  806. for e=1,#Effects do
  807. if Effects[e]~=nil then
  808. --for j=1,#Effects[e] do
  809. local Thing=Effects[e]
  810. if Thing~=nil then
  811. local Part=Thing[1]
  812. local Mode=Thing[2]
  813. local Delay=Thing[3]
  814. local IncX=Thing[4]
  815. local IncY=Thing[5]
  816. local IncZ=Thing[6]
  817. if Thing[1].Transparency<=1 then
  818. if Thing[2]=="Block1" then
  819. Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  820. Mesh=Thing[1].Mesh
  821. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  822. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  823. elseif Thing[2]=="Cylinder" then
  824. Mesh=Thing[1].Mesh
  825. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  826. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  827. elseif Thing[2]=="Blood" then
  828. Mesh=Thing[1].Mesh
  829. Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
  830. Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
  831. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  832. elseif Thing[2]=="Elec" then
  833. Mesh=Thing[1].Mesh
  834. Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
  835. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  836. elseif Thing[2]=="Disappear" then
  837. Thing[1].Transparency=Thing[1].Transparency+Thing[3]
  838. end
  839. else
  840. Part.Parent=nil
  841. table.remove(Effects,e)
  842. end
  843. end
  844. --end
  845. end
  846. end
  847. end
  848.  
  849. cn = CFrame.new
  850. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  851. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  852. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  853. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  854.  
  855. local mananum=0
  856. while true do
  857. swait()
  858. sine = sine + change
  859. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  860. local velderp=RootPart.Velocity.y
  861. hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  862. if equipped==true or equipped==false then
  863. if attack==false then
  864. idle=idle+1
  865. else
  866. idle=0
  867. end
  868. if idle>=500 then
  869. if attack==false then
  870. --Sheath()
  871. end
  872. end
  873. if RootPart.Velocity.y > 1 and hitfloor==nil then
  874. Anim="Jump"
  875. if attack==false then
  876. Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3)
  877. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  878. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  879. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5),.3)
  880. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  881. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3)
  882. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  883. RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.3)
  884. LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.3)
  885. end
  886. elseif RootPart.Velocity.y < -1 and hitfloor==nil then
  887. Anim="Fall"
  888. if attack==false then
  889. Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3)
  890. Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3)
  891. RootJoint.C0=clerp(RootJoint.C0,RootCF*euler(0,0,0),.3)
  892. RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2),.3)
  893. RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  894. LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3)
  895. LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
  896. RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.3)
  897. LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.3)
  898. end
  899. elseif torvel<1 and hitfloor~=nil then
  900. Anim="Idle"
  901. if attack==false then
  902. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .3)
  903. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .3)
  904. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(5 + 3 * math.cos(sine / 25))), 0.3)
  905. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.3)
  906. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 2 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .3)
  907. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 2 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .3)
  908. end
  909. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  910. Anim="Walk"
  911. if attack==false then
  912. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 5)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 10))), .2)
  913. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 10)) + RootPart.RotVelocity.Y / 15), .2)
  914. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10 * math.cos(sine / 13)), math.rad(0), math.rad(4 * math.cos(sine / 13))), .2)
  915. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10 * math.cos(sine / 13)), math.rad(0), math.rad(4 * math.cos(sine / 13))), .2)
  916. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 7))), .3)
  917. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 7))), .3)
  918. end
  919. elseif torvel>=22 and issprinting==true and hitfloor~=nil then
  920. Anim="Run"
  921. if attack==false then
  922. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0.5, -0.05 + .1 * 2.5 * math.cos(sine / 2)) * angles(math.rad(50), math.rad(2) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 2))), .2)
  923. Torso.Neck.C0 = clerp(Torso.Neck.C0, cn(0, 1.1, -0.2, -1, -0, -0, 0, 0, 1, 0, 1, 0) * angles(math.rad(-50), math.rad(0), math.rad(-5 * math.cos(sine / 10)) + RootPart.RotVelocity.Y / 15), .2)
  924. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.4) * angles(math.rad(75 * math.cos(6 / 2)), math.rad(-5), math.rad(25 * math.cos(sine / 3))), .2)
  925. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0.4) * angles(math.rad(75 * math.cos(6 / 2)), math.rad(5), math.rad(25 * math.cos(sine / 3))), .2)
  926. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(55 * math.cos(sine / 3))), .3)
  927. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(55 * math.cos(sine / 3))), .3)
  928. end
  929. end
  930. end
  931. end
Add Comment
Please, Sign In to add comment