Advertisement
Guest User

Untitled

a guest
Apr 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.18 KB | None | 0 0
  1. --[[Floaty thing by SezHu.
  2.  
  3. If you want a creation like this of your own, shoot me a friend request me on Discord! (Sezzie
  4. #1875) Prices start at 250 robux.]]--
  5.  
  6.  
  7. local songs = {
  8. 653700917, --Look at me
  9. 612651810, --Tunnel Vision
  10. 1007872698, --Jocelyn Flores
  11. 1556986796, --Walk It Like I Talk It
  12. 1247838858, --Rockstar Remix
  13. 1253276416,
  14. 1517300230, --SAD!
  15. 1444000856, -- Hope
  16. 1111147012, --Nights Alone
  17. } --Add your songs by replacing the IDs with your song ID.
  18.  
  19.  
  20. local quotes = {
  21. "Something to relax to..",
  22. "Yawn..",
  23. "Just floatin'~",
  24. "Going up~",
  25. "I like this song..",
  26. "Time to kick back..",
  27. "^w^",
  28. } --Feel free to replace the quotes with stuff of your own.
  29.  
  30.  
  31. local function soundbork(obj)
  32. if obj:IsA("Sound") and obj.Name ~= "playlist" then
  33. --obj:Destroy() Remove the two dashes to silence all music but your own.
  34. return
  35. end
  36.  
  37.  
  38. local children = obj:GetChildren()
  39. for i = 1, #children do
  40. soundbork(children[i])
  41. end
  42.  
  43. return
  44. end
  45.  
  46. --//Constants\\--
  47.  
  48. Effects = { }
  49. local Player = game.Players.localPlayer
  50. local Mouse = Player:GetMouse()
  51. local Character = Player.Character
  52. local Humanoid = Character.Humanoid
  53. local Head = Character.Head
  54. local RootPart = Character.HumanoidRootPart
  55. local Torso = Character.Torso
  56. local LeftArm = Character["Left Arm"]
  57. local RightArm = Character["Right Arm"]
  58. local LeftLeg = Character["Left Leg"]
  59. local RightLeg = Character["Right Leg"]
  60. local Camera = game.Workspace.CurrentCamera
  61. local RootJoint = RootPart.RootJoint
  62. local Equipped = false
  63. local Attack = false
  64. local Anim = 'Idle'
  65. local Idle = 0
  66. local Combo = 1
  67. local TorsoVelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  68. local Velocity = RootPart.Velocity.y
  69. local Sine = 0
  70. local Change = 1
  71. local aoeconstant = 10
  72. local maincol = "Pink"
  73. local maincol2 = "White"
  74. local randString = songs[math.random(#songs)]
  75. local circleinthesky = false
  76. Character.Humanoid.Name = "help"
  77. humanoid = Character.help
  78. Instance.new("ForceField",Character).Visible = false
  79.  
  80.  
  81.  
  82.  
  83.  
  84. local RbxUtility = LoadLibrary("RbxUtility")
  85. local Create = RbxUtility.Create
  86.  
  87. humanoid.WalkSpeed = 3
  88. humanoid.JumpPower = 0
  89. humanoid.Animator.Parent = nil
  90. Character.Animate.Parent = nil
  91.  
  92. local newMotor = function(part0, part1, c0, c1)
  93. local w = Create('Motor'){
  94. Parent = part0,
  95. Part0 = part0,
  96. Part1 = part1,
  97. C0 = c0,
  98. C1 = c1,
  99. }
  100. return w
  101. end
  102.  
  103.  
  104. skillcolorscheme = BrickColor.new(maincol).Color
  105.  
  106. local hue = 0
  107.  
  108. spawn(function()
  109. while true do
  110. hue = hue + .0005
  111. if hue >= 1 then hue = 0 end
  112. maincol2 = Color3.fromHSV(hue,1,1)
  113. game["Run Service"].RenderStepped:wait()
  114. end
  115. end)
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122. local scrn = Instance.new('ScreenGui', Player.PlayerGui)
  123. function makeframe(par, trans, pos, size, color)
  124. local frame = Instance.new('Frame', par)
  125. frame.BackgroundTransparency = trans
  126. frame.BorderSizePixel = 0
  127. frame.Position = pos
  128. frame.Size = size
  129. frame.BackgroundColor3 = color
  130. return frame
  131. end
  132.  
  133. --framesk1 = makeframe(scrn, .95, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme)
  134.  
  135. function clerp(a, b, t)
  136. return a:lerp(b, t)
  137. end
  138.  
  139. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  140. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  141.  
  142. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  143. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  144. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  145. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  146. RootJoint.C1 = CFrame.new(0, 0, 0)
  147. RootJoint.C0 = CFrame.new(0, 0, 0)
  148. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  149. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  150.  
  151. local rarmc1 = RW.C1
  152. local larmc1 = LW.C1
  153. local rlegc1 = RH.C1
  154. local llegc1 = LH.C1
  155.  
  156. local resetc1 = false
  157.  
  158. function PlayAnimationFromTable(table, speed, bool)
  159. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  160. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  161. RW.C0 = clerp(RW.C0, table[3], speed)
  162. LW.C0 = clerp(LW.C0, table[4], speed)
  163. RH.C0 = clerp(RH.C0, table[5], speed)
  164. LH.C0 = clerp(LH.C0, table[6], speed)
  165. if bool == true then
  166. if resetc1 == false then
  167. resetc1 = true
  168. RootJoint.C1 = RootJoint.C1
  169. Torso.Neck.C1 = Torso.Neck.C1
  170. RW.C1 = rarmc1
  171. LW.C1 = larmc1
  172. RH.C1 = rlegc1
  173. LH.C1 = llegc1
  174. end
  175. end
  176. end
  177.  
  178. ArtificialHB = Create("BindableEvent"){
  179. Parent = script,
  180. Name = "Heartbeat",
  181. }
  182.  
  183. script:WaitForChild("Heartbeat")
  184.  
  185. frame = 1 / 35
  186. tf = 0
  187. allowframeloss = false
  188. tossremainder = false
  189. lastframe = tick()
  190. script.Heartbeat:Fire()
  191.  
  192. game:GetService("RunService").Heartbeat:connect(function(s, p)
  193. tf = tf + s
  194. if tf >= frame then
  195. if allowframeloss then
  196. script.Heartbeat:Fire()
  197. lastframe = tick()
  198. else
  199. for i = 1, math.floor(tf / frame) do
  200. script.Heartbeat:Fire()
  201. end
  202. lastframe = tick()
  203. end
  204. if tossremainder then
  205. tf = 0
  206. else
  207. tf = tf - frame * math.floor(tf / frame)
  208. end
  209. end
  210. end)
  211.  
  212. function swait(num)
  213. if num == 0 or num == nil then
  214. ArtificialHB.Event:wait()
  215. else
  216. for i = 0, num do
  217. ArtificialHB.Event:wait()
  218. end
  219. end
  220. end
  221.  
  222.  
  223.  
  224. local m = Create("Model"){
  225. Parent = Character,
  226. Name = "WeaponModel"
  227. }
  228.  
  229. function RemoveOutlines(part)
  230. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  231. end
  232.  
  233. CFuncs = {
  234. Part = {
  235. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  236. local Part = Create("Part"){
  237. Parent = Parent,
  238. Reflectance = Reflectance,
  239. Transparency = Transparency,
  240. CanCollide = false,
  241. Locked = true,
  242. BrickColor = BrickColor.new(tostring(BColor)),
  243. Name = Name,
  244. Size = Size,
  245. Material = Material,
  246. }
  247. RemoveOutlines(Part)
  248. if Size == Vector3.new() then
  249. Part.Size = Vector3.new(0.2, 0.2, 0.2)
  250. else
  251. Part.Size = Size
  252. end
  253. return Part
  254. end;
  255. };
  256.  
  257. Mesh = {
  258. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  259. local Msh = Create(Mesh){
  260. Parent = Part,
  261. Offset = OffSet,
  262. Scale = Scale,
  263. }
  264. if Mesh == "SpecialMesh" then
  265. Msh.MeshType = MeshType
  266. Msh.MeshId = MeshId
  267. end
  268. return Msh
  269. end;
  270. };
  271.  
  272. Weld = {
  273. Create = function(Parent, Part0, Part1, C0, C1)
  274. local Weld = Create("Weld"){
  275. Parent = Parent,
  276. Part0 = Part0,
  277. Part1 = Part1,
  278. C0 = C0,
  279. C1 = C1,
  280. }
  281. return Weld
  282. end;
  283. };
  284.  
  285. Sound = {
  286. Create = function(id, par, vol, pit, looped)
  287. coroutine.resume(coroutine.create(function()
  288. local S = Create("Sound"){
  289. Volume = vol,
  290. Pitch = pit or 1,
  291. SoundId = "rbxassetid://" .. id,
  292. Parent = par or workspace,
  293. Looped = looped
  294. }
  295. wait()
  296. S:play()
  297. end))
  298. end;
  299. };
  300.  
  301. ParticleEmitter = {
  302. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  303. local Particle = Create("ParticleEmitter"){
  304. Parent = Parent,
  305. Color = ColorSequence.new(Color1, Color2),
  306. LightEmission = LightEmission,
  307. Size = Size,
  308. Texture = Texture,
  309. Transparency = Transparency,
  310. ZOffset = ZOffset,
  311. Acceleration = Accel,
  312. Drag = Drag,
  313. LockedToPart = LockedToPart,
  314. VelocityInheritance = VelocityInheritance,
  315. EmissionDirection = EmissionDirection,
  316. Enabled = Enabled,
  317. Lifetime = LifeTime,
  318. Rate = Rate,
  319. Rotation = Rotation,
  320. RotSpeed = RotSpeed,
  321. Speed = Speed,
  322. VelocitySpread = VelocitySpread,
  323. }
  324. return Particle
  325. end;
  326. };
  327.  
  328. CreateTemplate = {
  329.  
  330. };
  331. }
  332.  
  333. --/v/Don't touch this part. \v\--
  334.  
  335. playlist=Instance.new("Sound", Torso)
  336. playlist.SoundId = "rbxassetid://" ..randString
  337. playlist.Volume = 5
  338. playlist.Looped = false
  339. playlist.Name = "playlist"
  340. playlist:Play()
  341.  
  342. --/^/Don't touch this part. \^\--
  343.  
  344. function RayCast(Position, Direction, Range, Ignore)
  345. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  346. end
  347.  
  348. FindNearestTorso = function(pos)
  349. local list = (game.Workspace:children())
  350. local torso = nil
  351. local dist = 1000
  352. local temp, human, temp2 = nil, nil, nil
  353. for x = 1, #list do
  354. temp2 = list[x]
  355. if temp2.className == "Model" and temp2.Name ~= Character.Name then
  356. temp = temp2:findFirstChild("Torso")
  357. human = temp2:findFirstChild("Humanoid")
  358. if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
  359. local dohit = true
  360. if dohit == true then
  361. torso = temp
  362. dist = (temp.Position - pos).magnitude
  363. end
  364. end
  365. end
  366. end
  367. return torso, dist
  368. end
  369.  
  370. RootPart.CFrame = RootPart.CFrame * CFrame.new(0,5,0)
  371.  
  372. Harness=CFuncs.Part.Create(m,Enum.Material.Plastic,0,1,"Medium stone grey","Harness",Vector3.new(0.420000285, 0.490000188, 0.399999768))
  373. HarnessWeld=CFuncs.Weld.Create(m,Character["Torso"],Harness,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0500001907, -0.0350001119, -0.0871353149, -1, 0, 0, 0, 1, 0, 0, 0, -1))
  374. FloatField2=CFuncs.Part.Create(m,Enum.Material.Neon,0,.5,"Lily white","FloatField2",Vector3.new(5, 8, 5))
  375. FloatField2Weld=CFuncs.Weld.Create(m,Harness,FloatField2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(6.58035278e-05, 3.50000337e-05, 6.10351563e-05, -1, 0, 0, 0, 1, 0, 0, 0, -1))
  376. flotemesh=CFuncs.Mesh.Create("SpecialMesh",FloatField2,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  377. spinny=CFuncs.Part.Create(Torso, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "spinny", Vector3.new())
  378. spinny.Anchored=true
  379. spinny.CanCollide=false
  380.  
  381.  
  382. transp = .5
  383. spawn(function()
  384. while true do
  385. transp = transp + .001
  386. FloatField2.Transparency = transp
  387. swait()
  388. if transp >= 1 then
  389. transp = .5
  390. end
  391. end
  392. end)
  393.  
  394.  
  395.  
  396. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  397. if hit.Parent == nil then
  398. return
  399. end
  400. local h = hit.Parent:FindFirstChild("Humanoid")
  401. for _, v in pairs(hit.Parent:chi…
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement