Advertisement
voidman

Untitled

Dec 28th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.24 KB | None | 0 0
  1. --]]
  2. --https://github.com/Mokiros/roblox-FE-compatibility
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  5. local RealPlayer = Player
  6. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  7. --//Harley Quinn created by WaverlyCole
  8. player = game:service'Players'.LocalPlayer
  9. mouse = player:GetMouse()
  10. char = player.Character
  11. humanoid = char.Humanoid
  12. rootpart = char.HumanoidRootPart
  13. torso = char.Torso
  14. hitdbtime = .5
  15. --//Joints
  16. N=torso:FindFirstChild("Neck")
  17. RS=torso:FindFirstChild("Right Shoulder")
  18. LS=torso:FindFirstChild("Left Shoulder")
  19. RH=torso:FindFirstChild("Right Hip")
  20. LH=torso:FindFirstChild("Left Hip")
  21. RJ=rootpart:FindFirstChild("RootJoint")
  22. --//Default C0's
  23. NC0=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  24. RSC0=CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  25. LSC0=CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  26. RHC0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  27. LHC0=CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  28. RJC0=CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  29. --//Cheats
  30. cframe = CFrame.new
  31. angle = CFrame.Angles
  32. radian = math.rad
  33. random = math.random
  34. --//Variables
  35. local idle,walk,fall,jump = false,false,false,false
  36. local jumpcheck = false
  37. local specialanim = nil
  38. --//Functions
  39. local function weldBetween(a, b)
  40. local weld = Instance.new("ManualWeld")
  41. weld.Part0 = a
  42. weld.Part1 = b
  43. weld.C0 = CFrame.new()
  44. weld.C1 = b.CFrame:inverse() * a.CFrame
  45. weld.Parent = a
  46. return weld;
  47. end
  48. local animate = function(joint,prop,cfrmz,alp)
  49. joint[prop]=joint[prop]:lerp(cfrmz,alp)
  50. end
  51. --//Harley Quinn created by WaverlyCole
  52. local movedb,hitting = false,false
  53. local keyDown = function(key)
  54. if movedb then return end
  55. if key == 'q' then
  56. movedb = true
  57. char.Humanoid.WalkSpeed = 0
  58. specialanim = function()
  59. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.1)
  60. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(0),radian(-90),radian(90 + math.sin(tick()*2)*5)),0.1)
  61. animate(LS,'C0',LSC0*cframe(0,0,-.5)*angle(radian(0),radian(-30),radian(-90 + math.sin(tick()*2)*-5)),0.1)
  62. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.1)
  63. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.1)
  64. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(-50)),0.1)
  65. animate(BATWELD,'C0',BATC0*cframe(-1.5,-1.5,0)*angle(radian(0),radian(0),radian(90)),0.5)
  66. end
  67. wait(.5)
  68. hitting = true
  69. specialanim = function()
  70. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  71. animate(RS,'C0',RSC0*cframe(0,0,-.5)*angle(radian(0),radian(20),radian(90 + math.sin(tick()*2)*5)),0.3)
  72. animate(LS,'C0',LSC0*cframe(0,0,-.5)*angle(radian(0),radian(-45),radian(-90 + math.sin(tick()*2)*-5)),0.3)
  73. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  74. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  75. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(90)),0.3)
  76. animate(BATWELD,'C0',BATC0*cframe(-1.5,-2,0)*angle(radian(90),radian(0),radian(100)),0.3)
  77. end
  78. wait(.5)
  79. specialanim = nil
  80. hitting = false
  81. movedb = false
  82. char.Humanoid.WalkSpeed = 20
  83. elseif key =='e' then
  84. hitdbtime = .01
  85. movedb = true
  86. hitting = true
  87. char.Humanoid.WalkSpeed = 0
  88. for i = 1,360,20 do
  89. specialanim = function()
  90. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  91. animate(RS,'C0',RSC0*cframe(0,0,-.5)*angle(radian(0),radian(20),radian(90 + math.sin(tick()*2)*5)),0.3)
  92. animate(LS,'C0',LSC0*cframe(0,0,-.5)*angle(radian(0),radian(-45),radian(-90 + math.sin(tick()*2)*-5)),0.3)
  93. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  94. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  95. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(i)),0.3)
  96. animate(BATWELD,'C0',BATC0*cframe(-1.5,-2,0)*angle(radian(90),radian(0),radian(100)),0.3)
  97. end
  98. game:service'RunService'.RenderStepped:wait()
  99. end
  100. movedb = false
  101. hitting = false
  102. hitdbtime = .5
  103. specialanim = nil
  104. char.Humanoid.WalkSpeed = 20
  105. elseif key == 'f' then
  106. movedb = true
  107. char.Humanoid.WalkSpeed = 0
  108. specialanim = function()
  109. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  110. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(0),radian(-10),radian(60 + math.sin(tick()*2)*5)),0.3)
  111. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(10),radian(0),radian(0)),0.1)
  112. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  113. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  114. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(math.sin(tick()*(char.Humanoid.WalkSpeed/2))/3),radian(0)),0.3)
  115. animate(BATWELD,'C0',BATC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  116. end
  117. wait(.2)
  118. local ball = Instance.new'Part'
  119. local ballmesh = Instance.new('SpecialMesh',ball)
  120. ballmesh.MeshId = 'http://www.roblox.com/asset/?id=55021861'
  121. ballmesh.TextureId = 'http://www.roblox.com/asset/?id=188135984'
  122. ballmesh.Scale = Vector3.new(3,3,3)
  123. ball.Shape = 'Ball'
  124. ball.Size = Vector3.new(1,1,1)
  125. ball.CanCollide = false
  126. ball.CFrame = char['Left Arm'].CFrame * CFrame.new(0,-1,0)
  127. ball.Parent = char
  128. local ballweld = weldBetween(ball,char['Left Arm'])
  129. specialanim = function()
  130. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  131. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(0),radian(-10),radian(60 + math.sin(tick()*2)*5)),0.3)
  132. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(-30),radian(0),radian(0)),0.1)
  133. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  134. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  135. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(math.sin(tick()*(char.Humanoid.WalkSpeed/2))/3),radian(0)),0.3)
  136. animate(BATWELD,'C0',BATC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  137. end
  138. wait(.1)
  139. specialanim = function()
  140. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  141. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(0),radian(-10),radian(60 + math.sin(tick()*2)*5)),0.3)
  142. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(-85)),0.5)
  143. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  144. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  145. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(math.sin(tick()*(char.Humanoid.WalkSpeed/2))/3),radian(0)),0.3)
  146. animate(BATWELD,'C0',BATC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  147. end
  148. wait(.1)
  149. ballweld:Destroy()
  150. ball.Anchored = true
  151. spawn(function()
  152. for i = 1,20 do
  153. ball.CFrame = ball.CFrame * CFrame.new(.1,-.1,0)
  154. game:service'RunService'.RenderStepped:wait()
  155. end
  156. end)
  157. wait(.1)
  158. specialanim = function()
  159. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.1)
  160. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(0),radian(-90),radian(90 + math.sin(tick()*2)*5)),0.1)
  161. animate(LS,'C0',LSC0*cframe(0,0,-.5)*angle(radian(0),radian(-20),radian(-90)),0.1)
  162. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.1)
  163. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.1)
  164. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(-50)),0.1)
  165. animate(BATWELD,'C0',BATC0*cframe(-1.5,-1.5,0)*angle(radian(0),radian(0),radian(90)),0.5)
  166. end
  167. wait(.2)
  168. specialanim = function()
  169. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  170. animate(RS,'C0',RSC0*cframe(0,0,-.5)*angle(radian(0),radian(20),radian(90 + math.sin(tick()*2)*5)),0.3)
  171. animate(LS,'C0',LSC0*cframe(0,0,-.5)*angle(radian(0),radian(-45),radian(-90 + math.sin(tick()*2)*-5)),0.3)
  172. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  173. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  174. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(90)),0.3)
  175. animate(BATWELD,'C0',BATC0*cframe(-1.5,-2,0)*angle(radian(90),radian(0),radian(100)),0.3)
  176. end
  177. local force = Instance.new('BodyForce',ball)
  178. force.Force = CFrame.new(ball.CFrame.p,mouse.Hit.p).lookVector*200 + Vector3.new(0,60,0)
  179. batsound.TimePosition = .7
  180. batsound:Play()
  181. ball.Anchored=false
  182. ball.Touched:connect(function(ob)
  183. if ob.Name ~= 'Base' and not ob:IsDescendantOf(char) then
  184. ob:Destroy()
  185. ball:Destroy()
  186. end
  187. end)
  188. wait(.5)
  189. movedb = false
  190. specialanim = nil
  191. char.Humanoid.WalkSpeed = 20
  192. elseif key == 'c' then
  193. movedb = true
  194. char.Humanoid.WalkSpeed = 0
  195.  
  196. end
  197. end
  198. --//Movement
  199. game:service'RunService'.RenderStepped:connect(function()
  200. if rootpart.Velocity.y < -1 and not idle then
  201. idle,walk,fall,jump = false,false,true,false
  202. elseif jumpcheck then
  203. idle,walk,fall,jump = false,false,false,true
  204. elseif humanoid.MoveDirection ~= Vector3.new(0,0,0) then
  205. idle,walk,fall,jump = false,true,false,false
  206. elseif humanoid.MoveDirection == Vector3.new(0,0,0) then
  207. idle,walk,fall,jump = true,false,false,false
  208. end
  209. end)
  210. --//Harley Quinn created by WaverlyCole
  211. humanoid.StateChanged:connect(function(state)
  212. if state == Enum.HumanoidStateType.Jumping then
  213. jumpcheck = true
  214. else
  215. jumpcheck = false
  216. end
  217. end)
  218. --//Animate
  219. char.Animate.Disabled = true
  220. humanoid.Animator:Destroy()
  221. local playAnimation = coroutine.wrap(function()
  222. while true do
  223. game:service'RunService'.RenderStepped:wait()
  224. if specialanim then
  225. specialanim()
  226. elseif idle then
  227. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  228. animate(RS,'C0',RSC0*cframe(.6,0,-.5)*angle(radian(40),radian(-40),radian(20 + math.sin(tick()*2)*1)),0.3)
  229. animate(LS,'C0',LSC0*cframe(0,0,-.7)*angle(radian(0),radian(-40),radian(-20 + math.sin(tick()*2)*1)),0.3)
  230. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(-1 + math.sin(tick()))*5,radian(0),radian(0)),0.3)
  231. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  232. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  233. animate(BATWELD,'C0',BATC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  234. elseif walk then
  235. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  236. animate(RS,'C0',RSC0*cframe(0,0,-.5)*angle(radian(0),radian(5),radian(60 + math.sin(tick()*2)*5)),0.3)
  237. animate(LS,'C0',LSC0*cframe(0,0,-.8)*angle(radian(0),radian(-50),radian(-60 + math.sin(tick()*2)*-5)),0.3)
  238. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(math.sin(tick()*(char.Humanoid.WalkSpeed/2))*40)),0.3)
  239. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(math.sin(tick()*-(char.Humanoid.WalkSpeed/2))*-40)),0.3)
  240. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(math.sin(tick()*(char.Humanoid.WalkSpeed/2))/3),radian(0)),0.3)
  241. animate(BATWELD,'C0',BATC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  242. elseif fall then
  243. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  244. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  245. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  246. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  247. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  248. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  249. animate(BATWELD,'C0',BATC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  250. elseif jump then
  251. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  252. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  253. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  254. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  255. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  256. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  257. animate(BATWELD,'C0',BATC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  258. end
  259. end
  260. end)
  261. --//Outfit
  262. repeat wait() until char:FindFirstChild'Pants'
  263. char.Pants.PantsTemplate = 'http://www.roblox.com/asset/?id=476061531'
  264. char.Shirt.ShirtTemplate = 'http://www.roblox.com/asset/?id=476061468'
  265. char.Head.face.Texture = 'http://www.roblox.com/asset/?id=519345419'
  266. for i,v in pairs(char:children()) do
  267. if v:IsA'Accessory' then
  268. v:Destroy()
  269. end
  270. end
  271. hair = Instance.new('Part')
  272. local mesh = Instance.new('SpecialMesh',hair)
  273. mesh.MeshId = 'rbxassetid://443042960'
  274. mesh.Scale = Vector3.new(0.032, 0.032, 0.032)
  275. mesh.TextureId = 'http://www.roblox.com/asset/?id=442391693'
  276. hair.Size = Vector3.new(.1,.1,.1)
  277. hair.CanCollide=false
  278. hair.CFrame = char.Head.CFrame * CFrame.Angles(0,math.rad(180),0) * CFrame.new(0,-.8,.4)
  279. hair.Parent=char.Head
  280. weldBetween(hair,char.Head)
  281. bat = Instance.new('Part')
  282. batmesh = Instance.new('SpecialMesh',bat)
  283. batmesh.MeshId = 'rbxassetid://491941089'
  284. batmesh.Scale = Vector3.new(0.032, 0.02, 0.032)
  285. batmesh.TextureId = 'rbxassetid://491941393'
  286. bat.Size = Vector3.new(.4,4,.4)
  287. bat.CanCollide=false
  288. bat.CFrame = char['Right Arm'].CFrame * CFrame.Angles(math.rad(-90),0,0) * CFrame.new(0,1.5,-1)
  289. bat.Parent = char
  290. local weld = weldBetween(bat,char['Right Arm'])
  291. BATC0 = weld.C0
  292. BATWELD = weld
  293. batsound = Instance.new('Sound',bat)
  294. batsound.SoundId = 'rbxassetid://724537174'
  295. batsound.Volume = 10
  296. batsound.Pitch = .8
  297.  
  298. char.Humanoid.WalkSpeed = 20
  299. --//Harley Quinn created by WaverlyCole
  300. playAnimation()
  301. local db = false
  302. bat.Touched:connect(function(obj)
  303. local direction = CFrame.new(bat.CFrame.p,obj.CFrame.p)
  304. if obj.Name == 'HumanoidRootPart' or obj.Name == 'Base' then return end
  305. if not hitting or db then return end
  306. if not obj:IsDescendantOf(char) then
  307. print('hit '..obj.Name)
  308. db = true
  309. obj:BreakJoints()
  310. obj.Anchored=false
  311. local force = Instance.new('BodyForce',obj)
  312. force.Force = bat.CFrame.lookVector*500+Vector3.new(0,100,0)
  313. batsound.TimePosition = .7
  314. batsound:Play()
  315. wait(hitdbtime)
  316. force:Destroy()
  317. db = false
  318. end
  319. end)
  320. --//Harley Quinn created by WaverlyCole
  321. mouse.KeyDown:connect(keyDown)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement