Advertisement
XSleepyDemonX_17

M I N E C R A F T V I B E S (Enjoy! UwU)

Jul 23rd, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.63 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. --[[ A script By Nekuwo
  88. M I N E C R A F T V I B E S : ' ) ]]--
  89.  
  90. local IDs = {340106355,927529620,876981900,840433326}
  91.  
  92. function swait(num)
  93. if num==0 or num==nil then
  94. game:service'RunService'.Stepped:wait(0)
  95. else
  96. for i=0,num do
  97. game:service'RunService'.Stepped:wait(0)
  98. end
  99. end
  100. end
  101. function thread(f)
  102. coroutine.resume(coroutine.create(f))
  103. end
  104. function clerp(a, b, t)
  105. local qa = {
  106. QuaternionFromCFrame(a)
  107. }
  108. local qb = {
  109. QuaternionFromCFrame(b)
  110. }
  111. local ax, ay, az = a.x, a.y, a.z
  112. local bx, by, bz = b.x, b.y, b.z
  113. local _t = 1 - t
  114. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  115. end
  116. function QuaternionFromCFrame(cf)
  117. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  118. local trace = m00 + m11 + m22
  119. if trace > 0 then
  120. local s = math.sqrt(1 + trace)
  121. local recip = 0.5 / s
  122. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  123. else
  124. local i = 0
  125. if m00 < m11 then
  126. i = 1
  127. end
  128. if m22 > (i == 0 and m00 or m11) then
  129. i = 2
  130. end
  131. if i == 0 then
  132. local s = math.sqrt(m00 - m11 - m22 + 1)
  133. local recip = 0.5 / s
  134. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  135. elseif i == 1 then
  136. local s = math.sqrt(m11 - m22 - m00 + 1)
  137. local recip = 0.5 / s
  138. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  139. elseif i == 2 then
  140. local s = math.sqrt(m22 - m00 - m11 + 1)
  141. local recip = 0.5 / s
  142. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  143. end
  144. end
  145. end
  146. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  147. local xs, ys, zs = x + x, y + y, z + z
  148. local wx, wy, wz = w * xs, w * ys, w * zs
  149. local xx = x * xs
  150. local xy = x * ys
  151. local xz = x * zs
  152. local yy = y * ys
  153. local yz = y * zs
  154. local zz = z * zs
  155. 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))
  156. end
  157. function QuaternionSlerp(a, b, t)
  158. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  159. local startInterp, finishInterp
  160. if cosTheta >= 1.0E-4 then
  161. if 1 - cosTheta > 1.0E-4 then
  162. local theta = math.acos(cosTheta)
  163. local invSinTheta = 1 / math.sin(theta)
  164. startInterp = math.sin((1 - t) * theta) * invSinTheta
  165. finishInterp = math.sin(t * theta) * invSinTheta
  166. else
  167. startInterp = 1 - t
  168. finishInterp = t
  169. end
  170. elseif 1 + cosTheta > 1.0E-4 then
  171. local theta = math.acos(-cosTheta)
  172. local invSinTheta = 1 / math.sin(theta)
  173. startInterp = math.sin((t - 1) * theta) * invSinTheta
  174. finishInterp = math.sin(t * theta) * invSinTheta
  175. else
  176. startInterp = t - 1
  177. finishInterp = t
  178. end
  179. 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
  180. end
  181. function rayCast(Position, Direction, Range, Ignore)
  182. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  183. end
  184. --Wait what okay
  185. wait()
  186. local plr = game:service'Players'.LocalPlayer
  187. local char = Player.Character
  188. local hum = char.Humanoid
  189. local ra = char["Right Arm"]
  190. local la= char["Left Arm"]
  191. local rl= char["Right Leg"]
  192. local ll = char["Left Leg"]
  193. local hed = char.Head
  194. local root = char.HumanoidRootPart
  195. local rootj = root.RootJoint
  196. local tors = char.Torso
  197. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  198. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  199. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  200. local maincolor = BrickColor.new("Magenta")
  201. cf = CFrame.new
  202. angles = CFrame.Angles
  203. attack = false
  204. euler=CFrame.fromEulerAnglesXYZ
  205. equipped = false
  206. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  207. RSH, LSH = nil, nil
  208. RW = Instance.new("Weld")
  209. LW = Instance.new("Weld")
  210. RH = tors["Right Hip"]
  211. LH = tors["Left Hip"]
  212. RSH = tors["Right Shoulder"]
  213. LSH = tors["Left Shoulder"]
  214. RSH.Parent = nil
  215. LSH.Parent = nil
  216. RW.Name = "RW"
  217. RW.Part0 = tors
  218. RW.C0 = CFrame.new(1.5, 0.5, 0)
  219. RW.C1 = CFrame.new(0, 0.5, 0)
  220. RW.Part1 = ra
  221. RW.Parent = tors
  222. LW.Name = "LW"
  223. LW.Part0 = tors
  224. LW.C0 = CFrame.new(-1.5, 0.5, 0)
  225. LW.C1 = CFrame.new(0, 0.5, 0)
  226. LW.Part1 = la
  227. LW.Parent = tors
  228. Effects = {}
  229.  
  230. ArtificialHB = Instance.new("BindableEvent", script)
  231. ArtificialHB.Name = "Heartbeat"
  232.  
  233. script:WaitForChild("Heartbeat")
  234.  
  235. frame = 1 / 60
  236. tf = 0
  237. allowframeloss = false
  238. tossremainder = false
  239. lastframe = tick()
  240. script.Heartbeat:Fire()
  241.  
  242. game:GetService("RunService").Heartbeat:connect(function(s, p)
  243. tf = tf + s
  244. if tf >= frame then
  245. if allowframeloss then
  246. script.Heartbeat:Fire()
  247. lastframe = tick()
  248. else
  249. for i = 1, math.floor(tf / frame) do
  250. script.Heartbeat:Fire()
  251. end
  252. lastframe = tick()
  253. end
  254. if tossremainder then
  255. tf = 0
  256. else
  257. tf = tf - frame * math.floor(tf / frame)
  258. end
  259. end
  260. end)
  261. local RbxUtility = LoadLibrary("RbxUtility")
  262. local Create = RbxUtility.Create
  263.  
  264. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  265. if hit.Parent == nil then
  266. return
  267. end
  268. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  269. for _, v in pairs(hit.Parent:children()) do
  270. if v:IsA("Humanoid") then
  271. h = v
  272. end
  273. end
  274. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  275. warn'No R15 allowed'
  276. hit.Parent:FindFirstChild("Head"):BreakJoints()
  277. end
  278.  
  279. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  280. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  281. if hit.Parent.DebounceHit.Value == true then
  282. return
  283. end
  284. end
  285. if insta == true then
  286. hit.Parent:FindFirstChild("Head"):BreakJoints()
  287. end
  288. local c = Create("ObjectValue"){
  289. Name = "creator",
  290. Value = owner,
  291. Parent = h,
  292. }
  293. game:GetService("Debris"):AddItem(c, .5)
  294. if HitSound ~= nil and HitPitch ~= nil then
  295. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  296. end
  297. local Damage = math.random(minim, maxim)
  298. local blocked = false
  299. local block = hit.Parent:findFirstChild("Block")
  300. if block ~= nil then
  301. if block.className == "IntValue" then
  302. if block.Value > 0 then
  303. blocked = true
  304. block.Value = block.Value - 1
  305. print(block.Value)
  306. end
  307. end
  308. end
  309. if blocked == false then
  310. h.Health = h.Health - Damage
  311. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  312. else
  313. h.Health = h.Health - (Damage / 2)
  314. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  315. end
  316. if Type == "Knockdown" then
  317. local hum = hit.Parent.Humanoid
  318. hum.PlatformStand = true
  319. coroutine.resume(coroutine.create(function(HHumanoid)
  320. swait(1)
  321. HHumanoid.PlatformStand = false
  322. end), hum)
  323. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  324. local bodvol = Create("BodyVelocity"){
  325. velocity = angle * knockback,
  326. P = 5000,
  327. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  328. Parent = hit,
  329. }
  330. local rl = Create("BodyAngularVelocity"){
  331. P = 3000,
  332. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  333. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  334. Parent = hit,
  335. }
  336. game:GetService("Debris"):AddItem(bodvol, .5)
  337. game:GetService("Debris"):AddItem(rl, .5)
  338. elseif Type == "Normal" then
  339. local vp = Create("BodyVelocity"){
  340. P = 500,
  341. maxForce = Vector3.new(math.huge, 0, math.huge),
  342. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  343. }
  344. if knockback > 0 then
  345. vp.Parent = hit.Parent.Torso
  346. end
  347. game:GetService("Debris"):AddItem(vp, .5)
  348. elseif Type == "Up" then
  349. local bodyVelocity = Create("BodyVelocity"){
  350. velocity = Vector3.new(0, 20, 0),
  351. P = 5000,
  352. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  353. Parent = hit,
  354. }
  355. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  356. elseif Type == "DarkUp" then
  357. coroutine.resume(coroutine.create(function()
  358. for i = 0, 1, 0.1 do
  359. swait()
  360. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  361. end
  362. end))
  363. local bodyVelocity = Create("BodyVelocity"){
  364. velocity = Vector3.new(0, 20, 0),
  365. P = 5000,
  366. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  367. Parent = hit,
  368. }
  369. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  370. elseif Type == "Snare" then
  371. local bp = Create("BodyPosition"){
  372. P = 2000,
  373. D = 100,
  374. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  375. position = hit.Parent.Torso.Position,
  376. Parent = hit.Parent.Torso,
  377. }
  378. game:GetService("Debris"):AddItem(bp, 1)
  379. elseif Type == "Freeze" then
  380. local BodPos = Create("BodyPosition"){
  381. P = 50000,
  382. D = 1000,
  383. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  384. position = hit.Parent.Torso.Position,
  385. Parent = hit.Parent.Torso,
  386. }
  387. local BodGy = Create("BodyGyro") {
  388. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  389. P = 20e+003,
  390. Parent = hit.Parent.Torso,
  391. cframe = hit.Parent.Torso.CFrame,
  392. }
  393. hit.Parent.Torso.Anchored = true
  394. coroutine.resume(coroutine.create(function(Part)
  395. swait(1.5)
  396. Part.Anchored = false
  397. end), hit.Parent.Torso)
  398. game:GetService("Debris"):AddItem(BodPos, 3)
  399. game:GetService("Debris"):AddItem(BodGy, 3)
  400. end
  401. local debounce = Create("BoolValue"){
  402. Name = "DebounceHit",
  403. Parent = hit.Parent,
  404. Value = true,
  405. }
  406. game:GetService("Debris"):AddItem(debounce, Delay)
  407. c = Create("ObjectValue"){
  408. Name = "creator",
  409. Value = Player,
  410. Parent = h,
  411. }
  412. game:GetService("Debris"):AddItem(c, .5)
  413. end
  414. end
  415.  
  416. function ShowDamage(Pos, Text, Time, Color)
  417. local Rate = (1 / 30)
  418. local Pos = (Pos or Vector3.new(0, 0, 0))
  419. local Text = (Text or "")
  420. local Time = (Time or 2)
  421. local Color = (Color or Color3.new(1, 0, 1))
  422. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  423. EffectPart.Anchored = true
  424. local BillboardGui = Create("BillboardGui"){
  425. Size = UDim2.new(3, 0, 3, 0),
  426. Adornee = EffectPart,
  427. Parent = EffectPart,
  428. }
  429. local TextLabel = Create("TextLabel"){
  430. BackgroundTransparency = 1,
  431. Size = UDim2.new(1, 0, 1, 0),
  432. Text = Text,
  433. Font = "Highway",
  434. TextColor3 = Color,
  435. TextScaled = true,
  436. Parent = BillboardGui,
  437. }
  438. game.Debris:AddItem(EffectPart, (Time))
  439. EffectPart.Parent = game:GetService("Workspace")
  440. delay(0, function()
  441. local Frames = (Time / Rate)
  442. for Frame = 1, Frames do
  443. wait(Rate)
  444. local Percent = (Frame / Frames)
  445. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  446. TextLabel.TextTransparency = Percent
  447. end
  448. if EffectPart and EffectPart.Parent then
  449. EffectPart:Destroy()
  450. end
  451. end)
  452. end
  453. function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  454. for _, c in pairs(workspace:children()) do
  455. local hum = c:findFirstChild("Humanoid")
  456. if hum ~= nil then
  457. local head = c:findFirstChild("Torso") or c:findFirstChild("UpperTorso") or c:FindFirstChild('LowerTorso')
  458. if head ~= nil then
  459. local targ = head.Position - Part.Position
  460. local mag = targ.magnitude
  461. if mag <= Magnitude and c.Name ~= plr.Name then
  462. Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, root, .1, "rbxassetid://" .. HitSound, HitPitch)
  463. end
  464. end
  465. end
  466. end
  467. end
  468. CFuncs = {
  469. Part = {
  470. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  471. local Part = Create("Part")({
  472. Parent = Parent,
  473. Reflectance = Reflectance,
  474. Transparency = Transparency,
  475. CanCollide = false,
  476. Locked = true,
  477. BrickColor = BrickColor.new(tostring(BColor)),
  478. Name = Name,
  479. Size = Size,
  480. Material = Material
  481. })
  482. RemoveOutlines(Part)
  483. return Part
  484. end
  485. },
  486. Mesh = {
  487. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  488. local Msh = Create(Mesh)({
  489. Parent = Part,
  490. Offset = OffSet,
  491. Scale = Scale
  492. })
  493. if Mesh == "SpecialMesh" then
  494. Msh.MeshType = MeshType
  495. Msh.MeshId = MeshId
  496. end
  497. return Msh
  498. end
  499. },
  500. Mesh = {
  501. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  502. local Msh = Create(Mesh)({
  503. Parent = Part,
  504. Offset = OffSet,
  505. Scale = Scale
  506. })
  507. if Mesh == "SpecialMesh" then
  508. Msh.MeshType = MeshType
  509. Msh.MeshId = MeshId
  510. end
  511. return Msh
  512. end
  513. },
  514. Weld = {
  515. Create = function(Parent, Part0, Part1, C0, C1)
  516. local Weld = Create("Weld")({
  517. Parent = Parent,
  518. Part0 = Part0,
  519. Part1 = Part1,
  520. C0 = C0,
  521. C1 = C1
  522. })
  523. return Weld
  524. end
  525. },
  526. Sound = {
  527. Create = function(id, par, vol, pit)
  528. coroutine.resume(coroutine.create(function()
  529. local S = Create("Sound")({
  530. Volume = vol,
  531. Pitch = pit or 1,
  532. SoundId = id,
  533. Parent = par or workspace
  534. })
  535. wait()
  536. S:play()
  537. game:GetService("Debris"):AddItem(S, 6)
  538. end))
  539. end
  540. },
  541. ParticleEmitter = {
  542. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  543. local fp = Create("ParticleEmitter")({
  544. Parent = Parent,
  545. Color = ColorSequence.new(Color1, Color2),
  546. LightEmission = LightEmission,
  547. Size = Size,
  548. Texture = Texture,
  549. Transparency = Transparency,
  550. ZOffset = ZOffset,
  551. Acceleration = Accel,
  552. Drag = Drag,
  553. LockedToPart = LockedToPart,
  554. VelocityInheritance = VelocityInheritance,
  555. EmissionDirection = EmissionDirection,
  556. Enabled = Enabled,
  557. Lifetime = LifeTime,
  558. Rate = Rate,
  559. Rotation = Rotation,
  560. RotSpeed = RotSpeed,
  561. Speed = Speed,
  562. VelocitySpread = VelocitySpread
  563. })
  564. return fp
  565. end
  566. }
  567. }
  568. function RemoveOutlines(part)
  569. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  570. end
  571. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  572. local Part = Create("Part")({
  573. formFactor = FormFactor,
  574. Parent = Parent,
  575. Reflectance = Reflectance,
  576. Transparency = Transparency,
  577. CanCollide = false,
  578. Locked = true,
  579. BrickColor = BrickColor.new(tostring(BColor)),
  580. Name = Name,
  581. Size = Size,
  582. Material = Material
  583. })
  584. RemoveOutlines(Part)
  585. return Part
  586. end
  587. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  588. local Msh = Create(Mesh)({
  589. Parent = Part,
  590. Offset = OffSet,
  591. Scale = Scale
  592. })
  593. if Mesh == "SpecialMesh" then
  594. Msh.MeshType = MeshType
  595. Msh.MeshId = MeshId
  596. end
  597. return Msh
  598. end
  599. function CreateWeld(Parent, Part0, Part1, C0, C1)
  600. local Weld = Create("Weld")({
  601. Parent = Parent,
  602. Part0 = Part0,
  603. Part1 = Part1,
  604. C0 = C0,
  605. C1 = C1
  606. })
  607. return Weld
  608. end
  609. EffectModel = Instance.new("Model", char)
  610. Effects = {
  611. Block = {
  612. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  613. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  614. prt.Anchored = true
  615. prt.CFrame = cframe
  616. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  617. game:GetService("Debris"):AddItem(prt, 10)
  618. if Type == 1 or Type == nil then
  619. table.insert(Effects, {
  620. prt,
  621. "Block1",
  622. delay,
  623. x3,
  624. y3,
  625. z3,
  626. msh
  627. })
  628. elseif Type == 2 then
  629. table.insert(Effects, {
  630. prt,
  631. "Block2",
  632. delay,
  633. x3,
  634. y3,
  635. z3,
  636. msh
  637. })
  638. else
  639. table.insert(Effects, {
  640. prt,
  641. "Block3",
  642. delay,
  643. x3,
  644. y3,
  645. z3,
  646. msh
  647. })
  648. end
  649. end
  650. },
  651. Sphere = {
  652. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  653. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  654. prt.Anchored = true
  655. prt.CFrame = cframe
  656. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  657. game:GetService("Debris"):AddItem(prt, 10)
  658. table.insert(Effects, {
  659. prt,
  660. "Cylinder",
  661. delay,
  662. x3,
  663. y3,
  664. z3,
  665. msh
  666. })
  667. end
  668. },
  669. Cylinder = {
  670. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  671. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  672. prt.Anchored = true
  673. prt.CFrame = cframe
  674. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  675. game:GetService("Debris"):AddItem(prt, 10)
  676. table.insert(Effects, {
  677. prt,
  678. "Cylinder",
  679. delay,
  680. x3,
  681. y3,
  682. z3,
  683. msh
  684. })
  685. end
  686. },
  687. Wave = {
  688. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  689. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  690. prt.Anchored = true
  691. prt.CFrame = cframe
  692. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://431164262", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  693. game:GetService("Debris"):AddItem(prt, 10)
  694. table.insert(Effects, {
  695. prt,
  696. "Cylinder",
  697. delay,
  698. x3 / 60,
  699. y3 / 60,
  700. z3 / 60,
  701. msh
  702. })
  703. end
  704. },
  705. Ring = {
  706. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  707. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  708. prt.Anchored = true
  709. prt.CFrame = cframe
  710. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  711. game:GetService("Debris"):AddItem(prt, 10)
  712. table.insert(Effects, {
  713. prt,
  714. "Cylinder",
  715. delay,
  716. x3,
  717. y3,
  718. z3,
  719. msh
  720. })
  721. end
  722. },
  723. Break = {
  724. Create = function(brickcolor, cframe, x1, y1, z1)
  725. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  726. prt.Anchored = true
  727. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  728. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  729. local num = math.random(10, 50) / 1000
  730. game:GetService("Debris"):AddItem(prt, 10)
  731. table.insert(Effects, {
  732. prt,
  733. "Shatter",
  734. num,
  735. prt.CFrame,
  736. math.random() - math.random(),
  737. 0,
  738. math.random(50, 100) / 100
  739. })
  740. end
  741. }
  742. }
  743. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  744. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  745. prt.Anchored = true
  746. prt.CFrame = cframe
  747. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  748. game:GetService("Debris"):AddItem(prt, 10)
  749. if Type == 1 or Type == nil then
  750. table.insert(Effects, {
  751. prt,
  752. "Block1",
  753. delay,
  754. x3,
  755. y3,
  756. z3,
  757. msh
  758. })
  759. elseif Type == 2 then
  760. table.insert(Effects, {
  761. prt,
  762. "Block2",
  763. delay,
  764. x3,
  765. y3,
  766. z3,
  767. msh
  768. })
  769. elseif Type == 3 then
  770. table.insert(Effects, {
  771. prt,
  772. "Block3",
  773. delay,
  774. x3,
  775. y3,
  776. z3,
  777. msh
  778. })
  779. end
  780. end
  781. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  782. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  783. prt.Anchored = true
  784. prt.CFrame = cframe
  785. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  786. game:GetService("Debris"):AddItem(prt, 10)
  787. table.insert(Effects, {
  788. prt,
  789. "Cylinder",
  790. delay,
  791. x3,
  792. y3,
  793. z3,
  794. msh
  795. })
  796. end
  797. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  798. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  799. prt.Anchored = true
  800. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  801. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  802. game:GetService("Debris"):AddItem(prt, 10)
  803. table.insert(Effects, {
  804. prt,
  805. "Cylinder",
  806. delay,
  807. x3,
  808. y3,
  809. z3,
  810. msh
  811. })
  812. end
  813. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  814. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  815. prt.Anchored = true
  816. prt.CFrame = cframe
  817. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  818. game:GetService("Debris"):AddItem(prt, 10)
  819. table.insert(Effects, {
  820. prt,
  821. "Cylinder",
  822. delay,
  823. x3,
  824. y3,
  825. z3,
  826. msh
  827. })
  828. end
  829. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  830. local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  831. prt.Anchored = true
  832. prt.CFrame = cframe
  833. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "264766957", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  834. game:GetService("Debris"):AddItem(prt, 10)
  835. table.insert(Effects, {
  836. prt,
  837. "Cylinder",
  838. delay,
  839. x3,
  840. y3,
  841. z3,
  842. msh
  843. })
  844. end
  845. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  846. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  847. prt.Anchored = true
  848. prt.CFrame = cframe
  849. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  850. game:GetService("Debris"):AddItem(prt, 10)
  851. table.insert(Effects, {
  852. prt,
  853. "Cylinder",
  854. delay,
  855. x3,
  856. y3,
  857. z3,
  858. msh
  859. })
  860. end
  861. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  862. local prt = CreatePart(3, workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  863. prt.Anchored = true
  864. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  865. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  866. local num = math.random(10, 50) / 1000
  867. game:GetService("Debris"):AddItem(prt, 10)
  868. table.insert(Effects, {
  869. prt,
  870. "Shatter",
  871. num,
  872. prt.CFrame,
  873. math.random() - math.random(),
  874. 0,
  875. math.random(50, 100) / 100
  876. })
  877. end
  878.  
  879.  
  880.  
  881.  
  882.  
  883. --[[
  884. Thanks for using Build-To-Lua by jarredbcv.
  885. ]]--
  886.  
  887. New = function(Object, Parent, Name, Data)
  888. local Object = Instance.new(Object)
  889. for Index, Value in pairs(Data or {}) do
  890. Object[Index] = Value
  891. end
  892. Object.Parent = Parent
  893. Object.Name = Name
  894. return Object
  895. end
  896.  
  897. Model = New("Model",char,"Model",{})
  898. Handle = New("Part",Model,"Handle",{BrickColor = BrickColor.new("Reddish brown"),Material = Enum.Material.Wood,Size = Vector3.new(0.300000131, 3.89999866, 0.299999565),CFrame = CFrame.new(119.050049, 1.950001, -79.2499695, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.411765, 0.25098, 0.156863),})
  899. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.300000012, 0.199998289, 0.299999565),CFrame = CFrame.new(120.651886, 3.42561507, -79.2499695, 0, 0.342021108, -0.939692378, 0, 0.939692378, 0.342021108, 1, 0, 0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  900. Mesh = New("SpecialMesh",Part,"Mesh",{MeshType = Enum.MeshType.Wedge,})
  901. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0.342021108, 0.939692378, 0, -0.939692378, 0.342021108, 0),C1 = CFrame.new(1.60183716, 1.47561407, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  902. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.500000119, 0.499998271, 0.499999553),CFrame = CFrame.new(119.050049, 3.54999804, -79.2499695, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  903. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0, 1.59999704, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  904. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.700000048, 0.199998289, 0.299999565),CFrame = CFrame.new(119.550079, 3.6999979, -79.2499695, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  905. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.500030518, 1.7499969, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  906. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.700000048, 0.199998289, 0.299999565),CFrame = CFrame.new(120.195541, 3.5917089, -79.2499695, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  907. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.939692736, -0.342019916, 0, 0.342019886, 0.939692736, 0, 0, 0, 1),C1 = CFrame.new(1.14549255, 1.6417079, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  908. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.700000048, 0.199998289, 0.299999565),CFrame = CFrame.new(117.867294, 3.59170794, -79.2499771, -0.939692736, -0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, -1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  909. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, -0.939692736, -0.342019916, 0, -0.342019886, 0.939692736, 0, 0, 0, -1),C1 = CFrame.new(-1.18275452, 1.64170694, -7.62939453e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  910. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.700000048, 0.199998289, 0.299999565),CFrame = CFrame.new(118.512802, 3.69999695, -79.2500076, -1, 0, 0, 0, 1, 0, 0, 0, -1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  911. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),C1 = CFrame.new(-0.537246704, 1.74999595, -3.81469727e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  912. Part = New("Part",Model,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.300000012, 0.199998289, 0.299999565),CFrame = CFrame.new(117.410965, 3.42561197, -79.2499695, 0, -0.342022002, 0.93969208, 0, 0.93969202, 0.342022002, -1, 0, 0),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  913. Mesh = New("SpecialMesh",Part,"Mesh",{MeshType = Enum.MeshType.Wedge,})
  914. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1, -0.342022002, 0.93969202, 0, 0.93969208, 0.342022002, 0),C1 = CFrame.new(-1.63908386, 1.47561097, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  915.  
  916.  
  917. Sword = New("Model",char,"Sword",{})
  918. Handle2 = New("Part",Sword,"Handle",{BrickColor = BrickColor.new("Reddish brown"),Material = Enum.Material.Wood,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.399997711, 1.20000005, 0.200000003),CFrame = CFrame.new(115.200005, 4.20000219, -75.9000397, 1, 0, 0, 0, 1, 0, 0, 0, 1),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.411765, 0.25098, 0.156863),})
  919. Part = New("Part",Sword,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.400000036, 0.400000036),CFrame = CFrame.new(115.400002, 8.40000153, -75.9000397, -1.49011612e-08, 0, -0.999999762, 0, 1, 0, 0.999999762, 0, -1.49011612e-08),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  920. Mesh = New("SpecialMesh",Part,"Mesh",{MeshType = Enum.MeshType.Wedge,})
  921. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C0 = CFrame.new(0, 0, 0, -1.49011612e-08, 0, 0.999999762, 0, 1, 0, -0.999999762, 0, -1.49011612e-08),C1 = CFrame.new(0.199996948, 4.19999933, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  922. Part = New("Part",Sword,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.799997687, 3.20000005, 0.200000003),CFrame = CFrame.new(115.200005, 6.5999999, -75.9000397, 1, 0, 0, 0, 1, 0, 0, 0, 1),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  923. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C1 = CFrame.new(0, 2.39999771, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  924. Part = New("Part",Sword,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.SmoothPlastic,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.200000003, 0.400000036, 0.400000036),CFrame = CFrame.new(115.000008, 8.40000153, -75.9000397, 7.4505806e-08, 0, 0.999999583, 0, 1, 0, -0.999999583, 0, 7.4505806e-08),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  925. Mesh = New("SpecialMesh",Part,"Mesh",{MeshType = Enum.MeshType.Wedge,})
  926. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C0 = CFrame.new(0, 0, 0, 7.4505806e-08, 0, -0.999999583, 0, 1, 0, 0.999999583, 0, 7.4505806e-08),C1 = CFrame.new(-0.199996948, 4.19999933, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  927. Part = New("Part",Sword,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.Slate,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(1.20000005, 0.200000003, 0.400000006),CFrame = CFrame.new(115.200005, 4.89999914, -75.9000397, 1, 0, 0, 0, 1, 0, 0, 0, 1),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  928. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C1 = CFrame.new(0, 0.699996948, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  929. Part = New("Part",Sword,"Part",{BrickColor = BrickColor.new("Teal"),Material = Enum.Material.Slate,FormFactor = Enum.FormFactor.Custom,Size = Vector3.new(0.5, 0.200000003, 0.300000012),CFrame = CFrame.new(115.200005, 3.50000191, -75.9000397, 1, 0, 0, 0, 1, 0, 0, 0, 1),BackSurface = Enum.SurfaceType.SmoothNoOutlines,BottomSurface = Enum.SurfaceType.SmoothNoOutlines,FrontSurface = Enum.SurfaceType.SmoothNoOutlines,LeftSurface = Enum.SurfaceType.SmoothNoOutlines,RightSurface = Enum.SurfaceType.SmoothNoOutlines,TopSurface = Enum.SurfaceType.SmoothNoOutlines,Color = Color3.new(0.0705882, 0.933333, 0.831373),})
  930. mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle2,C1 = CFrame.new(0, -0.700000286, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  931. for _,v in next, Model:children() do
  932. if v:IsA'BasePart' then
  933.  
  934. v.CanCollide = false
  935. end
  936. end
  937. for _,v in next, Sword:children() do
  938. if v:IsA'BasePart' then
  939.  
  940.  
  941. v.CanCollide = false
  942. end
  943. end
  944.  
  945.  
  946.  
  947. local NewInstance = function(instance,parent,properties)
  948. local inst = Instance.new(instance,parent)
  949. if(properties)then
  950. for i,v in next, properties do
  951. pcall(function() inst[i] = v end)
  952. end
  953. end
  954. return inst;
  955. end
  956. local HW2 = NewInstance('Weld',char,{Part0=ra,Part1=Handle,C0 = CFrame.new(0,-1,-1)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0))})
  957. local HW = NewInstance('Weld',char,{Part0=la,Part1=Handle2,C0 = CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0))})
  958. music = Instance.new("Sound",tors)
  959. music.SoundId = "rbxassetid://145778741"
  960. music.Volume = 1.5
  961. music.Looped = true
  962. music:Play()
  963. torch=false
  964. mouse.KeyDown:connect(function(key)
  965. if key == 'z' and attack == false and torch==false then
  966. UPick()
  967. torch=true
  968. elseif key == 'z' and attack == false and torch==true then
  969. Pick()
  970. torch=false
  971. end
  972. end)
  973.  
  974. function attackoneS()
  975. attack=true
  976. for i = 0,2,0.1 do
  977. swait()
  978. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-90)),0.15)
  979. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  980. HW.C0 = clerp(HW.C0, CFrame.new(0,-1,0) * angles(math.rad(0),math.rad(0),math.rad(125)),.2)
  981. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5+0.04, 0) * angles(math.rad(90 - 1), math.rad(0), math.rad(50)), 0.1)
  982. end
  983. local con = la.Touched:connect(function(hit)
  984. Damage(la, hit, 25, 34, math.random(1, 5), "Normal", root, .2, "rbxassetid://146163522", 1)
  985. end) --Was way to lazy to make a hitbox since this script was just me being fucking bored
  986. for i = 0,2,0.1 do
  987. swait()
  988. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  989. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-55)),0.15)
  990. LW.C0=clerp(LW.C0,cf(-1.5,.5,0)*angles(math.rad(89),math.rad(0),math.rad(-90)),.3)
  991. end
  992. con:Disconnect()
  993. attack=false
  994. end
  995.  
  996. function attacktwoS()
  997. attack=true
  998. for i = 0,1.5,0.1 do
  999. swait()
  1000. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(-55)),0.15)
  1001. RW.C0=clerp(RW.C0,cf(1.5,.5,0)*angles(math.rad(0),math.rad(0),math.rad(55)),.3)
  1002. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(-0), math.rad(-55)),.2)
  1003. HW.C0 = clerp(HW.C0, CFrame.new(0,-1,0) * angles(math.rad(5),math.rad(90),math.rad(-90)),.2)
  1004. end
  1005. local con = ra.Touched:connect(function(hit)
  1006. Damage(ra, hit, 25, 34, math.random(1, 5), "Normal", root, .2, "rbxassetid://146163522", 1)
  1007. end) --Was way to lazy to make a hitbox since this script was just me being fucking bored
  1008. for i = 0,2,0.1 do
  1009. swait()
  1010. tors.Neck.C0=clerp(tors.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(-75)),.3)
  1011. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(90)),0.15)
  1012. RW.C0=clerp(RW.C0,cf(1.5,.5,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.3)
  1013. HW.C0 = clerp(HW.C0, CFrame.new(0,-1,0) * angles(math.rad(5),math.rad(90),math.rad(-180)),.2)
  1014. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(55), math.rad(-0), math.rad(-25)),.2)
  1015. end
  1016. attack=false
  1017. con:Disconnect()
  1018. end
  1019.  
  1020. function UPick()
  1021. attack=true
  1022. for i = 0,1.5,0.1 do
  1023. swait()
  1024.  
  1025. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(-0), math.rad(-0)),.2)
  1026.  
  1027.  
  1028. end
  1029. for _,v in next, Model:children() do
  1030. if v:IsA'BasePart' then
  1031.  
  1032. v.Transparency = 1
  1033. v.CanCollide = false
  1034. end
  1035. end
  1036. attack=false
  1037. end
  1038.  
  1039. function Pick()
  1040. attack=true
  1041. for i = 0,1.5,0.1 do
  1042. swait()
  1043.  
  1044. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-25), math.rad(-0), math.rad(-0)),.2)
  1045.  
  1046. end
  1047. for _,v in next, Model:children() do
  1048. if v:IsA'BasePart' then
  1049.  
  1050. v.Transparency = 0
  1051. v.CanCollide = false
  1052. end
  1053. end
  1054. attack=false
  1055. end
  1056.  
  1057.  
  1058.  
  1059. attacktype=1
  1060. mouse.Button1Down:connect(function()
  1061. if attack==false then
  1062. if attacktype==1 then
  1063. attack=true
  1064. attacktype=2
  1065. attackoneS()
  1066. elseif attacktype==2 then
  1067. attack=true
  1068. attacktype=1
  1069. attacktwoS()
  1070. end
  1071. end
  1072. end)
  1073. hum.Health = math.huge
  1074. hum.MaxHealth = math.huge
  1075. hum.WalkSpeed = 6
  1076. idle=0
  1077. local sine = 0
  1078. local change = 1
  1079. local val = 0
  1080. toim = 0
  1081. hum.Animator.Parent = nil
  1082. idleanim=.4
  1083. while true do
  1084. swait()
  1085. sine = sine + change
  1086. local torvel=(root.Velocity*Vector3.new(1,0,1)).magnitude
  1087. local velderp=root.Velocity.y
  1088. hitfloor,posfloor=rayCast(root.Position,(CFrame.new(root.Position,root.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  1089. if equipped==true or equipped==false then
  1090. if attack==false then
  1091. idle=idle+1
  1092. else
  1093. idle=0
  1094. end
  1095. if root.Velocity.y > 1 and hitfloor==nil then
  1096. Anim="Jump"
  1097. if attack==false then
  1098. rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1099. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
  1100. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(10)), 0.3)
  1101. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
  1102. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
  1103. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
  1104. end
  1105. elseif root.Velocity.y < -1 and hitfloor==nil then
  1106. Anim="Fall"
  1107. if attack==false then
  1108. RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(-20)),.3)
  1109. LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-60),math.rad(0)),.3)
  1110. rootj.C0 = clerp(rootj.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3)
  1111. tors.Neck.C0 = clerp(tors.Neck.C0,necko *angles(math.rad(40),math.rad(0),math.rad(0)),.3)
  1112. RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.65, 0) * angles(math.rad(-10), math.rad(0), math.rad(90)), 0.3)
  1113. LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.65, 0) * angles(math.rad(-10), math.rad(0), math.rad(-90)), 0.3)
  1114. end
  1115. elseif torvel<1 and hitfloor~=nil then
  1116. Anim="Idle"
  1117. change = 1
  1118. if attack==false then
  1119. HW.C0 = clerp(HW.C0, CFrame.new(0,-1,0) * angles(math.rad(15),math.rad(-90),math.rad(50)),.2)
  1120. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.1+0.1*math.cos(sine/20))*angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
  1121. tors.Neck.C0=clerp(tors.Neck.C0,necko*angles(math.rad(5.5*math.cos(sine/30)),math.rad(0),math.rad(0)),.3)
  1122. RH.C0=clerp(RH.C0,cf(1,-0.9-0.1*math.cos(sine/20),0.025*math.cos(sine/20))*angles(math.rad(-2.5),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  1123. LH.C0=clerp(LH.C0,cf(-1,-0.9-0.1*math.cos(sine/20),0.025*math.cos(sine/20))*angles(math.rad(-2.5),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),0.15)
  1124. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.05*math.sin(sine/30), 0) * angles(math.rad(3), math.rad(15*math.cos(sine/40)), math.rad(15)),.2)
  1125. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5+0.05*math.sin(sine/30), 0) * angles(math.rad(75), math.rad(-15*math.cos(sine/40)), math.rad(-10)),.2)
  1126.  
  1127. end
  1128. elseif torvel>2 and torvel<22 and hitfloor~=nil then
  1129. Anim="Walk"
  1130. change = .6
  1131. if attack==false then
  1132. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(5-2.5*math.cos(sine/3.5)),math.rad(0),math.rad(20*math.cos(sine/7))),0.15)
  1133. tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(15*math.cos(sine/7))), 0.3)
  1134. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(30*math.cos(sine/7))+ math.sin(sine/7)/2.5,math.rad(0),math.rad(10)),0.15)
  1135. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*angles(math.rad(-30*math.cos(sine/7))+ -math.sin(sine/7)/2.5,math.rad(0),math.rad(-10)),0.15)
  1136. RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/1.5)*angles(math.rad(-5-15*math.cos(sine/7))+ -math.sin(sine/7)/2.5,math.rad(90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0+3.5*math.cos(sine/7)),math.rad(0),math.rad(0)),0.15)
  1137. LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/1.5)*angles(math.rad(-5+15*math.cos(sine/7))+ math.sin(sine/7)/2.5,math.rad(-90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0-3.5*math.cos(sine/7)),math.rad(0),math.rad(0)),0.15)
  1138. HW.C0 = clerp(HW.C0, CFrame.new(0,-1,0) * angles(math.rad(-90),math.rad(90),math.rad(0)),.2)
  1139. end
  1140. elseif torvel>=22 and hitfloor~=nil then
  1141. Anim="Run"
  1142. if attack==false then
  1143. rootj.C0=clerp(rootj.C0,RootCF*cf(0,0,-0.175+0.025*math.cos(sine/3.5)+ -math.sin(sine/3.5)/7)*angles(math.rad(5-2.5*math.cos(sine/3.5)),math.rad(0),math.rad(10*math.cos(sine/7))),0.15)
  1144. tors.Neck.C0 = clerp(tors.Neck.C0, necko * cf(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
  1145. RW.C0=clerp(RW.C0,CFrame.new(1.5,0.5,0)*angles(math.rad(30*math.cos(sine/7))+ math.sin(sine/7)/2.5,math.rad(0),math.rad(10)),0.15)
  1146. LW.C0=clerp(LW.C0,CFrame.new(-1.5,0.5,0)*angles(math.rad(-30*math.cos(sine/7))+ -math.sin(sine/7)/2.5,math.rad(0),math.rad(-10)),0.15)
  1147. RH.C0=clerp(RH.C0,cf(1,-0.925-0.5*math.cos(sine/7)/2,0.5*math.cos(sine/7)/2)*angles(math.rad(-25-15*math.cos(sine/7))+ -math.sin(sine/7),math.rad(90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
  1148. LH.C0=clerp(LH.C0,cf(-1,-0.925+0.5*math.cos(sine/7)/2,-0.5*math.cos(sine/7)/2)*angles(math.rad(-25+15*math.cos(sine/7))+ math.sin(sine/7),math.rad(-90-10*math.cos(sine/7)),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0)),0.15)
  1149. end
  1150. end
  1151. end
  1152. if 0 < #Effects then
  1153. for e = 1, #Effects do
  1154. if Effects[e] ~= nil then
  1155. local Thing = Effects[e]
  1156. if Thing ~= nil then
  1157. local Part = Thing[1]
  1158. local Mode = Thing[2]
  1159. local Delay = Thing[3]
  1160. local IncX = Thing[4]
  1161. local IncY = Thing[5]
  1162. local IncZ = Thing[6]
  1163. if 1 >= Thing[1].Transparency then
  1164. if Thing[2] == "Block1" then
  1165. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1166. local Mesh = Thing[1].Mesh
  1167. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1168. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1169. elseif Thing[2] == "Block2" then
  1170. Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
  1171. local Mesh = Thing[7]
  1172. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1173. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1174. elseif Thing[2] == "Block3" then
  1175. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
  1176. local Mesh = Thing[7]
  1177. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1178. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1179. elseif Thing[2] == "Cylinder" then
  1180. local Mesh = Thing[1].Mesh
  1181. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1182. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1183. elseif Thing[2] == "Blood" then
  1184. local Mesh = Thing[7]
  1185. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1186. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1187. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1188. elseif Thing[2] == "Elec" then
  1189. local Mesh = Thing[1].Mesh
  1190. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1191. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1192. elseif Thing[2] == "Disappear" then
  1193. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1194. elseif Thing[2] == "Shatter" then
  1195. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1196. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1197. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1198. Thing[6] = Thing[6] + Thing[5]
  1199. end
  1200. else
  1201. Part.Parent = nil
  1202. table.remove(Effects, e)
  1203. end
  1204. end
  1205. end
  1206. end
  1207. end
  1208. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement