Advertisement
oatmeal2009

Baldi FE

Aug 28th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.13 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152. -- Created by Nebula_Zorua --
  153. -- Boreldi --
  154. -- I was bored --
  155. -- Discord: Nebula the Zorua#6969
  156. -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
  157.  
  158. wait(1/60)
  159.  
  160. --// Shortcut Variables \\--
  161. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  162. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  163. local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  164. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  165. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end}
  166. local R3 = {N=Region3.new}
  167. local De = S.Debris
  168. local WS = workspace
  169. local Lght = S.Lighting
  170. local RepS = S.ReplicatedStorage
  171. local IN = Instance.new
  172. local Plrs = S.Players
  173.  
  174. --// Initializing \\--
  175. local Plr = Plrs.LocalPlayer
  176. local Char = Plr.Character
  177. local Hum = Char:FindFirstChildOfClass'Humanoid'
  178. local RArm = Char["Right Arm"]
  179. local LArm = Char["Left Arm"]
  180. local RLeg = Char["Right Leg"]
  181. local LLeg = Char["Left Leg"]
  182. local Root = Char:FindFirstChild'HumanoidRootPart'
  183. local Torso = Char.Torso
  184. local Head = Char.Head
  185. local NeutralAnims = true
  186. local Attack = false
  187. local Debounces = {Debounces={}}
  188. local Mouse = Plr:GetMouse()
  189. local Hit = {}
  190. local Sine = 0
  191. local Change = 1
  192. local BloodPuddles = {}
  193.  
  194. local Effects = IN("Folder",Char)
  195. Effects.Name = "Effects"
  196.  
  197.  
  198. --// Debounce System \\--
  199.  
  200.  
  201. function Debounces:New(name,cooldown)
  202. local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  203. setmetatable(aaaaa,{__index = Debounces})
  204. Debounces.Debounces[name] = aaaaa
  205. return aaaaa
  206. end
  207.  
  208. function Debounces:Use(overrideUsable)
  209. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  210. if(self.Usable or overrideUsable)then
  211. self.Usable = false
  212. self.CoolingDown = true
  213. local LastUse = time()
  214. self.LastUse = LastUse
  215. delay(self.Cooldown or 2,function()
  216. if(self.LastUse == LastUse)then
  217. self.CoolingDown = false
  218. self.Usable = true
  219. end
  220. end)
  221. end
  222. end
  223.  
  224. function Debounces:Get(name)
  225. assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  226. for i,v in next, Debounces.Debounces do
  227. if(i == name)then
  228. return v;
  229. end
  230. end
  231. end
  232.  
  233. function Debounces:GetProgressPercentage()
  234. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  235. if(self.CoolingDown and not self.Usable)then
  236. return math.max(
  237. math.floor(
  238. (
  239. (time()-self.LastUse)/self.Cooldown or 2
  240. )*100
  241. )
  242. )
  243. else
  244. return 100
  245. end
  246. end
  247.  
  248. --// Instance Creation Functions \\--
  249. local baseSound = IN("Sound")
  250. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  251. local Sound = baseSound:Clone()
  252. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  253. Sound.Pitch = pitch or 1
  254. Sound.Volume = volume or 1
  255. Sound.Looped = looped or false
  256. if(autoPlay)then
  257. coroutine.wrap(function()
  258. repeat wait() until Sound.IsLoaded
  259. Sound.Playing = autoPlay or false
  260. end)()
  261. end
  262. if(not looped and effect)then
  263. Sound.Stopped:connect(function()
  264. Sound.Volume = 0
  265. Sound:destroy()
  266. end)
  267. elseif(effect)then
  268. warn("Sound can't be looped and a sound effect!")
  269. end
  270. Sound.Parent =parent or Torso
  271. return Sound
  272. end
  273. function Part(parent,color,material,size,cframe,anchored,cancollide)
  274. local part = IN("Part")
  275. part.Parent = parent or Char
  276. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  277. part.Material = material or Enum.Material.SmoothPlastic
  278. part.TopSurface,part.BottomSurface=10,10
  279. part.Size = size or V3.N(1,1,1)
  280. part.CFrame = cframe or CF.N(0,0,0)
  281. part.CanCollide = cancollide or false
  282. part.Anchored = anchored or false
  283. return part
  284. end
  285.  
  286. function Weld(part0,part1,c0,c1)
  287. local weld = IN("Weld")
  288. weld.Parent = part0
  289. weld.Part0 = part0
  290. weld.Part1 = part1
  291. weld.C0 = c0 or CF.N()
  292. weld.C1 = c1 or CF.N()
  293. return weld
  294. end
  295.  
  296. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  297. local part = IN("SpecialMesh")
  298. part.MeshId = meshid or ""
  299. part.TextureId = textid or ""
  300. part.Scale = scale or V3.N(1,1,1)
  301. part.Offset = offset or V3.N(0,0,0)
  302. part.MeshType = meshtype or Enum.MeshType.Sphere
  303. part.Parent = parent
  304. return part
  305. end
  306.  
  307. NewInstance = function(instance,parent,properties)
  308. local inst = Instance.new(instance)
  309. inst.Parent = parent
  310. if(properties)then
  311. for i,v in next, properties do
  312. pcall(function() inst[i] = v end)
  313. end
  314. end
  315. return inst;
  316. end
  317.  
  318. function Clone(instance,parent,properties)
  319. local inst = instance:Clone()
  320. inst.Parent = parent
  321. if(properties)then
  322. for i,v in next, properties do
  323. pcall(function() inst[i] = v end)
  324. end
  325. end
  326. return inst;
  327. end
  328.  
  329. function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf)
  330. local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
  331. local Sound = IN("Sound")
  332. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  333. Sound.Pitch = pitch or 1
  334. Sound.Volume = volume or 1
  335. Sound.Looped = looped or false
  336. if(autoPlay)then
  337. coroutine.wrap(function()
  338. repeat wait() until Sound.IsLoaded
  339. Sound.Playing = autoPlay or false
  340. end)()
  341. end
  342. if(not looped and effect)then
  343. Sound.Stopped:connect(function()
  344. Sound.Volume = 0
  345. soundPart:destroy()
  346. end)
  347. elseif(effect)then
  348. warn("Sound can't be looped and a sound effect!")
  349. end
  350. Sound.Parent = soundPart
  351. return Sound
  352. end
  353.  
  354.  
  355. --// Extended ROBLOX tables \\--
  356. local Instance = setmetatable({ClearChildrenOfClass = function(where,class,recursive) local children = (recursive and where:GetDescendants() or where:GetChildren()) for _,v in next, children do if(v:IsA(class))then v:destroy();end;end;end},{__index = Instance})
  357. --// Require stuff \\--
  358. function CamShake(who,times,intense,origin)
  359. coroutine.wrap(function()
  360. if(script:FindFirstChild'CamShake')then
  361. local cam = script.CamShake:Clone()
  362. cam:WaitForChild'intensity'.Value = intense
  363. cam:WaitForChild'times'.Value = times
  364.  
  365. if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
  366. cam.Parent = who
  367. wait()
  368. cam.Disabled = false
  369. elseif(who == Plr or who == Char or who:IsDescendantOf(Plr))then
  370. local intensity = intense
  371. if(Hum and not Hum:FindFirstChild'CamShaking')then
  372. local cam = workspace.CurrentCamera
  373. local oCO = Hum.CameraOffset
  374. local cs = Instance.new("BoolValue",Hum)
  375. cs.Name = "CamShaking"
  376. for i = 1, times do
  377. local camDistFromOrigin
  378. if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then
  379. camDistFromOrigin = math.floor( (cam.CoordinateFrame.p-origin.Position).magnitude )/25
  380. elseif(typeof(origin) == 'Vector3')then
  381. camDistFromOrigin = math.floor( (cam.CoordinateFrame.p-origin).magnitude )/25
  382. end
  383. if(camDistFromOrigin)then
  384. intensity = math.min(intense, math.floor(intense/camDistFromOrigin))
  385. end
  386. --cam.CoordinateFrame = cam.CoordinateFrame*CFrame.fromEulerAnglesXYZ(math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200)
  387. if(Hum)then
  388. Hum.CameraOffset = Vector3.new(math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200,math.random(-intensity,intensity)/200)
  389. end
  390. swait()
  391. end
  392. if(Hum)then
  393. Hum.CameraOffset = oCO
  394. end
  395. cs:destroy()
  396. end
  397. end
  398. end)()
  399. end
  400.  
  401.  
  402. function CamShakeAll(times,intense,origin)
  403. for _,v in next, Plrs:players() do
  404. CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin)
  405. end
  406. end
  407.  
  408. function ServerScript(code)
  409. if(script:FindFirstChild'Loadstring')then
  410. local load = script.Loadstring:Clone()
  411. load:WaitForChild'Sauce'.Value = code
  412. load.Disabled = false
  413. load.Parent = workspace
  414. elseif(NS and typeof(NS) == 'function')then
  415. NS(code,workspace)
  416. else
  417. warn("no serverscripts lol")
  418. end
  419. end
  420.  
  421. function LocalOnPlayer(who,code)
  422. ServerScript([[
  423. wait()
  424. script.Parent=nil
  425. if(not _G.Http)then _G.Http = game:service'HttpService' end
  426.  
  427. local Http = _G.Http or game:service'HttpService'
  428.  
  429. local source = ]].."[["..code.."]]"..[[
  430. local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php"
  431. local asd = Http:PostAsync(link,source)
  432. repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID
  433. local ID = Http:JSONDecode(asd).Result.Require_ID
  434. local vs = require(ID).VORTH_SCRIPT
  435. vs.Parent = game:service'Players'.]]..who.Name..[[.Character
  436. ]])
  437. end
  438.  
  439.  
  440. --// Customization \\--
  441.  
  442. local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
  443. local Remove_Hats = true
  444. local Remove_Clothing = true
  445. local PlayerSize = 1
  446. local DamageColor = BrickColor.new'Really red'
  447. local MusicID = 1718183351
  448. local God = false
  449. local Muted = false
  450. local angerCounter = 1; -- lower = faster
  451. local angry = false
  452.  
  453. local WalkSpeed = 16
  454.  
  455. --// Weapon and GUI creation, and Character Customization \\--
  456.  
  457. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  458. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  459.  
  460. local rule = Part(Char,BrickColor.new'Linen',Enum.Material.Wood,V3.N(.2,.5,4),CF.N(),false,false)
  461. local rd = NewInstance("Decal",rule,{Texture='rbxassetid://109519158',Face='Right'})
  462. local ld = NewInstance("Decal",rule,{Texture='rbxassetid://109519158',Face='Left'})
  463.  
  464. if(PlayerSize ~= 1)then
  465. for _,v in next, Char:GetDescendants() do
  466. if(v:IsA'BasePart')then
  467. v.Size = v.Size * PlayerSize
  468. end
  469. end
  470. end
  471.  
  472.  
  473. local Music = Sound(Char,MusicID,1,3,true,false,true)
  474. Music.Name = 'Music'
  475.  
  476. --// Stop animations \\--
  477. for _,v in next, Hum:GetPlayingAnimationTracks() do
  478. v:Stop();
  479. end
  480.  
  481. pcall(game.Destroy,Char:FindFirstChild'Animate')
  482. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  483.  
  484. --// Joints \\--
  485.  
  486. local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  487. local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  488. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
  489. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  490. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  491. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  492. local HW = NewInstance('Motor',Char,{Part0=RArm,Part1=rule,C0=CF.N(0,-1,-1)})
  493.  
  494. local LSC0 = LS.C0
  495. local RSC0 = RS.C0
  496. local NKC0 = NK.C0
  497. local LHC0 = LH.C0
  498. local RHC0 = RH.C0
  499. local RJC0 = RJ.C0
  500.  
  501. --// Artificial HB \\--
  502.  
  503. local ArtificialHB = IN("BindableEvent", script)
  504. ArtificialHB.Name = "Heartbeat"
  505.  
  506. script:WaitForChild("Heartbeat")
  507.  
  508. local tf = 0
  509. local allowframeloss = false
  510. local tossremainder = false
  511. local lastframe = tick()
  512. local frame = 1/Frame_Speed
  513. ArtificialHB:Fire()
  514.  
  515. game:GetService("RunService").Heartbeat:connect(function(s, p)
  516. tf = tf + s
  517. if tf >= frame then
  518. if allowframeloss then
  519. script.Heartbeat:Fire()
  520. lastframe = tick()
  521. else
  522. for i = 1, math.floor(tf / frame) do
  523. ArtificialHB:Fire()
  524. end
  525. lastframe = tick()
  526. end
  527. if tossremainder then
  528. tf = 0
  529. else
  530. tf = tf - frame * math.floor(tf / frame)
  531. end
  532. end
  533. end)
  534.  
  535. function swait(num)
  536. if num == 0 or num == nil then
  537. ArtificialHB.Event:wait()
  538. else
  539. for i = 0, num do
  540. ArtificialHB.Event:wait()
  541. end
  542. end
  543. end
  544.  
  545.  
  546. --// Effect Function(s) \\--
  547.  
  548. function NoobySphere(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,MeshId,Axis)
  549. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
  550. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  551. local Scale = 1
  552. local speeder = Speed
  553. if(Type == "Multiply")then
  554. Scale = 1*Inc
  555. elseif(Type == "Divide")then
  556. Scale = 1/Inc
  557. end
  558. coroutine.wrap(function()
  559. for i = 0,10/Lifetime,.1 do
  560.  
  561. if(Type == "Multiply")then
  562. Scale = Scale - 0.01*Inc/Lifetime
  563. elseif(Type == "Divide")then
  564. Scale = Scale - 0.01/Inc*Lifetime
  565. end
  566. speeder = speeder - 0.01*Speed*Lifetime
  567. fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
  568. fxP.Transparency = fxP.Transparency + 0.01*Lifetime
  569. if(Axis == 'x')then
  570. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, 0, 0)
  571. elseif(Axis == 'y')then
  572. fxM.Scale = fxM.Scale + Vector3.new(0, Scale*Lifetime, 0)
  573. elseif(Axis == 'z')then
  574. fxM.Scale = fxM.Scale + Vector3.new(0, 0, Scale*Lifetime)
  575. elseif(Axis == 'xyz')then
  576. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,Scale*Lifetime,Scale*Lifetime)
  577. elseif(Axis == 'yz')then
  578. fxM.Scale = fxM.Scale + Vector3.new(0,Scale*Lifetime,Scale*Lifetime)
  579. elseif(Axis == 'xz')then
  580. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime,0,Scale*Lifetime)
  581. else
  582. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, 0)
  583. end
  584. if(fxP.Transparency >= 1)then break end
  585. swait()
  586. end
  587. fxP:destroy()
  588. end)()
  589. return fxP
  590. end
  591.  
  592. function NoobySphere2(Lifetime,Type,Pos,StartSize,Inc,Color,MeshId)
  593. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos,true,false)
  594. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Sphere),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  595.  
  596. local Scale = 1
  597. if(Type == "Multiply")then
  598. Scale = 1*Inc
  599. elseif(Type == "Divide")then
  600. Scale = 1/Inc
  601. end
  602. coroutine.wrap(function()
  603. for i = 0,10/Lifetime,.1 do
  604.  
  605. if(Type == "Multiply")then
  606. Scale = Scale - 0.01*Inc/Lifetime
  607. elseif(Type == "Divide")then
  608. Scale = Scale - 0.01/Inc*Lifetime
  609. end
  610. fxP.Transparency = fxP.Transparency + 0.01*Lifetime
  611. fxM.Scale = fxM.Scale + Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
  612. swait()
  613. end
  614. fxP:destroy()
  615. end)()
  616. end
  617.  
  618. function NoobyBlock(Lifetime,Speed,Type,Pos,StartSize,Inc,Color,Range,Fade,MeshId)
  619. local fxP = Part(Effects,Color,Enum.Material.Neon,V3.N(1,1,1),Pos+Pos.lookVector*Range,true,false)
  620. local fxM = Mesh(fxP,(MeshId and Enum.MeshType.FileMesh or Enum.MeshType.Brick),(MeshId and "rbxassetid://"..MeshId or ""),"",StartSize,V3.N())
  621. local Scale = 1
  622. local speeder = Speed
  623. if(Type == "Multiply")then
  624. Scale = 1*Inc
  625. elseif(Type == "Divide")then
  626. Scale = 1/Inc
  627. end
  628. coroutine.wrap(function()
  629. for i = 0,10/Lifetime,.1 do
  630. if(Type == "Multiply")then
  631. Scale = Scale - 0.01*Inc/Lifetime
  632. elseif(Type == "Divide")then
  633. Scale = Scale - 0.01/Inc*Lifetime
  634. end
  635. if(Fade)then
  636. fxP.Transparency = i/(10/Lifetime)
  637. end
  638. speeder = speeder - 0.01*Speed*Lifetime/10
  639. fxP.CFrame = fxP.CFrame + fxP.CFrame.lookVector*speeder*Lifetime
  640. fxM.Scale = fxM.Scale - Vector3.new(Scale*Lifetime, Scale*Lifetime, Scale*Lifetime)
  641. swait()
  642. end
  643. fxP:destroy()
  644. end)()
  645. end
  646.  
  647. function Bezier(startpos, pos2, pos3, endpos, t)
  648. local A = startpos:lerp(pos2, t)
  649. local B = pos2:lerp(pos3, t)
  650. local C = pos3:lerp(endpos, t)
  651. local lerp1 = A:lerp(B, t)
  652. local lerp2 = B:lerp(C, t)
  653. local cubic = lerp1:lerp(lerp2, t)
  654. return cubic
  655. end
  656. function Puddle(hit,pos,norm,data)
  657. local material = data.Material or Enum.Material.SmoothPlastic
  658. local color = data.Color or BrickColor.new'Crimson'
  659. local size = data.Size or 1
  660.  
  661. if(hit.Name ~= 'BloodPuddle')then
  662. local Puddle = NewInstance('Part',workspace,{Material=material,BrickColor=color,Size=V3.N(size,.1,size),CFrame=CF.N(pos,pos+norm)*CF.A(90*M.P/180,0,0),Anchored=true,CanCollide=false,Archivable=false,Locked=true,Name='BloodPuddle'})
  663. local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
  664. BloodPuddles[Puddle] = 0
  665. else
  666. local cyl = hit:FindFirstChild'CylinderMesh'
  667. if(cyl)then
  668. BloodPuddles[hit] = 0
  669. cyl.Scale = cyl.Scale + V3.N(size,0,size)
  670. hit.Transparency = 0
  671. end
  672. end
  673. end
  674.  
  675. function Droplet(data)
  676. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  677. local Size = data.Size or 1
  678. local Color = data.Color or BrickColor.new'Crimson'
  679. local StudsPerFrame = data.Speed or 1
  680. local Shape = data.Shape or 'Ball'
  681. local Frames = (data.Frames or 160)+1
  682. local Pos = data.Origin or Root.CFrame
  683. local Direction = data.Direction or Root.CFrame.lookVector*100000
  684. local Material = data.Material or Enum.Material.SmoothPlastic
  685. local Drop = data.Drop or .05
  686. local Ignorelist = data.Ignorelist or nil
  687.  
  688. local Bullet = Part(Effects,Color,Material,V3.N(Size,Size,Size),Pos,true,false)
  689. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  690. if(Shape == 'Ball')then
  691. BMesh.MeshType = Enum.MeshType.Sphere
  692. elseif(Shape == 'Head')then
  693. BMesh.MeshType = Enum.MeshType.Head
  694. elseif(Shape == 'Cylinder')then
  695. BMesh.MeshType = Enum.MeshType.Cylinder
  696. end
  697.  
  698. coroutine.wrap(function()
  699. for i = 1, Frames do
  700. Pos = Pos * CF.N(0,-(Drop*i),0)
  701. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i)).p,StudsPerFrame)
  702. if(hit and (not hit.Parent or not hit.Parent:FindFirstChildOfClass'Humanoid' and not hit.Parent:IsA'Accessory'))then
  703. Puddle(hit,pos,norm,data)
  704. break;
  705. else
  706. Bullet.CFrame = CF.N(Pos.p,Direction)*CF.N(0,0,-(StudsPerFrame*i))
  707. end
  708. swait()
  709. end
  710. Bullet:destroy()
  711. end)()
  712. end
  713.  
  714. function SphereFX(duration,color,scale,pos,endScale,increment)
  715. return Effect{
  716. Effect='ResizeAndFade',
  717. Color=color,
  718. Size=scale,
  719. Mesh={MeshType=Enum.MeshType.Sphere},
  720. CFrame=pos,
  721. FXSettings={
  722. EndSize=endScale,
  723. EndIsIncrement=increment
  724. }
  725. }
  726. end
  727.  
  728. function BlastFX(duration,color,scale,pos,endScale,increment)
  729. return Effect{
  730. Effect='ResizeAndFade',
  731. Color=color,
  732. Size=scale,
  733. Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
  734. CFrame=pos,
  735. FXSettings={
  736. EndSize=endScale,
  737. EndIsIncrement=increment
  738. }
  739. }
  740. end
  741.  
  742. function BlockFX(duration,color,scale,pos,endScale,increment)
  743. return Effect{
  744. Effect='ResizeAndFade',
  745. Color=color,
  746. Size=scale,
  747. CFrame=pos,
  748. FXSettings={
  749. EndSize=endScale,
  750. EndIsIncrement=increment
  751. }
  752. }
  753. end
  754.  
  755. function ShootBullet(data)
  756. --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
  757. local Size = data.Size or V3.N(2,2,2)
  758. local Color = data.Color or BrickColor.new'Crimson'
  759. local StudsPerFrame = data.Speed or 10
  760. local Shape = data.Shape or 'Ball'
  761. local Frames = data.Frames or 160
  762. local Pos = data.Origin or Torso.CFrame
  763. local Direction = data.Direction or Mouse.Hit
  764. local Material = data.Material or Enum.Material.Neon
  765. local OnHit = data.HitFunction or function(hit,pos)
  766. Effect{
  767. Effect='ResizeAndFade',
  768. Color=Color,
  769. Size=V3.N(10,10,10),
  770. Mesh={MeshType=Enum.MeshType.Sphere},
  771. CFrame=CF.N(pos),
  772. FXSettings={
  773. EndSize=V3.N(.05,.05,.05),
  774. EndIsIncrement=true
  775. }
  776. }
  777. for i = 1, 5 do
  778. local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180))
  779. Effect{
  780. Effect='Fade',
  781. Frames=65,
  782. Size=V3.N(5,5,10),
  783. CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos),
  784. Mesh = {MeshType=Enum.MeshType.Sphere},
  785. Material=Enum.Material.Neon,
  786. Color=Color,
  787. MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p,
  788. }
  789. end
  790. end
  791.  
  792. local Bullet = Part(Effects,Color,Material,Size,Pos,true,false)
  793. local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N())
  794. if(Shape == 'Ball')then
  795. BMesh.MeshType = Enum.MeshType.Sphere
  796. elseif(Shape == 'Head')then
  797. BMesh.MeshType = Enum.MeshType.Head
  798. elseif(Shape == 'Cylinder')then
  799. BMesh.MeshType = Enum.MeshType.Cylinder
  800. end
  801.  
  802. coroutine.wrap(function()
  803. for i = 1, Frames+1 do
  804. local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame)
  805. if(hit)then
  806. OnHit(hit,pos,norm,dist)
  807. break;
  808. else
  809. Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame)
  810. end
  811. swait()
  812. end
  813. Bullet:destroy()
  814. end)()
  815.  
  816. end
  817.  
  818.  
  819. function Zap(data)
  820. local sCF,eCF = data.StartCFrame,data.EndCFrame
  821. assert(sCF,"You need a start CFrame!")
  822. assert(eCF,"You need an end CFrame!")
  823. local parts = data.PartCount or 15
  824. local zapRot = data.ZapRotation or {-5,5}
  825. local startThick = data.StartSize or 3;
  826. local endThick = data.EndSize or startThick/2;
  827. local color = data.Color or BrickColor.new'Electric blue'
  828. local delay = data.Delay or 35
  829. local delayInc = data.DelayInc or 0
  830. local lastLightning;
  831. local MagZ = (sCF.p - eCF.p).magnitude
  832. local thick = startThick
  833. local inc = (startThick/parts)-(endThick/parts)
  834.  
  835. for i = 1, parts do
  836. local pos = sCF.p
  837. if(lastLightning)then
  838. pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p
  839. end
  840. delay = delay + delayInc
  841. local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false)
  842. local posie = CF.N(pos,eCF.p)*CF.N(0,0,MagZ/parts).p+V3.N(M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)))
  843. if(parts == i)then
  844. local MagZ = (pos-eCF.p).magnitude
  845. zapPart.Size = V3.N(endThick,endThick,MagZ)
  846. zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2)
  847. Effect{Effect='ResizeAndFade',Size=V3.N(thick,thick,thick),CFrame=eCF*CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)),Color=color,Frames=delay*2,FXSettings={EndSize=V3.N(thick*8,thick*8,thick*8)}}
  848. else
  849. zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2)
  850. end
  851.  
  852. lastLightning = zapPart
  853. Effect{Effect='Fade',Manual=zapPart,Frames=delay}
  854.  
  855. thick=thick-inc
  856.  
  857. end
  858. end
  859.  
  860. function Zap2(data)
  861. local Color = data.Color or BrickColor.new'Electric blue'
  862. local StartPos = data.Start or Torso.Position
  863. local EndPos = data.End or Mouse.Hit.p
  864. local SegLength = data.SegL or 2
  865. local Thicc = data.Thickness or 0.5
  866. local Fades = data.Fade or 45
  867. local Parent = data.Parent or Effects
  868. local MaxD = data.MaxDist or 200
  869. local Branch = data.Branches or false
  870. local Material = data.Material or Enum.Material.Neon
  871. local Raycasts = data.Raycasts or false
  872. local Offset = data.Offset or {0,360}
  873. local AddMesh = (data.Mesh == nil and true or data.Mesh)
  874. if((StartPos-EndPos).magnitude > MaxD)then
  875. EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p
  876. end
  877. local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude
  878. if(Raycasts)then
  879. hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD)
  880. end
  881. local segments = dist/SegLength
  882. local model = IN("Model",Parent)
  883. model.Name = 'Lightning'
  884. local Last;
  885. for i = 1, segments do
  886. local size = (segments-i)/25
  887. local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false)
  888. if(AddMesh)then IN("CylinderMesh",prt) end
  889. if(Last and math.floor(segments) == i)then
  890. local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude
  891. prt.Size = V3.N(Thicc+size,MagZ,Thicc+size)
  892. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,EndPos)*CF.A(M.R(90),0,0)*CF.N(0,-MagZ/2,0)
  893. elseif(not Last)then
  894. prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  895. else
  896. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,CF.N(pos)*CF.A(M.R(M.RNG(0,360)),M.R(M.RNG(0,360)),M.R(M.RNG(0,360)))*CF.N(0,0,SegLength/3+(segments-i)).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  897. end
  898. Last = prt
  899. if(Branch)then
  900. local choice = M.RNG(1,7+((segments-i)*2))
  901. if(choice == 1)then
  902. local LastB;
  903. for i2 = 1,M.RNG(2,5) do
  904. local size2 = ((segments-i)/35)/i2
  905. local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false)
  906. if(AddMesh)then IN("CylinderMesh",prt) end
  907. if(not LastB)then
  908. prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,Last.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  909. else
  910. prt.CFrame = CF.N(LastB.CFrame*CF.N(0,-SegLength/2,0).p,LastB.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0)
  911. end
  912. LastB = prt
  913. end
  914. end
  915. end
  916. end
  917. if(Fades > 0)then
  918. coroutine.wrap(function()
  919. for i = 1, Fades do
  920. for _,v in next, model:children() do
  921. if(v:IsA'BasePart')then
  922. v.Transparency = (i/Fades)
  923. end
  924. end
  925. swait()
  926. end
  927. model:destroy()
  928. end)()
  929. else
  930. S.Debris:AddItem(model,.01)
  931. end
  932. return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
  933. end
  934.  
  935. function Tween(obj,props,time,easing,direction,repeats,backwards)
  936. local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false)
  937. local tween = S.TweenService:Create(obj, info, props)
  938.  
  939. tween:Play()
  940. end
  941.  
  942. function Effect(data)
  943. local FX = data.Effect or 'ResizeAndFade'
  944. local Parent = data.Parent or Effects
  945. local Color = data.Color or C3.N(0,0,0)
  946. local Size = data.Size or V3.N(1,1,1)
  947. local MoveDir = data.MoveDirection or nil
  948. local MeshData = data.Mesh or nil
  949. local SndData = data.Sound or nil
  950. local Frames = data.Frames or 45
  951. local Manual = data.Manual or nil
  952. local Material = data.Material or nil
  953. local CFra = data.CFrame or Torso.CFrame
  954. local Settings = data.FXSettings or {}
  955. local Shape = data.Shape or Enum.PartType.Block
  956. local Snd,Prt,Msh;
  957. local RotInc = data.RotInc or {0,0,0}
  958. if(typeof(RotInc) == 'number')then
  959. RotInc = {RotInc,RotInc,RotInc}
  960. end
  961. coroutine.wrap(function()
  962. if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then
  963. Prt = Manual
  964. else
  965. Prt = Part(Parent,Color,Material,Size,CFra,true,false)
  966. Prt.Shape = Shape
  967. end
  968. if(typeof(MeshData) == 'table')then
  969. Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset)
  970. elseif(typeof(MeshData) == 'Instance')then
  971. Msh = MeshData:Clone()
  972. Msh.Parent = Prt
  973. elseif(Shape == Enum.PartType.Block)then
  974. Msh = Mesh(Prt,Enum.MeshType.Brick)
  975. end
  976. if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then
  977. Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true)
  978. end
  979. if(Snd)then
  980. repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0
  981. Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch
  982. end
  983. Size = (Msh and Msh.Scale or Size)
  984. local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2)
  985.  
  986. local MoveSpeed = nil;
  987. if(MoveDir)then
  988. MoveSpeed = (CFra.p - MoveDir).magnitude/Frames
  989. end
  990. if(FX ~= 'Arc')then
  991. for Frame = 1, Frames do
  992. if(FX == "Fade")then
  993. Prt.Transparency = (Frame/Frames)
  994. elseif(FX == "Resize")then
  995. if(not Settings.EndSize)then
  996. Settings.EndSize = V3.N(0,0,0)
  997. end
  998. if(Settings.EndIsIncrement)then
  999. if(Msh)then
  1000. Msh.Scale = Msh.Scale + Settings.EndSize
  1001. else
  1002. Prt.Size = Prt.Size + Settings.EndSize
  1003. end
  1004. else
  1005. if(Msh)then
  1006. Msh.Scale = Msh.Scale - grow/Frames
  1007. else
  1008. Prt.Size = Prt.Size - grow/Frames
  1009. end
  1010. end
  1011. elseif(FX == "ResizeAndFade")then
  1012. if(not Settings.EndSize)then
  1013. Settings.EndSize = V3.N(0,0,0)
  1014. end
  1015. if(Settings.EndIsIncrement)then
  1016. if(Msh)then
  1017. Msh.Scale = Msh.Scale + Settings.EndSize
  1018. else
  1019. Prt.Size = Prt.Size + Settings.EndSize
  1020. end
  1021. else
  1022. if(Msh)then
  1023. Msh.Scale = Msh.Scale - grow/Frames
  1024. else
  1025. Prt.Size = Prt.Size - grow/Frames
  1026. end
  1027. end
  1028. Prt.Transparency = (Frame/Frames)
  1029. end
  1030. if(Settings.RandomizeCFrame)then
  1031. Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360))
  1032. else
  1033. Prt.CFrame = Prt.CFrame * CF.A(unpack(RotInc))
  1034. end
  1035. if(MoveDir and MoveSpeed)then
  1036. local Orientation = Prt.Orientation
  1037. Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed)
  1038. Prt.Orientation = Orientation
  1039. end
  1040. swait()
  1041. end
  1042. Prt:destroy()
  1043. else
  1044. local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End
  1045. if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end
  1046. if(start and endP)then
  1047. local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  1048. local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25))
  1049. for Frame = 0, 1, (Settings.Speed or 0.01) do
  1050. if(Settings.Home)then
  1051. endP = Settings.Home.CFrame
  1052. end
  1053. Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame)
  1054. end
  1055. if(Settings.RemoveOnGoal)then
  1056. Prt:destroy()
  1057. end
  1058. else
  1059. Prt:destroy()
  1060. assert(start,"You need a start position!")
  1061. assert(endP,"You need a start position!")
  1062. end
  1063. end
  1064. end)()
  1065. return Prt,Msh,Snd
  1066. end
  1067. function SoulSteal(whom)
  1068. local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart')
  1069. print(torso)
  1070. if(torso and torso:IsA'BasePart')then
  1071. local Model = Instance.new("Model",Effects)
  1072. Model.Name = whom.Name.."'s Soul"
  1073. whom:BreakJoints()
  1074. local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false)
  1075. Soul.Name = 'Head'
  1076. NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
  1077. Effect{
  1078. Effect="Arc",
  1079. Manual = Soul,
  1080. FXSettings={
  1081. Start=torso.CFrame,
  1082. Home = Torso,
  1083. RemoveOnGoal = true,
  1084. }
  1085. }
  1086. local lastPoint = Soul.CFrame.p
  1087.  
  1088. for i = 0, 1, 0.01 do
  1089. local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0)
  1090. local mag = (lastPoint - Soul.Position).magnitude
  1091. Effect{
  1092. Effect = "Fade",
  1093. CFrame = point * CF.N(0, mag/2, 0),
  1094. Size = V3.N(.5,mag+.5,.5),
  1095. Color = Soul.BrickColor
  1096. }
  1097. lastPoint = Soul.CFrame.p
  1098. swait()
  1099. end
  1100. for i = 1, 5 do
  1101. Effect{
  1102. Effect="Fade",
  1103. Color = BrickColor.new'Really red',
  1104. MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p
  1105. }
  1106. end
  1107. end
  1108. end
  1109.  
  1110. --// Other Functions \\ --
  1111.  
  1112. function CastRay(startPos,endPos,range,ignoreList)
  1113. local ray = Ray.new(startPos,(endPos-startPos).unit*range)
  1114. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  1115. return part,pos,norm,(pos and (startPos-pos).magnitude)
  1116. end
  1117.  
  1118. function getRegion(point,range,ignore)
  1119. return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  1120. end
  1121.  
  1122. function clerp(startCF,endCF,alpha)
  1123. return startCF:lerp(endCF, alpha)
  1124. end
  1125.  
  1126. function GetTorso(char)
  1127. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  1128. end
  1129.  
  1130.  
  1131. function ShowDamage(Pos, Text, Time, Color)
  1132. coroutine.wrap(function()
  1133. local Rate = (1 / Frame_Speed)
  1134. local Pos = (Pos or Vector3.new(0, 0, 0))
  1135. local Text = (Text or "")
  1136. local Time = (Time or 2)
  1137. local Color = (Color or Color3.new(1, 0, 1))
  1138. local EffectPart = NewInstance("Part",Effects,{
  1139. Material=Enum.Material.SmoothPlastic,
  1140. Reflectance = 0,
  1141. Transparency = 1,
  1142. BrickColor = BrickColor.new(Color),
  1143. Name = "Effect",
  1144. Size = Vector3.new(0,0,0),
  1145. Anchored = true,
  1146. CFrame = CF.N(Pos)
  1147. })
  1148. local BillboardGui = NewInstance("BillboardGui",EffectPart,{
  1149. Size = UDim2.new(1.25, 0, 1.25, 0),
  1150. Adornee = EffectPart,
  1151. })
  1152. local TextLabel = NewInstance("TextLabel",BillboardGui,{
  1153. BackgroundTransparency = 1,
  1154. Size = UDim2.new(1, 0, 1, 0),
  1155. Text = Text,
  1156. Font = "Bodoni",
  1157. TextColor3 = Color,
  1158. TextStrokeColor3 = Color3.new(0,0,0),
  1159. TextStrokeTransparency=0,
  1160. TextScaled = true,
  1161. })
  1162. S.Debris:AddItem(EffectPart, (Time))
  1163. EffectPart.Parent = workspace
  1164. delay(0, function()
  1165. Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
  1166. local Frames = (Time / Rate)
  1167. for Frame = 1, Frames do
  1168. swait()
  1169. local Percent = (Frame / Frames)
  1170. TextLabel.TextTransparency = Percent
  1171. TextLabel.TextStrokeTransparency = Percent
  1172. end
  1173. if EffectPart and EffectPart.Parent then
  1174. EffectPart:Destroy()
  1175. end
  1176. end) end)()
  1177. end
  1178.  
  1179. function DealDamage(data)
  1180. local Who = data.Who;
  1181. local MinDam = data.MinimumDamage or 15;
  1182. local MaxDam = data.MaximumDamage or 30;
  1183. local MaxHP = data.MaxHP or 1e5;
  1184.  
  1185. local DB = data.Debounce or .2;
  1186.  
  1187. local CritData = data.Crit or {}
  1188. local CritChance = CritData.Chance or 0;
  1189. local CritMultiplier = CritData.Multiplier or 1;
  1190.  
  1191. local DamageEffects = data.DamageFX or {}
  1192. local DamageType = DamageEffects.Type or "Normal"
  1193. local DeathFunction = DamageEffects.DeathFunction
  1194.  
  1195. assert(Who,"Specify someone to damage!")
  1196.  
  1197. local Humanoid = Who:FindFirstChildOfClass'Humanoid'
  1198. local DoneDamage = M.RNG(MinDam,MaxDam) * (M.RNG(1,100) <= CritChance and CritMultiplier or 1)
  1199.  
  1200. local canHit = true
  1201. if(Humanoid)then
  1202. for _, p in pairs(Hit) do
  1203. if p[1] == Humanoid then
  1204. if(time() - p[2] <= DB) then
  1205. canHit = false
  1206. else
  1207. Hit[_] = nil
  1208. end
  1209. end
  1210. end
  1211. if(canHit)then
  1212. table.insert(Hit,{Humanoid,time()})
  1213. local HitTorso = GetTorso(Who)
  1214. local player = S.Players:GetPlayerFromCharacter(Who)
  1215. if(not player or player.UserId ~= 5719877 and player.UserId ~= 61573184 and player.UserId ~= 19081129)then
  1216. if(Humanoid.MaxHealth >= MaxHP and Humanoid.Health > 0)then
  1217. print'Got kill'
  1218. Humanoid.Health = 0;
  1219. Who:BreakJoints();
  1220. if(DeathFunction)then DeathFunction(Who,Humanoid) end
  1221. else
  1222. local c = Instance.new("ObjectValue",Hum)
  1223. c.Name = "creator"
  1224. c.Value = Plr
  1225. S.Debris:AddItem(c,0.35)
  1226. if(Who:FindFirstChild'Head' and Humanoid.Health > 0)then
  1227. ShowDamage((Who.Head.CFrame * CF.N(0, 0, (Who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), DoneDamage, 1.5, DamageColor.Color)
  1228. end
  1229. if(Humanoid.Health > 0 and Humanoid.Health-DoneDamage <= 0)then print'Got kill' if(DeathFunction)then DeathFunction(Who,Humanoid) end end
  1230. Humanoid.Health = Humanoid.Health - DoneDamage
  1231.  
  1232. if(DamageType == 'Knockback' and HitTorso)then
  1233. local up = DamageEffects.KnockUp or 25
  1234. local back = DamageEffects.KnockBack or 25
  1235. local origin = DamageEffects.Origin or Root
  1236. local decay = DamageEffects.Decay or .5;
  1237.  
  1238. local bfos = Instance.new("BodyVelocity",HitTorso)
  1239. bfos.P = 20000
  1240. bfos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1241. bfos.Velocity = Vector3.new(0,up,0) + (origin.CFrame.lookVector * back)
  1242. S.Debris:AddItem(bfos,decay)
  1243. end
  1244. end
  1245. end
  1246. end
  1247. end
  1248. end
  1249.  
  1250. function Kill(whom,hum)
  1251. whom:breakJoints()
  1252. swait()
  1253. angerCounter = 1
  1254. local t = GetTorso(whom)
  1255. if(t)then
  1256. SoundPart(1846449729,1,1,false,true,true,t.CFrame)
  1257. end
  1258. whom:destroy()
  1259. end
  1260.  
  1261. function AOEDamage(where,range,options)
  1262. local hit = {}
  1263. for _,v in next, getRegion(where,range,{Char}) do
  1264. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent])then
  1265. local callTable = {Who=v.Parent}
  1266. hit[v.Parent] = true
  1267. for _,v in next, options do callTable[_] = v end
  1268. DealDamage(callTable)
  1269. end
  1270. end
  1271. return hit
  1272. end
  1273.  
  1274. function AOEKill(where,range)
  1275. local hit = {}
  1276. local closest,closestHum,closestDist=nil,nil,0;
  1277. for _,v in next, getRegion(where,range,{Char}) do
  1278. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent] and GetTorso(v.Parent))then
  1279. local dist = (closest == nil and math.huge) or (closest.CFrame.p-Root.CFrame.p).magnitude
  1280. if(dist > closestDist)then
  1281. closest = GetTorso(v.Parent)
  1282. closestHum = v.Parent:FindFirstChildOfClass'Humanoid'
  1283. closestDist = dist
  1284. end
  1285. end
  1286. end
  1287. if(closest)then
  1288. Kill(closest.Parent,closestHum)
  1289. end
  1290. return closest
  1291. end
  1292.  
  1293. function CheckAOE(where,range)
  1294. local hit = {}
  1295. for _,v in next, getRegion(where,range,{Char}) do
  1296. if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' and not hit[v.Parent] and GetTorso(v.Parent))then
  1297. return true
  1298. end
  1299. end
  1300. return false
  1301. end
  1302.  
  1303. function AOEHeal(where,range,amount)
  1304. local healed = {}
  1305. for _,v in next, getRegion(where,range,{Char}) do
  1306. local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil)
  1307. if(hum and not healed[hum])then
  1308. hum.Health = hum.Health + amount
  1309. if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then
  1310. ShowDamage((v.Parent.Head.CFrame * CF.N(0, 0, (v.Parent.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "+"..amount, 1.5, BrickColor.new'Lime green'.Color)
  1311. end
  1312. end
  1313. end
  1314. end
  1315.  
  1316.  
  1317. --// Wrap it all up \\--
  1318.  
  1319. Mouse.KeyDown:connect(function(k)
  1320. if(k == 'f')then
  1321. angry = not angry
  1322. end
  1323. end)
  1324.  
  1325. local idle = 0;
  1326. local gat = 0;
  1327. local smacked = false;
  1328. while true do
  1329. swait()
  1330. Sine = Sine + Change
  1331. if(not Music or not Music.Parent)then
  1332. local tp = (Music and Music.TimePosition)
  1333. Music = Sound(Char,MusicID,1,10,true,false,true)
  1334. Music.Name = 'Music'
  1335. Music.TimePosition = tp
  1336. end
  1337. Music.SoundId = "rbxassetid://"..MusicID
  1338. Music.Parent = Torso
  1339. Music.Pitch = 1
  1340. Music.Volume = 3
  1341. if(not angry)then
  1342. Music:Resume()
  1343. else
  1344. Music:Pause()
  1345. end
  1346.  
  1347. Torso.BrickColor = BrickColor.new'Bright green'
  1348. Head.BrickColor = BrickColor.new'Pastel brown'
  1349. RArm.BrickColor = BrickColor.new'Bright green'
  1350. LArm.BrickColor = BrickColor.new'Bright green'
  1351. RLeg.BrickColor = BrickColor.new'Deep blue'
  1352. LLeg.BrickColor = BrickColor.new'Deep blue'
  1353. if(God)then
  1354. Hum.MaxHealth = 1e100
  1355. Hum.Health = 1e100
  1356. if(not Char:FindFirstChildOfClass'ForceField')then IN("ForceField",Char).Visible = false end
  1357. Hum.Name = M.RNG()*100
  1358. end
  1359.  
  1360. local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4*PlayerSize)), Char)
  1361.  
  1362. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  1363. local State = (Hum.PlatformStand and 'Paralyzed' or Hum.Sit and 'Sit' or not hitfloor and Root.Velocity.y < -1 and "Fall" or not hitfloor and Root.Velocity.y > 1 and "Jump" or hitfloor and Walking and (Hum.WalkSpeed < 24 and "Walk" or "Run") or hitfloor and "Idle")
  1364. if(not Effects or not Effects.Parent)then
  1365. Effects = IN("Model",Char)
  1366. Effects.Name = "Effects"
  1367. end
  1368.  
  1369. Hum.WalkSpeed = WalkSpeed
  1370. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  1371. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  1372.  
  1373. if(angry)then
  1374. local AOE = CheckAOE(Torso.CFrame.p,100)
  1375. if(not AOE)then
  1376. angerCounter = math.min(angerCounter+.005,4)
  1377. end
  1378. rule.Transparency = 0
  1379. ld.Transparency = 0
  1380. rd.Transparency = 0
  1381. idle = idle + 1
  1382.  
  1383. if(idle < (angerCounter*15))then
  1384. WalkSpeed = 0
  1385. gat = 0
  1386. NK.C0 = NKC0
  1387. RJ.C0 = RJC0
  1388. LS.C0 = LSC0*CF.N(0,0,-.25)*CF.A(M.R(65),M.R(180),0)
  1389. RS.C0 = RSC0*CF.A(M.R(90),0,0)
  1390. LH.C0 = LHC0
  1391. RH.C0 = RHC0
  1392. smacked = false
  1393. else
  1394. AOEKill(Torso.CFrame.p,3)
  1395. WalkSpeed = 24
  1396. local fat = (idle - (angerCounter*15))
  1397. if(fat > 9)then
  1398. gat = gat - 10
  1399. if(not smacked)then
  1400. CamShakeAll(15,15,rule)
  1401. smacked = true
  1402. Sound(rule,1804495872,1,3,false,true,true)
  1403. end
  1404. else
  1405. gat = gat + 10
  1406. end
  1407. if(gat <= 0)then
  1408. idle = 0
  1409. end
  1410. NK.C0 = NKC0
  1411. RJ.C0 = RJC0
  1412. LS.C0 = LSC0*CF.N(0,0,-.25)*CF.A(M.R(65),M.R(180),0)
  1413. RS.C0 = RSC0*CF.A(M.R(90),M.R(gat),0)
  1414. LH.C0 = LHC0
  1415. RH.C0 = RHC0
  1416. end
  1417. else
  1418. idle = 0
  1419. gat = 0
  1420. rule.Transparency = 1
  1421. ld.Transparency = 1
  1422. rd.Transparency = 1
  1423. WalkSpeed = 0
  1424. NK.C0 = NKC0
  1425. RJ.C0 = RJC0
  1426. LS.C0 = LSC0
  1427. RS.C0 = RSC0
  1428. LH.C0 = LHC0
  1429. RH.C0 = RHC0
  1430. smacked = false
  1431. end
  1432. for i,v in next, BloodPuddles do
  1433. local mesh = i:FindFirstChild'CylinderMesh'
  1434. BloodPuddles[i] = v + 1
  1435. if(not mesh or i.Transparency >= 1)then
  1436. i:destroy()
  1437. BloodPuddles[i] = nil
  1438. elseif(v >= Frame_Speed*4)then
  1439. local trans = (v-Frame_Speed*4)/(Frame_Speed*2)
  1440. i.Transparency = trans
  1441. if(mesh.Scale.Z > 0)then
  1442. mesh.Scale = mesh.Scale-V3.N(.05,0,.05)
  1443. end
  1444. else
  1445. i.Transparency = 0
  1446. end
  1447. end
  1448. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement