Advertisement
ByJugator340

test dont skid

Oct 11th, 2019
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.67 KB | None | 0 0
  1. --|]                         [|--
  2. --|] Created By ByJugator340 [|--
  3. --|]                         [|--
  4.  
  5.  
  6. -----------------------------------------------------------
  7. ------------------Start FE Compatibility-------------------
  8. -----------------------------------------------------------
  9.  
  10. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  11. local Player,mouse,UserInputService,ContextActionService = owner
  12. local Mouse = owner:GetMouse()
  13. do script.Parent=Player.Character;local a=Instance.new("RemoteEvent")a.Name="UserInput_Event"local function b()local c={_fakeEvent=true,Connect=function(self,d)self.Function=d end}c.connect=c.Connect;return c end;local e={Target=nil,Hit=CFrame.new(),KeyUp=b(),KeyDown=b(),Button1Up=b(),Button1Down=b()}local f={InputBegan=b(),InputEnded=b()}local CAS={Actions={},BindAction=function(self,g,h,i,...)CAS.Actions[g]=h and{Name=g,Function=h,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function j(self,k,...)local c=e[k]if c and c._fakeEvent and c.Function then c.Function(...)end end;e.TrigEvent=j;f.TrigEvent=j;a.OnServerEvent:Connect(function(l,m)if l~=Player then return end;if m.isMouse then e.Target=m.Target;e.Hit=m.Hit else local n=m.UserInputState==Enum.UserInputState.Begin;if m.UserInputType==Enum.UserInputType.MouseButton1 then return e:TrigEvent(n and"Button1Down"or"Button1Up")end;for o,c in pairs(CAS.Actions)do for o,p in pairs(c.Keys)do if p==m.KeyCode then c.Function(c.Name,m.UserInputState,m)end end end;e:TrigEvent(n and"KeyDown"or"KeyUp",m.KeyCode.Name:lower())f:TrigEvent(n and"InputBegan"or"InputEnded",m,false)end end)a.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;b:FireServer({KeyCode=e.KeyCode,UserInputType=e.UserInputType,UserInputState=e.UserInputState})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g=a:GetMouse()local h,i;while wait(1/30)do if h~=g.Hit or i~=g.Target then h,i=g.Hit,g.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)Mouse,mouse,UserInputService,ContextActionService=e,e,f,CAS end--      [[[
  14. wait(0.2)
  15. -----------------------------------------------------------
  16. --------------------End FE Compatibility-------------------
  17. -----------------------------------------------------------
  18.  
  19. -----------------------------------------------------------
  20. --------------------Start Variables------------------------
  21. -----------------------------------------------------------
  22. local plr = owner
  23. local ch = plr.Character
  24. local root = ch.HumanoidRootPart
  25. local ra = ch["Right Arm"]
  26. local tor = ch.Torso
  27. local hed = ch.Head
  28. local la = ch["Left Arm"]
  29. local rl = ch["Right Leg"]
  30. local ll = ch["Left Leg"]
  31. local necc = tor.Neck
  32. local RS = tor["Right Shoulder"]
  33. local LS = tor["Left Shoulder"]
  34. local RH = tor["Right Hip"]
  35. local LH = tor["Left Hip"]
  36. local hum = ch:FindFirstChildOfClass("Humanoid")
  37. local cf = {
  38.     n = CFrame.new,
  39.     a = CFrame.Angles,
  40.     euler = CFrame.fromEulerAnglesXYZ,
  41.     matrix = CFrame.fromMatrix,
  42.     axis = CFrame.fromAxisAngle,
  43.     }
  44. -----------------------------------------------------------
  45. --------------------Warn Notifications---------------------
  46. -----------------------------------------------------------
  47.  
  48. warn("Created by ByJugator340")
  49.  
  50. -----------------------------------------------------------
  51. --------------------End Variables--------------------------
  52. -----------------------------------------------------------
  53.  
  54.  
  55.  
  56. ------------------------------------------------------------
  57. -----------------Start important values---------------------
  58. ------------------------------------------------------------
  59. local speed = 3
  60. local currentanimation = "Idle"
  61. local attacking = false
  62. local sine = 0
  63. local chan = 2 / speed
  64. local rootc0 = CFrame.new(0,0,0) * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(180))
  65. local neccc0 = CFrame.new(0,1,0) * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(180))
  66. local rshoulderc0 = CFrame.new(-0.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))
  67. local lshoulderc0 = CFrame.new(0.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0))
  68. local kholdin = false
  69. local holdin = false
  70. local eff = Instance.new("Folder",ch)
  71. eff.Name = "Epic effects"
  72. local souls = 0
  73. local transformed = false
  74. ------------------------------------------------------------
  75. -----------------End important values-----------------------
  76. ------------------------------------------------------------
  77.  
  78.  
  79. ------------------------------------------------------------
  80. -----------------Start wait func----------------------------
  81. ------------------------------------------------------------
  82. local rs = game:GetService("RunService")
  83. function hwait(num)
  84.     if num == 0 or num == nil then
  85.         rs.Heartbeat:Wait()
  86.     elseif num ~= 0 or num ~= nil then
  87.         rs.Heartbeat:Wait(num)
  88.     end
  89.    
  90. end
  91.  
  92. ------------------------------------------------------------
  93. ------------------End wait func----------------------------
  94. ------------------------------------------------------------
  95.  
  96.  
  97. ------------------------------------------------------------
  98. ------------------Start Functions :yeetbilly:---------------
  99. ------------------------------------------------------------
  100. function part(parent,color,size,cancollide,anchored,name)
  101.     local newpart = Instance.new("Part",parent)
  102.     newpart.Color = color
  103.     newpart.Size = size
  104.     newpart.CanCollide = cancollide
  105.     newpart.Anchored = anchored
  106.     newpart.Name = name
  107.     return newpart
  108. end
  109.  
  110. function decal(parent,face,texture)
  111.     local newdecal = Instance.new("Decal",parent)
  112.     newdecal.Face = face
  113.     newdecal.Texture = texture
  114.     return newdecal
  115. end
  116. function motor6d(parent,p0,p1,c0)
  117.     local newmotor6 = Instance.new("Motor6D",parent)
  118.     newmotor6.Part0 = p0
  119.     newmotor6.Part1 = p1
  120.     newmotor6.C0 = c0
  121.     return newmotor6
  122. end
  123. function weld(parent,p0,p1,c0)
  124.         local newweld = Instance.new("Weld",parent)
  125.     newweld.Part0 = p0
  126.     newweld.Part1 = p1
  127.     newweld.C0 = c0
  128.     return newweld
  129. end
  130. function newsound(id,parent,looped,pitch,volume)
  131.     local sound = Instance.new("Sound",parent)
  132.     sound.SoundId = "rbxassetid://"..id
  133.     sound.Pitch = pitch
  134.     sound.Volume = volume
  135.     sound.Looped = looped
  136.     return sound
  137. end
  138. function tween(thing,property,easingstyle,easingdirection,animtime)
  139.     local MoveStyle = Enum.EasingStyle[easingstyle]
  140. local outorin = Enum.EasingDirection[easingdirection]
  141. local speed = 1
  142. if attacking == true then
  143.     speed = 5
  144. end
  145. local tweeningInformation = TweenInfo.new(
  146.     animtime/speed,
  147.     MoveStyle,
  148.     outorin,
  149.     0,
  150.     false,
  151.     0
  152. )
  153. local MoveCF = property
  154. local tweenanim = game:GetService("TweenService"):Create(thing,tweeningInformation,MoveCF)
  155. tweenanim:Play()
  156.  
  157. end
  158. function mesh(parent,meshtype,meshid,textureid,scale,offset)
  159.     local m = Instance.new("SpecialMesh",parent)
  160.     m.MeshType = Enum.MeshType[meshtype]
  161.     m.MeshId = "rbxassetid://"..meshid
  162.     m.TextureId = "rbxassetid://"..textureid
  163.     m.Scale = scale
  164.     m.Offset = offset
  165.     return m
  166. end
  167. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  168.     return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  169. end
  170. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  171.     local DIRECTION = cf.n(StartPos,EndPos).lookVector
  172.     return Raycast(StartPos, DIRECTION, Distance, Ignore)
  173. end
  174. New = function(Object, Parent, Name, Data)
  175.     local Object = Instance.new(Object)
  176.     for Index, Value in pairs(Data or {}) do
  177.         Object[Index] = Value
  178.     end
  179.     Object.Parent = Parent
  180.     Object.Name = Name
  181.     return Object
  182. end
  183.  
  184. -------------------------------------------------------------------------
  185. ----------------------End Functions-------------------------------------
  186. -------------------------------------------------------------------------
  187.  
  188. local sizes = {NumberSequenceKeypoint.new(0,2,0),NumberSequenceKeypoint.new(1,0,0)}
  189. local trans = { NumberSequenceKeypoint.new(0,0.5,0),NumberSequenceKeypoint.new(1,1,0)}
  190. ------------------------------------------------------------
  191. -----------------Start Weapon Creation----------------------
  192. ------------------------------------------------------------
  193. local theme = newsound("690840388",root,true,1,2)
  194. local skull = Instance.new("Part",ch)
  195.  
  196. skull.Anchored = true
  197. skull.CanCollide = false
  198. skull.Size = Vector3.new(2.154, 3.227, 3.308)
  199. local fireparticle = Instance.new("ParticleEmitter",skull)
  200. fireparticle.LightEmission = 8
  201. if souls == 0 or souls <10 then
  202.     fireparticle.Color = ColorSequence.new(BrickColor.new("Crimson").Color,BrickColor.new("Really red").Color)
  203. elseif souls >10 or souls == 10 then
  204.     fireparticle.Color = ColorSequence(BrickColor.new("Gold").Color)
  205. end
  206. fireparticle.Texture="http://www.roblox.com/asset/?id=1460745664"
  207. fireparticle.Lifetime=NumberRange.new(souls,souls)
  208. fireparticle.Rotation=NumberRange.new(0,360)
  209. fireparticle.Rate=100
  210. fireparticle.VelocitySpread = 10000
  211. fireparticle.Acceleration = Vector3.new(0,85,0)
  212. fireparticle.Drag = 5
  213. fireparticle.Speed = NumberRange.new(0.1,5)
  214. fireparticle.Size=NumberSequence.new(sizes)
  215. fireparticle.Transparency=NumberSequence.new(trans)
  216. local mesh = Instance.new("SpecialMesh",skull)
  217. mesh.MeshId = "rbxassetid://693287745"
  218. mesh.TextureId = "rbxassetid://693287874"
  219.  
  220. coroutine.resume(coroutine.create(function()
  221.     while true do
  222.        
  223.         hwait()
  224.         sine = sine + chan
  225.         tween(skull,{CFrame = root.CFrame * cf.n(math.random(-4,10),2.5 * math.sin(sine/24),4)},"Quad","Out",speed/3)
  226.     end
  227. end))
  228. ------------------------------------------------------------
  229. -----------------End Weapon Creation------------------------
  230. ------------------------------------------------------------
  231.  
  232. ------------------------------------------------------------
  233. -----------------Start Damage func--------------------------
  234. ------------------------------------------------------------
  235. function collect(plr)
  236.     if plr then
  237.         coroutine.resume(coroutine.create(function()
  238.             for i,v in pairs(plr:GetDescendants()) do
  239.             if v:IsA("BasePart") then
  240.                 for i = 1,75 do
  241.                     hwait()
  242.                 tween(v,{Transparency = 1},"Linear","In",speed/3)
  243.                 end
  244.                 local soulpart = part(eff,BrickColor.new("Navy blue").Color,Vector3.new(0.5,0.5,0.5),false,true,plr.Name.."'s ".."Soul")
  245.                 local att1 = Instance.new("Attachment",soulpart)
  246.                 att1.Position = Vector3.new(0, 0.14, -0.18)
  247.                 local att2 = Instance.new("Attachment",soulpart)
  248.                 att2.Position = Vector3.new(-0.01, -0.14, -0.19)
  249.                 local trail = Instance.new("Trail",soulpart)
  250.                 trail.Attachment0 = att1
  251.                 trail.Attachment1 = att2
  252.                 soulpart.Transparency = 1
  253.                 trail.Color = ColorSequence.new(BrickColor.new("Dark indigo").Color,BrickColor.new("Navy blue").Color)
  254.                 soulpart.CFrame = plr.Parent:FindFirstChild("HumanoidRootPart").CFrame
  255.                 for i = 1,75 do
  256.                     hwait()
  257.                     tween(soulpart,{CFrame = root.CFrame},"Linear","Out",speed/3)
  258.                 end
  259.                 plr:BreakJoints()
  260.                 newsound("1546451566",tor,false,1,3)
  261.                
  262.         end
  263.             end
  264.             souls = souls + 1
  265.         end))
  266.     end
  267. end
  268.  
  269.  
  270. ------------------------------------------------------------
  271. -----------------End Damage func--------------------------
  272. ------------------------------------------------------------
  273.  
  274. ------------------------------------------------------------
  275. -----------------Start attack functions---------------------
  276. ------------------------------------------------------------
  277.  
  278. function test()
  279.     local tar = Mouse.Target
  280.     if tar ~= nil  then
  281.         collect(tar)
  282.         print(tar)
  283.     end
  284. end
  285. ------------------------------------------------------------
  286. -----------------End attack functions---------------------
  287. ------------------------------------------------------------
  288. Mouse.KeyDown:Connect(function(k)
  289.     if k == "z" and attacking == false then
  290.         test()
  291.     end
  292. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement