Advertisement
xpa1nx0

DEMON SLAYER RPG script CC

Mar 11th, 2024 (edited)
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.67 KB | None | 0 0
  1. local version = "v0.1"
  2.  
  3. function MainScript()
  4. local Fluent = loadstring(game:HttpGet("https://raw.githubusercontent.com/xpa1n/library/main/FluentLibrary.lua"))()
  5.  
  6. local Window = Fluent:CreateWindow({
  7. Title = "《鬼灭之刃 RPG》剧本 - Janina Hub",
  8. SubTitle = version,
  9. TabWidth = 160,
  10. Size = UDim2.fromOffset(580, 460),
  11. Acrylic = true, -- The blur may be detectable, setting this to false disables blur entirely
  12. Theme = "Dark",
  13. MinimizeKey = Enum.KeyCode.LeftControl -- Used when theres no MinimizeKeybind
  14. })
  15.  
  16. local Tabs = {
  17. autofarm = Window:AddTab({ Title = "自动农场", Icon = "swords" }),
  18. other = Window:AddTab({ Title = "其他", Icon = "swords" })
  19. }
  20.  
  21. do
  22.  
  23. local attacksettings = Tabs.autofarm:AddSection("攻击设置")
  24. --[[
  25. local AutoAttackToggle = attacksettings:AddToggle("AutoAttack", {Title = "Auto Attack", Default = false })
  26. _G.AutoAttack = false
  27.  
  28. AutoAttackToggle:OnChanged(function()
  29. _G.AutoAttack = AutoAttackToggle.Value
  30. end)
  31.  
  32. coroutine.resume(coroutine.create(function()
  33. while task.wait(0.5) do
  34. if _G.AutoAttack then
  35. local user = game:GetService("VirtualUser")
  36. local player = game.Players.LocalPlayer
  37. local mouse = player:GetMouse()
  38. user:CaptureController()
  39. user:ClickButton1(Vector2.new(mouse.x,mouse.y))
  40. end
  41. end
  42. end))
  43. --]]
  44. local AutoSkillZToggle = attacksettings:AddToggle("AutoSkillZ", {Title = "自动技能 Z", Default = false })
  45. _G.AutoSkillZ = false
  46.  
  47. AutoSkillZToggle:OnChanged(function()
  48. _G.AutoSkillZ = AutoSkillZToggle.Value
  49. end)
  50.  
  51. coroutine.resume(coroutine.create(function()
  52. while task.wait() do
  53. if _G.AutoSkillZ then
  54. local button = game:service'VirtualInputManager'
  55. button:SendKeyEvent(true, "Z", false, game)
  56. button:SendKeyEvent(false, "Z", false, game)
  57. wait(2)
  58. end
  59. end
  60. end))
  61.  
  62. local AutoSkillXToggle = attacksettings:AddToggle("AutoSkillX", {Title = "自动技能 X", Default = false })
  63. _G.AutoSkillX = false
  64.  
  65. AutoSkillXToggle:OnChanged(function()
  66. _G.AutoSkillX = AutoSkillXToggle.Value
  67. end)
  68.  
  69. coroutine.resume(coroutine.create(function()
  70. while task.wait() do
  71. if _G.AutoSkillX then
  72. local button = game:service'VirtualInputManager'
  73. button:SendKeyEvent(true, "X", false, game)
  74. button:SendKeyEvent(false, "X", false, game)
  75. wait(2)
  76. end
  77. end
  78. end))
  79.  
  80. local AutoSkillCToggle = attacksettings:AddToggle("AutoSkillC", {Title = "自动技能 C", Default = false })
  81. _G.AutoSkillC = false
  82.  
  83. AutoSkillCToggle:OnChanged(function()
  84. _G.AutoSkillC = AutoSkillCToggle.Value
  85. end)
  86.  
  87. coroutine.resume(coroutine.create(function()
  88. while task.wait() do
  89. if _G.AutoSkillC then
  90. local button = game:service'VirtualInputManager'
  91. button:SendKeyEvent(true, "C", false, game)
  92. button:SendKeyEvent(false, "C", false, game)
  93. wait(2)
  94. end
  95. end
  96. end))
  97.  
  98. local autofarmsettings = Tabs.autofarm:AddSection("自动农场设置")
  99.  
  100. local MobSelectDropdown = autofarmsettings:AddDropdown("ChooseMob", {
  101. Title = "选择怪物",
  102. Values = {},
  103. Multi = false,
  104. Default = false,
  105. })
  106.  
  107. _G.MobName = "nil";
  108. MobSelectDropdown:OnChanged(function(Value)
  109. _G.MobName = Value;
  110. end)
  111.  
  112. local function refreshMobList()
  113. local mobs = {}
  114. local added = {}
  115. local mobFolder = game:GetService("Workspace")["Folder_Monster"]
  116. for _, mob in pairs(mobFolder:GetChildren()) do
  117. if not added[mob.Name] then
  118. mobs[#mobs + 1] = mob.Name
  119. added[mob.Name] = true
  120. end
  121. end
  122. MobSelectDropdown:SetValues(mobs)
  123. end
  124.  
  125. autofarmsettings:AddButton({
  126. Title = "刷新怪物",
  127. Callback = function()
  128. refreshMobList()
  129. end
  130. })
  131. refreshMobList()
  132.  
  133. local AutoFarmMobToggle = autofarmsettings:AddToggle("AutoFarmMob", {Title = "自动农场怪物", Default = false })
  134. _G.Autofarm = false
  135.  
  136. AutoFarmMobToggle:OnChanged(function()
  137. _G.Autofarm = AutoFarmMobToggle.Value
  138. end)
  139.  
  140. function KillMobs()
  141. pcall(function()
  142. local targetMob = nil
  143. local plr = game.Players.LocalPlayer.Character
  144. local plrhr = plr.HumanoidRootPart
  145. for _, v in pairs(game:GetService("Workspace")["Folder_Monster"]:GetChildren()) do
  146. if v.Name == _G.MobName and v:FindFirstChild("HumanoidRootPart") and v.Humanoid.Health > 0 then
  147. targetMob = v
  148. plrhr.CFrame = v.HumanoidRootPart.CFrame * CFrame.new(0, 0, 7)
  149. break
  150. end
  151. end
  152. end)
  153. end
  154.  
  155. coroutine.resume(coroutine.create(function()
  156. while task.wait() do
  157. if _G.Autofarm then
  158. KillMobs()
  159. end
  160. end
  161. end))
  162.  
  163. local GetQuestToggle = autofarmsettings:AddToggle("GetQuest", {Title = "自动任务", Default = false })
  164. _G.GetxQuest = false
  165.  
  166. GetQuestToggle:OnChanged(function()
  167. _G.GetxQuest = GetQuestToggle.Value
  168. pcall(function()
  169. game:GetService("Players").LocalPlayer.PlayerGui["UI_Game"]["UI_Task"]["Frame_View"].Visible = false
  170. end)
  171. end)
  172.  
  173. function GetQuest()
  174. pcall(function()
  175. if game:GetService("Players").LocalPlayer.PlayerGui["UI_Game"]["UI_Task"]["Frame_View"].Visible == false then
  176. local args = {[1] = {["Name"] = "GetTask",["TaskId"] = _G.MobName}}
  177. game:GetService("ReplicatedStorage").Service.TaskService.Event.RemoteFunction_Task:InvokeServer(unpack(args))
  178. end
  179. end)
  180. end
  181.  
  182. coroutine.resume(coroutine.create(function()
  183. while task.wait() do
  184. if _G.GetxQuest then
  185. GetQuest()
  186. end
  187. end
  188. end))
  189.  
  190. local teleport = Tabs.other:AddSection("传送")
  191.  
  192. local TeleportDropdown = teleport:AddDropdown("ChooseMap", {
  193. Title = "选择地图",
  194. Values = {},
  195. Multi = false,
  196. Default = false,
  197. })
  198.  
  199. local function refreshMapList()
  200. local mapFolders = {}
  201. local folderGameMap = game:GetService("Workspace")["Folder_GameMap"]
  202. for _, folder in pairs(folderGameMap:GetChildren()) do
  203. if folder:IsA("Folder") then
  204. table.insert(mapFolders, folder.Name)
  205. end
  206. end
  207. TeleportDropdown:SetValues(mapFolders)
  208. end
  209.  
  210. refreshMapList()
  211.  
  212. TeleportDropdown:OnChanged(function(selectedMapName)
  213. local folderGameMap = game:GetService("Workspace")["Folder_GameMap"]
  214. local selectedFolder = folderGameMap:FindFirstChild(selectedMapName)
  215. if selectedFolder and selectedFolder:FindFirstChild("SpawnLocation") then
  216. local spawnLocation = selectedFolder.SpawnLocation.SpawnLocation
  217. local player = game.Players.LocalPlayer
  218. if player and player.Character and spawnLocation then
  219. player.Character:SetPrimaryPartCFrame(spawnLocation.CFrame)
  220. end
  221. else
  222. warn("Spawn location not found in the selected map folder.")
  223. end
  224. end)
  225.  
  226.  
  227.  
  228. local autostats = Tabs.other:AddSection("Auto Stats")
  229.  
  230. local AutoStatsMeleeToggle = autostats:AddToggle("AutoStatsMeleeToggle", {Title = "Auto Stats Melee", Default = false })
  231. _G.AutoStatsMelee = false
  232.  
  233. AutoStatsMeleeToggle:OnChanged(function()
  234. _G.AutoStatsMelee = AutoStatsMeleeToggle.Value
  235. end)
  236.  
  237. coroutine.resume(coroutine.create(function()
  238. while task.wait(0.5) do
  239. if _G.AutoStatsMelee then
  240. local args = {[1] = {["UseNumber"] = 1,["Name"] = "UseAdd",["AddName"] = "Melee"}}
  241. game:GetService("ReplicatedStorage").Event.eve_UpConfig:FireServer(unpack(args))
  242. end
  243. end
  244. end))
  245.  
  246. local AutoStatsDefenseToggle = autostats:AddToggle("AutoStatsDefenseToggle", {Title = "Auto Stats Defense", Default = false })
  247. _G.AutoStatsDefense = false
  248.  
  249. AutoStatsDefenseToggle:OnChanged(function()
  250. _G.AutoStatsDefense = AutoStatsDefenseToggle.Value
  251. end)
  252.  
  253. coroutine.resume(coroutine.create(function()
  254. while task.wait(0.5) do
  255. if _G.AutoStatsDefense then
  256. local args = {[1] = {["UseNumber"] = 1, ["Name"] = "UseAdd", ["AddName"] = "Defense"}}
  257. game:GetService("ReplicatedStorage").Event.eve_UpConfig:FireServer(unpack(args))
  258. end
  259. end
  260. end))
  261.  
  262. local AutoStatsBreathToggle = autostats:AddToggle("AutoStatsBreathToggle", {Title = "Auto Stats Breath", Default = false })
  263. _G.AutoStatsBreath = false
  264.  
  265. AutoStatsBreathToggle:OnChanged(function()
  266. _G.AutoStatsBreath = AutoStatsBreathToggle.Value
  267. end)
  268.  
  269. coroutine.resume(coroutine.create(function()
  270. while task.wait(0.5) do
  271. if _G.AutoStatsBreath then
  272. local args = {[1] = {["UseNumber"] = 1, ["Name"] = "UseAdd", ["AddName"] = "Breath"}}
  273. game:GetService("ReplicatedStorage").Event.eve_UpConfig:FireServer(unpack(args))
  274. end
  275. end
  276. end))
  277.  
  278. local AutoStatsDemonToggle = autostats:AddToggle("AutoStatsDemonToggle", {Title = "Auto Stats Demon", Default = false })
  279. _G.AutoStatsDemon = false
  280.  
  281. AutoStatsDemonToggle:OnChanged(function()
  282. _G.AutoStatsDemon = AutoStatsDemonToggle.Value
  283. end)
  284.  
  285. coroutine.resume(coroutine.create(function()
  286. while task.wait(0.5) do
  287. if _G.AutoStatsDemon then
  288. local args = {[1] = {["UseNumber"] = 1, ["Name"] = "UseAdd", ["AddName"] = "Ghost"}}
  289. game:GetService("ReplicatedStorage").Event.eve_UpConfig:FireServer(unpack(args))
  290. end
  291. end
  292. end))
  293.  
  294. local AutoStatsGunToggle = autostats:AddToggle("AutoStatsGunToggle", {Title = "Auto Stats Gun", Default = false })
  295. _G.AutoStatsGun = false
  296.  
  297. AutoStatsGunToggle:OnChanged(function()
  298. _G.AutoStatsGun = AutoStatsGunToggle.Value
  299. end)
  300.  
  301. coroutine.resume(coroutine.create(function()
  302. while task.wait(0.5) do
  303. if _G.AutoStatsGun then
  304. local args = {[1] = {["UseNumber"] = 1, ["Name"] = "UseAdd", ["AddName"] = "Gun"}}
  305. game:GetService("ReplicatedStorage").Event.eve_UpConfig:FireServer(unpack(args))
  306. end
  307. end
  308. end))
  309.  
  310. local otherxzx = Tabs.other:AddSection("其他")
  311.  
  312. local ggwalkspeed = 24
  313.  
  314. local WalkSpeed = otherxzx:AddSlider("行走速度", {
  315. Title = "行走速度",
  316. Default = ggwalkspeed,
  317. Min = 10,
  318. Max = 200,
  319. Rounding = 0,
  320. Callback = function(Value)
  321. ggwalkspeed = Value
  322. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = ggwalkspeed
  323. end
  324. })
  325.  
  326. coroutine.resume(coroutine.create(function()
  327. while task.wait() do
  328. if game.Players.LocalPlayer.Character.Humanoid.WalkSpeed ~= ggwalkspeed then
  329. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = ggwalkspeed
  330. end
  331. end
  332. end))
  333.  
  334. end
  335. Window:SelectTab(1)
  336. end
  337.  
  338. MainScript()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement