Advertisement
Christoffer07700Extr

Steven Universe FE

Jun 18th, 2019
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.10 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")
  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. self._btrs[name] = self.Heartbeat:Connect(fun)
  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.  
  145. -- NOTE (READ!!): This script doesn't work on voidacity's script builder
  146. -- since it crashes your game, but it's usable on other
  147. -- script builders like fancy dev's or nexure's.
  148. -- (it just doesn't work on voidacity only)
  149.  
  150. --[[
  151.  
  152. --Made by Zalgo_exe/EXE/Zalgo--
  153. wait(0.2)
  154. local Player, Character, Mouse = game:service("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character, game:GetService("Players").LocalPlayer:GetMouse();
  155. local Torso = Character:FindFirstChild("Torso")
  156. local rootPart = Character:FindFirstChild("HumanoidRootPart")
  157. local Humanoid = Character:FindFirstChild("Humanoid")
  158. local Head = Character:FindFirstChild("Head")
  159. local Right_Arm = Character:FindFirstChild("Right Arm")
  160. local Left_Arm = Character:FindFirstChild("Left Arm")
  161. local Right_Leg = Character:FindFirstChild("Right Leg")
  162. local Left_Leg = Character:FindFirstChild("Left Leg")
  163. local Right_Shoulder = Torso:FindFirstChild("Right Shoulder")
  164. local Left_Shoulder = Torso:FindFirstChild("Left Shoulder")
  165. local Right_Hip = Torso:FindFirstChild("Right Hip")
  166. local Left_Hip = Torso:FindFirstChild("Left Hip")
  167. local Neck = Torso:FindFirstChild("Neck")
  168. local rootPart = Character:FindFirstChild("HumanoidRootPart")
  169. local rootJoint = rootPart:FindFirstChild("RootJoint")
  170. local CurrentIdle = "Idling1"
  171. local Degree = 0.0175438596491228
  172. local canremove = false
  173. local debounce = false
  174. local UIService=game:GetService'UserInputService'
  175. _G.SongName = math.random(1,9025232)
  176. sin = math.sin
  177. Right_Leg.FormFactor = "Custom";
  178. Left_Leg.FormFactor = "Custom";
  179. rootPart.Archivable = true;
  180. rootJoint.Archivable = true;
  181. c_new = CFrame.new;
  182. c_angles = CFrame.Angles;
  183. i_new = Instance.new
  184. Humanoid:ClearAllChildren();
  185. local isAttacking = false
  186. local isSprinting = false
  187. local Animations = false
  188. local Angle = 0
  189. local Axis = 0
  190. local angleSpeed = 1
  191. local axisSpeed = angleSpeed
  192. local currentAnim
  193. local levetatingheight = 3
  194. local WalkType = "Ground"
  195.  
  196. function Sound(parent,loop,vol,id)
  197. local s = Instance.new('Sound',parent)
  198. s.Looped = loop
  199. s.Volume = vol
  200. s.MaxDistance=200
  201. s.EmitterSize=20
  202. s.SoundId = 'rbxassetid://'..tostring(id)
  203. s:Play()
  204. if loop == false then
  205. wait(s.TimeLength)
  206. s:Destroy()
  207. end
  208. end
  209.  
  210. Sound(rootPart,true,10,1549917765)
  211.  
  212. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  213. wld = Instance.new("Weld", wp1)
  214. wld.Part0 = wp0
  215. wld.Part1 = wp1
  216. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  217. return wld
  218. end
  219.  
  220. function noOutline(part)
  221. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  222. end
  223.  
  224. local function Part(Name,Color, Material, Transparency,Shape, Size, CFrame,CanCollide,Anchored,parent)
  225. local partie = i_new("Part",parent)
  226. partie.Name=Name
  227. partie.BrickColor = BrickColor.new(Color)
  228. partie.Material = Material
  229. partie.Shape = Shape
  230. partie.Transparency = Transparency
  231. partie.Size = Size
  232. partie.CFrame = CFrame
  233. partie.CanCollide = CanCollide
  234. partie.Anchored = Anchored
  235. return partie
  236. end
  237.  
  238.  
  239.  
  240. function swait(num)
  241. if num == 0 or num == nil then
  242. game:GetService("RunService").Stepped:wait(0)
  243. else
  244. for i = 0, num do
  245. game:GetService("RunService").Stepped:wait(0)
  246. end
  247. end
  248. end
  249.  
  250. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  251. local mesh = i_new(Mesh)
  252. mesh.Parent = part
  253. if Mesh == "SpecialMesh" then
  254. mesh.MeshType = meshtype
  255. mesh.MeshId = meshid
  256. end
  257. mesh.Offset = offset
  258. mesh.Scale = scale
  259. return mesh
  260. end
  261. mouse = Player:GetMouse()
  262.  
  263. function findCloseHumanoid(centre, distance)
  264. local tab = {}
  265. for _, child in pairs(game.Workspace:GetChildren()) do
  266. if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= Humanoid and child:findFirstChild("Torso") then
  267. local vtors = child.Torso
  268. local mag = math.abs((vtors.Position - centre).magnitude)
  269. if distance >= mag then
  270. table.insert(tab, child.Humanoid)
  271. end
  272. end
  273. end
  274. return tab
  275. end
  276.  
  277. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position, Direction, MaxDistance, IgnoreDescendants
  278. return game:GetService("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  279. end
  280.  
  281. function QuaternionFromCFrame(cf)
  282. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  283. local trace = m00 + m11 + m22
  284. if trace > 0 then
  285. local s = math.sqrt(1 + trace)
  286. local recip = 0.5/s
  287. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  288. else
  289. local i = 0
  290. if m11 > m00 then
  291. i = 1
  292. end
  293. if m22 > (i == 0 and m00 or m11) then
  294. i = 2
  295. end
  296. if i == 0 then
  297. local s = math.sqrt(m00-m11-m22+1)
  298. local recip = 0.5/s
  299. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  300. elseif i == 1 then
  301. local s = math.sqrt(m11-m22-m00+1)
  302. local recip = 0.5/s
  303. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  304. elseif i == 2 then
  305. local s = math.sqrt(m22-m00-m11+1)
  306. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  307. end
  308. end
  309. end
  310.  
  311. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  312. local xs, ys, zs = x + x, y + y, z + z
  313. local wx, wy, wz = w*xs, w*ys, w*zs
  314. local xx = x*xs
  315. local xy = x*ys
  316. local xz = x*zs
  317. local yy = y*ys
  318. local yz = y*zs
  319. local zz = z*zs
  320. 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))
  321. end
  322.  
  323. function QuaternionSlerp(a, b, t)
  324. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  325. local startInterp, finishInterp;
  326. if cosTheta >= 0.0001 then
  327. if (1 - cosTheta) > 0.0001 then
  328. local theta = math.acos(cosTheta)
  329. local invSinTheta = 1/math.sin(theta)
  330. startInterp = math.sin((1-t)*theta)*invSinTheta
  331. finishInterp = math.sin(t*theta)*invSinTheta
  332. else
  333. startInterp = 1-t
  334. finishInterp = t
  335. end
  336. else
  337. if (1+cosTheta) > 0.0001 then
  338. local theta = math.acos(-cosTheta)
  339. local invSinTheta = 1/math.sin(theta)
  340. startInterp = math.sin((t-1)*theta)*invSinTheta
  341. finishInterp = math.sin(t*theta)*invSinTheta
  342. else
  343. startInterp = t-1
  344. finishInterp = t
  345. end
  346. end
  347. 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
  348. end
  349.  
  350. function clerp(a, b, t)
  351. local qa = {QuaternionFromCFrame(a)}
  352. local qb = {QuaternionFromCFrame(b)}
  353. local ax, ay, az = a.x, a.y, a.z
  354. local bx, by, bz = b.x, b.y, b.z
  355. local _t = 1-t
  356. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  357. end
  358.  
  359. swait()
  360. LA_Weld = newWeld(Torso, Left_Arm, -1.5, 0.5, 0)
  361. Left_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
  362. RA_Weld = newWeld(Torso, Right_Arm, 1.5, 0.5, 0)
  363. Right_Arm.Weld.C1 = CFrame.new(0, 0.5, 0)
  364. LL_Weld = newWeld(Torso, Left_Leg, -0.5, -1, 0)
  365. Left_Leg.Weld.C1 = CFrame.new(0, 1, 0) -- Left_Leg.Weld.C1 = CFrame.new(0, 1, 0.15)
  366. RL_Weld = newWeld(Torso, Right_Leg, 0.5, -1, 0)
  367. Right_Leg.Weld.C1 = CFrame.new(0, 1, 0) -- Right_Leg.Weld.C1 = CFrame.new(0, 1, 0.15)
  368. Torso_Weld = newWeld(rootPart, Torso, 0, -1, 0)
  369. Torso.Weld.C1 = CFrame.new(0, -1, 0)
  370. Head_Weld = newWeld(Torso, Head, 0, 1.5, 0)
  371.  
  372. for i,v in pairs(Character:GetChildren()) do
  373. if v:IsA('Accoutrement') or v:IsA('Shirt') or v:IsA('Pants') or v:IsA("CharacterMesh") then
  374. v:Destroy()
  375. elseif v:IsA('Part') and v.Name=='Head' then
  376. v.face.Texture = "rbxassetid://426704543"
  377. end
  378. end
  379.  
  380. Shirt = Instance.new("Part",Character)
  381. Shirt.CanCollide = false
  382. Shirt.BrickColor = BrickColor.new("Persimmon")
  383. Shirt.Material = "SmoothPlastic"
  384. Shirt.Size = Vector3.new(2.1,2.02,1.03)
  385. Shirt.TopSurface = Enum.SurfaceType.Smooth
  386. Shirt.BottomSurface = Enum.SurfaceType.Smooth
  387. local ShirtWeld = Instance.new("Weld", Shirt)
  388. ShirtWeld.Part0 = Torso
  389. ShirtWeld.Part1 = Shirt
  390. ShirtWeld.C1 = CFrame.new(0,0,0)
  391.  
  392. Star = Instance.new("Part",Character)
  393. Star.CanCollide = false
  394. Star.Transparency = 1
  395. Star.Size = Vector3.new(2.1,2.1,0)
  396. Star.TopSurface = Enum.SurfaceType.Smooth
  397. Star.BottomSurface = Enum.SurfaceType.Smooth
  398. local StarWeld = Instance.new("Weld", Star)
  399. StarWeld.Part0 = Torso
  400. StarWeld.Part1 = Star
  401. StarWeld.C1 = CFrame.new(0,-0.15,0.53)
  402. Decal = Instance.new("Decal",Star)
  403. Decal.Texture = "rbxassetid://426707982"
  404. Decal.Face = "Front"
  405.  
  406. BackShirt = Instance.new("Part",Character)
  407. BackShirt.CanCollide = false
  408. BackShirt.BrickColor = BrickColor.new("Persimmon")
  409. BackShirt.Size = Vector3.new(2.1,1.1,0.5)
  410. BackShirt.TopSurface = Enum.SurfaceType.Smooth
  411. BackShirt.BottomSurface = Enum.SurfaceType.Smooth
  412. BackShirt.Transparency = 1
  413. BackShirt.Material = "SmoothPlastic"
  414. local BackShirtWeld = Instance.new("Weld", BackShirt)
  415. BackShirtWeld.Part0 = Torso
  416. BackShirtWeld.Part1 = BackShirt
  417. BackShirtWeld.C1 = CFrame.new(0,0.1,-0.265)
  418.  
  419. RolledUpShirt = Instance.new("Part",Character)
  420. RolledUpShirt.CanCollide = false
  421. RolledUpShirt.BrickColor = BrickColor.new("Salmon")
  422. RolledUpShirt.Size = Vector3.new(2.15,0.2,1)
  423. RolledUpShirt.TopSurface = Enum.SurfaceType.Smooth
  424. RolledUpShirt.BottomSurface = Enum.SurfaceType.Smooth
  425. RolledUpShirt.Transparency = 1
  426. RolledUpShirt.Material = "SmoothPlastic"
  427. local RolledUpShirtWeld = Instance.new("Weld", RolledUpShirt)
  428. RolledUpShirtWeld.Part0 = Torso
  429. RolledUpShirtWeld.Part1 = RolledUpShirt
  430. RolledUpShirtWeld.C1 = CFrame.new(0,0.4,-0.03)*CFrame.fromEulerAnglesXYZ(math.rad(-30),math.rad(0),math.rad(0))
  431.  
  432. Shirt2 = Instance.new("Part",Character)
  433. Shirt2.CanCollide = false
  434. Shirt2.BrickColor = BrickColor.new("Persimmon")
  435. Shirt2.Size = Vector3.new(2.1,0.5,0.8)
  436. Shirt2.TopSurface = Enum.SurfaceType.Smooth
  437. Shirt2.BottomSurface = Enum.SurfaceType.Smooth
  438. Shirt2.Transparency = 1
  439. Shirt2.Material = "SmoothPlastic"
  440. local Shirt2Weld = Instance.new("Weld", Shirt2)
  441. Shirt2Weld.Part0 = Torso
  442. Shirt2Weld.Part1 = Shirt2
  443. Shirt2Weld.C1 = CFrame.new(0,0.2,-0.05)*CFrame.fromEulerAnglesXYZ(math.rad(-30),math.rad(0),math.rad(0))
  444.  
  445. Sleeve1 = Instance.new("Part",Character)
  446. Sleeve1.CanCollide = false
  447. Sleeve1.BrickColor = BrickColor.new("Persimmon")
  448. Sleeve1.Size = Vector3.new(1.02,0.5,1.02)
  449. Sleeve1.TopSurface = Enum.SurfaceType.Smooth
  450. Sleeve1.BottomSurface = Enum.SurfaceType.Smooth
  451. Sleeve1.Material = "SmoothPlastic"
  452. local Sleeve1Weld = Instance.new("Weld", Sleeve1)
  453. Sleeve1Weld.Part0 = Right_Arm
  454. Sleeve1Weld.Part1 = Sleeve1
  455. Sleeve1Weld.C1 = CFrame.new(0,-0.76,0)
  456.  
  457. Sleeve2 = Instance.new("Part",Character)
  458. Sleeve2.CanCollide = false
  459. Sleeve2.BrickColor = BrickColor.new("Persimmon")
  460. Sleeve2.Size = Vector3.new(1.02,0.5,1.02)
  461. Sleeve2.TopSurface = Enum.SurfaceType.Smooth
  462. Sleeve2.BottomSurface = Enum.SurfaceType.Smooth
  463. Sleeve2.Material = "SmoothPlastic"
  464. local Sleeve2Weld = Instance.new("Weld", Sleeve2)
  465. Sleeve2Weld.Part0 = Left_Arm
  466. Sleeve2Weld.Part1 = Sleeve2
  467. Sleeve2Weld.C1 = CFrame.new(0,-0.76,0)
  468.  
  469. local Hair = Instance.new("Part",Head)
  470. Hair.Name = "Hair"
  471. Hair.Shape = Enum.PartType.Ball
  472. Hair.CanCollide = false
  473. Hair.BrickColor = BrickColor.new("Really black")
  474. Hair.Transparency = 0
  475. Hair.Material = "Grass"
  476. Hair.Size = Vector3.new(0.1, 0.1, 0.1)
  477. Hair.TopSurface = Enum.SurfaceType.Smooth
  478. Hair.BottomSurface = Enum.SurfaceType.Smooth local Weld = Instance.new("Weld", Hair)
  479. Weld.Part0 = Head
  480. Weld.Part1 = Hair
  481. Weld.C1 = CFrame.new(0,-0.5,0)
  482. HairMesh = Instance.new("FileMesh",Hair)
  483. HairMesh.MeshId = "http://www.roblox.com/asset/?id=31309506"
  484. HairMesh.TextureId = "rbxassetid://36482234"
  485. HairMesh.Scale = Vector3.new(1.03,1.05,1.03)
  486.  
  487. local Shield = Instance.new("Part",Torso)
  488. Shield.Name = "Shield"
  489. Shield.Shape = Enum.PartType.Ball
  490. Shield.BrickColor = BrickColor.new("Really black")
  491. Shield.Transparency = 1
  492. Shield.CanCollide = false
  493. Shield.Material = "Grass"
  494. Shield.Size = Vector3.new(5, 5, 5)
  495. Shield.TopSurface = Enum.SurfaceType.Smooth
  496. Shield.BottomSurface = Enum.SurfaceType.Smooth local ShieldWeld = Instance.new("Weld", Shield)
  497. ShieldWeld.Part0 = Torso
  498. ShieldWeld.Part1 = Shield
  499. ShieldWeld.C1 = CFrame.new(0,-0.5,0)
  500. ShieldMesh = Instance.new("FileMesh",Shield)
  501. ShieldMesh.MeshId = "http://www.roblox.com/asset/?id=397873198"
  502. ShieldMesh.TextureId = "rbxassetid://472409423"
  503. ShieldMesh.Scale = Vector3.new(2,2,2)
  504. ShieldMesh.Offset = Vector3.new(0,0,-2)
  505.  
  506. local BubbleShield = Instance.new("Part",Torso)
  507. BubbleShield.Name = "Shield"
  508. BubbleShield.Shape = Enum.PartType.Ball
  509. BubbleShield.BrickColor = BrickColor.new("Carnation pink")
  510. BubbleShield.Transparency = 1
  511. BubbleShield.CanCollide = false
  512. BubbleShield.Material = "Neon"
  513. BubbleShield.Size = Vector3.new(12, 12, 12)
  514. BubbleShield.TopSurface = Enum.SurfaceType.Smooth
  515. BubbleShield.BottomSurface = Enum.SurfaceType.Smooth
  516. local ShieldWeld = Instance.new("Weld", BubbleShield)
  517. ShieldWeld.Part0 = Torso
  518. ShieldWeld.Part1 = BubbleShield
  519. ShieldWeld.C1 = CFrame.new(0,-2.5,0)
  520.  
  521. local Gem = Instance.new("Part",Torso)
  522. Gem.Name = "Gem"
  523. Gem.Shape = Enum.PartType.Ball
  524. Gem.CanCollide = false
  525. Gem.BrickColor = BrickColor.new("Carnation pink")
  526. Gem.Transparency = 1
  527. Gem.Material = "DiamondPlate"
  528. Gem.Size = Vector3.new(0.1, 0.1, 0.1)
  529. Gem.TopSurface = Enum.SurfaceType.Smooth
  530. Gem.BottomSurface = Enum.SurfaceType.Smooth
  531. local GemWeld = Instance.new("Weld", Gem)
  532. GemWeld.Part0 = Torso
  533. GemWeld.Part1 = Gem
  534. GemWeld.C1 = CFrame.new(0,-0.3,0.5)*CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(0),math.rad(0))
  535. GemMesh = Instance.new("FileMesh",Gem)
  536. GemMesh.MeshId = "http://www.roblox.com/asset/?id=511706016"
  537. --GemMesh.TextureId = "http://www.roblox.com/asset/?id=74620702"
  538. GemMesh.Scale = Vector3.new(0.025,0.04,0.025)
  539.  
  540.  
  541. Pants = Instance.new("Pants",Character)
  542. Pants.PantsTemplate = "rbxassetid://234076241"
  543.  
  544. Character['Body Colors'].HeadColor=BrickColor.new("Pastel brown")
  545. Character['Body Colors'].TorsoColor=BrickColor.new("Pastel brown")
  546. Character['Body Colors'].RightArmColor=BrickColor.new("Pastel brown")
  547. Character['Body Colors'].LeftArmColor=BrickColor.new("Pastel brown")
  548. Character['Body Colors'].RightLegColor=BrickColor.new("Pastel brown")
  549. Character['Body Colors'].LeftLegColor=BrickColor.new("Pastel brown")
  550.  
  551. Humanoid.DisplayDistanceType='None'
  552. attack = false
  553. Shielding = false
  554. mouse.KeyDown:connect(function(key)
  555. if key == "f" and attack == false and Shielding == false then
  556. Shielding = true
  557. Shirt.Size = Vector3.new(2.1,1.1,1.03)
  558. Gem.Transparency = 0
  559. Shield.Transparency = 0
  560. Shield.CanCollide = true
  561. local ShirtWeld = Instance.new("Weld", Shirt)
  562. ShirtWeld.Part0 = Torso
  563. ShirtWeld.Part1 = Shirt
  564. ShirtWeld.C1 = CFrame.new(0,-0.46,0)
  565. RolledUpShirt.Transparency = 0
  566. BackShirt.Transparency = 0
  567. Shirt2.Transparency = 0
  568. end
  569. end)
  570.  
  571. mouse.KeyUp:connect(function(key)
  572. if key == "f" and attack == false then
  573. Shielding = false
  574. Shirt.Size = Vector3.new(2.1,2.02,1.03)
  575. Gem.Transparency = 1
  576. Shield.Transparency = 1
  577. Shield.CanCollide = false
  578. local ShirtWeld = Instance.new("Weld", Shirt)
  579. ShirtWeld.Part0 = Torso
  580. ShirtWeld.Part1 = Shirt
  581. ShirtWeld.C1 = CFrame.new(0,0,0)
  582. RolledUpShirt.Transparency = 1
  583. BackShirt.Transparency = 1
  584. Shirt2.Transparency = 1
  585. end
  586. end)
  587.  
  588. mouse.KeyDown:connect(function(key)
  589. if key == "r" and attack == false and Shielding == false then
  590. S = Instance.new("Sound")
  591. S.Parent = rootPart
  592. S.SoundId = "rbxassetid://282061274"
  593. S.Volume = 10
  594. S.Looped = false
  595. S.TimePosition = 0.05
  596. S.Pitch = 1
  597. S:Play()
  598. Shielding = true
  599. BubbleShield.Transparency = 1
  600. for i = 1,10 do
  601. BubbleShield.Transparency = BubbleShield.Transparency - 0.05
  602. swait()
  603. end
  604. BubbleShield.Transparency = 0.5
  605. BubbleShield.CanCollide = true
  606. local MagicFX = Instance.new("ParticleEmitter", BubbleShield)
  607. MagicFX.VelocitySpread = 0
  608. MagicFX.Lifetime = NumberRange.new(1)
  609. MagicFX.Speed = NumberRange.new(0)
  610. MagicFX.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.3, 0.3), NumberSequenceKeypoint.new(1, 0.1, 0.1)})
  611. MagicFX.RotSpeed = NumberRange.new(-180, 180)
  612. MagicFX.Rotation = NumberRange.new(-360, 360)
  613. MagicFX.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.2, 0), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
  614. MagicFX.LightEmission = 1
  615. MagicFX.Color = ColorSequence.new(Color3.fromRGB(255, 152, 220), Color3.fromRGB(255, 152, 220))
  616. MagicFX.Rate = 1500
  617. BubbleShield.Transparency = 0.5
  618. Spawn(function()
  619. wait(1)
  620. MagicFX.Rate = 0
  621. wait(1)
  622. MagicFX:Destroy()
  623. end)
  624. end
  625. end)
  626.  
  627. mouse.KeyUp:connect(function(key)
  628. if key == "r" and attack == false then
  629. S = Instance.new("Sound")
  630. S.Parent = rootPart
  631. S.SoundId = "rbxassetid://1622853765"
  632. S.Volume = 10
  633. S.Looped = false
  634. S.Pitch = 1.5
  635. S:Play()
  636. BubbleShield.Transparency = 0.5
  637. Shielding = false
  638. for i = 1,5 do
  639. BubbleShield.Transparency = BubbleShield.Transparency + 0.1
  640. swait()
  641. end
  642. BubbleShield.Transparency = 1
  643. BubbleShield.CanCollide = false
  644. local MagicFX = Instance.new("ParticleEmitter", BubbleShield)
  645. MagicFX.VelocitySpread = 0
  646. MagicFX.Lifetime = NumberRange.new(0.1)
  647. MagicFX.Speed = NumberRange.new(0)
  648. MagicFX.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 1, 0.3), NumberSequenceKeypoint.new(1, 0.1, 0.1)})
  649. MagicFX.RotSpeed = NumberRange.new(-180, 180)
  650. MagicFX.Rotation = NumberRange.new(-360, 360)
  651. MagicFX.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.2, 0), NumberSequenceKeypoint.new(0.8, 0), NumberSequenceKeypoint.new(1, 1)})
  652. MagicFX.LightEmission = 1
  653. MagicFX.Color = ColorSequence.new(Color3.fromRGB(255, 152, 220), Color3.fromRGB(255, 152, 220))
  654. MagicFX.Rate = 1500
  655. BubbleShield.Transparency = 1
  656. Spawn(function()
  657. wait(0.3)
  658. MagicFX.Rate = 0
  659. wait(1)
  660. MagicFX:Destroy()
  661. end)
  662. end
  663. end)
  664.  
  665. sine = 0
  666. change = 1
  667. sprint=false
  668. local punches={
  669. a=false,
  670. b=false,
  671. c=false
  672. }
  673.  
  674. UIService.InputBegan:connect(function(Input,GUIProcessed)
  675. if not GUIProcessed and Input.UserInputType==Enum.UserInputType.MouseButton1 then
  676. if punches.a==false then
  677. punches.a=true wait(.4) punches.a=false
  678. else
  679. punches.a=true
  680. print('a ',punches.a)
  681. if punches.b==false then
  682. punches.b=true wait(.4) punches.b=false
  683. else
  684. punches.b=true
  685. print('b ',punches.b)
  686. if punches.c==false then
  687. punches.c=true wait(.4) punches.c=false
  688. else
  689. punches.c=true
  690. print('c ',punches.c)
  691. print('a ',punches.a,'b ',punches.b,'c ',punches.c)
  692. end
  693. end
  694. end
  695. elseif not GUIProcessed and Input.KeyCode==Enum.KeyCode.LeftShift then
  696. sprint=true
  697. end
  698. end)
  699.  
  700. UIService.InputEnded:connect(function(Input,GUIProcessed)
  701. if not GUIProcessed and Input.KeyCode==Enum.KeyCode.LeftShift then
  702. sprint=false
  703. end
  704. end)
  705.  
  706. game:GetService("RunService").RenderStepped:connect(function()
  707. Angle = (Angle % 100) + angleSpeed/10
  708. Axis = (Axis % 100) + axisSpeed/10
  709. walkingMagnitude = Vector3.new(rootPart.Velocity.X, 0, rootPart.Velocity.Z).magnitude
  710. jumpVel = Torso.Velocity.Y
  711. sine = change + sine
  712.  
  713. if(Humanoid.Jump) and jumpVel > 1 then
  714. currentAnim = "Jumping"
  715. elseif walkingMagnitude < 2 then
  716. currentAnim = "Idling"
  717. elseif isSprinting == true then
  718. currentAnim = "Sprinting"
  719. elseif walkingMagnitude > 2 then
  720. currentAnim = "Walking"
  721. elseif isAttacking == true then
  722. currentAnim = "Attacking"
  723. end
  724.  
  725. if currentAnim == "Jumping" and Animations == false then
  726. angleSpeed = 2
  727. axisSpeed = 2
  728. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  729. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  730. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  731. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  732. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  733. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15)
  734. elseif currentAnim == "Idling" and Animations == false then
  735. angleSpeed = 1
  736. axisSpeed = 1
  737. change = 0.5
  738. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.65 + math.sin(sine/15)/10, 0) * c_angles(math.rad(0),math.rad(0),math.rad(20) - math.sin(sine/15)/10), 0.15)
  739. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.65 + math.sin(sine/15)/10, 0) * c_angles(math.rad(0),math.rad(0),math.rad(-20) + math.sin(sine/15)/10), 0.15)
  740. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1 - math.sin(sine/15)/10, 0) * c_angles(math.rad(0),math.rad(0),math.rad(0)), 0.15)
  741. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1 - math.sin(sine/15)/10, 0) * c_angles(math.rad(0),math.rad(0),math.rad(0)), 0.15)
  742. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1 + math.sin(sine/15)/10, 0) * c_angles(math.rad(0), math.rad(0),math.rad(0)), 0.15)
  743. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0),math.rad(0),math.rad(0)), 0.15)
  744. elseif currentAnim == "Walking" and Animations == false then
  745. if sprint==false then
  746. angleSpeed = 1
  747. axisSpeed = 1
  748. Humanoid.WalkSpeed = 8
  749. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5 + math.sin(sine/15)/10, 0) * c_angles(math.rad(0) + math.sin(sine/4)/6, math.rad(0),math.rad(5)), 0.15)
  750. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5 + math.sin(sine/15)/10, 0) * c_angles(math.rad(0) - math.sin(sine/4)/6, math.rad(0),math.rad(-5)), 0.15)
  751. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1 + (-math.sin(sine/15)/10), 0) * c_angles(math.sin(sine/4)/3, math.sin((rootPart.RotVelocity.Y/10))/2, -math.sin((rootPart.RotVelocity.Y/10))/2), 0.15)
  752. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1 + (-math.sin(sine/15)/10), 0) * c_angles(-math.sin(sine/4)/3, -math.sin((rootPart.RotVelocity.Y/10))/2, math.sin((-rootPart.RotVelocity.Y/10))/2), 0.15)
  753. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1 + math.sin(sine/15)/10, 0) * c_angles(math.rad(0), math.rad(0), math.sin((rootPart.RotVelocity.Y/30))/2), 0.15)
  754. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0 + math.sin(sine/15)/10) * c_angles(math.rad(0) + math.sin(sine/15)/10, math.sin((rootPart.RotVelocity.Y/2.5))/2, math.rad(0)), 0.15)
  755. else
  756. angleSpeed = 10
  757. axisSpeed = 10
  758. Humanoid.WalkSpeed = 18
  759. RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5 + math.sin(sine/1.5)/5, 0) * c_angles(math.sin(sine/3)/1, math.rad(0),math.rad(10)), 0.15)
  760. LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5 + math.sin(sine/1.5)/5, 0) * c_angles(-math.sin(sine/3)/1, math.rad(0),math.rad(-10)), 0.15)
  761. LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.sin(sine/3)/1, math.rad(0), math.rad(0)), 0.15)
  762. RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(-math.sin(sine/3)/1, math.rad(0), math.rad(0)), 0.15)
  763. Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1 + math.sin(sine/1.5)/5, 0) * c_angles(math.rad(-20) + math.sin(sine/3)/20, math.rad(0), math.sin((rootPart.RotVelocity.Y/15))/2), 0.15)
  764. Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(20), math.sin((rootPart.RotVelocity.Y/1))/2, math.rad(0)), 0.15)
  765. end
  766. end
  767. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement