Created
July 20, 2008 15:20
-
-
Save mojombo/19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Bar | |
| def self.class_name | |
| name.split(/::/) | |
| end | |
| end | |
| loop { Bar.class_name } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")
-- ตัวแปรสถานะ
local isNoclip = false
local isFlying = false
local flySpeed = 50
local bodyVelocity = nil
local bodyGyro = nil
-- 1. ฟังก์ชันวิ่งเร็ว
local function setSpeed(speed)
humanoid.WalkSpeed = speed
end
-- 2. ฟังก์ชันเดินทะลุกำแพง (Noclip)
RunService.Stepped:Connect(function()
if isNoclip and character then
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.CanCollide = false
end
end
end
end)
-- 3. ฟังก์ชันระบบบิน (Fly)
local function toggleFly()
isFlying = not isFlying
if isFlying then
bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(1, 1, 1) * 10^6
bodyVelocity.Velocity = Vector3.new(0, 0, 0)
bodyVelocity.Parent = rootPart
end
-- ควบคุมการบินตามทิศทางกล้อง
RunService.RenderStepped:Connect(function()
if isFlying and bodyVelocity and bodyGyro then
local camera = workspace.CurrentCamera
bodyGyro.CFrame = camera.CFrame
bodyVelocity.Velocity = camera.CFrame.LookVector * flySpeed
end
end)
-- 4. ฟังก์ชันผลักผู้เล่นใกล้เคียงให้กระเด็น (Knockback Push)
local function pushNearbyPlayers()
local pushRadius = 15
local pushForce = 100
end
-- การคุมปุ่มคีย์บอร์ด (Keybinds)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
end)
UserInputService.InputEnded:Connect(function(input)
-- ปล่อย Shift เพื่อกลับความเร็วปกติ
if input.KeyCode == Enum.KeyCode.LeftShift then
setSpeed(16)
end
end)