Advertisement
Void_scripter0

minecraft

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